/* Light navigation floats above opaque, dimensioned working surfaces. */
@media screen{
 .tile-home .spread>*{min-width:0}
 .tile-home #downloads a{min-width:0;overflow-wrap:anywhere}
 .tile-home .home-preferences,.tile-porch header nav{min-width:0;flex-wrap:wrap}
 .tile-home header,.tile-porch header{flex-wrap:wrap;gap:4px 12px}
 #start-tile{position:relative;isolation:isolate;overflow:hidden}
 #start-tile::before{content:'';position:absolute;inset:0;pointer-events:none;border-radius:inherit;background:radial-gradient(ellipse at var(--shine-x,30%) 5%,#ffffff26,transparent 70%);opacity:0}
 @media(hover:hover) and (prefers-reduced-motion:no-preference){
  #start-tile,#start-tile::before{transition:transform .18s ease-out,opacity .18s ease-out,border-radius .18s ease-out}
  #start-tile:hover{transform:translateY(-1px);border-radius:18px 26px 21px 24px}
  #start-tile:hover::before{opacity:1}
 }
 @media(prefers-reduced-motion:no-preference){#start-tile:active{transform:scale(.985)}}
 .quick-measure h1{margin-top:0}
 .quick-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .quick-measure fieldset,.quick-measure label{min-width:0}
 .quick-measure>button.primary{margin-block:8px;width:100%}
 .quick-files{margin:12px 0 0}.quick-files summary,#quick-advanced>summary{cursor:pointer;padding:9px 0;font-weight:600}
 .quick-files+.work{padding-top:12px}
 #quick-order p{font-weight:600}
 .tile-field-help{position:relative;min-width:0}
 .tile-field-help:has(>label[hidden]){display:none}
 .tile-field-help>label{padding-right:29px}
 .tile-help-button{position:absolute;right:0;top:3px;min-width:28px;min-height:28px;padding:0;border-radius:50%;border:1px solid #879fa9;background:white;color:#184f57;font-weight:650}
 .tile-hint{margin:4px 0 10px;padding:8px 10px;background:#e8f2f4;color:#203e40;font-size:.88rem}
 @media(max-width:420px){.tile-porch header nav{justify-content:flex-end}.tile-home .home-preferences{gap:4px}}
}
@media print{.quick-files,.tile-help-button,.tile-hint{display:none!important}}
@media screen {
  :root:not([data-theme="dark"]) {
    --bg:#f4f7fb; --card:#fff; --text:#192932; --muted:#4b606c; --line:#cbd7df;
    --accent:#06616a; --accent-2:#06616a; --surface-2:#e8f0f3; --radius:16px;
    --glass:#f4f9fc; --glass-edge:inset 0 1px 0 #fff,0 6px 24px #26495e12;
    --ring:#11778042;
  }
  :root:not([data-theme="dark"]) :is(.tile-home,.tile-surfaces,.tile-porch,.studio,.tile-account) {
    min-height:100vh; color:var(--text); background-color:var(--bg);
    background-image:radial-gradient(ellipse at 86% 0%,#d1e5ed 0,transparent 58%),radial-gradient(ellipse at 2% 5%,#e0e5f7,transparent 54%);
    background-size:100% 760px; background-repeat:no-repeat;
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Manrope,sans-serif;
  }
  :is(.tile-home,.tile-surfaces,.tile-porch,.tile-account) :is(h1,h2) {font-family:inherit;font-weight:650;letter-spacing:-.038em;line-height:1.07}
  .tile-home .hero {grid-template-columns:minmax(0,1fr) minmax(0,1.08fr);padding-block:clamp(34px,6vw,86px)}
  .tile-home .hero h1 {font-size:clamp(2.65rem,5.25vw,4.75rem);text-wrap:balance}
  .tile-home h2 {font-size:clamp(1.75rem,3vw,2.7rem)}
  .tile-home .hero p,.tile-home .spread p,.tile-account p {color:var(--muted)}
  :is(.tile-home,.tile-surfaces,.tile-porch,.tile-account)>header {
    margin:10px auto 0;width:calc(100% - 24px);max-width:1256px;min-height:54px;height:auto;
    padding:9px clamp(14px,3vw,38px);border:0;border-radius:22px;background:var(--glass);box-shadow:var(--glass-edge);
  }
  .tile-home .hero figure {position:relative;background:white;border:0;border-radius:20px;box-shadow:0 12px 40px #2b50631a}
  .tile-home .preview-controls {border:0;background:#f5f8fa;gap:3px;padding:8px 12px}
  .tile-home .preview-controls button {border-radius:24px;color:var(--muted)}
  .tile-home .preview-controls button[aria-pressed=true] {color:var(--text);background:white;box-shadow:0 2px 6px #18394a24}
  .tile-home #preview-caption {background:#fafcfd;border-color:var(--line)}
  .tile-home .actions a,.tile-home .sample {min-height:44px;display:inline-flex;align-items:center}
  .tile-home .actions .example-link {border:0;background:transparent;padding-inline:0;color:var(--accent);text-decoration:underline;text-underline-offset:4px}
  .tile-home .actions :is(.primary,.secondary) {border-radius:24px;padding-inline:20px;font-weight:600}
  .tile-home .actions .primary,.tile-account #submit {color:white;background:var(--accent);border-color:var(--accent)}
  .tile-home .actions .secondary {color:var(--text);border-color:#b3c5cf;background:#f7fbfd}
  .tile-home .watch-link::before {content:"";border-block:5px solid transparent;border-left:8px solid currentColor;margin-right:8px}
  .tile-home #lessons {align-items:center}
  .tile-home #lessons h2 {margin-bottom:20px}
  .tile-home #lessons label {display:block;font-size:.88rem;color:var(--muted);margin:10px 0 3px}
  .tile-home #lessons select {width:min(100%,360px);margin:0;min-height:42px}
  .tile-home #lesson-player {align-self:center;border-radius:16px;background:#dce7ed;box-shadow:0 10px 32px #2446571c}
  .tile-home .spread {border-color:var(--line)}
  .tile-home #exampleChoices article {padding:16px;border:1px solid var(--line);border-radius:14px;background:white}
  :is(.tile-home,.tile-surfaces,.tile-porch,.tile-account) :is(select,input:not([type=checkbox],[type=radio]),textarea) {color:var(--text);background:white;border:1px solid #aebfc9;border-radius:10px}
  :is(.tile-home,.tile-surfaces,.tile-porch,.tile-account,.studio) :focus-visible {outline:3px solid #13778b;outline-offset:3px}
  :is(.tile-surfaces,.tile-porch) :is(.drawing,article,.preview,aside) {background:white;border-color:var(--line);border-radius:16px}
  .tile-account main {padding:clamp(20px,4vw,36px);background:white;border-radius:18px;box-shadow:var(--glass-edge)}
  :root:not([data-theme="dark"]) .studio :is(.studio-header,.studio-sidebar) {background:var(--glass);color:var(--text);box-shadow:var(--glass-edge)}
  :root:not([data-theme="dark"]) .studio :is(.studio-brand,.studio-nav button) {color:var(--text)}
  :root:not([data-theme="dark"]) .studio :is(.nav-caption,.sidebar-note,.sidebar-note p) {color:var(--muted)}
  :root:not([data-theme="dark"]) .studio .studio-nav button:hover {background:#e2eef2}
  :root:not([data-theme="dark"]) .studio .studio-nav button.active {background:#fff;color:var(--accent);box-shadow:0 2px 8px #274d5e18}
  :root:not([data-theme="dark"]) .studio .mode-segment {border-radius:24px;background:#e4edf1}
  :root:not([data-theme="dark"]) .studio .mode-segment button {border-radius:20px}
  @supports ((backdrop-filter:blur(16px)) or (-webkit-backdrop-filter:blur(16px))) {
    :root:not([data-theme="dark"]) {--glass:rgba(248,252,255,.82)}
    :is(.tile-home,.tile-surfaces,.tile-porch,.tile-account)>header,
    :root:not([data-theme="dark"]) .studio :is(.studio-sidebar,.studio-header) {
      -webkit-backdrop-filter:saturate(140%) blur(16px);backdrop-filter:saturate(140%) blur(16px)
    }
  }
  @media(max-width:720px) {
    .tile-home .hero {grid-template-columns:minmax(0,1fr)}
    .tile-home .actions {gap:8px}
    .tile-home .actions :is(.primary,.secondary) {padding-inline:14px}
    .tile-home .hero p {margin-block:14px 20px}
    .tile-account main {margin-inline:12px}
  }
  @media(prefers-reduced-transparency:reduce),(prefers-contrast:more) {
    :root:not([data-theme="dark"]) {--glass:#f8fbfd}
    :is(.tile-home,.tile-surfaces,.tile-porch,.tile-account)>header,
    :root:not([data-theme="dark"]) .studio :is(.studio-sidebar,.studio-header) {backdrop-filter:none;-webkit-backdrop-filter:none}
  }
  @media(prefers-reduced-motion:reduce) {html {scroll-behavior:auto}}
}
