@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/source_sans_3.ttf") format("truetype");
  font-weight: 200 900;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans Arabic";
  src: url("fonts/noto_sans_arabic.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f4f8f7;
  --surface: #ffffff;
  --surface-soft: #eaf3f1;
  --surface-raised: #ffffff;
  --ink: #123b4a;
  --ink-soft: #49656e;
  --primary: #176b68;
  --primary-strong: #0f5553;
  --primary-wash: #d9efeb;
  --accent: #ffc857;
  --accent-ink: #4a3300;
  --danger: #a63b46;
  --success: #237a57;
  --outline: #c7d9d5;
  --highlight: #ffdfa0;
  --highlight-ink: #3c2a00;
  --shadow: 0 8px 26px rgba(22, 69, 76, 0.09);
  --radius: 18px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #081a1d;
  --surface: #10282c;
  --surface-soft: #173438;
  --surface-raised: #153136;
  --ink: #eaf4f2;
  --ink-soft: #a9c1bd;
  --primary: #6bd7cb;
  --primary-strong: #95e8de;
  --primary-wash: #1b4545;
  --accent: #ffc857;
  --accent-ink: #3b2900;
  --danger: #ff8992;
  --success: #7ce0ad;
  --outline: #315156;
  --highlight: #705615;
  --highlight-ink: #fff5d8;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

html[lang="ar"] body,
html[lang="fa"] body,
.rtl-text {
  font-family: "Noto Sans Arabic", system-ui, sans-serif;
}

button, select, input, textarea { font: inherit; }
button, select { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }

.skip-link {
  position: fixed;
  inset-inline-start: 12px;
  top: -80px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
}
.skip-link:focus { top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.topbar {
  position: fixed;
  z-index: 30;
  top: 0;
  inset-inline: 0;
  min-height: calc(66px + env(safe-area-inset-top, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px;
  border-bottom: 1px solid var(--outline);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(18px);
}

.brand, .icon-button, .support-button, .language-control {
  min-height: 44px;
  border: 0;
  border-radius: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 6px;
  background: transparent;
  cursor: pointer;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: var(--primary);
  color: var(--bg);
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.brand-name { font-size: 20px; font-weight: 760; letter-spacing: -0.02em; }
.top-actions { display: flex; align-items: center; gap: 7px; }

.language-control {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 104px;
  padding-inline-start: 10px;
  border: 1px solid var(--outline);
  background: var(--surface);
}

.language-control select {
  width: 100%;
  height: 42px;
  padding: 0 24px 0 7px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
}

:root[data-theme="dark"] .language-control select,
:root[data-theme="dark"] .language-control select option {
  color-scheme: dark;
  background-color: var(--surface);
  color: var(--ink);
}

.globe { color: var(--primary); font-weight: 900; }
.icon-button {
  width: 44px;
  background: var(--surface-soft);
  font-size: 23px;
  cursor: pointer;
}

.support-button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 13px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 14px;
  font-weight: 780;
  box-shadow: 0 4px 14px rgba(255, 177, 34, 0.2);
  cursor: pointer;
  white-space: nowrap;
}

main {
  width: min(100%, 920px);
  min-height: 100vh;
  margin: 0 auto;
  padding: calc(92px + env(safe-area-inset-top, 0px)) 18px calc(98px + var(--safe-bottom));
}

.loading { min-height: 60vh; display: grid; place-content: center; justify-items: center; color: var(--ink-soft); }
.loader { width: 36px; height: 36px; border: 4px solid var(--outline); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(30px, 7vw, 44px); line-height: 1.05; letter-spacing: -0.035em; }
h2 { margin-bottom: 13px; font-size: 24px; line-height: 1.2; letter-spacing: -0.018em; }
h3 { margin-bottom: 7px; font-size: 19px; line-height: 1.3; }
.rtl-text h1, .rtl-text h2, .rtl-text h3 { letter-spacing: 0; }
.eyebrow { margin-bottom: 6px; color: var(--primary); font-size: 13px; font-weight: 820; letter-spacing: .08em; text-transform: uppercase; }
.lead { max-width: 66ch; color: var(--ink-soft); font-size: 18px; }
.muted { color: var(--ink-soft); }
.small { font-size: 14px; }

.hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
  padding: 26px 24px;
  border: 1px solid var(--outline);
  border-radius: 24px;
  background: linear-gradient(145deg, var(--surface) 12%, var(--primary-wash));
  box-shadow: var(--shadow);
}
.hero::after { content: "Ψ"; position: absolute; inset-inline-end: 20px; bottom: -35px; color: color-mix(in srgb, var(--primary) 14%, transparent); font-size: 150px; font-weight: 800; line-height: 1; pointer-events: none; }
.hero > * { position: relative; z-index: 1; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.stat { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 82%, transparent); color: var(--ink-soft); font-size: 14px; }
.stat strong { color: var(--ink); }

.search-wrap { position: sticky; z-index: 10; top: calc(78px + env(safe-area-inset-top, 0px)); margin: 14px 0 18px; }
.search-input { width: 100%; min-height: 50px; padding: 0 17px; border: 1px solid var(--outline); border-radius: 15px; outline: 0; background: var(--surface); color: var(--ink); box-shadow: 0 6px 18px rgba(20, 64, 70, .06); }
.search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }

.chapter-heading { display: flex; align-items: center; gap: 10px; margin: 25px 2px 11px; color: var(--ink-soft); font-size: 14px; font-weight: 780; }
.chapter-heading::after { content: ""; height: 1px; flex: 1; background: var(--outline); }
.article-list { display: grid; gap: 10px; }
.article-card {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 3px 14px rgba(22, 68, 75, .045);
}
.article-open {
  width: 100%;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 13px;
  padding: 16px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: start;
  cursor: pointer;
}
.article-open:active { background: var(--surface-soft); }
.article-number { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 15px; background: var(--primary-wash); color: var(--primary-strong); font-weight: 820; }
.article-title { display: block; margin-bottom: 2px; font-weight: 730; line-height: 1.25; }
.article-preview { display: -webkit-box; overflow: hidden; color: var(--ink-soft); font-size: 14px; font-weight: 440; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.chevron { color: var(--primary); font-size: 22px; }
.article-status-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; padding: 9px 12px 11px; border-top: 1px solid var(--outline); background: color-mix(in srgb, var(--surface-soft) 45%, var(--surface)); }
.article-status { min-height: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid var(--outline); border-radius: 999px; background: var(--surface); color: var(--ink-soft); font-size: 12px; font-weight: 720; cursor: pointer; }
.article-status.important.active { border-color: #d6a622; background: color-mix(in srgb, #f5c84c 18%, var(--surface)); color: #9a6b00; }
:root[data-theme="dark"] .article-status.important.active { color: #ffd96b; }
.article-status.revisit.active { border-color: var(--primary); background: var(--primary-wash); color: var(--primary-strong); }
.article-status.difficult.active { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, var(--surface)); color: var(--danger); }
.empty { padding: 30px 20px; border: 1px dashed var(--outline); border-radius: var(--radius); color: var(--ink-soft); text-align: center; }

.back-button { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 13px; padding: 0 12px; border: 0; border-radius: 12px; background: var(--surface-soft); color: var(--primary-strong); font-weight: 720; cursor: pointer; }
.article-head { margin-bottom: 18px; }
.article-head h1 { font-size: clamp(28px, 7vw, 40px); }
.chapter-label { color: var(--ink-soft); font-size: 14px; font-weight: 650; }
.badge-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.badge { display: inline-flex; align-items: center; padding: 5px 9px; border: 1px solid var(--outline); border-radius: 999px; background: var(--surface); color: var(--ink-soft); font-size: 13px; }
.badge.notice { border-color: color-mix(in srgb, var(--accent) 70%, var(--outline)); background: color-mix(in srgb, var(--accent) 18%, var(--surface)); color: var(--ink); }

.content-card { margin-bottom: 14px; padding: 20px; border: 1px solid var(--outline); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.content-card.official { border-inline-start: 5px solid var(--primary); }
.content-card.localized { border-inline-start: 5px solid var(--accent); }
.card-kicker { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; color: var(--primary); font-size: 13px; font-weight: 820; letter-spacing: .055em; text-transform: uppercase; }
.article-text { margin: 0; font-size: 19px; line-height: 1.72; hyphens: auto; }
.article-text[dir="rtl"] { text-align: start; line-height: 1.95; }
mark.term {
  padding: 1px 2px;
  border-radius: 4px;
  outline: none;
  background: var(--highlight);
  color: var(--highlight-ink);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--primary) 70%, transparent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  cursor: pointer;
}
mark.term:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 30%, transparent); }
.hint { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 0; color: var(--ink-soft); font-size: 13px; }

.core-message { margin-bottom: 16px; padding: 16px 17px; border-radius: 15px; background: var(--primary-wash); color: var(--ink); font-size: 18px; font-weight: 610; }
.section-title { margin: 27px 2px 12px; }
.clause-list { display: grid; gap: 12px; }
.clause { padding: 18px; border: 1px solid var(--outline); border-radius: var(--radius); background: var(--surface); }
.clause-label { display: inline-block; margin-bottom: 9px; color: var(--primary); font-size: 14px; font-weight: 820; }
.clause-fragment { margin-bottom: 10px; padding-inline-start: 12px; border-inline-start: 3px solid var(--accent); color: var(--ink); font-weight: 690; }
.clause-comment { margin-bottom: 0; color: var(--ink-soft); }

details { margin-bottom: 11px; border: 1px solid var(--outline); border-radius: var(--radius); background: var(--surface); }
summary { display: flex; align-items: center; min-height: 56px; padding: 10px 17px; color: var(--ink); font-weight: 760; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; margin-inline-start: auto; color: var(--primary); font-size: 24px; font-weight: 500; }
details[open] summary::after { content: "−"; }
.details-body { padding: 0 17px 17px; color: var(--ink-soft); }
.details-body ul { margin: 0; padding-inline-start: 21px; }
.details-body li + li { margin-top: 8px; }
.scenario { padding: 15px; border-radius: 14px; background: var(--surface-soft); }
.scenario strong { color: var(--ink); }
.source-link { display: block; margin-top: 9px; color: var(--primary-strong); font-weight: 690; }

.personal-notes { margin-top: 30px; padding: 20px; border: 1px solid color-mix(in srgb, var(--primary) 48%, var(--outline)); border-radius: 20px; background: color-mix(in srgb, var(--primary-wash) 42%, var(--surface)); box-shadow: var(--shadow); }
.notes-heading { display: flex; align-items: flex-start; gap: 12px; }
.notes-heading h2 { margin: 0 0 4px; font-size: 22px; }
.notes-heading p { margin: 0; color: var(--ink-soft); font-size: 14px; }
.notes-icon { flex: 0 0 auto; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--primary); color: var(--bg); font-size: 22px; }
.personal-notes textarea { width: 100%; min-height: 170px; resize: vertical; margin-top: 15px; padding: 14px 15px; border: 1px solid var(--outline); border-radius: 14px; background: var(--surface); color: var(--ink); line-height: 1.5; text-align: start; box-shadow: inset 0 1px 2px rgba(0,0,0,.04); }
.personal-notes textarea::placeholder { color: var(--ink-soft); opacity: .82; }
.notes-footer { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.notes-clear { min-height: 40px; padding: 0 12px; border: 1px solid var(--outline); border-radius: 11px; background: var(--surface); color: var(--danger); font-weight: 720; cursor: pointer; }
.notes-clear:disabled { opacity: .45; cursor: default; }

.flash-head { margin-bottom: 18px; }
.flash-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 0; }
.segmented { display: inline-flex; padding: 4px; border: 1px solid var(--outline); border-radius: 14px; background: var(--surface-soft); }
.segmented button { min-height: 38px; padding: 0 13px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-soft); font-size: 14px; font-weight: 720; cursor: pointer; }
.segmented button.active { background: var(--surface); color: var(--primary-strong); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.flash-filter { flex-wrap: wrap; }
.flash-filter button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.flash-filter button span { min-width: 24px; padding: 2px 6px; border-radius: 99px; background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary-strong); font-size: 12px; font-variant-numeric: tabular-nums; }
.flash-filter button.active span { background: var(--primary-wash); }
.shuffle-button { min-height: 44px; padding: 0 14px; border: 1px solid var(--outline); border-radius: 13px; background: var(--surface); color: var(--primary-strong); font-weight: 720; cursor: pointer; }
.progress-line { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 7px; color: var(--ink-soft); font-size: 14px; }
.progress-track { height: 7px; overflow: hidden; margin-bottom: 18px; border-radius: 99px; background: var(--outline); }
.progress-fill { height: 100%; border-radius: inherit; background: var(--primary); transition: width .25s ease; }
.flashcard {
  min-height: 330px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border: 1px solid var(--outline);
  border-radius: 24px;
  background: linear-gradient(160deg, var(--surface), var(--surface-soft));
  box-shadow: var(--shadow);
}
.flash-meta { display: flex; justify-content: space-between; gap: 10px; color: var(--ink-soft); font-size: 13px; font-weight: 720; text-transform: uppercase; }
.flash-question { margin: 30px 0; font-size: clamp(24px, 6vw, 34px); font-weight: 720; line-height: 1.25; }
.flash-answer { padding-top: 20px; border-top: 1px solid var(--outline); color: var(--primary-strong); font-size: 20px; font-weight: 600; animation: reveal .2s ease; }
@keyframes reveal { from { opacity: 0; transform: translateY(4px); } }
.reveal-button { width: 100%; min-height: 50px; border: 0; border-radius: 14px; background: var(--primary); color: var(--bg); font-weight: 790; cursor: pointer; }
.review-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.review-actions button { min-height: 50px; border: 1px solid var(--outline); border-radius: 14px; background: var(--surface); font-weight: 760; cursor: pointer; }
.review-actions .again { color: var(--danger); }
.review-actions .known { color: var(--success); }
.card-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.card-nav button { min-height: 46px; border: 0; border-radius: 13px; background: var(--surface-soft); color: var(--primary-strong); font-weight: 750; cursor: pointer; }
.review-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 17px 0; }
.review-stat { padding: 13px; border: 1px solid var(--outline); border-radius: 14px; background: var(--surface); text-align: center; }
.review-stat strong { display: block; font-size: 23px; }

