:root {
  --primary: #58c7b8;
  --primary-active: #3aa99b;
  --accent: #d6b26d;
  --accent-soft: #f2e4c7;
  --ink: #f4f8f6;
  --body: #cbd8d4;
  --muted: #90a29d;
  --hairline: rgba(143, 178, 169, 0.22);
  --border-strong: rgba(214, 178, 109, 0.4);
  --canvas: #080b0c;
  --surface-soft: #101617;
  --surface-strong: #172122;
  --surface-dark: #0b1011;
  --surface-dark-elevated: #121b1c;
  --signature-coral: #e1a66c;
  --signature-forest: #58c7b8;
  --signature-cream: #111817;
  --signature-peach: #d6b26d;
  --signature-mint: #74e0d1;
  --signature-yellow: #f0d487;
  --link: #74e0d1;
  --link-active: #f2e4c7;
  --info-border: #58c7b8;
  --danger: #ff8f87;
  --success: #85d79a;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --font-display: "Inter Display", "Aptos Display", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--body);
  background: var(--canvas);
}

a {
  color: var(--link);
  text-decoration: none;
}

a:active {
  color: var(--link-active);
}

button,
input,
select {
  font: inherit;
}

#app {
  width: min(1280px, calc(100% - 96px));
  margin: 0 auto;
  padding: 0 0 64px;
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 64px;
  gap: 24px;
  border-bottom: 1px solid var(--hairline);
  background: rgba(8, 11, 12, 0.94);
  backdrop-filter: blur(18px);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 0 1px rgba(214, 178, 109, 0.22), 0 18px 36px rgba(10, 20, 18, 0.4);
  object-fit: cover;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-links a {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-links a.nav-tab {
  padding: 7px 10px;
  border: 1px solid rgba(88, 199, 184, 0.42);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: rgba(88, 199, 184, 0.12);
}

.nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.nav-state {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
  white-space: nowrap;
}

.nav-state.is-active {
  border-color: rgba(57, 191, 69, 0.55);
  color: var(--success);
}

.language-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
}

.language-switch button {
  min-height: 30px;
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}

.language-switch button.active {
  background: var(--primary);
  color: #061010;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 24px;
  padding: 64px 0 32px;
}

.hero-card,
.panel {
  min-width: 0;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
}

.hero-card {
  padding: 48px;
}

section[id] {
  scroll-margin-top: 84px;
}

.hero-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
}

.hero h1 {
  max-width: 860px;
  margin: 0 0 16px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
}

.hero p {
  margin: 0;
  max-width: 68ch;
  color: var(--body);
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: rgba(88, 199, 184, 0.08);
  color: var(--body);
  font-size: 14px;
  line-height: 1.3;
  overflow-wrap: anywhere;
  white-space: normal;
}

.session-card {
  position: relative;
  display: flex;
  min-height: 380px;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border-color: rgba(214, 178, 109, 0.28);
  background: #0b1011;
  color: var(--ink);
  padding: 32px;
}

.session-card::after {
  content: none;
}

.hero-logo {
  position: relative;
  z-index: 1;
  width: min(100%, 220px);
  margin: 0 auto 22px;
  border-radius: 18px;
  box-shadow: 0 22px 70px rgba(5, 16, 15, 0.58);
  object-fit: cover;
}

.session-card h2 {
  position: relative;
  z-index: 1;
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
}

.session-card p,
.session-card .subtle {
  position: relative;
  z-index: 1;
  max-width: 34ch;
  margin: 0 0 18px;
  color: var(--body);
}

.session-card .actions {
  position: relative;
  z-index: 1;
}

.layout {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
}

.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

.panel {
  min-width: 0;
  padding: 32px;
}

.panel-onboarding {
  border-color: rgba(214, 178, 109, 0.24);
  background: var(--signature-cream);
}

.panel-benefits {
  border-color: rgba(88, 199, 184, 0.22);
  background: #0b1011;
  color: var(--ink);
}

