/* The public landing page (/welcome). Its own small stylesheet: the panel's pink and Vazirmatn (served locally, so
   nothing is fetched from outside the VPN), light by default and dark with the panel's saved theme. */
@font-face { font-family: "Vazirmatn"; src: url("/fonts/vazirmatn-arabic.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  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; }
@font-face { font-family: "Vazirmatn"; src: url("/fonts/vazirmatn-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Layout: a label-maker's bench. The hero is a live tagging line (comments in, tape labels printed, tallies grow);
   below it the sequence of the work and what the panel guarantees, set like spec sheets. */
:root {
  --bg: #fffafc; --surface: #ffffff; --ink: #17131a; --ink-2: #5d5462; --ink-3: #8c8291; --line: #f1d9e4;
  --pink: #e3307f; --pink-soft: #fde4ef; --tape: #17131a; --tape-ink: #ffffff; --good: #1f9d63; --bad: #d23c3c; --star: #e29a00; --warn: #b45309;
  --shadow: 0 1px 0 rgba(23, 19, 26, .04), 0 12px 32px -18px rgba(227, 48, 127, .35);
  --f-sans: "Vazirmatn", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --f-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="valentine-dark"] {
  --bg: #0b080c; --surface: #17121a; --ink: #f6eef3; --ink-2: #c7bac2; --ink-3: #8f8189; --line: #33252e;
  --pink: #ff6ba8; --pink-soft: #3a1828; --tape: #f6eef3; --tape-ink: #0b080c; --good: #4fd394; --bad: #ff7a7a; --star: #ffc24a; --warn: #ffc24a;
  --shadow: 0 1px 0 rgba(0, 0, 0, .4), 0 18px 40px -22px rgba(255, 107, 168, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-sans); font-size: 16px; line-height: 1.65;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  transition: background .25s, color .25s; }
.wrap { max-width: 1160px; margin: 0 auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { text-wrap: balance; margin: 0; letter-spacing: -0.02em; line-height: 1.08; }
p { margin: 0; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { letter-spacing: 0; line-height: 1.3; }
.eyebrow { font-family: var(--f-mono); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--pink); }
[dir="rtl"] .eyebrow { font-family: var(--f-sans); letter-spacing: 0; font-size: 13px; }

/* ---- top bar */
header.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 20px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; text-decoration: none; }
.brand img { width: 40px; height: 40px; }
nav.links { display: flex; gap: 22px; font-size: 14.5px; color: var(--ink-2); flex-wrap: wrap; }
nav.links a { text-decoration: none; }
nav.links a:hover { color: var(--pink); }
.tools { display: flex; align-items: center; gap: 8px; }
.icon-btn { height: 36px; min-width: 36px; padding-inline: 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); font: 600 13px var(--f-sans); cursor: pointer; }
.icon-btn:hover { border-color: var(--pink); }
.icon-btn .sun { display: none; }
:root[data-theme="valentine-dark"] .icon-btn .sun { display: inline; }
:root[data-theme="valentine-dark"] .icon-btn .moon { display: none; }

/* ---- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding-inline: 22px; border-radius: 999px;
  font-weight: 600; font-size: 15px; text-decoration: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px -12px rgba(227, 48, 127, .6); }
.btn.primary { background: var(--pink); border-color: var(--pink); color: #fff; }
:root[data-theme="valentine-dark"] .btn.primary { color: #1a0710; }
.btn.small { height: 36px; padding-inline: 16px; font-size: 13.5px; }

/* ---- hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 48px; align-items: center; padding-block: 28px 56px; }
.hero h1 { font-size: clamp(42px, 6.6vw, 82px); font-weight: 900; margin-top: 14px; }
[dir="rtl"] .hero h1 { font-size: clamp(36px, 5.4vw, 66px); }
.tape { display: inline-block; background: var(--tape); color: var(--tape-ink); font-family: var(--f-mono); font-weight: 700; font-size: .62em;
  letter-spacing: .04em; padding: .08em .32em .12em; border-radius: 4px; transform: rotate(-2.5deg) translateY(-.08em); box-shadow: 0 6px 0 -2px var(--pink); }
[dir="rtl"] .tape { font-family: var(--f-sans); transform: rotate(2.5deg) translateY(-.08em); }
.lead { font-size: 19px; color: var(--ink-2); max-width: 34em; margin-top: 22px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.meta { list-style: none; padding: 0; margin: 26px 0 0; display: flex; gap: 18px; flex-wrap: wrap; color: var(--ink-3); font-size: 13.5px; }
.meta li::before { content: "✓"; color: var(--good); margin-inline-end: 6px; font-weight: 700; }

/* ---- the tagging line */
.bench { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); padding: 22px;
  overflow: hidden; min-width: 0; }
.bench-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bench-head .lbl { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
[dir="rtl"] .bench-head .lbl { font-family: var(--f-sans); letter-spacing: 0; font-size: 12.5px; }
.count { font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.count b { color: var(--pink); }
.line { position: relative; height: 262px; margin-top: 14px; }
.belt { position: absolute; left: 0; right: 0; bottom: 0; height: 10px; border-radius: 6px;
  background: repeating-linear-gradient(90deg, var(--pink-soft) 0 22px, var(--line) 22px 24px); }
.cat { position: absolute; left: 50%; top: 2px; width: 84px; height: 84px; transform: translateX(-50%); z-index: 3; }
.cat img { width: 100%; height: 100%; display: block; filter: drop-shadow(0 6px 10px rgba(227, 48, 127, .25)); }
.cat.fire img { animation: recoil .35s ease; }
@keyframes recoil { 30% { transform: rotate(-6deg) scale(1.04); } 100% { transform: none; } }
.card { position: absolute; bottom: 18px; left: 0; width: 200px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 10px 12px 12px; box-shadow: 0 10px 22px -16px rgba(23, 19, 26, .45); z-index: 2; }
.card .src { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 11px; color: var(--ink-3); }
.card .src .stars { color: var(--star); letter-spacing: 1px; direction: ltr; }
.card .msg { direction: rtl; text-align: right; font-size: 14px; line-height: 1.55; margin-top: 6px; min-height: 42px; }
.card .gloss { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
[dir="rtl"] .card .gloss { display: none; }
.card .slot { min-height: 24px; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px; }
.sticker { display: inline-block; background: var(--tape); color: var(--tape-ink); font-family: var(--f-mono); font-weight: 700; font-size: 10.5px;
  letter-spacing: .06em; padding: 3px 8px 4px; border-radius: 3px; white-space: nowrap; box-shadow: 0 2px 0 -1px var(--pink); }
[dir="rtl"] .sticker { font-family: var(--f-sans); letter-spacing: 0; font-size: 11px; }
.sticker.flying { position: absolute; z-index: 4; pointer-events: none; left: 0; top: 0; }
.tally { margin-top: 18px; display: grid; gap: 9px; }
.row { display: grid; grid-template-columns: 120px minmax(0, 1fr) 44px; align-items: center; gap: 10px; font-size: 13px; }
.row .name { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .track { height: 10px; border-radius: 6px; background: var(--pink-soft); overflow: hidden; }
.row .fill { height: 100%; width: 0; border-radius: 6px; background: var(--pink); transition: width .7s cubic-bezier(.2, .8, .2, 1); }
.row .n { text-align: end; font-variant-numeric: tabular-nums; font-size: 12.5px; }
.row.bump .n { color: var(--pink); font-weight: 700; }
.bench-foot { margin-top: 14px; font-size: 12px; color: var(--ink-3); }

/* ---- numbers strip */
.strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.strip div { padding: 26px 18px; border-inline-start: 1px solid var(--line); min-width: 0; }
.strip div:first-child { border-inline-start: none; padding-inline-start: 0; }
.strip b { display: block; font-size: clamp(28px, 3.4vw, 40px); font-weight: 900; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.strip span { color: var(--ink-2); font-size: 14px; }

/* ---- sections */
section { padding-block: 84px 0; scroll-margin-top: 20px; }
.sec-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: end; margin-bottom: 38px; }
.sec-head h2, .explore h2 { font-size: clamp(30px, 4.2vw, 50px); font-weight: 900; margin-top: 10px; }
.sec-head > p { color: var(--ink-2); max-width: 34em; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.step { padding: 26px 24px 24px; border-top: 3px solid var(--ink); min-width: 0; }
.step .no { font-family: var(--f-mono); font-size: 13px; font-weight: 700; color: var(--pink); }
[dir="rtl"] .step .no { font-family: var(--f-sans); }
.step h3 { font-size: 24px; margin-top: 10px; }
.step p { color: var(--ink-2); margin-top: 10px; font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.chip { font-size: 12px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); }
.specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; background: var(--surface); }
.spec { padding: 28px 26px; border-inline-start: 1px solid var(--line); border-top: 1px solid var(--line); min-width: 0; transition: background .2s; }
.spec:nth-child(3n + 1) { border-inline-start: none; }
.spec:nth-child(-n + 3) { border-top: none; }
.spec:hover { background: var(--pink-soft); }
.spec .k { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
[dir="rtl"] .spec .k { font-family: var(--f-sans); letter-spacing: 0; font-size: 12.5px; }
.spec h3 { font-size: 21px; margin-top: 8px; }
.spec p { color: var(--ink-2); margin-top: 8px; font-size: 14.5px; }

/* ---- explore */
.explore { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 40px; align-items: center; }
.ticks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 14px; color: var(--ink-2); }
.ticks li { padding-inline-start: 24px; position: relative; }
.ticks li::before { content: "›"; position: absolute; inset-inline-start: 0; font-weight: 800; color: var(--pink); font-size: 18px; line-height: 1.5; }
[dir="rtl"] .ticks li::before { content: "‹"; }
.ticks b { color: var(--ink); font-weight: 700; }
.shift { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 22px; box-shadow: var(--shadow); min-width: 0; }
.shift-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3); }
.shift-head b { color: var(--ink); font-size: 17px; }
.table-x { overflow-x: auto; }
.shift table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 13.5px; }
.shift th { text-align: start; font-weight: 500; color: var(--ink-3); font-size: 12px; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.shift td { padding: 9px 4px; border-bottom: 1px solid var(--line); }
/* number columns line up at the end of the row in both languages: header and figures alike */
.shift th.num { text-align: end; }
.shift td.num { font-variant-numeric: tabular-nums; direction: ltr; text-align: right; }
[dir="rtl"] .shift td.num { text-align: left; }
.shift td.fa-cell { direction: rtl; text-align: start; }
[dir="ltr"] .shift td.fa-cell { text-align: left; }
.shift .up { color: var(--bad); font-weight: 700; }
.shift .down { color: var(--good); font-weight: 700; }
.note { font-size: 12px; color: var(--ink-3); margin-top: 10px; }

/* ---- alerts and quality: the card sits first on wide screens, after the text on narrow ones */
.explore.flip { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
.pill { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap;
  background: var(--chip, rgba(0, 0, 0, .06)); }
.pill.warn { color: var(--warn); background: rgba(245, 158, 11, .16); }
.pill.new { color: var(--pink); background: rgba(227, 48, 127, .12); }
.pill.bad { color: var(--bad); background: rgba(220, 38, 38, .12); }
.pill.good { color: var(--good); background: rgba(22, 163, 74, .13); }
.score { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.score div { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; font-size: 12px; color: var(--ink-3); min-width: 0; }
.score .n { display: block; font-size: 22px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---- closing */
.closing { margin-block: 96px 40px; border-radius: 30px; background: var(--tape); color: var(--tape-ink); padding: 48px 40px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center; }
.closing h2 { font-size: clamp(28px, 3.8vw, 46px); font-weight: 900; }
.closing p { opacity: .75; margin-top: 12px; max-width: 36em; }
footer { padding-block: 0 40px; color: var(--ink-3); font-size: 13px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---- load sequence: everything is visible at rest; motion only adds */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > *, .bench { animation: rise .8s cubic-bezier(.2, .8, .2, 1) both; }
  .hero-copy > :nth-child(2) { animation-delay: .06s; } .hero-copy > :nth-child(3) { animation-delay: .12s; }
  .hero-copy > :nth-child(4) { animation-delay: .18s; } .hero-copy > :nth-child(5) { animation-delay: .24s; } .bench { animation-delay: .12s; }
  .hero h1 .tape { animation: slap .7s cubic-bezier(.3, 1.6, .5, 1) .45s both; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@keyframes rise { from { transform: translateY(14px); opacity: .001; } }
@keyframes slap { from { transform: rotate(-14deg) translateY(-30px) scale(1.25); opacity: .001; } }

@media (max-width: 920px) {
  .hero, .explore, .explore.flip, .sec-head { grid-template-columns: minmax(0, 1fr); }
  .explore.flip > .shift { order: 2; }
  .hero { gap: 34px; }
  .steps, .specs { grid-template-columns: minmax(0, 1fr); }
  .spec { border-inline-start: none !important; border-top: 1px solid var(--line) !important; }
  .spec:first-child { border-top: none !important; }
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip div:nth-child(3) { border-inline-start: none; padding-inline-start: 0; }
  .strip div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .closing { grid-template-columns: minmax(0, 1fr); padding: 36px 26px; }
  nav.links { display: none; }
}
@media (max-width: 520px) {
  .bench { padding: 16px; border-radius: 22px; }
  .card { width: 170px; }
  .line { height: 290px; }
  .row { grid-template-columns: 96px minmax(0, 1fr) 36px; }
  .brand span { display: none; }
}
