/* ═══════════════════════════════════════════════════════════════════════════
   Sard — legal & public information pages
   Built on Sard's own design tokens. Light is Ivory (the application's
   DEFAULT_LIGHT); dark is Charcoal. Both are real Sard themes, not
   approximations, so these pages read as part of the application.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ---- The application's own bundled faces, subset to web weight ---- */
@font-face{font-family:"SardUILatin";src:url("fonts/plex-400.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap;}
@font-face{font-family:"SardUILatin";src:url("fonts/plex-500.woff2") format("woff2");font-weight:500;font-style:normal;font-display:swap;}
@font-face{font-family:"SardUILatin";src:url("fonts/plex-700.woff2") format("woff2");font-weight:700;font-style:normal;font-display:swap;}
/* Arabic is routed by unicode-range inside one stack, so a mixed string shapes
   correctly with no markup — the same mechanism the application uses. */
@font-face{font-family:"SardUIArabic";src:url("fonts/plex-ar-400.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap;
  unicode-range:U+0600-06FF,U+0750-077F,U+08A0-08FF,U+FB50-FDFF,U+FE70-FEFF,U+200C-200F;}
@font-face{font-family:"SardUIArabic";src:url("fonts/plex-ar-600.woff2") format("woff2");font-weight:500 700;font-style:normal;font-display:swap;
  unicode-range:U+0600-06FF,U+0750-077F,U+08A0-08FF,U+FB50-FDFF,U+FE70-FEFF,U+200C-200F;}
@font-face{font-family:"Literata";src:url("fonts/literata-var.woff2") format("woff2");font-weight:200 900;font-style:normal;font-display:swap;}

/* ═══ TOKENS ══════════════════════════════════════════════════════════════
   Eight colour tokens. Every other surface on these pages is a color-mix of
   one of them — rule 1 of the theme kit.
   ═══════════════════════════════════════════════════════════════════════ */
/* Sard — the default paper, and what the site opens on. These are the
   application's Ivory values (its DEFAULT_LIGHT); the site presents them under
   the product's own name rather than the internal theme name. */
:root{
  color-scheme:light;
  --paper-bg:#F5EEDD; --app-bg:#E7DCC4; --chrome-bg:#EAE0CA;
  --chrome-border:rgba(43,37,33,.10);
  --text:#2B2521; --muted:#8A7E6E; --accent:#9C5A3C; --selection:rgba(156,90,60,.20);
  --sh-page:0 0 30px rgba(60,40,16,.10), -1px 0 0 rgba(43,37,33,.05), 1px 0 0 rgba(43,37,33,.05);
  --sh-raise:0 6px 18px rgba(40,28,14,.16);
  --sh-float:0 16px 42px rgba(40,28,14,.24);
  --grain-blend:multiply; --grain-op:.035;
  --gilt:#C9A15E;

  --ui:"SardUILatin","SardUIArabic",system-ui,"Segoe UI",sans-serif;
  --display:"Literata","SardUIArabic",Georgia,serif;

  --measure:68ch;
  /* The easing family, named as the kit names it */
  --arrive:cubic-bezier(.22,1,.36,1);
  --slide:cubic-bezier(.22,.61,.36,1);
  --press:cubic-bezier(.32,.72,.32,1);
  /* The long arrival, for things that take most of a second to settle */
  --settle:cubic-bezier(.16,1,.3,1);

  /* Running text that is secondary but still meant to be read. --muted alone
     sits near 3.4:1 on the paper, which suits a caption and not a paragraph;
     this mix keeps its warmth and clears 6:1 on both papers. Declared on the
     root, so it follows whichever paper is applied there. */
  --ink-2:color-mix(in srgb, var(--text) 58%, var(--muted));

  /* The accent as INK — links, eyebrows, small marks — and the label on an accent FILL. Most looks
     use the accent itself for the first and the paper for the second; a look whose accent is too
     dark or too light to read as text on its own paper names its own pair below. */
  --accent-ink:var(--accent);
  --on-accent:var(--paper-bg);
}
/* ═══ THE LOOKS ═══════════════════════════════════════════════════════════
   Sard opens on its own paper; every other look is chosen. There is no
   `prefers-color-scheme` default — the opening paper is a decision, not an
   inheritance. Each look is the eight colour tokens of a real Sard look, keyed
   by `data-theme-id`; `data-theme="dark"` adds what every night paper shares.
   `color-scheme` follows the look, so scrollbars and form controls do too.

   A look with a picture shows it on the desk, behind the sheet, the way the
   application shows a look's picture behind the library.
   ═══════════════════════════════════════════════════════════════════════ */
:root[data-theme="dark"]{
  color-scheme:dark;
  --sh-page:inset 1px 0 0 rgba(255,255,255,.05), inset -1px 0 0 rgba(255,255,255,.05);
  --sh-raise:0 6px 18px rgba(0,0,0,.40);
  --sh-float:0 16px 42px rgba(0,0,0,.50);
  --grain-blend:screen; --grain-op:.020;
  --gilt:#D8B678;
}
/* Charcoal — the application's own night theme. */
:root[data-theme-id="charcoal"]{
  --paper-bg:#1C1C1E; --app-bg:#161617; --chrome-bg:#161617;
  --chrome-border:rgba(255,255,255,.07);
  --text:#DCD9D2; --muted:#8A8881; --accent:#C98A5E; --selection:rgba(201,138,94,.28);
}
/* Ember & Iron — true black with ember accents, over a station at dusk. */
:root[data-theme-id="ember"]{
  --paper-bg:#000000; --app-bg:#0E0E0E; --chrome-bg:#0E0E0E;
  --chrome-border:rgba(255,255,255,.10);
  --text:#CFC8BA; --muted:#7C776E; --accent:#C98A5E; --selection:rgba(201,138,94,.30);
  --gilt:#D1B58B;
  --desk-art:url("looks/art-ember.webp");
}
/* RedRose — slate and crimson. The crimson is a fill colour; as text it is
   lifted until it reads on the slate. */
:root[data-theme-id="redrose"]{
  --paper-bg:#2B3540; --app-bg:#1E2328; --chrome-bg:#282F36;
  --chrome-border:rgba(235,215,179,.12);
  --text:#EBD7B3; --muted:#A39B8A; --accent:#CE2D2D; --selection:rgba(206,45,45,.24);
  --accent-ink:#F2857A; --on-accent:#FFFFFF; --gilt:#E2B46F;
  --desk-art:url("looks/art-redrose.webp");
}
/* Ninth Wave — deep sea and flame, after Aivazovsky. */
:root[data-theme-id="ninthwave"]{
  --paper-bg:#101B1A; --app-bg:#0A1211; --chrome-bg:#0D1716;
  --chrome-border:rgba(232,220,200,.10);
  --text:#E6DCCB; --muted:#86918B; --accent:#E8783C; --selection:rgba(232,120,60,.26);
  --gilt:#F0A35E;
  --desk-art:url("looks/art-ninthwave.webp");
}
/* Sierra — mist and morning light, after Bierstadt. The ochre is deepened a
   step for text, and a fill carries a white label. */
:root[data-theme-id="sierra"]{
  --paper-bg:#EFEEE8; --app-bg:#E2E1D9; --chrome-bg:#E8E7E0;
  --chrome-border:rgba(31,38,34,.12);
  --text:#1F2622; --muted:#666C65; --accent:#8C6B2F; --selection:rgba(140,107,47,.22);
  --accent-ink:#7A5C24; --on-accent:#FFFFFF; --gilt:#B58E45;
  --desk-art:url("looks/art-sierra.webp");
}

/* The picture sits on its own fixed layer under the desk, so the page scrolls over
   it without repainting it, and a look without one draws nothing at all. */
body::before{
  content:""; position:fixed; inset:0; z-index:-1; pointer-events:none;
  background:var(--desk-art, none) center / cover no-repeat;
}
body{isolation:isolate;}
@media print{body::before{display:none;}}

*{box-sizing:border-box;}
/* `hidden` must win over any display a component sets, or content the script
   has not filled yet shows up empty. */
[hidden]{display:none !important;}
::selection{background:var(--selection);}
html{-webkit-text-size-adjust:100%;}
body{
  margin:0; background:var(--app-bg); color:var(--text);
  font-family:var(--ui); font-size:16px; line-height:1.65;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
}

/* ═══ THE DESK AND THE PAGE ═══════════════════════════════════════════════
   Sard's founding image: a page resting on a desk. The desk shows in the
   margins; the page is opaque and carries the text.
   ═══════════════════════════════════════════════════════════════════════ */
.desk{min-height:100vh; display:flex; justify-content:center; padding:0 clamp(0px,3vw,48px);}
:root:is([data-theme-id="ember"],[data-theme-id="redrose"],[data-theme-id="ninthwave"],[data-theme-id="sierra"]) body{background:var(--app-bg);}
:root:is([data-theme-id="ember"],[data-theme-id="redrose"],[data-theme-id="ninthwave"],[data-theme-id="sierra"]) .sheet{box-shadow:0 0 0 1px var(--chrome-border), 0 24px 80px rgba(0,0,0,.45);}
.sheet{
  position:relative; width:100%; max-width:940px;
  background:var(--paper-bg); box-shadow:var(--sh-page);
  padding:0 clamp(20px,5vw,64px) 0;
}
.grain{
  position:absolute; inset:0; pointer-events:none; z-index:0;
  opacity:var(--grain-op); mix-blend-mode:var(--grain-blend);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.sheet > *:not(.grain){position:relative; z-index:1;}

/* ═══ CHROME — the top bar ════════════════════════════════════════════════ */
.chrome{
  margin-inline:calc(-1 * clamp(20px,5vw,64px));
  padding:0 clamp(14px,4vw,26px);
  display:flex; align-items:center; gap:14px; min-height:64px; flex-wrap:wrap;
  /* Opaque, and no backdrop blur: blurring what scrolls under a sticky bar is a
     known source of flicker in Chromium on a fast scroll, and at this opacity it
     was never visible anyway. */
  background:var(--chrome-bg);
  border-bottom:1px solid var(--chrome-border);
  transition:box-shadow 240ms ease;
}
/* Sticky, through `.sheet >` on purpose: `.sheet > *:not(.grain)` gives every
   child of the sheet `position:relative`, and a bare `.chrome` loses to it — the
   bar used to scroll away with the page and arrive last on the way back up. */
.sheet > .chrome{position:sticky; top:0; z-index:40;}
/* Once the page is moving under it, the bar lifts — and only then. */
.chrome.is-stuck{box-shadow:0 10px 24px -18px rgba(40,28,14,.45);}
[data-theme="dark"] .chrome.is-stuck{box-shadow:0 10px 24px -16px rgba(0,0,0,.85);}
.brand{display:flex; align-items:center; gap:9px; flex:none; padding:10px 0; text-decoration:none; color:inherit;}
/* THE ARTWORK NEVER MIRRORS.
   RTL moves the layout — the bar, the nav, the cards, the text — but the hoopoe
   is a piece of artwork with a fixed orientation, and it renders identically in
   both languages. Do not add `transform: scaleX(-1)` here: a flipped mark is a
   different mark, and the reader notices it changing when they switch language.
   (Directional UI, such as the card chevron below, does still mirror.) */
.brand img{height:27px; width:auto;}
/* The wordmark's internal order never flips — it is pinned LTR on itself. */
.wordmark{display:inline-flex; align-items:baseline; gap:7px; direction:ltr;}
.wordmark b{font:700 1.0625rem/1 var(--ui); letter-spacing:.01em;}
.wordmark i{width:1.5px; height:17px; align-self:center; border-radius:2px; background:color-mix(in srgb,var(--text) 28%,transparent);}
.wordmark em{font:600 1.25rem/1 "SardUIArabic",sans-serif; font-style:normal;}

.nav{display:flex; gap:2px; flex-wrap:wrap; flex:1 1 auto; min-width:0;}
.nav a{
  font:500 .8125rem/1 var(--ui); color:var(--muted); text-decoration:none;
  padding:8px 10px; border-radius:6px; white-space:nowrap;
  transition:color 150ms linear, background-color 150ms linear;
}
.nav a:hover{color:var(--text); background:color-mix(in srgb,var(--accent) 12%,transparent);}
.nav a[aria-current="page"]{color:var(--text); font-weight:600;}
.chrome-tools{display:flex; align-items:center; gap:6px; flex:none;}
.tool{
  display:inline-flex; align-items:center; justify-content:center; gap:7px; cursor:pointer;
  min-height:34px; padding:0 12px; border-radius:9px;
  border:1px solid var(--chrome-border); background:color-mix(in srgb,var(--text) 5%,transparent);
  color:var(--text); font:600 .75rem var(--ui);
  transition:background-color 150ms linear, border-color 150ms linear;
}
.tool:hover{background:color-mix(in srgb,var(--text) 9%,transparent);}
.tool svg{width:15px; height:15px; flex:none;}

/* ═══ THE LOOK PICKER ═════════════════════════════════════════════════════
   Six looks, so a menu rather than a segmented control: the button shows the
   look being worn, and the menu shows every look as a small piece of its own
   paper, with its accent and — where it has one — its picture.
   ═══════════════════════════════════════════════════════════════════════ */
.picker{position:relative; flex:none;}
.look-btn{gap:8px; padding:0 10px 0 8px;}
.look-btn[aria-expanded="true"]{background:color-mix(in srgb,var(--text) 10%,transparent);}
.look-btn .chev{width:12px; height:12px; opacity:.6; transition:transform 220ms var(--arrive);}
.look-btn[aria-expanded="true"] .chev{transform:rotate(180deg);}
/* A swatch is the look's paper with its accent laid along the reading edge. */
.swatch{
  position:relative; flex:none; width:18px; height:18px; border-radius:5px; overflow:hidden;
  background:var(--sw-paper); box-shadow:inset 0 0 0 1px rgba(128,128,128,.40);
}
.swatch::after{content:""; position:absolute; inset-block:0; inset-inline-end:0; width:5px; background:var(--sw-accent);}
.look-menu{
  position:absolute; inset-inline-end:0; top:calc(100% + 8px); z-index:80;
  width:248px; padding:6px; border-radius:13px;
  background:var(--chrome-bg); border:1px solid var(--chrome-border); box-shadow:var(--sh-float);
  transform-origin:var(--menu-origin, top right);
  animation:menu-in 200ms var(--arrive);
}
[dir="rtl"] .look-menu{--menu-origin:top left;}
.look-menu[hidden]{display:none;}
@keyframes menu-in{from{opacity:0; transform:translateY(-4px) scale(.97);}}
.look-item{
  display:flex; align-items:center; gap:11px; width:100%; min-height:44px; padding:6px 8px;
  border:0; border-radius:9px; background:transparent; color:var(--text); cursor:pointer;
  font:500 .8125rem var(--ui); text-align:start;
  transition:background-color 150ms linear;
}
.look-item:hover,.look-item:focus-visible{background:color-mix(in srgb,var(--text) 7%,transparent); outline:none;}
.look-item .swatch{width:46px; height:30px; border-radius:6px; background:var(--sw-paper) var(--sw-art, none) center / cover;}
.look-item .swatch::after{width:7px;}
.look-item .tick{margin-inline-start:auto; width:16px; height:16px; color:var(--accent-ink); opacity:0;}
.look-item[aria-checked="true"]{font-weight:600;}
.look-item[aria-checked="true"] .tick{opacity:1;}
[data-lang="ar"] .look-item{font-size:.875rem;}
/* Arabic never gets letterspacing or faux-bold — kit rule 4 */
[data-lang="ar"] .tool{letter-spacing:0;}
.tool[aria-expanded]{min-height:34px;}

:where(a,button,summary):focus-visible{outline:2px solid var(--accent); outline-offset:2px; border-radius:4px;}

/* ═══ MASTHEAD ════════════════════════════════════════════════════════════ */
.mast{padding:clamp(44px,7vw,86px) 0 clamp(30px,4vw,46px); text-align:center;}
.mast-hero{position:relative; display:inline-flex; align-items:center; justify-content:center;}
.mast-halo{
  position:absolute; left:50%; top:54%; transform:translate(-50%,-50%);
  width:290px; height:210px; pointer-events:none; filter:blur(4px);
  background:radial-gradient(50% 50% at 50% 50%, rgba(232,195,106,.38), transparent 70%);
}
/* Fixed orientation in both languages — see the note on `.brand img`. */
.mast-bird{position:relative; height:98px; width:auto; filter:drop-shadow(0 10px 18px rgba(40,28,14,.20));}
/* The lockup: Latin, a quiet ink divider, Arabic. Monochrome — the divider is
   never the accent. The Arabic is set larger so the two read at one weight. */
.lockup{display:flex; align-items:center; justify-content:center; gap:20px; margin:8px 0 14px; direction:ltr;}
.lockup-latin{font:600 clamp(2.125rem,5.5vw,3rem)/1 var(--display); letter-spacing:.01em;}
.lockup-bar{width:1px; height:clamp(32px,4.6vw,46px); background:var(--text); opacity:.28;}
.lockup-ar{font:600 clamp(2.375rem,6.4vw,3.5rem)/1 "SardUIArabic",sans-serif; transform:translateY(-2px);}
/* One plain line under the lockup, softening only at its two ends. */
.mast-rule{
  width:150px; height:1px; margin:5px auto 24px;
  background:linear-gradient(to right,transparent,color-mix(in srgb,var(--text) 26%,transparent) 22%,color-mix(in srgb,var(--text) 26%,transparent) 78%,transparent);
}
.mast h1{
  margin:0 0 14px; font:600 clamp(1.75rem,3.9vw,2.5rem)/1.22 var(--display);
  text-wrap:balance; letter-spacing:-.01em;
}
.mast .lede{margin:0 auto; max-width:56ch; font:400 clamp(1rem,1.4vw,1.0625rem)/1.72 var(--ui); color:var(--ink-2); text-wrap:pretty;}
.mast-meta{
  margin-top:30px; display:flex; flex-wrap:wrap; gap:8px 10px; justify-content:center;
  font:500 .75rem var(--ui); color:var(--muted);
}
.mast-meta span{
  padding:5px 12px; border-radius:999px; border:1px solid var(--chrome-border);
  background:color-mix(in srgb,var(--text) 4%,transparent);
}

/* Arabic goes up one step in size and one in weight — kit rule 4 */
[data-lang="ar"] .mast h1{font-weight:600; font-size:clamp(1.875rem,4.2vw,2.625rem); line-height:1.4;}
[data-lang="ar"] .mast .lede{font-size:clamp(1.0625rem,1.5vw,1.125rem); line-height:1.9;}
[data-lang="ar"] .mast-meta{font-size:.8125rem;}

/* ═══ THE DOWNLOAD ════════════════════════════════════════════════════════
   The one accent-filled action on the page, directly under the sentence that
   says what Sard is. The link is the latest release page until the script has
   asked GitHub for the newest installer; then it is the installer itself.
   ═══════════════════════════════════════════════════════════════════════ */
.get{margin:28px 0 0; scroll-margin-top:96px;}
.get > div{display:flex; flex-direction:column; align-items:center;}
.btn.btn-download{
  min-height:52px; padding:0 28px; border-radius:11px; gap:10px;
  font-size:.9375rem; letter-spacing:.005em;
  box-shadow:0 10px 24px -14px color-mix(in srgb,var(--accent) 85%,transparent);
  transition:background-color 160ms linear, box-shadow 240ms ease, transform 200ms var(--press);
}
.btn.btn-download:hover{transform:translateY(-2px); box-shadow:0 16px 30px -16px color-mix(in srgb,var(--accent) 95%,transparent);}
.btn.btn-download:active{transform:translateY(0) scale(.985); transition-duration:90ms;}
.btn-download svg{width:18px; height:18px;}
.btn-download .dl-done{display:none;}
.btn-download.is-started .dl-get{display:none;}
.btn-download.is-started .dl-done{display:block;}
.get-meta{
  margin:13px 0 0; display:flex; flex-wrap:wrap; justify-content:center; gap:4px 0;
  font:500 .8125rem var(--ui); color:var(--muted);
}
.get-meta span + span::before{content:"·"; margin-inline:9px; opacity:.7;}
.get-meta b{font-weight:600; color:var(--text);}
.get-note{
  margin:0; max-height:0; overflow:hidden; opacity:0;
  font:600 .8125rem/1.5 var(--ui); color:var(--accent-ink);
  transition:max-height 360ms var(--arrive), opacity 260ms ease, margin 360ms var(--arrive);
}
.get-note.is-on{max-height:3em; opacity:1; margin-top:8px;}
.get-alt{margin:12px 0 0; display:flex; flex-wrap:wrap; justify-content:center; gap:4px 18px; font:500 .8125rem var(--ui);}
.get-alt a{
  color:var(--muted); text-decoration:none; padding:2px 0;
  background:linear-gradient(currentColor,currentColor) no-repeat 0 100% / 0 1px;
  transition:color 160ms linear, background-size 260ms var(--arrive);
}
[dir="rtl"] .get-alt a{background-position:100% 100%;}
.get-alt a:hover{color:var(--accent-ink); background-size:100% 1px;}
[data-lang="ar"] .btn.btn-download{font-size:1rem; letter-spacing:0;}

/* The Android beta, under the download: as large and as solid as Windows' button, filled with the
   look's ink rather than its accent so the two never read as one, and marked as a test version on
   the button itself and in the line under it. */
.get-beta{
  margin:30px 0 0; width:min(100%,460px);
  display:flex; flex-direction:column; align-items:center;
}
.btn.btn-beta{
  min-height:52px; padding:0 14px 0 24px; border-radius:11px; gap:10px;
  font-size:.9375rem; letter-spacing:.005em;
  background:var(--text); color:var(--paper-bg); border-color:var(--text);
  box-shadow:0 10px 24px -14px color-mix(in srgb,var(--text) 80%,transparent);
  transition:background-color 160ms linear, box-shadow 240ms ease, transform 200ms var(--press);
}
[dir="rtl"] .btn.btn-beta{padding:0 24px 0 14px;}
.btn.btn-beta:hover{
  transform:translateY(-2px); color:var(--paper-bg);
  background:color-mix(in srgb,var(--text) 86%,var(--accent)); border-color:color-mix(in srgb,var(--text) 86%,var(--accent));
  box-shadow:0 16px 30px -16px color-mix(in srgb,var(--text) 90%,transparent);
}
.btn.btn-beta:active{transform:translateY(0) scale(.985); transition-duration:90ms;}
.btn-beta svg{width:18px; height:18px;}
/* The two downloads stand one above the other at one width, as a pair. */
.btn.btn-download,.btn.btn-beta{min-width:264px;}
.beta-pill{
  margin-inline-start:4px; padding:3px 10px; border-radius:999px;
  font:700 .75rem/1.35 var(--ui); letter-spacing:.02em;
  color:var(--on-accent); background:var(--accent);
}
.get-meta .beta-tag{color:var(--accent-ink); font-weight:600;}
.get-beta-why{
  margin:8px 0 0; max-width:46ch; text-align:center; text-wrap:pretty;
  font:400 .8125rem/1.65 var(--ui); color:var(--muted);
}
[data-lang="ar"] .btn.btn-beta{font-size:1rem; letter-spacing:0;}
[data-lang="ar"] .beta-pill{font-size:.8125rem; letter-spacing:0;}
[data-lang="ar"] .get-beta-why{font-size:.875rem; line-height:1.85;}
[data-lang="ar"] .get-meta,[data-lang="ar"] .get-alt,[data-lang="ar"] .get-note{font-size:.875rem;}

/* ═══ DOCUMENT CARDS (homepage) ═══════════════════════════════════════════ */
.cards{display:grid; grid-template-columns:repeat(auto-fit,minmax(266px,1fr)); gap:16px; margin:0 0 12px;}
.card{
  display:flex; flex-direction:column; gap:9px;
  padding:22px 24px 24px; border-radius:11px; text-decoration:none; color:inherit;
  border:1px solid var(--chrome-border);
  background:color-mix(in srgb,var(--text) 3%,transparent);
  transition:border-color 160ms linear, background-color 160ms linear, transform 160ms var(--press);
}
.card:hover{
  border-color:color-mix(in srgb,var(--accent) 45%,transparent);
  background:color-mix(in srgb,var(--accent) 7%,transparent);
  transform:translateY(-1px);
}
.card-ico{
  width:38px; height:38px; border-radius:9px; display:grid; place-items:center; margin-bottom:3px;
  border:1px solid color-mix(in srgb,var(--accent) 34%,transparent);
  background:color-mix(in srgb,var(--accent) 10%,transparent);
  color:var(--accent-ink);
}
.card-ico svg{width:19px; height:19px;}
.card-ico{transition:transform 320ms var(--arrive), background-color 160ms linear;}
.card:hover .card-ico{transform:translateY(-2px) rotate(-5deg); background:color-mix(in srgb,var(--accent) 16%,transparent);}
/* Scoped through `.cards` so they outrank `.doc h2`, `.doc p` and `.doc a`, which
   would otherwise give the titles a section heading's size and top margin and
   paint the whole card in the link colour. */
.cards .card{color:var(--text);}
.cards .card h2{margin:0; font:600 1.125rem/1.35 var(--display); letter-spacing:-.005em; transition:color 160ms linear;}
.cards .card:hover h2{color:var(--accent-ink);}
.cards .card p{margin:0; font-size:.9375rem; line-height:1.6; color:var(--ink-2); max-width:none;}
.card-go{
  margin-top:4px; font:600 .8125rem var(--ui); color:var(--accent-ink);
  display:inline-flex; align-items:center; gap:6px;
}
/* A chevron means direction, so it mirrors with the interface — kit §10.2.
   On hover it steps onward, which is also mirrored. */
.card-go svg{width:13px; height:13px; transition:transform 260ms var(--arrive);}
.card:hover .card-go svg{transform:translateX(3px);}
[dir="rtl"] .card-go svg{transform:scaleX(-1);}
[dir="rtl"] .card:hover .card-go svg{transform:scaleX(-1) translateX(3px);}
[data-lang="ar"] .cards .card h2{font-size:1.1875rem; line-height:1.5;}
[data-lang="ar"] .cards .card p{font-size:1rem; line-height:1.85;}

/* ═══ THE LOOKS SECTION ═══════════════════════════════════════════════════
   One chip per look, then the application wearing it: the library large, a
   page of a book laid over its corner. Choosing a chip repaints this page too.
   ═══════════════════════════════════════════════════════════════════════ */
.looks-body{margin-top:22px;}
.look-chips{display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:10px; margin:0 0 18px;}
.look-chip{
  display:flex; flex-direction:column; gap:7px; padding:6px 6px 9px; min-width:0;
  border:1px solid var(--chrome-border); border-radius:11px; cursor:pointer;
  background:color-mix(in srgb,var(--text) 3%,transparent); color:var(--text);
  font:600 .75rem var(--ui); text-align:start;
  transition:border-color 160ms linear, background-color 160ms linear, transform 200ms var(--press);
}
.look-chip:hover{border-color:color-mix(in srgb,var(--accent) 45%,transparent); transform:translateY(-2px);}
.look-chip:active{transform:scale(.98);}
.look-chip[aria-checked="true"]{border-color:var(--accent); background:color-mix(in srgb,var(--accent) 9%,transparent);}
.look-chip img{display:block; width:100%; aspect-ratio:16/10; height:auto; object-fit:cover; border-radius:6px; background:var(--sw-paper);}
.look-chip span{display:flex; align-items:center; gap:7px; padding-inline:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.look-chip span i{flex:none; width:8px; height:8px; border-radius:50%; background:var(--sw-accent); box-shadow:0 0 0 1px rgba(128,128,128,.35);}
.look-chip:focus-visible{outline:2px solid var(--accent-ink); outline-offset:2px;}
[data-lang="ar"] .look-chip{font-size:.8125rem;}

.look-stage{position:relative; padding-bottom:clamp(40px,9vw,96px);}
.look-frame{position:relative; margin:0; overflow:hidden; border-radius:10px; background:#111; box-shadow:var(--sh-float);}
.look-frame img{display:block; width:100%; height:auto; aspect-ratio:16/10; object-fit:cover;}
/* The next look's screen is laid over the current one and fades in only once it
   has fully loaded, so the frame is never empty and never flashes between them. */
.look-frame .look-next{position:absolute; inset:0; height:100%; opacity:0; transition:opacity 380ms ease;}
.look-frame .look-next.is-in{opacity:1;}
/* The page of a book is laid over the library's corner, on the reading edge. */
.look-read{
  position:absolute; inset-inline-end:clamp(-18px,-2vw,-8px); bottom:0; width:46%;
  border-radius:8px; box-shadow:0 0 0 1px rgba(255,255,255,.08), var(--sh-float);
  transition:transform 500ms var(--arrive);
}
.look-stage:hover .look-read{transform:translateY(-6px);}
.look-note{margin:14px 0 0; max-width:64ch; font-size:.9375rem; line-height:1.6; color:var(--ink-2);}
.look-note b{color:var(--text); font-weight:600;}
.doc .look-note{margin:14px 0 0;}
[data-lang="ar"] .look-note{font-size:1rem; line-height:1.85;}
/* The note that a reader is free to make their own look. An accent-tinted
   aside, like `.note`, with the palette as its supporting tile. */
.look-own{
  display:flex; gap:14px; align-items:flex-start; margin:24px 0 0; padding:16px 18px;
  border-radius:11px; border:1px solid color-mix(in srgb,var(--accent) 30%,transparent);
  background:color-mix(in srgb,var(--accent) 8%,transparent);
}
.look-own-ico{
  flex:none; width:38px; height:38px; border-radius:9px; display:grid; place-items:center;
  color:var(--accent-ink); background:color-mix(in srgb,var(--accent) 14%,transparent);
}
.look-own-ico svg{width:20px; height:20px; max-width:20px; max-height:20px;}
.looks .look-own p{margin:0; max-width:72ch; font-size:.9375rem; line-height:1.65; color:var(--ink-2);}
.look-own b{color:var(--text); font-weight:600;}
[data-lang="ar"] .looks .look-own p{font-size:1rem; line-height:1.9;}
@media (max-width:420px){.look-own{padding:14px 15px; gap:12px;} .look-own-ico{width:34px; height:34px;}}
@media (max-width:720px){
  .look-chips{grid-template-columns:repeat(3,minmax(0,1fr));}
  /* Three to a row leaves too little width for a long name on one line, so it wraps. */
  .look-chip span{white-space:normal; align-items:flex-start; line-height:1.3;}
  .look-chip span i{margin-top:.3em;}
  .look-read{width:52%; inset-inline-end:-4px;}
}
/* ON A PHONE: two chips to a row, so every name fits on one line and every chip is
   the same height; and the page of the book sits under the library instead of over
   it, both at the full width, so neither screen hides part of the other. */
@media (max-width:480px){
  .look-chips{grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px;}
  .look-chip span{white-space:nowrap; align-items:center;}
  .look-chip span i{margin-top:0;}
  .look-stage{padding-bottom:0;}
  .look-read{position:static; width:100%; margin-top:10px; border-radius:10px;}
  .look-stage:hover .look-read{transform:none;}
}

/* ═══ THE TOUR ════════════════════════════════════════════════════════════
   Real screens from the application, set on the desk the way the specimen's
   page is: the desk colour around, the screen raised on it. The tabs are the
   theme control's segmented style, with one sliding piece of paper under the
   chosen tab.
   ═══════════════════════════════════════════════════════════════════════ */
.tour{margin-top:22px;}
.tour-tabs{
  position:relative; display:flex; gap:2px; width:max-content; max-width:100%;
  margin:0 0 14px; padding:4px; border-radius:11px; overflow-x:auto; scrollbar-width:none;
  border:1px solid var(--chrome-border); background:color-mix(in srgb,var(--text) 5%,transparent);
}
.tour-tabs::-webkit-scrollbar{display:none;}
.tour-tab{
  position:relative; z-index:1; flex:none; min-height:36px; padding:0 14px;
  border:0; border-radius:8px; background:transparent; cursor:pointer; white-space:nowrap;
  color:var(--ink-2); font:600 .8125rem var(--ui);
  transition:color 180ms ease;
}
.tour-tab:hover{color:var(--text);}
.tour-tab[aria-selected="true"]{color:var(--accent-ink);}
.tour-tab:focus-visible{outline:2px solid var(--accent); outline-offset:-2px;}
.tour-pill{
  position:absolute; z-index:0; top:0; left:0; width:0; height:0; border-radius:8px;
  background:var(--paper-bg); box-shadow:0 1px 2px rgba(0,0,0,.12);
}
.tour-pill.is-placed{transition:transform 460ms var(--arrive), width 460ms var(--arrive), height 460ms var(--arrive);}
/* On the night paper the sheet is darker than the tab bar around it, so the
   chosen tab is lifted a step towards the ink instead. */
[data-theme="dark"] .tour-pill{background:color-mix(in srgb,var(--text) 14%,var(--paper-bg)); box-shadow:none;}
[data-lang="ar"] .tour-tab{font-size:.875rem;}
@media (hover:none){.tour-tab{min-height:42px;}}

.tour-desk{
  background:var(--app-bg); border:1px solid var(--chrome-border); border-radius:13px;
  padding:clamp(8px,1.8vw,16px);
}
/* The screens are the application's own night theme, so the frame behind them
   is the same near-black whichever paper this page is on. */
.tour-frame{
  display:grid; aspect-ratio:16/10; overflow:hidden; border-radius:8px;
  background:#141414; box-shadow:var(--sh-float);
}
.tour-shot{grid-area:1/1; min-width:0;}
.tour-shot img{display:block; width:100%; height:100%; object-fit:cover;}
/* Without script only the first screen exists; with it, all are stacked in
   one cell and the chosen one fades up over the rest. */
.tour-shot:not(.is-active){display:none;}
.tour.is-live .tour-shot{
  display:block; opacity:0; visibility:hidden;
  transition:opacity 420ms ease, visibility 0s linear 420ms;
}
.tour.is-live .tour-shot.is-active{opacity:1; visibility:visible; transition:opacity 420ms ease;}
.tour.is-live .tour-shot img{transform:scale(1.03); transition:transform 1100ms var(--settle);}
.tour.is-live .tour-shot.is-active img{transform:none;}

.tour-notes{display:grid; margin-top:14px;}
.tour .tour-note{grid-area:1/1; margin:0; max-width:64ch; font-size:.9375rem; line-height:1.6; color:var(--ink-2);}
.tour-note b{color:var(--text); font-weight:600;}
.tour .tour-note:not(.is-active){display:none;}
.tour.is-live .tour-note{display:block; opacity:0; visibility:hidden; transform:translateY(4px);
  transition:opacity 200ms ease, transform 200ms ease, visibility 0s linear 200ms;}
.tour.is-live .tour-note.is-active{opacity:1; visibility:visible; transform:none;
  transition:opacity 360ms ease 120ms, transform 420ms var(--arrive) 120ms;}
[data-lang="ar"] .tour .tour-note{font-size:1rem; line-height:1.85;}

/* ═══ READING PROGRESS ════════════════════════════════════════════════════
   A hairline of how far through the document you are. It occupies no reading
   space and shifts nothing when it moves — the chrome serves the page.
   ═══════════════════════════════════════════════════════════════════════ */
.rail{position:fixed; inset-block-start:0; inset-inline:0; height:2px; z-index:60; pointer-events:none;}
.rail i{
  display:block; height:100%; background:var(--accent); opacity:.85;
  transform:scaleX(var(--read,0)); transform-origin:var(--rail-origin,left) center;
}
@media print{.rail{display:none;}}

/* ═══ CLAUSE ANCHORS ══════════════════════════════════════════════════════
   Legal text gets quoted and pointed at, so every clause is linkable. Quiet
   until wanted; on touch, where there is no hover, it stays faintly visible
   rather than being unreachable.
   ═══════════════════════════════════════════════════════════════════════ */
.anchor{
  margin-inline-start:.45em; font-size:.75em; font-weight:400; color:var(--accent-ink);
  text-decoration:none; opacity:0; transition:opacity 150ms linear;
  vertical-align:.06em;
}
.doc h2:hover .anchor,.anchor:focus-visible{opacity:1;}
@media (hover:none){.anchor{opacity:.4;}}

/* ═══ ACTIONS ═════════════════════════════════════════════════════════════
   Exactly one accent-filled action per surface — kit rule 5. On the home page
   that one is Download; everything else is ghost or quiet.
   ═══════════════════════════════════════════════════════════════════════ */
.actions{display:flex; flex-wrap:wrap; gap:10px; margin:18px 0 0;}
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:9px;
  min-height:42px; padding:0 20px; border-radius:9px; cursor:pointer;
  font:600 .875rem var(--ui); text-decoration:none; border:1px solid transparent;
  transition:background-color 160ms linear, border-color 160ms linear,
             color 160ms linear, transform 160ms var(--press);
}
.btn svg{width:16px; height:16px; flex:none;}
.btn:hover{transform:translateY(-1px);}
.btn:active{transform:scale(.98); transition-duration:80ms;}
/* Doubled class on purpose. These buttons sit inside `.doc`, and `.doc a` sets a
   colour at specificity (0,1,1) — a single `.btn-primary` (0,1,0) loses to it and
   the label ends up painted accent-on-accent, which is invisible. `.btn.btn-*`
   is (0,2,0) and wins. Do not simplify these selectors. */
.btn.btn-primary{background:var(--accent); color:var(--on-accent); border-color:var(--accent);}
.btn.btn-primary:hover{background:color-mix(in srgb,var(--accent) 86%, var(--text)); color:var(--on-accent);}
.btn.btn-ghost{background:transparent; color:var(--text); border-color:var(--chrome-border);}
.btn.btn-ghost:hover{border-color:color-mix(in srgb,var(--accent) 50%,transparent); color:var(--accent-ink);}
/* The third level: a bare action with no box at all, for the secondary
   destination in a panel that already has a filled or outlined primary. */
.btn.btn-quiet{background:transparent; color:var(--muted); border-color:transparent; padding-inline:10px;}
.btn.btn-quiet:hover{color:var(--accent-ink); background:color-mix(in srgb,var(--accent) 10%,transparent);}
.btn[aria-disabled="true"]{opacity:.45; pointer-events:none;}
[data-lang="ar"] .btn{font-size:.9375rem; letter-spacing:0;}

/* ═══ THE TWO PANELS ══════════════════════════════════════════════════════
   Get Sard and Contact sit side by side directly under the document cards, so
   the four things a visitor needs — what Sard is, where to download it, where
   the source is, where to report — are all inside the first screen and a half.

   The mark is a SUPPORTING element at the same 38–42 px as the document cards'
   icon, set beside the content rather than above it. It must never grow into
   artwork: the heading, the sentence and the actions are the section.
   ═══════════════════════════════════════════════════════════════════════ */
.panels{display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:16px;}
.panel{
  border:1px solid var(--chrome-border); border-radius:11px;
  background:color-mix(in srgb,var(--text) 3%,transparent);
  padding:20px 22px;
}
.panel-split{display:flex; gap:15px; align-items:flex-start;}
.panel-ico{
  width:40px; height:40px; border-radius:9px; flex:none; display:grid; place-items:center;
  border:1px solid color-mix(in srgb,var(--accent) 32%,transparent);
  background:color-mix(in srgb,var(--accent) 9%,transparent);
  color:var(--accent-ink);
}
/* A hard ceiling, so no future edit can turn the mark back into a poster. */
.panel-ico svg{width:20px; height:20px; max-width:20px; max-height:20px;}
.panel-body{min-width:0; flex:1 1 auto;}
/* Scoped through `.panels` for the same reason as the cards. */
.panels .panel h2{margin:0 0 6px; font:600 1.0625rem/1.35 var(--display); letter-spacing:-.005em;}
.panel .eyebrow{margin-bottom:5px;}
.panels .panel p{margin:0; color:var(--ink-2); font-size:.9375rem; line-height:1.6; max-width:44ch;}
/* The headings of the latest release's own notes, one per line. They arrive
   one after another when the release has been read. */
.panel .news{list-style:none; margin:10px 0 0; padding:0; max-width:none;}
.panel .news li{
  position:relative; margin:0 0 5px; padding-inline-start:16px;
  font-size:.9375rem; line-height:1.5; color:var(--text);
  animation:news-in 520ms var(--arrive) both; animation-delay:calc(var(--i,0) * 70ms);
}
.panel .news li::before{
  content:""; position:absolute; inset-inline-start:2px; top:.62em;
  width:6px; height:6px; border-radius:50%; background:var(--accent);
}
@keyframes news-in{from{opacity:0; transform:translateY(6px);}}
[data-lang="ar"] .panel .news li{font-size:1rem; line-height:1.75;}
/* Tight enough that a primary and a quiet action share one line inside a
   two-up column — the two panels then read as a matched pair rather than one
   wrapping and the other not. */
.panel .actions{margin-top:14px; gap:6px;}
.panel .btn{min-height:36px; padding:0 12px; font-size:.8125rem;}
.panel .btn.btn-quiet{padding-inline:8px;}
.panels .panel .meta{
  margin:10px 0 0; font:500 .75rem var(--ui); color:var(--muted);
  display:flex; flex-wrap:wrap; gap:4px 12px; max-width:none;
}
[data-lang="ar"] .panels .panel h2{font-size:1.125rem; line-height:1.5;}
[data-lang="ar"] .panels .panel p{font-size:1rem; line-height:1.85;}
[data-lang="ar"] .panel .btn{font-size:.875rem;}
[data-lang="ar"] .panels .panel .meta{font-size:.8125rem;}
/* Below the two-up breakpoint the mark stays beside the text, not above it —
   stacking it is what made the section tall in the first place. */
@media (max-width:420px){
  .panel{padding:17px 18px;}
  .panel-split{gap:13px;}
  .panel-ico{width:34px; height:34px; border-radius:8px;}
  .panel-ico svg{width:17px; height:17px;}
  .panel .actions{flex-direction:column; align-items:stretch;}
  .panel .btn{width:100%;}
}

/* ═══ THE REPORT FORM ═════════════════════════════════════════════════════
   Composes a report here, then hands it to GitHub's own composer with every
   field already filled in. Nothing is submitted from this page — see the note
   in sard.js for why that is the architecture.
   ═══════════════════════════════════════════════════════════════════════ */
.form{max-width:var(--measure); margin:30px 0 0;}
.field{margin:0 0 22px;}
.field > label,.field-label{
  display:block; margin-bottom:7px;
  font:600 .8125rem var(--ui); color:var(--text);
}
.field .hint{margin:0 0 9px; font-size:.8125rem; line-height:1.55; color:var(--muted);}
[data-lang="ar"] .field > label,[data-lang="ar"] .field-label{font-size:.9375rem;}
[data-lang="ar"] .field .hint{font-size:.875rem; line-height:1.8;}

.input,.textarea{
  width:100%; font:400 .9375rem/1.6 var(--ui); color:var(--text);
  background:var(--paper-bg); border:1px solid var(--chrome-border);
  border-radius:7px; padding:11px 13px;
  transition:border-color 150ms linear, box-shadow 150ms linear;
}
.textarea{resize:vertical; min-height:8.5rem;}
.input::placeholder,.textarea::placeholder{color:color-mix(in srgb,var(--muted) 80%,transparent);}
.input:hover,.textarea:hover{border-color:color-mix(in srgb,var(--text) 22%,transparent);}
.input:focus,.textarea:focus{
  outline:none; border-color:color-mix(in srgb,var(--accent) 60%,transparent);
  box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 14%,transparent);
}
[data-lang="ar"] .input,[data-lang="ar"] .textarea{font-size:1rem; line-height:1.85;}

/* Issue type — cards rather than a select, because the choice sets which form
   the reader lands on and is worth seeing all of at once. */
.choices{display:grid; grid-template-columns:repeat(auto-fit,minmax(148px,1fr)); gap:9px;}
.choice{
  display:flex; align-items:flex-start; gap:9px; cursor:pointer; text-align:start;
  padding:12px 13px; border-radius:9px; min-height:44px;
  border:1px solid var(--chrome-border); background:transparent; color:var(--text);
  font:500 .8125rem/1.4 var(--ui);
  transition:border-color 150ms linear, background-color 150ms linear;
}
.choice:hover{border-color:color-mix(in srgb,var(--accent) 40%,transparent);}
.choice[aria-checked="true"]{
  border-color:var(--accent);
  background:color-mix(in srgb,var(--accent) 9%,transparent);
  font-weight:600;
}
.choice-dot{
  width:15px; height:15px; border-radius:50%; flex:none; margin-top:1px;
  border:1.5px solid color-mix(in srgb,var(--text) 32%,transparent);
  display:grid; place-items:center;
}
.choice[aria-checked="true"] .choice-dot{border-color:var(--accent);}
.choice[aria-checked="true"] .choice-dot::after{
  content:""; width:7px; height:7px; border-radius:50%; background:var(--accent);
}
.choice:focus-visible{outline:2px solid var(--accent); outline-offset:2px;}
[data-lang="ar"] .choice{font-size:.875rem; line-height:1.7;}

/* Where the reader is told what happens next, and why. */
.handoff{
  margin:26px 0 0; padding:16px 18px; border-radius:9px;
  border:1px solid var(--chrome-border);
  background:color-mix(in srgb,var(--text) 3%,transparent);
}
.handoff p{margin:0 0 12px; font-size:.875rem; line-height:1.65; color:var(--muted);}
.handoff p:last-child{margin-bottom:0;}
.handoff b{color:var(--text); font-weight:600;}
[data-lang="ar"] .handoff p{font-size:.9375rem; line-height:1.85;}
.copied{font:600 .75rem var(--ui); color:var(--accent-ink);}

/* ═══ DRAWN ARABIC HEADINGS ═════════════════════════════════════════════════
   The Arabic headings are Thmanyah Serif Display, with its own long swash
   finals on chosen words, drawn as outlines by tools/arabic-headings.py — the
   face's licence allows it in a website's design but not as a hosted font
   file. The real text sits beside each drawing for screen readers, search and
   copying. The drawing is sized from the heading's own font size: --a is its
   width over its height, and 1.42em is the face's line box at that size.
   ═══════════════════════════════════════════════════════════════════════ */
.vh{position:absolute !important; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden;
  clip:rect(0 0 0 0); clip-path:inset(50%); white-space:nowrap; border:0;}
.ar-type{display:block; --ar-h:calc(1.42em * var(--ar-scale, 1.08));}
.ar-display{display:block; width:calc(var(--a) * var(--ar-h)); max-width:100%; height:auto; overflow:visible;}
.mast .ar-display{margin-inline:auto;}
.ar-narrow{display:none;}
.mast .ar-type{--ar-scale:1.12; margin-block:-.12em -.06em;}
.doc h2 .ar-type{--ar-scale:1.14; margin-block:-.18em -.1em;}
.cards .card h2 .ar-type,.panels .panel h2 .ar-type{--ar-scale:1.1; margin-block:-.16em -.12em;}
@media (max-width:600px){
  .mast .ar-wide{display:none;}
  .mast .ar-narrow{display:block;}
  .mast .ar-narrow .ar-display + .ar-display{margin-top:-.32em;}
}
@media (forced-colors:active){.ar-display path{fill:CanvasText;}}

/* ═══ DOCUMENT BODY ═══════════════════════════════════════════════════════ */
.doc{padding:clamp(30px,4vw,44px) 0 0; max-width:var(--measure);}
/* A section that uses the sheet's whole width — cards, panels, the tour. */
.doc.doc-wide{max-width:none;}
/* The tour, being the first thing after the masthead, gets more air above. */
#inside{padding-top:clamp(36px,5vw,56px);}
/* An eyebrow already opens the section, so the heading under it does not. */
.doc span.eyebrow + h2{margin-top:0;}
.doc .fineprint{font-size:.9375rem; color:var(--muted);}
[data-lang="ar"] .doc .fineprint{font-size:1rem;}
.eyebrow{
  font:700 .6875rem var(--ui); letter-spacing:.16em; text-transform:uppercase;
  color:var(--accent-ink); display:block; margin-bottom:9px;
}
/* Arabic is never uppercased or letterspaced — kit §10.2 */
[data-lang="ar"] .eyebrow{text-transform:none; letter-spacing:0; font-size:.8125rem;}

.doc h2{
  margin:40px 0 12px; font:600 1.3125rem/1.35 var(--display);
  letter-spacing:-.005em; scroll-margin-top:88px;
}
/* :where() keeps this at the weight of `.doc h2`, so a component's own heading
   rule (the cards, the panels) is not overruled by a first-of-type count. */
.doc h2:where(:first-of-type){margin-top:26px;}
.doc h3{margin:26px 0 9px; font:600 .9375rem/1.4 var(--ui);}
.doc p{margin:0 0 14px; max-width:var(--measure); text-wrap:pretty;}
.doc ul{margin:0 0 16px; padding-inline-start:1.2rem; max-width:var(--measure);}
.doc li{margin-bottom:8px;}
.doc li::marker{color:var(--accent-ink);}
.doc a{color:var(--accent-ink); text-underline-offset:2px;}

/* ---- The project's accounts ----------------------------------------------------
   Inside the panel the page already gives the Contact eyebrow to, rather than in a
   section of their own at the foot: the site had designated a place for this, and a
   second "Contact" heading above the footer read as an afterthought because it was
   one.

   The panel's closing band, not its smallest print. The names carry the body ink at
   the weight of a heading, the marks carry the accent the panel's own icon and
   eyebrow use, and the rule runs the width of the text column so the two anchor its
   ends. Still no fill, no border, no lift — the prominence is ink and size, which is
   how the rest of the page makes something matter.

   After `.doc a` on purpose: both are (0,1,1) and a tie is settled by order, so a
   block placed earlier loses and the names come out as ordinary accent links. */
.accounts{
  display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between;
  gap:10px 26px; margin:16px 0 0; padding-top:13px;
  border-top:1px solid color-mix(in srgb,var(--text) 13%,transparent);
}
a.account{
  display:inline-flex; align-items:center; gap:9px; text-decoration:none;
  color:var(--text); font:600 .9375rem var(--ui);
  transition:color 160ms linear;
}
a.account svg{width:17px; height:17px; flex:none; color:var(--accent-ink);}
a.account .account-name{text-underline-offset:3px;}
a.account:hover{color:var(--accent-ink);}
a.account:hover .account-name{text-decoration:underline;}
a.account:focus-visible{outline:2px solid var(--accent); outline-offset:3px; border-radius:4px;}
.doc strong{font-weight:600; color:var(--text);}
.doc .lede{margin:0 0 4px; font-size:1.0625rem; line-height:1.75; color:var(--ink-2); text-wrap:pretty;}
.doc code{
  font-family:ui-monospace,"Cascadia Mono",Consolas,monospace; font-size:.8125em;
  background:color-mix(in srgb,var(--text) 7%,transparent); padding:.14em .4em; border-radius:4px;
  word-break:break-word;
}
[data-lang="ar"] .doc{font-size:1.0625rem;}
[data-lang="ar"] .doc p,[data-lang="ar"] .doc li{line-height:1.9;}
[data-lang="ar"] .doc h2{font-size:1.4375rem; line-height:1.5;}
[data-lang="ar"] .doc h3{font-size:1.0625rem; line-height:1.55;}
[data-lang="ar"] .doc .lede{font-size:1.125rem; line-height:1.95;}
/* Arabic numerals inside Arabic prose still read as Western digits here, which
   is what a legal date needs — but they must not be reordered by bidi. */
.doc time,.num{unicode-bidi:isolate;}

/* The stamp — issue date and version */
.stamp{
  display:flex; flex-wrap:wrap; gap:8px 10px; margin:0 0 6px;
  font:500 .6875rem var(--ui); color:var(--muted);
}
.stamp span{
  padding:5px 11px; border-radius:999px; border:1px solid var(--chrome-border);
  background:color-mix(in srgb,var(--text) 4%,transparent);
}
[data-lang="ar"] .stamp{font-size:.8125rem;}

/* A note — the accent-tinted aside */
.note{
  max-width:var(--measure); margin:0 0 18px; padding:14px 17px; border-radius:9px;
  border:1px solid color-mix(in srgb,var(--accent) 26%,transparent);
  background:color-mix(in srgb,var(--accent) 8%,transparent);
  font-size:.9375rem; line-height:1.65;
}
.note p:last-child{margin-bottom:0;}
.note b{color:var(--accent-ink);}
[data-lang="ar"] .note{font-size:1rem; line-height:1.9;}

/* A TODO — deliberately visible. Colour is never the only signal, so it also
   carries the word itself in a badge — kit rule 7. */
.todo{
  max-width:var(--measure); margin:0 0 18px; padding:14px 17px; border-radius:9px;
  border:1px dashed color-mix(in srgb,#b05220 46%,transparent);
  background:color-mix(in srgb,#b05220 8%,transparent);
  font-size:.9375rem; line-height:1.65;
}
.todo-badge{
  display:inline-block; font:700 .5625rem var(--ui); letter-spacing:.09em; text-transform:uppercase;
  padding:3px 8px; border-radius:999px; margin-inline-end:9px; vertical-align:1px;
  color:#fff; background:#b05220;
}
[data-lang="ar"] .todo{font-size:1rem; line-height:1.9;}
[data-lang="ar"] .todo-badge{letter-spacing:0; font-size:.625rem;}

/* The "at a glance" facts list */
.facts{list-style:none; margin:0 0 18px; padding:0; max-width:var(--measure);}
.facts li{
  display:flex; gap:11px; align-items:flex-start; margin-bottom:11px; font-size:.9375rem; line-height:1.6;
}
.facts .mark{
  flex:none; width:19px; height:19px; margin-top:2px; border-radius:50%;
  display:grid; place-items:center; font-size:.6875rem; font-weight:700;
}
.facts .yes{background:color-mix(in srgb,var(--accent) 16%,transparent); color:var(--accent-ink);}
.facts .no{background:color-mix(in srgb,var(--text) 8%,transparent); color:var(--muted);}
.facts .mark svg{width:11px; height:11px;}
[data-lang="ar"] .facts li{font-size:1rem; line-height:1.85;}

/* ═══ FOOTER ══════════════════════════════════════════════════════════════ */
.foot{
  margin-top:clamp(44px,6vw,72px);
  margin-inline:calc(-1 * clamp(20px,5vw,64px));
  padding:26px clamp(20px,5vw,64px) 34px;
  border-top:1px solid var(--chrome-border);
  display:flex; flex-wrap:wrap; gap:14px 26px; align-items:center; justify-content:space-between;
  font-size:.8125rem; color:var(--muted);
}
.foot a{color:var(--muted); text-decoration:none; border-bottom:1px solid transparent; transition:color 150ms linear, border-color 150ms linear;}
.foot a:hover{color:var(--accent-ink); border-bottom-color:color-mix(in srgb,var(--accent) 40%,transparent);}
.foot-links{display:flex; flex-wrap:wrap; gap:8px 16px;}
.foot .credits{margin:6px 0 0; max-width:60ch; font-size:.6875rem; line-height:1.55; opacity:.85;}
[data-lang="ar"] .foot .credits{font-size:.75rem;}
[data-lang="ar"] .foot{font-size:.875rem;}

/* ═══ LANGUAGE SWITCHING ══════════════════════════════════════════════════
   Both languages ship in the document so a single URL serves both — which is
   what the Discord Developer Portal needs. With JavaScript off, English shows.
   ═══════════════════════════════════════════════════════════════════════ */
[data-lang="en"] .lang-ar{display:none;}
[data-lang="ar"] .lang-en{display:none;}

/* ═══ MOTION ══════════════════════════════════════════════════════════════
   Three kinds, each with a job.

   The masthead arrives in a little over a second on load: the hoopoe rises,
   the lockup follows, the rule is drawn outward from its middle, then the
   sentence and the download. Pure CSS, so it needs no script, and everything
   is painted on the first frame.

   Below it, each section arrives once as it reaches the reader, its parts in
   reading order. The starting state lives under `html.reveal`, which the
   script sets before first paint and removes again if it fails to wire the
   observer — content is never left hidden. Animations use `backwards` fill,
   so once one ends the element is back to its own styles and hover lifts
   work exactly as before.

   And the paper itself: choosing a theme spreads the new paper from the point
   that was clicked (a view transition, where the browser has them).
   ═══════════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion:no-preference){
  .mast-hero{animation:rise 1000ms var(--settle) both;}
  .lockup{animation:rise 900ms var(--settle) 110ms both;}
  .mast-rule{animation:draw 900ms var(--settle) 260ms both;}
  .mast h1{animation:rise 900ms var(--settle) 220ms both;}
  .mast .lede{animation:rise 900ms var(--settle) 300ms both;}
  .get{animation:rise 900ms var(--settle) 380ms both;}
  .mast-meta{animation:rise 800ms var(--settle) 460ms both;}

  /* After arriving, the hoopoe keeps a slow breath — the one thing on the page
     that moves on its own, and slow enough to read past. */
  .mast-bird{animation:hover-bird 6.5s ease-in-out 1.1s infinite alternate;}
  .mast-halo{animation:glow 6.5s ease-in-out 1.1s infinite alternate;}

  /* The download arrow drops into the tray while the pointer rests on it, and
     the tick draws itself once a download has started. */
  .btn-download:hover .dl-arrow{animation:drop 1100ms var(--slide) infinite;}
  .btn-download.is-started .dl-done{animation:pop 420ms var(--arrive) both;}
  .btn-download.is-started .dl-done path{stroke-dasharray:24; animation:tick 520ms var(--arrive) 60ms both;}

  /* Sections arriving */
  .reveal [data-reveal]:not(.is-in) [data-r]{opacity:0;}
  .reveal [data-reveal].is-in [data-r]{animation:rise 820ms var(--settle) backwards; animation-delay:calc(var(--i,0) * 85ms);}
  .reveal [data-reveal].is-in [data-r="settle"]{animation-name:settle; animation-duration:1100ms;}
  .reveal [data-reveal].is-in [data-r="row"]{animation-name:row; animation-duration:640ms; animation-delay:calc(var(--i,0) * 70ms);}
  .reveal [data-reveal].is-in [data-r="row"] .mark{animation:pop 520ms var(--arrive) backwards; animation-delay:calc(var(--i,0) * 70ms + 180ms);}

}

/* The tour's screen tips up into place as it is scrolled into view, tied to
   the scrollbar rather than to a timer. Only where scroll-driven animation
   exists; elsewhere it arrives like everything else. */
@supports (animation-timeline:view()){
  @media (prefers-reduced-motion:no-preference){
    .tour-desk{transform-origin:50% 100%;}
    .reveal .tour[data-reveal] .tour-desk[data-r]{
      opacity:1; animation:tip linear both;
      animation-timeline:view(); animation-range:entry 0% cover 38%;
    }
  }
}

@keyframes rise{from{opacity:0; transform:translateY(22px);}}
@keyframes settle{from{opacity:0; transform:translateY(18px) scale(.97);}}
@keyframes row{from{opacity:0; transform:translateY(10px);}}
@keyframes draw{from{transform:scaleX(0);}}
@keyframes pop{from{opacity:0; transform:scale(.4);}}
@keyframes tick{from{stroke-dashoffset:24;}}
@keyframes ink{from{background-size:0 100%;}}
@keyframes drop{0%{transform:translateY(0);} 45%{transform:translateY(3px);} 100%{transform:translateY(0);}}
@keyframes hover-bird{to{transform:translateY(-5px) rotate(-1.5deg);}}
@keyframes glow{to{opacity:.72; transform:translate(-50%,-50%) scale(1.07);}}
@keyframes tip{from{opacity:.55; transform:perspective(1600px) rotateX(11deg) translateY(28px) scale(.95);}}

/* The paper spreads from the click: the new view is revealed by a growing
   circle (driven from sard.js), so the browser's own cross-fade is turned off
   for this one transition, and nothing transitions underneath it. */
:root.vt-theme::view-transition-old(root),
:root.vt-theme::view-transition-new(root){animation:none; mix-blend-mode:normal;}
:root.vt-theme *{transition:none !important;}
/* ═══ MOTION — reduced-motion turns movement off, keeps feedback ═══════════ */
/* The response is specific rather than a blanket switch-off: movement goes,
   feedback stays. Hover lifts are removed but their colour change is kept, and
   the progress rail still tracks the scroll — it reports a position, it is not
   an animation. */
@media (prefers-reduced-motion:reduce){
  *{animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important;}
  .card:hover{transform:none;}
  .btn:hover,.btn:active,.btn.btn-download:hover,.btn.btn-download:active,.btn.btn-beta:hover,.btn.btn-beta:active{transform:none;}
  .card:hover .card-ico,.card:hover .card-go svg{transform:none;}
  [dir="rtl"] .card:hover .card-go svg{transform:scaleX(-1);}
  .tour.is-live .tour-shot img{transform:none;}
}

/* ═══ FORCED COLOURS — the decoration turns off completely ════════════════ */
/* Forced colours turn the decoration OFF completely rather than softening it,
   and leave the reader's own configuration untouched. The theme control is
   hidden outright: choosing a paper is meaningless when the system is painting. */
@media (forced-colors:active){
  .grain,.mast-halo,.rail,.tour-pill{display:none;}
  .card,.note,.todo,.tool,.look-chip,.look-menu,.look-own,
  .panel,.btn,.choice,.input,.textarea,.handoff,.tour-desk{border:1px solid CanvasText;}
  .picker,.look-chips{display:none !important;}
  .look-frame,.tour-frame,.btn.btn-download,.btn.btn-beta{box-shadow:none;}
  .tour-tab[aria-selected="true"]{outline:2px solid Highlight;}
}

/* ═══ NARROW ══════════════════════════════════════════════════════════════ */
@media (max-width:560px){
  /* Two rows: the mark and the tools share the first, and the three documents
     sit under them as an even strip — the bar's full width, split in three
     equal parts with a hairline between them, so the second row lines up with
     the edges of the first instead of trailing off from one side. */
  .chrome{min-height:56px; gap:8px; padding-block:8px 0;}
  /* On a phone the bar is two rows, so it scrolls away with the page rather than
     holding a slice of the screen; the look picker is back the moment you scroll up. */
  .sheet > .chrome{position:relative;}
  .chrome-tools{margin-inline-start:auto;}
  .nav{
    order:3; flex-basis:100%; display:grid; grid-template-columns:repeat(3,1fr); gap:0;
    margin-inline:calc(-1 * clamp(14px,4vw,26px)); border-top:1px solid var(--chrome-border);
  }
  .nav a{
    display:flex; align-items:center; justify-content:center; min-height:42px; padding:0 4px;
    border-radius:0; font-size:.75rem; text-align:center; white-space:nowrap;
  }
  /* The mark beside it already leads home, so on a phone the Home link gives
     its room to the three documents. */
  .nav a[href="./"]{display:none;}
  .nav a:not([href="./"]) + a{border-inline-start:1px solid var(--chrome-border);}
  /* The page you are on is marked the way the look picker marks its choice. */
  .nav a[aria-current="page"]{color:var(--accent-ink); box-shadow:inset 0 -2px 0 var(--accent);}
  .nav a:hover{background:color-mix(in srgb,var(--accent) 8%,transparent);}
  [data-lang="ar"] .nav a{font-size:.8125rem;}
  /* In the bar the look shows as its swatch alone; the name stays for screen readers. */
  .look-btn .look-name{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap;}
  .mast-bird{height:76px;}
  .foot{flex-direction:column; align-items:flex-start;}
  .btn.btn-download,.btn.btn-beta{width:100%; max-width:340px;}
  /* The download's details wrap on a phone, and a separator dot would then open the
     second line; spacing alone separates them here. */
  .get-meta{gap:2px 14px;}
  .get-meta span + span::before{content:none;}
  /* The four facts sit two by two, rather than three and one left on its own. */
  .mast-meta{display:grid; grid-template-columns:repeat(2,max-content); justify-content:center;}
  .mast-meta span{text-align:center;}
}

/* ON A PHONE the tour is its own composition. The four tabs are an even two-by-two
   grid; and each screen is a portrait close-up of the feature it names, cut from
   the full screenshot (`<picture>` in index.html), because a whole desktop screen
   shrunk to a phone's width is too small to read. */
@media (max-width:600px){
  .tour-tabs{display:grid; grid-template-columns:1fr 1fr; width:100%; gap:2px;}
  .tour-tab{padding:0 8px; text-align:center;}
  .tour-frame{aspect-ratio:4/5;}
}
.tour-shot picture{display:block; height:100%;}

/* ═══ PRINT — the desk falls away, the page remains ═══════════════════════ */
@media print{
  body{background:#fff; color:#000;}
  .chrome,.foot,.grain,.mast-halo,.chrome-tools,.get,.look-chips,.tour-tabs{display:none;}
  .sheet{box-shadow:none; max-width:none; padding:0;}
  .doc{max-width:none;}
  .card{break-inside:avoid;}
}
