/* Shared presentation for the public studio. Keep the exhibition rooms' artwork intact. */
@font-face {
  font-family: "CN Studio";
  src: url("/assets/fonts/dm-sans-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "CN Studio Arabic";
  src: url("/assets/fonts/noto-sans-arabic-cn.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --cn-type: "CN Studio", "CN Studio Arabic", system-ui, sans-serif;
  --cn-canvas: #f4f7fa;
  --cn-surface: #fff;
  --cn-ink: #14263a;
  --cn-muted: #465b70;
  --cn-line: #cbd6e0;
  --cn-action: #124fb4;
  --cn-mist: #e8f1f8;
  --cn-night: #11263e;
  --cn-on-night: #f7fbff;
  --cn-sky: #acddff;
  --cn-hero: linear-gradient(112deg, #10253e 12%, #193b54 70%, #205168);
  --cn-button-radius: .75rem;
  --cn-media-radius: clamp(.75rem, 1.5vw, 1.25rem);
  --studio-ink: var(--cn-ink);
  --studio-paper: var(--cn-surface);
  --studio-rule: var(--cn-line);
  --studio-sans: var(--cn-type);
}
html[dir="rtl"] {
  --cn-type: "CN Studio Arabic", "CN Studio", Tahoma, sans-serif;
  --cn-hero: linear-gradient(248deg, #10253e 12%, #193b54 70%, #205168);
  --studio-sans: var(--cn-type);
}

/* Shape photographs, posters and action controls; leave calibrated graphics and turntables to their viewers. */
body main :is(figure img, .room > img, .indigo-screen),
body main :is(.sophia-screens, .jun-specimen, .gz-card, .home-feature-media, .nf-figure, .showroom-cover-image,
  .home-hero-figure, .home-work-item, .nb-trio, .lab-grid, .open-kit, .product-visual, .c5-film-launch,
  .oblique-native-launch) img {
  border-radius: var(--cn-media-radius);
}
body main :is(.turntable-stage, .tt-model-stage, .atlas-viewer, .aperture-lab, .oblique-player) img {
  border-radius: 0;
}
body main :is(button:not([role="switch"]), input[type="button"], input[type="submit"], a.primary, .btn, .button,
  .sg-button, .nb-button, .sm-button, .showroom-primary, .atlas-primary, .tt-explore, .lf-button, .jun-button,
  .home-primary, .c5-film-launch, .oblique-native-launch),
body :is(.sm-way-step, .sm-way-doors a, .studio-menu[open] > nav, .menu[open] > nav) {
  border-radius: var(--cn-button-radius);
}
body main :is(.home-primary, .lf-button, .jun-button, .atlas-primary, .showroom-primary):focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}
body .sm-way {
  --sm-paper: var(--cn-surface);
  --sm-soft: var(--cn-mist);
  --sm-line: var(--cn-line);
  --sm-ink: var(--cn-ink);
  --sm-dim: var(--cn-muted);
  --sm-green: #44678a;
  --sm-sans: var(--cn-type);
  --sm-serif: var(--cn-type);
}
body .sm-way-step b { font-weight: 600; }
body .studio-footer-bar { background: var(--cn-mist); color: var(--cn-ink); }
body .studio-mast a:hover, body .studio-mast a[aria-current] { text-decoration-color: var(--cn-action); }
body .studio-menu[open] > nav { border: 1px solid var(--cn-line); }
body.studio-collection .showroom-cover-image, body main .jun-specimen { border-radius: var(--cn-media-radius); }
body main .room { border-radius: var(--cn-media-radius); }
body main .room .actions > a:not(.primary) {
  display: inline-flex;
  align-items: center;
  min-height: 2.8rem;
  padding: .45rem .85rem;
  border: 1px solid currentColor;
  border-radius: var(--cn-button-radius);
  text-decoration: none;
}
body main .room .actions > a:not(.primary):hover { text-decoration: underline; }
body:has(main > .rooms) {
  --paper: var(--cn-canvas);
  --ink: var(--cn-ink);
  --rule: var(--cn-line);
  --muted: var(--cn-muted);
  --serif: var(--cn-type);
}
body:has(main > .rooms) .intro h1 { font-weight: 650; }
body .sg, body .sg-door {
  --sg-paper: var(--cn-canvas);
  --sg-soft: var(--cn-mist);
  --sg-ink: var(--cn-ink);
  --sg-dim: var(--cn-muted);
  --sg-line: var(--cn-line);
  --sg-sans: var(--cn-type);
  --sg-serif: var(--cn-type);
}
body .sg :is(.sg-goals,.sg-eq,.sg-key), body .sg-pager a { border-radius: var(--cn-button-radius); }
body .sg .sg-head h1, body .sg .sg-text h2, body .sg-door h2 { font-weight: 635; }
body.lf-research {
  --lf-bg: #102336;
  --lf-panel: #162e43;
  --lf-ink: var(--cn-on-night);
  --lf-muted: #ccdeec;
  --lf-line: #536c80;
  --lf-accent: var(--cn-sky);
}
body.lf-research .lf-button.primary { color: #10273a; }
body.lf-research .lf-button.primary:hover { background: white; }

/* The three entry pages share a type scale, dark feature space and compact directory. */
:is(body.cn-home, body.xn-map, body.xn-engineering) {
  --xn-paper: var(--cn-canvas);
  --xn-ink: var(--cn-ink);
  --xn-green: var(--cn-night);
  --xn-muted: var(--cn-muted);
  --xn-rule: var(--cn-line);
  --xn-tint: var(--cn-mist);
  --xn-copper: var(--cn-action);
  --xn-cream: var(--cn-on-night);
  --xn-sans: var(--cn-type);
  --xn-display: var(--cn-type);
}
html[dir="rtl"] :is(body.cn-home, body.xn-map, body.xn-engineering) {
  --xn-sans: var(--cn-type);
  --xn-display: var(--cn-type);
}
body.cn-home main :is(h1,h2,h3), body.xn-map .sm-map :is(h1,h2,h3),
body.xn-engineering .nb-engineering :is(h1,h2) {
  font-family: var(--cn-type);
  font-weight: 665;
  letter-spacing: -.04em;
}
html[dir="rtl"] :is(.cn-home main, .xn-map .sm-map, .xn-engineering .nb-engineering) :is(h1,h2,h3) {
  font-weight: 640;
  letter-spacing: normal;
}
body.cn-home .mast, :is(body.xn-map, body.xn-engineering) header.studio-mast {
  background: var(--cn-surface);
  border-color: var(--cn-line);
}
body.cn-home .home-hero, body.xn-map .xn-directory-head {
  background: var(--cn-hero);
  color: var(--cn-on-night);
}
body.cn-home .home-hero .home-eyebrow, body.xn-map .xn-directory-intro .sm-eyebrow,
body.xn-engineering .xn-bench-head .nb-label { color: var(--cn-sky); }
body.cn-home .home-lead, body.xn-map .xn-directory-intro .sm-deck,
body.xn-engineering .xn-bench-copy > p:not(.nb-label) { color: #e1edf6; }
body.cn-home .home-hero h1 { font-size: clamp(2.8rem, 4.7vw, 4.75rem); }
body.cn-home .home-hero-figure {
  border: 1px solid #c8dce7;
  border-radius: calc(var(--cn-media-radius) + .3rem);
  background: #edf5f8;
  box-shadow: 0 8px 22px #081b2a2b;
}
body.cn-home .home-hero-figure img { border-color: #c1d2d9; }
body.cn-home .home-hero-figure figcaption { padding-inline: .4rem; }
body.cn-home :is(.home-eyebrow, .home-hero-figure figcaption) a { color: inherit; }
body.cn-home :is(.home-hero, .home-cinema) .home-actions, body.xn-engineering .xn-entry-links {
  gap: .35rem .55rem;
}
body.cn-home .home-primary {
  background: var(--cn-action);
  border-color: var(--cn-action);
  color: white;
}
body.cn-home .home-primary:hover { background: #0b3f95; color: white; }
body.cn-home :is(.home-hero, .home-cinema) .home-primary,
body.xn-engineering .xn-entry-links a:first-child {
  background: var(--cn-sky);
  color: #10273a;
  border: 1px solid var(--cn-sky);
  border-radius: var(--cn-button-radius);
}
body.cn-home :is(.home-hero, .home-cinema) .home-secondary,
body.xn-engineering .xn-entry-links a + a {
  background: #ffffff0d;
  border: 1px solid #91a8bc;
  border-radius: var(--cn-button-radius);
  color: #f0f6fb;
  padding: .42em .9em;
  text-decoration: none;
}
body.cn-home :is(.home-hero, .home-cinema) .home-primary:hover,
body.xn-engineering .xn-entry-links a:first-child:hover { background: white; color: var(--cn-ink); }
body.cn-home :is(.home-hero, .home-cinema) .home-secondary:hover,
body.xn-engineering .xn-entry-links a + a:hover { background: #ffffff24; }
body.cn-home .home-cinema .home-actions .home-primary { background: #f3e8cf; border-color: #f3e8cf; color: #251f19; }
body.cn-home .home-cinema .home-actions .home-secondary { color: #eee6d5; border-color: #a18f72; }
body.cn-home .home-cinema .home-actions .home-primary:hover { background: #fff9ed; }
body.cn-home main :focus-visible, body.xn-map .sm-map :focus-visible,
body.xn-engineering .nb-engineering :focus-visible {
  outline: 3px solid #174ab4;
  outline-offset: 2px;
}
body.cn-home :is(.home-hero, .home-cinema) :focus-visible,
body.xn-map .xn-directory-intro :focus-visible, body.xn-engineering .xn-bench-copy :focus-visible { outline-color: #ffe08d; }

body.cn-home .home-directory { background: var(--cn-canvas); }
body.cn-home .home-directory-head h2 { font-size: clamp(1.65rem, 2.6vw, 2.55rem); }
body.cn-home :is(.home-directory-head, .home-section-intro) > a {
  border: 1px solid #b7c9dc;
  border-radius: var(--cn-button-radius);
  background: var(--cn-surface);
  color: var(--cn-action);
  padding-inline: .75rem;
  text-decoration: none;
}
body.cn-home :is(.home-directory-head, .home-section-intro) > a:hover { background: var(--cn-mist); }
body.cn-home .home-directory-grid { gap: .5rem; }
body.cn-home .home-directory-item {
  background: var(--cn-surface);
  border: 1px solid var(--cn-line);
  border-radius: .9rem;
  padding: .5rem .8rem;
}
body.cn-home .home-directory-item h3 {
  font-size: clamp(1.03rem, 1.46vw, 1.38rem);
  line-height: 1.18;
  letter-spacing: -.025em;
}
body.cn-home .home-directory-item .home-links a { color: #234e79; text-decoration-color: #91aec8; }
body.cn-home .home-directory-item:focus-within { border-color: var(--cn-action); }
body.cn-home .home-all-rooms {
  margin-top: .45rem;
  background: var(--cn-mist);
  border: 1px solid #c4d5e4;
  border-radius: .85rem;
}
body.cn-home .home-all-rooms > summary { padding: .55rem .8rem; }
body.cn-home .home-rooms-grid { padding-inline: .8rem; }
body.cn-home .home-rooms-grid :is(h3,h4) { font: 650 1.1rem/1.3 var(--cn-type); }
body.cn-home .home-work, body.cn-home .home-research { background: var(--cn-surface); }
body.cn-home .home-work-item { border-color: var(--cn-line); }
body.cn-home .home-work-item figure img { background: #e8eff4; }
body.cn-home .home-software { background: #eef1fa; color: #262b44; }
body.cn-home .home-contact .service-row a {
  border-color: var(--cn-line);
  color: var(--cn-ink);
}
body.cn-home .home-directory-item .home-links a:hover { color: var(--cn-action); }

body.xn-map .xn-directory-controls, body.xn-engineering .xn-bench-plot {
  border-radius: 1.25rem;
  background: var(--cn-surface);
  border: 1px solid #d6e1eb;
}
body.xn-map .sm-find input { border: 1px solid #8a9eaf; border-radius: var(--cn-button-radius); }
body.xn-map .sm-map { --sm-soft: var(--cn-mist); --sm-red: var(--cn-action); }
body.xn-map .sm-routes { border-radius: var(--cn-media-radius); }
body.xn-engineering .xn-bench-head {
  box-shadow: none;
  clip-path: none;
  border-radius: var(--cn-media-radius);
  background: var(--cn-hero);
  margin-top: clamp(.65rem, 1.75vw, 1.4rem);
  padding-inline: clamp(1rem, 3vw, 2.65rem);
}
body.xn-engineering .xn-handoff { border-radius: 1rem; }
body .nf-page {
  --nf-ink: var(--cn-ink);
  --nf-green: #234f79;
  --nf-rust: var(--cn-action);
  --nf-rule: var(--cn-line);
  --nf-paper: var(--cn-canvas);
  --nf-display: var(--cn-type);
}
body:has(main.nf-page) { background: var(--cn-canvas); }
body .nf-page :is(.nf-hardware-intro, .nf-software-intro, .nf-contact-intro, .nf-research-intro) h1,
body .nf-page:not(.nf-research) :is(h2,h3) { font-weight: 640; }
body .nf-page .nf-phones, body .nf-page .nf-optics { border-radius: var(--cn-media-radius); }

/* The online tools keep their native file pickers, traces, plots and decision states. */
body[data-offline="false"][data-notebook="assembly-check"] :is(.hero-links a, .review-cta, .top #language),
body[data-offline="false"][data-notebook="receiving"] :is(.receiving-mast .language, .actions a, label.file),
body:has(main #verdict) .mast #language {
  border-radius: var(--cn-button-radius);
}
body:has(main #verdict) .mast #language {
  border: 1px solid currentColor;
  text-decoration: none;
  padding-inline: .7rem;
}
body:is([data-notebook="assembly-check"], [data-notebook="receiving"])[data-offline="false"]
  input[type="file"]::file-selector-button,
main:has(.console, .audio) input[type="file"]::file-selector-button {
  border-radius: var(--cn-button-radius);
}
body:is([data-notebook="assembly-check"], [data-notebook="receiving"])[data-offline="false"]
  main :is(textarea, select, input[type="text"], input[type="file"], input[type="number"], input[type="date"]),
main :is(.observations select, .console select), main#screen select, main #controls select {
  border-radius: .6rem;
}

@media (max-width: 700px) {
  body.cn-home .home-directory-grid { gap: .32rem; }
  body.cn-home .home-directory-item { padding: .3rem .45rem; border-radius: .65rem; }
  body.cn-home .home-hero h1 { font-size: clamp(2rem, 7vw, 2.85rem); }
  html[dir="rtl"] body.cn-home .home-hero h1 { font-size: clamp(1.8rem, 6.9vw, 2.65rem); }
  html[dir="rtl"] body.cn-home .home-directory-item h3 { font-size: 1rem; }
  body.cn-home .home-directory-item .home-links a { padding-block: 0; min-height: 27px; }
  body.cn-home .home-hero-figure figcaption { padding-inline: .16rem; }
  body.cn-home .home-hero-figure img { border-radius: .55rem; }
}
@media print {
  body.cn-home .home-hero, body.xn-map .xn-directory-head, body.xn-engineering .xn-bench-head {
    background: white;
    color: black;
    box-shadow: none;
  }
  body.cn-home .home-hero .home-eyebrow, body.cn-home .home-lead,
  body.xn-map .xn-directory-intro :is(.sm-eyebrow,.sm-deck),
  body.xn-engineering .xn-bench-head :is(.nb-label,p) { color: black; }
}