.panel-login,
.panel-sessions {
  background: var(--surface-soft);
}

.panel-pricing {
  background: linear-gradient(180deg, #141b1a 0%, var(--surface-soft) 100%);
}

.panel-storage {
  border-color: rgba(214, 178, 109, 0.22);
  background: var(--surface-dark);
  color: var(--ink);
}

.panel-security {
  background: var(--surface-soft);
}

.panel h2 {
  margin: 0 0 10px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0.12px;
}

.panel h3 {
  margin: 24px 0 10px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
}

.section-kicker {
  margin: 0 0 8px;
  color: var(--signature-coral);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-transform: uppercase;
}

.panel p.lead {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.panel-storage h2,
.panel-storage h3,
.panel-benefits h2,
.panel-benefits h3 {
  color: var(--ink);
}

.panel-storage p.lead,
.panel-storage .subtle,
.panel-storage .footer-note,
.panel-benefits p.lead {
  color: var(--body);
}

.panel-benefits .section-kicker {
  color: var(--signature-peach);
}

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.benefit-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(143, 178, 169, 0.18);
  border-radius: var(--radius-md);
  background: var(--surface-dark-elevated);
}

.benefit-card h3 {
  margin: 0 0 10px;
  font-size: 17px;
}

.benefit-card p {
  margin: 0;
  color: var(--body);
  font-size: 14px;
  line-height: 1.45;
}

.security-list {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
}

.cabinet-shell {
  min-width: 0;
  padding: 20px 0 4px;
  border-top: 1px solid var(--hairline);
}

.cabinet-shell h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.3;
}

