/* StellarByte site prototype v3. One stylesheet for every page: brand tokens + shared components. */
:root {
  /* Brand: navy carries the brand, orange only marks the primary action. */
  --navy-950: #0F1B3D;
  --navy-900: #1A2B5E;
  --navy-800: #1D3FB0;
  --navy-700: #2350D6;
  --navy-600: #2F62F0;
  --navy-200: #C5D4FF;
  --navy-100: #DFE8FF;
  --navy-50:  #F2F6FF;
  --action: #C9460C;
  --action-hover: #A93A09;
  --ink: #0F1B3D;
  --ink-2: #36415C;
  --ink-3: #5A6680;
  --rule: #DFE5F0;
  --on-navy: #FFFFFF;
  --on-navy-2: #C9D3EA;
  --latin: "Schibsted Grotesk", "Noto Sans SC", "PingFang SC", sans-serif;
  --sans: "Schibsted Grotesk", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-synthesis: none; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-color: var(--navy-200) transparent; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: #fff; font-size: 17px; line-height: 1.8; letter-spacing: 0.02em; line-break: strict; }
::selection { background: var(--navy-100); color: var(--navy-900); }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--navy-600); outline-offset: 3px; border-radius: 4px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3, h4 { letter-spacing: 0; text-wrap: balance; word-break: keep-all; font-weight: 700; color: var(--navy-950); }
p { text-wrap: pretty; }
.num { font-family: var(--latin); font-variant-numeric: tabular-nums; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 40px; }
.section { padding: 104px 0; }
.section.tint { background: var(--navy-50); }
.section-title { font-size: 38px; line-height: 1.3; }
.section-lead { margin-top: 14px; font-size: 18px; color: var(--ink-3); max-width: 36em; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-bottom: 48px; }

