/* Polish layer for the ten newer demo websites and their workspaces.
   Loaded last on every /examples/ page (with /assets/type/<id>.css for typography).
   Each demo keeps its own palette and composition; this layer refines the finish:
   the studio chrome bar, type rendering and tracking for the new faces, controls,
   cards, focus states and motion. Per-demo rules are scoped with html.d-<id>. */

/* ── Rendering */
html.lws-example { -webkit-text-size-adjust: 100%; }
html.lws-example body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; font-kerning: normal; font-optical-sizing: auto; }
html.lws-example :is(h1, h2, h3) { text-wrap: balance; }
html.lws-example :is(p, li, dd, figcaption) { text-wrap: pretty; }
html.lws-example img { max-width: 100%; }
html.lws-example :focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
html.lws-example :is(a, button, .action, select, input, textarea) { transition: color .2s, background-color .25s, border-color .25s, box-shadow .25s, transform .25s cubic-bezier(.16, 1, .3, 1); }
html.lws-example :is(.action, button):not(:disabled):hover { transform: translateY(-1px); }
html.lws-example :is(.action, button):not(:disabled):active { transform: translateY(0) scale(.98); }
@media (prefers-reduced-motion: reduce) { html.lws-example * { transition-duration: .01ms !important; } }

/* ── Studio chrome bar (matches the five original demos) */
html.lws-example .studio-tools { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; min-height: 48px; padding: 0 4%; margin: 0; background: #11151c; color: #dce3ef; border-bottom: 1px solid #ffffff17; font: 500 13px/1.2 "LWS UI", system-ui, sans-serif; letter-spacing: 0; position: relative; z-index: 30; }
html.lws-example .studio-tools a { display: inline-flex; align-items: center; gap: 9px; color: inherit; text-decoration: none; min-height: 44px; }
html.lws-example .studio-tools a:hover { color: #fff; text-decoration: none; }
html.lws-example .studio-tools a::before { content: ""; width: 15px; height: 15px; flex: none; background: currentColor; -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; opacity: .85; }
html.lws-example .tools-back { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'%3E%3Cpath d='M3 3h7v7H3zM14 3h7v7h-7zM3 14h7v7H3zM14 14h7v7h-7z'/%3E%3C/svg%3E"); }
html.lws-example .tools-switch { justify-self: end; color: #e8c58a !important; --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'%3E%3Cpath d='M4 7h16M4 17h16M8 4v6M16 14v6'/%3E%3C/svg%3E"); }
html.lws-example.lws-admin .tools-switch { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'%3E%3Cpath d='M2 12s4-7 10-7 10 7 10 7-4 7-10 7S2 12 2 12zm10 3a3 3 0 1 0 0-6 3 3 0 0 0 0 6'/%3E%3C/svg%3E"); }
html.lws-example .tools-label { font-size: 10.5px; letter-spacing: .15em; text-transform: uppercase; color: #9caac1; white-space: nowrap; }
html.lws-example .tools-label small { margin-left: 10px; font-size: 11px; letter-spacing: 0; text-transform: none; color: #6f7f98; }
@media (max-width: 700px) {
  html.lws-example .studio-tools { grid-template-columns: 1fr auto; padding: 0 16px; }
  html.lws-example .tools-label { display: none; }
}

/* ── Workspaces: controls, cards and dialogs */
html.lws-example .op { --radius: 10px; }
html.lws-example .op :is(input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea) { min-height: 42px; padding: .5em .8em; border-radius: 8px; font: inherit; font-size: .95rem; }
html.lws-example .op select { padding-right: 2.2em; }
html.lws-example .op :is(input, select, textarea):focus { outline: none; border-color: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 55%, transparent); }
html.lws-example .op textarea { min-height: 96px; line-height: 1.5; }
html.lws-example .op button { border-radius: 8px; min-height: 38px; font-weight: 600; }
html.lws-example .op button:not(:disabled):hover { box-shadow: 0 6px 16px -8px #0006; }
html.lws-example .op-heading { flex-wrap: wrap; row-gap: 12px; }
html.lws-example .op-heading label { display: inline-flex; align-items: center; gap: .6rem; font-size: .9rem; }
html.lws-example .op-record { border-radius: var(--radius); box-shadow: 0 1px 2px #00000012, 0 14px 30px -22px #0000005c; transition: transform .35s cubic-bezier(.16, 1, .3, 1), box-shadow .35s; }
html.lws-example .op-record:hover { transform: translateY(-2px); box-shadow: 0 2px 4px #00000014, 0 22px 40px -24px #00000073; }
html.lws-example .op-stats { border-radius: var(--radius); overflow: hidden; }
html.lws-example .op-stats dd { font-variant-numeric: tabular-nums; }
html.lws-example .op-dialog { border-radius: 16px; padding: 1.75rem; }
html.lws-example .op-dialog::backdrop { background: #0b0d1299; backdrop-filter: blur(6px); }
html.lws-example .op-dialog :is(input, select, textarea) { min-height: 42px; border-radius: 8px; padding: .5em .75em; }
html.lws-example .op-message:not(:empty) { border-radius: 8px; }

/* ── Per-demo tuning for the new typefaces */
:root.lws-example.d-vinyl :is(h1, h2, h3, .wordmark) { letter-spacing: -.025em; }
:root.lws-example.d-vinyl .wordmark { font-weight: 800; }
:root.lws-example.d-cinema :is(h1, h2) { letter-spacing: -.02em; }
:root.lws-example.d-cinema .wordmark { letter-spacing: -.01em; }
:root.lws-example.d-trails :is(h1, h2) { letter-spacing: -.025em; }
:root.lws-example.d-prints :is(h1, h2, h3) { letter-spacing: -.035em; }
:root.lws-example.d-flowers :is(h1, h2) { letter-spacing: -.015em; font-weight: 500; }
:root.lws-example.d-flowers .wordmark { letter-spacing: -.01em; font-weight: 600; }
:root.lws-example.d-festival :is(h1, h2, h3) { letter-spacing: .005em; }
:root.lws-example.d-coffee :is(h1, h2) { letter-spacing: -.03em; }
:root.lws-example.d-coffee .wordmark { letter-spacing: -.02em; }
:root.lws-example.d-bakery :is(h1, h2) { letter-spacing: -.03em; }
:root.lws-example.d-night :is(h1, h2) { letter-spacing: -.03em; font-weight: 400; }
:root.lws-example.d-architecture :is(h1, h2) { letter-spacing: -.05em; }
:root.lws-example.d-architecture .wordmark { letter-spacing: -.035em; }

/* ── Homepage second acts for the practice demos (built by deck() in showroom-practice.js) */
.hd { padding: clamp(56px, 8vw, 120px) 5vw; display: grid; gap: clamp(28px, 4vw, 56px); }
.hd > header { display: grid; gap: 10px; }
.hd h2 { margin: 0; font-size: clamp(2.2rem, 5vw, 4.6rem); line-height: .98; }
.hd h3 { margin: 0; }
.hd p { margin: 0; }
.hd > aside { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; padding-top: 28px; border-top: 1px solid currentColor; }
.hd > aside p { flex: 1 1 420px; max-width: 62ch; opacity: .85; }
.hd > aside h3 { flex-basis: 100%; }
.hd .hd-cta { font-weight: 700; }

/* Relay Weekender: a poster running order */
.hd-festival { background: #1c1424; color: #fff4e6; }
.hd-festival .pr-label { color: #ff6a2b; }
.hd-festival h2 { font-family: Impact, sans-serif; text-transform: uppercase; font-size: clamp(3rem, 8vw, 7.5rem); letter-spacing: .005em; }
.hd-festival ol { list-style: none; margin: 0; padding: 0; display: grid; }
.hd-festival li { display: grid; grid-template-columns: minmax(120px, 210px) 1fr auto; align-items: center; gap: 12px 32px; padding: 26px 0; border-top: 2px solid #ffffff26; transition: background-color .3s; }
.hd-festival li:hover { background: #ffffff08; }
.hd-festival time { font: 400 clamp(2rem, 4vw, 3.4rem)/.9 Impact, sans-serif; color: #ff6a2b; text-transform: uppercase; }
.hd-festival small { font: 600 .75rem/1 Consolas, monospace; letter-spacing: .14em; text-transform: uppercase; color: #ffb98f; }
.hd-festival h3 { font: 400 clamp(1.8rem, 3vw, 2.8rem)/1 Impact, sans-serif; text-transform: uppercase; margin: 6px 0; }
.hd-festival li p { opacity: .8; }
.hd-festival aside { border-color: #ffffff26; }
.hd-festival aside h3 { font: 400 1.8rem/1 Impact, sans-serif; text-transform: uppercase; color: #ff6a2b; }

/* Ratio Coffee Lab: sample labels from the lab bench */
.hd-coffee { background: #e8e9d8; color: #24312a; }
.hd-coffee h2 { font-family: Georgia, serif; font-weight: 400; letter-spacing: -.03em; }
.hd-tags { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.hd-tags article { display: grid; gap: 14px; align-content: start; padding: 26px; background: #f7f7ee; border: 1px solid #24312a; border-radius: 4px; box-shadow: 6px 6px 0 #2f4a35; transition: transform .35s cubic-bezier(.16, 1, .3, 1), box-shadow .35s; }
.hd-tags article:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 #2f4a35; }
.hd-no { font: 500 .72rem/1 Consolas, monospace; letter-spacing: .16em; text-transform: uppercase; color: #5b6b58; }
.hd-coffee h3 { font: 600 1.9rem/1 Georgia, serif; letter-spacing: -.02em; }
.hd-tags dl { display: grid; grid-template-columns: 1fr 1fr; margin: 0; border-block: 1px dashed #24312a80; }
.hd-tags dl div { padding: 10px 0; }
.hd-tags dt { font: 500 .7rem/1 Consolas, monospace; letter-spacing: .14em; text-transform: uppercase; opacity: .7; }
.hd-tags dd { margin: 6px 0 0; font: 600 1.5rem/1 Consolas, monospace; }
.hd-coffee aside { border-color: #24312a40; }

/* First Light Bakehouse: the bread board */
.hd-bakery { background: #fbf1dd; color: #57331d; }
.hd-bakery h2 { font-family: Georgia, serif; font-weight: 500; letter-spacing: -.03em; }
.hd-bakery h2 i { color: #a8552c; }
.hd-board { display: grid; gap: 0; border-top: 1px solid #57331d40; }
.hd-board article { display: grid; grid-template-columns: 148px 1fr auto auto; align-items: center; gap: 28px; padding: 22px 0; border-bottom: 1px solid #57331d40; }
.hd-board img { width: 148px; height: 104px; object-fit: cover; border-radius: 999px 999px 12px 12px; }
.hd-board small { font: 500 .74rem/1 Consolas, monospace; letter-spacing: .12em; text-transform: uppercase; color: #a8552c; }
.hd-board h3 { font: 500 clamp(1.6rem, 2.6vw, 2.3rem)/1.05 Georgia, serif; letter-spacing: -.02em; margin: 6px 0; }
.hd-board strong { font: 600 1.6rem/1 Georgia, serif; }
.hd-bakery aside { border-color: #57331d40; }
.hd-bakery aside h3 { font: italic 500 1.7rem/1.1 Georgia, serif; }

/* Dark Sky Society: session cards on a star field */
.hd-night { background: radial-gradient(120% 90% at 80% 0%, #1b2c48, #0d1524 65%); color: #dce3ff; }
.hd-night h2 { font-family: Georgia, serif; font-weight: 400; letter-spacing: -.03em; }
.hd-night h2 i { color: #9fb6ff; }
.hd-sessions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.hd-sessions article { position: relative; display: grid; gap: 10px; align-content: start; padding: 28px; min-height: 260px; border: 1px solid #9fb6ff33; border-radius: 18px; background: #ffffff06; overflow: hidden; transition: border-color .35s, transform .35s cubic-bezier(.16, 1, .3, 1); }
.hd-sessions article:hover { border-color: #9fb6ff80; transform: translateY(-3px); }
.hd-stars { position: absolute; inset: 0; pointer-events: none; }
.hd-stars i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #dce3ff; opacity: .7; box-shadow: 0 0 6px #dce3ff; }
.hd-stars i:nth-child(1) { top: 18%; right: 14%; } .hd-stars i:nth-child(2) { top: 26%; right: 30%; width: 2px; height: 2px; } .hd-stars i:nth-child(3) { top: 12%; right: 44%; }
.hd-stars i:nth-child(4) { top: 34%; right: 9%; width: 2px; height: 2px; } .hd-stars i:nth-child(5) { top: 8%; right: 22%; width: 2px; height: 2px; } .hd-stars i:nth-child(6) { top: 30%; right: 52%; width: 2px; height: 2px; }
.hd-stars i:nth-child(7) { top: 16%; right: 62%; } .hd-stars i:nth-child(8) { top: 40%; right: 36%; width: 2px; height: 2px; } .hd-stars i:nth-child(9) { top: 22%; right: 74%; width: 2px; height: 2px; }
.hd-night small { font: 500 .74rem/1 Consolas, monospace; letter-spacing: .14em; text-transform: uppercase; color: #9fb6ff; margin-top: 70px; }
.hd-night h3 { font: 400 2rem/1.05 Georgia, serif; letter-spacing: -.02em; }
.hd-night article p { opacity: .8; }
.hd-night aside { border-color: #9fb6ff33; }

/* Datum Office: a project index */
.hd-architecture { background: #f4f3ee; color: #1f2320; }
.hd-architecture h2 { font-family: Arial, sans-serif; font-weight: 600; letter-spacing: -.05em; }
.hd-index { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.hd-index article { display: grid; gap: 10px; align-content: start; }
.hd-index figure { margin: 0 0 8px; overflow: hidden; aspect-ratio: 4 / 3; }
.hd-index img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.16, 1, .3, 1); }
.hd-index article:hover img { transform: scale(1.04); }
.hd-index small { font: 500 .72rem/1 Consolas, monospace; letter-spacing: .14em; text-transform: uppercase; color: #6b6f66; padding-top: 10px; border-top: 1px solid #1f2320; }
.hd-index h3 { font: 600 1.7rem/1.05 Arial, sans-serif; letter-spacing: -.035em; }
.hd-architecture aside { border-color: #1f2320; }

@media (max-width: 820px) {
  .hd-tags, .hd-sessions, .hd-index { grid-template-columns: 1fr; }
  .hd-festival li { grid-template-columns: 1fr; padding: 22px 0; }
  .hd-board article { grid-template-columns: 96px 1fr; gap: 14px 18px; }
  .hd-board img { width: 96px; height: 72px; }
  .hd-board strong, .hd-board .pr-link { grid-column: 2; }
}

/* Needle Exchange: Syne is broader than the old Arial Black */
:root.lws-example.d-vinyl #app > nav .wordmark { font-size: clamp(1.15rem, 2.1vw, 1.7rem); letter-spacing: -.01em; }
:root.lws-example.d-vinyl h1 { font-size: clamp(2.8rem, 5.6vw, 5.8rem); line-height: .95; }
@media (max-width: 700px) {
  :root.lws-example.d-vinyl #app > nav .wordmark { font-size: 1.12rem; white-space: nowrap; }
  :root.lws-example.d-vinyl nav div { row-gap: .5rem; }
  :root.lws-example.d-vinyl nav div a:last-child { padding: .5em .75em; }
}

/* Vertical workspace navs: long labels wrap inside their pill instead of overrunning it */
:root.lws-example .op-prints .op-nav button, :root.lws-example .op-trails .op-nav button { white-space: normal; text-align: left; line-height: 1.25; max-width: 100%; }