.about-grid { display: grid; gap: 13px; }
.about-card { padding: 20px; border: 1px solid var(--outline); border-radius: var(--radius); background: var(--surface); }
.about-card p:last-child { margin-bottom: 0; }
.install-steps { padding-inline-start: 20px; color: var(--ink-soft); }
.install-steps li + li { margin-top: 8px; }
.install-button { min-height: 46px; padding: 0 16px; border: 0; border-radius: 13px; background: var(--primary); color: var(--bg); font-weight: 780; cursor: pointer; }
.install-status { padding: 11px 13px; border-radius: 12px; background: var(--primary-wash); color: var(--primary-strong); font-weight: 700; }
.notice-box { padding: 16px; border: 1px solid color-mix(in srgb, var(--accent) 70%, var(--outline)); border-radius: 15px; background: color-mix(in srgb, var(--accent) 13%, var(--surface)); color: var(--ink-soft); }

.bottom-nav {
  position: fixed;
  z-index: 25;
  inset-inline: 0;
  bottom: 0;
  min-height: calc(70px + var(--safe-bottom));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 7px max(12px, calc((100vw - 700px) / 2)) var(--safe-bottom);
  border-top: 1px solid var(--outline);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(18px);
}
.bottom-nav button { min-height: 56px; display: grid; place-content: center; gap: 1px; border: 0; border-radius: 14px; background: transparent; color: var(--ink-soft); font-size: 12px; font-weight: 700; cursor: pointer; }
.bottom-nav button.active { background: var(--primary-wash); color: var(--primary-strong); }
.nav-icon { font-size: 21px; line-height: 1; }

