/* Blind Drill: "graded practice sheet" design.
   Cool paper, chart-paper grid, navy ink, red pen for rule breaks. */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Rubik";
  src: url("/assets/fonts/rubik-hebrew-wght-normal.woff2") format("woff2");
  font-weight: 300 900; font-display: swap;
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
/* Russian, Arabic, Vietnamese and Hindi: each file downloads only on pages that use its characters. */
@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url("/assets/fonts/rubik-arabic-wght-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC,U+102E0-102FB,U+10E60-10E7E,U+10EC2-10EC4,U+10EFC-10EFF,U+1EE00-1EE03,U+1EE05-1EE1F,U+1EE21-1EE22,U+1EE24,U+1EE27,U+1EE29-1EE32,U+1EE34-1EE37,U+1EE39,U+1EE3B,U+1EE42,U+1EE47,U+1EE49,U+1EE4B,U+1EE4D-1EE4F,U+1EE51-1EE52,U+1EE54,U+1EE57,U+1EE59,U+1EE5B,U+1EE5D,U+1EE5F,U+1EE61-1EE62,U+1EE64,U+1EE67-1EE6A,U+1EE6C-1EE72,U+1EE74-1EE77,U+1EE79-1EE7C,U+1EE7E,U+1EE80-1EE89,U+1EE8B-1EE9B,U+1EEA1-1EEA3,U+1EEA5-1EEA9,U+1EEAB-1EEBB,U+1EEF0-1EEF1;
}
@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url("/assets/fonts/rubik-cyrillic-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}
@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url("/assets/fonts/rubik-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("/assets/fonts/archivo-vietnamese-wdth-normal.woff2") format("woff2");
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}
@font-face {
  font-family: "Noto Sans Devanagari";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/assets/fonts/noto-sans-devanagari-devanagari-wght-normal.woff2") format("woff2");
  unicode-range: U+0900-097F,U+1CD0-1CF9,U+200C-200D,U+20A8,U+20B9,U+20F0,U+25CC,U+A830-A839,U+A8E0-A8FF,U+11B00-11B09;
}
@font-face {
  font-family: "Caveat";
  src: url("/assets/fonts/caveat-latin-600-normal.woff2") format("woff2");
  font-weight: 600; font-display: swap;
}

:root {
  --paper: #f4f6f9;
  --sheet: #ffffff;
  --grid: #e4eaf2;
  --rule: #d3dbe6;
  --ink: #16233a;
  --ink-2: #4b5a70;
  --ink-3: #5e6b80;
  --up: #0f7a62;
  --down: #c4344a;
  --pen: #d0213a;
  --blue: #2346b8;
  --warn: #9a6a00;
  --font: "Archivo", "Rubik", "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Caveat", "Rubik", "Comic Sans MS", cursive;
  --wrap: 1180px;
  --gut: clamp(18px, 4vw, 32px);
  --r: 6px;
}
html[lang="he"] { --font: "Rubik", "Archivo", system-ui, sans-serif; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.12; font-weight: 750; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 4.1vw, 3.5rem); font-weight: 820; font-stretch: 118%; letter-spacing: -.025em; line-height: 1.02; }
h2 { font-size: clamp(1.45rem, 2.5vw, 2rem); font-stretch: 112%; letter-spacing: -.015em; }
h3 { font-size: 1.12rem; font-stretch: 106%; }
html[lang="he"] h1, html[lang="he"] h2, html[lang="he"] h3 { letter-spacing: 0; }
p { margin: 0 0 1em; }
a { color: var(--blue); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 2px; }
.skip { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { width: auto; height: auto; clip-path: none; inset-inline-start: 1rem; top: 1rem; background: var(--sheet); padding: .5rem 1rem; z-index: 50; }
.hint { color: var(--ink-2); font-size: .9rem; }
.pos { color: var(--up); }
.neg { color: var(--down); }
.pen { font-family: var(--hand); color: var(--pen); font-weight: 600; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 44px; padding: .55rem 1.15rem;
  border-radius: 4px; border: 1.5px solid var(--ink);
  background: transparent; color: var(--ink);
  font: 650 .97rem/1.2 var(--font); font-stretch: 104%;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .12s, color .12s, border-color .12s;
}
@media (hover: hover) { .btn:hover:not(:disabled) { background: var(--ink); color: var(--paper); text-decoration: none; } }
button, a, summary, label { -webkit-tap-highlight-color: transparent; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-ink, .btn-primary { background: var(--ink); color: #fff; }
@media (hover: hover) { .btn-ink:hover:not(:disabled), .btn-primary:hover:not(:disabled) { background: #0b1526; border-color: #0b1526; } }
.btn-line { background: var(--sheet); }
.btn-paper { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn-paper:hover:not(:disabled) { background: #fff; color: var(--ink); border-color: #fff; }
.btn-ghost { border-color: var(--rule); }
.btn-danger { color: var(--down); border-color: #e3a9b2; background: var(--sheet); }
.btn-danger:hover:not(:disabled) { background: var(--down); border-color: var(--down); color: #fff; }
.btn-small { min-height: 38px; padding: .4rem .8rem; font-size: .88rem; }
.btn-block { width: 100%; }
.link { background: none; border: 0; color: var(--blue); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }

/* Forms */
.field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .8rem; min-width: 0; }
.field label, .rules-grid label { font-size: .84rem; font-weight: 600; color: var(--ink-2); }
input, select {
  width: 100%; min-height: 44px; padding: .5rem .65rem;
  background: var(--sheet); color: var(--ink);
  border: 1.5px solid var(--rule); border-radius: 4px;
  font: 500 1rem var(--font);
}
input:hover, select:hover { border-color: #b7c3d3; }
input:focus, select:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(35, 70, 184, .18); }
input:disabled, select:disabled { background: var(--paper); color: var(--ink-3); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.row2.align-end { align-items: end; }
.row2.align-end .btn { margin-bottom: .8rem; }
.inline { display: inline-flex; align-items: center; gap: .45rem; color: var(--ink-2); font-size: .9rem; font-weight: 600; }
.inline select { width: auto; }
.tag { display: inline-block; padding: .05rem .5rem; border: 1px solid var(--rule); border-radius: 999px; background: var(--sheet); color: var(--ink-2); font-size: .75rem; font-weight: 650; vertical-align: middle; }
.tag-warn { color: var(--warn); border-color: #e7cf8c; background: #fffbea; }
.form-error { color: var(--down); font-size: .9rem; margin: .6rem 0 0; }
.alert { margin: 0 0 1rem; padding: .8rem 1rem; border: 1.5px solid #e3a9b2; border-radius: var(--r); background: #fff5f6; color: #8a1c2c; }
.alert a { margin-inline-start: .4rem; }

/* Header */
.site-head { background: var(--sheet); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 20; }
.site-head-in { max-width: var(--wrap); margin: 0 auto; padding: .7rem var(--gut); display: flex; align-items: center; gap: 1.6rem; }
.brand { display: flex; align-items: center; gap: .55rem; color: var(--ink); text-decoration: none; }
.brand img { display: block; }
.wordmark { font-family: "Archivo", sans-serif; font-weight: 820; font-stretch: 115%; font-size: 1.25rem; letter-spacing: -.02em; color: var(--ink); }
.wordmark span { color: var(--up); }
.site-nav { display: flex; gap: 1.4rem; }
.site-nav a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .95rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; }
.head-tools { margin-inline-start: auto; display: flex; align-items: center; gap: .8rem; }
.lang-btn { min-height: 38px; display: inline-flex; align-items: center; gap: .45rem; padding: 0 .65rem; background: var(--sheet); border: 1.5px solid var(--rule); border-radius: 4px; font: inherit; font-weight: 700; font-size: .85rem; color: var(--ink-2); cursor: pointer; }
.lang-btn img { display: block; width: 20px; height: 15px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(22, 35, 58, .12); }
.lang-btn::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.lang-btn[aria-expanded="true"], .lang-open .lang-btn { border-color: var(--ink); color: var(--ink); }
.lang-dialog { width: min(680px, calc(100vw - 2rem)); max-height: min(80vh, 720px); padding: 0; border: 1px solid var(--rule); border-radius: 10px; background: var(--sheet); color: var(--ink); box-shadow: 0 24px 60px -20px rgba(22, 35, 58, .45); overflow: hidden; }
.lang-dialog[open] { display: flex; flex-direction: column; }
.lang-dialog::backdrop { background: rgba(22, 35, 58, .45); }
.lang-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem .6rem; }
.lang-dialog-head h2 { margin: 0; font-size: 1.25rem; }
.lang-close { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; font-size: 1.7rem; line-height: 1; color: var(--ink-2); cursor: pointer; }
.lang-close:hover { background: var(--paper); color: var(--ink); }
.lang-search { margin: 0 1.2rem .6rem; min-height: 42px; padding: 0 .8rem; border: 1.5px solid var(--rule); border-radius: 6px; font: inherit; }
.lang-grid { list-style: none; margin: 0; padding: .4rem 1.2rem 1.2rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .5rem; overflow-y: auto; }
.lang-grid a { display: flex; align-items: center; gap: .75rem; min-height: 52px; padding: .5rem .7rem; border: 1px solid var(--rule); border-radius: 8px; color: var(--ink); text-decoration: none; }
.lang-grid a:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.lang-grid a[aria-current] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.lang-grid img { flex: none; width: 28px; height: 21px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(22, 35, 58, .12); object-fit: cover; }
.lang-names { display: flex; flex-direction: column; min-width: 0; }
.lang-native { font-weight: 700; }
.lang-en { font-size: .8rem; color: var(--ink-2); }
.lang-open, .lang-open body { overflow: hidden; }
@media (hover: hover) { .lang-grid a:hover { background: var(--paper); } .lang-btn:hover { color: var(--ink); border-color: var(--ink-2); } }
@media (max-width: 560px) {
  .lang-dialog { width: 100vw; max-width: 100vw; max-height: 85vh; margin: auto 0 0; border-radius: 14px 14px 0 0; }
  .lang-grid { grid-template-columns: 1fr 1fr; }
}

/* Footer */
.sep { margin: 0 .35rem; color: var(--ink-3); }

/* Home: hero */
main { display: block; }
.page-home main > section, .page-home main > details { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gut); }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(2rem, 4vw, 3.5rem); align-items: center; padding-block: clamp(2.5rem, 6vw, 5rem) clamp(2rem, 4vw, 3.5rem); }
.hero-kicker { color: var(--up); font-weight: 700; font-stretch: 108%; margin-bottom: .8rem; }
.hero .lead { font-size: 1.15rem; color: var(--ink-2); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.6rem; }
.btn-xl { font-size: 1.15rem; padding: .95rem 1.8rem; min-height: 3.4rem; }
.hero-sub { margin: .8rem 0 0; color: var(--ink-2); max-width: 46ch; font-size: .98rem; }
.hero-alt { margin: .6rem 0 0; font-size: .95rem; }
.hero-alt a { color: var(--ink-2); }

.sheet { margin: 0; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); padding: 14px; box-shadow: 0 1px 0 var(--rule), 0 18px 40px -24px rgba(22, 35, 58, .35); }
.sheet-plot {
  position: relative; aspect-ratio: 640 / 340;
  background-color: #fff;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 20px 20px; background-position: -1px -1px;
  border: 1px solid var(--grid);
}
.sheet-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sheet figcaption { margin-top: .6rem; font-size: .8rem; color: var(--ink-3); }
.cdl line { stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.cdl.up line { stroke: var(--up); } .cdl.up rect { fill: var(--up); }
.cdl.dn line { stroke: var(--down); } .cdl.dn rect { fill: var(--down); }
.entry { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.pen-ring { fill: none; stroke: var(--pen); stroke-width: 2.6; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 0; transform-box: fill-box; transform-origin: center; transform: rotate(-8deg); }
.pen-note { position: absolute; top: 2%; inset-inline-start: calc(var(--x) - 34%); margin: 0; font-size: clamp(1.05rem, 2.2vw, 1.45rem); line-height: 1.05; transform: rotate(-3deg); white-space: nowrap; }
.pen-pts { font-size: 1.25em; }
.pen-score { position: absolute; inset-inline-end: 3%; bottom: 7%; width: 5.4em; height: 5.4em; display: grid; place-content: center; text-align: center; border: 2.5px solid var(--pen); border-radius: 50%; transform: rotate(-10deg); font-size: clamp(.8rem, 1.6vw, 1rem); line-height: .9; background: rgba(255, 255, 255, .7); }
.pen-score span { font-size: 2.4em; }
.pen-score small { font-size: 1.05em; }

@media (prefers-reduced-motion: no-preference) {
  .cdl { opacity: 0; animation: cdl-in .22s ease-out forwards; animation-delay: calc(var(--i) * 45ms + .25s); }
  .entry { opacity: 0; animation: fade .3s forwards 2.45s; }
  .pen-ring { stroke-dashoffset: 1; animation: draw .55s ease-out forwards 2.75s; }
  .pen-note { opacity: 0; animation: fade .35s forwards 3.2s; }
  .pen-score { opacity: 0; animation: stamp .3s ease-out forwards 3.6s; }
}
@keyframes cdl-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes fade { to { opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes stamp { from { opacity: 0; transform: rotate(-10deg) scale(1.25); } to { opacity: 1; transform: rotate(-10deg) scale(1); } }

/* Home: pick strip */
.pick { padding-block: 0 clamp(1rem, 2vw, 1.5rem); }
details.pick > summary { cursor: pointer; list-style: none; }
details.pick > summary::-webkit-details-marker { display: none; }
details.pick > summary h2 { display: inline-flex; align-items: center; gap: .6rem; }
details.pick > summary h2::after { content: "+"; font-weight: 500; color: var(--ink-2); }
details.pick[open] > summary h2::after { content: "\2212"; }
.pick-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 2rem; border-top: 2px solid var(--ink); padding-top: 1.2rem; }
.pick-head h2 { margin: 0; }
.pick-head p { margin: 0; color: var(--ink-2); max-width: 60ch; }
.pick-form { display: grid; grid-template-columns: 1.5fr 1fr .8fr auto; gap: 1rem; align-items: end; margin-top: 1.2rem; padding: 1.1rem; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); }
.pick-form .field { margin: 0; }
.pick .hint { margin-top: .6rem; }

/* Home: steps (a real sequence, so numbered) */
.steps { padding-block: clamp(2.5rem, 5vw, 4rem); }
.step-list { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.step-list li { border-top: 1px solid var(--rule); padding-top: 1rem; }
.step-n { display: block; font-size: 3.2rem; font-weight: 300; font-stretch: 125%; line-height: 1; color: var(--ink-3); margin-bottom: .8rem; }
.step-list p { color: var(--ink-2); margin: 0; }

/* Home: marking key */
.key { padding-block: clamp(2.5rem, 5vw, 4rem); }
.key-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.key-head a { font-weight: 650; white-space: nowrap; }
.key-table { width: 100%; border-collapse: collapse; margin-top: 1rem; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); }
.key-table td, .key-table th { padding: .85rem 1.1rem; border-bottom: 1px solid var(--grid); text-align: start; vertical-align: baseline; }
.key-table tr:last-child td, .key-table tr:last-child th { border-bottom: 0; }
.key-table th { font-weight: 700; width: 32%; }
.key-table td:last-child { color: var(--ink-2); }
.key-pts { width: 6.5rem; font-size: 1.55rem; line-height: 1; white-space: nowrap; }

/* Home: fit */
.fit { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); padding-block: clamp(2rem, 4vw, 3rem) clamp(2.5rem, 5vw, 4rem); }
.fit > div { border-inline-start: 3px solid var(--ink); padding-inline-start: 1.3rem; }
.fit p { color: var(--ink-2); margin: 0; max-width: 60ch; }

/* Home: history */
.history { padding-block: 0 clamp(2.5rem, 5vw, 4rem); }
.history-avg { color: var(--ink-2); }
.table-wrap { overflow-x: auto; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); }
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th, .tbl td { padding: .6rem .8rem; border-bottom: 1px solid var(--grid); text-align: start; white-space: nowrap; }
.tbl th { color: var(--ink-2); font-weight: 650; font-size: .82rem; background: var(--paper); }
.tbl tr:last-child td { border-bottom: 0; }
.history > .hint, #history-body > .hint { padding: 1rem 1.1rem; background: var(--sheet); border: 1px dashed var(--rule); border-radius: var(--r); }

/* Home: CTA band */
.page-home main > section.cta { max-width: none; background: var(--ink); color: #fff; padding-block: clamp(2.5rem, 5vw, 3.5rem); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem 2rem; text-align: center; }
.cta h2 { margin: 0; color: #fff; }

/* Content pages */
.doc { max-width: var(--wrap); margin: 0 auto; padding: clamp(2rem, 5vw, 4rem) var(--gut) clamp(2.5rem, 5vw, 4rem); }
.doc-head { max-width: 760px; padding-bottom: 1.6rem; border-bottom: 2px solid var(--ink); margin-bottom: 2rem; }
.doc-head h1 { font-size: clamp(2rem, 4.4vw, 3.3rem); }
.doc-desc { color: var(--ink-2); font-size: 1.12rem; margin: 0; }
.doc-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
.doc-grid:not(:has(.doc-toc)) { grid-template-columns: minmax(0, 1fr); }
.doc-toc { position: sticky; top: 84px; font-size: .9rem; }
.toc-title { font-weight: 700; color: var(--ink-2); margin-bottom: .5rem; }
.doc-toc ol { list-style: none; margin: 0; padding: 0; border-inline-start: 1px solid var(--rule); }
.doc-toc a { display: block; padding: .3rem .9rem; color: var(--ink-2); text-decoration: none; line-height: 1.35; }
.doc-toc a:hover { color: var(--ink); background: var(--sheet); }
.prose { max-width: 68ch; font-size: 1.04rem; line-height: 1.72; }
.prose h2 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); margin: 2.2em 0 .6em; scroll-margin-top: 90px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 1.6em 0 .5em; }
.prose ul, .prose ol { padding-inline-start: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--ink-3); }
.prose-faq h2 { font-size: 1.2rem; font-stretch: 104%; padding-top: 1.4rem; border-top: 1px solid var(--rule); margin-top: 1.4rem; }
.prose-faq h2:first-child { border-top: 0; padding-top: 0; }
.doc-cta { margin-top: 3rem; padding: 1.4rem 1.6rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; background: var(--sheet); border: 1px solid var(--rule); border-inline-start: 4px solid var(--ink); border-radius: var(--r); }
.doc-cta p { margin: 0; font-weight: 700; font-size: 1.15rem; font-stretch: 108%; }

/* Trainer */
.page-replay { font-size: 16px; }
.trainer { max-width: 1600px; margin: 0 auto; padding: 1rem var(--gut) 2rem; }
.session-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .8rem; }
.session-title { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.session-label { font-size: 1.15rem; font-stretch: 108%; margin: 0; }
.session-meta { display: flex; align-items: center; gap: .55rem; }
.clock { font-size: 1.35rem; font-weight: 750; font-stretch: 110%; }
.tz { color: var(--ink-3); font-size: .82rem; font-weight: 650; }
.progress { width: 130px; height: 4px; background: var(--grid); border-radius: 2px; overflow: hidden; }
.progress div { height: 100%; width: 0; background: var(--ink); transition: width .2s; }
.trainer-grid { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 1rem; align-items: start; }
.chart { height: min(68vh, 680px); min-height: 360px; background: #fff; border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; }
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: .75rem; }
.btn-end { margin-inline-start: auto; }
.keys { margin: .55rem 0 0; }
.seg { display: inline-flex; border: 1.5px solid var(--rule); border-radius: 4px; overflow: hidden; background: var(--sheet); }
.seg button { min-height: 40px; padding: 0 .8rem; border: 0; background: transparent; color: var(--ink-2); font: 650 .88rem var(--font); cursor: pointer; }
.seg button + button { border-inline-start: 1px solid var(--rule); }
.seg button.on { background: var(--ink); color: #fff; }
.seg-side { display: grid; grid-template-columns: 1fr 1fr; border: 1.5px solid var(--rule); border-radius: 4px; overflow: hidden; margin-bottom: .9rem; }
.seg-side label { position: relative; }
.seg-side input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.seg-side span { display: block; padding: .6rem; text-align: center; font-weight: 750; color: var(--ink-2); cursor: pointer; background: var(--sheet); }
.seg-side label + label span { border-inline-start: 1px solid var(--rule); }
.seg-side input:checked + span { background: var(--up); color: #fff; }
.seg-side label:last-child input:checked + span { background: var(--down); }
.seg-side input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: -3px; }
.panel { display: grid; gap: .8rem; }
.box, .card { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); padding: 1rem; }
.box-h { font-size: .95rem; font-stretch: 106%; margin-bottom: .8rem; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.stats .k, .stat-grid .k, .score-box .k { display: block; font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.stats .v { font-size: 1.05rem; font-weight: 750; font-stretch: 106%; }
.preview { font-size: .86rem; color: var(--ink-2); min-height: 1.3em; margin: 0 0 .7rem; }
.preview.neg { color: var(--down); }
.orders { list-style: none; padding: 0; margin: .7rem 0 0; display: grid; gap: .35rem; font-size: .86rem; }
.orders li { display: flex; justify-content: space-between; gap: .5rem; padding: .45rem .6rem; background: var(--paper); border-radius: 4px; }
.rules summary { cursor: pointer; font-weight: 700; }
.rules-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-top: .9rem; }
.rules-grid label { display: flex; flex-direction: column; gap: .3rem; }
.log { list-style: none; padding: 0; margin: 0; max-height: 220px; overflow-y: auto; font-size: .86rem; display: grid; gap: .3rem; }
.log time, .mistakes time { color: var(--ink-3); font-weight: 650; margin-inline-end: .3rem; }

.results { margin-top: 1.5rem; background: var(--sheet); border: 1px solid var(--rule); border-top: 3px solid var(--ink); border-radius: var(--r); padding: clamp(1.2rem, 3vw, 2rem); }
.results:focus { outline: none; }
.reveal { font-size: 1.08rem; }
.score-top { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.2rem 0; }
.score-box { padding: 1rem 1.2rem; border: 1px solid var(--rule); border-radius: var(--r); background: var(--paper); }
.big { display: block; font-size: 2.6rem; font-weight: 800; font-stretch: 112%; line-height: 1.1; margin: .2rem 0; }
.big.pen { font-size: 3.6rem; font-weight: 600; line-height: 1; }
.big.pen.good { color: var(--up); }
.big.pen.mid { color: var(--warn); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; margin-bottom: 1.4rem; }
.stat-grid > div { padding: .7rem .8rem; border: 1px solid var(--grid); border-radius: 4px; }
.stat-grid .v { font-weight: 750; }
.results h3 { margin-top: .6rem; }
.mistakes { list-style: none; padding: 0; margin: 0 0 1.4rem; display: grid; gap: .5rem; }
.mistakes li { display: flex; gap: 1rem; align-items: baseline; padding: .7rem .9rem; border: 1px solid var(--grid); border-radius: 4px; }
.mistakes .pts { font-size: 1.6rem; line-height: 1; min-width: 2.6ch; }
.mistakes .clean { color: var(--up); font-weight: 600; }
.results-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.4rem; }

/* Admin */
.admin { max-width: 920px; margin: 0 auto; padding: 2rem var(--gut); display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
.admin .card h2 { font-size: 1.25rem; }
.notice { padding: .75rem 1rem; border-radius: var(--r); border: 1px solid var(--rule); background: var(--sheet); }
.notice.ok { border-color: #9fd3c4; background: #effaf6; color: #0b5a48; }
.notice.bad { border-color: #e3a9b2; background: #fff5f6; color: #8a1c2c; }
code { font-size: .88em; background: var(--paper); padding: .05em .3em; border-radius: 3px; }

/* Responsive */
@media (max-width: 1040px) {
  .trainer-grid { grid-template-columns: minmax(0, 1fr); }
  .chart { height: 56vh; min-height: 300px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { grid-template-columns: 1fr; }
  .sheet { max-width: 720px; }
  .pick-form { grid-template-columns: 1fr 1fr; }
  .pick-form .btn { grid-column: 1 / -1; }
  .doc-grid { grid-template-columns: 1fr; }
  .doc-toc { position: static; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .site-head-in { flex-wrap: wrap; row-gap: .4rem; }
  .site-nav { order: 3; width: 100%; gap: 1.1rem; overflow-x: auto; padding-bottom: .15rem; }
  .site-nav a { font-size: .88rem; white-space: nowrap; }
  .head-cta { display: none; }
  .step-list, .fit, .score-top { grid-template-columns: 1fr; }
  .key-table th { width: auto; }
  .key-table, .key-table tbody, .key-table tr, .key-table td, .key-table th { display: block; }
  .key-table tr { display: grid; grid-template-columns: 5.5rem 1fr; padding: .8rem 1rem; border-bottom: 1px solid var(--grid); }
  .key-table td, .key-table th { padding: 0; border: 0; }
  .key-table td:last-child { grid-column: 2; }
  .key-pts { grid-row: span 2; width: auto; }
  .pick-form { grid-template-columns: 1fr; }
  .btn-end { margin-inline-start: 0; }
  .progress { width: 70px; }
  .pen-note { inset-inline-start: 4%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Admin: automatic loading */
textarea { width: 100%; padding: .55rem .65rem; border: 1.5px solid var(--rule); border-radius: 4px; font: 500 .95rem var(--font); color: var(--ink); background: var(--sheet); resize: vertical; }
textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(35, 70, 184, .18); }
.check { display: flex; align-items: center; gap: .5rem; font-weight: 650; margin-bottom: .9rem; }
.check input { width: 20px; min-height: 20px; height: 20px; }
.auto-run { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin: 1.2rem 0 .8rem; }
.cron-help { margin-top: 1rem; }
fieldset.field { border: 0; padding: 0; margin: 0 0 1rem; min-width: 0; }
fieldset.field legend { font-weight: 650; margin-bottom: .35rem; padding: 0; }
fieldset.field .check { display: block; margin: .25rem 0; }
.iex-box { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--rule); }
.iex-box h3 { margin: 0 0 .4rem; }
#iex-msg { font-weight: 600; }
.cron-help summary { cursor: pointer; font-weight: 650; }
.cron-help code { word-break: break-all; }

/* Chart: legend, tools, indicators menu, full screen */
.chart-wrap { position: relative; }
.legend { position: absolute; top: 8px; left: 10px; right: 70px; z-index: 3; pointer-events: none; font-size: .78rem; line-height: 1.5; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 0 .2rem; text-shadow: 0 0 3px #fff, 0 0 3px #fff; }
.legend b { font-weight: 700; color: var(--ink); }
.legend .lg-up b { color: var(--up); }
.legend .lg-dn b { color: var(--down); }
.legend .lg-gap { width: .8rem; }
.draw-hint { position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%); z-index: 3; margin: 0; padding: .35rem .8rem; background: var(--ink); color: #fff; border-radius: 4px; font-size: .85rem; pointer-events: none; }
.chart-tools { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; align-items: center; }
.btn.on { background: #6d28d9; border-color: #6d28d9; color: #fff; }
.ind-menu { position: relative; }
.ind-menu summary { list-style: none; }
.ind-menu summary::-webkit-details-marker { display: none; }
.ind-menu summary::after { content: ""; width: 6px; height: 6px; margin-inline-start: .45rem; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.ind-list { position: absolute; top: calc(100% + 6px); left: 0; z-index: 10; min-width: 240px; padding: .5rem; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); box-shadow: 0 10px 28px rgba(22, 35, 58, .16); display: grid; gap: .1rem; }
[dir="rtl"] .ind-list { left: auto; right: 0; }
.ind-list label { display: flex; align-items: center; gap: .55rem; padding: .4rem .5rem; border-radius: 4px; cursor: pointer; font-size: .92rem; font-weight: 550; }
.ind-list label:hover { background: var(--paper); }
.ind-list input { width: 18px; height: 18px; min-height: 18px; margin: 0; }
.swatch { width: 14px; height: 3px; border-radius: 2px; background: var(--c); flex: none; }
.chart-col:fullscreen { background: var(--paper); padding: 1rem; overflow: auto; }
.chart-col:fullscreen .chart { height: calc(100vh - 150px); }

.data-note { margin: .35rem 0 0; font-size: .8rem; color: var(--ink-3); }
.data-note a { color: var(--ink-2); }

/* ---------- Trainer on phones: full-height chart, bottom dock, sliding panel ---------- */
.m-stats, .m-dock, .sheet-head, .sheet-backdrop { display: none; }
@media (max-width: 760px) {
  .page-replay .site-nav { display: none; }
  .page-replay .site-head-in { padding-block: .45rem; }
  .page-replay .brand img { width: 26px; height: 26px; }
  .page-replay .wordmark { font-size: 1.05rem; }
  .page-replay { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .trainer { padding: .5rem .6rem 1rem; }

  .session-bar { flex-wrap: nowrap; margin-bottom: .35rem; gap: .5rem; }
  .session-title { min-width: 0; flex: 1; gap: .35rem; }
  .session-label { font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .session-title .tag { font-size: .66rem; padding: 0 .35rem; }
  .clock { font-size: 1.1rem; }
  .progress { width: 46px; }

  .m-stats { display: flex; gap: .4rem; margin: 0 0 .45rem; }
  .m-stats > span { flex: 1; min-width: 0; padding: .35rem .55rem; background: var(--sheet); border: 1px solid var(--rule); border-radius: 6px; font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .m-stats .k { color: var(--ink-3); font-weight: 600; margin-inline-end: .25rem; }
  .m-stats b { font-weight: 750; }

  .chart { height: calc(100dvh - 318px); min-height: 260px; border-radius: 6px; }
  .legend { font-size: .7rem; right: 54px; }

  /* one swipeable row for chart tools, timeframe, speed and end */
  .chart-tools, .controls { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; gap: .4rem; margin-top: .45rem; padding-bottom: 2px; }
  .chart-tools::-webkit-scrollbar, .controls::-webkit-scrollbar { display: none; }
  .chart-tools > *, .controls > * { flex: none; }
  .controls #play, .controls #step { display: none; }
  .controls .btn, .chart-tools .btn { min-height: 36px; padding: .3rem .7rem; font-size: .84rem; }
  .controls .seg button { min-height: 36px; padding: 0 .6rem; }
  .controls select { min-height: 36px; padding: .25rem .4rem; font-size: .85rem; }
  .btn-end { margin-inline-start: 0; }
  .keys { display: none; }
  .data-note { font-size: .72rem; }
  .ind-list { position: fixed; left: .6rem; right: .6rem; top: auto; bottom: calc(80px + env(safe-area-inset-bottom)); max-height: 60dvh; overflow: auto; min-width: 0; }
  [dir="rtl"] .ind-list { left: .6rem; right: .6rem; }

  /* bottom dock */
  .m-dock { display: grid; grid-template-columns: 1fr 1fr 1.3fr 1.3fr .8fr; gap: .4rem; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: .5rem .6rem calc(.5rem + env(safe-area-inset-bottom)); background: var(--sheet); border-top: 1px solid var(--rule); box-shadow: 0 -6px 20px rgba(22, 35, 58, .08); }
  .dock-btn { min-height: 52px; border-radius: 8px; border: 1.5px solid var(--rule); background: var(--sheet); color: var(--ink); font: 700 .8rem var(--font); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem; cursor: pointer; padding: .2rem; }
  .dock-btn .ico { font-size: 1.05rem; line-height: 1; }
  .dock-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
  .dock-buy { background: var(--up); border-color: var(--up); color: #fff; font-size: 1rem; }
  .dock-short { background: var(--down); border-color: var(--down); color: #fff; font-size: 1rem; }
  .dock-btn:disabled { opacity: .4; }
  body.session-ended .m-dock { display: none; }
  body.session-ended.page-replay { padding-bottom: 0; }

  /* sliding panel (bottom sheet) */
  .trainer-grid { display: block; }
  .panel { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; max-height: 82dvh; overflow-y: auto; overscroll-behavior: contain; background: var(--paper); border-radius: 14px 14px 0 0; box-shadow: 0 -12px 40px rgba(22, 35, 58, .25); padding: 0 .7rem calc(.9rem + env(safe-area-inset-bottom)); transform: translateY(105%); visibility: hidden; transition: transform .22s ease-out, visibility 0s linear .22s; gap: .6rem; }
  .panel.open { transform: none; visibility: visible; transition: transform .22s ease-out; }
  .panel .stats { display: none; }
  .panel .m-off { display: none !important; }
  .panel .box { border-radius: 10px; }
  .panel .box-h { display: none; }
  .panel details.rules[open] summary, .panel details.rules summary { display: none; }
  .panel details.rules .rules-grid { margin-top: 0; }
  .sheet-head { display: flex; align-items: center; gap: .4rem; position: sticky; top: 0; z-index: 2; background: var(--paper); padding: .7rem 0 .55rem; }
  .sheet-head::before { content: ""; position: absolute; top: 5px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: var(--rule); }
  .sheet-tabs { display: flex; gap: .3rem; overflow-x: auto; scrollbar-width: none; flex: 1; padding-top: .35rem; }
  .sheet-tabs::-webkit-scrollbar { display: none; }
  .sheet-tabs button { flex: none; min-height: 38px; padding: 0 .8rem; border-radius: 999px; border: 1.5px solid var(--rule); background: var(--sheet); color: var(--ink-2); font: 650 .85rem var(--font); cursor: pointer; }
  .sheet-tabs button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
  .sheet-close { flex: none; width: 40px; height: 40px; margin-top: .35rem; border-radius: 50%; border: 1.5px solid var(--rule); background: var(--sheet); color: var(--ink); font-size: 1.4rem; line-height: 1; cursor: pointer; }
  .sheet-backdrop { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(22, 35, 58, .35); }
  .sheet-backdrop[hidden] { display: none; }
  body.sheet-open { overflow: hidden; }
  .panel input, .panel select { font-size: 16px; } /* prevents iOS zoom on focus */
  .panel .row2.align-end .btn { white-space: normal; }

  .results { margin-top: 1rem; padding: 1rem; }
  .score-top { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .big { font-size: 1.8rem; }
  .big.pen { font-size: 2.6rem; }
  .stat-grid { gap: .5rem; }
  .mistakes li { gap: .7rem; }
}
@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  .panel, .panel.open { transition: none; }
}
@media (max-width: 760px) and (orientation: landscape) {
  .chart { height: calc(100dvh - 150px); min-height: 220px; }
  .m-stats { display: none; }
}

/* ---------- accounts, pricing, gates (v1.1) ---------- */
.head-link { color: var(--ink-2); font-weight: 650; font-size: .92rem; text-decoration: none; white-space: nowrap; }
.head-link:hover, .head-link[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; }
.hero-note { margin: .7rem 0 0; font-size: .9rem; color: var(--ink-2); font-weight: 600; }
.hero-actions .btn-line { background: var(--sheet); }

.price-teaser { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; margin-block: clamp(1.5rem, 3vw, 2.5rem); }
.page-home main > section.price-teaser { padding-block: 1.4rem; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); }
.price-teaser h2 { margin: 0 0 .3rem; }
.price-teaser p { margin: 0; color: var(--ink-2); max-width: 62ch; }

.pricing { max-width: var(--wrap); margin: 0 auto; padding: clamp(2rem, 5vw, 4rem) var(--gut) 2.5rem; }
.pricing-head { max-width: 760px; margin-bottom: 1.8rem; }
.pricing-head h1 { font-size: clamp(2rem, 4.4vw, 3.3rem); }
.pricing-head .lead { color: var(--ink-2); font-size: 1.12rem; }
.pricing > .notice { margin-bottom: 1.2rem; }
.trial-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; padding: 1.3rem 1.5rem; background: var(--sheet); border: 1px solid var(--rule); border-inline-start: 4px solid var(--up); border-radius: var(--r); margin-bottom: 1.4rem; }
.trial-card h2 { margin: 0 0 .3rem; font-size: 1.35rem; }
.trial-card p { margin: 0; color: var(--ink-2); max-width: 60ch; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; padding: 1.5rem 1.4rem 1.3rem; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); }
.plan-yearly { border: 2px solid var(--ink); }
.plan h2 { margin: 0 0 .7rem; font-size: 1.2rem; }
.plan-badge { position: absolute; top: -.75rem; inset-inline-start: 1.2rem; padding: .15rem .6rem; background: var(--ink); color: #fff; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.plan-price { margin: 0 0 .6rem; display: flex; align-items: baseline; gap: .45rem; flex-wrap: wrap; }
.plan-price b { font-size: 2.6rem; font-weight: 800; font-stretch: 108%; line-height: 1; }
.plan-price span { color: var(--ink-2); font-weight: 600; }
[dir="rtl"] .plan-price { justify-content: flex-end; }
.plan-note { color: var(--ink-2); margin: 0 0 .8rem; flex: 1; }
/* Estimated local-currency price (fx.js) */
.plan-price.fx-done { margin-bottom: .35rem; }
.plan-fx { margin: 0 0 .75rem; display: flex; flex-direction: column; gap: .15rem; line-height: 1.3; }
.plan-fx .fx-usd { font-weight: 700; font-size: .95rem; color: var(--ink); }
.plan-fx .fx-note { font-size: .78rem; color: var(--ink-2); }
[dir="rtl"] .plan-fx .fx-usd { align-self: flex-start; }
.fx-inline { color: var(--ink-2); white-space: nowrap; }
.plan-seats { margin: 0 0 .9rem; font-family: var(--hand); font-size: 1.35rem; color: var(--pen); line-height: 1.1; }
.plan-action { margin-top: auto; }
.plan-current { margin: 0; padding: .6rem; text-align: center; border: 1.5px dashed var(--up); border-radius: var(--r); color: var(--up); font-weight: 700; }
.includes { margin-top: 1.6rem; padding: 1.3rem 1.5rem; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); }
.includes h2 { margin: 0 0 .8rem; font-size: 1.2rem; }
.includes ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem 2rem; }
.includes li { position: relative; padding-inline-start: 1.6rem; }
.includes li::before { content: ""; position: absolute; inset-inline-start: .15rem; top: .3rem; width: .55rem; height: .9rem; border-right: 2.5px solid var(--up); border-bottom: 2.5px solid var(--up); transform: rotate(40deg); }
.pricing-legal { margin: 1.2rem 0 0; font-size: .85rem; color: var(--ink-2); }
.pricing-legal p { margin: 0 0 .3rem; }
.demo-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; margin-top: 1.8rem; padding: 1.2rem 1.4rem; border: 1.5px dashed var(--rule); border-radius: var(--r); }
.demo-box h2 { margin: 0 0 .25rem; font-size: 1.1rem; }
.demo-box p { margin: 0; color: var(--ink-2); max-width: 62ch; }
.pricing-faq { margin-top: 2.4rem; max-width: 820px; }
.pricing-faq h2 { margin-bottom: .6rem; }
.pricing-faq details { border-bottom: 1px solid var(--rule); }
.pricing-faq summary { cursor: pointer; padding: .9rem 0; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.pricing-faq summary::-webkit-details-marker { display: none; }
.pricing-faq summary::after { content: "+"; color: var(--ink-2); font-weight: 500; }
.pricing-faq details[open] summary::after { content: "\2212"; }
.pricing-faq details p { margin: 0 0 1rem; color: var(--ink-2); }
.pricing-cta { background: var(--ink); color: #fff; padding: clamp(2.5rem, 5vw, 3.5rem) var(--gut); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem 2rem; text-align: center; }

.auth { display: flex; justify-content: center; }
.auth-card { width: min(520px, 100%); padding: clamp(1.4rem, 4vw, 2.2rem); background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; box-shadow: 0 18px 40px -28px rgba(22, 35, 58, .35); }
.auth-card h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); margin-bottom: .6rem; }
.auth-lead { color: var(--ink-2); margin: 0 0 1.2rem; }
.auth-form .field input { min-height: 48px; font-size: 1.05rem; }
.auth-agree { margin: .8rem 0 0; }
.auth-switch { margin: 1.2rem 0 0; font-weight: 600; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; opacity: 0; pointer-events: none; }
.gate-actions { display: flex; flex-wrap: wrap; gap: .7rem; }

.account .acct-card { max-width: 720px; padding: 1.3rem 1.5rem; margin-bottom: 1rem; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); }
.account > .notice { max-width: 720px; margin-bottom: 1rem; }
.acct-label { margin: 0; font-size: .84rem; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }
.acct-plan { margin: .2rem 0 .4rem; font-size: 1.5rem; font-weight: 800; font-stretch: 108%; }
.acct-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1rem 0 .4rem; }
.acct-actions form { margin: 0; }
.acct-danger { border-color: #e3a9b2; }
.acct-danger h2 { font-size: 1.15rem; margin: 0 0 .4rem; }

.trial-banner { margin: 0 0 .6rem; padding: .45rem .8rem; border-radius: var(--r); background: #effaf6; border: 1px solid #9fd3c4; color: #0b5a48; font-size: .9rem; font-weight: 600; }
.trial-banner a { margin-inline-start: .4rem; }

.inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .8rem 1rem; margin-bottom: 1rem; }
.inline-form .check { margin: 0; }
.inline-form .field { margin: 0; min-width: min(320px, 100%); }
.paddle-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.paddle-form .btn { grid-column: 1 / -1; justify-self: start; }
.grant { display: flex; gap: .4rem; align-items: center; }
.grant input { width: 5rem; min-height: 34px; }

@media (max-width: 860px) {
  .plans { grid-template-columns: minmax(0, 1fr); }
  .plan-yearly { order: -1; }
  .includes ul { grid-template-columns: minmax(0, 1fr); }
  .paddle-form { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .head-link { font-size: .85rem; }
  .hero-actions .btn-xl { width: 100%; }
}
.home-flash { max-width: var(--wrap); margin: 1rem auto 0; }
.demo-cta { margin-top: 1.4rem; padding: 1.2rem 1.4rem; background: #effaf6; border: 1px solid #9fd3c4; border-inline-start: 4px solid var(--up); border-radius: var(--r); }
.demo-cta h3 { margin: 0 0 .3rem; }
.demo-cta p { margin: 0 0 .9rem; color: var(--ink-2); }
.demo-cta .results-actions { margin: 0; }

/* Chinese, Japanese and Korean pages load their own font file list (assets/css/fonts-{lang}.css). */
html[lang="zh"] { --font: "Archivo", "Noto Sans SC", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; }
html[lang="ja"] { --font: "Archivo", "Noto Sans JP", system-ui, -apple-system, "Hiragino Sans", "Yu Gothic", sans-serif; }
html[lang="ko"] { --font: "Archivo", "Noto Sans KR", system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; }
html[lang="zh"] body, html[lang="ja"] body, html[lang="ko"] body, html[lang="hi"] body { line-height: 1.7; }

/* News: archive, sections and posts */
.news { max-width: var(--wrap); margin: 0 auto; padding: clamp(1.4rem, 3.5vw, 2.6rem) var(--gut) clamp(2.5rem, 5vw, 4rem); }
.crumbs ol { list-style: none; margin: 0 0 1.4rem; padding: 0; display: flex; flex-wrap: wrap; gap: .2rem .5rem; font-size: .86rem; color: var(--ink-3); }
.crumbs li + li::before { content: "/"; margin-inline-end: .5rem; color: var(--rule); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink-3); display: inline-block; max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.news-head { max-width: 780px; padding-bottom: 1.4rem; border-bottom: 2px solid var(--ink); margin-bottom: 2rem; }
.news-head h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); margin-bottom: .6rem; }
.news-head .lead { color: var(--ink-2); font-size: 1.12rem; margin: 0; max-width: 60ch; }
.cat-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.3rem; }
.cat-tabs a { padding: .38rem .8rem; border: 1px solid var(--rule); border-radius: 999px; background: var(--sheet); color: var(--ink-2); font-weight: 600; font-size: .9rem; text-decoration: none; }
.cat-tabs a:hover { color: var(--ink); border-color: var(--ink-2); }
.cat-tabs a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.news-section { margin-bottom: clamp(2.5rem, 5vw, 3.6rem); scroll-margin-top: 80px; }
.news-section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .8rem 1.5rem; margin-bottom: 1.2rem; }
.news-section-head h2 { margin: 0 0 .25rem; font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.news-section-head p { margin: 0; color: var(--ink-2); max-width: 60ch; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.5rem); }
.post-card { display: flex; flex-direction: column; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; }
.card-img { display: block; aspect-ratio: 16 / 9; background: var(--grid); border-bottom: 1px solid var(--rule); }
.card-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .45rem; flex: 1; }
.card-meta { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; font-size: .84rem; color: var(--ink-3); }
.post-card h2, .post-card h3 { margin: 0; font-size: 1.14rem; line-height: 1.3; font-stretch: 104%; }
.post-card h2 a, .post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h2 a:hover, .post-card h3 a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.card-excerpt { margin: 0; color: var(--ink-2); font-size: .95rem; line-height: 1.55; }
.cat-tag { display: inline-block; padding: .12rem .5rem; border-radius: 4px; font-size: .76rem; font-weight: 700; letter-spacing: .02em; text-decoration: none; color: var(--up); background: #e6f3ef; }
.cat-tag.cat-market-news { color: var(--blue); background: #e8edfb; }
.cat-tag.cat-guides { color: var(--ink); background: #e7ebf1; }
a.cat-tag:hover { text-decoration: underline; }
.pager { display: flex; align-items: center; justify-content: center; gap: 1.2rem; margin-top: 2rem; font-weight: 600; }
.pager span { color: var(--ink-3); }

.post-head { max-width: 820px; margin-bottom: 1.6rem; }
.post-kicker { margin: 0 0 .8rem; }
.post-head h1 { font-size: clamp(1.9rem, 4.4vw, 3.1rem); line-height: 1.12; margin-bottom: .7rem; }
.post-dek { color: var(--ink-2); font-size: 1.15rem; margin: 0 0 1rem; max-width: 62ch; }
.post-meta { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; margin: 0; color: var(--ink-3); font-size: .9rem; }
.post-figure { max-width: 960px; margin: 0 0 2.2rem; border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; background: var(--grid); }
.post-figure img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.post-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
.post-grid.no-toc { grid-template-columns: minmax(0, 1fr); }
.post-toc { position: sticky; top: 84px; font-size: .9rem; }
.post-toc summary { font-weight: 700; margin-bottom: .6rem; cursor: pointer; list-style: none; }
.post-toc summary::-webkit-details-marker { display: none; }
.post-toc ol { list-style: none; margin: 0; padding: 0; border-inline-start: 1px solid var(--rule); }
.post-toc a { display: block; padding: .3rem .9rem; color: var(--ink-2); text-decoration: none; line-height: 1.35; }
.post-toc a:hover { color: var(--ink); background: var(--sheet); }
.post-body blockquote { margin: 1.4em 0; padding: .9rem 1.2rem; background: var(--sheet); border: 1px solid var(--rule); border-inline-start: 4px solid var(--up); border-radius: var(--r); }
.post-body blockquote p { margin: 0 0 .5em; }
.post-body blockquote p:last-child { margin-bottom: 0; }
.prose .table-wrap { margin: 1.2em 0 1.6em; }
.prose table { width: 100%; border-collapse: collapse; font-size: .94rem; line-height: 1.45; }
.prose th, .prose td { padding: .55rem .75rem; border-bottom: 1px solid var(--grid); text-align: start; vertical-align: top; }
.prose th { background: var(--paper); color: var(--ink-2); font-weight: 650; font-size: .86rem; }
.prose tr:last-child td { border-bottom: 0; }
.prose a { color: var(--blue); }
.post-disclaimer { max-width: 68ch; margin: 1.8rem 0 0; padding: .8rem 1rem; background: var(--sheet); border: 1px dashed var(--rule); border-radius: var(--r); color: var(--ink-2); font-size: .86rem; line-height: 1.5; }
.post-related { margin-top: clamp(2.5rem, 5vw, 3.5rem); padding-top: 1.6rem; border-top: 2px solid var(--ink); }
.post-related h2 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); margin: 0 0 1.2rem; }
@media (max-width: 1040px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-grid { grid-template-columns: minmax(0, 1fr); }
  .post-toc { position: static; padding: .8rem 1rem; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); }
  .post-toc summary { margin-bottom: 0; }
  .post-toc details[open] summary { margin-bottom: .6rem; }
  .post-toc summary::after { content: " +"; color: var(--ink-3); }
  .post-toc details[open] summary::after { content: " \2212"; }
}
@media (max-width: 640px) {
  .card-grid { grid-template-columns: minmax(0, 1fr); }
  .post-figure { margin-inline: calc(var(--gut) * -1); border-radius: 0; border-inline: 0; }
  .crumbs [aria-current] { max-width: 22ch; }
}

/* Cookie consent */
.btn-link { background: none; border: 0; padding: 0; color: var(--ink); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.btn-link:hover { color: var(--blue); }
.consent { position: fixed; inset-inline: 0; bottom: 0; z-index: 60; padding: 0 var(--gut) calc(var(--gut) * .6 + env(safe-area-inset-bottom)); pointer-events: none; }
.consent-in { max-width: 980px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.6rem; padding: 1rem 1.2rem; background: var(--sheet); border: 1px solid var(--rule); border-top: 3px solid var(--ink); border-radius: var(--r); box-shadow: 0 10px 30px rgba(22, 35, 58, .16); pointer-events: auto; }
.consent-text { flex: 1 1 420px; min-width: 0; }
.consent-text h2 { font-size: 1rem; margin: 0 0 .25rem; }
.consent-text p { margin: 0; color: var(--ink-2); font-size: .9rem; line-height: 1.5; }
.consent-text a { color: var(--ink); }
.consent-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem .9rem; }
.consent-dialog { width: min(560px, calc(100vw - 2rem)); padding: 0; border: 1px solid var(--rule); border-radius: var(--r); background: var(--sheet); color: var(--ink); box-shadow: 0 20px 50px rgba(22, 35, 58, .25); }
.consent-dialog::backdrop { background: rgba(22, 35, 58, .45); }
.consent-form { padding: 1.3rem 1.4rem 1.2rem; }
.consent-form h2 { font-size: 1.25rem; margin: 0 0 .9rem; }
.consent-cat { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: .85rem 0; border-top: 1px solid var(--grid); }
.consent-cat h3 { font-size: .98rem; margin: 0 0 .2rem; }
.consent-cat p { margin: 0; color: var(--ink-2); font-size: .88rem; line-height: 1.5; }
.consent-always { flex: none; font-size: .8rem; font-weight: 700; color: var(--up); padding-top: .15rem; }
.consent-more { margin: .4rem 0 1rem; font-size: .88rem; }
.consent-dialog-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.switch { position: relative; flex: none; width: 46px; height: 26px; margin-top: .1rem; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--rule); transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s; }
.switch input:checked + span { background: var(--up); }
.switch input:checked + span::after { transform: translateX(20px); }
[dir="rtl"] .switch input:checked + span::after { transform: translateX(-20px); }
.switch input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
@media (max-width: 760px) {
  .page-replay .consent { bottom: calc(72px + env(safe-area-inset-bottom)); }
  .consent-in { padding: .9rem 1rem; gap: .7rem; }
  .consent-actions .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) { .switch span, .switch span::after { transition: none; } }

/* Macdoogles fixes: page name in the H1, required marks, page dates, footer contact and languages */
.h1-label { display: block; margin-bottom: .7rem; color: var(--up); font-size: 1rem; font-weight: 700; font-stretch: 108%; letter-spacing: 0; line-height: 1.3; }
.req { color: var(--pen); font-weight: 700; }
.req-note { margin: .6rem 0 0; color: var(--ink-2); font-size: .85rem; flex-basis: 100%; }
.doc-dates { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; margin: .7rem 0 0; color: var(--ink-3); font-size: .9rem; }
.pricing-head-cta { margin: 1.3rem 0 0; }
.pick-form .req-note { grid-column: 1 / -1; margin-top: 0; }

/* Footer (v1.5.2): dark sheet with a faint chart grid */
.site-foot {
  --f-bg: #0e1828; --f-ink: #e6edf3; --f-ink-2: #b3c0d2; --f-ink-3: #93a1b6; --f-line: rgba(230, 237, 243, .1); --f-up: #22c55e;
  position: relative; margin-top: 0; color: var(--f-ink-2); font-size: .9rem;
  background-color: var(--f-bg);
  background-image: linear-gradient(rgba(230, 237, 243, .028) 1px, transparent 1px), linear-gradient(90deg, rgba(230, 237, 243, .028) 1px, transparent 1px);
  background-size: 28px 28px;
  border-top: 3px solid var(--f-up);
}
.site-foot a:focus-visible, .site-foot button:focus-visible { outline: 2px solid var(--f-up); outline-offset: 3px; border-radius: 2px; }
.site-foot-in { max-width: var(--wrap); margin: 0 auto; padding: clamp(2.4rem, 5vw, 3.6rem) var(--gut) 2.2rem; display: grid; grid-template-columns: 1.15fr 1.25fr 1.6fr; gap: 2.5rem clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.foot-logo { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; }
.foot-logo .wordmark { color: var(--f-ink); font-size: 1.35rem; }
.foot-logo .wordmark span { color: var(--f-up); }
.foot-tag { margin: .9rem 0 1.3rem; color: var(--f-ink-2); font-size: .95rem; line-height: 1.55; max-width: 26ch; }
.foot-mail { display: inline-flex; flex-direction: column; gap: .15rem; padding: .65rem .9rem; border: 1px solid var(--f-line); border-radius: var(--r); background: rgba(230, 237, 243, .04); text-decoration: none; transition: border-color .15s, background-color .15s; }
.foot-mail:hover { border-color: rgba(34, 197, 94, .55); background: rgba(34, 197, 94, .07); }
.foot-mail-k { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--f-ink-3); }
.foot-mail-v { color: var(--f-ink); font-weight: 600; font-size: .95rem; }
.foot-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.5rem; }
.foot-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .2rem; }
.foot-nav a { display: inline-block; padding: .3rem 0; color: var(--f-ink); text-decoration: none; font-weight: 550; font-size: .95rem; background: linear-gradient(var(--f-up), var(--f-up)) no-repeat 0 100% / 0 1.5px; transition: background-size .2s, color .15s; }
html[dir="rtl"] .foot-nav a { background-position: 100% 100%; }
.foot-nav a:hover { color: #fff; background-size: 100% 1.5px; }
.foot-nav ul + ul a { color: var(--f-ink-2); }
.foot-nav ul + ul a:hover { color: #fff; }
.foot-notes { display: flex; flex-direction: column; gap: .9rem; }
.foot-notes p { margin: 0; padding-inline-start: .9rem; border-inline-start: 2px solid #e3b341; color: var(--f-ink-3); font-size: .84rem; line-height: 1.6; }
.foot-notes p + p { border-inline-start-color: var(--f-line); }
.foot-base { border-top: 1px solid var(--f-line); background: rgba(0, 0, 0, .18); }
.foot-base-in { max-width: var(--wrap); margin: 0 auto; padding: 1.1rem var(--gut) 1.3rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .9rem 2rem; }
.foot-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.1rem; margin: 0; color: var(--f-ink-3); font-size: .84rem; }
.foot-consent { color: var(--f-ink-2); font-weight: 500; font-size: inherit; text-decoration-color: var(--f-line); }
.foot-consent:hover { color: #fff; text-decoration-color: var(--f-up); }
.foot-langs { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.foot-langs > svg { flex: none; color: var(--f-ink-3); }
.foot-langs ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem .2rem; font-size: .84rem; }
.foot-langs a { display: inline-block; padding: .2rem .5rem; border-radius: 999px; color: var(--f-ink-3); text-decoration: none; transition: color .15s, background-color .15s; }
.foot-langs a:hover { color: var(--f-ink); background: rgba(230, 237, 243, .07); }
.foot-langs a[aria-current] { color: var(--f-bg); background: var(--f-ink); font-weight: 700; }
@media (max-width: 1040px) {
  .site-foot-in { grid-template-columns: 1fr 1fr; }
  .foot-notes { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
}
@media (max-width: 760px) {
  .site-foot-in { grid-template-columns: 1fr; gap: 2rem; }
  .foot-notes { grid-template-columns: 1fr; gap: .9rem; }
  .foot-nav { border-block: 1px solid var(--f-line); padding-block: 1rem; }
  .foot-base-in { flex-direction: column; align-items: flex-start; }
  .foot-langs { align-items: flex-start; }
  .foot-langs > svg { margin-top: .25rem; }
}
@media (prefers-reduced-motion: reduce) { .foot-nav a, .foot-mail, .foot-langs a { transition: none; } }
