:root {
  --bg-top: #071726;
  --bg-bottom: #efe6d7;
  --card: rgba(251, 247, 239, 0.84);
  --card-strong: rgba(255, 251, 245, 0.95);
  --ink: #122033;
  --muted: #50657d;
  --accent: #1565c0;
  --accent-deep: #0f4f93;
  --accent-soft: rgba(21, 101, 192, 0.14);
  --sea: #00a86b;
  --sea-soft: rgba(0, 168, 107, 0.14);
  --gold: #f3c46a;
  --line: rgba(18, 32, 51, 0.12);
  --shadow: 0 24px 68px rgba(7, 23, 38, 0.22);
  --radius: 24px;
  --radius-sm: 16px;
  --content-width: min(1240px, calc(100vw - 1rem));
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  font-family: "Aptos", "Trebuchet MS", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(243, 196, 106, 0.22), transparent 28%),
    radial-gradient(circle at 84% 10%, rgba(31, 124, 133, 0.24), transparent 22%),
    radial-gradient(circle at 74% 22%, rgba(225, 106, 45, 0.16), transparent 20%),
    linear-gradient(180deg, var(--bg-top) 0%, #10243a 34%, #eadfce 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(transparent 0 96%, rgba(255, 255, 255, 0.08) 96% 100%),
    linear-gradient(90deg, transparent 0 96%, rgba(255, 255, 255, 0.05) 96% 100%);
  background-size: 100% 160px, 160px 100%;
  pointer-events: none;
  opacity: 0.25;
}

.page-shell {
  width: var(--content-width);
  margin: 0 auto;
  padding:
    max(0.8rem, env(safe-area-inset-top))
    0
    max(1.5rem, env(safe-area-inset-bottom));
}

.auth-shell {
  position: relative;
  min-height: 100vh;
  padding:
    max(0.8rem, env(safe-area-inset-top))
    0.75rem
    max(1rem, env(safe-area-inset-bottom));
  overflow: hidden;
}

.auth-background {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 12%, rgba(243, 196, 106, 0.16), transparent 24%),
    radial-gradient(circle at 82% 10%, rgba(31, 124, 133, 0.2), transparent 24%),
    linear-gradient(180deg, rgba(7, 23, 38, 0.96), rgba(16, 36, 58, 0.92));
}

.auth-grid {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  margin: 0 auto;
  min-height: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.auth-copy {
  order: 1;
  color: #f8f0e2;
  padding: 0.2rem 0.1rem 0.8rem;
}

.brand-logo {
  display: block;
  height: auto;
}

.auth-brand-logo {
  width: min(420px, 92%);
  margin: 0 0 0.9rem;
  filter: drop-shadow(0 14px 30px rgba(7, 23, 38, 0.16));
}

.auth-copy h1 {
  max-width: 12ch;
  font-size: clamp(2.2rem, 10vw, 3.8rem);
}

.auth-benefits {
  margin: 1.2rem 0 0;
  padding-left: 1.2rem;
  color: rgba(248, 240, 226, 0.86);
  line-height: 1.65;
}

.auth-benefits li + li {
  margin-top: 0.4rem;
}

.auth-seo-panel {
  order: 3;
  margin-top: 1rem;
  color: #f8f0e2;
}

.auth-seo-heading h2 {
  max-width: 24ch;
  font-size: clamp(1.45rem, 2.25vw, 2.15rem);
  line-height: 1.08;
}

.auth-seo-grid {
  margin-top: 0;
}

.auth-seo-panel .seo-card {
  background: rgba(255, 250, 243, 0.92);
  border-color: rgba(18, 32, 51, 0.1);
}

.auth-seo-panel .seo-card h3 {
  color: #122033;
}

.mobile-warning-banner {
  margin: 1rem 0 0;
  padding: 1rem 1.05rem;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(243, 196, 106, 0.18), rgba(225, 106, 45, 0.16));
  border: 1px solid rgba(243, 196, 106, 0.28);
  box-shadow: 0 16px 34px rgba(7, 23, 38, 0.18);
}

.mobile-warning-banner p {
  margin: 0;
  color: rgba(248, 240, 226, 0.94);
  line-height: 1.6;
}

.mobile-warning-eyebrow {
  margin-bottom: 0.45rem !important;
  color: #f3c46a !important;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.alpha-warning-banner {
  background: linear-gradient(135deg, rgba(214, 107, 61, 0.18), rgba(21, 101, 192, 0.16));
  border-color: rgba(214, 107, 61, 0.3);
}

