/* SXD-2105 B-01: sxd.css, the one stylesheet of www.stonesandice.com (plan SXD-2100 section 0).
   Base: the Back Room look (SXD-1529, blues from SXD-1597): brass on the Lobby blues, Jost Light only.
   Every page is built from the components below; no page has its own stylesheet, inline style or inline script.
   Dark only by design; a print style for legal pages at the end.
   Product accents (0.3) are set by <body data-product="...">: --accent fills, --accent-ink text on the fill,
   --accent-text the accent's colour for links and small text (brass where the accent fails AA on --navy; checked by
   web/tests/test_contrast.py). */

@font-face {
  font-family: "Jost";
  src: url("../fonts/Jost-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* ---------------------------------------------------------------- tokens */
:root {
  color-scheme: dark;
  /* surfaces */
  --navy: #082434;
  --navy-2: #0b2e42;
  --panel: #0e3b55;
  --ink: #051822;
  /* text and lines */
  --ivory: #f0e6d0;
  --white: #fff8e8;
  --smoke: rgba(240, 230, 208, .66);
  --rule: rgba(217, 165, 76, .35);
  --rule-soft: rgba(217, 165, 76, .22);
  /* brand */
  --brass: #d9a54c;
  --brass-hi: #e8b75e;
  --acey-red: #b8322a;
  --acey-blue: #2d5c9e;
  /* state */
  --ok: #8fcf8a;
  --danger: #f08a7a;
  /* product accent: brass by default */
  --accent: var(--brass);
  --accent-hi: var(--brass-hi);
  --accent-ink: #082434;
  --accent-text: var(--brass);
  --cta: var(--accent);
  --cta-hi: var(--accent-hi);
  --cta-ink: var(--accent-ink);
  /* type */
  --body: "Jost", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: Consolas, "Courier New", monospace;
  --heavy: .04em;
  --medium: .02em;
  /* spacing, 4px base */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px;
  --gutter: clamp(16px, 5vw, 72px);
  --measure: 68ch;
  /* shape */
  --r-btn: 3px; --r-card: 6px; --r-dialog: 12px;
  /* motion */
  --t: 150ms ease;
}

/* product accents (plan 0.3); --accent-text falls back to brass where the accent is below AA on --navy */
body[data-product="stonesxdice"] { --accent: #d9a54c; --accent-hi: #e8b75e; --accent-ink: #082434; --accent-text: #d9a54c;
  --cta: #e0533a; --cta-hi: #ea6a52; --cta-ink: #160603; }
body[data-product="stonesxmasdice"] { --accent: #cc2f37; --accent-hi: #e8b830; --accent-ink: #fff8e8; --accent-text: #e8b830; }
body[data-product="scorecard"] { --accent: #d23a32; --accent-hi: #e0544c; --accent-ink: #fff8e8; --accent-text: var(--brass); }
body[data-product="gameclock"] { --accent: #8fc4e8; --accent-hi: #b0d6f0; --accent-ink: #051822; --accent-text: #8fc4e8; }
body[data-product="chaos-engine"] { --accent: #ff5236; --accent-hi: #ff6f57; --accent-ink: #160603; --accent-text: var(--brass); }
body[data-product="dev"] { --accent: #9ec3e6; --accent-hi: #bcd6ee; --accent-ink: #051822; --accent-text: #9ec3e6; }
body[data-product="arcade-jacoby"] { --accent: #6fbf8a; --accent-hi: #8ad0a2; --accent-ink: #051822; --accent-text: #6fbf8a; }
body[data-product="arcade-crawford"] { --accent: #e07a5a; --accent-hi: #ea9479; --accent-ink: #160603; --accent-text: #ea9479; }
body[data-product="arcade-slingshot"] { --accent: #5aa7e0; --accent-hi: #7dbbea; --accent-ink: #051822; --accent-text: #5aa7e0; }
body[data-product="arcade-lucky-hand"] { --accent: #c8a2e8; --accent-hi: #d8bcf0; --accent-ink: #120a1a; --accent-text: #c8a2e8; }
body[data-product="arcade-dragons-nine"] { --accent: #e0b040; --accent-hi: #ecc460; --accent-ink: #1a0f00; --accent-text: #e0b040; }
body[data-product="arcade-christmas"] { --accent: #cc2f37; --accent-hi: #e8b830; --accent-ink: #fff8e8; --accent-text: #e8b830; }
body[data-product="arcade-acey-deucey"] { --accent: #b8322a; --accent-hi: #cc4a40; --accent-ink: #fff8e8; --accent-text: var(--brass); }
body[data-product="arcade-poker-gammon"] { --accent: #e05a6a; --accent-hi: #ea7886; --accent-ink: #1a0508; --accent-text: #f2a0aa; }
body[data-product="arcade-deck-building"] { --accent: #4a8fe0; --accent-hi: #6ea6ea; --accent-ink: #051822; --accent-text: #6ea6ea; }
body[data-product="arcade-city-tour"] { --accent: #d9a54c; --accent-hi: #e8b75e; --accent-ink: #082434; --accent-text: #d9a54c; }
body[data-product="arcade-money-play"] { --accent: #4fae8c; --accent-hi: #6cc2a2; --accent-ink: #051822; --accent-text: #6cc2a2; }

/* ------------------------------------------------------------------ base */
* { box-sizing: border-box; }
html { background: var(--navy); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--navy); color: var(--ivory); font-family: var(--body); font-weight: 300;
  font-size: 18px; line-height: 1.6; -webkit-font-smoothing: antialiased; font-synthesis: style; overflow-x: hidden;
  min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }
:lang(zh), :lang(ja), :lang(ko), :lang(tr), :lang(th), :lang(he), :lang(ar), :lang(hi), :lang(el), :lang(ru), :lang(uk) {
  --body: system-ui, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans", sans-serif; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent-text); text-underline-offset: 4px; text-decoration-thickness: 1px; transition: color var(--t); }
a:hover { color: var(--brass-hi); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
b, strong { font-weight: 300; -webkit-text-stroke: var(--medium) currentColor; paint-order: stroke fill; color: var(--white); }
p { margin: 0 0 1em; }
code { font-family: var(--mono); font-size: .85em; background: rgba(240,230,208,.08); border: 1px solid var(--rule-soft);
  padding: 1px 5px; border-radius: var(--r-btn); overflow-wrap: anywhere; }
pre { overflow-x: auto; max-width: 100%; background: var(--ink); border: 1px solid var(--rule-soft); border-radius: var(--r-card);
  padding: var(--s4); font-size: 15px; }
pre code { background: none; border: 0; padding: 0; }
hr { border: 0; border-top: 1px solid var(--rule-soft); margin: var(--s6) 0; }
.skip { position: absolute; left: -999px; top: 0; background: var(--brass); color: var(--navy); padding: 8px 14px; z-index: 99; }
.skip:focus { left: 8px; top: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* display type: capitals, tracking and a thin stroke (Jost Light is the only weight) */
.disp, h1, h2, h3, .btn, .nav, .tag, .kicker, .wordmark, summary, dl.kv dt, .foot h2 {
  font-family: var(--body); font-weight: 300; text-transform: uppercase; paint-order: stroke fill; }
h1, h2, h3 { line-height: 1.1; color: var(--brass); overflow-wrap: break-word; }
h1 { font-size: clamp(40px, 6.4vw, 84px); letter-spacing: .06em; margin: 0 0 .25em; -webkit-text-stroke: var(--heavy) currentColor; }
h2 { font-size: clamp(22px, 3.2vw, 34px); letter-spacing: .08em; margin: 1.8em 0 .7em; -webkit-text-stroke: var(--heavy) currentColor; }
h3 { font-size: clamp(16px, 1.6vw, 18px); letter-spacing: .10em; margin: 1.4em 0 .5em; color: var(--ivory); -webkit-text-stroke: var(--medium) currentColor; }
.small { font-size: 14px; }
.muted { color: var(--smoke); }
.kicker { font-size: 13px; letter-spacing: .18em; color: var(--accent-text); }
.lede { font-size: clamp(19px, 2vw, 22px); line-height: 1.5; max-width: 40ch; }

/* layout */
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter); }
.measure { max-width: var(--measure); }
.block { padding: var(--s7) 0; }
.wrap.block { padding: var(--s7) var(--gutter); }   /* a .wrap that is also a .block keeps its side gutter */
.block.alt { background: var(--navy-2); border-top: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); }
.block > .wrap > h2:first-child { margin-top: 0; }
.grid { display: grid; gap: var(--s5); grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr)); }
.split { display: grid; gap: var(--s7); grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); gap: var(--s6); } }

/* ---------------------------------------------------------------- notices */
.notice { font-size: 15px; padding: var(--s3) var(--s4); border-radius: var(--r-btn); border: 1px solid var(--rule);
  border-left: 4px solid var(--brass); background: rgba(217,165,76,.08); margin: var(--s4) 0; }
.notice b { color: var(--brass); }
.notice.off { border-left-color: var(--smoke); background: rgba(240,230,208,.05); }
.notice.draft { border-left-color: var(--danger); }
.banner { font-size: 14px; padding: 7px 16px; text-align: center; background: var(--ink); color: var(--smoke);
  border-bottom: 1px solid var(--rule-soft); }

/* ----------------------------------------------------------------- header */
.site-header { position: relative; z-index: 20; border-bottom: 1px solid var(--rule-soft); background: var(--navy); }
.site-header .wrap { display: flex; align-items: center; gap: var(--s3) var(--s6); min-height: 72px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.wordmark { font-size: 20px; letter-spacing: .22em; color: var(--ivory); text-decoration: none; line-height: 1; white-space: nowrap;
  -webkit-text-stroke: var(--medium) currentColor; display: inline-flex; align-items: center; gap: 12px; }
.wordmark .amp { color: var(--brass); }
.wordmark:hover { color: var(--white); }
.nav { display: flex; gap: 6px 24px; flex-wrap: wrap; margin-left: auto; font-size: 14px; letter-spacing: .16em;
  -webkit-text-stroke: var(--medium) currentColor; align-items: center; }
.nav a { color: var(--ivory); text-decoration: none; opacity: .85; padding: 4px 0; border-bottom: 1px solid transparent; }
.nav a:hover { opacity: 1; color: var(--white); }
.nav a[aria-current="page"] { opacity: 1; color: var(--brass); border-bottom-color: var(--brass); }
.nav .signin { color: var(--brass); }
/* menu and language picker are <details>: no script needed */
.menu > summary, .langs > summary { list-style: none; cursor: pointer; font-size: 13px; letter-spacing: .16em; color: var(--ivory);
  -webkit-text-stroke: var(--medium) currentColor; padding: 8px 12px; border-radius: var(--r-btn); box-shadow: inset 0 0 0 1px var(--smoke); }
.menu > summary::-webkit-details-marker, .langs > summary::-webkit-details-marker { display: none; }
.menu > summary:hover, .langs > summary:hover { box-shadow: inset 0 0 0 1px var(--ivory); }
.menu { display: none; }
.menu > summary { display: none; }
.langs { position: relative; }
.langs ul { position: absolute; right: 0; top: calc(100% + 6px); list-style: none; margin: 0; padding: 6px 0; min-width: 180px;
  background: var(--panel); border-radius: var(--r-card); box-shadow: inset 0 0 0 1px var(--rule), 0 18px 40px rgba(0,0,0,.5); z-index: 30; }
.langs li a { display: block; padding: 8px 16px; color: var(--ivory); text-decoration: none; font-size: 16px; text-transform: none; letter-spacing: 0; -webkit-text-stroke: 0; }
.langs li a:hover, .langs li a[aria-current="true"] { background: rgba(217,165,76,.12); color: var(--brass); }
@media (max-width: 1080px) {
  .nav.wide { display: none; }
  .menu { display: block; margin-left: auto; }
  .menu > summary { display: inline-block; }
  .menu:not([open]) > .nav { display: none; }
  .menu > .nav { position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--navy); border-bottom: 1px solid var(--rule-soft); padding: 4px var(--gutter) 14px; margin: 0; font-size: 15px; }
  .menu > .nav a { padding: 12px 0; border-bottom: 1px solid var(--rule-soft); }
  .menu > .nav a[aria-current="page"] { border-bottom-color: var(--rule-soft); }
  .menu > .nav .langs ul { position: static; box-shadow: none; background: transparent; }
  .menu > .nav .langs > summary { margin-top: 12px; display: inline-block; }
}
@media (max-width: 520px) { .wordmark { font-size: 15px; letter-spacing: .14em; } }

/* product sub-bar, in the product's accent */
.subbar { background: var(--navy-2); border-bottom: 1px solid var(--rule-soft); box-shadow: inset 0 3px 0 var(--accent); }
.subbar .wrap { display: flex; gap: 6px 22px; align-items: center; flex-wrap: wrap; min-height: 50px; font-size: 14px; letter-spacing: .12em;
  text-transform: uppercase; -webkit-text-stroke: var(--medium) currentColor; }
.subbar .name { color: var(--accent-text); margin-right: var(--s3); }
.subbar a { color: var(--ivory); text-decoration: none; opacity: .85; padding: 12px 0; }
.subbar a:hover { opacity: 1; color: var(--white); }
.subbar a[aria-current="page"] { opacity: 1; color: var(--accent-text); }
@media (max-width: 700px) { .subbar .wrap { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .subbar a, .subbar .name { white-space: nowrap; } }

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-size: 15px; line-height: 1.15; letter-spacing: .14em;
  -webkit-text-stroke: var(--medium) currentColor; text-decoration: none; color: var(--cta-ink); background: var(--cta);
  padding: 14px 22px; border: 0; border-radius: var(--r-btn); cursor: pointer; text-align: center; min-height: 48px;
  transition: background var(--t), color var(--t), box-shadow var(--t); }
.btn:hover { background: var(--cta-hi); color: var(--cta-ink); }
.btn.ghost { background: transparent; color: var(--ivory); box-shadow: inset 0 0 0 2px var(--smoke); }
.btn.ghost:hover { background: rgba(240,230,208,.06); box-shadow: inset 0 0 0 2px var(--ivory); color: var(--white); }
.btn.line { background: transparent; color: var(--accent-text); box-shadow: inset 0 0 0 2px var(--accent); }
.btn.line:hover { box-shadow: inset 0 0 0 2px var(--accent-hi); color: var(--accent-hi); }
.btn.danger { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 2px var(--danger); }
.btn[disabled], .btn.soon { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn-row { display: flex; gap: var(--s3); flex-wrap: wrap; margin: var(--s5) 0; align-items: center; }

/* store buttons: one size, one style, a "coming soon" state */
.stores { display: flex; gap: var(--s3); flex-wrap: wrap; margin: var(--s5) 0; }
.store { display: inline-flex; flex-direction: column; justify-content: center; min-width: 168px; min-height: 56px; padding: 8px 18px;
  border-radius: var(--r-card); background: var(--ink); color: var(--ivory); text-decoration: none; line-height: 1.2;
  box-shadow: inset 0 0 0 1px var(--rule); transition: box-shadow var(--t); }
.store small { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--smoke); }
.store span { font-size: 19px; }
.store:hover { box-shadow: inset 0 0 0 2px var(--accent); color: var(--white); }
.store.soon { opacity: .55; pointer-events: none; }

/* ---------------------------------------------------------------- tags */
.tag { display: inline-block; font-size: 12px; letter-spacing: .16em; background: var(--navy); color: var(--accent-text);
  padding: 5px 9px; border-radius: var(--r-btn); -webkit-text-stroke: var(--medium) currentColor; line-height: 1.3;
  box-shadow: inset 0 0 0 1px var(--rule-soft); text-decoration: none; }
.tag.released { color: var(--ok); }
.tag.development { color: var(--brass); }
.tag.pre-production, .tag.concept { color: var(--smoke); }
.tag.draft { color: var(--danger); }
.tag.off { color: var(--smoke); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 var(--s3); padding: 0; list-style: none; }

/* ------------------------------------------------------------ page heads */
.page-head { position: relative; isolation: isolate; overflow: hidden; padding: var(--s8) 0 var(--s7); border-bottom: 1px solid var(--rule-soft); }
.page-head::before { content: ""; position: absolute; inset: 0; z-index: -2; background: url("../img/hero-dim.jpg") 60% 38% / cover no-repeat; opacity: .9; }
.page-head::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to right, rgba(8,36,52,.96) 0, rgba(8,36,52,.82) 45%, rgba(8,36,52,.55) 100%),
              linear-gradient(to bottom, transparent 40%, var(--navy) 100%); }
.page-head.plain::before { display: none; }
.page-head h1 { margin: 0 0 var(--s3); }
.page-head p { max-width: 46em; margin: 0; font-size: 20px; }
.crumbs { font-size: 14px; letter-spacing: .1em; color: var(--smoke); margin: 0 0 var(--s3); }
.crumbs a { color: var(--smoke); }

/* ---------------------------------------------------------- product hero */
.hero { position: relative; isolation: isolate; overflow: hidden; min-height: min(80vh, 760px); display: flex; align-items: flex-end;
  padding: 120px 0 var(--s7); border-bottom: 1px solid var(--rule-soft); }
.hero > img.bg { position: absolute; inset: 0; z-index: -3; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -2;
  background: radial-gradient(ellipse 60% 70% at 15% 85%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to right, rgba(8,36,52,.94) 0, rgba(8,36,52,.78) 40%, rgba(8,36,52,.2) 80%),
              linear-gradient(to bottom, rgba(8,36,52,.5) 0, transparent 30%, transparent 60%, var(--navy) 100%); }
.hero .wrap { width: 100%; }
.hero h1 { color: var(--ivory); font-size: clamp(44px, 7vw, 100px); margin: var(--s3) 0 var(--s2); text-shadow: 0 4px 24px rgba(0,0,0,.7); }
.hero h1 .x, .hero h1 .amp { color: var(--accent-text); }
.hero .lede { margin: 0 0 var(--s5); text-shadow: 0 1px 8px #000; }
.hero .device { position: absolute; right: var(--gutter); bottom: 0; width: min(30vw, 340px); z-index: -1;
  filter: drop-shadow(0 30px 40px rgba(0,0,0,.6)); }
.hero.home { min-height: min(88vh, 860px); }
@media (max-width: 900px) { .hero .device { opacity: .35; width: 46vw; } }
@media (max-width: 520px) {
  .hero { min-height: 600px; padding: 96px 0 var(--s6); }
  .hero::after { background: linear-gradient(to bottom, rgba(8,36,52,.6) 0, rgba(8,36,52,.35) 30%, rgba(8,36,52,.88) 62%, var(--navy) 100%); }
  .hero h1 { font-size: 44px; }
}

/* ---------------------------------------------------------- feature rows */
.features { display: grid; gap: var(--s7); }
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--s7); align-items: center; }
.feature:nth-child(even) > figure { order: 2; }
.feature figure img { border-radius: var(--r-card); box-shadow: 0 0 0 1px var(--rule-soft), 0 18px 40px rgba(0,0,0,.4); margin: 0 auto; max-height: 480px; width: auto; }
.feature h3 { margin-top: 0; font-size: clamp(18px, 2vw, 22px); color: var(--accent-text); }
.feature p { color: rgba(240,230,208,.88); }
@media (max-width: 800px) { .feature { grid-template-columns: minmax(0, 1fr); gap: var(--s4); } .feature:nth-child(even) > figure { order: 0; } }
.points { display: flex; flex-wrap: wrap; gap: var(--s3); list-style: none; padding: 0; margin: var(--s6) 0 0; }
.points li { background: var(--panel); padding: 10px 16px; border-radius: var(--r-btn); font-size: 16px; box-shadow: inset 0 0 0 1px var(--rule-soft); }

/* --------------------------------------------------------- cards, tiles */
.card { position: relative; background: var(--panel); border-radius: var(--r-card); padding: var(--s5); min-width: 0;
  box-shadow: inset 0 0 0 1px var(--rule); transition: box-shadow var(--t); }
.card > h3:first-child { margin-top: 0; }
.card p, .card li { color: var(--smoke); }
.card.tile { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.card.tile > img, .card.tile > .pic { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--ink); }
.card.tile .body { padding: var(--s4) var(--s5) var(--s5); }
.card.tile h3 { margin: var(--s2) 0; font-size: 19px; }
.card.tile p { margin: 0; font-size: 16px; }
.card .stretch { color: inherit; text-decoration: none; }
.card .stretch::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card:has(.stretch):hover { box-shadow: inset 0 0 0 1px var(--accent), 0 18px 40px rgba(0,0,0,.4); }
.card:has(.stretch):hover h3 { color: var(--accent-text); }
.card[data-product] { box-shadow: inset 0 3px 0 var(--accent), inset 0 0 0 1px var(--rule); }

/* ------------------------------------------------------------ fact tables */
dl.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 1px; margin: 0 0 var(--s6);
  background: var(--rule-soft); border: 1px solid var(--rule-soft); border-radius: var(--r-card); overflow: hidden; }
dl.facts div { background: var(--navy-2); padding: var(--s4) var(--s5); min-width: 0; }
dl.facts dt { font-size: 12px; letter-spacing: .18em; color: var(--accent-text); text-transform: uppercase; }
dl.facts dd { margin: 4px 0 0; font-size: 18px; }
dl.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 20px; margin: 0; }
dl.kv dt { color: var(--brass); font-size: 13px; letter-spacing: .14em; padding-top: 3px; }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { dl.kv { grid-template-columns: minmax(0, 1fr); gap: 2px; } dl.kv dd { margin-bottom: 10px; } }
table.data { border-collapse: collapse; width: 100%; font-size: 16px; }
.table-scroll { overflow-x: auto; max-width: 100%; }
table.data th, table.data td { border-bottom: 1px solid var(--rule-soft); padding: 10px 12px; text-align: left; vertical-align: top; }
table.data th { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--brass); font-weight: 300; }

/* ----------------------------------------------------------- prose, posts */
.prose { max-width: var(--measure); }
.prose h2 { font-size: clamp(20px, 2.4vw, 26px); margin-top: 2em; }
.prose p, .prose li { color: rgba(240,230,208,.88); }
.prose li { margin-bottom: .5em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li::marker { color: var(--brass); }
.prose img { border-radius: var(--r-card); margin: var(--s5) 0; }
.prose blockquote { margin: var(--s5) 0; padding-left: var(--s4); border-left: 2px solid var(--brass); color: var(--smoke); }
.prose table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--rule-soft); padding: 8px 10px; text-align: left; vertical-align: top; }
.post-head h1 { font-size: clamp(32px, 4.4vw, 56px); }
.post-head time, .post-list time { font-size: 13px; color: var(--brass); letter-spacing: .18em; text-transform: uppercase; }
.post-hero { margin: 0 0 var(--s6); }
.post-hero img { border-radius: var(--r-card); width: 100%; max-height: 520px; object-fit: cover; }
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { padding: var(--s5) 0; border-bottom: 1px solid var(--rule-soft); display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: var(--s5); }
.post-list li > img { width: 160px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-btn); }
.post-list h3 { margin: 4px 0 6px; font-size: 20px; text-transform: none; letter-spacing: .02em; }
.post-list h3 a { color: var(--ivory); text-decoration: none; }
.post-list h3 a:hover { color: var(--brass); }
.post-list p { margin: 0; color: var(--smoke); font-size: 16px; }
.post-list .noimg { width: 160px; aspect-ratio: 4 / 3; border-radius: var(--r-btn); background: var(--panel); box-shadow: inset 0 0 0 1px var(--rule-soft); }
@media (max-width: 600px) { .post-list li { grid-template-columns: minmax(0, 1fr); gap: var(--s3); } .post-list li > img, .post-list .noimg { width: 100%; aspect-ratio: 16 / 9; } }
.related { margin-top: var(--s7); }

/* -------------------------------------------------------------- gallery */
.gallery { display: grid; gap: var(--s5); grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); list-style: none; padding: 0; margin: 0; }
.gallery figure { margin: 0; background: var(--panel); border-radius: var(--r-card); overflow: hidden; box-shadow: inset 0 0 0 1px var(--rule-soft); height: 100%; }
.gallery a.open { display: block; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform var(--t); }
.gallery a.open:hover img { transform: scale(1.02); }
.gallery figcaption { padding: var(--s4) var(--s5) var(--s5); }
.gallery figcaption b { display: block; font-size: 17px; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 4px; }
.gallery figcaption span { color: var(--smoke); font-size: 16px; }
/* lightbox: a :target overlay, no script */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(5,24,34,.94); display: none; place-items: center; padding: var(--s6) var(--gutter); }
.lightbox:target { display: grid; }
.lightbox img { max-height: 82vh; width: auto; border-radius: var(--r-dialog); box-shadow: 0 30px 60px rgba(0,0,0,.6); }
.lightbox p { text-align: center; margin: var(--s4) 0 0; }
.lightbox .close { position: absolute; top: var(--s4); right: var(--s4); }

/* --------------------------------------------------------------- legal */
.legal { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--s7); align-items: start; }
.legal .toc { position: sticky; top: var(--s5); font-size: 15px; }
.legal .toc ol { padding-left: 1.2em; margin: 0; }
.legal .toc li { margin: 6px 0; }
.legal .toc a { color: var(--smoke); text-decoration: none; }
.legal .toc a:hover { color: var(--brass); }
.legal .prose { counter-reset: sec; }
.legal .prose h2 { counter-increment: sec; }
.legal .prose h2::before { content: counter(sec) ". "; color: var(--smoke); }
.legal .updated { font-size: 15px; color: var(--smoke); }
@media (max-width: 900px) { .legal { grid-template-columns: minmax(0, 1fr); gap: var(--s5); } .legal .toc { position: static; } }

/* --------------------------------------------------------------- forms */
.form { display: grid; gap: var(--s4); max-width: 520px; }
.form label { display: grid; gap: 6px; font-size: 15px; color: var(--smoke); }
.form input[type="email"], .form input[type="text"], .form textarea, .form select, .search input {
  font: inherit; font-size: 17px; color: var(--ivory); background: rgba(0,0,0,.25); padding: 12px 14px;
  border: 1px solid var(--smoke); border-radius: var(--r-btn); width: 100%; }
.form input:focus, .form textarea:focus, .search input:focus { border-color: var(--brass); outline: none; }
.form textarea { min-height: 140px; resize: vertical; }
.form .hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.form .error, .msg.error { color: var(--danger); font-size: 15px; }
.msg { min-height: 1.4em; font-size: 16px; }
.msg.ok { color: var(--ok); }
.letterbox { background: var(--panel); border-radius: var(--r-card); padding: var(--s5); box-shadow: inset 0 0 0 1px var(--rule); margin-top: var(--s7); }
.letterbox h2 { margin-top: 0; font-size: 22px; }
.letterbox .row { display: flex; gap: var(--s3); flex-wrap: wrap; }
.letterbox .row input { flex: 1 1 240px; }

/* ----------------------------------------------------------- library */
.search { display: flex; gap: var(--s3); flex-wrap: wrap; margin: var(--s4) 0; }
.search input { flex: 1 1 320px; font-size: 19px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: var(--s3) 0 var(--s5); padding: 0; list-style: none; }
.chip { font: inherit; font-size: 14px; letter-spacing: .06em; color: var(--ivory); background: transparent; border: 0; cursor: pointer;
  padding: 7px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--rule); }
.chip[aria-pressed="true"] { background: var(--brass); color: var(--navy); box-shadow: none; }
.results { list-style: none; padding: 0; margin: 0; }
.results li { padding: var(--s4) 0; border-bottom: 1px solid var(--rule-soft); }
.results a { font-size: 20px; }
.results p { margin: 4px 0 0; color: var(--smoke); font-size: 16px; }
.board { width: 100%; max-width: 560px; height: auto; display: block; margin: var(--s4) 0; }
.board-wrap { background: var(--ink); border-radius: var(--r-card); padding: var(--s4); box-shadow: inset 0 0 0 1px var(--rule-soft); max-width: 600px; }

/* ----------------------------------------------------------- dashboard */
.dash { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--s6); }
.dash nav { display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.dash nav a { padding: 10px 12px; border-radius: var(--r-btn); color: var(--ivory); text-decoration: none; }
.dash nav a[aria-current="page"], .dash nav a:hover { background: var(--panel); color: var(--brass); }
.stats { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); }
.stat { background: var(--panel); border-radius: var(--r-card); padding: var(--s4) var(--s5); box-shadow: inset 0 0 0 1px var(--rule-soft); }
.stat b { display: block; font-size: 34px; color: var(--ivory); -webkit-text-stroke: 0; }
.stat span { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.danger-zone { border-radius: var(--r-card); padding: var(--s5); box-shadow: inset 0 0 0 1px var(--danger); }
.danger-zone h2 { color: var(--danger); margin-top: 0; }
@media (max-width: 800px) { .dash { grid-template-columns: minmax(0, 1fr); } .dash nav { flex-direction: row; flex-wrap: wrap; } }

/* ----------------------------------------------- style guide (swatches) */
.swatches { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr)); list-style: none; padding: 0; }
.swatch { border-radius: var(--r-card); overflow: hidden; box-shadow: inset 0 0 0 1px var(--rule-soft); background: var(--panel); }
.swatch i { display: block; height: 64px; }
.swatch span { display: block; padding: 8px 12px; font-size: 14px; }
.sw-navy { background: #082434; } .sw-navy-2 { background: #0b2e42; } .sw-panel { background: #0e3b55; } .sw-ink { background: #051822; }
.sw-ivory { background: #f0e6d0; } .sw-brass { background: #d9a54c; } .sw-brass-hi { background: #e8b75e; } .sw-ok { background: #8fcf8a; }
.sw-danger { background: #f08a7a; } .sw-acey-red { background: #b8322a; } .sw-acey-blue { background: #2d5c9e; }
.sw-accent { background: var(--accent); }

/* --------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--rule-soft); background: var(--ink); padding: var(--s7) 0 var(--s6); margin-top: var(--s8); font-size: 15px; color: var(--smoke); }
.home-page .site-footer { margin-top: 0; }
.foot-logo { display: block; width: max-content; margin: 0 auto var(--s6); }
.foot-logo img { display: block; width: 160px; height: auto; aspect-ratio: 289 / 210; }
@media (max-width: 520px) { .foot-logo img { width: 120px; } }
.foot { display: grid; gap: var(--s5); grid-template-columns: repeat(5, minmax(0, 1fr)); }
.foot h2 { font-size: 13px; letter-spacing: .18em; color: var(--brass); margin: 0 0 var(--s3); -webkit-text-stroke: var(--medium) currentColor; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin: 6px 0; }
.foot a { color: var(--ivory); text-decoration: none; }
.foot a:hover { color: var(--brass); }
.foot-base { display: flex; flex-wrap: wrap; gap: var(--s3) var(--s5); justify-content: space-between; margin-top: var(--s6); padding-top: var(--s5);
  border-top: 1px solid var(--rule-soft); }
@media (max-width: 900px) { .foot { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* --------------------------------------------------------------- motion */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------------------------------------------------------------- print */
@media print {
  :root { --navy: #fff; --navy-2: #fff; --panel: #fff; --ink: #fff; --ivory: #111; --white: #000; --smoke: #444; --brass: #6b4a10; }
  body { background: #fff; color: #111; font-size: 12pt; }
  .site-header, .subbar, .site-footer, .banner, .legal .toc, .btn, .langs, .skip { display: none !important; }
  .page-head::before, .page-head::after { display: none; }
  .legal { display: block; }
  a { color: #111; }
  h1, h2, h3 { color: #111; -webkit-text-stroke: 0; }
}

/* ---- products (SXD-2105 B-13) ---- */
.sxd-steps { list-style: none; padding: 0; margin: 0; }
.sxd-steps .card svg { width: 32px; height: 32px; color: var(--accent-text); display: block; margin-bottom: var(--s3); }
.sxd-steps .card h3 { margin: 0 0 var(--s2); }
.sxd-steps .card p { margin: 0; }
.sxd-fig { margin: 0; }
.sxd-fig img { border-radius: var(--r-card); box-shadow: 0 0 0 1px var(--rule-soft); }
.sxd-fig figcaption { margin-top: var(--s2); }
.sxd-pieces-group + .sxd-pieces-group { margin-top: var(--s6); }
.sxd-pieces { list-style: none; padding: 0; margin: var(--s4) 0 0; display: grid; gap: var(--s4);
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }
.sxd-pieces.small, .sxd-pieces.hand { grid-template-columns: repeat(auto-fill, minmax(120px, 160px)); }
.sxd-pieces.cards { grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr)); }
.sxd-pieces.one { grid-template-columns: minmax(0, 1fr); }
.sxd-pieces figure { margin: 0; text-align: center; }
.sxd-pieces img { margin: 0 auto; border-radius: var(--r-card); max-height: 220px; width: auto; object-fit: contain; }
.sxd-pieces.wide img, .sxd-pieces.one img { max-height: none; width: 100%; }
.sxd-pieces figcaption { font-size: 14px; color: var(--smoke); margin-top: var(--s2); }

/* ---- apps (SXD-2105 B-15/B-16/B-17/B-34) ---- */
.app-hero .kicker:empty { display: none; }
/* no background picture on the app heroes: size to the content, device picture centred on the right */
.app-hero { min-height: 0; padding: var(--s8) 0 var(--s7); align-items: center; }
.app-hero .device { bottom: auto; top: 50%; transform: translateY(-50%); width: min(30vw, 360px); }
@media (max-width: 900px) { .app-hero { padding: var(--s6) 0; } .app-hero .device { width: 40vw; } }
.app-close { display: grid; grid-template-columns: minmax(0, 160px) minmax(0, 1fr); gap: var(--s6); align-items: center; }
.app-close .app-logo { width: 100%; max-width: 160px; border-radius: var(--r-card); }
.app-close h2 { margin-top: 0; }
.dev-hero .device { width: min(40vw, 520px); bottom: auto; top: 50%; transform: translateY(-50%); border-radius: var(--r-card); }
.dev-hero .points { margin-top: var(--s4); }
.dev-body:not(:has(> figure)) { grid-template-columns: minmax(0, 1fr); }
.dev-body figure { margin: 0; }
.dev-body figure img { border-radius: var(--r-card); box-shadow: 0 0 0 1px var(--rule-soft); }
@media (max-width: 700px) { .app-close, .split.dev-body { grid-template-columns: minmax(0, 1fr); } .app-close .app-logo { max-width: 96px; } }

/* ---- account (SXD-2105 B-31, B-32, B-33) ---- */
.acct-root [hidden], .acct-root[hidden] { display: none !important; }
.acct-root > h2:first-child, .acct-root [data-acct-out] > h2:first-child, .acct-root [data-acct-in] > h2:first-child { margin-top: 0; }
.dash-main > section + section, .lb-board + .lb-board { margin-top: var(--s7); }
.dash-main > section > h2:first-child, .lb-board > h2:first-child { margin-top: 0; }
.acct-root .form label.check { display: flex; gap: var(--s3); align-items: center; }
.acct-root table.data .btn { padding: 8px 14px; font-size: 13px; }

/* ---- library (SXD-2105 B-30) ---- */
a.chip { display: inline-block; text-decoration: none; }
a.chip:hover, a.chip:focus-visible { box-shadow: inset 0 0 0 1px var(--brass); color: var(--brass); }
.lib-draft { margin-top: var(--s5); }
.page-head .lib-tags { margin-top: var(--s3); }
.page-head .lib-aka { font-size: 17px; color: var(--smoke); margin-top: var(--s3); }
.lib-alias { color: var(--smoke); font-size: 16px; margin-left: var(--s2); }
.results .lib-meta { font-size: 14px; letter-spacing: .06em; }
.lib-group { scroll-margin-top: var(--s5); }
.lib-group + .lib-group { margin-top: var(--s6); }
.lib-count { font-size: 15px; color: var(--brass); letter-spacing: .1em; vertical-align: middle; }
.lib-sections h2 { margin-top: 0; font-size: 24px; }
.lib-sections h2 a { color: inherit; text-decoration: none; }
.lib-mini { padding-left: 1.1em; margin: 0 0 var(--s4); }
.lib-terms { margin: 0; }
.lib-terms > div { padding: var(--s3) 0; border-bottom: 1px solid var(--rule-soft); scroll-margin-top: var(--s5); }
.lib-terms dt { font-size: 19px; }
.lib-terms dd { margin: 4px 0 0; color: var(--smoke); }
.lib-sources { padding-left: 1.1em; color: var(--smoke); }
.lib-rules { margin-top: var(--s5); }
.lib-rules th { width: 11em; }
.lib-board { margin: 0 0 var(--s5); }
.lib-board figcaption { font-size: 15px; margin-top: var(--s2); }
.lib-timeline { list-style: none; padding: 0 0 0 var(--s5); margin: 0; border-left: 2px solid var(--rule); }
.lib-timeline li { position: relative; padding: 0 0 var(--s6); scroll-margin-top: var(--s5); }
.lib-timeline li::before { content: ""; position: absolute; left: calc(-1 * var(--s5) - 7px); top: 6px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--brass); }
.lib-timeline h2 { margin: 4px 0 var(--s2); font-size: 22px; }
.lib-timeline p { margin: 0; }
.lib-when { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--brass); }
.lib-when .muted { text-transform: none; letter-spacing: .04em; margin-left: var(--s2); }
.lib-foot { padding-top: 0; }
.board .bd-frame { fill: #3a2512; stroke: var(--rule); stroke-width: 1; }
.board .bd-field { fill: #1c3a2c; }
.board .bd-bar, .board .bd-tray { fill: #2a1a0c; }
.board .bd-tray { stroke: var(--rule-soft); }
.board .bd-rule { stroke: var(--rule); stroke-width: 1; }
.board .bd-pt.a { fill: var(--brass); opacity: .85; }
.board .bd-pt.b { fill: var(--acey-blue); }
.board .bd-num { fill: var(--smoke); font-size: 13px; font-family: var(--body); }
.board .bd-ck { stroke-width: 2; }
.board .bd-ck.light, .board .bd-off.light { fill: var(--ivory); stroke: #8b7a5a; }
.board .bd-ck.dark, .board .bd-off.dark { fill: var(--acey-red); stroke: #5a120e; }
.board .bd-off { stroke-width: 1; }
.board .bd-count { font-size: 18px; font-family: var(--body); }
.board .bd-count.light { fill: var(--navy); }
.board .bd-count.dark { fill: var(--white); }
.board .bd-traynum { fill: var(--ivory); font-size: 16px; font-family: var(--body); }
