/* NTPNODE brand tokens — industrial timing, not generic AI purple/cream */

/* Self-hosted IBM Plex (no Google Fonts / no cross-border font CDN) */
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #0e1419;
  --bg-elevated: #151d25;
  --bg-panel: #1a2430;
  --surface: #1e2a38;
  --text: #e8eef4;
  --text-muted: #8b9aab;
  --text-dim: #5c6d7e;
  --accent: #2a9d8f;
  --accent-hover: #3db5a6;
  --accent-dim: rgba(42, 157, 143, 0.14);
  --accent-border: rgba(42, 157, 143, 0.45);
  --steel: #4a6fa5;
  --steel-dim: rgba(74, 111, 165, 0.18);
  --line: rgba(232, 238, 244, 0.1);
  --line-strong: rgba(232, 238, 244, 0.18);
  --ok: #7cb87a;
  --warn: #c4a35a;
  --danger: #c47070;
  --radius: 2px;
  /* Latin: self-hosted IBM Plex; CJK: system UI fonts (no third-party CDN) */
  --font-display: "IBM Plex Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-body: "IBM Plex Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --max: 1120px;
  --nav-h: 4rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(74, 111, 165, 0.22), transparent 55%),
    radial-gradient(900px 500px at -5% 30%, rgba(42, 157, 143, 0.12), transparent 50%),
    linear-gradient(180deg, #0c1217 0%, var(--bg) 40%, #0a1014 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent-hover);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--text);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1rem; color: var(--text-muted); }

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  border-bottom: 1px solid var(--line);
  background: rgba(14, 20, 25, 0.82);
  backdrop-filter: blur(12px);
}

.nav {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  text-decoration: none;
  color: var(--text);
  line-height: 1.15;
}

.brand-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
}

.brand-sub {
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.02em;
  max-width: min(22rem, 52vw);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s var(--ease);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text);
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  margin-left: 0.5rem;
}

.lang-switch a {
  padding: 0.25rem 0.55rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  text-decoration: none;
  background: transparent;
}

.lang-switch a[aria-current="true"] {
  background: var(--accent-dim);
  color: var(--accent-hover);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 560;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

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

.btn-primary {
  background: var(--accent);
  color: #041210;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #041210;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  border-color: var(--accent-border);
  background: var(--accent-dim);
  color: var(--text);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: flex-end;
  padding: 4rem 0 5rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(14, 20, 25, 0.92) 0%, rgba(14, 20, 25, 0.55) 48%, rgba(14, 20, 25, 0.35) 100%),
    url("/images/hero-grid.svg") center / cover no-repeat,
    linear-gradient(135deg, #0e1419 0%, #1a2a38 50%, #0e1a22 100%);
  z-index: 0;
  animation: heroFade 1.2s var(--ease) both;
}

.hero-bg--product {
  background:
    linear-gradient(105deg, rgba(14, 20, 25, 0.94) 0%, rgba(14, 20, 25, 0.78) 40%, rgba(14, 20, 25, 0.35) 100%),
    url("/images/products/temposync-1231-hero.jpg?v=20260822a") right center / contain no-repeat,
    linear-gradient(135deg, #0e1419 0%, #1a2a38 50%, #0e1a22 100%);
  /* width-capped; height auto → uniform scale-down, no squash */
  background-size: auto, min(58vw, 860px) auto, auto;
  background-position: center, right 6% center, center;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 36rem;
  animation: riseIn 0.9s var(--ease) 0.15s both;
}

.hero-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 4.4vw, 2.7rem);
  letter-spacing: 0.01em;
  line-height: 1.18;
  margin: 0 0 0.4rem;
  color: var(--text);
  text-shadow: 0 0 40px rgba(42, 157, 143, 0.25);
}

