:root {
  color-scheme: light;
  --bg: #f4f5f6;
  --surface: #ffffff;
  --ink: #111417;
  --muted: #5c6670;
  --line: #d9dee3;
  --yellow: #ffed00;
  --yellow-hover: #e6d500;
  --dark: #131314;
  --dark-surface: #1e1f20;
  --dark-line: #475569;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #131314;
  --surface: #1e1f20;
  --ink: #f1f5f9;
  --muted: #aab4bf;
  --line: #475569;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 Inter, ui-sans-serif, system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.site-header { min-height: 72px; padding: 14px clamp(20px, 5vw, 76px); display: flex; align-items: center; gap: 32px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: 0; }
.brand img { width: 32px; height: 32px; object-fit: contain; }
.main-nav { display: flex; gap: 24px; margin-left: auto; color: var(--muted); font-size: 14px; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.theme-button { border: 1px solid var(--line); background: transparent; color: var(--muted); padding: 8px 12px; cursor: pointer; border-radius: 2px; font-size: 13px; }
.theme-button:hover { color: var(--ink); border-color: var(--ink); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 11px 18px; border: 1px solid transparent; border-radius: 2px; font-weight: 750; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.button-small { min-height: 38px; padding: 8px 13px; font-size: 13px; }
.button-yellow { background: var(--yellow); color: #0f172a; }
.button-yellow:hover { background: var(--yellow-hover); }
.button-secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.button-secondary:hover { border-color: var(--ink); }

.hero { min-height: 650px; padding: 88px clamp(20px, 8vw, 130px) 110px; display: grid; grid-template-columns: minmax(0, 680px) minmax(260px, 1fr); gap: 48px; align-items: center; background: var(--dark); color: #f8fafc; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0; background: rgba(19, 19, 20, .18); pointer-events: none; }
.hero-content, .hero-mark { position: relative; z-index: 1; }
.hero-mark { justify-self: end; width: min(36vw, 470px); aspect-ratio: 1; display: grid; place-items: center; }
.hero-mark img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 24px 34px rgba(0,0,0,.35)); }
.eyebrow { margin: 0 0 14px; color: var(--yellow); font-size: 12px; line-height: 1.2; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 720px; margin-bottom: 22px; font-size: clamp(42px, 6vw, 78px); line-height: .98; letter-spacing: 0; }
h2 { margin-bottom: 16px; font-size: clamp(32px, 4vw, 54px); line-height: 1.03; letter-spacing: 0; }
h3 { margin-bottom: 8px; font-size: 19px; line-height: 1.15; }
.hero-copy { max-width: 590px; color: #cbd5e1; font-size: 19px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero .button-secondary { background: transparent; color: #f8fafc; border-color: #64748b; }
.hero .button-secondary:hover { border-color: #f8fafc; }
.download-note, .download-state { margin: 18px 0 0; color: #94a3b8; font-size: 13px; }
.download-state { color: #facc15; }

.section { padding: 104px clamp(20px, 7vw, 110px); }
.section-light { background: var(--bg); }
.section-dark { background: var(--dark); color: #f8fafc; }
.section-heading { max-width: 720px; margin-bottom: 46px; }
.section-heading > p:last-child { color: var(--muted); font-size: 18px; }
.section-dark .section-heading > p:last-child { color: #aab4bf; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.gallery-item { margin: 0; min-width: 0; }
.gallery-item-wide { grid-column: span 2; }
.screen-button { width: 100%; padding: 0; border: 1px solid var(--line); background: var(--surface); cursor: zoom-in; border-radius: 2px; overflow: hidden; text-align: left; }
.screen-button:hover { border-color: var(--yellow-hover); }
.screen-visual { display: block; min-height: 250px; padding: 16px; background: #e8ebee; color: #1e293b; }
.gallery-item-wide .screen-visual { min-height: 320px; }
.screen-topbar { height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 12px; background: #ffffff; border: 1px solid #d9dee3; font-size: 12px; }
.screen-topbar b { margin-right: auto; font-size: 13px; }
.screen-topbar i { width: 8px; height: 8px; display: block; background: #cbd5e1; border-radius: 50%; }
.screen-body { min-height: 205px; display: flex; border: 1px solid #d9dee3; border-top: 0; background: #f8fafc; }
.screen-side { width: 25%; padding: 14px 10px; display: grid; align-content: start; gap: 10px; background: #ffffff; border-right: 1px solid #d9dee3; }
.screen-side em { height: 12px; display: block; background: #e2e8f0; }
.screen-side em.active { background: var(--yellow); }
.screen-main { flex: 1; min-width: 0; padding: 18px; }
.screen-main.full { width: 100%; }
.screen-main strong { display: block; margin-bottom: 14px; font-size: 18px; }
.screen-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.screen-cards u, .status-row u { height: 45px; display: block; background: #ffffff; border: 1px solid #d9dee3; }
.status-row { display: flex; gap: 10px; margin-bottom: 16px; }
.status-row u { width: 33%; }
.status-row u.yellow { background: var(--yellow); border-color: var(--yellow); }
.screen-filter { height: 28px; display: block; margin-bottom: 12px; background: #ffffff; border: 1px solid #d9dee3; }
.screen-table { display: grid; gap: 7px; }
.screen-table.tall { gap: 9px; }
.screen-table s { height: 17px; display: block; background: #ffffff; border: 1px solid #d9dee3; }
.catalog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.catalog-grid u { height: 45px; display: block; background: #ffffff; border: 1px solid #d9dee3; }
.plan-paper { height: 188px; display: block; position: relative; background: #ffffff; border: 1px solid #cbd5e1; background-image: linear-gradient(#e2e8f0 1px, transparent 1px), linear-gradient(90deg, #e2e8f0 1px, transparent 1px); background-size: 24px 24px; }
.plan-paper u { width: 25%; height: 45%; display: block; position: absolute; border: 2px solid #64748b; }
.plan-paper u:nth-child(1) { left: 12%; top: 20%; }
.plan-paper u:nth-child(2) { left: 40%; top: 35%; width: 34%; height: 30%; }
.plan-paper u:nth-child(3) { left: 70%; top: 14%; width: 17%; height: 55%; }
.plan-paper b { width: 24px; height: 24px; display: grid; place-items: center; position: absolute; background: var(--yellow); color: #0f172a; border-radius: 50%; font-size: 11px; }
.plan-paper b:nth-of-type(1) { left: 18%; top: 30%; }.plan-paper b:nth-of-type(2) { left: 53%; top: 45%; }.plan-paper b:nth-of-type(3) { left: 77%; top: 27%; }
.import-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.import-columns u { padding: 12px; background: #ffffff; border: 1px solid #d9dee3; font-size: 12px; }
figcaption { display: flex; flex-wrap: wrap; gap: 8px 14px; padding-top: 14px; }
figcaption strong { font-size: 17px; }
figcaption span { color: var(--muted); font-size: 14px; }

.usage-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--dark-line); border: 1px solid var(--dark-line); }
.usage-grid article { min-height: 220px; padding: 28px; background: var(--dark-surface); }
.usage-index { display: block; margin-bottom: 38px; color: var(--yellow); font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.usage-grid p { margin-bottom: 0; color: #aab4bf; }
.text-link { display: inline-flex; align-items: center; gap: 10px; margin-top: 32px; color: var(--yellow); font-weight: 750; }
.text-link:hover { color: var(--yellow-hover); }
.compact-section { padding-top: 76px; padding-bottom: 76px; }
.cta-band { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 42px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cta-band h2 { margin-bottom: 10px; font-size: clamp(28px, 3vw, 42px); }
.cta-band p:last-child { margin-bottom: 0; color: var(--muted); }

.site-footer { display: flex; align-items: center; gap: 22px; padding: 26px clamp(20px, 7vw, 110px); background: var(--surface); border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.footer-brand { color: var(--ink); }
.site-footer p { margin: 0; }
.site-footer > a { margin-left: auto; color: var(--ink); font-weight: 700; }
.site-footer > a:hover { color: var(--muted); }

.lightbox[hidden] { display: none; }
.lightbox { position: fixed; inset: 0; z-index: 50; display: grid; grid-template-columns: 56px minmax(0, 960px) 56px; place-content: center; gap: 18px; padding: 32px; background: rgba(0, 0, 0, .86); }
.lightbox-content { margin: 0; color: #f8fafc; }
.lightbox-content .screen-visual { min-height: min(62vh, 540px); }
.lightbox-content figcaption { justify-content: center; color: #cbd5e1; }
.icon-button { width: 44px; height: 44px; border: 1px solid #64748b; background: transparent; color: #f8fafc; border-radius: 2px; cursor: pointer; font-size: 30px; line-height: 1; }
.icon-button:hover { border-color: var(--yellow); color: var(--yellow); }
.lightbox-close { position: fixed; top: 24px; right: 24px; }
.lightbox-prev, .lightbox-next { align-self: center; }

.docs-layout { display: grid; grid-template-columns: minmax(220px, 290px) minmax(0, 760px); gap: clamp(36px, 7vw, 110px); max-width: 1240px; margin: 0 auto; padding: 88px 24px 120px; }
.docs-toc { position: sticky; top: 110px; align-self: start; }
.docs-toc h1 { margin-bottom: 32px; font-size: 44px; }
.docs-toc nav { display: grid; gap: 10px; border-left: 1px solid var(--line); padding-left: 18px; }
.docs-toc nav a { color: var(--muted); font-size: 14px; }
.docs-toc nav a:hover { color: var(--ink); }
.docs-content { min-width: 0; }
.docs-content section { scroll-margin-top: 112px; padding-bottom: 64px; margin-bottom: 64px; border-bottom: 1px solid var(--line); }
.docs-content h2 { font-size: clamp(30px, 4vw, 48px); }
.docs-content h3 { margin-top: 28px; }
.docs-content p { max-width: 680px; color: var(--muted); }
.notice { padding: 16px 18px; border-left: 3px solid var(--yellow); background: var(--surface); color: var(--ink) !important; }

@media (max-width: 800px) {
  .site-header { flex-wrap: wrap; gap: 14px; }
  .main-nav { order: 3; width: 100%; margin-left: 0; padding-top: 4px; }
  .header-actions { margin-left: auto; }
  .hero { min-height: 670px; grid-template-columns: 1fr; padding-top: 68px; }
  .hero-mark { width: min(64vw, 330px); justify-self: start; order: -1; }
  h1 { font-size: clamp(42px, 13vw, 66px); }
  .gallery, .usage-grid { grid-template-columns: 1fr; }
  .gallery-item-wide { grid-column: auto; }
  .gallery-item-wide .screen-visual { min-height: 250px; }
  .cta-band { align-items: flex-start; flex-direction: column; }
  .site-footer { align-items: flex-start; flex-direction: column; }
  .site-footer > a { margin-left: 0; }
  .docs-layout { grid-template-columns: 1fr; padding-top: 52px; }
  .docs-toc { position: static; }
  .docs-toc nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 500px) {
  .header-actions .button-small { display: none; }
  .main-nav { gap: 14px; font-size: 13px; }
  .hero-actions .button { width: 100%; }
  .screen-visual { min-height: 210px; padding: 10px; }
  .screen-body { min-height: 165px; }
  .screen-main { padding: 12px; }
  .screen-main strong { font-size: 15px; }
  .lightbox { grid-template-columns: 42px minmax(0, 1fr) 42px; gap: 6px; padding: 12px; }
  .lightbox-content .screen-visual { min-height: 48vh; }
}
