:where(.og-perceptle) :where(*:not(svg, svg *)) { all: revert; }
/* Perceptle: lab notebook, but warm. Cream paper, ink lines, teal / terracotta / mustard marks. */
.og-perceptle {
  --paper: #fffaf0;
  --bg: #f4ecda;
  --line: #e3d8be;
  --ink: #1f2b2a;
  --muted: #655f53;
  --teal: #1d7a73;
  --teal-soft: #cfe5df;
  --terra: #b8431a;
  --terra-hi: #c9501f;
  --mustard: #e2a72e;
  --plum: #6b3f69;
  --a: #2468a8; /* bullseye */
  --b: #2f8f55;
  --c: #d6a21c;
  --d: #dd7a24;
  --e: #c0392b;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: ui-monospace, "SF Mono", Consolas, "Liberation Mono", monospace;
}
.og-perceptle *,
.og-perceptle *::before,
.og-perceptle *::after { box-sizing: border-box; }
.og-perceptle { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
.og-perceptle {
  margin: 0;
  font: 16px/1.6 var(--sans);
  color: var(--ink);
  background: var(--bg);
  background-image: linear-gradient(rgba(31, 43, 42, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(31, 43, 42, 0.045) 1px, transparent 1px);
  background-size: 28px 28px;
  padding-bottom: 2px;
}
.og-perceptle a { color: var(--teal); text-underline-offset: 3px; }
.og-perceptle a:hover { color: var(--terra); }
.og-perceptle :focus-visible { outline: 3px solid var(--mustard); outline-offset: 2px; border-radius: 4px; }
.og-perceptle .sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; white-space: nowrap; }
.og-perceptle .mono { font-family: var(--mono); }
.og-perceptle .skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 9; }
.og-perceptle .skip:focus { left: 8px; }