.modal-backdrop { position: fixed; z-index: 60; inset: 0; display: grid; align-items: end; padding: 18px; background: rgba(1, 15, 18, .56); backdrop-filter: blur(5px); }
.modal-backdrop[hidden] { display: none; }
.modal { position: relative; width: min(100%, 540px); max-height: 78vh; overflow-y: auto; margin: 0 auto; padding: 25px; border: 1px solid var(--outline); border-radius: 24px 24px 18px 18px; background: var(--surface-raised); color: var(--ink); box-shadow: 0 24px 70px rgba(0,0,0,.35); animation: slide-up .2s ease; }
@keyframes slide-up { from { opacity: 0; transform: translateY(12px); } }
.modal-close { position: absolute; top: 10px; inset-inline-end: 10px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--surface-soft); font-size: 26px; cursor: pointer; }
.modal h2 { padding-inline-end: 36px; }
.term-italian { display: inline-block; margin-bottom: 12px; padding: 6px 10px; border-radius: 9px; background: var(--highlight); color: var(--highlight-ink); font-size: 18px; font-weight: 790; }
.modal-actions { display: grid; gap: 9px; margin-top: 18px; }
.modal-actions button { min-height: 48px; border: 0; border-radius: 13px; background: var(--primary); color: var(--bg); font-weight: 780; cursor: pointer; }
.modal-actions button.secondary { border: 1px solid var(--outline); background: var(--surface-soft); color: var(--primary-strong); }