/* Buttons and links */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 50px; padding: 0 28px; border-radius: 6px; font-size: 16px; font-weight: 600; letter-spacing: 0.04em; white-space: nowrap; border: 1px solid transparent; transition: background-color .18s cubic-bezier(.2,.8,.2,1), color .18s, border-color .18s; cursor: pointer; }
.btn-primary { background: var(--action); color: #fff; }
.btn-primary:hover { background: var(--action-hover); }
.btn-ghost { border-color: #B8C2D3; color: var(--ink); background: #fff; }
.btn-ghost:hover { border-color: var(--navy-600); color: var(--navy-600); }
.btn-ghost-light { border-color: rgba(255,255,255,.45); color: #fff; }
.btn-ghost-light:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn-sm { height: 40px; padding: 0 18px; font-size: 15px; }
.text-link { color: var(--navy-600); font-weight: 600; font-size: 16px; text-decoration: underline; text-decoration-color: var(--navy-200); text-underline-offset: 6px; text-decoration-thickness: 2px; transition: text-decoration-color .18s; }
.text-link:hover { text-decoration-color: var(--navy-600); }
.on-navy .text-link { color: #fff; text-decoration-color: rgba(255,255,255,.4); }
.on-navy .text-link:hover { text-decoration-color: #fff; }

/* Placeholder for assets the user will supply */
.ph { display: flex; align-items: center; justify-content: center; text-align: center; background: repeating-linear-gradient(135deg, #EEF2F8 0 12px, #E6EBF3 12px 24px); border: 1px dashed #8C99B0; color: #3F4A5C; font-size: 14px; line-height: 1.6; padding: 14px; }
.on-navy .ph { background: repeating-linear-gradient(135deg, rgba(255,255,255,.06) 0 12px, rgba(255,255,255,.1) 12px 24px); border-color: rgba(255,255,255,.4); color: #E2E8F5; }

/* Device frame for real app screenshots */
.device { border-radius: 26px; border: 7px solid #121A33; background: #fff; overflow: hidden; box-shadow: 0 30px 60px -24px rgba(20,40,110,.45); }
.device img { width: 100%; }
.device .ph { border: 0; height: 100%; }

/* Header + navigation */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--rule); }
.site-header .wrap { height: 72px; display: flex; align-items: center; gap: 48px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--latin); font-size: 21px; font-weight: 700; color: var(--navy-900); letter-spacing: -0.01em; }
.brand svg { width: 34px; height: auto; flex: none; }
.nav { display: flex; align-items: center; gap: 4px; height: 100%; }
.nav > li { position: relative; height: 100%; display: flex; align-items: center; }
.nav > li > a, .nav > li > button { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px; font: inherit; font-size: 16px; color: var(--ink-2); background: none; border: 0; cursor: pointer; letter-spacing: 0.02em; }
.nav > li > a:hover, .nav > li > button:hover, .nav > li > a[aria-current="page"] { color: var(--navy-600); }
.nav > li > a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--navy-600); }
.caret { width: 10px; height: 10px; transition: transform .2s; }
.has-menu:hover .caret, .has-menu:focus-within .caret { transform: rotate(180deg); }
.menu { position: absolute; top: 100%; left: -20px; width: 620px; background: #fff; border: 1px solid var(--rule); border-radius: 0 0 10px 10px; box-shadow: 0 24px 48px -16px rgba(15,23,42,.18); padding: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .18s, transform .18s, visibility .18s; }
.has-menu:hover .menu, .has-menu:focus-within .menu { opacity: 1; visibility: visible; transform: none; }
.menu .group-title { font-size: 14px; color: var(--ink-3); font-weight: 500; margin-bottom: 10px; }
.menu a { display: block; padding: 10px 12px; margin: 0 -12px; border-radius: 6px; }
.menu a:hover { background: var(--navy-50); }
.menu a b { display: block; font-size: 16px; font-weight: 600; color: var(--navy-950); line-height: 1.5; }
.menu a span { display: block; font-size: 14px; color: var(--ink-3); line-height: 1.6; }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 20px; font-size: 15px; color: var(--ink-3); }
.menu-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border: 1px solid var(--rule); border-radius: 6px; background: #fff; align-items: center; justify-content: center; cursor: pointer; }
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after { display: block; width: 18px; height: 2px; background: var(--ink); position: relative; content: ""; }
.menu-toggle span::before { position: absolute; top: -6px; } .menu-toggle span::after { position: absolute; top: 6px; }
.mobile-nav { display: none; }

/* Home hero (navy field) */
.hero { background: linear-gradient(180deg, #EAF0FF 0%, #F7F9FF 70%, #fff 100%); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; min-height: 600px; }
.hero-copy { align-self: center; padding: 72px 0; }
.hero h1 { font-size: 56px; line-height: 1.22; }
.hero .lead { margin-top: 24px; font-size: 19px; line-height: 1.9; color: var(--ink-2); max-width: 28em; }
.hero .actions { margin-top: 36px; display: flex; gap: 14px; }
.hero-visual { position: relative; margin: 56px 0 0; border-radius: 24px 24px 0 0; background: linear-gradient(160deg, #CFDCFF 0%, #A9C0FF 100%); overflow: hidden; }
.hero-visual .device { position: absolute; width: 228px; }
.hero-visual .d1 { left: 4%; top: 120px; }
.hero-visual .d2 { left: 33%; top: 64px; z-index: 2; }
.hero-visual .d3 { left: 62%; top: 150px; height: 470px; }
.hero .device .ph { background: repeating-linear-gradient(135deg, #EEF2F8 0 12px, #E6EBF3 12px 24px); color: #3F4A5C; }

/* Delivery log (replaces the old stats bar) */
.log { width: 100%; border-collapse: collapse; font-size: 16px; }
.log th { text-align: left; font-weight: 500; font-size: 14px; color: var(--ink-3); padding: 0 16px 14px 0; border-bottom: 1px solid var(--rule); }
.log td { padding: 18px 16px 18px 0; border-bottom: 1px solid var(--rule); vertical-align: top; line-height: 1.6; }
.log td:first-child { font-weight: 700; color: var(--navy-950); white-space: nowrap; }
.log .kind { color: var(--ink-3); }
.log .state { font-weight: 600; color: var(--navy-700); white-space: nowrap; }
.log .state.pending { color: var(--ink-3); font-weight: 500; }
.log a { color: var(--navy-600); text-decoration: underline; text-decoration-color: var(--navy-200); text-underline-offset: 4px; }

/* Problems: a divided two-column list, no cards */
.problems { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--rule); }
.problem { padding: 36px 48px 40px 0; border-bottom: 1px solid var(--rule); }
.problem:nth-child(even) { padding-left: 48px; padding-right: 0; border-left: 1px solid var(--rule); }
.problem h3 { font-size: 22px; line-height: 1.45; }
.problem p { margin-top: 10px; color: var(--ink-2); font-size: 16px; }
.problem .text-link { display: inline-block; margin-top: 16px; font-size: 15px; }

/* Service blocks (alternating image + text) */
.svc { display: grid; grid-template-columns: 1.1fr 1fr; gap: 80px; align-items: center; padding: 56px 0; }
.svc + .svc { border-top: 1px solid var(--rule); }
.svc.flip .svc-media { order: 2; }
.svc h3 { font-size: 32px; line-height: 1.3; }
.svc p { margin-top: 14px; color: var(--ink-2); }
.ticks { margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; }
.ticks li { position: relative; padding-left: 22px; font-size: 15px; line-height: 1.7; color: var(--ink-2); }
.ticks li::before { content: ""; position: absolute; left: 0; top: .62em; width: 10px; height: 10px; background: var(--navy-600); border-radius: 2px; }
.svc .text-link { display: inline-block; margin-top: 26px; }
.svc-media { position: relative; height: 400px; border-radius: 10px; overflow: hidden; background: var(--navy-100); }
.svc-media > .ph { height: 100%; border-radius: 10px; }
.svc-media .device { position: absolute; width: 168px; border-width: 5px; border-radius: 20px; }
.svc-media .m1 { left: 9%; top: 48px; } .svc-media .m2 { left: 37%; top: 84px; z-index: 2; } .svc-media .m3 { left: 65%; top: 48px; }
.notes { position: absolute; inset: 0; display: flex; gap: 14px; padding: 36px 28px; align-items: flex-start; }
.notes img { width: 31%; border-radius: 10px; box-shadow: 0 18px 36px -14px rgba(15,23,42,.35); background: #fff; }
.notes img:nth-child(2) { margin-top: 40px; }

/* Media teaser band */
.band { background: var(--navy-100); }
.band .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; padding: 88px 40px; }
.band h2 { font-size: 36px; line-height: 1.3; }
.band p { margin-top: 16px; color: var(--ink-2); font-size: 17px; }
.band .text-link { display: inline-block; margin-top: 26px; color: var(--navy-700); }
.accounts { border-top: 1px solid var(--navy-200); }
.account { display: flex; align-items: center; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--navy-200); }
.account .ph { width: 52px; height: 52px; border-radius: 50%; font-size: 12px; padding: 2px; flex: none; }
.account b { display: block; color: var(--navy-950); font-size: 18px; line-height: 1.5; }
.account span { display: block; color: var(--ink-3); font-size: 14px; line-height: 1.6; }
.account .fans { margin-left: auto; text-align: right; }

/* Process: numbered because it is a real sequence */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.step { border-top: 2px solid var(--navy-200); padding-top: 20px; }
.step .n { font-family: var(--latin); font-size: 40px; font-weight: 700; color: var(--navy-600); line-height: 1; }
.step h3 { margin-top: 18px; font-size: 20px; line-height: 1.45; }
.step p { margin-top: 8px; font-size: 15px; color: var(--ink-3); line-height: 1.8; }

/* Featured cases: one large, two small */
.cases { display: grid; grid-template-columns: 1.3fr 1fr; grid-template-rows: auto auto; gap: 28px 40px; }
.case { display: block; }
.case-img { position: relative; border-radius: 10px; overflow: hidden; background: var(--navy-100); }
.case.big { grid-row: span 2; }
.case.big .case-img { height: 520px; }
.case.small .case-img { height: 210px; }
.case-img > .ph { height: 100%; border-radius: 10px; }
.case-img .device { position: absolute; width: 190px; border-width: 6px; }
.case.big .c1 { left: 12%; top: 60px; } .case.big .c2 { left: 48%; top: 110px; }
.case-meta { margin-top: 16px; font-size: 14px; color: var(--ink-3); }
.case h3 { margin-top: 4px; font-size: 22px; line-height: 1.45; }
.case.big h3 { font-size: 28px; }
.case p { margin-top: 6px; font-size: 15px; color: var(--ink-2); }
.case:hover h3 { color: var(--navy-600); }

/* CTA: one style for the whole site */
.cta { background: var(--navy-600); color: #fff; }
.cta .btn-primary { background: #fff; color: var(--action); }
.cta .btn-primary:hover { background: #FFF1EA; }
.cta .wrap { display: flex; justify-content: space-between; align-items: center; gap: 40px; padding: 80px 40px; }
.cta h2 { color: #fff; font-size: 34px; line-height: 1.35; }
.cta p { margin-top: 10px; color: #FFFFFF; font-size: 17px; }
.cta .actions { display: flex; gap: 14px; flex: none; }

/* Footer */
.site-footer { background: var(--navy-950); color: #B3BDD6; font-size: 15px; padding: 72px 0 32px; }
.site-footer .top { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px; }
.site-footer .brand { color: #fff; }
.site-footer .brand polygon { fill: #fff; }
.site-footer .co { margin-top: 20px; line-height: 1.9; }
.site-footer .group-title { color: #E5EAF5; font-size: 15px; font-weight: 600; margin-bottom: 14px; }
.site-footer li { margin: 9px 0; line-height: 1.6; }
.site-footer a:hover { color: #fff; }
.site-footer .bottom { margin-top: 56px; padding-top: 24px; border-top: 1px solid #1F2A47; font-size: 14px; display: flex; justify-content: space-between; gap: 16px; }

/* ===== Inner pages ===== */
.page-hero { padding: 56px 0 48px; background: linear-gradient(180deg, #EAF0FF 0%, #F5F8FF 70%, #fff 100%); }
.page-hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 64px; align-items: center; }
.crumbs { font-size: 14px; color: var(--ink-3); margin-bottom: 18px; }
.crumbs a:hover { color: var(--navy-600); }
.crumbs span { margin: 0 8px; color: #6B7487; }
.page-hero h1 { font-size: 48px; line-height: 1.25; }
.page-hero .lead { margin-top: 20px; font-size: 19px; color: var(--ink-2); line-height: 1.9; max-width: 30em; }
.page-hero .actions { margin-top: 32px; display: flex; gap: 14px; }
.page-hero-media { height: 380px; border-radius: 10px; overflow: hidden; position: relative; background: var(--navy-100); }
.page-hero-media > .ph { height: 100%; border-radius: 10px; }

.fit { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--rule); }
.fit li { padding: 28px 32px 8px 0; }
.fit li + li { padding-left: 32px; border-left: 1px solid var(--rule); }
.fit h3 { font-size: 19px; line-height: 1.5; }
.fit p { margin-top: 8px; font-size: 15px; color: var(--ink-2); }

.deliver { display: grid; grid-template-columns: 1fr 1fr; gap: 0 56px; }
.deliver li { padding: 26px 0; border-bottom: 1px solid var(--rule); }
.deliver h3 { font-size: 19px; line-height: 1.5; }
.deliver p { margin-top: 6px; font-size: 15px; color: var(--ink-2); }

.related { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }

.faq details { border-bottom: 1px solid var(--rule); }
.faq details:first-child { border-top: 1px solid var(--rule); }
.faq summary { list-style: none; cursor: pointer; padding: 24px 40px 24px 0; font-size: 19px; font-weight: 600; color: var(--navy-950); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 34px; width: 12px; height: 12px; border-right: 2px solid var(--navy-600); border-bottom: 2px solid var(--navy-600); transform: rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(225deg); top: 40px; }
.faq details p { padding: 0 0 26px; color: var(--ink-2); max-width: 46em; }

.facts { display: grid; grid-template-columns: 160px 1fr; border-top: 1px solid var(--rule); }
.facts dt, .facts dd { padding: 16px 0; border-bottom: 1px solid var(--rule); font-size: 16px; line-height: 1.7; }
.facts dt { color: var(--ink-3); }
.facts dd { color: var(--ink); }
.facts a { color: var(--navy-600); text-decoration: underline; text-decoration-color: var(--navy-200); text-underline-offset: 4px; }

.prose h2 { font-size: 26px; line-height: 1.4; margin-top: 8px; }
.prose p { margin-top: 14px; color: var(--ink-2); max-width: 38em; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; }

.gallery { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; align-items: start; }
.gallery .device { border-width: 5px; border-radius: 20px; }
.gallery figcaption { margin-top: 12px; font-size: 14px; color: var(--ink-3); text-align: center; }

.acct-table .account { border-color: var(--rule); }
.acct-table { border-top: 1px solid var(--rule); }
.acct-table .account b { color: var(--navy-950); }
.acct-table .account span { color: var(--ink-3); }
.acct-table .account .ph { width: 64px; height: 64px; }
.topics { display: flex; flex-wrap: wrap; gap: 10px 12px; margin-top: 20px; }
.topics li { padding: 6px 14px; border: 1px solid var(--rule); border-radius: 6px; font-size: 15px; color: var(--ink-2); }
.shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.shots .ph { height: 320px; border-radius: 10px; }

.person { display: grid; grid-template-columns: 480px 1fr; gap: 64px; align-items: center; }
.person .ph { height: 420px; border-radius: 10px; }
.qr-row { display: flex; gap: 28px; margin-top: 28px; }
.qr { font-size: 14px; color: var(--ink-2); text-align: center; }
.qr .ph { width: 132px; height: 132px; margin-bottom: 10px; font-size: 13px; }

/* Logo options page */
.logo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.logo-opt { border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.logo-opt .light, .logo-opt .dark { height: 180px; display: flex; align-items: center; justify-content: center; }
.logo-opt .dark { background: var(--navy-950); }
.logo-opt .small { display: flex; gap: 24px; align-items: center; justify-content: center; padding: 22px; border-top: 1px solid var(--rule); background: var(--navy-50); }
.logo-opt .note { padding: 18px 22px; font-size: 15px; color: var(--ink-2); border-top: 1px solid var(--rule); }
.logo-opt .note b { color: var(--navy-950); }

/* Reveal: content is visible by default; only the hero is choreographed once */
@media (prefers-reduced-motion: no-preference) {
  .hero-visual .device { animation: rise .9s cubic-bezier(.16,1,.3,1) both; }
  .hero-visual .d2 { animation-delay: .08s; } .hero-visual .d3 { animation-delay: .16s; }
  @keyframes rise { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

/* ===== Mobile ===== */
@media (max-width: 860px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  .section { padding: 64px 0; }
  .section-title { font-size: 28px; }
  .section-lead { font-size: 16px; }
  .section-head { flex-direction: column; align-items: start; gap: 12px; margin-bottom: 28px; }
  .site-header .wrap { height: 60px; }
  .nav, .header-right { display: none; }
  .menu-toggle { display: inline-flex; }
  .mobile-nav.open { display: block; position: fixed; inset: 60px 0 0; background: #fff; overflow-y: auto; padding: 8px 20px 40px; z-index: 39; }
  .mobile-nav .group-title { font-size: 14px; color: var(--ink-3); font-weight: 500; margin: 20px 0 4px; }
  .mobile-nav a { display: flex; align-items: center; min-height: 48px; font-size: 17px; border-bottom: 1px solid var(--rule); }
  .mobile-nav .btn { margin-top: 24px; width: 100%; border: 0; }
  .hero .wrap { grid-template-columns: 1fr; min-height: 0; gap: 0; }
  .hero-copy { padding: 44px 0 8px; }
  .hero h1 { font-size: 34px; line-height: 1.3; }
  .hero .lead { font-size: 17px; margin-top: 16px; }
  .hero .actions { margin-top: 26px; }
  .hero .actions .btn { flex: 1; padding: 0 12px; }
  .hero-visual { height: 360px; }
  .hero-visual .device { width: 140px; border-width: 5px; border-radius: 18px; }
  .hero-visual .d1 { left: 0; top: 70px; } .hero-visual .d2 { left: 30%; top: 30px; } .hero-visual .d3 { left: 60%; top: 90px; height: 290px; }
  .log thead { display: none; }
  .log, .log tbody, .log tr, .log td { display: block; width: 100%; }
  .log tr { padding: 16px 0; border-bottom: 1px solid var(--rule); }
  .log td { padding: 2px 0; border: 0; }
  .problems { grid-template-columns: 1fr; }
  .problem, .problem:nth-child(even) { padding: 28px 0; border-left: 0; }
  .svc { grid-template-columns: 1fr; gap: 28px; padding: 40px 0; }
  .svc.flip .svc-media { order: 0; }
  .svc h3 { font-size: 24px; }
  .ticks { grid-template-columns: 1fr; }
  .svc-media { height: 300px; }
  .svc-media .device { width: 112px; border-width: 4px; border-radius: 14px; }
  .notes { padding: 24px 16px; gap: 10px; }
  .band .wrap { grid-template-columns: 1fr; gap: 32px; padding: 64px 20px; }
  .band h2 { font-size: 28px; }
  .steps { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .cases { grid-template-columns: 1fr; }
  .case.big { grid-row: auto; }
  .case.big .case-img { height: 380px; }
  .case-img .device { width: 140px; }
  .cta .btn-primary { background: #fff; color: var(--action); }
.cta .btn-primary:hover { background: #FFF1EA; }
.cta .wrap { flex-direction: column; align-items: stretch; padding: 56px 20px; }
  .cta h2 { font-size: 26px; }
  .cta .actions { flex-direction: column; }
  .site-footer .top { grid-template-columns: 1fr 1fr; }
  .site-footer .top > div:first-child { grid-column: 1 / -1; }
  .site-footer .bottom { flex-direction: column; }
  .page-hero { padding: 28px 0 28px; }
  .page-hero .wrap { grid-template-columns: 1fr; gap: 32px; }
  .page-hero h1 { font-size: 32px; }
  .page-hero .lead { font-size: 17px; }
  .page-hero .actions { flex-direction: column; }
  .page-hero .actions .btn { width: 100%; }
  .page-hero-media { height: 260px; }
  .fit { grid-template-columns: 1fr; }
  .fit li, .fit li + li { padding: 22px 0; border-left: 0; border-bottom: 1px solid var(--rule); }
  .deliver, .related, .two-col, .person { grid-template-columns: 1fr; gap: 32px; }
  .facts { grid-template-columns: 110px 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .shots { grid-template-columns: 1fr 1fr; }
  .shots .ph { height: 240px; }
  .person .ph { height: 300px; }
  .logo-grid { grid-template-columns: 1fr; }
}

/* AI-generated illustrative images */
.photo { position: relative; border-radius: 12px; overflow: hidden; background: var(--navy-100); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo .ai-note { position: absolute; right: 10px; bottom: 10px; font-size: 13px; line-height: 1; padding: 6px 8px; border-radius: 4px; background: #24304F; color: #fff; letter-spacing: .02em; }
.svc-media.photo, .page-hero-media.photo { background: var(--navy-100); }
/* blog + article + legal */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.post .photo { height: 220px; }
.post h3 { margin-top: 16px; font-size: 20px; line-height: 1.5; }
.post p { margin-top: 8px; font-size: 15px; color: var(--ink-2); }
.post .case-meta { margin-top: 14px; }
.article { max-width: 760px; margin: 0 auto; }
.article h1 { font-size: 40px; line-height: 1.3; }
.article h2 { font-size: 26px; line-height: 1.45; margin: 48px 0 8px; }
.article h3 { font-size: 20px; line-height: 1.5; margin: 32px 0 6px; }
.article p, .article li { color: var(--ink-2); font-size: 17px; line-height: 1.9; }
.article p { margin-top: 14px; }
.article ul, .article ol { margin-top: 12px; padding-left: 1.4em; list-style: disc; }
.article ol { list-style: decimal; }
.article li { margin: 6px 0; }
.article a { color: var(--navy-600); text-decoration: underline; text-underline-offset: 4px; }
.article img { border-radius: 10px; margin: 24px 0; }
.article figure { margin: 28px 0; }
.article figure img { margin: 0; width: 100%; height: auto; }
.article figcaption { margin-top: 8px; font-size: 14px; line-height: 1.6; color: var(--ink-3); }
.article table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 15px; }
.article th, .article td { border-bottom: 1px solid var(--line, #D5DCE8); padding: 10px 8px; text-align: left; vertical-align: top; line-height: 1.7; color: var(--ink-2); }
.article th { color: var(--navy-950); font-weight: 700; }
.article strong { color: var(--navy-950); }
.article .meta { margin-top: 12px; font-size: 14px; color: var(--ink-3); }
.contact-ways { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--rule); }
.contact-ways li { padding: 28px 28px 28px 0; }
.contact-ways li + li { padding-left: 28px; border-left: 1px solid var(--rule); }
.contact-ways .way-label { font-size: 16px; font-weight: 500; color: var(--ink-3); }
.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; }
.contact-ways p { margin-top: 6px; font-size: 22px; font-weight: 700; color: var(--navy-950); font-family: var(--latin); }
.filters { display: flex; gap: 8px; margin-bottom: 36px; }
.filters button { height: 44px; padding: 0 18px; border-radius: 6px; border: 1px solid var(--rule); background: #fff; font: inherit; font-size: 15px; color: var(--ink-2); cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--navy-600); border-color: var(--navy-600); color: #fff; }
.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 32px; }
.case-grid .case-img { height: 230px; }
.jobs li { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--rule); }
.jobs { border-top: 1px solid var(--rule); }
.jobs h3 { font-size: 20px; }
.jobs p { margin-top: 4px; font-size: 15px; color: var(--ink-3); }
@media (max-width: 860px) {
  .posts, .case-grid { grid-template-columns: 1fr; }
  .contact-ways { grid-template-columns: 1fr; }
  .contact-ways li, .contact-ways li + li { padding: 20px 0; border-left: 0; border-bottom: 1px solid var(--rule); }
  .article h1 { font-size: 30px; }
  .jobs li { flex-direction: column; align-items: start; }
}
.note-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; align-items: start; }
.note-row img { border-radius: 10px; box-shadow: 0 16px 32px -16px rgba(20,40,110,.3); background: #fff; }
.platforms { padding: 40px 0 8px; }
.platforms .wrap { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; }
.platforms h2 { font-size: 15px; font-weight: 500; color: var(--ink-3); flex: none; }
.plat-row { display: flex; flex-wrap: wrap; gap: 10px 32px; }
.plat-row span { font-family: var(--latin); font-size: 18px; font-weight: 600; color: #5A6680; }
@media (max-width: 860px) { .note-row { grid-template-columns: repeat(2, 1fr); } .platforms .wrap { gap: 14px; } .plat-row { gap: 8px 20px; } .plat-row span { font-size: 16px; } }
.svc-media > .photo, .case-img > .photo, .page-hero-media > .photo { height: 100%; border-radius: 0; }
.article { overflow-wrap: anywhere; }
.article table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin-top: 16px; font-size: 15px; }
.article th, .article td { border-bottom: 1px solid var(--rule); padding: 10px 14px 10px 0; text-align: left; }
.article pre { max-width: 100%; overflow-x: auto; }
.page-hero + .section { padding-top: 48px; }
@media (max-width: 860px) { .page-hero + .section { padding-top: 24px; } }
[hidden] { display: none !important; }
.nav > li > button.is-active { color: var(--navy-600); box-shadow: inset 0 -2px 0 var(--navy-600); }
.has-menu.open .menu { opacity: 1; visibility: visible; transform: none; }
.has-menu.open .caret { transform: rotate(180deg); }
body.nav-open { overflow: hidden; }
.menu-toggle[aria-expanded="true"] span { background: transparent; }
.menu-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }
.menu-toggle span::before, .menu-toggle span::after { transition: transform .2s, top .2s; }
.pending { color: var(--ink-3); font-size: 14px; }
@media (max-width: 860px) {
  .account { flex-wrap: wrap; row-gap: 4px; }
  .account .fans { margin-left: 70px; width: 100%; text-align: left; display: flex; gap: 16px; }
  .acct-table .account .fans { margin-left: 82px; }
}
.avatar-img { width: 56px; height: 56px; border-radius: 50%; flex: none; }
.acct-table .avatar-img { width: 64px; height: 64px; }
.covers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: start; }
.covers img { border-radius: 10px; box-shadow: 0 16px 32px -16px rgba(20,40,110,.3); }
.covers img:nth-child(2) { margin-top: 28px; }
.person .covers { height: auto; }
.qr-badge { position: absolute; left: 12px; bottom: 12px; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; background: #fff; border-radius: 10px; box-shadow: 0 10px 24px -10px rgba(15,27,61,.35); }
.qr-badge img { width: 72px; height: 72px; border-radius: 6px; }
.qr-badge span { font-size: 13px; line-height: 1.5; color: var(--ink); font-weight: 600; }
.page-hero-media .qr-badge img { width: 104px; height: 104px; }
.page-hero-media .qr-badge span { font-size: 15px; }
@media (max-width: 860px) { .qr-badge img { width: 64px; height: 64px; } .page-hero-media .qr-badge img { width: 80px; height: 80px; } }

.text-link { display: inline-flex; align-items: center; min-height: 44px; }
.contact-ways a { color: inherit; }
.contact-ways a:hover { color: var(--navy-600); }
/* Browser frame for real website screenshots */
.browser { border-radius: 10px; border: 1px solid #D5DCE8; background: #fff; overflow: hidden; box-shadow: 0 24px 48px -24px rgba(20,40,110,.4); }
.browser .bar { height: 26px; display: flex; align-items: center; gap: 6px; padding: 0 10px; background: #F1F4F9; border-bottom: 1px solid #E1E6EF; }
.browser .bar i { width: 9px; height: 9px; border-radius: 50%; background: #C9D1DE; }
.browser .bar span { margin-left: 10px; font-size: 12px; color: #5A6680; font-family: var(--latin); }
.browser img { width: 100%; display: block; }
.case-img .browser, .page-hero-media .browser { position: absolute; }
.gallery-web { display: grid; grid-template-columns: 1fr 1fr 220px; gap: 24px; align-items: start; }
.gallery-web figcaption { margin-top: 12px; font-size: 14px; color: var(--ink-3); text-align: center; }
.gallery-web .device { border-width: 5px; border-radius: 20px; }
@media (max-width: 860px) { .gallery-web { grid-template-columns: 1fr; } .gallery-web figure:last-child { max-width: 240px; margin: 0 auto; } }

/* ===== Hugo layout helpers (positions formerly inline in the prototype) ===== */
.dv-card .device { position: absolute; width: 140px; border-width: 5px; border-radius: 18px; }
.dv-card .device:nth-child(1) { left: 16%; top: 26px; }
.dv-card .device:nth-child(2) { left: 50%; top: 52px; }
.dv-hero .device { position: absolute; width: 172px; border-width: 6px; }
.dv-hero .device:nth-child(1) { left: 14%; top: 40px; }
.dv-hero .device:nth-child(2) { left: 50%; top: 84px; }
.case.big .dv-card .device { width: 190px; border-width: 6px; border-radius: 26px; }
.case.big .dv-card .device:nth-child(1) { left: 12%; top: 60px; }
.case.big .dv-card .device:nth-child(2) { left: 48%; top: 110px; }
.bw-card .browser { left: 8%; top: 22px; width: 84%; }
.bw-hero .browser { left: 5%; top: 36px; width: 78%; }
.bw-hero .device { position: absolute; width: 120px; right: 5%; top: 96px; border-width: 5px; border-radius: 18px; }
.case-grid .case-img, .related .case-img { height: 230px; }
.lang-switch { color: var(--ink-3); }
.lang-switch:hover { color: var(--navy-600); }
.qr-big { display: flex; gap: 20px; align-items: center; margin-top: 28px; }
.qr-big p { color: var(--ink-2); line-height: 1.7; }
.qr-big p strong { color: var(--ink); font-weight: 700; }
.qr-big img { width: 170px; height: auto; border-radius: 10px; border: 1px solid var(--rule); }
@media (max-width: 860px) {
  .dv-card .device, .case.big .dv-card .device { width: 120px; border-width: 4px; border-radius: 16px; }
  .dv-hero .device { width: 130px; border-width: 4px; border-radius: 16px; }
  .bw-hero .device { width: 96px; }
}
.brand .mark { color: var(--navy-600); }
.site-footer .brand .mark { color: #fff; }
.lang-badge { display: inline-block; margin-left: 8px; padding: 1px 8px; border: 1px solid var(--line, #D5DCE8); border-radius: 999px; font-size: 12px; line-height: 1.6; color: var(--ink-3); vertical-align: 1px; }

/* totvan.cn additions on top of stellarbyte-base.css (a verbatim copy of StellarByte assets/css/site.css).
   Rule: tokens and shared components come from the base file; only totvan-specific components live here. */

/* Text wordmark: TOTVAN has no graphic logo; the StellarByte mark is not reused (separate brand). */
.wordmark { gap: 10px; align-items: baseline; }
.wordmark b { font-family: var(--latin); font-size: 22px; font-weight: 700; letter-spacing: 0.04em; color: var(--navy-900); }
.wordmark span { font-size: 15px; font-weight: 500; color: var(--ink-3); letter-spacing: 0.08em; }
.site-footer .wordmark b { color: #fff; }
.site-footer .wordmark span { color: #B3BDD6; }
.site-footer .co a:hover, .site-footer .bottom a:hover { color: #fff; }
.site-footer .top { grid-template-columns: 1.6fr repeat(3, 1fr); }

/* Text-only hero: copy on the left, a quiet fact panel on the right (no placeholder imagery). */
.hero-plain .wrap { min-height: 520px; align-items: center; }
.hero-facts { align-self: center; background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 8px 28px; grid-template-columns: 96px 1fr; }
.hero-facts dt, .hero-facts dd { font-size: 15px; }
.hero-facts dt:last-of-type, .hero-facts dd:last-of-type { border-bottom: 0; }
.hero-facts { border-top: 1px solid var(--rule); }
.hero-badges { margin-top: 32px; }
.hero-badges li { background: #fff; font-weight: 600; color: var(--navy-700); border-color: var(--navy-200); }

/* DeepRest hero panel: the real sound list set as type */
.hero-panel { align-self: center; border-radius: 12px; background: var(--navy-100); padding: 36px; }
.sound-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.sound-cloud li { padding: 8px 16px; border-radius: 6px; background: #fff; color: var(--ink-2); font-size: 15px; line-height: 1.6; }
.sound-cloud li:nth-child(-n+4) { background: var(--navy-600); color: #fff; font-weight: 600; }

/* Numbered sound list */
.sound-grid { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--navy-200); }
.sound-grid li { display: flex; align-items: baseline; gap: 12px; padding: 18px 0; border-bottom: 1px solid var(--navy-200); font-size: 17px; color: var(--navy-950); font-weight: 500; }
.sound-grid .num { font-size: 14px; color: var(--navy-600); font-weight: 600; }

/* Prose without a leading gap when it sits next to a section title */
.prose p.first { margin-top: 0; }
.two-col .section-title { margin: 0; }

/* Product row on the home page */
.product-row { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; padding: 40px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.product-row h3 { font-size: 28px; line-height: 1.35; }
.product-row p { margin-top: 12px; color: var(--ink-2); max-width: 30em; }
.product-row .text-link { margin-top: 14px; }
.product-row:hover h3 { color: var(--navy-600); }
.product-tags { margin-top: 0; }

/* Outbound band to StellarByte: quiet, one line, no primary button */
.crosslink { border-top: 1px solid var(--rule); background: var(--navy-50); }
.crosslink .wrap { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding-top: 28px; padding-bottom: 28px; }
.crosslink p { color: var(--ink-2); font-size: 16px; }
.crosslink p b { color: var(--navy-950); margin-right: 14px; }
.crosslink .text-link { flex: none; }

/* Contact facts inside the CTA band */
.cta-facts { margin-top: 18px; display: grid; grid-template-columns: auto 1fr; gap: 6px 24px; font-size: 17px; }
.cta-facts dt { color: var(--on-navy-2); }
.cta-facts dd { color: #fff; }

/* Contact section on product pages */
.contact-section .section-title { margin-bottom: 36px; }
.contact-ways p { font-size: 20px; font-family: var(--sans); }

/* App hero (data assistant) */
.app-hero { grid-template-columns: 96px 1fr !important; gap: 32px !important; align-items: center; }
.app-icon { width: 96px; height: 96px; border-radius: 22px; }

/* Policy text */
.policy { max-width: 760px; margin: 0; }
.policy h2 { margin-top: 0; font-size: 32px; }
.policy h2 + p { font-size: 15px; color: var(--ink-3); }

@media (max-width: 860px) {
  .wordmark b { font-size: 20px; }
  .hero-plain .wrap { min-height: 0; gap: 28px; padding-bottom: 48px; }
  .hero-facts { padding: 4px 20px; grid-template-columns: 80px 1fr; }
  .hero-panel { padding: 24px; }
  .sound-grid { grid-template-columns: repeat(2, 1fr); column-gap: 20px; }
  .product-row { grid-template-columns: 1fr; gap: 24px; padding: 28px 0; }
  .product-row h3 { font-size: 24px; }
  .crosslink .wrap { flex-direction: column; align-items: start; gap: 4px; }
  .crosslink p b { display: block; margin: 0 0 4px; }
  .cta-facts { grid-template-columns: 1fr; gap: 0; }
  .cta-facts dd { margin-bottom: 10px; }
  .site-footer .top { grid-template-columns: 1fr 1fr; }
  .app-hero { grid-template-columns: 64px 1fr !important; gap: 20px !important; }
  .app-icon { width: 64px; height: 64px; border-radius: 16px; }
  .policy h2 { font-size: 26px; }
}

/* ===== Brand kit (2026-11-13): mark in header/footer, product icons, WeChat share image ===== */
.wordmark { align-items: center; }
.wordmark .mark { width: 30px; height: 30px; color: var(--navy-600); flex: none; margin-right: 2px; }
.site-footer .wordmark .mark { color: #fff; }
.wordmark .app-mark { width: 32px; height: 32px; border-radius: 8px; flex: none; }
.wordmark b.cn { font-family: var(--sans); letter-spacing: 0.04em; }
.product-id { display: flex; gap: 24px; align-items: flex-start; }
.product-id img { width: 72px; height: 72px; border-radius: 16px; flex: none; }
.wx-share { display: none; }
@media (max-width: 860px) {
  .wordmark .mark { width: 26px; height: 26px; }
  .product-id img { width: 56px; height: 56px; border-radius: 13px; }
}

/* ===== /brand/ review page (local preview only) ===== */
.brand-mark-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.bm-cell { height: 280px; border: 1px solid var(--rule); border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.bm-cell img { width: 150px; height: 150px; }
.bm-cell.dark { background: var(--navy-950); border-color: var(--navy-950); }
.bm-cell.tile { background: var(--navy-50); }
.bm-cell.tile img { width: 180px; height: 180px; }
.brand-sub { margin: 56px 0 20px; font-size: 22px; }
.lockups { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.lk { height: 180px; border-radius: 12px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--rule); padding: 0 48px; }
.lk img { height: 52px; width: auto; max-width: 100%; }
.lk.dark { background: var(--navy-950); border-color: var(--navy-950); }
.lk.blue { background: var(--navy-600); border-color: var(--navy-600); }
.rules { margin-top: 32px; border-top: 1px solid var(--rule); }
.rules li { padding: 14px 0 14px 22px; border-bottom: 1px solid var(--rule); position: relative; color: var(--ink-2); font-size: 16px; }
.rules li::before { content: ""; position: absolute; left: 0; top: 1.4em; width: 10px; height: 10px; background: var(--navy-600); border-radius: 2px; }
.section-lead code { font-size: 15px; background: #fff; border: 1px solid var(--rule); border-radius: 4px; padding: 1px 6px; }
.options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.opt { background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 28px; }
.opt-sizes { display: flex; align-items: flex-end; gap: 18px; }
.opt-sizes img:first-child { width: 128px; height: 128px; }
.opt-mark { width: 88px; height: 88px; margin-top: 24px; }
.opt figcaption { margin-top: 18px; font-weight: 600; color: var(--navy-950); }
.opt:first-child { border: 2px solid var(--navy-600); }
.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 24px; }
.swatches li { display: flex; flex-direction: column; gap: 2px; font-size: 15px; color: var(--ink-3); }
.swatches .sw { height: 108px; border-radius: 10px; border: 1px solid var(--rule); display: flex; align-items: flex-end; padding: 12px 14px; margin-bottom: 10px; font-size: 14px; }
.swatches b { color: var(--navy-950); font-size: 16px; }
.type-specimens { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.ts { background: #fff; border-radius: 12px; padding: 32px; }
.ts-name { font-size: 14px; color: var(--ink-3); }
.ts-latin { font-family: var(--latin); font-weight: 700; font-size: 64px; line-height: 1.2; color: var(--navy-950); margin-top: 12px; letter-spacing: 0.04em; }
.ts-cn { font-weight: 700; font-size: 44px; line-height: 1.35; color: var(--navy-950); margin-top: 18px; }
.ts-use { margin-top: 14px; font-size: 15px; color: var(--ink-2); }
.tabs-mock { display: flex; gap: 2px; background: #DEE1E6; padding: 8px 8px 0; border-radius: 10px 10px 0 0; }
.tab { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 8px 8px 0 0; padding: 9px 14px; font-size: 13px; color: #202124; min-width: 0; flex: 1; }
.tab:not(:first-child) { background: #EDEFF2; }
.tab span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tab img { flex: none; }
.homescreen { margin-top: 32px; display: flex; align-items: flex-start; gap: 28px; padding: 32px; border-radius: 12px; background: linear-gradient(160deg, #CFDCFF 0%, #A9C0FF 100%); flex-wrap: wrap; }
.homescreen figure { width: 92px; text-align: center; }
.homescreen img { width: 76px; height: 76px; border-radius: 18px; margin: 0 auto; }
.homescreen figcaption { margin-top: 6px; font-size: 13px; color: #fff; text-shadow: 0 1px 2px rgba(15,27,61,.5); line-height: 1.4; }
.homescreen-note { align-self: center; margin-left: auto; color: var(--navy-950); font-size: 14px; }
.og-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.og-grid img { border-radius: 10px; border: 1px solid var(--rule); }
.wx-cards { display: flex; gap: 24px; flex-wrap: wrap; background: #EDEDED; padding: 28px; border-radius: 12px; }
.wx-card { width: 300px; background: #fff; border-radius: 6px; padding: 12px 14px; }
.wx-card b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 15px; font-weight: 500; line-height: 1.45; color: #191919; }
.wx-card div { display: flex; gap: 10px; margin-top: 8px; }
.wx-card p { flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; line-height: 1.5; color: #8A8A8A; }
.wx-card img { width: 56px; height: 56px; flex: none; }
@media (max-width: 860px) {
  .brand-mark-row, .lockups, .options, .type-specimens, .og-grid { grid-template-columns: 1fr; }
  .bm-cell { height: 200px; }
  .swatches { grid-template-columns: 1fr 1fr; }
  .tabs-mock { flex-direction: column; border-radius: 10px; padding: 8px; gap: 6px; }
  .tab { border-radius: 8px; }
  .ts-latin { font-size: 44px; } .ts-cn { font-size: 32px; }
}

/* ke.totvan.cn components, on top of stellarbyte-base.css + totvan.css (same tokens, same type). */

body.ke { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
body.ke > main { flex: 1; }
.dev-bar { background: var(--navy-950); color: #C9D3EA; font-size: 13px; line-height: 1.5; padding: 6px 20px; text-align: center; }
.dev-bar a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.dev-note { padding: 10px 14px; border: 1px dashed var(--action); border-radius: 6px; color: var(--action); font-size: 14px; }

/* Header: brand + account menu only */
.ke-header .wrap { justify-content: space-between; }
.user-menu { position: relative; }
.user-menu summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border: 1px solid var(--rule); border-radius: 6px; cursor: pointer; color: var(--ink-2); font-size: 15px; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu[open] summary .caret { transform: rotate(180deg); }
.user-menu:not([open]) .user-menu-list { display: none; }
.user-menu-list { position: absolute; right: 0; top: calc(100% + 8px); min-width: 180px; background: #fff; border: 1px solid var(--rule); border-radius: 10px; box-shadow: 0 24px 48px -16px rgba(15,23,42,.18); padding: 8px; z-index: 50; }
.user-menu-list a, .user-menu-list button { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0 12px; border-radius: 6px; font: inherit; font-size: 15px; color: var(--ink); background: none; border: 0; cursor: pointer; text-align: left; }
.user-menu-list a:hover, .user-menu-list button:hover { background: var(--navy-50); }
.user-menu-list form { border-top: 1px solid var(--rule); margin-top: 6px; padding-top: 6px; }

/* Footer: one line, legally required items */
.ke-footer { border-top: 1px solid var(--rule); font-size: 14px; color: var(--ink-3); }
.ke-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; padding-top: 20px; padding-bottom: 20px; }
.ke-footer nav { display: flex; gap: 20px; margin-right: auto; }
.ke-footer a:hover { color: var(--navy-600); }

/* Auth-style centred pages (login, redeem, states) */
.auth { padding: 72px 20px 88px; background: linear-gradient(180deg, #EAF0FF 0%, #F7F9FF 70%, #fff 100%); flex: 1; }
.auth-card { max-width: 440px; margin: 0 auto; background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 40px; }
.auth-card h1 { font-size: 32px; line-height: 1.3; }
.auth-lead { margin-top: 10px; color: var(--ink-2); font-size: 16px; }
.auth-foot { max-width: 440px; margin: 20px auto 0; font-size: 14px; color: var(--ink-3); text-align: center; }
.auth-foot a { color: var(--navy-600); }
.form { margin-top: 28px; display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field > span:first-child { font-size: 14px; color: var(--ink-3); font-weight: 500; }
.field input { width: 100%; height: 50px; padding: 0 14px; border: 1px solid #B8C2D3; border-radius: 6px; font: inherit; font-size: 17px; color: var(--ink); background: #fff; }
.field input:focus { outline: 2px solid var(--navy-600); outline-offset: 1px; border-color: var(--navy-600); }
.field input::placeholder { color: #8A94A8; }
.field-row { display: flex; gap: 10px; }
.field-row input { flex: 1; min-width: 0; }
.btn-code { height: 50px; padding: 0 16px; flex: none; min-width: 120px; }
.btn-code:disabled { color: var(--ink-3); border-color: var(--rule); cursor: default; }
.field-hint { font-size: 14px; color: var(--ink-3); line-height: 1.6; margin-top: -8px; }
.field-hint.is-error { color: var(--action); }
.code-input { font-family: var(--latin) !important; letter-spacing: 0.12em; text-transform: uppercase; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); line-height: 1.6; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--navy-600); flex: none; }
.check a { color: var(--navy-600); }
.btn-block { width: 100%; }
.form-error { margin-top: 20px; padding: 12px 14px; border-radius: 6px; background: #FFF1EA; color: #8A2E05; font-size: 15px; border: 1px solid #F6C9B3; }
.state-card { text-align: left; }
.state-course { font-size: 14px; color: var(--ink-3); margin-bottom: 12px; }
.state-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

/* Plain pages */
.ke-page { padding: 56px 0 96px; }
.ke-page-head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-bottom: 32px; }
.ke-page-head h1 { font-size: 36px; }

/* My courses */
.course-list { border-top: 1px solid var(--rule); }
.course-row { display: grid; grid-template-columns: 168px 1fr auto; gap: 32px; align-items: center; padding: 28px 0; border-bottom: 1px solid var(--rule); }
.course-cover { aspect-ratio: 4 / 3; border-radius: 10px; background: var(--navy-600); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.course-cover .mark { width: 44px; height: 44px; }
.course-cover span { font-size: 14px; letter-spacing: 0.1em; }
.course-row.is-off .course-cover { background: #8C99B0; }
.course-brand { font-size: 14px; color: var(--ink-3); }
.course-body h2 { font-size: 24px; line-height: 1.4; margin-top: 2px; }
.course-sub { margin-top: 6px; font-size: 15px; color: var(--ink-2); max-width: 34em; }
.progress { margin-top: 16px; height: 6px; border-radius: 3px; background: var(--navy-100); overflow: hidden; max-width: 360px; }
.progress span { display: block; height: 100%; background: var(--navy-600); border-radius: 3px; }
.course-meta { margin-top: 8px; font-size: 14px; color: var(--ink-3); }
.course-meta.state-expired, .course-meta.state-revoked { color: var(--action); }
.course-action { text-align: right; }
.course-next { margin-top: 8px; font-size: 14px; color: var(--ink-3); max-width: 16em; }
.empty { padding: 64px 0; border-top: 1px solid var(--rule); }
.empty h2 { font-size: 24px; }
.empty p { margin: 8px 0 24px; color: var(--ink-2); }

/* Player page */
.player-page { padding: 28px 0 88px; }
.player-page .crumbs a { color: var(--ink-3); }
.player-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; }
.player { position: relative; aspect-ratio: 16 / 9; background: #0B1020; border-radius: 10px; overflow: hidden; }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #0B1020; }
.wm { position: absolute; pointer-events: none; color: rgba(255,255,255,.42); text-shadow: 0 0 3px rgba(0,0,0,.45); font-family: var(--latin); font-size: 15px; letter-spacing: .06em; white-space: nowrap; transition: left 3s ease, top 3s ease; z-index: 2; user-select: none; }
.player-overlay { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; background: rgba(11,16,32,.94); color: #fff; }
.player-overlay[data-overlay="loading"] { background: #0B1020; }
.player-overlay p { color: #C9D3EA; font-size: 15px; }
.player-overlay .ov-title { color: #fff; font-size: 20px; font-weight: 700; line-height: 1.5; }
.player-overlay .ov-kicker { font-size: 14px; color: #9FB4FF; }
.player-overlay .ov-text { max-width: 26em; }
.ov-actions .btn-ghost-light { background: transparent; }
.ov-actions { display: flex; gap: 12px; margin-top: 10px; flex-wrap: wrap; justify-content: center; }
.spinner { width: 32px; height: 32px; border-radius: 50%; border: 3px solid rgba(255,255,255,.2); border-top-color: #fff; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.lesson-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding: 24px 0 0; }
.lesson-no { font-size: 14px; color: var(--ink-3); }
.lesson-head h1 { font-size: 28px; line-height: 1.4; margin-top: 4px; }
.lesson-status { margin-top: 6px; font-size: 15px; color: var(--navy-700); font-weight: 500; }
.lesson-nav { display: flex; gap: 10px; flex: none; padding-top: 4px; }

.lesson-side { border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; }
.ll-head { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 20px 14px; border-bottom: 1px solid var(--rule); }
.ll-head h2 { font-size: 18px; }
.ll-head > span { font-size: 14px; color: var(--ink-3); }
.lesson-list { position: relative; max-height: 440px; overflow-y: auto; }
.lesson-list li + li { border-top: 1px solid #EEF1F6; }
.lesson-list a, .lesson-list .is-processing { position: relative; display: grid; grid-template-columns: 18px 28px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 56px; padding: 10px 20px; font-size: 15px; line-height: 1.5; color: var(--ink); }
.lesson-list a:hover { background: var(--navy-50); }
.lesson-list .is-processing { color: var(--ink-3); }
.ll-no { color: var(--ink-3); font-size: 14px; }
.ll-time { color: var(--ink-3); font-size: 14px; }
.ll-mark { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #B8C2D3; }
.lesson-list li.is-done .ll-mark { border: 0; background: var(--navy-600) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.3 2.3 4.7-5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }
.lesson-list li.is-done .ll-title { color: var(--ink-2); }
.lesson-list li.is-current a { background: var(--navy-50); color: var(--navy-700); font-weight: 600; }
.lesson-list li.is-current a::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 2px 2px 0; background: var(--navy-600); }
.lesson-list li.is-current .ll-mark { border-color: var(--navy-600); background: radial-gradient(circle, var(--navy-600) 0 4px, transparent 4.5px); }
.lesson-list li.is-current.is-done .ll-mark { background: var(--navy-600) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.3 2.3 4.7-5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }
.materials { border-top: 1px solid var(--rule); padding: 16px 20px 8px; }
.materials h2 { font-size: 16px; margin-bottom: 6px; }
.materials a { display: flex; align-items: center; gap: 10px; min-height: 48px; font-size: 15px; color: var(--ink); }
.materials a span:first-child { flex: 1; }
.materials a .num { font-size: 13px; color: var(--ink-3); }
.materials a b { font-weight: 600; color: var(--navy-600); font-size: 14px; }
.materials a:hover b { text-decoration: underline; text-underline-offset: 4px; }
.course-foot { padding: 14px 20px; border-top: 1px solid var(--rule); font-size: 13px; color: var(--ink-3); background: var(--navy-50); }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 12px); opacity: 0; z-index: 60; display: flex; align-items: center; gap: 16px; padding: 12px 18px; border-radius: 8px; background: var(--navy-950); color: #fff; font-size: 15px; box-shadow: 0 16px 32px -12px rgba(15,27,61,.5); transition: opacity .18s, transform .18s; max-width: calc(100vw - 32px); }
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.toast button { background: none; border: 0; color: #9FB4FF; font: inherit; font-weight: 600; cursor: pointer; padding: 6px 0; min-height: 32px; white-space: nowrap; }

/* Dev index */
.dev-index h1 { font-size: 32px; }
.dev-index h2 { font-size: 20px; margin: 40px 0 14px; }
.dev-personas { border-top: 1px solid var(--rule); }
.dev-personas li { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.dev-personas b { margin-right: 12px; color: var(--navy-950); }
.dev-personas p { font-size: 14px; color: var(--ink-3); }
.dev-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.dev-table th, .dev-table td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.dev-table th { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.dev-table a { color: var(--navy-600); }
.dev-codes { display: flex; gap: 12px; flex-wrap: wrap; }
.dev-codes li { padding: 8px 14px; border: 1px solid var(--rule); border-radius: 6px; font-size: 16px; letter-spacing: .06em; user-select: all; }
.dev-reset { margin-top: 40px; }
.dev-index code { font-size: 14px; background: var(--navy-50); padding: 1px 6px; border-radius: 4px; }

.policy h1 { font-size: 36px; line-height: 1.3; }
.policy .meta { margin-top: 10px; }
.policy .dev-note { margin-bottom: 20px; }

@media (max-width: 860px) {
  .auth { padding: 32px 16px 56px; }
  .auth-card { padding: 28px 22px; }
  .auth-card h1 { font-size: 28px; }
  .ke-page { padding: 32px 0 64px; }
  .ke-page-head h1 { font-size: 28px; }
  .course-row { grid-template-columns: 88px 1fr; gap: 16px 18px; align-items: start; }
  .course-cover { border-radius: 8px; gap: 4px; }
  .course-cover .mark { width: 28px; height: 28px; }
  .course-cover span { font-size: 11px; }
  .course-body h2 { font-size: 19px; }
  .course-action { grid-column: 1 / -1; text-align: left; display: flex; align-items: center; gap: 14px; }
  .course-action .btn { flex: none; }
  .course-next { margin: 0; }
  /* Player: full-bleed video pinned under the top edge while the list scrolls */
  .page-player .site-header { position: static; }
  .player-page { padding-top: 0; }
  .player-page .crumbs { display: none; }
  .player-layout { grid-template-columns: 1fr; gap: 20px; }
  .player-main { display: contents; }
  .player { margin: 0 -20px; border-radius: 0; position: sticky; top: 0; z-index: 20; }
  .lesson-head { flex-direction: column; gap: 14px; padding-top: 16px; }
  .lesson-head h1 { font-size: 22px; }
  .lesson-nav { width: 100%; }
  .lesson-nav .btn { flex: 1; }
  .lesson-list { max-height: none; }
  .ke-footer nav { margin-right: 0; width: 100%; }
  .toast { bottom: 16px; width: calc(100vw - 32px); justify-content: space-between; }
  .dev-personas li { flex-direction: column; align-items: start; }
}

/* Header wordmark: never wrap "课堂" */
.ke-header .wordmark span, .ke-header .wordmark b { white-space: nowrap; }
@media (max-width: 860px) {
  .user-menu summary { padding: 0 10px; font-size: 14px; }
}
