/* UI refinement layer, loaded last.
   Sets a readable type floor (Chinese text ≥ 12px, Latin mono labels ≥ 10px),
   lifts low-contrast captions, and slims the header. Layout and visuals are unchanged. */
:root {
  --muted: #5b6760;
  --caption: #5d6961;
  --header-h: 80px;
}
html { scroll-padding-top: calc(var(--header-h) + 12px); }
body { text-rendering: optimizeLegibility; }

/* Header */
.site-header { height: var(--header-h); }
.brand-type strong { font-size: 22px; }
.brand-type > span { font-size: 9px; letter-spacing: .14em; }
.desktop-nav { gap: 40px; position: static; transform: none; margin-left: auto; }
.desktop-nav a { font-size: 14px; letter-spacing: .04em; }

/* Shared type */
.mono { font-size: 11px; }
.eyebrow { font-size: 12px; color: var(--muted); }
.button { font-size: 14px; letter-spacing: .03em; }
.text-link { font-size: 13px; }
.section-kicker, .section-kicker .index, .approach-intro .section-kicker { font-size: 13px; }
.section-kicker .mono, .section-kicker > .mono { font-size: 10px; color: var(--caption); }
.section-heading > p { font-size: 15px; line-height: 1.85; }
.breadcrumb { font-size: 13px; }

