/* Color tokens mirror the TessCloud App "Classic" semantic design system
   (light-mode values from SemanticColorTokens.swift): system-blue accent,
   neutral light surfaces, near-white cards, soft outlines. */
:root {
  color-scheme: light;
  --ink: #202124;            /* text.primary */
  --ink-soft: #3f4650;       /* text.secondary */
  --muted: #5f6670;          /* text.tertiary */
  --line: #d8dce2;           /* outline.subtle */
  --line-strong: #7b818b;    /* outline.default */
  --surface: #ffffff;        /* surface.elevated (cards) */
  --surface-soft: #f9f9fb;   /* surface.primary */
  --surface-page: #f3f3f4;   /* surface.background */
  --surface-dark: #1a1a1a;   /* dark sections */
  --accent: #0066d6;         /* classic accent */
  --accent-dark: #0053ad;    /* accent hover/fill */
  --accent-secondary: #006d77; /* secondary teal */
  --positive: #177447;
  --warning: #8a4b00;
  --error: #b3261e;
  --focus: #003d7d;
  --max-width: 1180px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  font-synthesis: none;
  font-kerning: normal;
  font-feature-settings: "kern" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  letter-spacing: 0;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

/* Anchored sections must clear the sticky header when scrolled to. */
section[id],
h2[id] {
  scroll-margin-top: 84px;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  /* App surface.background: cards and sections sit on a light page base. */
  background: var(--surface-page);
  font-size: 16px;
  line-height: 1.75;
  overflow-wrap: break-word;
}

body.menu-open {
  overflow: hidden;
}

/* Scrim under the sticky header: closes the mobile menu on outside tap
   and dims background content while it is inert. */
.nav-backdrop {
  position: fixed;
  z-index: 35;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(26, 26, 26, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

body.menu-open .nav-backdrop {
  opacity: 1;
  pointer-events: auto;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

button,
input {
  font: inherit;
}

/* Replace iOS's grey tap flash with the intentional :active states. */
a,
button,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

button,
.button {
  min-height: 44px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

::selection {
  color: #ffffff;
  background: var(--accent);
}

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

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 9px 12px;
  color: #ffffff;
  background: var(--focus);
  border-radius: 4px;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

/* The header is rendered into [data-site-header]; the wrapper must be the
   sticky element, otherwise the sticky header has no room to move inside a
   parent whose height equals its own. */
[data-site-header] {
  position: sticky;
  z-index: 40;
  top: 0;
}

.site-header {
  height: 72px;
  color: var(--ink);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  width: min(calc(100% - 48px), var(--max-width));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #ffffff;
  background: var(--ink);
  border-radius: 4px;
  font-weight: 800;
}

.brand-name {
  font-size: 19px;
  font-weight: 750;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.site-nav a {
  padding: 7px 0;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.nav-toggle:hover {
  background: var(--surface-soft);
  border-color: #9aa1a5;
}

.container {
  width: min(calc(100% - 48px), var(--max-width));
  margin: 0 auto;
}

.narrow {
  max-width: 780px;
}

.hero {
  position: relative;
  overflow: hidden;
  color: #f7f8fa;
  background: #111317;
  border-bottom: 1px solid #2b3038;
}

.hero-inner {
  width: min(calc(100% - 48px), var(--max-width));
  min-height: min(610px, calc(100svh - 110px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.78fr);
  gap: 72px;
  align-items: center;
  padding: 56px 0 0;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  padding: 0;
  color: #86b9f6;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 13px;
  font-weight: 750;
}

.eyebrow::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4dd58a;
  content: "";
}

.hero h1 {
  max-width: 680px;
  margin: 0;
  font-size: 72px;
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: 0;
  text-wrap: balance;
}

.hero .lead {
  max-width: 620px;
  margin: 26px 0 0;
  color: #c5cad2;
  font-size: 20px;
  line-height: 1.7;
}

.hero-capabilities {
  margin: 20px 0 0;
  color: #8f98a5;
  font-size: 14px;
  font-weight: 650;
}

.hero-capabilities span {
  padding: 0 8px;
  color: #4dd58a;
}

.hero-visual-card {
  position: relative;
  align-self: end;
  height: 540px;
  margin: 0;
  overflow: hidden;
  background: #050607;
  border: 1px solid #343a43;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.hero-visual-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border: 0;
  border-radius: 0;
  background: #000000;
}

.hero-visual-card figcaption {
  position: absolute;
  right: 16px;
  bottom: 14px;
  margin: 0;
  padding: 6px 9px;
  color: #dfe3e8;
  background: rgba(17, 19, 23, 0.88);
  border: 1px solid #3b424d;
  border-radius: 4px;
  font-size: 13px;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  background: #4dd58a;
  border-radius: 50%;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.button-primary {
  color: #ffffff;
  background: var(--accent);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.button-primary:hover {
  background: var(--accent-dark);
}

.button-secondary {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line-strong);
}

.button-secondary:hover {
  background: var(--surface-soft);
}

.hero .button-secondary {
  color: #ffffff;
  background: transparent;
  border-color: #59616d;
}

.hero .button-secondary:hover {
  background: #20242a;
  border-color: #7c8694;
}

.section {
  padding: 96px 0;
}

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

.section-dark {
  color: #ffffff;
  background: var(--surface-dark);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 44px;
}

.section-heading h2 {
  margin: 0;
  font-size: 42px;
  line-height: 1.2;
  letter-spacing: 0;
  text-wrap: balance;
}

.section-heading p {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.section-kicker {
  margin: 0 0 10px !important;
  color: var(--accent) !important;
  font-size: 13px !important;
  font-weight: 750;
}

.section-dark .section-heading p {
  color: #c8ccd2;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  background: transparent;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.feature {
  min-height: 220px;
  padding: 30px 32px 34px;
  background: transparent;
  border-left: 1px solid var(--line);
  border-radius: 0;
}

.feature:first-child { border-left: 0; }

.feature-number {
  display: block;
  margin-bottom: 34px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
}

.feature h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.4;
  letter-spacing: 0;
}

.feature p {
  margin: 14px 0 0;
  color: var(--muted);
  text-wrap: pretty;
}

.product-gallery {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.product-shot {
  margin: 0;
}

.product-shot img {
  width: 100%;
  border: 1px solid #3a3f47;
  border-radius: 8px;
  background: #000000;
}

.product-shot figcaption {
  margin-top: 12px;
  color: #c8ccd2;
  font-size: 14px;
}

.trust-band {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: start;
}

.start-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: steps;
}

.start-steps li {
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  counter-increment: steps;
}

.start-steps li::before {
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
  display: inline-grid;
  width: 36px;
  height: 36px;
  margin-bottom: 18px;
  place-items: center;
  color: #ffffff;
  background: var(--accent);
  border-radius: 4px;
  content: counter(steps);
  font-weight: 800;
}

.start-steps h3 {
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 1.4;
}

.start-steps p {
  margin: 0;
  color: var(--muted);
  text-wrap: pretty;
}

.start-step-download {
  margin-top: 14px !important;
}

.trust-band h2 {
  margin: 0;
  font-size: 38px;
  line-height: 1.25;
  text-wrap: balance;
}

.plain-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.plain-list li {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.plain-list strong {
  display: block;
  margin-bottom: 6px;
  line-height: 1.4;
}

.plain-list span {
  line-height: 1.7;
}

.plain-list span {
  color: var(--muted);
}

.page-header {
  padding: 72px 0 46px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
}

.page-header h1 {
  max-width: 780px;
  margin: 0;
  font-size: 48px;
  line-height: 1.18;
  text-wrap: balance;
}

.page-header p {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.page-content {
  padding: 58px 0 88px;
}

.legal-alert {
  margin-bottom: 36px;
  padding: 18px 20px;
  color: var(--warning);
  background: #fbf3e4;
  border-left: 4px solid var(--warning);
}

.legal-alert strong {
  display: block;
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin: 0 0 38px;
  padding-bottom: 22px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.prose h2 {
  margin: 48px 0 16px;
  font-size: 25px;
  line-height: 1.4;
  letter-spacing: 0;
}

.prose h3 {
  margin: 30px 0 12px;
  font-size: 19px;
  line-height: 1.45;
}

.prose p,
.prose ul,
.prose ol {
  margin: 0 0 20px;
  text-wrap: pretty;
}

.prose li + li {
  margin-top: 8px;
}

.prose code {
  padding: 2px 5px;
  background: var(--surface-soft);
  border-radius: 3px;
}

.support-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 72px;
}

.support-aside {
  padding: 26px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.support-aside h2 {
  margin-top: 0;
  font-size: 22px;
}

.support-aside dl {
  margin: 0;
}

.support-aside dt {
  margin-top: 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.support-aside dd {
  margin: 4px 0 0;
}

.faq-list {
  border-top: 1px solid var(--line);
}

.faq-item {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.faq-item h3 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.4;
}

.faq-item p {
  margin: 0;
  color: var(--muted);
  text-wrap: pretty;
}

.account-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.8fr);
  gap: 48px;
  align-items: start;
}

.tool-panel {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.tool-panel h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.tool-panel > p {
  margin: 0 0 24px;
  color: var(--muted);
}

.account-status {
  margin-bottom: 34px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.status-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.status-indicator {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin: 8px 9px 0 0;
  background: var(--muted);
  border-radius: 50%;
}

.account-status[data-state="signed-in"] .status-indicator {
  background: var(--positive);
}

.account-status[data-state="unavailable"] .status-indicator {
  background: var(--warning);
}

.status-copy {
  flex: 1;
}

.status-copy strong,
.status-copy span {
  display: block;
}

.status-copy span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 14px;
}

.status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.text-button {
  min-height: 44px;
  padding: 7px 12px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.text-button:hover {
  background: var(--surface-soft);
}

.form-field {
  margin-bottom: 18px;
}

.form-field label {
  display: block;
  margin-bottom: 7px;
  font-size: 14px;
  font-weight: 700;
}

.form-field input {
  width: 100%;
  height: 46px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  transition: border-color 140ms ease;
}

.form-field input:hover {
  border-color: var(--ink-soft);
}

.form-field input:focus {
  border-color: var(--focus);
}

.form-hint {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 72px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 4px;
  min-height: 44px;
  padding: 4px 10px;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transform: translateY(-50%);
}

.password-toggle:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

.password-toggle:focus-visible {
  outline-offset: 0;
}

.form-feedback {
  min-height: 27px;
  margin: 16px 0 0;
  font-size: 14px;
}

.form-feedback.is-error {
  color: var(--error);
}

.form-feedback.is-success {
  color: var(--positive);
}

.tool-panel button[disabled] {
  cursor: wait;
  opacity: 0.65;
}

.account-notes {
  padding-top: 4px;
}

.account-notes h2 {
  margin-top: 0;
  font-size: 24px;
}

.account-notes ul {
  margin: 20px 0 30px;
  padding-left: 22px;
}

.account-notes li + li {
  margin-top: 10px;
}

.technical-value {
  display: inline-block;
  max-width: 100%;
  padding: 3px 7px;
  overflow-wrap: anywhere;
  color: var(--ink-soft);
  background: var(--surface-soft);
  border-radius: 3px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.deletion-steps {
  counter-reset: steps;
  margin: 36px 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.deletion-steps li {
  position: relative;
  min-height: 82px;
  padding: 20px 0 20px 58px;
  border-bottom: 1px solid var(--line);
  counter-increment: steps;
}

.deletion-steps li::before {
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
  position: absolute;
  top: 20px;
  left: 0;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--ink);
  border-radius: 4px;
  content: counter(steps);
  font-weight: 800;
}

.site-footer {
  color: #d9dcde;
  background: var(--surface-dark);
  border-top: 4px solid var(--accent);
}

.footer-inner {
  width: min(calc(100% - 48px), var(--max-width));
  min-height: 260px;
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1.15fr;
  gap: 48px;
}

.footer-brand strong {
  color: #ffffff;
  font-size: 22px;
}

.footer-brand p {
  margin: 8px 0 0;
  color: #9da3a7;
}

.footer-links {
  display: grid;
  align-content: start;
  gap: 12px;
}

.footer-links a {
  color: #d9dcde;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-legal {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  color: #9da3a7;
  font-size: 13px;
}

.icp-link {
  color: #d9dcde;
}

.icp-link:hover {
  color: #ffffff;
}

.error-page {
  min-height: calc(100svh - 72px);
  padding: 80px 0;
  display: grid;
  place-items: center;
  text-align: center;
}

.error-code {
  display: block;
  color: var(--accent);
  font-size: 18px;
  font-weight: 800;
}

.error-page h1 {
  margin: 8px 0 12px;
  font-size: 48px;
}

.error-page p {
  max-width: 540px;
  margin: 0 auto 28px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.62fr);
    gap: 40px;
  }

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

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

  .feature:last-child {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .trust-band,
  .support-grid,
  .account-layout {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .footer-legal {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .site-header {
    height: 64px;
  }

  .header-inner,
  .container,
  .footer-inner {
    width: min(calc(100% - 32px), var(--max-width));
  }

  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .site-nav {
    position: absolute;
    top: 63px;
    right: 0;
    left: 0;
    display: none;
    padding: 14px 16px 18px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    min-height: 46px;
    padding: 11px 8px;
    border-bottom: 1px solid var(--line);
  }

  .hero-inner {
    min-height: 0;
    width: min(calc(100% - 32px), var(--max-width));
    padding: 40px 0 0;
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .hero-visual-card {
    width: 100%;
    height: 250px;
    margin: 0;
  }

  .hero-visual-card img {
    max-height: none;
    object-position: 50% 14%;
  }

  .hero-copy {
    align-items: flex-start;
    padding: 0;
  }

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

  .hero .lead {
    max-width: 440px;
    font-size: 17px;
    line-height: 1.65;
  }

  .hero-capabilities {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 0;
  }

  .hero-actions {
    width: 100%;
    margin-top: 24px;
  }

  .hero-actions .button {
    flex: 1 1 140px;
  }

  .section {
    padding: 62px 0;
  }

  .section-heading {
    margin-bottom: 32px;
  }

  .section-heading h2,
  .trust-band h2 {
    font-size: 31px;
  }

  .section-heading p {
    font-size: 16px;
  }

  .feature-grid,
  .start-steps {
    grid-template-columns: 1fr;
  }

  .feature {
    min-height: 0;
    padding: 28px 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .feature:first-child { border-top: 0; }

  .feature-number {
    margin-bottom: 24px;
  }

  .product-gallery {
    width: calc(100% + 16px);
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 74vw);
    grid-template-columns: none;
    gap: 14px;
    padding: 0 16px 18px 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-padding-left: 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
  }

  .product-shot {
    scroll-snap-align: start;
  }

  .product-shot:last-child {
    grid-column: auto;
    width: auto;
  }

  .page-header {
    padding: 48px 0 34px;
  }

  .page-header h1,
  .error-page h1 {
    font-size: 36px;
  }

  .page-header p {
    font-size: 16px;
  }

  .page-content {
    padding: 42px 0 68px;
  }

  .legal-meta {
    display: grid;
    gap: 6px;
  }

  .support-aside,
  .tool-panel {
    padding: 22px 18px;
  }

  .status-row {
    display: grid;
    grid-template-columns: auto 1fr;
  }

  .status-actions {
    grid-column: 1 / -1;
  }

  .footer-inner {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-legal {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --line: #7c8387;
    --muted: #4c5256;
  }
}

@media print {
  .site-header,
  .site-footer,
  .skip-link,
  .nav-toggle,
  .hero-actions {
    display: none !important;
  }

  body {
    color: #000000;
    background: #ffffff;
  }

  .hero,
  .section-dark {
    color: #000000;
    background: #ffffff;
  }

  .hero-visual-card,
  .product-gallery {
    display: none;
  }

  .hero-inner {
    min-height: 0;
    padding: 0;
  }

  .section {
    padding: 24px 0;
  }

  .container,
  .hero-copy {
    width: 100%;
    max-width: none;
    padding: 0;
  }

  a {
    color: #000000;
  }

  .page-header {
    padding: 24px 0 16px;
    background: #ffffff;
    border-bottom: 1px solid #999999;
  }

  .page-content {
    padding: 24px 0;
  }
}

/* Dark mode: mirrors the TessCloud App Classic dark palette
   (SemanticColorTokens.swift dark values). */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ink: #f5f7fa;            /* text.primary dark */
    --ink-soft: #cbd1d9;       /* text.secondary dark */
    --muted: #9fa9b5;          /* text.tertiary dark */
    --line: #343b47;           /* outline.subtle dark */
    --line-strong: #707a88;    /* outline.default dark */
    --surface: #1d222c;        /* surface.elevated dark */
    --surface-soft: #151820;   /* surface.primary dark */
    --surface-page: #0b0d12;   /* surface.background dark */
    --surface-dark: #0b0d12;
    --accent: #0a84ff;         /* classic accent dark */
    --accent-dark: #4da6ff;    /* hover: lighter blue on dark */
    --accent-secondary: #4fd7d0;
    --positive: #55d98d;
    --warning: #ffb84d;
    --error: #ff7b72;
    --focus: #66b5ff;
  }

  body {
    background: var(--surface-page);
  }

  .site-header {
    color: var(--ink);
    background: var(--surface-soft);
    border-bottom-color: var(--line);
  }

  .brand-mark {
    color: #111317;
    background: #f5f7fa;
  }

  .site-nav {
    background: var(--surface-soft);
  }

  .hero {
    color: #f7f8fa;
    background: #111317;
  }

  .feature,
  .start-steps li {
    border-color: var(--line);
  }

  .nav-backdrop {
    background: rgba(0, 0, 0, 0.55);
  }

  .legal-alert {
    color: var(--warning);
    background: rgba(255, 184, 77, 0.10);
    border-left-color: var(--warning);
  }

  .status-indicator {
    background: var(--muted);
  }

  .product-shot img {
    background: #000000;
    border-color: #2c323d;
  }

  .password-toggle:hover,
  .text-button:hover,
  .nav-toggle:hover {
    background: var(--surface-soft);
  }
}