/* ---------- header / footer */
.og-perceptle .top { max-width: 1040px; margin: 0 auto; padding: 14px 16px 6px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.og-perceptle .logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 700 24px/1 var(--serif); letter-spacing: -0.01em; }
.og-perceptle .logo svg { width: 34px; height: 34px; flex: none; }
.og-perceptle .logo:hover { color: var(--ink); }
.og-perceptle .nav { display: flex; gap: 4px 14px; flex-wrap: wrap; font-size: 15px; font-weight: 600; }
.og-perceptle .nav a { color: var(--ink); text-decoration: none; padding: 6px 2px; border-bottom: 2px solid transparent; }
.og-perceptle .nav a:hover,
.og-perceptle .nav a[aria-current="page"] { border-bottom-color: var(--terra-hi); color: var(--ink); }
.og-perceptle .foot { max-width: 1040px; margin: 48px auto 0; padding: 22px 16px 40px; border-top: 2px solid var(--ink); font-size: 14px; color: var(--muted); }
.og-perceptle .foot p { margin: 6px 0; }
.og-perceptle .foot a { color: var(--ink); }
.og-perceptle .og-main { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

/* ---------- hero line above the game */
.og-perceptle .hero { padding: 8px 0 14px; }
.og-perceptle .hero h1 { margin: 0 0 4px; font: 700 clamp(26px, 5vw, 38px)/1.12 var(--serif); letter-spacing: -0.015em; }
.og-perceptle .hero p { margin: 0; color: var(--muted); max-width: 62ch; }

/* ---------- game */
.og-perceptle .game { background: var(--paper); border: 2px solid var(--ink); border-radius: 20px; box-shadow: 6px 6px 0 var(--ink); padding: 12px 12px 16px; margin: 6px 0 20px; }
.og-perceptle .game-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 4px 10px; }
.og-perceptle .game-meta { display: flex; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; font-size: 14px; color: var(--muted); min-width: 0; }
.og-perceptle .game-meta strong { color: var(--ink); font-size: 16px; }
.og-perceptle .streak { color: var(--terra); font-weight: 700; }
.og-perceptle .streak:empty { display: none; }
.og-perceptle .pips { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.og-perceptle .pips[hidden] { display: none; }
.og-perceptle .pips li { width: 26px; height: 8px; border-radius: 4px; background: #e6dcc3; border: 1.5px solid var(--ink); }
.og-perceptle .pips li.on { background: var(--mustard); }
.og-perceptle .pips li.done { background: var(--ink); }
.og-perceptle .pips li[data-grade="a"] { background: var(--a); } .og-perceptle .pips li[data-grade="b"] { background: var(--b); }
.og-perceptle .pips li[data-grade="c"] { background: var(--c); } .og-perceptle .pips li[data-grade="d"] { background: var(--d); } .og-perceptle .pips li[data-grade="e"] { background: var(--e); }
.og-perceptle .icon-btn { flex: none; width: 44px; height: 44px; border-radius: 12px; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); cursor: pointer; display: grid; place-items: center; padding: 0; }
.og-perceptle .icon-btn svg { width: 22px; height: 22px; }
.og-perceptle .icon-btn .wave { display: block; } .og-perceptle .icon-btn .slash { display: none; }
.og-perceptle .icon-btn.off .wave { opacity: 0.35; } .og-perceptle .icon-btn.off .slash { display: block; }
.og-perceptle .icon-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.og-perceptle .preview-note { margin: 0 4px 10px; padding: 6px 10px; background: #fbe9bd; border: 1.5px dashed var(--ink); border-radius: 8px; font-size: 14px; }
.og-perceptle .picker { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 4px 12px; align-items: center; }
.og-perceptle .picker button,
.og-perceptle .picker select { font: 700 14px var(--sans); padding: 8px 14px; min-height: 40px; border-radius: 999px; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); cursor: pointer; }
.og-perceptle .picker button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.og-perceptle .picker label { font-size: 14px; color: var(--muted); margin-inline-start: auto; display: inline-flex; gap: 8px; align-items: center; }

.og-perceptle .game-body { display: grid; gap: 14px; }
@media (min-width: 880px) {
  .og-perceptle .game-body { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; gap: 22px; }
  .og-perceptle .game { padding: 18px 20px 22px; }
}
.og-perceptle .stage-wrap { min-width: 0; }
.og-perceptle .stage { display: block; width: 100%; aspect-ratio: 4 / 3; height: auto; border: 2px solid var(--ink); border-radius: 14px; background: var(--paper); touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.og-perceptle .stage.live { touch-action: none; cursor: crosshair; }
.og-perceptle .stage:focus-visible { outline: 3px solid var(--mustard); outline-offset: 3px; }
.og-perceptle .panel { min-width: 0; display: flex; flex-direction: column; }
.og-perceptle .panel[hidden],
.og-perceptle .stage-wrap[hidden],
.og-perceptle #final[hidden] { display: none; }
.og-perceptle #final { grid-column: 1 / -1; min-width: 0; }
.og-perceptle .kicker { margin: 0; font: 700 12px/1.3 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal); min-height: 1.3em; }
.og-perceptle .p-title { margin: 2px 0 6px; font: 700 28px/1.15 var(--serif); min-height: 1.15em; }
.og-perceptle .p-text { margin: 0 0 10px; min-height: 7.4em; font-size: 15.5px; line-height: 1.5; }
@media (min-width: 880px) { .og-perceptle .p-text { min-height: 9.6em; } }
.og-perceptle .p-text .note { display: block; margin-bottom: 6px; padding: 6px 10px; background: #fbe9bd; border-radius: 8px; font-size: 14px; }
.og-perceptle .p-text b { font-family: var(--mono); font-weight: 700; }
.og-perceptle .p-controls { min-height: 0; }
.og-perceptle .p-actions { margin-top: auto; padding-top: 8px; }
.og-perceptle .score-line { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.og-perceptle .score-num { font: 800 54px/1 var(--mono); color: var(--teal); }
.og-perceptle .score-num[data-grade="a"] { color: var(--a); } .og-perceptle .score-num[data-grade="b"] { color: var(--b); } .og-perceptle .score-num[data-grade="c"] { color: #a97c00; }
.og-perceptle .score-num[data-grade="d"] { color: #b35a0a; } .og-perceptle .score-num[data-grade="e"] { color: var(--e); }
.og-perceptle .score-of { font-weight: 700; color: var(--muted); }
.og-perceptle .feedback-line { display: block; }
.og-perceptle .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 12px 26px; font: 800 16px var(--sans); letter-spacing: 0.02em; color: #fff; background: var(--terra); border: 2px solid var(--ink); border-radius: 14px; box-shadow: 3px 3px 0 var(--ink); cursor: pointer; text-decoration: none; transition: transform 0.08s, box-shadow 0.08s; }
.og-perceptle .btn:hover { color: #fff; background: #a43a15; }
.og-perceptle .btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.og-perceptle .btn:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: 3px 3px 0 var(--ink); transform: none; }
.og-perceptle .btn.ghost { background: var(--paper); color: var(--ink); }
.og-perceptle .btn.ghost:hover { background: #fbe9bd; color: var(--ink); }
.og-perceptle .p-actions .btn { width: 100%; }
@media (min-width: 880px) { .og-perceptle .p-actions .btn { width: auto; min-width: 220px; } }
.og-perceptle .session { margin: 12px 0 0; font-size: 14px; color: var(--muted); }

/* number pad for Glimpse */
.og-perceptle .keypad-wrap { margin-bottom: 4px; }
.og-perceptle .readout { display: block; margin-bottom: 8px; min-height: 52px; padding: 6px 12px; text-align: center; font: 700 32px/40px var(--mono); border: 2px solid var(--ink); border-radius: 12px; background: #fff; }
.og-perceptle .keypad { display: grid; grid-template-columns: repeat(10, 1fr); gap: 7px; }
.og-perceptle .keypad button { grid-column: span 2; }
.og-perceptle .keypad button[data-k="C"] { grid-column: span 4; }
.og-perceptle .keypad button[data-k="⌫"] { grid-column: span 6; }
.og-perceptle .keypad button { min-height: 44px; font: 700 21px var(--mono); border: 2px solid var(--ink); border-radius: 12px; background: var(--paper); color: var(--ink); cursor: pointer; touch-action: manipulation; }
.og-perceptle .keypad button:active:not(:disabled) { background: var(--teal-soft); }
.og-perceptle .keypad button:disabled { opacity: 0.4; cursor: default; }

/* ---------- results */
.og-perceptle .final-card { padding: 8px 4px 4px; max-width: 640px; margin: 0 auto; text-align: center; }
.og-perceptle .final-kicker { margin: 0; font: 700 13px var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal); }
.og-perceptle .final-total { margin: 8px 0 0; font-family: var(--mono); line-height: 1; }
.og-perceptle .final-total .num { font-size: clamp(64px, 18vw, 104px); font-weight: 800; }
.og-perceptle .final-total .of { font-size: 24px; color: var(--muted); margin-inline-start: 6px; }
.og-perceptle .tier { margin: 6px 0 2px; font: 700 clamp(26px, 6vw, 36px)/1.1 var(--serif); color: var(--terra); }
.og-perceptle .blurb { margin: 0 auto 6px; max-width: 46ch; }
.og-perceptle .pct { margin: 0 0 14px; font-weight: 700; }
.og-perceptle .pct a { font-weight: 500; font-size: 14px; }
.og-perceptle .breakdown { list-style: none; margin: 0 0 16px; padding: 12px 14px; border: 2px solid var(--ink); border-radius: 14px; background: #fff; text-align: start; display: grid; gap: 8px; }
.og-perceptle .breakdown li { display: grid; grid-template-columns: 74px 1fr 34px 62px; align-items: center; gap: 10px; font-size: 14px; }
.og-perceptle .b-name { font-weight: 700; }
.og-perceptle .b-bar { height: 12px; border-radius: 6px; background: #eadfc6; overflow: hidden; border: 1.5px solid var(--ink); }
.og-perceptle .b-bar i { display: block; height: 100%; background: var(--teal); }
.og-perceptle .b-bar i[data-grade="a"] { background: var(--a); } .og-perceptle .b-bar i[data-grade="b"] { background: var(--b); } .og-perceptle .b-bar i[data-grade="c"] { background: var(--c); }
.og-perceptle .b-bar i[data-grade="d"] { background: var(--d); } .og-perceptle .b-bar i[data-grade="e"] { background: var(--e); }
.og-perceptle .b-score { font: 800 15px var(--mono); text-align: end; }
.og-perceptle .b-pb { font-size: 12px; color: var(--muted); }
.og-perceptle .share-box { margin-bottom: 16px; }
.og-perceptle .share { margin: 0 0 12px; padding: 12px 14px; text-align: start; white-space: pre-wrap; word-break: break-word; font: 15px/1.5 var(--mono); background: var(--teal-soft); border: 2px dashed var(--teal); border-radius: 12px; }
.og-perceptle .final-actions,
.og-perceptle .final-links { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.og-perceptle .final-links { margin-top: 10px; }
.og-perceptle .sr-note { min-height: 1.4em; margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.og-perceptle .stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 0 0 14px; }
.og-perceptle .stat-grid div { padding: 8px 2px; border: 2px solid var(--ink); border-radius: 12px; background: var(--paper); }
.og-perceptle .stat-grid dt { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.og-perceptle .stat-grid dd { margin: 0; font: 800 22px/1.3 var(--mono); }
.og-perceptle .countdown { margin: 0; font-size: 15px; }
.og-perceptle .countdown b { font-size: 20px; }
.og-perceptle .countdown.big b { font-size: 40px; }
@media (max-width: 420px) { .og-perceptle .stat-grid { grid-template-columns: repeat(3, 1fr); } .og-perceptle .breakdown li { grid-template-columns: 60px 1fr 30px 0; } .og-perceptle .b-pb { display: none; } }

/* ---------- long-form text */
.og-perceptle .seo,
.og-perceptle .doc-text { max-width: 760px; }
.og-perceptle .seo h2,
.og-perceptle .doc-text h2 { margin: 36px 0 10px; font: 700 clamp(24px, 4vw, 30px)/1.2 var(--serif); }
.og-perceptle .seo h3,
.og-perceptle .doc-text h3 { margin: 22px 0 6px; font: 700 20px/1.3 var(--serif); }
.og-perceptle .seo p,
.og-perceptle .doc-text p,
.og-perceptle .seo li,
.og-perceptle .doc-text li { max-width: 68ch; }
.og-perceptle .doc-text h1 { margin: 12px 0 6px; font: 700 clamp(30px, 6vw, 42px)/1.12 var(--serif); letter-spacing: -0.015em; }
.og-perceptle .lede { font-size: 18px; color: var(--muted); margin-top: 0; }
.og-perceptle .cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin: 16px 0 6px; max-width: 1040px; }
.og-perceptle .card { background: var(--paper); border: 2px solid var(--ink); border-radius: 14px; padding: 14px 16px; }
.og-perceptle .card h3 { margin: 0 0 4px; font: 700 20px var(--serif); }
.og-perceptle .card .tag { display: block; margin-bottom: 6px; font: 700 11px var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal); }
.og-perceptle .card p { margin: 0; font-size: 15px; }
.og-perceptle .faq details { background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; margin: 8px 0; padding: 4px 14px; }
.og-perceptle .faq summary { cursor: pointer; font-weight: 700; padding: 10px 0; }
.og-perceptle .faq details[open] summary { margin-bottom: 2px; }
.og-perceptle .faq details p { margin: 0 0 12px; }
.og-perceptle .tbl { border-collapse: collapse; width: 100%; max-width: 680px; margin: 12px 0; font-size: 15px; background: var(--paper); }
.og-perceptle .tbl th,
.og-perceptle .tbl td { border: 2px solid var(--ink); padding: 8px 12px; text-align: start; vertical-align: top; }
.og-perceptle .tbl th { background: var(--teal-soft); }
.og-perceptle .formula { font: 700 17px/1.5 var(--mono); background: var(--teal-soft); border: 2px solid var(--teal); border-radius: 12px; padding: 12px 16px; overflow-x: auto; }
.og-perceptle .play-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0; }
.og-perceptle .callout { background: #fbe9bd; border: 2px solid var(--ink); border-radius: 12px; padding: 10px 16px; margin: 16px 0; max-width: 68ch; }
.og-perceptle .callout p { margin: 6px 0; }

/* contact form (the script is injected by /api/feedback/form.js) */
.og-perceptle [data-feedback-form] { margin: 22px 0; max-width: 620px; }
.og-perceptle [data-feedback-form] .fb-row { display: flex; gap: 14px; flex-wrap: wrap; }
.og-perceptle [data-feedback-form] .fb-row > div { flex: 1 1 220px; }
.og-perceptle [data-feedback-form] .fb-field { margin-bottom: 16px; }
.og-perceptle [data-feedback-form] label { display: block; margin: 0 0 6px; font-weight: 700; font-size: 14px; }
.og-perceptle [data-feedback-form] .fb-hint { font-weight: 400; color: var(--muted); }
.og-perceptle [data-feedback-form] input,
.og-perceptle [data-feedback-form] textarea { width: 100%; padding: 11px 14px; font: inherit; font-size: 16px; color: var(--ink); background: #fff; border: 2px solid var(--ink); border-radius: 12px; }
.og-perceptle [data-feedback-form] input:focus,
.og-perceptle [data-feedback-form] textarea:focus { outline: 3px solid var(--mustard); outline-offset: 1px; }
.og-perceptle [data-feedback-form] textarea { min-height: 150px; resize: vertical; }
.og-perceptle [data-feedback-form] button[type="submit"] { padding: 12px 28px; min-height: 50px; font: 800 16px var(--sans); color: #fff; background: var(--terra); border: 2px solid var(--ink); border-radius: 14px; box-shadow: 3px 3px 0 var(--ink); cursor: pointer; }
.og-perceptle [data-feedback-form] button:disabled { opacity: 0.5; cursor: default; }
.og-perceptle [data-feedback-form] [data-feedback-captcha] { margin: 4px 0 16px; }
.og-perceptle [data-feedback-form][data-state="error"] [data-feedback-status] { color: var(--e); font-weight: 700; }
.og-perceptle [data-feedback-form][data-state="sent"] [data-feedback-status] { color: var(--b); font-weight: 700; }

/* archive */
.og-perceptle .arch-list { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.og-perceptle .arch-list a { display: block; padding: 10px 14px; border: 2px solid var(--ink); border-radius: 12px; background: var(--paper); text-decoration: none; color: var(--ink); font-weight: 700; }
.og-perceptle .arch-list a span { display: block; font-weight: 400; font-size: 13px; color: var(--muted); }
.og-perceptle .arch-list a:hover { background: #fbe9bd; }
.og-perceptle .day-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin: 16px 0; max-width: 1040px; }
.og-perceptle .day-grid .card svg { display: block; width: 100%; height: auto; margin: 8px 0; border: 1.5px solid var(--line); border-radius: 8px; background: var(--paper); }
.og-perceptle .day-grid .big { font: 800 28px/1.1 var(--mono); color: var(--teal); }
.og-perceptle .pager { display: flex; justify-content: space-between; gap: 12px; margin: 22px 0; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
  .og-perceptle { scroll-behavior: auto; }
  .og-perceptle .btn { transition: none; }
}

/* language links (footer) */
.og-perceptle .langs { margin: 10px 0 0; font-size: 14px; }
.og-perceptle .langs a { color: var(--ink); }
.og-perceptle .langs a[aria-current="true"] { font-weight: 800; text-decoration: none; border-bottom: 2px solid var(--terra-hi); }
.og-perceptle .langs a.pref::after { content: " \2022"; color: var(--terra-hi); }

/* translated pages: longer test names and labels */
html:not([lang="en"]) .og-perceptle .breakdown li { grid-template-columns: 96px 1fr 34px 62px; }
html:not([lang="en"]) .og-perceptle .b-name { min-width: 0; overflow-wrap: anywhere; }
html:not([lang="en"]) .og-perceptle .b-pb { overflow-wrap: anywhere; }
html:not([lang="en"]) .og-perceptle .stat-grid dt { overflow-wrap: anywhere; hyphens: auto; }
html:not([lang="en"]) .og-perceptle .picker button { white-space: normal; }
html:not([lang="en"]) .og-perceptle .btn { text-align: center; }
html:not([lang="en"]) .og-perceptle .tbl th,
html:not([lang="en"]) .og-perceptle .tbl td { overflow-wrap: anywhere; }
@media (max-width: 420px) { html:not([lang="en"]) .og-perceptle .breakdown li { grid-template-columns: 78px 1fr 30px 0; } }

/* batch 2 scripts: system font stacks per language (no webfonts), line breaking, tall marks, no tracking on joined scripts */
.og-perceptle :lang(ja) { --sans: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Meiryo", "Noto Sans CJK JP", "Noto Sans JP", sans-serif; --serif: "Hiragino Mincho ProN", "Yu Mincho", "Hiragino Sans", "Yu Gothic UI", "Noto Serif CJK JP", "Noto Sans CJK JP", serif; --mono: ui-monospace, "SF Mono", Consolas, "Hiragino Sans", "Yu Gothic UI", "Meiryo", "Noto Sans CJK JP", monospace; }
.og-perceptle :lang(zh) { --sans: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", "Source Han Sans SC", sans-serif; --serif: "Songti SC", "Noto Serif CJK SC", "PingFang SC", "Microsoft YaHei UI", "Noto Sans CJK SC", serif; --mono: ui-monospace, "SF Mono", Consolas, "PingFang SC", "Microsoft YaHei UI", "Noto Sans CJK SC", monospace; }
.og-perceptle :lang(zh-Hant) { --sans: system-ui, -apple-system, "PingFang TC", "Microsoft JhengHei UI", "Microsoft JhengHei", "Noto Sans CJK TC", "Noto Sans TC", "Source Han Sans TC", sans-serif; --serif: "Songti TC", "Noto Serif CJK TC", "PingFang TC", "Microsoft JhengHei UI", "Noto Sans CJK TC", serif; --mono: ui-monospace, "SF Mono", Consolas, "PingFang TC", "Microsoft JhengHei UI", "Noto Sans CJK TC", monospace; }
.og-perceptle :lang(ko) { --sans: system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK KR", "Noto Sans KR", sans-serif; --serif: "AppleMyungjo", "Batang", "Noto Serif CJK KR", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK KR", serif; --mono: ui-monospace, "SF Mono", Consolas, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK KR", monospace; }
.og-perceptle :lang(th) { --sans: system-ui, -apple-system, "Leelawadee UI", "Sukhumvit Set", "Thonburi", "Tahoma", "Noto Sans Thai", "Noto Sans Thai UI", sans-serif; --serif: "Leelawadee UI", "Sukhumvit Set", "Thonburi", "Tahoma", "Noto Sans Thai", sans-serif; --mono: ui-monospace, "SF Mono", Consolas, "Leelawadee UI", "Thonburi", "Tahoma", "Noto Sans Thai", monospace; }
.og-perceptle :lang(hi) { --sans: system-ui, -apple-system, "Nirmala UI", "Kohinoor Devanagari", "Devanagari Sangam MN", "Mukta", "Noto Sans Devanagari", "Noto Sans Devanagari UI", sans-serif; --serif: "Nirmala UI", "Kohinoor Devanagari", "Devanagari Sangam MN", "Noto Serif Devanagari", "Noto Sans Devanagari", sans-serif; --mono: ui-monospace, "SF Mono", Consolas, "Nirmala UI", "Kohinoor Devanagari", "Devanagari Sangam MN", "Noto Sans Devanagari", monospace; }
.og-perceptle :lang(bn) { --sans: system-ui, -apple-system, "Nirmala UI", "Vrinda", "Kohinoor Bangla", "Bangla Sangam MN", "Noto Sans Bengali", "Noto Sans Bengali UI", sans-serif; --serif: "Nirmala UI", "Kohinoor Bangla", "Bangla Sangam MN", "Noto Serif Bengali", "Noto Sans Bengali", sans-serif; --mono: ui-monospace, "SF Mono", Consolas, "Nirmala UI", "Kohinoor Bangla", "Bangla Sangam MN", "Noto Sans Bengali", monospace; }
/* CJK: no spaces between words, break anywhere between characters but keep punctuation off the line start; Korean keeps its words whole */
.og-perceptle :lang(ja),
.og-perceptle :lang(zh),
.og-perceptle :lang(zh-Hant) { line-break: strict; word-break: normal; overflow-wrap: anywhere; }
.og-perceptle :lang(ko) { word-break: keep-all; overflow-wrap: anywhere; }
.og-perceptle :lang(th) { word-break: normal; overflow-wrap: anywhere; }
.og-perceptle :lang(hi),
.og-perceptle :lang(bn) { word-break: normal; overflow-wrap: break-word; }
/* tracking and fake italics break joined or ideographic scripts */
.og-perceptle :is(:lang(ja), :lang(zh), :lang(zh-Hant), :lang(ko), :lang(th), :lang(hi), :lang(bn)) * { letter-spacing: 0 !important; font-style: normal; }
.og-perceptle :is(:lang(ja), :lang(zh), :lang(zh-Hant), :lang(ko), :lang(th), :lang(hi), :lang(bn)) .kicker,
.og-perceptle :is(:lang(ja), :lang(zh), :lang(zh-Hant), :lang(ko), :lang(th), :lang(hi), :lang(bn)) .final-kicker,
.og-perceptle :is(:lang(ja), :lang(zh), :lang(zh-Hant), :lang(ko), :lang(th), :lang(hi), :lang(bn)) .stat-grid dt { text-transform: none; }
/* scripts with tall or stacked marks need more line height than the Latin design (Thai, Devanagari, Bengali; Vietnamese a little) */
.og-perceptle :is(:lang(th), :lang(hi), :lang(bn)) body { line-height: 1.75; }
.og-perceptle :is(:lang(th), :lang(hi), :lang(bn)) :is(.hero h1, .doc-text h1, .p-title, .tier, .seo h2, .doc-text h2, .seo h3, .doc-text h3, .card h3, .kicker, .final-kicker, .day-grid .big) { line-height: 1.5; }
.og-perceptle :is(:lang(th), :lang(hi), :lang(bn)) .p-title { min-height: 1.5em; }
.og-perceptle :is(:lang(th), :lang(hi), :lang(bn)) .p-text { line-height: 1.7; }
.og-perceptle :lang(vi) :is(.hero h1, .doc-text h1, .p-title, .tier, .seo h2, .doc-text h2, .seo h3, .doc-text h3) { line-height: 1.3; }
.og-perceptle :lang(vi) .p-title { min-height: 1.3em; }
.og-perceptle :is(:lang(ja), :lang(zh), :lang(zh-Hant), :lang(ko)) .p-text,
.og-perceptle :is(:lang(ja), :lang(zh), :lang(zh-Hant), :lang(ko)) body { line-height: 1.7; }
/* the language links: 28 names, keep each name whole on one line */
.og-perceptle .langs a { white-space: nowrap; }
/* the English how-to-play table was 16 px wider than a 375 px phone (found by ui-test.mjs overflow in batch 3) */
@media (max-width: 420px) { html[lang="en"] .og-perceptle .tbl { font-size: 14px; } html[lang="en"] .og-perceptle .tbl th,
html[lang="en"] .og-perceptle .tbl td { padding: 7px 8px; } }
/* batch 3: right-to-left languages (ar he fa). <html dir="rtl">: layout, header, nav, cards, tables, progress pips and
   bars mirror by themselves (flex/grid/logical properties above). What keeps its game-logic orientation (LTR):
   the stage canvas (angle dial, ball field, beat timeline, fraction line, number labels), the number pad and its readout,
   the formula, code and numeric runs, the emoji share grid. System fonts only. */
.og-perceptle :lang(ar) { --sans: system-ui, -apple-system, "Segoe UI", Tahoma, "Geeza Pro", "Noto Sans Arabic", "Noto Sans Arabic UI", "Arial", sans-serif; --serif: system-ui, -apple-system, "Segoe UI", Tahoma, "Geeza Pro", "Noto Sans Arabic", "Noto Sans Arabic UI", "Arial", sans-serif; --mono: ui-monospace, "SF Mono", Consolas, "Segoe UI", Tahoma, "Geeza Pro", "Noto Sans Arabic", monospace; }
.og-perceptle :lang(fa) { --sans: system-ui, -apple-system, "Segoe UI", Tahoma, "Geeza Pro", "Noto Sans Arabic", "Noto Sans Arabic UI", "Arial", sans-serif; --serif: system-ui, -apple-system, "Segoe UI", Tahoma, "Geeza Pro", "Noto Sans Arabic", "Noto Sans Arabic UI", "Arial", sans-serif; --mono: ui-monospace, "SF Mono", Consolas, "Segoe UI", Tahoma, "Geeza Pro", "Noto Sans Arabic", monospace; }
.og-perceptle :lang(he) { --sans: system-ui, -apple-system, "Segoe UI", "Arial Hebrew", "Arial", "Noto Sans Hebrew", "Noto Sans Hebrew UI", Tahoma, sans-serif; --serif: "David", "Times New Roman", "Arial Hebrew", "Noto Serif Hebrew", "Noto Sans Hebrew", serif; --mono: ui-monospace, "SF Mono", Consolas, "Arial Hebrew", "Noto Sans Hebrew", "Segoe UI", monospace; }
/* joined scripts: no tracking, no fake italics, no capitals, no hyphenation; Arabic/Persian marks need more line height */
.og-perceptle :is(:lang(ar), :lang(he), :lang(fa)) * { letter-spacing: 0 !important; font-style: normal; hyphens: manual; }
.og-perceptle :is(:lang(ar), :lang(he), :lang(fa)) :is(.kicker, .final-kicker, .stat-grid dt, .card .tag) { text-transform: none; }
.og-perceptle :is(:lang(ar), :lang(fa)) body { line-height: 1.75; }
.og-perceptle :is(:lang(ar), :lang(fa)) :is(.hero h1, .doc-text h1, .p-title, .tier, .seo h2, .doc-text h2, .seo h3, .doc-text h3, .card h3, .kicker, .final-kicker, .day-grid .big) { line-height: 1.5; }
.og-perceptle :is(:lang(ar), :lang(fa)) .p-title { min-height: 1.5em; }
.og-perceptle :is(:lang(ar), :lang(fa)) .p-text { line-height: 1.7; }
.og-perceptle :lang(he) body { line-height: 1.65; }
.og-perceptle :lang(he) :is(.hero h1, .doc-text h1, .p-title, .tier, .seo h2, .doc-text h2) { line-height: 1.3; }
/* the logo is the Latin wordmark, set in the same serif as on every other language */
.og-perceptle :is(:lang(ar), :lang(he), :lang(fa)) :is(.logo, .logo span) { font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; }
/* headings: Arabic and Persian have no bold serif, the sans stack at a lighter weight reads better than a faux-bold naskh */
.og-perceptle :is(:lang(ar), :lang(fa)) :is(.hero h1, .doc-text h1, .p-title, .tier, .seo h2, .doc-text h2, .seo h3, .doc-text h3, .card h3) { font-weight: 700; }
/* tables: Arabic and Persian words must not be cut between letters (that breaks the joining); the first column (a one-word name) stays whole */
html:is(:lang(ar), .og-perceptle :lang(he), :lang(fa)) .tbl :is(th, td) { overflow-wrap: break-word; word-break: normal; padding: 8px 8px; }
html:is(:lang(ar), .og-perceptle :lang(he), :lang(fa)) .tbl :is(th, td):first-child { white-space: nowrap; }
html:is(:lang(ar), .og-perceptle :lang(he), :lang(fa)) :is(.b-name, .b-pb, .stat-grid dt) { overflow-wrap: break-word; hyphens: manual; }
/* the skip link slides in from the right edge */
.og-perceptle [dir="rtl"] .skip { left: auto; right: -999px; }
.og-perceptle [dir="rtl"] .skip:focus { right: 8px; }
/* game-logic orientation stays left-to-right */
.og-perceptle [dir="rtl"] .stage-wrap,
.og-perceptle [dir="rtl"] .stage,
.og-perceptle [dir="rtl"] .keypad-wrap { direction: ltr; }
.og-perceptle [dir="rtl"] .readout { unicode-bidi: isolate; }
/* score readouts ("389 / 500", "86 / 100") are numbers: they read left to right and sit at the start of the right-to-left line */
.og-perceptle [dir="rtl"] .final-total { direction: ltr; }
.og-perceptle [dir="rtl"] .score-line { direction: ltr; justify-content: flex-end; }
/* values and formulas: Latin letters, digits and units form an LTR island inside the right-to-left sentence */
.og-perceptle [dir="rtl"] :is(code, .mono, .formula, .b-score, .score-num, .final-total .num, .stat-grid dd, .countdown b) { unicode-bidi: isolate; direction: ltr; }
/* the archive value headings mix words and numbers ("340, 252" / "79 BPM"): each takes its own direction, all sit at the right edge of the card */
.og-perceptle [dir="rtl"] .day-grid .big { unicode-bidi: plaintext; text-align: right; }
.og-perceptle [dir="rtl"] .p-text b { unicode-bidi: plaintext; direction: rtl; }
.og-perceptle [dir="rtl"] .formula { text-align: left; }
/* the emoji share box shows the copied text line by line: each line takes its own direction (the URL line and the emoji row read left to right) */
.og-perceptle [dir="rtl"] .share { direction: ltr; unicode-bidi: plaintext; text-align: right; }
/* e-mail in the contact form is typed left to right */
.og-perceptle [dir="rtl"] [data-feedback-form] :is(input[type="email"], input[type="url"]) { direction: ltr; text-align: right; }
/* the language links: 31 names */
.og-perceptle [dir="rtl"] .langs a { unicode-bidi: isolate; }