/* Toughroom landing: BlankPxl's quiet family look (hairlines, small radii, one action colour) with Toughroom's
   vermilion spark. Logical properties throughout so the Persian (RTL) and English (LTR) pages share one sheet. */

@font-face { font-family: Peyda; src: url(fonts/peyda-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Peyda; src: url(fonts/peyda-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: Peyda; src: url(fonts/peyda-700.woff2) format("woff2"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url(fonts/space-grotesk-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url(fonts/space-grotesk-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url(fonts/space-grotesk-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(fonts/jetbrains-mono-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(fonts/jetbrains-mono-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #f2f3f6;
  --card: #fbfbfd;
  --raised: #e9ebf0;
  --input: #ffffff;
  --line: #dde0e7;
  --line-2: #c7ccd6;
  --fg: #0b0e13;
  --fg-2: #3b414a;
  --fg-3: #5f6670;
  --accent: #c2410c;        /* text + fill, 5.2:1 on white */
  --accent-fill: #c2410c;
  --accent-hover: #9a3412;
  --on-accent: #ffffff;
  --spark: #ff5a1f;         /* pixels and the raised brow only, never small text */
  --error: #b42318;
  --grid: rgba(11, 14, 19, 0.055);
  --logo-tile: #0b0e13;
  --logo-ink: #ffffff;
  --face-tile: #fbfbfd;
  --face-ink: #0b0e13;
  --shadow: 0 1px 0 rgba(11, 14, 19, 0.04), 0 18px 40px -24px rgba(11, 14, 19, 0.28);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --radius: 8px;
  --radius-sm: 6px;
  --font: Peyda, "Space Grotesk", Tahoma, sans-serif;
  --font-latin: "Space Grotesk", Peyda, ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", Peyda, ui-monospace, SFMono-Regular, Menlo, monospace;
}
/* Per-script type. Persian and Arabic share Peyda (it covers both); Latin pages use Space Grotesk; Cyrillic, Devanagari,
   Bengali and CJK use the system's own good fonts, so no big font downloads. */
:is(html, .langhint)[data-script="latin"] { --font: var(--font-latin); }
:is(html, .langhint)[data-script="cyrillic"] { --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
:is(html, .langhint)[data-script="deva"] { --font: "Noto Sans Devanagari", "Kohinoor Devanagari", "Devanagari Sangam MN", "Nirmala UI", "Mukta", system-ui, sans-serif; --font-mono: var(--font); }
:is(html, .langhint)[data-script="beng"] { --font: "Noto Sans Bengali", "Bangla Sangam MN", "Nirmala UI", "Vrinda", "Shonar Bangla", system-ui, sans-serif; --font-mono: var(--font); }
:is(html, .langhint)[data-script="han"] { --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", "WenQuanYi Micro Hei", system-ui, sans-serif; --font-mono: var(--font); }
html[data-script="cyrillic"] { --font-mono: var(--font); }
/* Persian pages: the "system" labels use Peyda, so Persian words keep normal spacing (JetBrains Mono's space is wide). */
html[data-script="arab"] { --font-mono: Peyda, "JetBrains Mono", ui-monospace, monospace; }
html[data-script="arab"] .mono, html[data-script="arab"] .eyebrow, html[data-script="arab"] .idea, html[data-script="arab"] .who { font-size: 0.8125rem; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 1rem/1.9 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
html:is([data-script="latin"], [data-script="cyrillic"]) body { line-height: 1.6; }
img, svg { display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: 500; text-wrap: balance; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }
::selection { background: color-mix(in srgb, var(--spark) 28%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 640px) { .wrap { padding-inline: 24px; } }
@media (min-width: 1024px) { .wrap { padding-inline: 32px; } }

.mono { font-family: var(--font-mono); font-size: 0.75rem; line-height: 1.5; color: var(--fg-3); }
.skip { position: absolute; inset-inline-start: 12px; top: -48px; z-index: 50; background: var(--fg); color: var(--bg); padding: 8px 12px; border-radius: var(--radius-sm); }
.skip:focus { top: 12px; }

/* ---------- eyebrow, headings ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 0.75rem; line-height: 1.5; color: var(--accent); margin-bottom: 14px; }
.eyebrow::before { content: ""; inline-size: 6px; block-size: 6px; background: var(--spark); }
/* Uppercase eyebrows and tight tracking are Latin/Cyrillic typography only, never CJK, Devanagari, Bengali or Arabic. */
html[data-script="latin"] .eyebrow, html[data-script="cyrillic"] .eyebrow { text-transform: uppercase; letter-spacing: 0.08em; }
/* Scripts with tall marks or dense glyphs get more air than Latin. */
html:is([data-script="deva"], [data-script="beng"], [data-script="han"]) body { line-height: 1.75; }
html:is([data-script="deva"], [data-script="beng"]) :is(h1, h2, h3) { line-height: 1.4; }
html[data-script="han"] :is(h1, h2, h3) { line-height: 1.35; letter-spacing: 0; }
html[data-script="han"] :is(.lead, .post p, .steps p, .outs dd) { line-height: 1.75; }
h2 { font-size: clamp(1.5rem, 1.6vw + 1rem, 2.125rem); line-height: 1.55; }
html:is([data-script="latin"], [data-script="cyrillic"]) h2 { line-height: 1.15; letter-spacing: -0.015em; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  block-size: 44px; padding-inline: 18px; border: 1px solid transparent; border-radius: var(--radius-sm);
  background: var(--accent-fill); color: var(--on-accent);
  font: 500 0.9375rem/1 var(--font); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 160ms ease, border-color 160ms ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn-sm { block-size: 36px; padding-inline: 14px; font-size: 0.875rem; }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line-2); }
.btn-block { inline-size: 100%; }
.btn[aria-busy="true"] { opacity: 0.7; pointer-events: none; }
.link-btn { background: none; border: 0; padding: 4px; color: var(--fg-3); font: 400 0.875rem/1 var(--font); cursor: pointer; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--accent-hover); }
  .btn-ghost:hover { background: var(--raised); border-color: var(--line-2); }
  .link-btn:hover, .nav a:hover { color: var(--fg); }
  .foot a:hover, .access a:hover, .sub a:hover, .back a:hover { color: var(--accent); }
}

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 24px; block-size: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-face { inline-size: 28px; block-size: 28px; }
.wm { font: 600 1.0625rem/1 var(--font-latin); letter-spacing: -0.02em; }
.wm span { font-family: var(--font-mono); font-weight: 500; letter-spacing: -0.04em; color: var(--fg-2); }
.nav { display: none; gap: 22px; margin-inline-start: 12px; }
.nav a { color: var(--fg-3); font-size: 0.875rem; text-decoration: none; transition: color 160ms ease; }
@media (min-width: 820px) { .nav { display: flex; } }
.top-act { display: flex; align-items: center; gap: 12px; margin-inline-start: auto; }
/* language menu: a <details> disclosure; the list opens under the button, on the end side */
.langmenu { position: relative; }
.lang { display: inline-flex; align-items: center; gap: 6px; min-block-size: 32px; padding: 4px 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: transparent; font-family: var(--font); font-size: 0.8125rem; line-height: 1; color: var(--fg-2); cursor: pointer; list-style: none; user-select: none; -webkit-tap-highlight-color: transparent; transition: transform 140ms var(--ease-out), background-color 160ms ease, border-color 160ms ease; }
.lang::-webkit-details-marker { display: none; }
.lang:active { transform: scale(0.97); }
.lang-code { font-weight: 500; letter-spacing: 0.02em; }
.lang-chev { inline-size: 9px; block-size: 6px; color: var(--fg-3); transition: transform 160ms var(--ease-out); }
.langmenu[open] .lang-chev { transform: rotate(180deg); }
.langmenu[open] .lang { border-color: var(--line-2); background: var(--card); }
.lang-list { position: absolute; inset-block-start: calc(100% + 6px); inset-inline-end: 0; z-index: 30; min-inline-size: 168px; max-block-size: min(80vh, 480px); overflow-y: auto; margin: 0; padding: 4px; list-style: none; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transform-origin: top; }
html[dir="rtl"] .lang-list { transform-origin: top left; }
html[dir="ltr"] .lang-list { transform-origin: top right; }
.lang-list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-block-size: 40px; padding: 6px 10px; border-radius: var(--radius-sm); color: var(--fg-2); font-size: 0.9375rem; line-height: 1.3; text-decoration: none; transition: background-color 120ms ease, color 120ms ease; }
.lang-list a[aria-current="true"] { color: var(--fg); font-weight: 500; }
.lang-list a[aria-current="true"]::after { content: ""; inline-size: 6px; block-size: 6px; background: var(--spark); flex: none; }
.lang-list a:focus-visible, .lang:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
@media (hover: hover) and (pointer: fine) {
  .lang:hover { background: var(--raised); }
  .lang-list a:hover { background: var(--raised); color: var(--fg); }
}
@media (prefers-reduced-motion: no-preference) {
  .langmenu[open] .lang-list { animation: lang-in 160ms var(--ease-out); }
}
@keyframes lang-in { from { opacity: 0; transform: scale(0.97); } }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: 56px 72px; }
@media (min-width: 960px) { .hero { padding-block: 88px 104px; } }
.grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 70% 30%, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 70% at 70% 30%, #000 25%, transparent 75%);
}
html[dir="rtl"] .grid-bg { -webkit-mask-image: radial-gradient(ellipse 70% 70% at 30% 30%, #000 25%, transparent 75%); mask-image: radial-gradient(ellipse 70% 70% at 30% 30%, #000 25%, transparent 75%); }
.hero-in { position: relative; display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) { .hero-in { grid-template-columns: 1.05fr 0.95fr; gap: 56px; } }
h1 { font-size: clamp(2rem, 3.2vw + 1rem, 3.375rem); line-height: 1.4; }
h1 span { display: block; }
h1 span + span { color: var(--fg-3); }
h1 em { font-style: normal; color: var(--accent); }
html:is([data-script="latin"], [data-script="cyrillic"]) h1 { line-height: 1.06; letter-spacing: -0.03em; }
.lead { margin-top: 20px; max-inline-size: 34em; color: var(--fg-2); font-size: 1.0625rem; }
html:is([data-script="latin"], [data-script="cyrillic"]) .lead { font-size: 1.125rem; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 32px; }
.cta-row.center { justify-content: center; }
.access { font-size: 0.875rem; color: var(--fg-3); }
.access a { color: var(--fg); transition: color 160ms ease; }

/* the stage: the room and an example feed */
.stage { position: relative; margin: 0; }
.stage figcaption { margin-bottom: 10px; }
.room-card, .feed-card, .report, .outs > div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.room-card { padding: 14px; }
.card-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.dots { display: flex; gap: 4px; }
.dots i { inline-size: 6px; block-size: 6px; background: var(--line-2); }
.dots i:first-child { background: var(--spark); }
.room { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
@media (min-width: 960px) { .room { grid-template-columns: repeat(6, 1fr); gap: 10px; } }
.room li { aspect-ratio: 1; }
.room .face { inline-size: 100%; block-size: 100%; }
.feed-card { position: relative; padding: 14px 16px; margin-top: 12px; box-shadow: var(--shadow); }
@media (min-width: 960px) { .feed-card { margin-top: -18px; margin-inline-start: 36px; } }
.idea { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 0.75rem; color: var(--fg-3); padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.idea::before { content: ""; flex: none; inline-size: 6px; block-size: 6px; background: var(--spark); }
.feed { display: grid; }
.post { display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding-block: 12px; border-bottom: 1px solid var(--line); }
.post:last-child { border-bottom: 0; padding-bottom: 2px; }
.who { display: block; font-family: var(--font-mono); font-size: 0.6875rem; color: var(--fg-3); line-height: 1.6; }
.post p { font-size: 0.9375rem; line-height: 1.75; color: var(--fg); }
html:is([data-script="latin"], [data-script="cyrillic"]) .post p { line-height: 1.5; }

/* faces */
.face .tile { fill: var(--face-tile); stroke: var(--line-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.face .ink { fill: var(--face-ink); }
.face .b-up { fill: var(--spark); opacity: 0; transform: translateY(6px); transform-box: fill-box; transition: opacity 180ms ease, transform 240ms var(--ease-out); }
.face .b-flat { transition: opacity 140ms ease; }
.face .brow.up .b-up { opacity: 1; transform: none; }
.face .brow.up .b-flat { opacity: 0; }
.face-sm { inline-size: 28px; block-size: 28px; }
.face-xs { inline-size: 24px; block-size: 24px; }
.face-md { inline-size: 44px; block-size: 44px; }
.face-lg { inline-size: 56px; block-size: 56px; margin-inline: auto; margin-bottom: 20px; }

/* one-time entrance: CSS only, so it works without JS; never on reduced motion */
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .room li { animation: rise 360ms var(--ease-out) both; animation-delay: calc(var(--i) * 35ms + 120ms); }
  .post { animation: rise 420ms var(--ease-out) both; animation-delay: calc(var(--i) * 110ms + 520ms); }
}
@media (prefers-reduced-motion: reduce) { .face .b-up, .face .b-flat { transition: none; } }

/* ---------- sections ---------- */
.sec { padding-block: 64px; border-top: 1px solid var(--line); }
@media (min-width: 960px) { .sec { padding-block: 96px; } }
.two { display: grid; gap: 28px; }
@media (min-width: 900px) { .two { grid-template-columns: 1fr 1.15fr; gap: 64px; } }
.prose { display: grid; gap: 16px; align-content: start; max-inline-size: 38em; }
.prose p { color: var(--fg-2); }
.quotes { margin-top: 8px; border-top: 1px solid var(--line); }
.quotes li { padding-block: 12px; border-bottom: 1px solid var(--line); font-size: 1.25rem; line-height: 1.6; color: var(--fg); }
.note { margin-top: -4px; }

.steps { display: grid; gap: 28px; margin-top: 40px; counter-reset: s; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(4, 1fr); gap: 24px; } }
.steps li { padding-top: 16px; border-top: 1px solid var(--line-2); }
.steps .n { display: block; color: var(--accent); margin-bottom: 10px; }
.steps h3 { font-size: 1.0625rem; line-height: 1.6; margin-bottom: 6px; }
.steps p { color: var(--fg-2); font-size: 0.9375rem; line-height: 1.85; }
html:is([data-script="latin"], [data-script="cyrillic"]) .steps p { line-height: 1.6; }

.two-out { align-items: start; }
.outs { display: grid; gap: 12px; margin-top: 32px; }
@media (min-width: 640px) { .outs { grid-template-columns: repeat(2, 1fr); } }
.outs > div { padding: 16px; }
.outs dt { font-weight: 500; margin-bottom: 4px; }
.outs dd { color: var(--fg-2); font-size: 0.9375rem; line-height: 1.8; }
html:is([data-script="latin"], [data-script="cyrillic"]) .outs dd { line-height: 1.55; }
.report { padding: 20px; box-shadow: var(--shadow); align-self: center; }
@media (min-width: 900px) { .report { margin-top: 56px; } }
.report .label { color: var(--accent); margin-bottom: 10px; }
.report h3 { font-size: 1.125rem; line-height: 1.6; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.report dl { display: grid; }
.report dl > div { padding-block: 12px; border-bottom: 1px solid var(--line); }
.report dt { margin-bottom: 2px; }
.report dd { font-size: 0.9375rem; line-height: 1.7; }
.report-faces { display: flex; gap: 6px; margin-top: 14px; }

.limits { background: var(--raised); }
.uses-l { margin-top: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 6px 10px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--card); font-size: 0.875rem; line-height: 1.5; color: var(--fg-2); }

.final { padding-block: 80px; border-top: 1px solid var(--line); text-align: center; }
@media (min-width: 960px) { .final { padding-block: 112px; } }
.final h2 { max-inline-size: 22em; margin-inline: auto; }
.final .cta-row { margin-top: 28px; }

.foot { border-top: 1px solid var(--line); padding-block: 28px 36px; font-size: 0.875rem; color: var(--fg-2); }
.foot-in { display: grid; gap: 6px; }
.foot a { transition: color 160ms ease; }
/* DB-IP Lite's required credit (language by IP, see deploy/toughroom.tech.conf): present, never loud. */
.foot-credit { font-size: 0.75rem; color: var(--fg-3); }
.muted { color: var(--fg-3); font-size: 0.8125rem; }

/* ---------- login ---------- */
.login-page { min-block-size: 100dvh; display: flex; flex-direction: column; }
.login-main { position: relative; flex: 1; display: grid; place-content: center; padding: 48px 16px 64px; overflow: hidden; }
.login-main .grid-bg { -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 40%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse 60% 60% at 50% 40%, #000 20%, transparent 75%); }
.login { position: relative; inline-size: min(380px, calc(100vw - 32px)); display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; padding: 28px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.login .face-md { margin-bottom: 18px; }
/* every step shares one grid cell, so the card never changes size; only opacity and transform animate */
.flow-steps { display: grid; grid-template-columns: minmax(0, 1fr); }
.step {
  grid-area: 1 / 1; display: grid; align-content: start; min-inline-size: 0;
  opacity: 0; transform: translateY(6px); visibility: hidden; pointer-events: none;
  transition: opacity 110ms ease-out, transform 110ms ease-out, visibility 0s linear 110ms;
}
.step.on {
  opacity: 1; transform: none; visibility: visible; pointer-events: auto;
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), visibility 0s;
}
/* the rare owner form doesn't size the card for everyone else: zero height until opened */
.step-owner { block-size: 0; overflow: hidden; }
.step-owner.on { block-size: auto; overflow: visible; }
.login h1 { font-size: 1.375rem; line-height: 1.5; }
html:is([data-script="latin"], [data-script="cyrillic"]) .login h1 { letter-spacing: -0.015em; line-height: 1.25; }
.login .sub { margin-top: 6px; color: var(--fg-3); font-size: 0.9375rem; line-height: 1.75; }
.login .sub .em { color: var(--fg); font-family: var(--font-latin); font-size: 0.9em; overflow-wrap: anywhere; }
.login label { margin-top: 16px; margin-bottom: 6px; font-size: 0.8125rem; color: var(--fg-2); }
.login input {
  block-size: 44px; padding-inline: 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--input); color: var(--fg); font: 400 16px/1 var(--font-latin); min-inline-size: 0;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.login input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.login input[aria-invalid="true"] { border-color: var(--error); }
.login input.code { block-size: 54px; text-align: center; font: 500 1.625rem/1 var(--font-mono); letter-spacing: 0.5em; padding-inline: 0.5em 0; }
html:not([data-script="latin"]) .login input.code { font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; }
.login input[name=first_name], .login input[name=last_name] { font-family: var(--font); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row2 > div { display: grid; min-inline-size: 0; }
.alt { margin-top: 16px; text-align: center; font-size: 0.875rem; color: var(--fg-3); }
.alt a { color: var(--fg); transition: color 160ms ease; }
.alt-split { display: flex; justify-content: space-between; gap: 12px; }
.linkish {
  padding: 4px 0; border: 0; background: none; color: var(--fg-3); font: inherit; cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}
.linkish:active { transform: scale(0.97); }
.linkish:disabled { cursor: default; text-decoration: none; opacity: 0.8; }
.linkish:focus-visible, .alt a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
@media (hover: hover) and (pointer: fine) {
  .linkish:not(:disabled):hover, .alt a:hover { color: var(--accent); text-decoration-color: currentColor; }
}
@media (prefers-reduced-motion: reduce) {
  .step, .step.on { transform: none; transition: opacity 120ms linear, visibility 0s; }
}
/* Language hint (site.js): a quiet card at the bottom, in the visitor's language; no layout shift. */
.langhint[data-script="arab"] { --font: Peyda, "Space Grotesk", Tahoma, sans-serif; }
.langhint { position: fixed; z-index: 60; inset-inline: 16px; inset-block-end: max(16px, env(safe-area-inset-bottom)); margin-inline: auto; max-inline-size: 460px; display: flex; align-items: center; gap: 10px; padding-block: 8px; padding-inline: 16px 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); font-family: var(--font); color: var(--fg-2); opacity: 0; transform: translateY(8px); transition: opacity 200ms ease, transform 240ms var(--ease-out); }
.langhint[data-on] { opacity: 1; transform: none; }
.langhint[data-off] { opacity: 0; transform: translateY(4px); transition-duration: 140ms, 160ms; }
.langhint p { flex: 1; margin: 0; font-size: 0.875rem; line-height: 1.45; }
.langhint .btn { flex: none; }
.langhint-x { flex: none; display: grid; place-items: center; inline-size: 32px; block-size: 32px; padding: 0; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--fg-3); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform 140ms var(--ease-out), background-color 160ms ease, color 160ms ease; }
.langhint-x svg { inline-size: 12px; block-size: 12px; }
.langhint-x:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .langhint-x:hover { background: var(--raised); color: var(--fg); } }
@media (prefers-reduced-motion: reduce) { .langhint, .langhint[data-off] { transform: none; transition: opacity 160ms ease; } }
.err { min-block-size: 1.6em; margin-block: 10px 8px; color: var(--error); font-size: 0.875rem; line-height: 1.6; }
.back { position: relative; margin-top: 18px; text-align: center; font-size: 0.875rem; color: var(--fg-3); }
.back a { transition: color 160ms ease; }
