/* ResearchPair: black canvas with a live research network behind every page */
:root {
  --bg: #04060a;
  --panel: rgba(14, 19, 28, 0.72);
  --panel-solid: #0e131c;
  --panel-2: rgba(255, 255, 255, 0.04);
  --line: rgba(160, 180, 210, 0.16);
  --line-2: rgba(160, 180, 210, 0.28);
  --ink: #eef3fa;
  --ink-2: #a9b6c8;
  --ink-3: #74829a;
  --accent: #6f8cff;
  --accent-2: #9aa9ff;
  --accent-soft: rgba(111, 140, 255, 0.14);
  --warm: #ff9a5a;
  --good: #3ccf91;
  --orcid: #a6ce39;
  --s1: #23356f; --s2: #34509e; --s3: #4f6fd6; --s4: #7c96ff; --s5: #c3cfff;
  --display: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  --body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --topbar: rgba(4, 6, 10, 0.62);
  --field-bg: rgba(0, 0, 0, 0.35);
  --field-bg-2: rgba(0, 0, 0, 0.25);
  --tip-bg: #ffffff; --tip-ink: #0b0f16;
  --grad-2: #c9b8ff;
  --shadow: rgba(0, 0, 0, 0.4);
  --hover-accent: rgba(111, 140, 255, 0.55);
  --warm-soft: rgba(255, 154, 90, 0.08); --warm-line: rgba(255, 154, 90, 0.4);
  --map-link: rgba(160, 180, 210, 0.35);
  /* background network: "r,g,b" triplets */
  --net-line: 130, 155, 255; --net-dot: 170, 188, 255; --net-warm: 255, 154, 90; --net-glow: 60, 80, 170; --net-glow-a: 0.16;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f5f7fb;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-solid: #ffffff;
  --panel-2: rgba(15, 25, 50, 0.045);
  --line: rgba(25, 40, 75, 0.12);
  --line-2: rgba(25, 40, 75, 0.22);
  --ink: #0c1322;
  --ink-2: #44506a;
  --ink-3: #66738c;
  --accent: #3f5fe0;
  --accent-2: #3150c8;
  --accent-soft: rgba(63, 95, 224, 0.1);
  --warm: #d4651f;
  --good: #1a9864;
  --s1: #d3dbf6; --s2: #a9b8ef; --s3: #6f8cff; --s4: #4062df; --s5: #22389a;
  --topbar: rgba(245, 247, 251, 0.78);
  --field-bg: #ffffff;
  --field-bg-2: #ffffff;
  --tip-bg: #0c1322; --tip-ink: #ffffff;
  --grad-2: #7a55d6;
  --shadow: rgba(20, 30, 60, 0.14);
  --hover-accent: rgba(63, 95, 224, 0.5);
  --warm-soft: rgba(212, 101, 31, 0.07); --warm-line: rgba(212, 101, 31, 0.4);
  --map-link: rgba(40, 60, 110, 0.28);
  --net-line: 70, 95, 205; --net-dot: 70, 95, 205; --net-warm: 220, 110, 40; --net-glow: 120, 145, 240; --net-glow-a: 0.14;
  color-scheme: light;
}
:root[lang="fa"] {
  --display: "Estedad", Tahoma, sans-serif;
  --body: "Estedad", Tahoma, sans-serif;
  --mono: "Estedad", Tahoma, sans-serif;
}
:root[lang="fa"] h1, :root[lang="fa"] h2, :root[lang="fa"] h3 { letter-spacing: 0; }
:root[lang="fa"] .hero h1 { line-height: 1.35; font-weight: 800; }
:root[lang="fa"] h1, :root[lang="fa"] h2 { font-weight: 800; }
:root[lang="fa"] h3 { font-weight: 700; }
:root[lang="fa"] .eyebrow, :root[lang="fa"] .score span, :root[lang="fa"] .example-tag { letter-spacing: 0; font-family: var(--body); }
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--body); min-height: 100vh; }
a { color: var(--accent-2); }
#bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.shell { position: relative; z-index: 1; }
.wrap { max-width: 1180px; margin: 0 auto; padding-inline: 20px; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- Top bar ---- */
.topbar { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); background: var(--topbar); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font: 700 21px var(--display); letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.logo svg { width: 26px; height: 26px; }
.logo b { color: var(--accent-2); font-weight: 700; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: 14.5px; }
.nav a:hover, .nav a.on { color: var(--ink); background: var(--panel-2); }
.auth-btns { display: flex; gap: 8px; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-2); background: transparent; color: var(--ink); padding: 9px 16px; border-radius: 10px; font-weight: 600; font-size: 14.5px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.big { padding: 13px 22px; font-size: 15.5px; border-radius: 12px; }
.btn.orcid { background: #fff; color: #1d1d1d; border-color: #fff; }
:root[data-theme="light"] .btn.orcid { border-color: var(--line-2); }
.btn.orcid:hover { border-color: var(--orcid); }
.btn:disabled { opacity: .6; cursor: progress; }
.me { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 14.5px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: 600 13px var(--display); background: var(--accent-soft); color: var(--accent-2); border: 1px solid var(--line-2); flex: none; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }
.menu-toggle { display: none; }
.prefs { display: flex; align-items: center; gap: 6px; }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border: 1px solid var(--line-2); border-radius: 10px; background: transparent; color: var(--ink-2); cursor: pointer; padding: 0; }
.icon-btn:hover { color: var(--ink); border-color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .sun { display: none; }
:root[data-theme="light"] .icon-btn .sun { display: block; }
:root[data-theme="light"] .icon-btn .moon { display: none; }
.lang { position: relative; display: inline-flex; align-items: center; }
.lang select { appearance: none; -webkit-appearance: none; height: 36px; border: 1px solid var(--line-2); border-radius: 10px; background: transparent; color: var(--ink-2); padding-block: 0; padding-inline: 30px 10px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.lang select:hover { color: var(--ink); border-color: var(--accent); }
.lang select option { background: var(--panel-solid); color: var(--ink); }
.lang svg { position: absolute; inset-inline-start: 9px; width: 15px; height: 15px; pointer-events: none; color: var(--ink-3); }
.logo { flex: none; }
[dir="rtl"] .option .go span[aria-hidden], [dir="rtl"] .arrow { display: inline-block; transform: scaleX(-1); }
@media (max-width: 760px) {
  .topbar .wrap { gap: 12px; }
  .nav { position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: var(--panel-solid); border-bottom: 1px solid var(--line); padding: 8px 20px 16px; display: none; }
  .nav.open { display: flex; }
  .menu-toggle { display: inline-flex; padding: 8px 10px; }
  .auth-btns .btn:not(.primary) { display: none; }
  .prefs { margin-inline-start: auto; }
  .lang select { padding-inline: 26px 6px; }
}
@media (max-width: 420px) {
  .topbar .wrap { gap: 8px; }
  .topbar .brandmark { height: 32px !important; }
  .auth-btns .btn.primary { padding: 8px 10px; font-size: 13.5px; }
}

/* ---- Common ---- */
.view { padding-block: 48px 72px; }
.eyebrow { font: 500 12px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-2); }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
.lead { color: var(--ink-2); font-size: 17px; max-width: 62ch; margin: 0; }
.glass { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.page-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; margin-bottom: 28px; }
.page-head h1 { font-size: clamp(30px, 4vw, 42px); margin-top: 8px; }
.page-head p { margin: 10px 0 0; }
.preview-note { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); background: var(--warm-soft); border: 1px solid var(--warm-line); border-radius: 12px; padding: 10px 14px; }
.preview-note b { color: var(--warm); font-weight: 600; }
.pill { display: inline-flex; align-items: center; gap: 6px; font: 500 12px var(--body); padding: 3px 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--ink-2); }
.pill.hit { background: var(--accent-soft); border-color: var(--hover-accent); color: var(--accent-2); }
.pill.role { color: var(--ink); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.empty, .status { padding: 22px; border: 1px dashed var(--line-2); border-radius: 14px; color: var(--ink-2); text-align: center; }
.status.err { border-color: var(--warm-line); color: var(--warm); }
.loading { display: inline-flex; align-items: center; gap: 10px; }
.spin { width: 16px; height: 16px; border: 2px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 20; background: var(--panel-solid); border: 1px solid var(--line-2); padding: 12px 18px; border-radius: 12px; font-size: 14px; box-shadow: 0 10px 30px var(--shadow); }

/* ---- Home ---- */
.hero { padding-block: 72px 40px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.hero h1 { font-size: clamp(38px, 6.4vw, 74px); line-height: 1.02; max-width: 15ch; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--accent-2), var(--grad-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { text-align: center; font-size: 18px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 8px; }
.options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 28px; }
@media (max-width: 860px) { .options { grid-template-columns: minmax(0, 1fr); } }
.option { padding: 30px; display: flex; flex-direction: column; gap: 16px; text-decoration: none; color: inherit; transition: border-color .25s, transform .25s; position: relative; overflow: hidden; }
.option:hover { border-color: var(--hover-accent); transform: translateY(-3px); }
.option .num { font: 500 12px var(--mono); color: var(--ink-3); }
.option h2 { font-size: 30px; }
.option p { margin: 0; color: var(--ink-2); }
.option ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.option li { display: flex; gap: 10px; align-items: baseline; color: var(--ink); font-size: 14.5px; }
.option li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; transform: translateY(-2px); }
.option .go { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 18px; border-top: 1px solid var(--line); font-weight: 600; color: var(--accent-2); }
.option .glyph { position: absolute; inset-inline-end: -30px; top: -30px; width: 170px; height: 170px; opacity: .5; pointer-events: none; }
.roles-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 44px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 64px; }
@media (max-width: 760px) { .steps { grid-template-columns: minmax(0, 1fr); } }
.step { padding: 22px; }
.step b { font: 500 12px var(--mono); color: var(--accent-2); }
.step h3 { font-size: 19px; margin: 8px 0 6px; }
.step p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 48px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats div { padding: 22px 8px; text-align: center; }
.stats div + div { border-inline-start: 1px solid var(--line); }
.stats strong { display: block; font: 600 28px var(--display); }
.stats span { color: var(--ink-3); font-size: 13px; }
@media (max-width: 560px) { .stats strong { font-size: 21px; } }