.toast { position: fixed; z-index: 80; left: 50%; bottom: calc(88px + var(--safe-bottom)); max-width: calc(100% - 32px); transform: translate(-50%, 20px); padding: 11px 16px; border-radius: 12px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.release-note { margin-top: 22px; text-align: center; color: var(--ink-soft); font-size: 12px; }
.license-link { color: inherit; text-underline-offset: 2px; }
.license-link:hover { color: var(--primary); }

.article-navigation { display: grid; grid-template-columns: minmax(110px, auto) minmax(0, 1fr) minmax(110px, auto); gap: 10px; align-items: stretch; margin: 14px 0 20px; }
.article-navigation[data-placement="bottom"] { margin-top: 22px; margin-bottom: 0; }
.article-step, .article-jump-select { min-height: 46px; border: 1px solid var(--outline); border-radius: 13px; background: var(--surface); color: var(--ink); font: inherit; }
.article-step { padding: 8px 14px; cursor: pointer; font-weight: 700; }
.article-step:hover:not(:disabled), .article-jump-select:hover { border-color: var(--primary); }
.article-step:disabled { opacity: .4; cursor: default; }
.article-jump { min-width: 0; }
.article-jump-select { width: 100%; padding: 8px 36px 8px 12px; cursor: pointer; text-overflow: ellipsis; }
[dir="rtl"] .article-jump-select { padding-right: 12px; padding-left: 36px; }

:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent); outline-offset: 2px; }

