/* ═══════════════════════════════════════════════════════════════════
   PANEL LOOP HUB - site styles.
   Colours, corner sizes and type come from the TAC Panel Loop app
   (graphite + yellow). Dark is the app's own theme; light is the same
   family on warm paper.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Fonts: the app uses Bahnschrift (titles) and Segoe UI (text). Windows has both, so
      Windows visitors see exactly the app's fonts. Phones and Macs don't have them, so the
      site carries their closest free twins: Barlow for Bahnschrift, Selawik for Segoe UI. ── */
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url("../assets/fonts/barlow/Barlow-Medium.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("../assets/fonts/barlow/Barlow-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 700; font-display: swap; src: url("../assets/fonts/barlow/Barlow-Bold.woff2") format("woff2"); }
@font-face { font-family: "Selawik"; font-weight: 400; font-display: swap; src: url("../assets/fonts/selawik/selawk.woff2") format("woff2"); }
@font-face { font-family: "Selawik"; font-weight: 600; font-display: swap; src: url("../assets/fonts/selawik/selawksb.woff2") format("woff2"); }
@font-face { font-family: "Selawik"; font-weight: 700; font-display: swap; src: url("../assets/fonts/selawik/selawkb.woff2") format("woff2"); }

:root {
  --font-title: "Bahnschrift", "Barlow", "Segoe UI Semibold", "Segoe UI", "Selawik", system-ui, sans-serif;
  --font-body: "Segoe UI", "Selawik", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: Consolas, "Cascadia Mono", ui-monospace, Menlo, monospace;

  /* the app's dark theme (Themes\Theme.xaml) */
  --shell: #09090a; --bg: #0d0d0f; --canvas: #121316; --sidebar: #0f1012;
  --card: #17181c; --card-hi: #1f2126; --raised: #26282e;
  --stroke: #2b2e35; --stroke-soft: rgba(255,255,255,.10);
  --hover: rgba(255,255,255,.07); --press: rgba(255,255,255,.125);
  --text: #f3f1ea; --text-dim: #c9c6bd; --muted: #8e8c85;
  --accent: #ffc61a; --accent-2: #ffa31a; --on-accent: #17140a;
  --accent-text: #ffc61a; --accent-soft: rgba(255,198,26,.12); --accent-line: rgba(255,198,26,.45);
  --good: #3fd68a; --warn: #ffb020; --bad: #ff5c5c; --info: #7fb3ff;
  --good-soft: rgba(63,214,138,.12); --bad-soft: rgba(255,92,92,.12);
  --shadow: 0 18px 50px rgba(0,0,0,.55);
  --page-glow: radial-gradient(1200px 600px at 18% -10%, #1a1b1f 0%, rgba(17,18,21,0) 60%);
  --wm-filter: grayscale(1) contrast(.7) brightness(2.1); --wm-opacity: .5;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --shell: #f1efe8; --bg: #f7f6f1; --canvas: #efede6; --sidebar: #f1efe8;
  --card: #ffffff; --card-hi: #faf9f5; --raised: #eceae3;
  --stroke: #dcd9cf; --stroke-soft: rgba(0,0,0,.08);
  --hover: rgba(0,0,0,.05); --press: rgba(0,0,0,.09);
  --text: #17160f; --text-dim: #45433a; --muted: #6f6c62;
  --accent: #ffc61a; --accent-2: #ffa31a; --on-accent: #17140a;
  --accent-text: #8a6200; --accent-soft: rgba(255,198,26,.24); --accent-line: rgba(176,128,0,.55);
  --good: #12854f; --warn: #a86400; --bad: #cc3636; --info: #2b66c4;
  --good-soft: rgba(18,133,79,.12); --bad-soft: rgba(204,54,54,.10);
  --shadow: 0 18px 50px rgba(60,50,20,.16);
  --page-glow: radial-gradient(1200px 600px at 18% -10%, #ffffff 0%, rgba(247,246,241,0) 60%);
  --wm-filter: grayscale(1) contrast(.55) brightness(1.5); --wm-opacity: .42;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 15px; line-height: 1.55;
  background-image: var(--page-glow); background-repeat: no-repeat;
}
main { flex: 1; width: 100%; }
img { max-width: 100%; display: block; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-title); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: .01em; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.ico { flex: none; vertical-align: middle; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 820px; }
.section { padding: 56px 0; }
.section.tight { padding: 32px 0; }
.eyebrow { font-family: var(--font-body); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.eyebrow.accent { color: var(--accent-text); }
.h-page { font-size: clamp(28px, 4.4vw, 44px); }
.h-sec { font-size: clamp(22px, 3vw, 30px); }
.lede { color: var(--text-dim); font-size: 16.5px; max-width: 64ch; margin-top: 12px; }
.sub { color: var(--muted); font-size: 13.5px; }
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }
.tac { color: var(--accent-text); }
.page-head { padding: 54px 0 8px; }

/* ── Buttons (the app's Accent / Ghost / Link buttons) ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent;
  font-size: 14px; font-weight: 700; cursor: pointer; text-decoration: none !important; white-space: nowrap;
  transition: transform .08s ease, filter .15s ease, background .15s ease, border-color .15s ease;
  user-select: none;
}
.btn:active { transform: scale(.97); }
.btn[disabled], .btn.is-off { opacity: .4; pointer-events: none; }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { filter: brightness(1.1); }
.btn-ghost { background: var(--card-hi); color: var(--text); border-color: var(--stroke); font-weight: 600; }
.btn-ghost:hover { border-color: var(--accent-line); background: var(--raised); }
.btn-lg { height: 52px; padding: 0 26px; font-size: 16px; border-radius: 12px; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; padding: 0; color: var(--accent-text); font-weight: 600; cursor: pointer; }
.btn-link:hover { text-decoration: underline; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 38px; border-radius: 9px;
  background: transparent; border: 1px solid transparent; color: var(--text-dim); cursor: pointer;
}
.icon-btn:hover { background: var(--hover); color: var(--text); }

/* ── Chips, tags ── */
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 15px;
  background: var(--card); border: 1px solid var(--stroke); color: var(--text-dim); font-size: 12.5px; font-weight: 600;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.good { background: var(--good); } .dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); } .dot.accent { background: var(--accent); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 7px; font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
  background: var(--accent-soft); color: var(--accent-text); }
