/* The account's pages, in the look of ymnmods.com: its colours and its tone ladder, light and dark, its typeface, its
   menu, its buttons, its cards and its footer, by the names and the values they have there (the published pages,
   ymn-mods/ymn-ts-apps `websites/ymnmods/docs/published-site`; the design they follow, the workspace's
   `ops/site-design.md`). Dark follows the device until the person chooses with the menu's switch, as on ymnmods.com;
   the site then sets their choice on the page's root (`data-theme`, `src/pages.ts`, `themed`). Its tokens are
   declared once, in `tokens.css`, which the dashboard loads too. */

/* Beside this file, wherever it is served: the account's host serves both at its root, ymnmods.com both under
   `/posts/assets/` for the posts' pages (`src/articles.ts`). */
@import url("tokens.css");

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background: var(--page);
  color: var(--ink-body);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
main { flex: 1; display: flex; flex-direction: column; }
h1, h2, p, ul, form { margin: 0; }
ul { padding: 0; list-style: none; }
h1, h2 { text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
code { font: inherit; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }

.wrap { width: 100%; max-width: calc(var(--maxw) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

/* Buttons: the site's own, a pill that sinks a little when pressed. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 26px; border: 1px solid transparent; border-radius: 999px;
  font: 600 16px/1 var(--font); white-space: nowrap; cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-soft); }
.btn-ghost { border-color: var(--edge); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--wash); border-color: var(--edge-strong); }
/* A way of signing in: plain, on the card's own ground, as wide as its island. */
.btn-way { width: 100%; border-color: var(--edge); background: var(--card); color: var(--ink); white-space: normal; }
.btn-way:hover { border-color: var(--edge-strong); }
.btn-sm { min-height: 36px; padding: 0 16px; font-size: 14px; }
.btn:active { filter: brightness(.9); }
/* A button's mark before its words: its service's, or the way back. */
.btn-mark { flex: none; width: 20px; height: 20px; fill: currentColor; }
/* A way pressed while it waits (Turnstile's answer, then the service): its mark turns into a spinner. */
.btn[aria-busy="true"] { cursor: progress; }
.btn[aria-busy="true"] .btn-mark { display: none; }
.btn[aria-busy="true"]::before {
  content: ''; flex: none; width: 18px; height: 18px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* Every other control of the form, held while a way goes on: dimmed, and nothing pressed reaches it. */
.btn:disabled:not([aria-busy]), .ways[inert] > summary { opacity: .5; cursor: default; }
@media (prefers-reduced-motion: no-preference) {
  .btn { transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .12s var(--ease); }
  .btn:active { transform: scale(.97); }
}

/* A link in a line of text: the site's own, its colour and the sign after it. */
.link { display: inline-flex; align-items: center; min-height: 44px; color: var(--link); font-weight: 500; }
.link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* The menu: light glass over the page, the name on the left. */
.nav {
  position: fixed; top: env(safe-area-inset-top, 0px); left: 0; right: 0; z-index: 50;
  color: var(--ink);
  background: var(--glass);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  backdrop-filter: saturate(1.4) blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav-bar { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 32px); height: var(--nav-h); }
.brand { margin-right: auto; display: inline-flex; align-items: center; gap: 8px; font: 700 19px/1 var(--font); letter-spacing: -.015em; white-space: nowrap; }
.brand::before { content: ""; flex: none; width: 26px; height: 26px; background: var(--mark) center / contain no-repeat; }
.nav-tools { display: flex; align-items: center; gap: 10px; }
.lang { display: inline-flex; align-items: center; min-height: 36px; padding: 0 6px; font: 500 13px/1 var(--font); color: var(--quiet); }
.lang:hover { color: var(--ink); }
/* The switch between light and dark: ymnmods.com's own, a ring around a moon while the page is light and a sun while
   it is dark. */
.mode-btn {
  position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0;
  border: 1px solid var(--edge); border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer;
}
.mode-btn::after { content: ''; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); }
.mode-btn:hover { background: var(--wash); border-color: var(--edge-strong); }
.mode-btn[hidden] { display: none; }
.mode-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mode-btn .i-sun, .mode-btn[aria-pressed="true"] .i-moon { display: none; }
.mode-btn[aria-pressed="true"] .i-sun { display: block; }
@media (max-width: 759.98px) {
  .btn-sm, .lang { position: relative; }
  .btn-sm::after, .lang::after {
    content: ''; position: absolute; left: 50%; top: 50%;
    width: max(100%, 44px); height: max(100%, 44px); transform: translate(-50%, -50%);
  }
}

/* A page that says or asks one thing: an island on the page, a little dimmer than it. */
.stage {
  flex: 1; display: grid; place-items: center;
  padding: calc(var(--nav-h) + clamp(40px, 8vw, 96px)) var(--gutter) clamp(64px, 10vw, 128px);
}
/* Its sides narrower on a phone: Turnstile's widget is 300 pixels wide at least, and fits a 360-pixel screen. */
.island {
  display: grid; justify-items: center; gap: 12px;
  width: min(100%, 460px); padding: clamp(28px, 3.4vw, 44px) clamp(14px, 3.4vw, 44px);
  border-radius: 28px; background: var(--panel); text-align: center;
}
.island-title { font: 700 clamp(26px, 2.4vw, 32px)/1.15 var(--font); letter-spacing: -.022em; color: var(--ink); }
.island-note { font: 600 clamp(19px, 1.6vw, 21px)/1.4 var(--font); letter-spacing: -.01em; color: var(--ink); }
.island-line { color: var(--ink-2); }
.island-acts { display: grid; gap: 10px; width: 100%; margin-top: 16px; }
.island-acts .btn { width: 100%; }
.island-more { margin-bottom: -8px; font-size: 15px; }
.island-fine { margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.link-inline { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
/* The ways of signing in, one under another, with Turnstile's check at their foot: out of sight unless Cloudflare
   wants a person's click, when it shows itself there. */
.ways-form { display: grid; gap: 10px; }
/* The other ways: "Other options" shows them in the first way's place, with the way back under them. The browser's
   own disclosure, no script: its summary is both, "Other options" while it is closed and the way back, set at its
   foot, while it is open. */
.ways { position: relative; }
.ways > summary { list-style: none; cursor: pointer; }
.ways > summary::-webkit-details-marker { display: none; }
.ways-back, .ways[open] .ways-open { display: none; }
.ways[open] { padding-bottom: 50px; }
.ways[open] > summary { position: absolute; left: 0; right: 0; bottom: 0; }
.ways[open] .ways-back { display: inline-flex; gap: 6px; }
.link-mark { flex: none; width: 16px; height: 16px; fill: currentColor; }
.ways-form:has(> .ways[open]) > .btn-way { display: none; }
.ways-in { display: grid; gap: 10px; }
.ways-line { font-size: 15px; color: var(--ink-2); }

/* The account's page: its heading on the page, then its cards on a grey band. */
.head { padding-block: calc(var(--nav-h) + clamp(40px, 6vw, 88px)) clamp(24px, 3vw, 40px); }
.head-in { display: grid; justify-items: center; gap: 14px; max-width: 760px; margin-inline: auto; text-align: center; }
.head-name { font: 600 15px/1.3 var(--font); letter-spacing: .02em; color: var(--ink); }
.head-title { font: 700 clamp(44px, 7vw, 88px)/.98 var(--font); letter-spacing: -.028em; color: var(--ink); }
.head-line { max-width: 32em; font-size: clamp(17px, 1.4vw, 19px); color: var(--ink-2); overflow-wrap: anywhere; }
.band { flex: 1; padding-block: clamp(16px, 2vw, 32px) clamp(72px, 9vw, 128px); background: var(--panel); }
.cards { display: grid; gap: 12px; max-width: 640px; margin-inline: auto; }
.card { display: grid; justify-items: start; gap: 10px; padding: clamp(28px, 3.4vw, 44px); border-radius: 28px; background: var(--card); }
.card-title { font: 700 clamp(26px, 2.4vw, 32px)/1.15 var(--font); letter-spacing: -.022em; color: var(--ink); }
.card-name { margin-top: 14px; font: 600 15px/1.3 var(--font); letter-spacing: .02em; color: var(--ink-2); }
.card-text { font-size: 17px; line-height: 1.5; color: var(--ink-2); }
.card-act { margin-top: 18px; }
/* The key: hidden until its person shows it, its figures in even widths, taken whole by one press; the eye and the
   copy button beside it. The eye is a checkbox's label, so showing needs no script. */
.key {
  position: relative; display: flex; align-items: center; gap: 2px;
  width: 100%; padding: 4px 4px 4px 16px; border-radius: 16px; background: var(--panel);
}
.key-text, .key-mask {
  flex: 1; min-width: 0;
  font: 600 clamp(15px, 3.6vw, 22px)/1.3 var(--font); font-variant-numeric: tabular-nums; letter-spacing: .01em;
  color: var(--ink);
}
.key-text { display: none; user-select: all; -webkit-user-select: all; }
.key-mask { color: var(--ink-2); letter-spacing: .08em; user-select: none; -webkit-user-select: none; }
.key-shown { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.key-shown:checked ~ .key-text { display: block; }
.key-shown:checked ~ .key-mask { display: none; }
.icon {
  flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 12px; background: transparent; color: var(--ink-2); cursor: pointer;
}
.icon:hover { background: var(--wash); color: var(--ink); }
.icon svg { width: 20px; height: 20px; fill: currentColor; }
.icon[hidden] { display: none; }
.i-hide, .i-done, .key-shown:checked ~ .icon .i-show, .key-copy[data-copied] .i-copy { display: none; }
.key-shown:checked ~ .icon .i-hide, .key-copy[data-copied] .i-done { display: block; }
.key-copy[data-copied] { color: var(--link); }
.key-shown:focus-visible ~ label.icon { outline: 2px solid var(--link); outline-offset: 2px; }
/* How the key stands: a word, and a dot of its colour (green works, amber stopped, red revoked). */
.state { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; font: 600 15px/1.3 var(--font); color: var(--ink); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.state-active .dot { background: var(--ok); }
.state-expired .dot { background: var(--warn); }
.state-revoked .dot, .state-replaced .dot { background: var(--bad); }
/* The device the key is linked to. */
.device { font: 600 17px/1.4 var(--font); color: var(--ink); }

/* The panel: its search, a field and its button in one line; named values, a name and its value beside it. */
.find { display: flex; gap: 10px; width: 100%; }
.field {
  flex: 1; min-width: 0; min-height: 48px; padding: 0 20px;
  border: 1px solid var(--edge); border-radius: 999px; background: var(--panel); color: var(--ink); font: 400 16px/1 var(--font);
}
.field:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
/* News written in the panel: its fields one under another, a text's field some lines tall. */
.write { display: grid; gap: 10px; width: 100%; }
.field-area { min-height: 120px; padding: 14px 20px; border-radius: 20px; line-height: 1.5; resize: vertical; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; width: 100%; font-size: 15px; line-height: 1.4; }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }

/* Said to a reader that listens, and not drawn. */
.unseen { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* The footer: grey, small, the trademark note and the language choice. */
.foot { padding-block: 40px; background: var(--panel); font-size: 13px; color: var(--ink-2); }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 32px; }
.foot a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.foot-note { display: grid; gap: 8px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.foot-bottom a { color: var(--ink-body); }

@media (max-width: 399.98px) {
  .nav-tools { gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .nav { background: var(--page); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  :root { --ink-body: #050D1A; --ink-2: #26303F; --line: rgba(5,13,26,.3); --quiet: #050D1A; }
  .island, .card, .key { box-shadow: inset 0 0 0 1px var(--line); }
  .btn-ghost, .btn-way { border-color: currentColor; }
}
@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --ink-body: #FFFFFF; --ink-2: #D5DAE2; --line: rgba(255,255,255,.32); --quiet: #FFFFFF; }
}
@media (prefers-contrast: more) {
  :root[data-theme="dark"] { --ink-body: #FFFFFF; --ink-2: #D5DAE2; --line: rgba(255,255,255,.32); --quiet: #FFFFFF; }
  .mode-btn { border-color: currentColor; }
}

/* Join early access's dialog (`pages.ts`, `joinDialog`): the two ways in, each a card with its picture. */
.join { width: min(660px, calc(100% - 32px)); padding: 0; border: 0; border-radius: 28px; background: var(--page); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line), 0 40px 120px -30px rgba(5,13,26,.6); }
.join::backdrop { background: rgba(5, 8, 14, .55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.join-in { display: grid; gap: 22px; padding: clamp(28px, 4vw, 40px); }
.join-title { padding-right: 40px; font: 700 clamp(26px, 2.6vw, 32px)/1.1 var(--font); letter-spacing: -.02em; }
.join-ways { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 560px) { .join-ways { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.join-way { display: grid; gap: 12px; padding: 10px 10px 16px; border-radius: 22px; background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); transition: translate .25s var(--ease), box-shadow .25s var(--ease); }
.join-way:hover { translate: 0 -3px; box-shadow: inset 0 0 0 1px var(--line), 0 16px 36px -18px rgba(5,13,26,.3); }
.join-way:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.join-way img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; border-radius: 14px; object-fit: cover; background: #0B0F17; }
.join-pictures { display: grid; }
.join-pictures img { grid-area: 1 / 1; transition: opacity .6s cubic-bezier(.4, 0, .2, 1); }
.join-pictures img + img { opacity: 0; }
.join-pictures.is-turned img:first-child { opacity: 0; }
.join-pictures.is-turned img + img { opacity: 1; }
.join-name { padding-inline: 6px; font: 600 17px/1.3 var(--font); letter-spacing: -.01em; }
.join-close { position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--edge); border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer; }
.join-close svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.join-close:hover { background: var(--wash); border-color: var(--edge-strong); }
@media (prefers-reduced-motion: reduce) { .join-way, .join-pictures img { transition: none; } }