.hero-brand-sub {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.hero-company {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 32rem;
}

@media (max-width: 767px) {
  .hero {
    min-height: auto;
    align-items: flex-start;
    padding: 1.25rem 0 2.75rem;
  }

  .hero-bg--product {
    /* Full-bleed product on top; soft plate + bottom veil for copy */
    background:
      linear-gradient(
        180deg,
        rgba(14, 20, 25, 0.12) 0%,
        rgba(14, 20, 25, 0.2) 32%,
        rgba(14, 20, 25, 0.88) 62%,
        rgba(14, 20, 25, 0.98) 100%
      ),
      radial-gradient(ellipse 90% 55% at 50% 12%, rgba(48, 68, 86, 0.55) 0%, rgba(14, 20, 25, 0) 72%),
      url("/images/products/temposync-1231-hero.jpg?v=20260822a") no-repeat,
      linear-gradient(160deg, #0e1419 0%, #1a2a38 45%, #0e1a22 100%);
    background-size:
      auto,
      auto,
      96% auto,
      auto;
    background-position:
      center,
      center top,
      center 0.6rem,
      center;
  }

  .hero-content {
    max-width: none;
    /* Clear the product silhouette above the copy */
    margin-top: clamp(8.5rem, 52vw, 14rem);
  }

  .hero-brand {
    font-size: clamp(1.55rem, 7.2vw, 2.15rem);
  }

  .hero-lead {
    font-size: 1.02rem;
  }

  .hero-picks {
    gap: 0.45rem;
  }
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@keyframes heroFade {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

/* Sections */
.section {
  padding: 4.5rem 0;
  border-top: 1px solid var(--line);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.brand-foot {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  margin: 0 0 0.35rem;
}

.product-role {
  margin: 0.15rem 0 0.75rem;
  color: var(--text-dim);
  font-size: 1rem;
}

.section-head {
  max-width: 36rem;
  margin-bottom: 2.5rem;
  animation: riseIn 0.7s var(--ease) both;
}

/* Product strips — not cards unless interactive */
.product-strip {
  display: grid;
  gap: 2rem;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
}

.product-strip:first-of-type { border-top: none; }

@media (min-width: 768px) {
  .product-strip {
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
  }
}

.product-strip h2,
.product-strip h3 {
  font-size: 1.5rem;
  margin-bottom: 0.15rem;
}

.model-code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 1.5rem 0;
}

.spec-table th,
.spec-table td {
  text-align: left;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.spec-table th {
  width: 32%;
  color: var(--text-dim);
  font-weight: 500;
}

.spec-table td { color: var(--text-muted); }

.note {
  font-size: 0.9rem;
  padding: 1rem 1.1rem;
  border-left: 2px solid var(--accent);
  background: var(--accent-dim);
  color: var(--text-muted);
  margin: 1.25rem 0;
}

.exclude-list {
  margin: 1rem 0 1.5rem;
  padding-left: 1.2rem;
  color: var(--text-muted);
}

.exclude-list li { margin-bottom: 0.35rem; }

/* Guide list */
.guide-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.guide-list a {
  display: block;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: padding-left 0.25s var(--ease);
}

.guide-list a:hover {
  padding-left: 0.5rem;
}

.guide-list h3 {
  color: var(--text);
  margin-bottom: 0.25rem;
}

.guide-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.35rem;
}

.guide-decision {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.guide-cards a {
  padding: 1.35rem 0;
}

.bridge-foot {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.bridge-foot p {
  color: var(--text-muted);
  margin: 0 0 0.85rem;
}

.value-grid {
  display: grid;
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}

@media (min-width: 720px) {
  .value-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .value-grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.value-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1rem 1.1rem;
  background: rgba(0, 0, 0, 0.15);
}

.value-card h3 {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
}

.value-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.value-model {
  color: var(--accent) !important;
  font-weight: 600;
  margin-bottom: 0.35rem !important;
}

.section-inline-title {
  font-size: 1.05rem;
  margin: 0 0 0.75rem;
}

.fit-line {
  margin: 0.45rem 0;
  font-size: 0.9rem;
  line-height: 1.45;
}

.fit-line.muted {
  color: var(--text-muted);
}

.compare-hint {
  margin-top: 0.75rem;
  font-size: 0.88rem;
}

.download-nudge {
  margin: 0.85rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.hero-pick-label {
  margin: 1rem 0 0.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.hero-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.1rem;
}

.hero-picks a {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.hero-picks a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Forms */
.form {
  display: grid;
  gap: 1rem;
  max-width: 32rem;
}

.form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.form input,
.form textarea,
.form select {
  font: inherit;
  color: var(--text);
  background: var(--bg-panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0.65rem 0.8rem;
}

.form input:focus,
.form textarea:focus,
.form select:focus {
  outline: none;
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-status {
  font-size: 0.9rem;
  min-height: 1.4em;
}

.form-hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 400;
}

.form-status.ok { color: var(--ok); }
.form-status.err { color: var(--danger); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 3rem 0 2.5rem;
  margin-top: 2rem;
  background: rgba(0, 0, 0, 0.25);
}

.footer-tagline {
  margin: 0 0 1.75rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.footer-grid {
  display: grid;
  gap: 2rem 3rem;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr 1fr;
    max-width: 48rem;
  }
}

.site-footer h4 {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.85rem;
}

.site-footer p,
.site-footer li {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-footer a:hover { color: var(--accent-hover); }

.legal-note.legal-copy {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.65rem;
  color: var(--text-dim);
  line-height: 1.4;
  max-width: none;
  letter-spacing: 0.01em;
  white-space: normal;
}

.legal-note.icp-note {
  margin-top: 0.4rem;
  font-size: 0.65rem;
  color: var(--text-dim);
}

/* Page hero (inner) */
.page-hero {
  padding: 3.5rem 0 2rem;
}

.page-hero h1 {
  animation: riseIn 0.7s var(--ease) both;
}

.page-hero .lead {
  max-width: 36rem;
  font-size: 1.1rem;
  animation: riseIn 0.7s var(--ease) 0.1s both;
}

.product-hero {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 900px) {
  .product-hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.1fr);
    gap: 2.5rem;
  }
}

/* Product media: bare white photo — no frame, border, or inset plate */
.product-hero-media,
.product-strip-media {
  position: relative;
  margin: 0;
  display: block;
  background: #fff;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  outline: none;
  overflow: hidden;
  padding: 0;
}

.product-hero-media::before,
.product-hero-media::after,
.product-strip-media::before,
.product-strip-media::after {
  content: none;
  display: none;
}

.product-hero-media img,
.product-strip-media img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: center center;
  background: #fff;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

@media (min-width: 768px) {
  .product-strip {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: center;
    column-gap: 2.25rem;
  }

  .product-strip-media {
    width: 100%;
    justify-self: stretch;
  }
}

@media (max-width: 767px) {
  .page-hero {
    padding: 2.25rem 0 1.25rem;
  }

  .product-hero {
    gap: 1.35rem;
  }

  .product-strip {
    gap: 1.15rem;
  }
}

.product-strip-aside {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
  font-size: 0.92rem;
  min-width: 0;
}

.product-strip-aside a {
  align-self: flex-start;
}

.prose {
  max-width: 42rem;
}

.prose h2 { margin-top: 2.5rem; }
.prose ul { color: var(--text-muted); }

.faq-block { margin-top: 2.5rem; }

.faq-list {
  margin: 0;
  padding: 0;
}

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

.faq-item dt {
  font-weight: 600;
  color: var(--text);
}

.faq-item dd {
  margin: 0.4rem 0 0;
  color: var(--text-muted);
}

.legal-closing {
  margin-top: 2.5rem;
  font-weight: 600;
  color: var(--text-muted);
}

.download-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.download-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.download-list strong { color: var(--text); }

.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
  border: 1px solid var(--line-strong);
  color: var(--text-dim);
  border-radius: var(--radius);
}

.badge-soon {
  border-color: var(--warn);
  color: var(--warn);
}

.badge-ship {
  border-color: var(--ok, #3d9b6e);
  color: var(--ok, #3d9b6e);
}

.badge-plan {
  border-color: var(--text-dim);
  color: var(--text-dim);
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
  }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.25rem 1.25rem;
    background: rgba(14, 20, 25, 0.96);
    border-bottom: 1px solid var(--line);
    gap: 0.75rem;
  }
  .menu-toggle {
    display: inline-flex;
  }
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--text);
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius);
  font-size: 0.8rem;
  cursor: pointer;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.advisor {
  max-width: 40rem;
}

.advisor-log {
  min-height: 12rem;
  max-height: 28rem;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.advisor-bubble {
  max-width: 92%;
  padding: 0.75rem 0.95rem;
  line-height: 1.55;
  word-break: break-word;
}

.advisor-user {
  align-self: flex-end;
  background: rgba(196, 149, 74, 0.12);
  border-left: 2px solid var(--accent);
  color: var(--text);
  white-space: pre-wrap;
}

.advisor-assistant {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.03);
  border-left: 2px solid var(--line-strong);
  color: var(--text-muted);
}

.advisor-md {
  white-space: normal;
}

.advisor-md > :first-child {
  margin-top: 0;
}

.advisor-md > :last-child {
  margin-bottom: 0;
}

.advisor-md h1,
.advisor-md h2,
.advisor-md h3 {
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 600;
  line-height: 1.35;
  margin: 0.85em 0 0.4em;
}

.advisor-md h1 { font-size: 1.05rem; }
.advisor-md h2 { font-size: 1rem; }
.advisor-md h3 { font-size: 0.95rem; }

.advisor-md p {
  margin: 0.45em 0;
}

.advisor-md ul,
.advisor-md ol {
  margin: 0.4em 0 0.55em;
  padding-left: 1.25rem;
  color: var(--text-muted);
}

.advisor-md li {
  margin: 0.25em 0;
}

.advisor-md strong {
  color: var(--text);
  font-weight: 600;
}

.advisor-md a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.advisor-md code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--text);
}

.advisor-md table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.6em 0;
  font-size: 0.85rem;
  overflow-x: auto;
  display: block;
}

.advisor-md th,
.advisor-md td {
  border: 1px solid var(--line);
  padding: 0.35rem 0.5rem;
  text-align: left;
  vertical-align: top;
}

.advisor-md th {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.advisor-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 5rem;
}

.advisor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.85rem;
  align-items: center;
}