.tag.free { background: var(--good-soft); color: var(--good); }

/* ── Cards ── */
.card { background: var(--card); border: 1px solid var(--stroke); border-radius: 14px; padding: 22px; }
.card.hero-card { border-radius: 18px; padding: 28px; background: linear-gradient(135deg, var(--card-hi), var(--card) 60%); }
.card h3 { font-size: 18px; }
.card .sub { margin-top: 6px; }
.grid { display: grid; gap: 18px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.icon-tile { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; flex: none; }
.row { display: flex; align-items: center; gap: 14px; }
.row.top { align-items: flex-start; }
.row.wrapx { flex-wrap: wrap; }
.spacer { flex: 1; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; } .mt32 { margin-top: 32px; } .mt48 { margin-top: 48px; }
.note { background: var(--raised); border-radius: 10px; padding: 12px 14px; color: var(--text-dim); font-size: 13px; display: flex; gap: 10px; align-items: flex-start; }
.note .ico { color: var(--accent-text); margin-top: 2px; }
.note.preview { border: 1px dashed var(--accent-line); background: var(--accent-soft); color: var(--text); }
ul.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
ul.ticks li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-dim); font-size: 14px; }
ul.ticks .ico { color: var(--good); margin-top: 3px; }

/* ── Header ── */
.site-header { position: sticky; top: 0; z-index: 60; background: color-mix(in srgb, var(--shell) 88%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--stroke); }
.site-header .bar { display: flex; align-items: center; flex-wrap: wrap; gap: 0 18px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none !important; color: var(--text); padding: 8px 0; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.brand-name { font-family: var(--font-title); font-weight: 600; font-size: 16.5px; letter-spacing: .03em; white-space: nowrap; }
.brand-name b { color: var(--accent-text); font-weight: 700; margin-right: 5px; }
.brand-hub { font-size: 10px; font-weight: 700; letter-spacing: .14em; color: var(--muted); border: 1px solid var(--stroke); border-radius: 6px; padding: 1px 6px; margin-left: 4px; }
.nav { display: flex; align-items: center; gap: 2px; order: 3; flex-basis: 100%; overflow-x: auto; scrollbar-width: none; padding-bottom: 8px; margin-top: -4px; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  position: relative; padding: 8px 11px; border-radius: 9px; color: var(--text-dim); text-decoration: none;
  font-size: 12px; font-weight: 700; letter-spacing: .07em; white-space: nowrap;
}
.nav a:hover { background: var(--hover); color: var(--text); }
.nav a.on { color: var(--text); background: var(--card-hi); }
.nav a.on::after { content: ""; position: absolute; left: 11px; right: 11px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; order: 2; }
.menu-btn { display: none; }
.site-header .wrap { max-width: 1480px; }
/* One row when everything fits; layout.js measures it (it depends on the language and on a login), not the window width. */
.site-header.one-row .nav { order: 2; flex: 1; flex-basis: auto; justify-content: center; padding-bottom: 0; margin-top: 0; }
.site-header.one-row .header-actions { order: 3; margin-inline-start: 0; }
.user-pill { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px 0 6px; border-radius: 19px; border: 1px solid var(--stroke); background: var(--card); color: var(--text); font-weight: 600; font-size: 13px; text-decoration: none !important; }
.user-pill .ava { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; font-size: 12px; font-weight: 700; }

.ava { overflow: hidden; flex: none; }
.ava img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── Bell ── */
.bell-btn { position: relative; }
.bell-dot { position: absolute; top: 2px; inset-inline-end: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center; box-shadow: 0 0 0 2px var(--shell); }
.bell-panel { position: fixed; z-index: 70; width: min(390px, calc(100vw - 24px)); max-height: min(70vh, 560px); overflow-y: auto; background: var(--card); border: 1px solid var(--stroke); border-radius: 14px; box-shadow: var(--shadow); animation: toastIn .18s ease; }
.bell-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; font-size: 14px; position: sticky; top: 0; background: var(--card); border-bottom: 1px solid var(--stroke); }
.bell-head a { font-size: 12.5px; font-weight: 600; }
.bell-list { padding: 6px; }
.note-item { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 12px 10px; border-radius: 10px; position: relative; }
.note-item + .note-item { border-top: 1px solid var(--stroke-soft); border-top-left-radius: 0; border-top-right-radius: 0; }
.note-item.unread { background: var(--accent-soft); }
.note-item.unread::after { content: ""; position: absolute; inset-inline-end: 10px; top: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.note-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.note-item.d3 .note-ico, .note-item.expired .note-ico { background: var(--bad-soft); color: var(--bad); }
.note-item b { display: block; font-size: 13.5px; padding-inline-end: 16px; }
.note-item p { color: var(--text-dim); font-size: 13px; margin-top: 3px; }
.note-meta { display: flex; gap: 14px; align-items: center; margin-top: 7px; font-size: 12px; color: var(--muted); }
.note-meta a { font-weight: 700; }
.note-empty { padding: 18px 12px; text-align: center; }

/* ── Profile page ── */
.profile-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.p-side { display: grid; gap: 18px; grid-row: span 2; }
.p-key { grid-column: 2 / span 2; }
.p-who { text-align: center; }
.ava.big { width: 112px; height: 112px; border-radius: 50%; margin: 0 auto; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); font-family: var(--font-title); font-size: 46px; font-weight: 700; border: 3px solid var(--stroke); }
.p-who h2 { font-size: 21px; margin-top: 14px; overflow-wrap: anywhere; }
.p-who .btn { margin-top: 8px; }
.p-label { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.expires-red { color: var(--bad); font-family: var(--font-title); font-size: clamp(20px, 2.6vw, 27px); font-weight: 700; line-height: 1.2; margin-top: 4px; }
.countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 16px; max-width: 520px; }
.countdown div { background: var(--bg); border: 1px solid var(--stroke); border-radius: 12px; padding: 12px 6px 10px; text-align: center; }
.countdown b { display: block; font-family: var(--font-title); font-size: clamp(26px, 4vw, 38px); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.countdown span { display: block; margin-top: 6px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.countdown.soon b { color: var(--warn); } .countdown.urgent b, .countdown.over b { color: var(--bad); }
.timebar { height: 6px; border-radius: 3px; background: var(--raised); margin-top: 16px; max-width: 520px; overflow: hidden; }
.timebar i { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.timebar.soon i { background: var(--warn); } .timebar.urgent i, .timebar.over i { background: var(--bad); }
.cal-head { display: flex; align-items: center; gap: 6px; }
.cal-head h3 { flex: 1; font-size: 18px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-top: 12px; }
.cal .wd { text-align: center; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; color: var(--muted); padding: 4px 0; }
.cal .d { position: relative; aspect-ratio: 1 / 1; display: grid; place-items: center; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.cal .d.out { color: var(--muted); opacity: .4; }
.cal .d.run { background: var(--accent-soft); color: var(--text); }
.cal .d.today { box-shadow: inset 0 0 0 2px var(--text-dim); color: var(--text); }
.cal .d.remind::after { content: ""; position: absolute; bottom: 4px; width: 5px; height: 5px; border-radius: 50%; background: var(--warn); }
.cal .d.exp { background: var(--bad); color: #fff; font-weight: 800; box-shadow: 0 0 0 2px var(--bad-soft); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 14px; font-size: 12px; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.cal-exp-line { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--bad-soft); color: var(--bad); font-weight: 700; font-size: 14px; display: flex; gap: 8px; align-items: center; }
.switch { appearance: none; -webkit-appearance: none; width: 44px; height: 24px; border-radius: 12px; background: var(--raised); border: 1px solid var(--stroke); position: relative; cursor: pointer; flex: none; margin: 0; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: transform .16s ease, background .15s; }
.switch:checked { background: var(--accent); border-color: var(--accent); }
.switch:checked::after { transform: translateX(20px); background: var(--on-accent); }
.sim { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.renew-hint { margin: 0 auto 22px; max-width: 900px; }
/* Join keys: 1 / 2 / 3 PCs on the prices page (24 Nov 2026) */
.seat-tabs { width: fit-content; max-width: 100%; margin: 0 auto 26px; justify-content: center; }
.seat-tabs .tab small { font-size: 11px; font-weight: 700; color: var(--good); }
/* "Add days" panel on the profile (21 Nov 2026) */
.renew-card { border-color: var(--accent-line); }
.key-short { font-family: var(--font-mono); letter-spacing: .03em; }
.rplans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.rplan { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--stroke); background: var(--card-hi); color: var(--text); text-align: start; cursor: pointer; font: inherit; transition: border-color .15s ease; }
.rplan:hover { border-color: var(--accent-line); }
.rplan.sel { border-color: var(--accent); background: linear-gradient(160deg, var(--accent-soft), var(--card-hi) 60%); }
.rplan .term { font-weight: 700; font-size: 14px; }
.rplan .amt { font-family: var(--font-title); font-size: 20px; font-weight: 700; }
.rplan .amt s { font-family: var(--font-body); font-size: 12.5px; font-weight: 500; }
.rdates { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--stroke); }
.rdates b { display: block; font-size: 16px; margin-top: 3px; }
.rdates b.good { color: var(--good); }
.rdates .arrow { color: var(--muted); display: inline-flex; }
[dir="rtl"] .rdates .arrow { transform: scaleX(-1); }
.renew-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 0; border-bottom: 1px solid var(--stroke-soft); font-size: 13.5px; }
.renew-line:last-child { border-bottom: 0; }
.renew-line .sub { margin-inline-start: auto; }
.note-item.renewed .note-ico { background: var(--good-soft); color: var(--good); }
@media (max-width: 700px) { .rplans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1100px) {
  .profile-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .p-side { grid-row: auto; grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .p-key { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .profile-grid, .p-side { grid-template-columns: minmax(0, 1fr); }
  .countdown { gap: 6px; }
}

/* ── Language menu ── */
.lang-menu { position: fixed; z-index: 70; width: 160px; padding: 6px; background: var(--card); border: 1px solid var(--stroke); border-radius: 12px; box-shadow: var(--shadow); display: grid; gap: 2px; }
.lang-menu button { height: 38px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--text-dim); font-size: 14px; font-weight: 600; text-align: start; cursor: pointer; }
.lang-menu button:hover { background: var(--hover); color: var(--text); }
.lang-menu button.on { background: var(--accent-soft); color: var(--accent-text); }

/* ── Staff page ── */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; padding: 5px; border-radius: 14px; background: var(--card); border: 1px solid var(--stroke); }
.tab { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--text-dim); font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; }
.tab:hover { background: var(--hover); color: var(--text); }
.tab.on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-text); }
.kvs { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.kv { display: flex; flex-direction: column; min-width: 0; }
.kv span { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.kv b { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.logrow { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--stroke-soft); font-size: 14px; }
.logrow:last-child { border-bottom: 0; }
@media (max-width: 640px) { .logrow { grid-template-columns: 1fr; gap: 2px; } }

/* ── Mobile menu ── */
.drawer { position: fixed; inset: 0; z-index: 80; display: none; }
.drawer.open { display: block; }
.drawer .scrim { position: absolute; inset: 0; background: rgba(0,0,0,.6); }
.drawer .panel { position: absolute; top: 0; inset-inline-end: 0; bottom: 0; width: min(330px, 88vw); background: var(--sidebar); border-inline-start: 1px solid var(--stroke); padding: 18px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; animation: slideIn .22s ease; }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer a.item { display: flex; align-items: center; gap: 12px; padding: 13px 12px; border-radius: 10px; color: var(--text-dim); font-weight: 700; font-size: 13px; letter-spacing: .06em; text-decoration: none; }
.drawer a.item:hover, .drawer a.item.on { background: var(--card-hi); color: var(--text); }
.drawer a.item.on { box-shadow: inset 3px 0 0 var(--accent); }
.drawer .sep { height: 1px; background: var(--stroke); margin: 10px 4px; }

/* ── Forms (the app's Field.Box / Combo) ── */
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field > label, .field > .label { font-size: 13px; font-weight: 600; color: var(--text-dim); }
.field .hint { font-size: 12px; color: var(--muted); }
.field .err { font-size: 12.5px; color: var(--bad); display: none; }
.field.bad .err { display: block; }
.field.bad .input { border-color: var(--bad); }
.input {
  width: 100%; min-height: 44px; padding: 10px 13px; border-radius: 10px; border: 1px solid var(--stroke);
  background: var(--bg); color: var(--text); font-size: 15px; caret-color: var(--accent);
  transition: border-color .15s ease;
}
.input::placeholder { color: var(--muted); }
.input:hover { border-color: var(--accent-line); }
.input:focus { outline: none; border-color: var(--accent); }
textarea.input { min-height: 130px; resize: vertical; line-height: 1.5; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 19px, calc(100% - 14px) 19px; background-size: 6px 6px; background-repeat: no-repeat; padding-inline-end: 38px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--text-dim); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.form-done { text-align: center; padding: 26px 10px; }
.form-done .big { width: 62px; height: 62px; border-radius: 50%; background: var(--good-soft); color: var(--good); display: grid; place-items: center; margin: 0 auto 16px; }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ── Pricing ── */
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.plan { position: relative; display: flex; flex-direction: column; gap: 6px; background: var(--card); border: 1px solid var(--stroke); border-radius: 16px; padding: 24px 20px 20px; text-align: start; cursor: pointer; transition: border-color .15s, transform .15s, background .15s; }
.plan:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.plan.sel { border-color: var(--accent); background: linear-gradient(160deg, var(--accent-soft), var(--card) 55%); }
.plan .ribbon { position: absolute; top: -11px; inset-inline-start: 18px; background: var(--accent); color: var(--on-accent); font-size: 10.5px; font-weight: 800; letter-spacing: .06em; padding: 3px 9px; border-radius: 7px; text-transform: uppercase; }
.plan .term { font-family: var(--font-title); font-size: 19px; font-weight: 600; }
.plan .price { display: flex; align-items: baseline; gap: 10px; margin-top: 6px; }
.plan .now { font-family: var(--font-title); font-size: 44px; font-weight: 700; line-height: 1; }
.plan .now sup { font-size: 20px; vertical-align: top; position: relative; top: 4px; margin-right: 2px; color: var(--text-dim); }
.plan .was { color: var(--muted); font-size: 19px; text-decoration: line-through; text-decoration-color: var(--bad); text-decoration-thickness: 2px; }
.plan .per { color: var(--muted); font-size: 12.5px; }
.plan .save { margin-top: 8px; align-self: flex-start; }
.plan .pick { margin-top: 16px; }
.radio-ring { position: absolute; top: 18px; inset-inline-end: 18px; width: 20px; height: 20px; border-radius: 50%; border: 1.6px solid var(--muted); display: grid; place-items: center; }
.plan.sel .radio-ring { border-color: var(--accent); }
.plan.sel .radio-ring::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.checkout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.sum-line { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--stroke); font-size: 14px; color: var(--text-dim); }
.sum-line.total { border-bottom: 0; font-size: 18px; font-weight: 700; color: var(--text); padding-top: 14px; }
.key-box { font-family: var(--font-mono); font-size: 15px; letter-spacing: .04em; background: var(--bg); border: 1px dashed var(--accent-line); border-radius: 10px; padding: 14px; text-align: center; word-break: break-all; }
.compare { width: 100%; border-collapse: collapse; font-size: 14px; }
.compare th, .compare td { padding: 11px 12px; border-bottom: 1px solid var(--stroke); text-align: start; }
.compare th { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.compare td.c, .compare th.c { text-align: center; width: 90px; }
.compare .yes { color: var(--good); } .compare .no { color: var(--muted); }

/* ── Login ── */
.auth-card { max-width: 440px; margin: 0 auto; }
.btn-provider { height: 48px; justify-content: flex-start; gap: 12px; padding: 0 16px; font-weight: 600; }
.btn-provider .ico { width: 20px; height: 20px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; margin: 18px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--stroke); }

/* ── News ── */
.post { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 22px; padding: 26px 0; border-bottom: 1px solid var(--stroke); }
.post .ver { font-family: var(--font-title); font-size: 30px; font-weight: 700; color: var(--accent-text); line-height: 1; }
.post .date { color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.post h3 { font-size: 22px; }
.post .items { display: grid; gap: 10px; margin-top: 14px; }
.post .items div { display: flex; gap: 10px; align-items: flex-start; color: var(--text-dim); font-size: 14px; }
.post .items .tag { margin-top: 2px; flex: none; min-width: 42px; text-align: center; }
.post .also { margin: 14px 0 0; padding-inline-start: 18px; color: var(--muted); font-size: 13.5px; }

/* ── Tutorial ── */
.steps { counter-reset: step; display: grid; gap: 14px; }
.step { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 16px; align-items: start; }
.step::before { counter-increment: step; content: counter(step); width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); font-family: var(--font-title); font-size: 22px; font-weight: 700; border: 1px solid var(--accent-line); }
.step h3 { font-size: 18px; }
.step p { color: var(--text-dim); margin-top: 6px; font-size: 14.5px; }

/* ── FAQ ── */
details.faq { border: 1px solid var(--stroke); border-radius: 12px; background: var(--card); margin-bottom: 10px; overflow: hidden; }
details.faq summary { list-style: none; cursor: pointer; padding: 16px 18px; font-weight: 600; display: flex; align-items: center; gap: 12px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: ""; margin-inline-start: auto; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; flex: none; }
details.faq[open] summary::after { transform: rotate(-135deg); border-color: var(--accent); }
details.faq[open] { border-color: var(--accent-line); }
details.faq .a { padding: 0 18px 18px; color: var(--text-dim); font-size: 14.5px; }

/* ── Contact + footer ── */
.contact { border-top: 1px solid var(--stroke); background: var(--sidebar); }
.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.contact-card { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 14px; border: 1px solid var(--stroke); background: var(--card); color: var(--text); text-decoration: none !important; transition: border-color .15s, transform .15s; }
.contact-card:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.contact-card .logo { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: #fff; flex: none; }
.contact-card .logo.discord { background: #5865f2; } .contact-card .logo.whatsapp { background: #1faa59; } .contact-card .logo.mail { background: var(--accent); color: var(--on-accent); }
.contact-grid:has(> :nth-child(4)) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .contact-grid:has(> :nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .contact-grid:has(> :nth-child(4)) { grid-template-columns: minmax(0, 1fr); } }
.contact-card span span { overflow-wrap: anywhere; }
.contact-card b { display: block; font-size: 15px; color: var(--text); } .contact-card span span { color: var(--muted); font-size: 12.5px; }
.site-footer { background: var(--shell); border-top: 1px solid var(--stroke); padding: 34px 0 30px; text-align: center; }
.foot-brand { display: inline-flex; flex-direction: column; align-items: center; gap: 12px; color: var(--text); text-decoration: none !important; }
.foot-brand img { width: 76px; height: 76px; border-radius: 18px; box-shadow: var(--shadow); }
.foot-brand .brand-name { font-size: 22px; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-top: 18px; font-size: 12.5px; }
.foot-links a, .foot-links button { color: var(--muted); background: none; border: 0; cursor: pointer; padding: 0; font-size: 12.5px; }
.foot-links a:hover, .foot-links button:hover { color: var(--text); text-decoration: none; }
.foot-fine { color: var(--muted); font-size: 11.5px; margin-top: 14px; max-width: 70ch; margin-left: auto; margin-right: auto; }

/* ── Toasts ── */
.toasts { position: fixed; inset-inline-end: 18px; top: 76px; z-index: 120; display: grid; gap: 10px; width: min(360px, calc(100vw - 36px)); pointer-events: none; }
.toast { pointer-events: auto; background: var(--raised); border: 1px solid var(--stroke); border-inline-start: 4px solid var(--accent); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); font-size: 13.5px; animation: toastIn .25s ease; }
.toast b { display: block; font-size: 13.5px; }
.toast span { color: var(--text-dim); }
.toast.out { opacity: 0; transform: translateX(16px); transition: all .3s ease; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ── Preview-mode ribbon ── */
.preview-bar { background: var(--accent-soft); border-bottom: 1px dashed var(--accent-line); color: var(--text); font-size: 12.5px; text-align: center; padding: 6px 12px; }
.preview-bar b { color: var(--accent-text); }
.soon-bar a { color: var(--accent-text); font-weight: 600; }

/* ── Home hero ── */
.hero { padding: 46px 0 18px; text-align: center; }
.hero h1 { font-size: clamp(31px, 5.6vw, 66px); line-height: 1.05; text-transform: uppercase; letter-spacing: .01em; margin-left: auto; margin-right: auto; text-wrap: balance; }
.hero h1 .hl { display: block; color: var(--accent-text); }                 /* second line of the headline, in the app's yellow */
.hero .lede { margin-left: auto; margin-right: auto; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; justify-content: center; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; justify-content: center; }
.try-label { display: flex; align-items: center; gap: 10px; margin: 6px 0 14px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.try-label .ico { color: var(--accent-text); }

/* ── Intro (see js/intro.js) ── */
.intro { position: fixed; inset: 0; z-index: 200; background: var(--bg); display: grid; place-items: center; overflow: hidden; transition: background-color .6s ease; }
.intro.clear { background-color: transparent; pointer-events: none; }
.intro-stage { position: relative; width: 100%; height: 100%; }
.intro-logo, .intro-name { position: absolute; left: 50%; top: 50%; will-change: transform, opacity, filter; }
.intro-logo { width: var(--logo, 200px); height: var(--logo, 200px); margin: calc(var(--logo, 200px) / -2) 0 0 calc(var(--logo, 200px) / -2); border-radius: 22%; opacity: 0; filter: var(--wm-filter); transition: opacity .7s ease, filter .9s ease, transform .75s cubic-bezier(.65,0,.2,1), box-shadow .9s ease; }
.intro-logo.wm { opacity: var(--wm-opacity); }
.intro-logo.col { opacity: 1; filter: none; box-shadow: 0 0 80px rgba(255,198,26,.22); }
.intro-name { font-family: var(--font-title); font-weight: 700; letter-spacing: .05em; white-space: nowrap; font-size: var(--name, 34px); line-height: 1; color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,.85), 0 0 3px rgba(0,0,0,.9); opacity: 0; transform: translate(-50%, -50%) scale(.72); transition: opacity .45s ease, transform .75s cubic-bezier(.65,0,.2,1), color .5s ease, text-shadow .5s ease; }
.intro-name b { color: var(--accent); margin-right: .28em; transition: color .5s ease; }
.intro-name.in { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.intro-name.out { color: var(--text); text-shadow: none; }
.intro-name.out b { color: var(--accent-text); }
.intro-skip { position: absolute; inset-inline-end: 18px; bottom: 18px; z-index: 2; background: var(--card); border: 1px solid var(--stroke); color: var(--text-dim); border-radius: 10px; height: 36px; padding: 0 14px; font-size: 12.5px; font-weight: 600; cursor: pointer; opacity: 0; animation: fadeIn .4s .5s forwards; }
.intro-skip:hover { color: var(--text); border-color: var(--accent-line); }
@keyframes fadeIn { to { opacity: 1; } }
html.intro-running .site-header .brand { opacity: 0; }
html.intro-running { overflow: hidden; }
.site-header .brand { transition: opacity .2s ease; }
.reveal { animation: reveal .5s ease both; }
@keyframes reveal { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ── Responsive ── */
@media (max-width: 1100px) {
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .nav { display: none; }
  .menu-btn { display: inline-grid; }
  .header-actions .hide-m { display: none; }
  .grid.c3, .contact-grid { grid-template-columns: 1fr; }
  .checkout { grid-template-columns: 1fr; }
  .post { grid-template-columns: 1fr; gap: 10px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .section { padding: 40px 0; }
  .grid.c2, .grid.c4, .field-row { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; }
  .brand-hub { display: none; }
  .card { padding: 18px; }
  .card.hero-card { padding: 20px; }
  .compare td.c, .compare th.c { width: 62px; }
  .toasts { top: 68px; inset-inline-end: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- Arabic: the page reads right to left ----------
   The layout rules above say start/end instead of left/right, so they mirror by themselves.
   What is left is listed here. */
[dir="rtl"] .brand, [dir="rtl"] .foot-brand, [dir="rtl"] .intro { direction: ltr; }               /* logo and name keep their order */
[dir="rtl"] [data-noi18n], [dir="rtl"] .key-box, [dir="rtl"] code { direction: ltr; }               /* parts that stay English */
[dir="rtl"] input[type="email"], [dir="rtl"] input[type="url"], [dir="rtl"] input[type="password"],
[dir="rtl"] #a_key, [dir="rtl"] #a_pc, [dir="rtl"] #codeBox { direction: ltr; text-align: right; }  /* typed in Latin letters */
[dir="rtl"] body *:not(.brand *, .foot-brand *, .intro *, .pa-brand *, [data-noi18n], [data-noi18n] *) { letter-spacing: 0 !important; }  /* spaced letters break Arabic words */
[dir="rtl"] select.input { background-position: 14px 19px, 20px 19px; }
[dir="rtl"] .user-pill { padding: 0 6px 0 12px; }
[dir="rtl"] .drawer .panel { animation-name: slideInRtl; }
@keyframes slideInRtl { from { transform: translateX(-30px); opacity: 0; } to { transform: none; opacity: 1; } }
[dir="rtl"] .toast.out { transform: translateX(-16px); }
[dir="rtl"] .cal-head .icon-btn svg { transform: scaleX(-1); }                                      /* previous / next month arrows */
[dir="rtl"] .preview-bar:not(.soon-bar), [dir="rtl"] .note.preview { direction: ltr; }                              /* notes for the owner, in English */
