/* ==========================================================================
   Teoriprove - web practice app
   Visual language: Norwegian road signage. Flat sign panels, 2px ink rules,
   no drop shadows anywhere, small radii. Boldness is spent on the two mode
   signs on the home screen; everything inside the quiz stays calm, because
   people use it under exam pressure.
   ========================================================================== */

:root {
  --paper:      #F4F5F2;
  --paper-2:    #FFFFFF;
  --ink:        #15171A;
  --ink-soft:   #5A6066;
  --line:       #CFD3CC;
  --line-hard:  #15171A;

  --blue:       #0B5FA5;
  --blue-deep:  #083F6E;
  --red:        #C8102E;
  --yellow:     #FFD23F;
  --green:      #0E7A3C;

  --ok-bg:      #E4F3E9;
  --no-bg:      #FBE7EA;

  --r:          4px;
  --r-lg:       8px;

  --step--1: 0.8125rem;
  --step-0:  1.0625rem;
  --step-1:  1.3125rem;
  --step-2:  1.625rem;
  --step-3:  2.0625rem;

  --sans: "Barlow", "Helvetica Neue", Arial, "Segoe UI", Roboto, sans-serif;
  --cond: "Barlow Condensed", "Barlow", Arial Narrow, Arial, sans-serif;
  --pers: "Vazirmatn", "Segoe UI", Tahoma, sans-serif;

  --pad: 16px;
  --measure: 34rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:     #15171A;
    --paper-2:   #1E2125;
    --ink:       #ECEEEA;
    --ink-soft:  #9BA3A9;
    --line:      #363B40;
    --line-hard: #4A5057;
    --blue:      #3D8FD4;
    --blue-deep: #8CC2EC;
    --red:       #F2637A;
    --yellow:    #FFD23F;
    --green:     #4FBF7F;
    --ok-bg:     #15301F;
    --no-bg:     #371A20;
  }
}
:root[data-theme="dark"] {
  --paper:     #15171A;
  --paper-2:   #1E2125;
  --ink:       #ECEEEA;
  --ink-soft:  #9BA3A9;
  --line:      #363B40;
  --line-hard: #4A5057;
  --blue:      #3D8FD4;
  --blue-deep: #8CC2EC;
  --red:       #F2637A;
  --yellow:    #FFD23F;
  --green:     #4FBF7F;
  --ok-bg:     #15301F;
  --no-bg:     #371A20;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

html[lang="fa"] body { font-family: var(--pers); line-height: 1.75; }

img { max-width: 100%; height: auto; display: block; border: 0; }

button, input { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.skip {
  position: absolute; inset-inline-start: -9999px; top: 0; z-index: 50;
  background: var(--ink); color: var(--paper); padding: 10px 14px;
}
.skip:focus { inset-inline-start: 0; }

/* ---------- top bar ---------- */

.bar {
  position: sticky; top: 0; z-index: 20;
  background: var(--paper);
  border-bottom: 2px solid var(--line-hard);
  padding-top: env(safe-area-inset-top);
}
.bar__in {
  max-width: 68rem; margin: 0 auto;
  padding: 8px var(--pad);
  display: flex; align-items: center; justify-content: space-between;
}
.bar__right { display: flex; align-items: center; }

.brand {
  display: flex; align-items: center;
  background: none; border: 0; padding: 4px; margin: 0;
  cursor: pointer; color: inherit;
}
.brand__sign { width: 26px; height: 26px; flex: 0 0 auto; }
.brand__name {
  font-family: var(--cond); font-weight: 700;
  font-size: var(--step-1); letter-spacing: 0.01em;
  margin-inline-start: 9px;
}
html[lang="fa"] .brand__name { font-family: var(--pers); font-size: var(--step-0); }

.lang { display: flex; border: 2px solid var(--line-hard); border-radius: var(--r); overflow: hidden; }
.lang__b {
  background: var(--paper-2); border: 0; cursor: pointer;
  padding: 5px 9px; font-size: var(--step--1); font-weight: 500;
  border-inline-start: 1px solid var(--line);
}
.lang__b:first-child { border-inline-start: 0; }
.lang__b[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.clock {
  font-family: var(--cond); font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: var(--step-1);
  border: 2px solid var(--line-hard); border-radius: var(--r);
  padding: 2px 9px; margin-inline-end: 10px;
  background: var(--paper-2);
}
.clock--low { background: var(--red); color: #fff; border-color: var(--red); }

/* ---------- views ---------- */

.view { max-width: 68rem; margin: 0 auto; padding: 0 var(--pad) 48px; }

/* ---------- home ---------- */

.hero { padding: 40px 0 28px; max-width: var(--measure); }
.hero__count {
  font-family: var(--cond); font-weight: 600; font-size: var(--step-0);
  color: var(--ink-soft); margin: 0 0 10px;
}
html[lang="fa"] .hero__count { font-family: var(--pers); }
.hero__h {
  font-family: var(--cond); font-weight: 700;
  font-size: clamp(2rem, 7vw, 3.1rem); line-height: 1.04;
  margin: 0 0 14px; letter-spacing: -0.005em;
}
html[lang="fa"] .hero__h { font-family: var(--pers); font-size: clamp(1.6rem, 6vw, 2.4rem); line-height: 1.35; }
.hero__p { margin: 0; color: var(--ink-soft); max-width: 30rem; }

.modes { display: grid; gap: 14px; }
@media (min-width: 46rem) { .modes { grid-template-columns: 1fr 1fr; } }

.mode {
  display: flex; align-items: flex-start; text-align: start;
  gap: 14px;
  background: var(--paper-2);
  border: 2px solid var(--line-hard); border-radius: var(--r-lg);
  padding: 18px; cursor: pointer; width: 100%;
}
.mode:hover { background: var(--paper); }
.mode[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.mode__sign { flex: 0 0 auto; width: 48px; }
.mode__sign svg { width: 48px; height: 48px; display: block; }
.mode__body { display: block; }
.mode__t {
  display: block; font-family: var(--cond); font-weight: 700;
  font-size: var(--step-2); line-height: 1.1; margin-bottom: 5px;
}
html[lang="fa"] .mode__t { font-family: var(--pers); font-size: var(--step-1); }
.mode__d { display: block; color: var(--ink-soft); font-size: var(--step--1); line-height: 1.45; }
.mode__meta {
  display: block; margin-top: 9px; font-size: var(--step--1); font-weight: 600;
  color: var(--blue);
}

.access {
  margin-top: 30px; padding-top: 22px;
  border-top: 2px solid var(--line);
  max-width: var(--measure);
}
.access__state { margin: 0 0 14px; font-size: var(--step--1); color: var(--ink-soft); }
.access__state b { color: var(--ink); }
.access__lab { display: block; font-size: var(--step--1); font-weight: 600; margin-bottom: 6px; }
.access__row { display: flex; gap: 8px; }
.access__in {
  flex: 1 1 auto; min-width: 0;
  background: var(--paper-2);
  border: 2px solid var(--line-hard); border-radius: var(--r);
  padding: 8px 10px;
}
.access__err { color: var(--red); font-size: var(--step--1); margin: 8px 0 0; font-weight: 600; }
.access__help { color: var(--ink-soft); font-size: var(--step--1); margin: 10px 0 0; }
.access__help a { color: var(--blue); }
.access__reset {
  margin-top: 18px; background: none; border: 0; padding: 0;
  color: var(--ink-soft); font-size: var(--step--1);
  text-decoration: underline; cursor: pointer;
}

/* ---------- quiz ---------- */

.quiz { display: block; padding-top: 20px; }
@media (min-width: 60rem) {
  .quiz { display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: 32px; align-items: start; }
}
.quiz__main { min-width: 0; max-width: 40rem; }

.track { margin-bottom: 16px; }
.track__n {
  font-family: var(--cond); font-weight: 700; font-size: var(--step-1);
  font-variant-numeric: tabular-nums; margin: 0 0 7px;
}
html[lang="fa"] .track__n { font-family: var(--pers); }
.track__sep { color: var(--ink-soft); margin: 0 3px; }
.track__bar {
  height: 8px; background: var(--line); border-radius: 99px; overflow: hidden;
}
.track__fill {
  display: block; height: 100%; width: 0;
  background: var(--blue); border-radius: 99px;
  transition: width 220ms ease;
}

.card {
  background: var(--paper-2);
  border: 2px solid var(--line-hard); border-radius: var(--r-lg);
  padding: 20px;
}
.card__q {
  font-size: var(--step-1); font-weight: 600; line-height: 1.35;
  margin: 0 0 16px;
}
.card__fig { margin: 0 0 16px; }
.card__fig img {
  width: 100%; max-width: 20rem;
  border: 2px solid var(--line); border-radius: var(--r);
  background: #fff;
}

.choices { display: grid; gap: 9px; }

.ch {
  display: flex; align-items: flex-start; gap: 11px;
  width: 100%; text-align: start;
  background: var(--paper);
  border: 2px solid var(--line); border-radius: var(--r);
  padding: 11px 13px; cursor: pointer;
}
.ch:hover { border-color: var(--line-hard); }
.ch__k {
  flex: 0 0 auto;
  width: 1.6em; height: 1.6em;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid currentColor; border-radius: var(--r);
  font-family: var(--cond); font-weight: 700; font-size: var(--step-0);
  line-height: 1;
}
html[lang="fa"] .ch__k { font-family: var(--sans); }
.ch__t { flex: 1 1 auto; min-width: 0; }

.ch[aria-pressed="true"] { border-color: var(--line-hard); background: var(--paper-2); }
.ch[aria-pressed="true"] .ch__k { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.ch--ok { border-color: var(--green); background: var(--ok-bg); }
.ch--ok .ch__k { background: var(--green); color: #fff; border-color: var(--green); }
.ch--no { border-color: var(--red); background: var(--no-bg); }
.ch--no .ch__k { background: var(--red); color: #fff; border-color: var(--red); }
.ch--locked { cursor: default; }
.ch--locked:hover { border-color: inherit; }

.verdict {
  margin: 16px 0 0; padding: 11px 13px;
  border-radius: var(--r); font-weight: 600;
  border: 2px solid transparent;
}
.verdict--ok { background: var(--ok-bg); border-color: var(--green); color: var(--green); }
.verdict--no { background: var(--no-bg); border-color: var(--red); color: var(--red); }

.extras { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.panel {
  margin-top: 12px; padding: 14px;
  background: var(--paper-2);
  border: 2px solid var(--line); border-radius: var(--r);
}
.panel--why { border-inline-start: 6px solid var(--blue); }
.panel__x { margin: 0; }

.gloss { margin: 0; display: grid; gap: 12px; }
.gloss__row { border-top: 1px solid var(--line); padding-top: 9px; }
.gloss__row:first-child { border-top: 0; padding-top: 0; }
.gloss__l {
  display: block; font-size: var(--step--1); color: var(--ink-soft);
  margin-bottom: 1px;
}
.gloss__v { display: block; font-weight: 600; unicode-bidi: isolate; }
/* Each term keeps its own dir so bidi orders it correctly, but all of them
   align to the page's start edge so the list scans as one column. */
html[dir="ltr"] .gloss__v { text-align: left; }
html[dir="rtl"] .gloss__v { text-align: right; }
.gloss__v--fa { font-family: var(--pers); }
.gloss__v--lat { font-family: var(--sans); }

.nav { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; align-items: center; }

.btn {
  background: var(--paper-2); color: var(--ink);
  border: 2px solid var(--line-hard); border-radius: var(--r);
  padding: 9px 15px; cursor: pointer; font-weight: 600;
  font-size: var(--step--1);
}
.btn:hover { background: var(--paper); }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.btn--solid { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn--solid:hover { background: var(--ink-soft); border-color: var(--ink-soft); }
.btn--quiet { border-color: var(--line); font-weight: 500; }
.btn--finish { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn--finish:hover { background: var(--blue-deep); border-color: var(--blue-deep); }
.btn--flag { color: var(--ink-soft); }
.nav .btn--quiet { margin-inline-start: auto; }

/* ---------- side navigator ---------- */

.side { display: none; }
@media (min-width: 60rem) {
  .side { display: block; position: sticky; top: 76px; }
}
.side__h {
  font-family: var(--cond); font-weight: 700; font-size: var(--step-0);
  margin: 0 0 10px;
}
html[lang="fa"] .side__h { font-family: var(--pers); }
.grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.gc {
  aspect-ratio: 1 / 1; min-height: 2rem;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper-2);
  border: 2px solid var(--line); border-radius: 3px;
  font-size: var(--step--1); font-weight: 600; cursor: pointer;
  font-variant-numeric: tabular-nums; padding: 0;
}
.gc--done { background: var(--blue); border-color: var(--blue); color: #fff; }
.gc--here { border-color: var(--ink); border-width: 3px; }
.gc--ok { background: var(--green); border-color: var(--green); color: #fff; }
.gc--no { background: var(--red); border-color: var(--red); color: #fff; }

.legend { margin: 14px 0 0; font-size: var(--step--1); color: var(--ink-soft); }
.legend div { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; }
.legend i {
  width: 13px; height: 13px; border-radius: 3px; flex: 0 0 auto;
  border: 2px solid var(--line); background: var(--paper-2);
}
.legend i.done { background: var(--blue); border-color: var(--blue); }
.legend i.ok { background: var(--green); border-color: var(--green); }
.legend i.no { background: var(--red); border-color: var(--red); }

/* ---------- result ---------- */

.result { padding: 36px 0; max-width: 40rem; }
.score {
  border: 2px solid var(--line-hard); border-radius: var(--r-lg);
  padding: 22px; background: var(--paper-2); margin-bottom: 22px;
}
.score--pass { border-color: var(--green); }
.score--fail { border-color: var(--red); }
.score__v {
  font-family: var(--cond); font-weight: 700;
  font-size: clamp(2.6rem, 11vw, 4rem); line-height: 1; margin: 0;
  font-variant-numeric: tabular-nums;
}
html[lang="fa"] .score__v { font-family: var(--pers); }
.score__of { font-size: 0.45em; color: var(--ink-soft); font-weight: 600; }
.score__verdict {
  font-family: var(--cond); font-weight: 700; font-size: var(--step-2);
  margin: 10px 0 4px;
}
html[lang="fa"] .score__verdict { font-family: var(--pers); font-size: var(--step-1); }
.score--pass .score__verdict { color: var(--green); }
.score--fail .score__verdict { color: var(--red); }
.score__sub { margin: 0; color: var(--ink-soft); font-size: var(--step--1); }
.score__stats { display: flex; flex-wrap: wrap; gap: 20px; margin: 18px 0 0; padding: 0; list-style: none; }
.score__stats div { font-size: var(--step--1); }
.score__stats b { display: block; font-family: var(--cond); font-size: var(--step-2); font-weight: 700; }
html[lang="fa"] .score__stats b { font-family: var(--pers); }
.result__acts { display: flex; flex-wrap: wrap; gap: 9px; }

/* ---------- sheet (dialog) ---------- */

.sheet {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(10, 12, 14, 0.5);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0;
}
@media (min-width: 40rem) { .sheet { align-items: center; padding: var(--pad); } }
.sheet__box {
  background: var(--paper-2); color: var(--ink);
  border: 2px solid var(--line-hard);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: 20px; width: 100%; max-width: 30rem;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
}
@media (min-width: 40rem) { .sheet__box { border-radius: var(--r-lg); padding-bottom: 20px; } }
.sheet__h {
  font-family: var(--cond); font-weight: 700; font-size: var(--step-2);
  margin: 0 0 9px; line-height: 1.1;
}
html[lang="fa"] .sheet__h { font-family: var(--pers); font-size: var(--step-1); }
.sheet__body { margin-bottom: 18px; color: var(--ink-soft); font-size: var(--step--1); }
.sheet__body p { margin: 0 0 9px; }
.sheet__body a { color: var(--blue); }
.sheet__body code {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 3px; padding: 1px 5px; font-size: 0.9em;
}
.sheet__acts { display: flex; flex-wrap: wrap; gap: 9px; }

/* ---------- review list ---------- */

.rev { margin-top: 26px; }
.rev__h {
  font-family: var(--cond); font-weight: 700; font-size: var(--step-1);
  margin: 0 0 12px;
}
html[lang="fa"] .rev__h { font-family: var(--pers); }
.rev__i {
  border: 2px solid var(--line); border-radius: var(--r);
  padding: 14px; margin-bottom: 10px; background: var(--paper-2);
}
.rev__i--no { border-inline-start: 6px solid var(--red); }
.rev__i--ok { border-inline-start: 6px solid var(--green); }
.rev__n { font-size: var(--step--1); color: var(--ink-soft); margin: 0 0 5px; font-weight: 600; }
.rev__q { margin: 0 0 10px; font-weight: 600; }
.rev__a { margin: 0; font-size: var(--step--1); }
.rev__a span { color: var(--ink-soft); }

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

@media print { .bar, .nav, .extras, .side, .sheet { display: none !important; } }

/* `hidden` must beat the display rules above it */
[hidden] { display: none !important; }

/* On a tall-enough desktop window the sign must not push the choices out of
   view, so cap it harder there than on a phone. */
@media (min-width: 60rem) {
  .card__fig img { max-width: 16rem; }
}

/* ==========================================================================
   MOBILE
   The audience is overwhelmingly on phones, often studying one-handed on the
   metro. Below 60rem the navigation leaves the document flow and pins to the
   bottom of the viewport, and the question grid - which used to exist only in
   the desktop sidebar - becomes reachable from there.
   ========================================================================== */

/* Every control meets the 44px minimum touch target on a phone. */
@media (max-width: 59.99rem) {

  .lang__b { padding: 11px 12px; min-height: 44px; min-width: 44px; }
  .bar__in { padding: 6px var(--pad); }

  /* The brand name is the first thing to go when the clock needs the room. */
  @media (max-width: 24rem) {
    .brand__name { display: none; }
  }

  /* Navigation pins to the bottom, always under the thumb. The quiz view adds
     padding so the last choice is never hidden behind it. */
  .view--quiz { padding-bottom: 0; }
  .quiz__main { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }

  .nav {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 25;
    margin: 0;
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 10px var(--pad);
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
    background: var(--paper);
    border-top: 2px solid var(--line-hard);
  }
  .nav .btn { min-height: 44px; flex: 1 1 auto; }
  .nav .btn--count { flex: 0 0 auto; min-width: 5.5rem; }
  /* Save-and-exit loses its label on a phone and keeps only its mark, so the
     two controls that matter get the width. */
  .nav .btn--quiet {
    margin-inline-start: 0;
    flex: 0 0 auto;
    min-width: 44px;
    padding-inline: 12px;
    font-size: 0;
  }
  .nav .btn--quiet::before { content: "\2715"; font-size: 1.0625rem; }

  .card { padding: 16px; }
  .ch { padding: 13px; min-height: 48px; }
  .extras .btn { min-height: 44px; }
}

/* iOS resizes the viewport as the address bar hides, which makes a bottom bar
   jump. dvh tracks the visible viewport; the vh line above is the fallback. */
@supports (height: 100dvh) {
  @media (max-width: 59.99rem) {
    .sheet { height: 100vh; height: 100dvh; }
  }
}

/* The sign is capped so the four choices stay on screen with it. */
@media (max-width: 59.99rem) {
  .card__fig img { max-width: 100%; max-height: 38vh; width: auto; margin-inline: auto; }
}

.card__zoom {
  display: block; width: 100%; padding: 0; border: 0; background: none;
  cursor: zoom-in;
}

/* Full-screen image viewer, so a dense junction diagram is actually readable
   on a 360px screen. */
.lightbox {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(8, 10, 12, 0.94);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.lightbox img {
  max-width: 100%; max-height: 90vh; width: auto;
  background: #fff; border-radius: var(--r);
}
.lightbox__x {
  position: absolute; top: calc(12px + env(safe-area-inset-top)); inset-inline-end: 12px;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.14); color: #fff;
  border: 0; font-size: 1.25rem; cursor: pointer;
}

/* The question grid inside the bottom sheet on phones. */
.sheet .grid { grid-template-columns: repeat(6, 1fr); gap: 6px; }
.sheet .gc { min-height: 44px; font-size: var(--step-0); }
.sheet__body--grid { max-height: 46vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* Grid cells on the desktop sidebar stay compact but clickable. */
@media (min-width: 60rem) {
  .btn--count { display: none; }
}

/* ==========================================================================
   MOBILE, second pass: fitting the two bars
   ========================================================================== */

/* The three language names plus the clock overflow a 390px bar, so below
   34rem the names shorten to codes. The control stays in the same place and
   keeps its full tap target. */
.lang__ab { display: none; }
@media (max-width: 34rem) {
  .lang__full { display: none; }
  .lang__ab { display: inline; }
  .lang__b { padding-inline: 14px; }
  .clock { font-size: var(--step-0); padding: 2px 7px; margin-inline-end: 8px; }
}

/* Five controls do not fit across the bottom of a phone. Previous, the
   counter and Next are what you need on every question; Hand in appears only
   on the last one (and from the question grid), and Save-and-exit drops
   entirely because the logo already goes home and progress saves itself. */
@media (max-width: 59.99rem) {
  .nav .btn--quiet { display: none; }
  .nav:not(.nav--last) .btn--finish { display: none; }
  .nav--last .btn--finish { flex: 1 1 auto; }
  .quiz__main { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
}

/* ==========================================================================
   BUYING
   ========================================================================== */

.buy {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  width: 100%; min-height: 52px;
  margin-bottom: 22px; padding: 13px 18px;
  background: var(--blue); color: #fff;
  border: 2px solid var(--blue); border-radius: var(--r);
  cursor: pointer; text-align: start;
}
.buy:hover { background: var(--blue-deep); border-color: var(--blue-deep); }
.buy__t { font-weight: 700; font-size: var(--step-0); }
.buy__from { font-size: var(--step--1); opacity: 0.85; }

.access__have { margin: 0 0 10px; font-size: var(--step--1); color: var(--ink-soft); }

/* The three plans. A row per plan: what you get, what it costs, and the
   per-day figure, which is the number that actually decides it. */
.plans { display: grid; gap: 10px; margin: 0 0 16px; }
.plan {
  display: flex; align-items: center; gap: 14px;
  width: 100%; min-height: 60px;
  padding: 13px 15px; text-align: start;
  background: var(--paper);
  border: 2px solid var(--line); border-radius: var(--r);
  cursor: pointer;
}
.plan:hover { border-color: var(--line-hard); }
.plan__d { flex: 1 1 auto; min-width: 0; }
.plan__n { display: block; font-weight: 700; font-size: var(--step-0); }
.plan__r { display: block; font-size: var(--step--1); color: var(--ink-soft); margin-top: 1px; }
.plan__p {
  flex: 0 0 auto;
  font-family: var(--cond); font-weight: 700; font-size: var(--step-2);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
html[lang="fa"] .plan__p { font-family: var(--pers); font-size: var(--step-1); }

@media (max-width: 59.99rem) {
  .plan { min-height: 64px; }
  .buy { min-height: 56px; }
}

/* A plan whose Stripe link is not set yet: the price is still worth seeing,
   but it must not look clickable. */
.plan--soon { opacity: 0.55; cursor: not-allowed; }
.plan--soon:hover { border-color: var(--line); }

/* A quiet text button, for the fallback into manual code entry. */
.linkish {
  background: none; border: 0; padding: 0; margin-top: 4px;
  color: var(--blue); font-size: var(--step--1);
  text-decoration: underline; cursor: pointer;
}
.sheet .access__row { margin-bottom: 4px; }
.sheet .access__in { width: 100%; }

/* Mistake-report form inside the sheet. */
.report__in {
  width: 100%; margin: 8px 0 4px; padding: 10px;
  background: var(--paper); color: var(--ink);
  border: 2px solid var(--line-hard); border-radius: var(--r);
  font: inherit; font-size: var(--step-0); resize: vertical;
}
/* Honeypot: off-screen for bots to find, never seen or focused by a person. */
.report__pot {
  position: absolute; left: -9999px; width: 1px; height: 1px;
  opacity: 0; pointer-events: none;
}

/* Which account you are signed in as, under the Buy button. */
.access__acct { margin: 0 0 6px; font-size: var(--step--1); color: var(--ink-soft); }

/* Account links under the Buy button: sign in/out, erasure, legal. */
.access__links { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.access__links .linkish { min-height: 32px; }