.auth-card {
  order: 2;
  padding: 1rem;
  border-radius: 26px;
  background: rgba(255, 250, 243, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.auth-seo-band {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  margin: 1rem auto 0;
  padding: 1.2rem;
  background: rgba(255, 250, 243, 0.9);
}

.seo-grid,
.seo-faq {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

.seo-faq {
  margin-top: 0.9rem;
}

.seo-card {
  padding: 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(18, 32, 51, 0.08);
}

.seo-card p {
  margin: 0.55rem 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.auth-form {
  display: grid;
  gap: 0.9rem;
}

.auth-subcard {
  padding: 1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(18, 32, 51, 0.08);
}

.auth-subnote {
  margin: -0.15rem 0 0;
}

#requestAccessForm,
#contactForm {
  margin-top: 1rem;
}

.consent-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(18, 32, 51, 0.12);
  background: rgba(21, 101, 192, 0.05);
}

.consent-check input {
  appearance: auto;
  width: 1.1rem;
  min-width: 1.1rem;
  max-width: 1.1rem;
  height: 1.1rem;
  min-height: 1.1rem;
  margin: 0.18rem 0 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  box-shadow: none;
  transform: none;
  flex: 0 0 auto;
  align-self: start;
  accent-color: var(--accent);
  cursor: pointer;
}

.consent-check input:focus {
  outline: 2px solid rgba(214, 107, 61, 0.55);
  outline-offset: 2px;
  box-shadow: none;
  transform: none;
}

.consent-check span {
  display: grid;
  gap: 0.3rem;
  color: var(--ink);
  line-height: 1.55;
}

.consent-check small {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.consent-check a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.consent-check a:hover,
.consent-check a:focus-visible {
  color: #a24729;
}

.newsletter-field {
  gap: 0.5rem;
}

textarea {
  width: 100%;
  min-height: 8rem;
  resize: vertical;
  padding: 1rem 1.1rem;
  border-radius: 20px;
  border: 1px solid rgba(18, 32, 51, 0.12);
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  font: inherit;
  line-height: 1.55;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

textarea:focus {
  outline: none;
  border-color: rgba(21, 101, 192, 0.35);
  box-shadow:
    0 0 0 4px rgba(21, 101, 192, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 1rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(18, 32, 51, 0.12);
}

.auth-status-box,
.pending-card {
  margin-top: 1rem;
}

.pending-card {
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(225, 106, 45, 0.1), rgba(31, 124, 133, 0.08));
  border: 1px solid rgba(18, 32, 51, 0.08);
}

.auth-status-box.is-success,
.admin-status.is-success {
  background: rgba(31, 106, 82, 0.1);
  border-color: rgba(31, 106, 82, 0.18);
  color: #1f6a52;
}

.auth-status-box.is-warning,
.admin-status.is-warning {
  background: rgba(138, 90, 21, 0.08);
  border-color: rgba(138, 90, 21, 0.16);
  color: #6a4a16;
}

.auth-status-box.is-error,
.admin-status.is-error {
  background: rgba(150, 47, 56, 0.08);
  border-color: rgba(150, 47, 56, 0.16);
  color: #962f38;
}

.app-topbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: stretch;
  flex-direction: column;
  margin: 0 0 1rem;
  padding: 1rem 1.15rem;
  border-radius: 22px;
  background: rgba(255, 250, 243, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.36);
  box-shadow: var(--shadow);
}

.app-topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.mobile-account-toggle {
  display: none;
}

.mobile-workspace-nav {
  display: none;
}

.mobile-nav-button {
  min-width: 0;
}

.primary-chart-shell {
  scroll-margin-top: 7rem;
}

.member-badge {
  padding: 0.48rem 0.85rem;
  border-radius: 999px;
  background: rgba(31, 124, 133, 0.13);
  color: var(--ink);
  font-weight: 700;
}

.hero,
.content-grid,
.footer {
  position: relative;
  z-index: 1;
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: stretch;
  padding: 1rem 0 1.5rem;
}

.hero-copy {
  color: #f8f0e2;
  padding: 1rem 0.15rem;
  animation: fade-up 0.6s ease both;
}

.hero-brand-logo {
  width: min(480px, 94%);
  margin: 0 0 0.95rem;
  filter: drop-shadow(0 14px 28px rgba(7, 23, 38, 0.18));
}

.eyebrow,
.section-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 700;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  padding: 0.42rem 0.7rem;
  border-radius: 999px;
  color: #d9ecff;
  background: rgba(21, 101, 192, 0.14);
  border: 1px solid rgba(138, 195, 255, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  line-height: 1.06;
}

h1 {
  margin-top: 0.55rem;
  font-size: clamp(2.7rem, 5vw, 4.6rem);
  max-width: 10ch;
}

h2 {
  font-size: clamp(1.5rem, 2vw, 2rem);
}

h3 {
  font-size: 1.18rem;
}

.hero-text {
  max-width: 60ch;
  margin: 1rem 0 0;
  color: rgba(248, 240, 226, 0.86);
  line-height: 1.7;
}

.hero-proof {
  margin: 0.9rem 0 0;
  color: rgba(107, 242, 186, 0.96);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.15rem;
}

.install-hint {
  margin: 0.9rem 0 0;
  font-size: 0.95rem;
  color: rgba(248, 240, 226, 0.8);
}

.card {
  background: var(--card);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.hero-panel {
  padding: 1.45rem;
  align-self: end;
  animation: fade-up 0.7s ease 0.08s both;
  background:
    linear-gradient(135deg, rgba(255, 251, 245, 0.93), rgba(246, 238, 225, 0.82));
}

.steps {
  margin: 1rem 0 0;
  padding-left: 1.25rem;
  line-height: 1.65;
}

.steps li + li {
  margin-top: 0.55rem;
}

.mini-note {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(214, 107, 61, 0.12), rgba(45, 121, 139, 0.12));
  border: 1px solid rgba(22, 34, 51, 0.08);
  color: var(--ink);
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.admin-panel {
  grid-column: 1 / -1;
  padding: 1.35rem;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.seo-grid,
.seo-faq {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.admin-list-card {
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(18, 32, 51, 0.08);
}

.admin-user-list {
  display: grid;
  gap: 0.8rem;
  margin-top: 0.9rem;
}

.admin-user-card {
  padding: 0.9rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(18, 32, 51, 0.08);
}

.admin-user-actions {
  margin-top: 0.85rem;
}

.danger-button {
  background: rgba(150, 47, 56, 0.12);
  color: #7e2330;
  border: 1px solid rgba(150, 47, 56, 0.18);
}

.admin-user-card h4 {
  margin: 0;
  font-size: 1rem;
}

.admin-user-meta {
  display: grid;
  gap: 0.16rem;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.input-card,
.result-card {
  padding: 1.35rem;
  animation: fade-up 0.75s ease both;
}

.result-card {
  animation-delay: 0.1s;
}

.member-feedback-card {
  margin-top: 1.25rem;
}

.member-feedback-note {
  margin: -0.2rem 0 1rem;
}

.member-contact-grid {
  grid-template-columns: 1fr;
}

.member-contact-grid .field.full-span {
  grid-column: 1 / -1;
}

.member-contact-form textarea {
  min-height: 9rem;
}

.section-heading {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1.1rem;
}

.section-heading.compact {
  margin-bottom: 0.8rem;
}

.section-label {
  color: var(--accent-deep);
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.95rem;
}

.mode-switch-box {
  margin-bottom: 1rem;
}

.mode-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.mode-button-active {
  box-shadow: 0 14px 28px rgba(45, 121, 139, 0.18);
}

.analysis-mode-switch {
  margin-top: 0.35rem;
  margin-bottom: 1rem;
}

.analysis-mode-switch button {
  min-width: 0;
}

.mode-panel {
  display: grid;
  gap: 1rem;
}

.mode-panel + .mode-panel {
  margin-top: 1rem;
}

.mode-note {
  margin-top: 0;
}

.compact-fields {
  margin-top: 0.8rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field span {
  font-weight: 700;
}

.field small {
  color: var(--muted);
  line-height: 1.45;
}

.turnstile-field {
  gap: 0.55rem;
}

.turnstile-widget {
  min-height: 68px;
}

.turnstile-widget > div {
  display: inline-flex;
}

.turnstile-status.is-warning {
  color: #6a4a16;
}

.turnstile-status.is-success {
  color: #1f6a52;
}

.turnstile-status.is-error {
  color: #962f38;
}

.password-input {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input input {
  padding-right: 5.4rem;
}

.password-toggle {
  position: absolute;
  right: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  min-width: 4.25rem;
  padding: 0.48rem 0.85rem;
  font-size: 0.88rem;
  line-height: 1;
  border-radius: 999px;
  background: rgba(18, 32, 51, 0.08);
  color: var(--ink);
  border: 1px solid rgba(18, 32, 51, 0.1);
  box-shadow: none;
}

.password-toggle:hover {
  transform: translateY(-50%);
}

input,
select {
  appearance: none;
  width: 100%;
  border: 1px solid rgba(22, 34, 51, 0.14);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  border-radius: 14px;
  padding: 0.92rem 1rem;
  font: inherit;
  font-size: 16px;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

input:focus,
select:focus {
  outline: none;
  border-color: rgba(214, 107, 61, 0.7);
  box-shadow: 0 0 0 4px rgba(214, 107, 61, 0.16);
  transform: translateY(-1px);
}

select {
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 20px) calc(50% - 3px),
    calc(100% - 14px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.6rem;
}

button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.84rem 1.2rem;
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

button:hover {
  transform: translateY(-1px);
}

.primary-button {
  background: linear-gradient(135deg, var(--accent), #2d84e6);
  color: #fff9f1;
  box-shadow: 0 14px 28px rgba(21, 101, 192, 0.26);
}

.secondary-button {
  background: linear-gradient(135deg, var(--sea), #30c98d);
  color: #eef7fa;
  box-shadow: 0 14px 28px rgba(0, 168, 107, 0.24);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  border: 1px solid rgba(22, 34, 51, 0.1);
}

.text-button {
  background: transparent;
  color: var(--accent-deep);
  border: 1px dashed rgba(15, 79, 147, 0.34);
  box-shadow: none;
}

.primary-button:focus-visible,
.secondary-button:focus-visible,
.ghost-button:focus-visible,
.text-button:focus-visible,
.password-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(21, 101, 192, 0.18);
}

.empty-state {
  padding: 1.05rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(22, 34, 51, 0.18);
  background: rgba(255, 255, 255, 0.4);
  color: var(--muted);
  line-height: 1.7;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.overview-card {
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: var(--card-strong);
  border: 1px solid rgba(22, 34, 51, 0.08);
}

.overview-card .label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 700;
}

.overview-card .value {
  margin-top: 0.35rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
}

.overview-card .subtext {
  margin-top: 0.35rem;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.45;
}

.notice-stack {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}

.pattern-candidates {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.pattern-card,
.helper-box {
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(22, 34, 51, 0.08);
}

.ai-upload-box {
  background:
    linear-gradient(135deg, rgba(225, 106, 45, 0.08), rgba(31, 124, 133, 0.1)),
    rgba(255, 255, 255, 0.62);
}

.pattern-card strong,
.helper-box strong {
  display: block;
}

.pattern-card p,
.helper-box p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.market-study-box {
  margin-bottom: 1rem;
}

.market-search-results {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.market-search-card {
  width: 100%;
  border-radius: 18px;
  padding: 0.95rem 1rem;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(18, 32, 51, 0.08);
  box-shadow: none;
  text-align: left;
  color: var(--ink);
}

.market-search-card strong {
  display: block;
  font-size: 1rem;
}

.market-search-card span {
  display: block;
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.market-search-card.is-selected {
  border-color: rgba(31, 124, 133, 0.36);
  background: linear-gradient(135deg, rgba(31, 124, 133, 0.12), rgba(243, 196, 106, 0.12));
}

.market-study-panel {
  margin-bottom: 1rem;
}

.market-context-grid,
.alternate-count-grid {
  display: grid;
  gap: 0.95rem;
  margin-top: 1rem;
}

.market-context-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.alternate-count-grid {
  grid-template-columns: minmax(0, 1fr);
}

.context-study-card,
.alternate-count-card {
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(22, 34, 51, 0.08);
}

.context-study-card h4,
.alternate-count-card h4 {
  margin-bottom: 0.35rem;
}

.context-study-card p,
.alternate-count-card p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.alternate-count-card .chart-wrapper {
  margin-top: 0.8rem;
  padding: 0.75rem;
}

.alternate-count-actions {
  margin-top: 0.85rem;
  flex-wrap: wrap;
}

.alternate-count-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.alternate-count-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.62rem;
  border-radius: 999px;
  background: rgba(45, 121, 139, 0.1);
  border: 1px solid rgba(45, 121, 139, 0.16);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 700;
}

.fundamental-summary {
  margin-top: 1rem;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  background: rgba(31, 124, 133, 0.08);
  border: 1px solid rgba(31, 124, 133, 0.18);
}

.fundamental-summary-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 700;
}

.fundamental-summary p {
  margin: 0.45rem 0 0;
}

.fundamental-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.fundamental-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(22, 34, 51, 0.08);
  font-size: 0.84rem;
  color: var(--ink);
}

.fundamental-reason-block {
  margin-top: 0.85rem;
}

.fundamental-reason-block strong {
  display: block;
  margin-bottom: 0.3rem;
}

.fundamental-reason-list {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
  line-height: 1.5;
}

.fundamental-reason-list li + li {
  margin-top: 0.28rem;
}

.guide-list,
.pattern-rank-list {
  margin: 0.7rem 0 0;
  padding-left: 1.2rem;
  line-height: 1.6;
}

.pattern-rank-list li + li,
.guide-list li + li {
  margin-top: 0.35rem;
}

.pattern-score {
  display: inline-block;
  margin-top: 0.55rem;
  padding: 0.32rem 0.72rem;
  border-radius: 999px;
  background: rgba(45, 121, 139, 0.13);
  font-size: 0.85rem;
  font-weight: 700;
}

.notice {
  padding: 0.95rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  line-height: 1.55;
}

.notice strong {
  display: block;
  margin-bottom: 0.2rem;
}

.notice-danger {
  background: rgba(150, 47, 56, 0.08);
  border-color: rgba(150, 47, 56, 0.16);
}

.notice-warning {
  background: rgba(138, 90, 21, 0.08);
  border-color: rgba(138, 90, 21, 0.16);
}

.notice-info {
  background: rgba(45, 121, 139, 0.08);
  border-color: rgba(45, 121, 139, 0.16);
}

.current-price-card {
  margin-top: 1rem;
}

.current-price-box {
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--sea-soft), var(--accent-soft));
  border: 1px solid rgba(22, 34, 51, 0.08);
}

.current-price-box h3 {
  margin-bottom: 0.35rem;
}

.current-price-box p {
  margin: 0;
  color: var(--ink);
  line-height: 1.6;
}

.forecast-sections {
  display: grid;
  gap: 0.95rem;
  margin-top: 1rem;
}

.forecast-card {
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: var(--card-strong);
  border: 1px solid rgba(22, 34, 51, 0.08);
}

.forecast-card header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  margin-bottom: 0.9rem;
}

.forecast-card header p {
  margin: 0.4rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.status-pill {
  flex-shrink: 0;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  background: rgba(22, 34, 51, 0.07);
  color: var(--ink);
}

.status-pill.projected {
  background: rgba(45, 121, 139, 0.13);
}

.status-pill.manual {
  background: rgba(214, 107, 61, 0.14);
}

.status-pill.context {
  background: rgba(78, 111, 165, 0.16);
}

.status-pill.technical {
  background: rgba(22, 34, 51, 0.1);
}

.status-pill.guidance {
  background: rgba(0, 168, 107, 0.14);
}

.target-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.target-card {
  padding: 0.9rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(22, 34, 51, 0.08);
}

.target-label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 700;
}

.target-value {
  margin-top: 0.35rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
}

.target-note {
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.chart-wrapper,
.summary-box {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(22, 34, 51, 0.08);
}

.chart-heading-row {
  display: flex;
  justify-content: space-between;
  gap: 0.85rem;
  align-items: flex-start;
}

.chart-actions {
  align-items: center;
  justify-content: flex-end;
}

.paste-target {
  margin-top: 0.9rem;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px dashed rgba(31, 124, 133, 0.45);
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.paste-target:hover,
.paste-target:focus {
  outline: none;
  transform: translateY(-1px);
  border-color: rgba(225, 106, 45, 0.55);
  background: rgba(255, 255, 255, 0.8);
}

.ai-upload-box,
.screenshot-assistant {
  margin-bottom: 1rem;
}

.ai-visual-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.95rem;
  align-items: start;
}

.chart-image-panel {
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(22, 34, 51, 0.08);
  overflow: auto;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

#chartOverlayCanvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(247, 240, 226, 0.88));
  box-shadow: inset 0 0 0 1px rgba(22, 34, 51, 0.08);
}

.count-tabs {
  margin-top: 0.85rem;
  margin-bottom: 0.85rem;
}

.count-tab-active {
  background: linear-gradient(135deg, var(--accent), #2d84e6);
  color: #fff9f1;
  box-shadow: 0 14px 28px rgba(21, 101, 192, 0.2);
}

#waveChart,
#aiProjectionChart,
#marketSeriesChart {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(250, 243, 232, 0.9));
}

#summaryText {
  margin: 0;
  white-space: pre-wrap;
  font-family: "Consolas", "Courier New", monospace;
  line-height: 1.6;
  color: var(--ink);
}

.footer {
  margin-top: 1.35rem;
  padding: 1rem 0 0.5rem;
  color: rgba(248, 240, 226, 0.84);
  line-height: 1.7;
}

.legal-footer {
  margin-top: 1.1rem;
  padding: 1rem 1.1rem 1.05rem;
  border: 1px solid rgba(255, 245, 232, 0.14);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(9, 22, 39, 0.78), rgba(14, 30, 49, 0.92));
  box-shadow:
    0 22px 44px rgba(4, 10, 18, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  color: rgba(250, 242, 231, 0.95);
}

.auth-legal-footer {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  margin: 0.85rem auto 0;
  padding: 1rem 1.1rem 1rem;
}

.legal-footer-grid {
  display: grid;
  gap: 0.75rem;
}

.legal-footer-grid p,
.footer-note,
.legal-footer .source-row {
  margin: 0;
  color: rgba(250, 242, 231, 0.95);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}

.legal-footer-grid strong {
  color: #fff6ea;
}

.legal-footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.1rem;
  margin-top: 0.8rem;
  font-size: 0.95rem;
}

.legal-footer-meta a,
.legal-footer-meta span {
  color: #ffd8a8;
}

.footer-note {
  margin-top: 0.8rem;
  color: rgba(248, 240, 226, 0.88);
}

.legal-footer .source-row {
  margin-top: 0.85rem;
}

.legal-footer .source-row a,
.legal-footer a {
  color: #ffd8a8;
}

.legal-footer a:hover,
.legal-footer a:focus-visible {
  color: #fff4e1;
}

.source-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.footer a {
  color: #ffdcb8;
}

.legal-page-shell {
  padding-top: max(1rem, env(safe-area-inset-top));
}

.legal-page-header {
  margin-bottom: 1rem;
  color: #f8f0e2;
}

.legal-page-header h1 {
  max-width: none;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
}

.legal-page-lede {
  max-width: 70ch;
  margin: 0.9rem 0 0;
  color: rgba(248, 240, 226, 0.86);
  line-height: 1.7;
}

.legal-page-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.legal-page-card {
  padding: 1.15rem;
}

.legal-page-card h2 {
  font-size: clamp(1.2rem, 1.8vw, 1.55rem);
}

.legal-page-card p,
.legal-page-card li {
  color: var(--muted);
  line-height: 1.75;
}

.legal-page-card ul {
  margin: 0.75rem 0 0;
  padding-left: 1.2rem;
}

.legal-page-card li + li {
  margin-top: 0.4rem;
}

.legal-page-inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-top: 0.95rem;
}

.legal-page-inline-links a {
  color: #ffdcb8;
}

.confirm-dialog {
  border: 0;
  padding: 0;
  background: transparent;
}

.confirm-dialog::backdrop {
  background: rgba(7, 23, 38, 0.55);
  backdrop-filter: blur(6px);
}

.confirm-card {
  width: min(460px, calc(100vw - 2rem));
  padding: 1.25rem;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background:
    linear-gradient(135deg, rgba(255, 251, 245, 0.97), rgba(248, 240, 227, 0.93));
  box-shadow: var(--shadow);
}

.confirm-card p {
  color: var(--muted);
  line-height: 1.6;
}

.password-card {
  width: min(520px, calc(100vw - 1.5rem));
}

.password-card .button-row {
  margin-top: 0.75rem;
}

.expanded-chart-dialog {
  border: 0;
  padding: 0;
  background: transparent;
}

.expanded-chart-dialog::backdrop {
  background: rgba(7, 23, 38, 0.7);
  backdrop-filter: blur(7px);
}

.expanded-chart-card {
  width: min(1280px, calc(100vw - 1.25rem));
  max-height: calc(100vh - 1.25rem);
  overflow: auto;
  padding: 1.15rem;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background:
    linear-gradient(135deg, rgba(255, 251, 245, 0.98), rgba(248, 240, 227, 0.95));
  box-shadow: var(--shadow);
}

.expanded-chart-shell {
  margin-top: 0.95rem;
  padding: 0.9rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(22, 34, 51, 0.08);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y pinch-zoom;
}

.expanded-chart-legend {
  margin-top: 0.95rem;
}

.expanded-chart-legend-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.expanded-chart-legend-section {
  padding: 0.95rem 1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(22, 34, 51, 0.08);
}

.expanded-chart-legend-section h4 {
  margin-bottom: 0.7rem;
}

.expanded-chart-legend-intro {
  margin: 0 0 0.8rem;
  color: var(--muted);
}

.expanded-chart-legend-list {
  display: grid;
  gap: 0.72rem;
}

.expanded-chart-legend-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 0.7rem;
  align-items: start;
}

.expanded-chart-legend-step {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.18rem;
  border-radius: 999px;
  background: rgba(45, 121, 139, 0.1);
  border: 1px solid rgba(45, 121, 139, 0.24);
  color: #2d798b;
  font-size: 0.72rem;
  font-weight: 800;
}

.expanded-chart-legend-item strong {
  display: block;
  margin-bottom: 0.18rem;
}

.expanded-chart-legend-heading {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.18rem;
}

.expanded-chart-legend-item div > div {
  color: var(--ink);
  font-weight: 700;
}

.expanded-chart-legend-item p {
  margin: 0.22rem 0 0;
  color: var(--muted);
}

.expanded-chart-legend-swatch {
  width: 18px;
  height: 18px;
  margin-top: 0.18rem;
  border-radius: 999px;
  background: var(--legend-fill, rgba(45, 121, 139, 0.14));
  border: 2px solid var(--legend-stroke, #2d798b);
}

.expanded-chart-tooltip-trigger {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(45, 121, 139, 0.28);
  background: rgba(45, 121, 139, 0.08);
  color: #2d798b;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
}

.expanded-chart-tooltip {
  position: fixed;
  z-index: 60;
  width: min(320px, calc(100vw - 24px));
  padding: 0.8rem 0.9rem;
  border-radius: 16px;
  border: 1px solid rgba(22, 34, 51, 0.1);
  background: rgba(255, 251, 245, 0.98);
  box-shadow: 0 22px 56px rgba(10, 23, 39, 0.18);
}

.expanded-chart-tooltip strong {
  display: block;
  margin-bottom: 0.3rem;
}

.expanded-chart-tooltip p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

#expandedWaveChart {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(250, 243, 232, 0.92));
}

.noscript {
  margin: 1rem auto 2rem;
  width: var(--content-width);
  padding: 1rem 1.2rem;
  border-radius: var(--radius-sm);
  background: rgba(150, 47, 56, 0.12);
  color: #fff3f4;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1050px) {
  .hero-copy {
    padding-right: 0;
  }

  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .market-context-grid {
    grid-template-columns: 1fr;
  }

  .alternate-count-grid {
    grid-template-columns: 1fr;
  }

  .ai-visual-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  body {
    background:
      linear-gradient(180deg, #081421 0%, #10243a 18%, #e9decd 58%, #eadfce 100%);
  }

  .page-shell {
    padding:
      max(0.75rem, env(safe-area-inset-top))
      0
      max(1.35rem, env(safe-area-inset-bottom));
  }

  .app-topbar {
    position: relative;
    top: auto;
    z-index: 1;
    margin: 0 0.65rem 0.75rem;
    padding: 0.85rem 0.9rem;
    border-radius: 24px;
    background: rgba(247, 241, 231, 0.9);
    backdrop-filter: blur(16px);
    box-shadow: 0 16px 34px rgba(7, 23, 38, 0.12);
  }

  .app-topbar .section-label {
    font-size: 0.66rem;
    letter-spacing: 0.18em;
  }

  .app-topbar h2 {
    font-size: 1.3rem;
  }

  .mobile-workspace-nav {
    position: sticky;
    top: max(0.5rem, env(safe-area-inset-top));
    z-index: 16;
    display: none;
    gap: 0.6rem;
    margin: 0 0.65rem 0.9rem;
    padding: 0.42rem;
    border-radius: 999px;
    background: rgba(255, 251, 245, 0.88);
    border: 1px solid rgba(18, 32, 51, 0.08);
    box-shadow: 0 12px 24px rgba(7, 23, 38, 0.1);
    backdrop-filter: blur(14px);
  }

  .mobile-workspace-nav.is-visible {
    display: flex;
  }

  .mobile-account-toggle {
    display: inline-flex;
    align-self: flex-start;
    width: auto;
    margin-top: 0.55rem;
  }

  .mobile-nav-button {
    flex: 1 1 0;
    padding: 0.72rem 0.8rem;
    font-size: 0.92rem;
    box-shadow: none;
    width: auto;
  }

  .mobile-nav-button.is-active {
    box-shadow: 0 10px 18px rgba(0, 168, 107, 0.16);
  }

  .hero {
    gap: 0.75rem;
    padding: 0.15rem 0.65rem 0.8rem;
  }

  .hero-panel {
    display: none;
  }

  .hero-copy {
    padding: 0.2rem 0.1rem;
  }

  .hero-brand-logo {
    width: min(240px, 68vw);
    margin-bottom: 0.6rem;
  }

  .hero-copy h1 {
    max-width: 12ch;
    font-size: clamp(1.75rem, 8vw, 2.45rem);
  }

  .hero-text {
    margin-top: 0.55rem;
    font-size: 0.98rem;
    line-height: 1.55;
  }

  .hero-proof,
  .install-hint {
    margin-top: 0.55rem;
    font-size: 0.9rem;
  }

  .content-grid {
    gap: 0.95rem;
  }

  .page-shell.mobile-has-results .result-card {
    order: 1;
  }

  .page-shell.mobile-has-results .input-card {
    order: 2;
  }

  .page-shell.mobile-has-results .admin-panel {
    order: 3;
  }

  .page-shell.mobile-has-results .hero {
    display: none;
  }

  .input-card,
  .result-card,
  .admin-panel {
    margin: 0 0.65rem;
    padding: 1rem;
    border-radius: 24px;
  }

  .primary-chart-shell {
    margin-left: -1rem;
    margin-right: -1rem;
    margin-top: 0.2rem;
    padding: 0.85rem 0.85rem 0.95rem;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    background:
      linear-gradient(180deg, rgba(251, 248, 243, 0.96), rgba(244, 236, 223, 0.88));
  }

  .primary-chart-shell .chart-heading-row {
    gap: 0.65rem;
  }

  .primary-chart-shell h3 {
    font-size: 1.04rem;
  }

  .chart-actions {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    margin-top: 0.15rem;
  }

  .chart-actions button {
    flex: 0 0 auto;
    width: auto;
    min-width: 144px;
  }

  .app-topbar-actions {
    display: flex;
    margin-top: 0.75rem;
    flex-wrap: wrap;
    overflow: visible;
    align-items: stretch;
    padding-bottom: 0;
    gap: 0.65rem;
  }

  .app-topbar.mobile-actions-open .app-topbar-actions {
    display: flex;
  }

  .app-topbar-actions button,
  .app-topbar-actions .member-badge {
    flex: 1 1 auto;
    width: 100%;
    white-space: normal;
  }

  .overview-grid,
  .forecast-sections,
  .pattern-candidates,
  .notice-stack {
    gap: 0.75rem;
  }
}

@media (max-width: 720px) {
  .page-shell {
    padding: 0.8rem 0 1.4rem;
  }

  .auth-shell {
    padding:
      max(0.65rem, env(safe-area-inset-top))
      0.5rem
      max(0.85rem, env(safe-area-inset-bottom));
  }

  .auth-card,
  .hero-panel,
  .input-card,
  .result-card,
  .admin-panel {
    padding: 0.95rem;
  }

  .auth-copy {
    padding-bottom: 0.35rem;
  }

  .mobile-warning-banner {
    margin-top: 0.9rem;
    padding: 1.05rem;
    border-radius: 22px;
  }

  .mobile-warning-banner p {
    font-size: 0.98rem;
  }

  .auth-copy h1,
  h1 {
    max-width: none;
    font-size: clamp(2rem, 12vw, 2.8rem);
  }

  .overview-grid,
  .target-grid {
    grid-template-columns: 1fr;
  }

  .button-row,
  .hero-actions {
    flex-direction: column;
  }

  .mobile-workspace-nav {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    top: max(0.45rem, env(safe-area-inset-top));
  }

  .mobile-account-toggle {
    width: auto;
  }

  .mode-toggle {
    grid-template-columns: 1fr;
  }

  .forecast-card header,
  .source-row {
    flex-direction: column;
    align-items: stretch;
  }

  .app-topbar-actions {
    flex-direction: column;
  }

  .count-tabs {
    display: grid;
    gap: 0.65rem;
  }

  .chart-image-panel,
  .chart-wrapper,
  .summary-box,
  .admin-list-card,
  .expanded-chart-card,
  .expanded-chart-shell {
    padding: 0.85rem;
  }

  .chart-wrapper,
  .expanded-chart-shell {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .chart-actions {
    flex-direction: row;
  }

  .paste-target {
    padding: 0.85rem;
    font-size: 0.95rem;
  }

  .chart-heading-row {
    flex-direction: column;
    align-items: stretch;
  }

  .password-input {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
  }

  .password-input input {
    padding-right: 1rem;
  }

  .password-toggle {
    position: static;
    top: auto;
    right: auto;
    transform: none;
    width: 100%;
    min-width: 0;
  }

  .password-toggle:hover {
    transform: none;
  }

  #waveChart,
  #aiProjectionChart {
    min-width: 920px;
  }

  #marketSeriesChart {
    min-width: 980px;
  }

  #expandedWaveChart {
    min-width: 1480px;
  }

  .expanded-chart-dialog[open] {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
  }

  .expanded-chart-card {
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100vw;
    max-width: none;
    min-height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    overflow: hidden;
    padding:
      max(0.75rem, env(safe-area-inset-top))
      0.6rem
      max(0.9rem, env(safe-area-inset-bottom));
  }

  .expanded-chart-card .chart-heading-row {
    position: sticky;
    top: 0;
    z-index: 2;
    padding-bottom: 0.65rem;
    background: linear-gradient(180deg, rgba(255, 251, 245, 0.98), rgba(255, 251, 245, 0.9));
  }

  .expanded-chart-shell {
    flex: 1;
    min-height: 0;
    margin-left: -0.1rem;
    margin-right: -0.1rem;
    padding: 0.45rem;
    border-radius: 18px;
    overflow: auto;
  }

  button {
    width: 100%;
  }
}

@media (min-width: 961px) {
  .auth-grid {
    min-height: calc(100vh - 2rem);
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
    column-gap: 1.25rem;
    row-gap: 0.35rem;
    align-items: start;
    align-content: start;
    grid-auto-rows: max-content;
  }

  .auth-copy,
  .auth-card,
  .auth-seo-panel {
    order: 0;
  }

  .auth-copy {
    grid-column: 1;
    grid-row: 1;
    padding: 0.05rem 0.2rem 0.15rem;
  }

  .auth-card {
    grid-column: 2;
    grid-row: 1 / span 2;
    padding: 1.2rem;
    border-radius: 30px;
  }

  .auth-seo-panel {
    grid-column: 1;
    grid-row: 2;
    margin-top: 0;
    padding-right: 1rem;
    padding-top: 0;
  }

  .legal-page-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .consent-check {
    padding: 0.95rem;
    grid-template-columns: 1.05rem minmax(0, 1fr);
  }

  .app-topbar {
    flex-direction: row;
    align-items: center;
  }

  .member-contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1051px) {
  .hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  }

  .content-grid {
    grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  }
}
