/* Easy Tech web sender.
   One typeface (IBM Plex Sans Arabic). The brand navy carries the frame: the side
   navigation and the one dark "board" a page may have (credits on the home page, the
   live progress of a campaign). Green is WhatsApp and "sent", blue is SMS, red is failed.
   Everything else stays quiet. Layout is right-to-left throughout. */

@font-face { font-family: "Plex Arabic"; font-weight: 400; font-display: swap;
  src: url("../fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2") format("woff2");
  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: "Plex Arabic"; font-weight: 500; font-display: swap;
  src: url("../fonts/ibm-plex-sans-arabic-arabic-500-normal.woff2") format("woff2");
  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: "Plex Arabic"; font-weight: 600; font-display: swap;
  src: url("../fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2") format("woff2");
  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: "Plex Arabic"; font-weight: 700; font-display: swap;
  src: url("../fonts/ibm-plex-sans-arabic-arabic-700-normal.woff2") format("woff2");
  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: "Plex Arabic"; font-weight: 400; font-display: swap;
  src: url("../fonts/ibm-plex-sans-arabic-latin-400-normal.woff2") format("woff2");
  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+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Plex Arabic"; font-weight: 500; font-display: swap;
  src: url("../fonts/ibm-plex-sans-arabic-latin-500-normal.woff2") format("woff2");
  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+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Plex Arabic"; font-weight: 600; font-display: swap;
  src: url("../fonts/ibm-plex-sans-arabic-latin-600-normal.woff2") format("woff2");
  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+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Plex Arabic"; font-weight: 700; font-display: swap;
  src: url("../fonts/ibm-plex-sans-arabic-latin-700-normal.woff2") format("woff2");
  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+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  --navy: #21335a;        /* the Easy Tech emblem */
  --navy-deep: #131d38;
  --navy-soft: #2f4474;
  --ink: #141d33;
  --ink-2: #36435f;
  --muted: #64708a;
  --paper: #f2f4f9;
  --surface: #ffffff;
  --line: #e1e6f0;
  --line-soft: #edf0f6;
  --field: #c9d1e0;

  --wa: #0b7a5c;          /* WhatsApp */
  --wa-wash: #e3f5ee;
  --wa-bright: #35d6a0;   /* on navy */
  --sms: #2b5bd7;         /* SMS */
  --sms-wash: #e8eefc;
  --sms-bright: #8fb0ff;  /* on navy */

  --sent: #17a673;
  --bad: #c5352b;
  --bad-wash: #fcebe9;
  --bad-bright: #ff8a7a;  /* on navy */
  --warn: #8a5a00;
  --warn-wash: #fff3d6;
  --amber: #f5b638;
  --track: #e3e7f0;

  /* what the two themes disagree on */
  --surface-2: #f8f9fc;   /* table heads */
  --hover: #fafbfe;
  --field-bg: #ffffff;
  --field-hover: #97a3bd;
  --btn-bg: var(--navy);
  --btn-ink: #ffffff;
  --btn-hover: var(--navy-soft);
  --accent: var(--navy);
  --accent-ink: var(--navy);
  --link: var(--sms);
  --ring: rgba(43, 91, 215, 0.16);
  --wa-ink: #0b7a5c;      /* text on a wash */
  --sms-ink: #2b5bd7;
  --wa-fill: #0b7a5c;     /* chart marks and keys */
  --sms-fill: #2b5bd7;
  --wa-chart: #1aa77b;    /* the same two series on a dark surface (checked with the palette validator) */
  --sms-chart: #6a8ff0;
  --sent-wash: #dff5eb;
  --sent-ink: #0b6a51;
  --bad-ink: #c5352b;
  --bad-line: #e9beb9;
  --warn-line: #f0dca8;
  --ok-wash: #f1fbf6;
  --ok-line: #b4e2cf;
  --info-wash: #e8eefc;
  --info-line: #cfdcfa;
  --info-ink: #24407f;
  --pending: #b9c2d6;
  --tip-bg: #131d38;
  --phone-frame: #131d38;
  --side-line: transparent;

  --focus: #7ea2ff;
  --side: 264px;
  --r: 14px;
  --r-sm: 10px;
  --lift: 0 14px 34px -22px rgba(19, 29, 56, 0.45);
  --font: "Plex Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.65; color: var(--ink); background: var(--paper); }

h1, h2, h3, p { margin: 0; }
h1 { font-size: 28px; line-height: 1.3; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 18px; line-height: 1.4; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
a { color: var(--link); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* Numbers and phones read left-to-right inside Arabic text and line up in columns. */
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.small { font-size: 13px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico--sm { width: 16px; height: 16px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ------------------------------------------------------------------ the frame */
.side {
  position: fixed; inset-block: 0; inset-inline-start: 0; width: var(--side); z-index: 40;
  background: var(--navy-deep); color: #b9c4de;
  display: flex; flex-direction: column; gap: 4px; padding: 18px 14px 14px; overflow-y: auto;
  border-inline-end: 1px solid var(--side-line);
}
.side__brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 16px; color: #fff; text-decoration: none; }
.side__brand img { width: 36px; height: 36px; display: block; }
.side__brand b { display: block; font-size: 17px; font-weight: 700; line-height: 1.25; }
.side__brand small { display: block; font-size: 12px; color: #8f9dbd; line-height: 1.3; }
.side__new {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; margin-bottom: 12px;
  border-radius: 12px; background: #fff; color: var(--navy-deep); font-weight: 700; text-decoration: none;
}
.side__new:hover { background: #e9eefb; }
.side__label { font-size: 12px; color: #7e8cae; padding: 14px 12px 4px; }
.side__nav { display: grid; gap: 2px; }
.side__nav a {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px;
  color: #b9c4de; text-decoration: none; font-weight: 500;
}
.side__nav a:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.side__nav a[aria-current="page"] { background: rgba(255, 255, 255, 0.12); color: #fff; }
.side__nav .end { margin-inline-start: auto; display: inline-flex; align-items: center; }
.live { width: 9px; height: 9px; border-radius: 50%; background: var(--wa-bright); animation: pulse 1.6s ease-in-out infinite; }
.badge {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--amber); color: #2b1d00;
  font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums;
}

.wallet { margin-top: auto; padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.08); }
.wallet__title { font-size: 12px; color: #8f9dbd; margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wallet select { width: 100%; margin-bottom: 8px; background: var(--navy-deep); color: #fff; border: 1px solid #3a4c78; border-radius: 8px; padding: 6px 8px; }
.wallet__row { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 14px; }
.wallet__row i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.wallet__row b { margin-inline-start: auto; color: #fff; font-size: 16px; font-weight: 600; }
.wallet__row.is-low b { color: #ffc9c0; }
.wallet__row.is-low::after { content: "قرّب يخلص"; font-size: 11px; color: #ffc9c0; order: 3; }
.wallet__ask {
  display: block; text-align: center; margin-top: 9px; padding: 6px; border-radius: 8px; font-size: 14px; font-weight: 600;
  color: #fff; text-decoration: none; border: 1px solid rgba(255, 255, 255, 0.22);
}
.wallet__ask:hover { background: rgba(255, 255, 255, 0.08); }
.side__foot { display: grid; gap: 2px; padding-top: 10px; font-size: 14px; }
.side__foot a, .side__foot button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border-radius: 10px;
  color: #b9c4de; text-decoration: none; background: none; border: 0; cursor: pointer; text-align: start;
}
.side__foot a:hover, .side__foot button:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.side__foot form { margin: 0; }

.topbar { display: none; }
.scrim { position: fixed; inset: 0; z-index: 35; background: rgba(19, 29, 56, 0.5); }
.shell { margin-inline-start: var(--side); min-height: 100vh; }
.plain .shell { margin: 0; }

.offline, .announce { text-align: center; padding: 9px 20px; font-weight: 500; }
.offline { background: var(--warn-wash); color: var(--warn); border-bottom: 1px solid var(--warn-line); }
.announce { background: var(--info-wash); color: var(--info-ink); border-bottom: 1px solid var(--info-line); }

/* ------------------------------------------------------------------ page */
.page { max-width: 1180px; margin: 0 auto; padding: 30px 32px 80px; }
.page--narrow { max-width: 760px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.head p { color: var(--muted); margin-top: 4px; max-width: 70ch; }
.head__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; color: var(--muted); text-decoration: none; font-size: 14px; }
.back:hover { color: var(--ink); }
.back::before { content: "›"; font-size: 18px; line-height: 1; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.panel + .panel { margin-top: 20px; }
.section { margin-top: 26px; }
.head + .section, .tabs + .section, .tiles + .section, .back + .section, .notice + .section { margin-top: 0; }
.panel--flush { padding: 0; overflow: hidden; }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.section__title { margin: 0 0 12px; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 12px; flex-wrap: wrap; }
.section__head h2 { margin: 0; }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border-radius: var(--r-sm); border: 1px solid transparent;
  font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
  background: var(--btn-bg); color: var(--btn-ink); transition: background-color 0.12s, border-color 0.12s;
}
.btn:hover { background: var(--btn-hover); }
.btn--wa { background: var(--wa); color: #fff; }
.btn--wa:hover { background: #0d8c6a; }
.btn--sms { background: var(--sms); color: #fff; }
.btn--sms:hover { background: #3a69e2; }
.btn--quiet { background: var(--surface); border-color: var(--field); color: var(--ink); }
.btn--quiet:hover { background: var(--hover); border-color: var(--field-hover); }
.btn--danger { background: var(--surface); border-color: var(--bad-line); color: var(--bad-ink); }
.btn--danger:hover { background: var(--bad-wash); border-color: var(--bad-ink); }
.btn--light { background: #fff; color: var(--navy-deep); }
.btn--light:hover { background: #e9eefb; }
.btn--small { min-height: 34px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.btn--big { min-height: 50px; padding: 0 26px; font-size: 16px; border-radius: 12px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.inline-form { display: inline; }

/* ------------------------------------------------------------------ forms */
.field { display: block; margin-bottom: 16px; }
.field__label { display: block; font-weight: 600; margin-bottom: 6px; }
.field__label small { font-weight: 400; color: var(--muted); }
.input, .field textarea, .field select {
  width: 100%; background: var(--field-bg); border: 1px solid var(--field); border-radius: var(--r-sm); padding: 9px 12px;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.input:hover, .field textarea:hover { border-color: var(--field-hover); }
::placeholder { color: var(--muted); opacity: 0.75; }
.input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--link); box-shadow: 0 0 0 3px var(--ring); }
textarea { resize: vertical; }
.hint { display: block; color: var(--muted); font-size: 13px; margin-top: 5px; }
.check { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 4px; accent-color: var(--accent); flex: none; }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > * { flex: 1 1 200px; }
.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.chip { border: 1px solid var(--field); background: var(--field-bg); border-radius: 999px; padding: 3px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.chip:hover { border-color: var(--accent-ink); }

/* ------------------------------------------------------------------ notices */
.notice {
  border: 1px solid var(--line); background: var(--surface); border-radius: 12px;
  padding: 12px 16px; margin-bottom: 16px; border-inline-start-width: 5px;
}
.notice--ok { border-color: var(--ok-line); border-inline-start-color: var(--sent); background: var(--ok-wash); }
.notice--bad { border-color: var(--bad-line); border-inline-start-color: var(--bad); background: var(--bad-wash); }
.notice--warn { border-color: var(--warn-line); border-inline-start-color: #d79b1c; background: var(--warn-wash); }
.notice--info { border-inline-start-color: var(--link); }
.notice ul { margin: 6px 0 0; padding-inline-start: 20px; }
.notice strong { font-weight: 600; }
.callout {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  border-radius: var(--r); padding: 16px 20px; background: var(--info-wash); border: 1px solid var(--info-line);
}
.callout p { color: var(--info-ink); max-width: 62ch; }
.callout strong { color: var(--ink); font-weight: 600; }

/* ------------------------------------------------------------------ tags */
.tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600; background: var(--line-soft); color: var(--ink-2); white-space: nowrap;
}
.tag--whatsapp { background: var(--wa-wash); color: var(--wa-ink); }
.tag--sms { background: var(--sms-wash); color: var(--sms-ink); }
.tag--running { background: var(--sent-wash); color: var(--sent-ink); }
.tag--queued { background: var(--sms-wash); color: var(--sms-ink); }
.tag--paused, .tag--pending-request { background: var(--warn-wash); color: var(--warn); }
.tag--completed, .tag--approved { background: var(--sent-wash); color: var(--sent-ink); }
.tag--cancelled, .tag--draft { background: var(--line-soft); color: var(--muted); }
.tag--sent { background: var(--sent-wash); color: var(--sent-ink); }
.tag--failed, .tag--invalid, .tag--declined { background: var(--bad-wash); color: var(--bad-ink); }
.tag--pending, .tag--sending { background: var(--line-soft); color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.tag--running .dot { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.25; } }

/* ------------------------------------------------------------------ the delivery bar
   One whole (the list) split into what went out, what failed and what is left.
   It fills from the right, the reading direction. Tall on the campaign page with the
   share printed inside each block; thin in lists, where the figures sit beside it.
   The failed block is striped as well as red, so it never depends on colour alone. */
.split-bar { display: flex; gap: 2px; height: 30px; }
.split-bar__part {
  flex: 1 1 0; min-width: 3px; border-radius: 5px; background: var(--track);
  display: flex; align-items: center; padding: 0 9px; overflow: visible;
  font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap;
  transition: flex-grow 0.6s ease;
}
.split-bar__part--sent { background: var(--sent); color: #fff; }
.split-bar__part--failed {
  background-color: var(--bad); color: #fff;
  background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.22) 0 3px, transparent 3px 8px);
}
.split-bar__part span.is-tight { visibility: hidden; }
.split-bar--thin { height: 8px; }
.split-bar--thin .split-bar__part { border-radius: 999px; padding: 0; min-width: 2px; }

.tally { display: flex; flex-wrap: wrap; gap: 6px 28px; margin-top: 16px; }
.tally__item { display: flex; align-items: baseline; gap: 8px; }
.tally__item b { font-size: 22px; font-weight: 600; }
.tally__key { width: 10px; height: 10px; border-radius: 3px; align-self: center; flex: none; }
.tally__key--sent { background: var(--sent); }
.tally__key--failed { background: var(--bad); }
.tally__key--pending { background: var(--pending); }

.percent { font-size: 64px; font-weight: 700; line-height: 1; direction: ltr; unicode-bidi: isolate; letter-spacing: -0.02em; }
.percent small { font-size: 24px; font-weight: 500; color: var(--muted); }
.live-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.live-note { color: var(--muted); max-width: 46ch; }
.live-note strong { color: var(--ink); font-weight: 600; }
.pace { color: var(--muted); margin-top: 10px; }
.pace:empty { display: none; }

/* The one dark surface a page may have. */
.board {
  position: relative; overflow: hidden; border: 0; color: #fff; padding: 26px 28px;
  display: flex; flex-direction: column;
  background: var(--navy);
  background-image: radial-gradient(120% 140% at 0% 0%, rgba(255, 255, 255, 0.10), transparent 55%);
  box-shadow: var(--lift);
}
.board .muted, .board .live-note, .board .pace, .board .tally__item { color: #c3cee8; }
.board .live-note strong, .board .tally__item b { color: #fff; }
.board .percent small { color: #a9b7d8; }
.board .split-bar__part { background: rgba(255, 255, 255, 0.16); color: #fff; }
.board .split-bar__part--sent { background: var(--wa-bright); color: #052a1e; }
.board .split-bar__part--failed { background-color: var(--bad-bright); color: #3d0b05; background-image: repeating-linear-gradient(135deg, rgba(61, 11, 5, 0.22) 0 3px, transparent 3px 8px); }
.board .tally__key--sent { background: var(--wa-bright); }
.board .tally__key--failed { background: var(--bad-bright); }
.board .tally__key--pending { background: rgba(255, 255, 255, 0.35); }
.board .notice { color: var(--ink); }

/* ------------------------------------------------------------------ tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: start; font-size: 13px; font-weight: 600; color: var(--muted);
  padding: 11px 18px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2);
}
.table td { padding: 12px 18px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tbody tr:hover td { background: var(--hover); }
.table tr:last-child td { border-bottom: 0; }
.table .col-num { width: 1%; white-space: nowrap; }
.table td.muted { white-space: nowrap; }
.table td.num, .table th.num { text-align: right; }
.table a.rowlink { color: var(--ink); font-weight: 600; text-decoration: none; }
.table a.rowlink:hover { text-decoration: underline; }
.table tfoot td { background: var(--surface-2); font-weight: 600; border-top: 1px solid var(--line); }
.cell-error { color: var(--bad-ink); font-size: 14px; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty h2 { color: var(--ink); margin-bottom: 6px; }
.empty .btn { margin-top: 16px; }
.empty__ico {
  width: 56px; height: 56px; border-radius: 50%; background: var(--line-soft); color: var(--accent-ink);
  display: grid; place-items: center; margin: 0 auto 14px;
}
.empty__ico .ico { width: 26px; height: 26px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }

/* campaigns that are still moving */
.moving { display: grid; gap: 12px; }
.moving .panel { margin-top: 0; }
.moving__item { display: block; text-decoration: none; color: inherit; transition: border-color 0.12s, box-shadow 0.12s; }
.moving__item:hover { border-color: var(--field-hover); box-shadow: var(--lift); }
.moving__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.moving__title { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; flex-wrap: wrap; }
.moving__counts { margin-top: 10px; color: var(--muted); font-size: 14px; display: flex; gap: 18px; flex-wrap: wrap; }
.moving__counts b { color: var(--ink); font-weight: 600; }

/* ------------------------------------------------------------------ home */
.hello { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
.hello > * { margin-top: 0 !important; }
.hello--top { align-items: start; }
.only-mobile { display: none !important; }
.credits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; }
.credits__label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #c3cee8; }
.credits__label i { width: 10px; height: 10px; border-radius: 3px; }
.credits__value { font-size: 44px; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
.credits__sub { font-size: 13px; color: #a9b7d8; }
.credits__sub.is-low { color: #ffc9c0; font-weight: 600; }
.board__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-top: auto; padding-top: 26px; flex-wrap: wrap; }
.board .key-wa { background: var(--wa-chart); }
.board .key-sms { background: var(--sms-chart); }

/* two weeks of sending, a column a day */
.spark { margin: 0; flex: 1 1 260px; max-width: 420px; }
.spark figcaption { font-size: 13px; color: #a9b7d8; margin-bottom: 8px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.spark figcaption span { display: inline-flex; align-items: center; gap: 6px; }
.spark figcaption i { width: 9px; height: 9px; border-radius: 3px; }
.spark__cols { direction: ltr; display: flex; align-items: flex-end; gap: 4px; height: 58px; border-bottom: 1px solid rgba(255, 255, 255, 0.22); }
.spark__col { flex: 1 1 0; height: 100%; display: flex; flex-direction: column-reverse; gap: 2px; justify-content: flex-start; min-width: 0; }
.spark__col i { display: block; border-radius: 3px 3px 0 0; min-height: 0; }
.spark__col .w { background: var(--wa-chart); }
.spark__col .s { background: var(--sms-chart); }
.spark__col:hover i { filter: brightness(1.15); }
.spark__x { direction: ltr; display: flex; justify-content: space-between; font-size: 11px; color: #a9b7d8; margin-top: 4px; font-variant-numeric: tabular-nums; }

.figures { display: grid; gap: 0; margin: 0; }
.figures > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.figures > div:last-child { border-bottom: 0; padding-bottom: 0; }
.figures dt { color: var(--muted); display: flex; align-items: center; gap: 8px; }
.figures dt i { width: 9px; height: 9px; border-radius: 3px; }
.figures dd { margin: 0; font-size: 20px; font-weight: 600; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.steps li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.steps__mark { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--line-soft); color: var(--muted); font-weight: 600; font-size: 14px; }
.steps li.is-done .steps__mark { background: var(--sent-wash); color: var(--sent-ink); }
.steps li.is-done b { color: var(--muted); font-weight: 500; }
.steps .btn { margin-inline-start: auto; }

/* ------------------------------------------------------------------ why rows failed */
.reasons { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.reason { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; align-items: baseline; }
.reason b { font-weight: 600; }
.reason__bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--bad-wash); overflow: hidden; }
.reason__bar i { display: block; height: 100%; border-radius: 3px; background: var(--bad); }

/* ------------------------------------------------------------------ new campaign */
.compose { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 28px; align-items: start; }
.step { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 14px; padding: 22px 0; border-top: 1px solid var(--line); }
.step:first-of-type { border-top: 0; padding-top: 0; }
.step__n {
  width: 30px; height: 30px; border-radius: 50%; background: var(--btn-bg); color: var(--btn-ink);
  display: grid; place-items: center; font-weight: 600; font-size: 14px;
}
.step__title { margin-bottom: 4px; }
.step__lead { color: var(--muted); margin-bottom: 14px; }

.seg { display: inline-flex; border: 1px solid var(--field); border-radius: 12px; padding: 3px; background: var(--field-bg); gap: 3px; flex-wrap: wrap; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: block; padding: 7px 22px; border-radius: 9px; font-weight: 600; color: var(--muted); }
.seg label:hover span { color: var(--ink); }
.seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 1px; }
.seg input:checked + span { background: var(--btn-bg); color: var(--btn-ink); }
.seg--channel input[value="whatsapp"]:checked + span { background: var(--wa); color: #fff; }
.seg--channel input[value="sms"]:checked + span { background: var(--sms); color: #fff; }
a.seg__link { text-decoration: none; }
a.seg__link span { display: block; padding: 5px 14px; border-radius: 9px; font-weight: 600; color: var(--muted); font-size: 14px; }
a.seg__link[aria-current="true"] span { background: var(--btn-bg); color: var(--btn-ink); }

.cols { border: 1px solid var(--field); border-radius: var(--r-sm); overflow: hidden; background: var(--field-bg); }
.cols__head, .cols__body { display: grid; grid-template-columns: 1.15fr 1.5fr 0.75fr; }
.cols__head { background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted); }
.cols__head span { padding: 7px 12px; }
.cols__head span + span, .cols__body textarea + textarea { border-inline-start: 1px solid var(--line); }
.cols__body textarea {
  border: 0; border-radius: 0; height: 210px; padding: 8px 12px; resize: none; background: var(--field-bg);
  white-space: pre; overflow: auto; line-height: 1.75; font-variant-numeric: tabular-nums; min-width: 0;
}
.cols__body textarea:focus { box-shadow: none; }
.cols__body textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.cols__body textarea.num { text-align: right; }
.cols__foot { display: flex; justify-content: space-between; gap: 12px; padding: 7px 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.cols__foot .is-bad { color: var(--bad-ink); font-weight: 600; }

.drop { border: 1.5px dashed var(--field); border-radius: 12px; background: var(--field-bg); padding: 22px; text-align: center; }
.drop input[type="file"] { max-width: 100%; }
.drop p { color: var(--muted); margin-top: 8px; }

.msgbox { position: relative; }
.msgbox textarea { min-height: 150px; line-height: 1.8; }
.msgtools { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.counter { margin-inline-start: auto; font-size: 13px; color: var(--muted); }
.counter.is-bad { color: var(--bad-ink); font-weight: 600; }

.tplrow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tplrow select { flex: 1 1 240px; min-width: 0; background: var(--field-bg); border: 1px solid var(--field); border-radius: var(--r-sm); padding: 9px 12px; }

.submit-row { display: flex; align-items: center; gap: 16px; padding-top: 22px; border-top: 1px solid var(--line); flex-wrap: wrap; }

/* the phone: what one parent will see */
.phone { position: sticky; top: 18px; }
.phone__title { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.phone__body { border-radius: 28px; border: 9px solid var(--phone-frame); background: #ece5dd; overflow: hidden; box-shadow: 0 22px 44px -24px rgba(19, 29, 56, 0.6); }
.phone__top { background: #0b6b55; color: #fff; padding: 12px 14px; font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 9px; }
.phone__top::before { content: ""; width: 26px; height: 26px; border-radius: 50%; background: rgba(255, 255, 255, 0.25); flex: none; }
.phone__chat { min-height: 300px; padding: 14px 12px 18px; display: flex; flex-direction: column; justify-content: flex-end; }
.bubble {
  background: #fff; color: #141d33; border-radius: 12px; border-start-start-radius: 3px; padding: 8px 11px 6px; max-width: 94%;
  align-self: flex-start; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.12); overflow-wrap: anywhere; font-size: 14px; line-height: 1.6;
}
.bubble__media { margin: -3px -6px 7px; border-radius: 9px; overflow: hidden; background: #dfe5ec; }
.bubble__media img { display: block; width: 100%; max-height: 180px; object-fit: cover; }
.bubble__doc { display: flex; align-items: center; gap: 9px; padding: 11px; font-size: 13px; font-weight: 600; }
.bubble__doc::before { content: "PDF"; background: #c5352b; color: #fff; font-size: 10px; font-weight: 700; padding: 5px 5px; border-radius: 4px; direction: ltr; }
.bubble__text { white-space: pre-wrap; }
.bubble__text.is-empty { color: #9aa3b5; }
.bubble__time { font-size: 11px; color: #8a93a5; text-align: end; margin-top: 2px; }
.phone--sms .phone__body { background: #f1f3f7; }
.phone--sms .phone__top { background: #33415f; }
.phone__note { font-size: 13px; color: var(--muted); margin-top: 10px; }

/* ------------------------------------------------------------------ review */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.fact { padding: 16px 20px; border-inline-start: 1px solid var(--line); margin-inline-start: -1px; }
.fact dt { font-size: 13px; color: var(--muted); }
.fact dd { margin: 2px 0 0; font-size: 22px; font-weight: 600; }
.fact dd small { font-size: 14px; font-weight: 400; color: var(--muted); }
.fact--bad dd { color: var(--bad-ink); }
dl.facts { margin: 0 0 20px; }
.samples { display: grid; gap: 10px; }
.sample { background: var(--paper); border-radius: 12px; padding: 12px 14px; }
.sample__to { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.sample__text { white-space: pre-wrap; overflow-wrap: anywhere; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ rows table (detail) */
.filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.filters .seg span { padding: 5px 14px; font-size: 14px; }
.filters input[type="search"] { margin-inline-start: auto; width: 230px; max-width: 100%; border: 1px solid var(--field); border-radius: var(--r-sm); padding: 7px 12px; background: var(--field-bg); }

/* ------------------------------------------------------------------ login */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--surface); }
.login__side {
  background: var(--navy-deep); color: #fff; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  background-image: radial-gradient(90% 70% at 100% 0%, rgba(255, 255, 255, 0.10), transparent 60%);
}
.login__mark { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 19px; }
.login__mark img { width: 42px; height: 42px; }
.login__pitch h1 { font-size: 40px; line-height: 1.35; max-width: 15ch; }
.login__pitch p { color: #b9c4de; margin-top: 14px; max-width: 44ch; font-size: 16px; }
.login__chat { display: grid; gap: 10px; max-width: 380px; }
.login__chat .bubble { box-shadow: none; max-width: 100%; }
.login__chat .bubble:nth-child(2) { margin-inline-start: 34px; }
.login__chat .bubble b { color: var(--wa); font-weight: 600; }
.login__form { position: relative; display: grid; place-items: center; padding: 32px 24px; }
.login__card { width: 100%; max-width: 360px; }
.login__card h2 { font-size: 24px; margin-bottom: 4px; }
.login__card > p { color: var(--muted); margin-bottom: 22px; }
.login__help { margin-top: 18px; font-size: 14px; color: var(--muted); text-align: center; }

/* ------------------------------------------------------------------ owner */
.split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.split > * { margin-top: 0 !important; }
.stack > * + * { margin-top: 20px; }
.userline { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.userline:last-child { border-bottom: 0; }
.userline form { display: inline-flex; gap: 6px; align-items: center; }
.userline .input { width: 150px; padding: 6px 10px; }
.plus { color: var(--sent-ink); font-weight: 600; }
.minus { color: var(--bad-ink); font-weight: 600; }
details.more > summary { cursor: pointer; color: var(--link); font-weight: 600; }
details.more[open] > summary { margin-bottom: 12px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; overflow-x: auto; }
.tabs a {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; text-decoration: none; color: var(--muted); font-weight: 600; white-space: nowrap;
  border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--accent-ink); border-bottom-color: var(--accent-ink); }

/* stat tiles: a label, the figure, and what it compares to */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin: 0 0 24px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.tile dt { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.tile dt i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.tile dd { margin: 4px 0 0; font-size: 28px; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; white-space: nowrap; }
.tile dd small { font-size: 15px; font-weight: 500; color: var(--muted); }
.tile p { font-size: 13px; color: var(--muted); }
.tile--alert { border-color: var(--warn-line); background: var(--warn-wash); }
.key-wa { background: var(--wa-fill); }
.key-sms { background: var(--sms-fill); }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .input, .toolbar select, .toolbar input[type="month"] { width: auto; background: var(--field-bg); border: 1px solid var(--field); border-radius: var(--r-sm); padding: 7px 12px; }
.toolbar .grow { flex: 1 1 220px; }
.toolbar__end { margin-inline-start: auto; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cell-low { color: var(--bad-ink); font-weight: 600; }
.row-off td { color: var(--muted); }
.actions { display: flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }
.mini { display: flex; flex-direction: column; gap: 5px; min-width: 150px; }
.mini .small { color: var(--muted); }

.dialog { border: 0; border-radius: 18px; padding: 26px; width: min(460px, 92vw); color: var(--ink); background: var(--surface); box-shadow: 0 30px 80px -30px rgba(19, 29, 56, 0.7); }
.dialog::backdrop { background: rgba(19, 29, 56, 0.5); }
.dialog h2 { margin-bottom: 14px; }
.dialog .seg { margin-bottom: 14px; }

/* daily usage: stacked columns, WhatsApp under SMS */
.chart { margin: 0; }
.chart__legend { display: flex; gap: 18px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.chart__legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart__legend i { width: 10px; height: 10px; border-radius: 3px; }
.chart__plot { direction: ltr; display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: 10px; }
.chart__y { position: relative; height: 210px; min-width: 34px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chart__y span { position: absolute; right: 0; transform: translateY(50%); line-height: 1; }
.chart__area { position: relative; height: 210px; border-bottom: 1px solid var(--field); }
.chart__grid { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line-soft); }
.chart__cols { position: absolute; inset: 0; display: flex; align-items: stretch; }
.chart__col { flex: 1 1 0; min-width: 0; display: flex; justify-content: center; align-items: flex-end; outline-offset: -2px; }
.chart__stack { width: min(24px, 76%); height: 100%; display: flex; flex-direction: column-reverse; gap: 2px; }
.chart__seg { display: block; flex: none; }
.chart__seg--wa { background: var(--wa-fill); }
.chart__seg--sms { background: var(--sms-fill); }
.chart__seg.is-top { border-radius: 4px 4px 0 0; }
.chart__col:hover .chart__seg, .chart__col:focus-visible .chart__seg { filter: brightness(1.18); }
.chart__x { grid-column: 2; display: flex; font-size: 12px; color: var(--muted); margin-top: 7px; font-variant-numeric: tabular-nums; }
.chart__x span { flex: 1 1 0; min-width: 0; text-align: center; white-space: nowrap; display: flex; justify-content: center; }
.chart__tip {
  position: absolute; z-index: 2; pointer-events: none; background: var(--tip-bg); color: #fff; border-radius: 8px;
  padding: 8px 12px; font-size: 13px; line-height: 1.6; white-space: nowrap; transform: translate(-50%, -100%); direction: rtl;
}
.chart__tip b { font-weight: 600; font-size: 14px; }
.chart__tip .k { display: inline-block; width: 12px; height: 3px; border-radius: 2px; vertical-align: middle; margin-inline-end: 7px; }
.chart__tip .k--wa { background: #45d3a4; }
.chart__tip .k--sms { background: #8fb0ff; }
.chart__tip .d { color: #b9c5e0; font-size: 12px; }

/* ------------------------------------------------------------------ dark theme
   Chosen with the switch in the side navigation (kept on the device); before any
   choice the system's setting decides. The navy frame and the boards stay as they
   are; the page, the cards and the inks turn. Chart colours are their own dark-surface
   steps, not the light ones dimmed. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e9edf7;
  --ink-2: #c5cde2;
  --muted: #95a1c0;
  --paper: #0d1426;
  --surface: #161f38;
  --surface-2: #1a2542;
  --hover: #1c2847;
  --line: #2a3657;
  --line-soft: #212c4a;
  --field: #3b4a70;
  --field-bg: #111a31;
  --field-hover: #5d6d97;
  --btn-bg: #e3e9f8;
  --btn-ink: #131d38;
  --btn-hover: #ffffff;
  --accent: #8fb0ff;
  --accent-ink: #c7d3f5;
  --link: #9db9ff;
  --ring: rgba(143, 176, 255, 0.28);
  --wa: #0e8a68;
  --wa-wash: rgba(53, 214, 160, 0.13);
  --wa-ink: #62deb3;
  --wa-fill: #1aa77b;
  --sms: #3a69e2;
  --sms-wash: rgba(143, 176, 255, 0.15);
  --sms-ink: #a9c1ff;
  --sms-fill: #6a8ff0;
  --sent: #25b887;
  --sent-wash: rgba(53, 214, 160, 0.13);
  --sent-ink: #62deb3;
  --bad: #f07a6a;
  --bad-ink: #ff9d8f;
  --bad-wash: rgba(255, 138, 122, 0.13);
  --bad-line: rgba(255, 138, 122, 0.38);
  --warn: #f3c463;
  --warn-wash: rgba(245, 182, 56, 0.13);
  --warn-line: rgba(245, 182, 56, 0.36);
  --ok-wash: rgba(53, 214, 160, 0.10);
  --ok-line: rgba(53, 214, 160, 0.36);
  --info-wash: rgba(143, 176, 255, 0.12);
  --info-line: rgba(143, 176, 255, 0.30);
  --info-ink: #c5d4ff;
  --track: #2a3657;
  --pending: #4c5c85;
  --tip-bg: #2b3963;
  --phone-frame: #2f3d63;
  --side-line: rgba(255, 255, 255, 0.07);
  --lift: 0 14px 34px -22px rgba(0, 0, 0, 0.8);
}
:root[data-theme="dark"] .board { box-shadow: none; outline: 1px solid rgba(255, 255, 255, 0.07); outline-offset: -1px; }
:root[data-theme="dark"] .split-bar__part--sent { color: #052a1e; }
:root[data-theme="dark"] .split-bar__part--failed { color: #3d0b05; background-image: repeating-linear-gradient(135deg, rgba(61, 11, 5, 0.22) 0 3px, transparent 3px 8px); }
:root[data-theme="dark"] .dialog::backdrop, :root[data-theme="dark"] .scrim { background: rgba(4, 8, 18, 0.66); }
:root[data-theme="dark"] .notice--warn { border-inline-start-color: var(--amber); }

/* the light / dark switch on pages without the side navigation */
.theme-fab {
  position: absolute; inset-block-start: 18px; inset-inline-end: 18px; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; background: var(--surface); color: var(--ink-2); border: 1px solid var(--field);
}
.theme-fab:hover { border-color: var(--field-hover); color: var(--ink); }

/* ------------------------------------------------------------------ small screens */
@media (max-width: 1100px) {
  .hello { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .only-mobile { display: inline-flex !important; }
  .side { transform: translateX(100%); transition: transform 0.22s ease; box-shadow: none; }
  .side.is-open { transform: none; box-shadow: -30px 0 60px -20px rgba(19, 29, 56, 0.6); }
  .shell { margin-inline-start: 0; }
  .topbar {
    position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 14px;
    background: var(--navy-deep); color: #fff;
  }
  .topbar__menu { background: none; border: 0; color: #fff; padding: 8px; margin: 0 -4px; cursor: pointer; display: grid; place-items: center; border-radius: 8px; }
  .topbar__brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 700; }
  .topbar__brand img { width: 28px; height: 28px; }
  .topbar__credits { margin-inline-start: auto; display: flex; gap: 14px; color: #fff; text-decoration: none; font-size: 14px; font-weight: 600; }
  .topbar__credits span { display: inline-flex; align-items: center; gap: 6px; }
  .topbar__credits i { width: 8px; height: 8px; border-radius: 3px; }
  .topbar__credits .key-wa { background: var(--wa-chart); }
  .topbar__credits .key-sms { background: var(--sms-chart); }
  .compose { grid-template-columns: minmax(0, 1fr); }
  .phone { position: static; max-width: 320px; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .login { grid-template-columns: minmax(0, 1fr); }
  .login__side { padding: 28px 24px; gap: 22px; }
  .login__pitch h1 { font-size: 28px; }
  .login__chat { display: none; }
}
@media (max-width: 640px) {
  .page { padding: 20px 14px 64px; }
  h1 { font-size: 23px; }
  .panel:not(.panel--flush) { padding: 16px; }
  .board { padding: 20px 18px; }
  .table td:not(.cell-error), .table th { white-space: nowrap; }
  .table td.cell-error { min-width: 190px; }
  .table th, .table td { padding: 10px 12px; }
  .step { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .percent { font-size: 52px; }
  .credits__value { font-size: 32px; }
  .credits { gap: 10px 16px; }
  .cols__body textarea { height: 170px; padding: 8px; font-size: 14px; }
  .filters input[type="search"] { margin-inline-start: 0; width: 100%; }
  .tile dd { font-size: 25px; }
  .chart__y, .chart__area { height: 170px; }
  .seg span { padding: 7px 16px; }
  .steps li { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  .tag--running .dot, .live { animation: none; }
  .split-bar__part, .side, .btn, .input { transition: none; }
}

@media print {
  .side, .topbar, .head__actions, .filters, .pager, .offline, .announce { display: none !important; }
  .shell { margin: 0; }
  .board { color: var(--ink); background: none; box-shadow: none; border: 1px solid var(--line); }
}