.cabinet-shell p {
  max-width: 78ch;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.setup-list {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
}

.setup-step {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}

.setup-step.done .setup-dot {
  color: var(--success);
}

.setup-dot {
  color: var(--muted);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.pricing-plan {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.035);
}

.pricing-plan h3 {
  margin: 4px 0 12px;
  font-size: 20px;
}

.pricing-plan-kicker {
  margin: 0;
  color: var(--signature-coral);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.pricing-price {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.pricing-price span {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.2;
}

.pricing-price small {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.pricing-features {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pricing-features li {
  position: relative;
  min-width: 0;
  padding-left: 18px;
  color: var(--body);
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.pricing-features li::before {
  content: "";
  position: absolute;
  top: 0.55em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.pricing-details {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 24px;
  margin-top: 28px;
}

.pricing-addons {
  display: grid;
  gap: 10px;
}

.pricing-addon {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 16px;
  padding: 14px 0;
  border-top: 1px solid var(--hairline);
}

.pricing-addon:first-child {
  border-top: 0;
}

.pricing-addon span,
.pricing-addon strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
}

.pricing-addon strong {
  font-weight: 600;
  white-space: nowrap;
}

.pricing-addon small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.pricing-promos {
  background: rgba(255, 255, 255, 0.03);
}

.auth-section {
  padding: 18px 0;
  border-top: 1px solid var(--hairline);
}

.auth-section:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.auth-section h3:first-child {
  margin-top: 0;
}

.compact-form {
  margin-top: 16px;
}

form + form {
  margin-top: 16px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field,
.inline-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.inline-field {
  margin-bottom: 0;
}

label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}

input,
select {
  width: 100%;
  height: 44px;
  padding: 12px 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
}

input:focus,
select:focus {
  border-color: var(--info-border);
  outline: 2px solid rgba(88, 199, 184, 0.22);
  outline-offset: 0;
}

select {
  text-overflow: ellipsis;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-lg);
  padding: 12px 18px;
  color: var(--ink);
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
  text-align: center;
}

.button-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  padding: 12px 18px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
}

button:active {
  transform: translateY(1px);
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--info-border);
  outline-offset: 2px;
}

button.primary {
  background: var(--primary);
  color: #061010;
}

.button-link.primary {
  background: var(--primary);
  color: #061010;
}

button.primary:active {
  background: var(--primary-active);
}

button.secondary {
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}

.button-link.secondary {
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}

button.ghost {
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--muted);
}

.button-link.ghost {
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--muted);
}

button.warn {
  border: 1px solid rgba(255, 139, 139, 0.28);
  background: rgba(255, 139, 139, 0.08);
  color: var(--danger);
}

button.linkish {
  border: 1px solid rgba(142, 230, 178, 0.24);
  background: rgba(142, 230, 178, 0.08);
  color: var(--success);
}

.session-card button.secondary,
.session-card button.ghost,
.session-card .button-link.secondary,
.session-card .button-link.ghost {
  border-color: rgba(214, 178, 109, 0.24);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}

.flash {
  margin-bottom: 24px;
  padding: 14px 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  font-size: 14px;
  line-height: 1.4;
}

.flash.info {
  border-color: rgba(88, 199, 184, 0.55);
  color: var(--link-active);
}

.flash.error {
  border-color: rgba(255, 139, 139, 0.32);
  color: var(--danger);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.stat {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.stat span {
  display: block;
}

.stat .label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}

.stat .value {
  margin-top: 10px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.panel-storage .stat,
.panel-storage .empty {
  border-color: rgba(214, 178, 109, 0.18);
  background: var(--surface-dark-elevated);
}

.panel-storage .stat .label,
.panel-storage label {
  color: var(--muted);
}

.panel-storage .stat .value {
  color: var(--ink);
}

.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.item {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.035);
}

.item > div:first-child {
  min-width: 0;
}

.item-title {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.item-meta {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.item-meta.error-text {
  color: var(--danger);
}

.code-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.item-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.empty {
  padding: 16px;
  border: 1px dashed var(--hairline);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.code-box {
  margin-top: 14px;
  padding: 16px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.subtle {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.footer-note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

code {
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95em;
}

@media (max-width: 1040px) {
  #app {
    width: min(1280px, calc(100% - 48px));
  }

  .top-nav {
    grid-template-columns: 1fr auto;
  }

  .nav-links {
    grid-column: 1 / -1;
    order: 3;
    padding-bottom: 12px;
  }

  .hero,
  .grid-2,
  .benefit-grid,
  .pricing-grid,
  .pricing-details {
    grid-template-columns: 1fr;
  }

  .span-4,
  .span-5,
  .span-6,
  .span-7,
  .span-8,
  .span-12 {
    grid-column: span 12;
  }
}

@media (max-width: 720px) {
  #app {
    width: calc(100% - 24px);
    max-width: 366px;
    margin: 0 auto;
    padding-bottom: 40px;
    overflow-x: hidden;
  }

  .top-nav {
    position: static;
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 12px;
    padding: 12px 0;
  }

  .brand-mark {
    font-size: 14px;
  }

  .nav-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .nav-links {
    display: flex;
    width: 100%;
    flex-wrap: wrap;
    gap: 8px 14px;
    overflow-x: visible;
    padding: 0;
  }

  .nav-links a {
    font-size: 13px;
  }

  .hero {
    gap: 18px;
    padding: 56px 0 32px;
  }

  .hero,
  .layout,
  .top-nav {
    max-width: 100%;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero p {
    max-width: 36ch;
  }

  .hero-card,
  .panel {
    padding: 24px;
  }

  section[id] {
    scroll-margin-top: 16px;
  }

  .hero-intro {
    padding: 0;
  }

  .hero-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .session-card::after {
    display: none;
  }

  .session-card {
    min-height: 220px;
  }

  .session-card p,
  .session-card .subtle {
    max-width: 22ch;
  }

  .layout {
    gap: 18px;
  }

  .pill {
    display: block;
    width: fit-content;
  }

  .item {
    align-items: flex-start;
    flex-direction: column;
  }

  .pricing-addon {
    grid-template-columns: 1fr;
  }

  .item-actions {
    width: 100%;
    justify-content: flex-start;
  }

  button {
    width: 100%;
  }

  .button-link {
    width: 100%;
  }

  .language-switch button {
    width: auto;
  }
}