/* Immersive hero */
.hero.hero-immersive { height: calc(100svh - var(--header-h)); }
.hero-immersive .hero-eyebrow { font-size: 13px; letter-spacing: .14em; }
.hero-immersive .hero-copy > p { font-size: 17px; line-height: 1.9; letter-spacing: .04em; color: #cfdbd4; }
.hero-immersive .hero-actions .button { font-size: 14px; }
.hero-capability .mono { font-size: 10px; color: #a9c2b4; }
.hero-capability strong { font-size: 16px; }
.hero-capability small { font-size: 12px; color: #b0c6b9; margin-top: 8px; }
.hero-immersive .scroll-link { font-size: 12px; color: #b8cdbf; }
.hero-immersive .hero-visual-note { font-size: 11px; letter-spacing: .14em; }

/* About */
.about-copy > p:not(.lead) { font-size: 15px; line-height: 1.95; color: var(--muted); }
.fact-top { font-size: 10px; color: var(--caption); }
.fact > span:last-child { font-size: 13px; }

/* Expertise */
.orbit-core .mono { font-size: 10px; }
.orbit-node { font-size: 13px; }
.orbit-note { font-size: 10px; }
.diagram-label { font-size: 12px; }
.service-no { font-size: 11px; }
.service summary small { font-size: 10px; }
.service-body p { font-size: 15px; line-height: 1.9; }
.service-tags span { font-size: 12px; }
.service-link { font-size: 13px; }

/* Products */
.project-card > p, .product-card p { font-size: 14px; line-height: 1.85; color: var(--muted); }
.product-meta { font-size: 12px; }
.project-art-top, .art-note, .project-view { font-size: 10px; }
.image-caption { font-size: 11px; color: var(--muted); }
.concept-caption { font-size: 11px; }
.concept-label { font-size: 10px; }
.library-count { font-size: 13px; }
.library-count .mono { font-size: 10px; }

/* Approach and news */
.approach-steps .mono { font-size: 10px; color: var(--caption); }
.approach-steps p { font-size: 14px; line-height: 1.8; }
.insights-note { font-size: 13px; }
.news-date, .news-meta { font-size: 12px; }
.news-item p { font-size: 14px; line-height: 1.8; }
.news-item .eyebrow { font-size: 12px; }

/* Contact and footer */
.contact-top > .mono { font-size: 10px; }
.contact-orb > small { font-size: 12px; color: #101916; }
.contact-details .eyebrow { font-size: 12px; }
.contact-details p, .contact-details > div:last-child p { font-size: 15px; }
.copy-address { font-size: 12px; }
.site-footer, .site-footer > span, .site-footer button, .site-footer > div a { font-size: 12px; }
.footer-brand .mono { font-size: 10px; }

/* Dialogs and forms */
.dialog-head .mono { font-size: 11px; }
.dialog-content .source-note, .dialog-content .form-note, .dialog-facts span { font-size: 12px; }
form label { font-size: 13px; }
input, textarea, select { font-size: 15px; }
.consent, .form-error { font-size: 13px; }
.toast { font-size: 14px; }
.mobile-menu nav a small { font-size: 11px; }
.mobile-menu > p { font-size: 10px; }

/* Online experience */
.visual-label { font-size: 10px; color: var(--muted); }
.visual-annotation { font-size: 11px; color: var(--muted); }
.prompt-composition small { font-size: 11px; }
.prompt-composition > span { font-size: 12px; }
.experience-card-top, .demo-access-label { font-size: 11px; }
.experience-card-copy .text-link { font-size: 13px; }
.experience-footnote { font-size: 13px; color: var(--muted); }
.panel-label, .demo-small-button, .demo-media-foot, .demo-media-foot .text-link { font-size: 12px; }
.gate-coordinate { font-size: 10px; }
.gate-copy > .mono, .result-heading .mono, .demo-notes > .mono { font-size: 10px; }
.gate-copy p, .gate-form > p, .demo-upload-empty p, .result-empty p { font-size: 14px; }
.gate-form label, .demo-controls label { font-size: 13px; }
.demo-controls label > span, .demo-presets button, .demo-source-switch button i { font-size: 12px; }
.demo-field-help, .demo-run-note p, .demo-notes > p, .demo-upload-empty small, .demo-smallprint { font-size: 12px; }
.demo-password-wrap button, .gate-contact, .gate-contact .text-link, .demo-notes .text-link { font-size: 12px; }
.demo-session-bar, .demo-session-bar button, .demo-cancel { font-size: 13px; }
.decision-result small, .decision-result .condition-echo { font-size: 12px; }
.camera-controls > label { font-size: 12px; }
.camera-controls p, .camera-live-badge, .camera-analysis-status { font-size: 11px; }

/* Product photos: background set from the image edge by site.js */
.product-photo.is-matted img { mix-blend-mode: normal; }

@media (max-width: 900px) {
  :root { --header-h: 68px; }
  .desktop-nav a { font-size: 13px; }
  .desktop-nav { gap: 28px; }
  .hero-immersive .hero-eyebrow { font-size: 12px; }
  .hero-immersive .hero-copy > p { font-size: 16px; }
}

@media (max-width: 680px) {
  :root { --header-h: 64px; }
  .brand-type strong { font-size: 20px; }
  .brand-type > span { font-size: 8px; }
  .section-kicker > .mono, .contact-top > .mono, .hero-immersive .hero-visual-note { display: none; }
  .hero.hero-immersive { height: 760px; }
  .hero-immersive .hero-copy { padding-top: 48px; }
  .hero-immersive .hero-eyebrow { font-size: 12px; letter-spacing: .1em; }
  .hero-immersive .hero-copy > p { font-size: 15px; line-height: 1.85; letter-spacing: .02em; }
  .hero-immersive .hero-actions .button { font-size: 14px; padding-inline: 18px; }
  .hero-capability strong { font-size: 14px; }
  .hero-capability small { font-size: 11px; margin-top: 6px; }
  .button, .text-link { font-size: 14px; }
  .section-kicker, .section-kicker .index { font-size: 12px; }
  .section-heading > p, .project-card > p, .product-card p, .approach-steps p, .news-item p { font-size: 14px; }
  .about-copy > p:not(.lead), .service-body p { font-size: 15px; }
  .fact-top { font-size: 10px; }
  .fact > span:last-child, .fact:nth-child(3) > span:last-child { font-size: 12px; }
  .contact-orb > small { font-size: 10px; letter-spacing: 0; white-space: nowrap; }
  .site-footer, .site-footer > span, .site-footer button, .site-footer > div a { font-size: 12px; }
  /* 16px keeps iOS Safari from zooming into focused fields */
  input, textarea, select, input::placeholder, textarea::placeholder { font-size: 16px; }
  .dialog-content p, .dialog-content ul, .dialog-content .form-intro { font-size: 14px; }
  .experience-footnote, .demo-session-bar, .demo-session-bar button { font-size: 12px; }
}

/* Online experience: keep the demo card inside the first screen. The page title is a single line,
   and the large 01 / 02 counter is dropped because the tabs below already show it. */
.demo-page { padding-top: 24px; }
.demo-page .breadcrumb { margin-bottom: 0; }
.demo-heading { margin: 28px 0 22px; }
.demo-heading .section-kicker { margin-bottom: 12px; }
.demo-heading h1 { font-size: clamp(32px, 3.2vw, 46px); line-height: 1.25; }
.demo-heading h1 br { display: none; }
.demo-heading > div > p { margin-top: 10px; font-size: 14px; }
.demo-edition { display: none; }
.demo-tabs { margin-bottom: 20px; }
.demo-tabs > a { padding-block: 15px; }
.demo-gate { min-height: 0; }
.gate-art { min-height: 380px; }
.gate-form { padding: 34px clamp(28px, 4vw, 56px); }
.gate-form h2 { font-size: 26px; margin: 10px 0 12px; }
.gate-form > p { margin-bottom: 18px; }
@media (max-width: 750px) {
  .demo-heading { margin: 20px 0 16px; }
  .demo-heading h1 { font-size: 30px; }
  .demo-tabs { margin-bottom: 16px; }
  .demo-heading h1 br { display: inline; }
  .demo-tabs > a { white-space: nowrap; margin-right: 22px; padding-right: 0; }
  .demo-tabs > a > i, .demo-access-label { display: none; }
  .gate-art { display: none; }
  .gate-form { padding: 26px 22px; }
  .gate-form h2 { font-size: 24px; }
}

/* Unlocked workspace: collapse the page intro and tighten the chrome so the
   preview and the start button sit in the first screen. */
.demo-page:has(#demo-workspace:not([hidden])) .demo-heading { margin: 14px 0 12px; }
.demo-page:has(#demo-workspace:not([hidden])) .demo-heading .section-kicker,
.demo-page:has(#demo-workspace:not([hidden])) .demo-heading > div > p { display: none; }
.demo-page:has(#demo-workspace:not([hidden])) .demo-heading h1 { font-size: clamp(26px, 2.4vw, 34px); }
.demo-page:has(#demo-workspace:not([hidden])) .demo-tabs { margin-bottom: 0; }
.demo-session-bar { padding: 12px 0; }
.demo-source-switch { margin: 0 0 14px; }
.demo-source-switch button { padding: 13px 22px; font-size: 14px; }
.demo-media { padding: 18px; }
.camera-controls { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 16px; padding: 12px 16px; }
.camera-controls > label { margin: 0; }
.camera-controls > p { grid-column: 1 / -1; justify-self: start; }
.camera-controls > p { margin-top: 6px; }
.demo-preview { margin-top: 14px; min-height: 320px; }
.demo-controls { padding: 20px 26px; }
.demo-controls > .panel-label { margin-bottom: 18px; }
@media (max-width: 750px) {
  .demo-source-switch button { padding: 12px 14px; font-size: 13px; }
  .camera-controls { display: block; padding: 16px; }
  .camera-controls > label { margin-bottom: 8px; }
  .demo-media { padding: 14px; }
  .demo-preview { min-height: 240px; }
  .demo-controls { padding: 20px; }
}

/* Homepage experience section: both cards fit below the heading after a nav jump. */
@media (min-width: 751px) {
  .experience-home .section-kicker { margin-bottom: 28px; }
  .experience-home .section-heading { margin-bottom: 32px; }
  .experience-card-visual { height: 230px; }
  .experience-card-copy { padding: 22px 30px 24px; }
  .experience-card-copy p { margin: 10px 0 16px; }
}

/* Generated inline images: the label is set by the renderer and cannot be edited away. */
.article-image.is-ai figcaption { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border: 1px solid #c9d4c6; border-radius: 3px; font-size: 12px; color: #4f5d55; }
.article-image.is-ai figcaption::before { content: "AI"; font: 600 10px/1 "Courier New", monospace; letter-spacing: .06em; color: #d94e30; }

/* Keep the original workbench proportions when a stream or upload arrives.
   Intrinsic video/canvas dimensions must never contribute to grid sizing. */
.demo-workbench { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.demo-controls { min-width: 0; }
.demo-preview { position: relative; flex: 0 0 auto; height: clamp(320px, 25vw, 480px); }
.demo-preview > video, .demo-preview > canvas,
.demo-preview .camera-live-stage { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; aspect-ratio: auto; }
.demo-preview video, .demo-preview canvas { object-fit: contain; }
.demo-preview .camera-live-stage video, .demo-preview .camera-live-stage canvas { object-fit: cover; }
.demo-media-foot #stop-camera { margin: 0 0 0 auto; flex-shrink: 0; align-self: center; }
.camera-controls > div { min-width: 0; }
@media (max-width: 1100px) {
  .demo-workbench { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
}
@media (max-width: 750px) {
  .demo-workbench { grid-template-columns: minmax(0, 1fr); }
  .demo-preview { height: clamp(240px, 56.25vw, 360px); }
  .demo-camera-empty { padding: 20px; }
}