@media (max-width: 600px) {
  .topbar { min-height: calc(66px + env(safe-area-inset-top, 0px)); padding-inline: 10px; }
  .brand-name { display: none; }
  .brand-mark { width: 42px; height: 42px; }
  .language-control { min-width: 88px; }
  .language-control select { font-size: 13px; }
  .topbar .support-button { width: 44px; justify-content: center; padding: 0; font-size: 19px; }
  .topbar .support-button [data-i18n] { display: none; }
  main { padding-inline: 14px; padding-top: calc(84px + env(safe-area-inset-top, 0px)); }
  .hero { padding: 22px 19px; }
  .content-card { padding: 17px; }
  .flash-toolbar { align-items: stretch; }
  .flash-filter { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .flash-filter button { min-width: 0; min-height: 46px; padding: 5px; gap: 4px; line-height: 1.15; }
  .flash-filter button span { min-width: 22px; padding-inline: 4px; }
  .shuffle-button { width: 100%; }
  .review-stat { padding-inline: 7px; font-size: 12px; }
  .article-status { min-width: 40px; justify-content: center; padding-inline: 9px; font-size: 16px; }
  .article-status .status-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .article-navigation { grid-template-columns: 1fr 1fr; }
  .article-jump { grid-column: 1 / -1; grid-row: 1; }
  .article-step { grid-row: 2; }
}

@media (min-width: 760px) {
  .article-list { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr 1fr; }
  .modal-backdrop { align-items: center; }
  .modal { border-radius: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