/* ---- Network ---- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 20px; }
.toolbar input[type=search] { flex: 1 1 260px; min-width: 0; background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; padding: 11px 14px; }
.chip-btn { border: 1px solid var(--line-2); background: var(--panel); color: var(--ink-2); border-radius: 999px; padding: 7px 14px; cursor: pointer; font-size: 13.5px; font-weight: 500; display: inline-flex; gap: 8px; align-items: center; }
.chip-btn[aria-pressed="true"] { color: var(--ink); border-color: var(--accent); background: var(--accent-soft); }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.person { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.person .top { display: flex; gap: 12px; align-items: center; }
.person h3 { font-size: 18px; }
.person .sub { color: var(--ink-2); font-size: 13.5px; }
.person p { margin: 0; color: var(--ink-2); font-size: 14px; }
.person .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.person .foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); }
.example-tag { font: 500 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--warm); border: 1px solid var(--warm-line); border-radius: 4px; padding: 1px 6px; }
.join-card { padding: 24px; display: flex; flex-direction: column; gap: 12px; justify-content: center; align-items: flex-start; border-style: dashed; }

/* ---- Search ---- */
.search-box { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.search-row { display: flex; gap: 10px; }
.search-row textarea { flex: 1; min-width: 0; min-height: 54px; max-height: 200px; resize: vertical; background: var(--field-bg); border: 1px solid var(--line-2); border-radius: 12px; padding: 14px; font-size: 15.5px; }
@media (max-width: 600px) { .search-row { flex-direction: column; } }
.examples { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-3); }
.en-hint { margin: 0; font-size: 13px; color: var(--warm); }
.readas { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--ink-3); }
.tchip { display: inline-flex; align-items: center; gap: 4px; font: 500 12.5px var(--body); background: var(--accent-soft); color: var(--accent-2); border-radius: 999px; padding-block: 4px; padding-inline: 11px 6px; }
.tchip button { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 15px; line-height: 1; padding: 0 5px; border-radius: 999px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 28px 0 18px; overflow-x: auto; }
.tabs button { border: 0; background: none; color: var(--ink-2); padding: 10px 14px; font-weight: 600; font-size: 14.5px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.tabs .count { font: 500 11.5px var(--mono); color: var(--ink-3); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.filters select { background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 10px; }
.results { display: flex; flex-direction: column; gap: 10px; }
.card { padding: 16px 18px; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 4px 14px; scroll-margin-top: 90px; transition: border-color .25s; }
.card.flash { border-color: var(--accent); }
.rank { font: 500 13px var(--mono); color: var(--ink-3); padding-top: 3px; }
.card h3 { font-size: 18px; }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a:hover { color: var(--accent-2); }
.where { color: var(--ink-2); font-size: 13.5px; }
.score { text-align: end; }
.score b { font: 500 20px var(--mono); color: var(--accent-2); display: block; line-height: 1.1; }
.score span { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.card .body { grid-column: 2 / -1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.why { margin: 2px 0 0; font-size: 14px; }
.why em { font-style: normal; font-weight: 600; }
.stats-line { display: flex; flex-wrap: wrap; gap: 4px 16px; font: 400 12.5px var(--mono); color: var(--ink-3); }
.papers { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; }
.papers li { color: var(--ink-2); overflow-wrap: anywhere; }
.papers a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-2); }
.papers a:hover { border-color: var(--accent); }
.yr { font: 12px var(--mono); color: var(--ink-3); margin-inline-end: 8px; }
.bar { height: 6px; border-radius: 3px; background: var(--panel-2); overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.mapbox { margin-top: 28px; padding: 18px; position: relative; overflow-x: auto; }
.maphead { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; align-items: end; margin-bottom: 8px; }
.maphead p { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; max-width: 70ch; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--ink-2); align-items: center; }
.legend .ramp { display: inline-flex; gap: 2px; margin: 0 6px; vertical-align: -1px; }
.legend .ramp i { width: 14px; height: 10px; border-radius: 2px; display: block; }
#map { display: block; width: 100%; min-width: 640px; height: auto; }
#map text { font-family: var(--body); fill: var(--ink); paint-order: stroke; stroke: var(--panel-solid); stroke-width: 3px; stroke-linejoin: round; }
#map .node { cursor: pointer; }
#map .node circle { stroke: var(--panel-solid); stroke-width: 2px; }
#map .node:hover circle, #map .node:focus circle { stroke: var(--ink); }
.tip { position: absolute; pointer-events: none; background: var(--tip-bg); color: var(--tip-ink); font-size: 12.5px; line-height: 1.4; padding: 8px 10px; border-radius: 8px; max-width: 260px; }

/* ---- Auth & profile ---- */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 48px; align-items: start; }
@media (max-width: 900px) { .auth { grid-template-columns: minmax(0, 1fr); } }
.auth-side h1 { font-size: clamp(32px, 4.4vw, 48px); margin: 10px 0 14px; }
.auth-side ul { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-direction: column; gap: 12px; color: var(--ink-2); }
.auth-side li { display: flex; gap: 10px; }
.auth-side li b { color: var(--ink); font-weight: 600; }
.form { padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.form h2 { font-size: 24px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .lbl { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field input, .field textarea, .field select { background: var(--field-bg); border: 1px solid var(--line-2); border-radius: 10px; padding: 11px 12px; width: 100%; }
.field textarea { min-height: 96px; resize: vertical; }
.field .hint { font-size: 12px; color: var(--ink-3); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }
.or { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 12.5px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.role-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.role-pick label { cursor: pointer; border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; background: var(--field-bg-2); }
.role-pick input { position: absolute; opacity: 0; pointer-events: none; }
.role-pick label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.role-pick label:has(input:focus-visible) { outline: 2px solid var(--accent); }
.role-pick b { font-size: 14px; display: flex; align-items: center; gap: 8px; }
.role-pick span { font-size: 12px; color: var(--ink-3); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); }
.check input { margin-top: 3px; accent-color: var(--accent); }
.err-text { color: var(--warm); font-size: 13.5px; margin: 0; }
.switch { font-size: 14px; color: var(--ink-2); text-align: center; margin: 0; }
.profile { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: 28px; align-items: start; }
@media (max-width: 900px) { .profile { grid-template-columns: minmax(0, 1fr); } }
.profile .form { gap: 18px; }
.fieldset { display: flex; flex-direction: column; gap: 14px; padding-top: 18px; border-top: 1px solid var(--line); }
.fieldset h3 { font-size: 16px; }
.side-sticky { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 12px; }

footer.foot { border-top: 1px solid var(--line); padding-block: 24px 40px; color: var(--ink-3); font-size: 13px; }
footer.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; }

@media (prefers-reduced-motion: reduce) { .option, .card { transition: none; } .spin { animation: none; } }

/* Mixed-language text (English research data inside Persian pages) */
[dir="rtl"] textarea, [dir="rtl"] input[type=search], [dir="rtl"] .examples .chip-btn, [dir="rtl"] .tchip, [dir="rtl"] .pill:not(.role), [dir="rtl"] .card h3, [dir="rtl"] .papers li, [dir="rtl"] .where, [dir="rtl"] .why em { unicode-bidi: plaintext; }
[dir="rtl"] .examples .chip-btn { direction: ltr; }

/* ---- Pricing & quota ---- */
.quota { margin: 0; font-size: 13px; color: var(--ink-3); }
.quota b { color: var(--ink); }
.page-head.center { justify-content: center; text-align: center; }
.page-head.center .lead { margin-inline: auto; }
.billing { display: flex; justify-content: center; gap: 8px; margin: 8px 0 24px; }
.billing .save { font: 600 11px var(--body); color: var(--good); }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 860px; margin: 0 auto; }
@media (max-width: 760px) { .plans { grid-template-columns: minmax(0, 1fr); } }
.plan { padding: 30px; display: flex; flex-direction: column; gap: 14px; position: relative; }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.plan h2 { font-size: 24px; }
.plan .price { margin: 0; color: var(--ink-2); }
.plan .price b { font: 700 40px var(--display); color: var(--ink); letter-spacing: -0.02em; }
.plan-sub, .plan-note { margin: 0; color: var(--ink-3); font-size: 13.5px; }
.plan ul { list-style: none; margin: 4px 0 8px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.plan li { display: flex; gap: 10px; align-items: baseline; font-size: 14.5px; }
.plan li::before { content: "✓"; color: var(--good); font-weight: 700; flex: none; }
.plan .btn { margin-top: auto; }
.badge { position: absolute; top: -12px; inset-inline-start: 24px; background: var(--accent); color: #fff; font: 600 12px var(--body); padding: 4px 10px; border-radius: 999px; }
.paywall { padding: 28px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; border-color: var(--accent); }
.paywall h3 { font-size: 22px; }
.paywall p { margin: 0; color: var(--ink-2); max-width: 52ch; }
.contact-btn { font-size: 13px; padding: 6px 12px; }
.lock { font-size: 12px; }
