/* Translation Platform — generated by docs/design/build.py from tokens.json and bundle.css. Do not edit. */

@font-face { font-family: "Readex Pro"; font-style: normal; font-weight: 160 700; font-display: swap; src: url("/static/fonts/readex-pro-arabic.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-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, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }
@font-face { font-family: "Readex Pro"; font-style: normal; font-weight: 160 700; font-display: swap; src: url("/static/fonts/readex-pro-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Readex Pro"; font-style: normal; font-weight: 160 700; font-display: swap; src: url("/static/fonts/readex-pro-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --canvas: #f4f4f5;
  --surface: #ffffff;
  --surface-sunken: #f6f6f7;
  --line: #e6e6e9;
  --line-strong: #86868f;
  --ink: #111113;
  --ink-muted: #5c5c66;
  --primary: #111113;
  --on-primary: #ffffff;
  --accent: #ffd60a;
  --on-accent: #111113;
  --accent-soft: #fff6c7;
  --focus: #111113;
  --neutral-soft: #efeff1;
  --neutral-ink: #4a4a53;
  --info-soft: #e8f0fe;
  --info-ink: #1d4ed8;
  --warn-soft: #fff0e2;
  --warn-ink: #a63e08;
  --good-soft: #e6f5eb;
  --good-ink: #15703a;
  --bad-soft: #fdebea;
  --bad-ink: #b42318;
  --hold-soft: #f1ecfe;
  --hold-ink: #6438d0;
  --pass-en1: #fce3ea;
  --pass-en2: #ffe7d4;
  --pass-ar1: #edf4cc;
  --pass-ar2: #dbf2e6;
  --series-previous: #a87f00;
  --chart-grid: #ececef;
  --shadow-card: 0 1px 2px rgba(17,17,19,0.04);
  --shadow-pop: 0 12px 32px rgba(17,17,19,0.12), 0 2px 6px rgba(17,17,19,0.06);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 999px;
  --sidebar-w: 248px;
  --topbar-h: 64px;
  --control-h: 36px;
  --control-h-sm: 30px;
  --content-max: 1440px;
  --font-sans: "Readex Pro", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
  --canvas: #0d0d0f;
  --surface: #17171a;
  --surface-sunken: #1f1f23;
  --line: #2b2b31;
  --line-strong: #74747e;
  --ink: #f4f4f5;
  --ink-muted: #a8a8b2;
  --primary: #f4f4f5;
  --on-primary: #111113;
  --accent: #ffd60a;
  --on-accent: #111113;
  --accent-soft: #362e07;
  --focus: #ffd60a;
  --neutral-soft: #26262b;
  --neutral-ink: #c6c6ce;
  --info-soft: #172441;
  --info-ink: #93b4ff;
  --warn-soft: #3b2412;
  --warn-ink: #ffb27a;
  --good-soft: #13301f;
  --good-ink: #72d79c;
  --bad-soft: #3d1716;
  --bad-ink: #ff9089;
  --hold-soft: #271d45;
  --hold-ink: #c2aaff;
  --pass-en1: #3d1f29;
  --pass-en2: #3d2b1c;
  --pass-ar1: #2a331a;
  --pass-ar2: #15332a;
  --series-previous: #ffd60a;
  --chart-grid: #26262b;
  --shadow-card: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-pop: 0 12px 32px rgba(0,0,0,0.55), 0 2px 6px rgba(0,0,0,0.4);
  color-scheme: dark;
}
}
:root[data-theme="dark"] {
  --canvas: #0d0d0f;
  --surface: #17171a;
  --surface-sunken: #1f1f23;
  --line: #2b2b31;
  --line-strong: #74747e;
  --ink: #f4f4f5;
  --ink-muted: #a8a8b2;
  --primary: #f4f4f5;
  --on-primary: #111113;
  --accent: #ffd60a;
  --on-accent: #111113;
  --accent-soft: #362e07;
  --focus: #ffd60a;
  --neutral-soft: #26262b;
  --neutral-ink: #c6c6ce;
  --info-soft: #172441;
  --info-ink: #93b4ff;
  --warn-soft: #3b2412;
  --warn-ink: #ffb27a;
  --good-soft: #13301f;
  --good-ink: #72d79c;
  --bad-soft: #3d1716;
  --bad-ink: #ff9089;
  --hold-soft: #271d45;
  --hold-ink: #c2aaff;
  --pass-en1: #3d1f29;
  --pass-en2: #3d2b1c;
  --pass-ar1: #2a331a;
  --pass-ar2: #15332a;
  --series-previous: #ffd60a;
  --chart-grid: #26262b;
  --shadow-card: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-pop: 0 12px 32px rgba(0,0,0,0.55), 0 2px 6px rgba(0,0,0,0.4);
  color-scheme: dark;
}

/* Translation Platform components. Every value comes from a token; class prefix tp-.
   Directions are logical (inline-start/end), so the same markup mirrors under dir="rtl". */

body { margin: 0; font-family: var(--font-sans); font-size: 14px; line-height: 24px; background: var(--canvas); color: var(--ink); -webkit-font-smoothing: antialiased; }
.tp-num { font-variant-numeric: tabular-nums; }
[dir="rtl"] .tp-num, [dir="rtl"] .tp-ltr { direction: ltr; unicode-bidi: isolate; }
[translate="no"] { unicode-bidi: plaintext; }
.tp-muted { color: var(--ink-muted); }
.tp-icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.tp-icon--sm { width: 16px; height: 16px; }
[dir="rtl"] .tp-flip { transform: scaleX(-1); }
.tp-row { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.tp-stack { display: flex; flex-direction: column; gap: var(--space-3); }
:where(a, button, input, select, [tabindex]):focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Type styles as classes (the same names as tokens.json). */
.tp-display { font-size: 34px; line-height: 42px; font-weight: 600; font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.tp-title { font-size: 26px; line-height: 40px; font-weight: 600; margin: 0; text-wrap: balance; }
.tp-heading { font-size: 17px; line-height: 28px; font-weight: 600; margin: 0; }
.tp-long { font-size: 15px; line-height: 28px; }
.tp-label { font-size: 13px; line-height: 20px; font-weight: 500; }
.tp-caption { font-size: 12px; line-height: 18px; }
.tp-overline { font-size: 11px; line-height: 18px; font-weight: 500; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.06em; }
[dir="rtl"] .tp-overline { text-transform: none; letter-spacing: 0; font-size: 12px; }

/* Button */
.tp-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); height: var(--control-h); padding: 0 var(--space-4); border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; line-height: 18px; font-weight: 500; white-space: nowrap; cursor: pointer; text-decoration: none; }
.tp-btn:hover { background: var(--surface-sunken); }
.tp-btn--primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.tp-btn--primary:hover { background: var(--primary); opacity: 0.86; }
.tp-btn--ghost { border-color: transparent; background: transparent; }
.tp-btn--danger { color: var(--bad-ink); }
.tp-btn--sm { height: var(--control-h-sm); padding: 0 var(--space-3); font-size: 12px; }
.tp-btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.tp-iconbtn { width: var(--control-h); padding: 0; }
.tp-iconbtn.tp-btn--sm { width: var(--control-h-sm); }

/* Segmented control */
.tp-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--radius-md); background: var(--surface-sunken); }
.tp-seg button { height: 28px; padding: 0 var(--space-3); border: 0; border-radius: 8px; background: transparent; color: var(--ink-muted); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.tp-seg button:hover { color: var(--ink); }
.tp-seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-card), 0 0 0 1px var(--line); }

/* Search field, keyboard hint, chip */
.tp-search { display: flex; align-items: center; gap: var(--space-2); height: var(--control-h); padding: 0 var(--space-3); border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface); color: var(--ink-muted); min-width: 0; }
.tp-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; color: var(--ink); }
.tp-search input::placeholder { color: var(--ink-muted); }
.tp-search:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.tp-kbd { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-sunken); font-family: var(--font-mono); font-size: 11px; color: var(--ink-muted); }
.tp-chip { display: inline-flex; align-items: center; gap: var(--space-2); height: var(--control-h); padding: 0 var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.tp-chip--sm { height: var(--control-h-sm); font-size: 12px; }

/* Toggle and checkbox */
.tp-toggle { position: relative; width: 34px; height: 20px; flex: none; border-radius: var(--radius-full); border: 1px solid var(--line-strong); background: var(--surface-sunken); cursor: pointer; padding: 0; }
.tp-toggle::after { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--line-strong); transition: inset-inline-start .15s; }
.tp-toggle[aria-checked="true"] { background: var(--primary); border-color: var(--primary); }
.tp-toggle[aria-checked="true"]::after { inset-inline-start: 16px; background: var(--on-primary); }
.tp-check { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); cursor: pointer; }

/* Count badge, status pill, delta chip */
.tp-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: var(--radius-sm); background: var(--neutral-soft); color: var(--neutral-ink); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
.tp-pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: var(--radius-sm); background: var(--neutral-soft); color: var(--neutral-ink); font-size: 12px; line-height: 16px; font-weight: 500; white-space: nowrap; }
.tp-pill::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: currentColor; flex: none; }
.tp-pill--ai { background: var(--info-soft); color: var(--info-ink); }
.tp-pill--check { background: var(--warn-soft); color: var(--warn-ink); }
.tp-pill--done { background: var(--good-soft); color: var(--good-ink); }
.tp-pill--failed { background: var(--bad-soft); color: var(--bad-ink); }
.tp-pill--hold { background: var(--hold-soft); color: var(--hold-ink); }
.tp-delta { display: inline-flex; align-items: center; height: 18px; padding: 0 5px; border-radius: 5px; background: var(--good-soft); color: var(--good-ink); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.tp-delta--bad { background: var(--bad-soft); color: var(--bad-ink); }
.tp-delta--flat { background: var(--neutral-soft); color: var(--neutral-ink); }

/* Progress */
.tp-progress { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.tp-bar { position: relative; flex: 1; height: 6px; min-width: 60px; border-radius: var(--radius-full); background: var(--surface-sunken); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.tp-bar > i { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: var(--radius-full); background: var(--primary); }
.tp-progress .tp-caption { width: 36px; text-align: end; color: var(--ink-muted); font-variant-numeric: tabular-nums; }

/* Avatars */
.tp-avatar { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex: none; border-radius: var(--radius-full); background: var(--pass-ar1); color: var(--ink); font-size: 11px; font-weight: 600; letter-spacing: 0.02em; }
.tp-avatar--lg { width: 36px; height: 36px; font-size: 13px; }
.tp-avatar--en1 { background: var(--pass-en1); } .tp-avatar--en2 { background: var(--pass-en2); } .tp-avatar--ar2 { background: var(--pass-ar2); }
.tp-avatar--ink { background: var(--primary); color: var(--on-primary); }
.tp-avatars { display: inline-flex; align-items: center; }
.tp-avatars .tp-avatar { position: relative; box-shadow: 0 0 0 2px var(--surface); }
.tp-avatars .tp-avatar + .tp-avatar { margin-inline-start: -4px; }
.tp-avatars .tp-avatar:nth-child(1) { z-index: 4; } .tp-avatars .tp-avatar:nth-child(2) { z-index: 3; } .tp-avatars .tp-avatar:nth-child(3) { z-index: 2; }
.tp-person { display: inline-flex; align-items: center; gap: var(--space-2); min-width: 0; }

/* App shell: sidebar + main */
.tp-app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; background: var(--canvas); }
.tp-side { display: flex; flex-direction: column; gap: var(--space-5); padding: var(--space-5) var(--space-4); background: var(--surface); border-inline-end: 1px solid var(--line); min-width: 0; }
.tp-brand { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.tp-brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font-size: 13px; font-weight: 700; letter-spacing: -0.02em; }
.tp-nav { display: flex; flex-direction: column; gap: 2px; }
.tp-nav .tp-overline { padding: 0 10px var(--space-2); }
.tp-nav a, .tp-nav button.tp-navitem { position: relative; display: flex; align-items: center; gap: 10px; height: var(--control-h); padding: 0 10px; border: 0; border-radius: var(--radius-md); background: transparent; color: var(--ink-muted); font: inherit; font-weight: 500; text-decoration: none; cursor: pointer; text-align: start; }
.tp-nav a:hover, .tp-nav button.tp-navitem:hover { background: var(--surface-sunken); color: var(--ink); }
.tp-nav a[aria-current="page"] { background: var(--surface-sunken); color: var(--ink); }
.tp-nav a[aria-current="page"]::before { content: ""; position: absolute; inset-inline-start: -16px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary); }
[dir="rtl"] .tp-nav a[aria-current="page"]::before { border-radius: 3px 0 0 3px; }
.tp-nav--pill a[aria-current="page"] { background: var(--primary); color: var(--on-primary); border-radius: var(--radius-full); }
.tp-nav--pill a[aria-current="page"]::before { display: none; }
.tp-nav .tp-count { margin-inline-start: auto; }
.tp-nav a > span:not([class*="tp-"]):not(.marker) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-nav-end { margin-inline-start: auto; }
.tp-usercard { display: flex; align-items: center; gap: 10px; padding: var(--space-3) var(--space-2) 0; margin-top: auto; border-top: 1px solid var(--line); min-width: 0; }
.tp-usercard > div { min-width: 0; }
.tp-usercard > div > b { display: block; font-weight: 600; font-size: 13px; }
.tp-usercard > div > span { display: block; font-size: 12px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-main { min-width: 0; display: flex; flex-direction: column; }
.tp-topbar { display: flex; align-items: center; gap: var(--space-3); height: var(--topbar-h); padding: 0 var(--space-6); background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.tp-topbar .tp-search { width: min(360px, 100%); }
.tp-content { padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-5); max-width: var(--content-max); width: 100%; box-sizing: border-box; }
.tp-pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; }
.tp-pagehead p { margin: 6px 0 0; color: var(--ink-muted); }

/* Card */
.tp-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: var(--space-5); min-width: 0; }
.tp-card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-4); flex-wrap: wrap; }

/* KPI card (dashboard) */
.tp-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--space-4); }
.tp-kpi { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-4) var(--space-5) var(--space-5); }
.tp-kpi-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); font-weight: 600; }
.tp-kpi-val { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.tp-kpi-val .tp-icon { color: var(--ink-muted); width: 20px; height: 20px; }
.tp-kpi-note { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; font-size: 12px; color: var(--ink-muted); }

/* Stat tile (My work) */
.tp-stat { display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-4); min-height: 112px; padding: var(--space-5); border-radius: var(--radius-xl); background: var(--surface-sunken); color: var(--ink); box-sizing: border-box; }
.tp-stat--ink { background: var(--primary); color: var(--on-primary); }
.tp-stat--accent { background: var(--accent); color: var(--on-accent); }
.tp-stat-top { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-2); }
.tp-stat-trend { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 600; direction: ltr; unicode-bidi: isolate; }
.tp-stat-label { font-size: 13px; font-weight: 500; }

/* Charts and tooltip */
.tp-chart { position: relative; width: 100%; }
.tp-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.tp-chart .tp-axis { fill: var(--ink-muted); font-size: 12px; }
.tp-chart .tp-axis.is-on { fill: var(--ink); font-weight: 600; }
.tp-chart .tp-grid { stroke: var(--chart-grid); stroke-width: 1; }
.tp-legend { display: flex; gap: var(--space-4); flex-wrap: wrap; font-size: 12px; color: var(--ink-muted); }
.tp-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-inline-end: 6px; vertical-align: middle; }
.tp-tip { position: absolute; z-index: 2; min-width: 180px; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-pop); color: var(--ink); pointer-events: none; }
.tp-tip--ink { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.tp-tip-big { font-size: 22px; line-height: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tp-tip-row { display: flex; gap: var(--space-5); margin-top: var(--space-2); padding-top: var(--space-2); border-top: 1px solid var(--line); }
.tp-tip-row b { display: block; font-size: 14px; font-variant-numeric: tabular-nums; }
.tp-tip-row span { font-size: 12px; color: var(--ink-muted); }
/* A narrow chart (a phone) has no room beside the chosen day: the tooltip sits under the chart instead. */
.tp-chart.is-narrow .tp-tip { position: static; transform: none !important; min-width: 0; margin-top: var(--space-2); white-space: normal !important; }
.tp-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-inline-end: 6px; border: 2px solid currentColor; box-sizing: border-box; }

/* Data table */
.tp-tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-md); }
.tp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tp-table th { height: 40px; padding: 0 var(--space-3); background: var(--surface-sunken); color: var(--ink-muted); font-weight: 500; text-align: start; white-space: nowrap; border-bottom: 1px solid var(--line); }
.tp-table th .tp-icon { width: 12px; height: 12px; vertical-align: -1px; margin-inline-start: 2px; }
.tp-table td { height: 52px; padding: 0 var(--space-3); border-bottom: 1px solid var(--line); white-space: nowrap; }
.tp-table tr:last-child td { border-bottom: 0; }
.tp-table tbody tr:hover td { background: var(--surface-sunken); }
.tp-table tr.is-late td { background: var(--accent-soft); }
.tp-table td.tp-first { font-weight: 500; }
.tp-table td.tp-clip { max-width: 15rem; overflow: hidden; text-overflow: ellipsis; }
.tp-table td.tp-clip > * { display: block; overflow: hidden; text-overflow: ellipsis; }
[dir="rtl"] .tp-table td.tp-clip > * { text-align: right; }   /* an English title keeps its own direction, so it is cut at its end */
.tp-table td.tp-wrap { white-space: normal; min-width: 7rem; line-height: 18px; }
.tp-table a.tp-rowlink { color: inherit; text-decoration: none; }
.tp-table a.tp-rowlink:hover { text-decoration: underline; text-underline-offset: 3px; }
.tp-table td.tp-end, .tp-table th.tp-end { text-align: end; }

/* Timeline */
.tp-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tp-timeline li { position: relative; display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: var(--space-3); align-items: start; padding-bottom: var(--space-4); }
.tp-timeline li::before { content: ""; position: absolute; inset-inline-start: 7px; top: 18px; bottom: 0; border-inline-start: 1.5px dashed var(--line-strong); }
.tp-timeline li:last-child { padding-bottom: 0; }
.tp-timeline li:last-child::before { display: none; }
.tp-mark { width: 14px; height: 14px; margin-top: 2px; border-radius: 4px; border: 1.5px solid var(--line-strong); background: var(--surface); box-sizing: border-box; }
.tp-mark.is-done { background: var(--primary); border-color: var(--primary); box-shadow: inset 0 0 0 2px var(--surface); }

/* Day strip */
.tp-days { display: flex; gap: var(--space-2); }
.tp-day { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 46px; height: 60px; border-radius: var(--radius-full); color: var(--ink-muted); font-size: 12px; border: 0; background: transparent; font-family: inherit; cursor: pointer; }
.tp-day b { color: var(--ink); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tp-day[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }
.tp-day[aria-pressed="true"] b { color: var(--on-primary); }
.tp-due { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--line); }
.tp-due > div > b { display: block; font-size: 13px; font-weight: 600; }
.tp-due > div > span { display: block; font-size: 12px; color: var(--ink-muted); }

/* Week schedule */
.tp-sched { position: relative; display: grid; grid-template-columns: repeat(var(--days, 5), minmax(120px, 1fr)); grid-template-rows: repeat(var(--rows, 3), minmax(64px, auto)); row-gap: var(--space-3); padding-top: 36px; }
.tp-sched-col { grid-row: 1 / -1; border-inline-start: 1px dashed var(--chart-grid); position: relative; }
.tp-sched-col span { position: absolute; top: -30px; inset-inline-start: 10px; font-size: 12px; color: var(--ink-muted); white-space: nowrap; }
.tp-sched-col.is-today { background: var(--accent-soft); border-radius: var(--radius-md); }
.tp-sched-col.is-today span { color: var(--ink); font-weight: 600; }
.tp-event { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin: 0 6px; padding: 10px 12px; border-radius: var(--radius-md); background: var(--pass-ar1); color: var(--ink); min-width: 0; }
.tp-event > div > b { display: block; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-event > div > span { display: block; font-size: 12px; color: var(--ink-muted); }
.tp-event > div { min-width: 0; }
.tp-event--en1 { background: var(--pass-en1); } .tp-event--en2 { background: var(--pass-en2); } .tp-event--ar2 { background: var(--pass-ar2); }
.tp-event.is-done > div > b { text-decoration: line-through; text-decoration-thickness: 1px; }
.tp-slot { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: var(--space-2); margin: 0 6px; padding: 10px 12px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius-md); color: var(--ink-muted); background: transparent; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.tp-slot:hover { color: var(--ink); background: var(--surface-sunken); }
.tp-now { position: absolute; top: 24px; bottom: 0; width: 2px; background: var(--primary); z-index: 2; pointer-events: none; }
.tp-now::before { content: ""; position: absolute; top: -5px; left: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }

/* Tabs */
.tp-tabs { display: flex; gap: var(--space-5); border-bottom: 1px solid var(--line); overflow-x: auto; }
.tp-tabs a { padding: 10px 2px; color: var(--ink-muted); font-weight: 500; text-decoration: none; white-space: nowrap; }
.tp-tabs a:hover { color: var(--ink); }
.tp-tabs a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--primary); }

/* Banner, dialog, empty state */
.tp-banner { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--info-soft); color: var(--info-ink); font-size: 13px; }
.tp-banner b { color: inherit; }
.tp-banner--good { background: var(--good-soft); color: var(--good-ink); }
.tp-banner--warn { background: var(--warn-soft); color: var(--warn-ink); }
.tp-banner--bad { background: var(--bad-soft); color: var(--bad-ink); }
.tp-dialog { max-width: 440px; padding: var(--space-6); border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-pop); box-sizing: border-box; }
.tp-dialog p { margin: var(--space-2) 0 var(--space-5); color: var(--ink-muted); }
.tp-dialog-actions { display: flex; justify-content: flex-end; gap: var(--space-2); }
.tp-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-2); padding: var(--space-12) var(--space-6); border: 1.5px dashed var(--line-strong); border-radius: var(--radius-lg); color: var(--ink-muted); }
.tp-empty .tp-icon { width: 28px; height: 28px; color: var(--ink); }
.tp-empty b { color: var(--ink); font-size: 15px; }
.tp-empty .tp-btn { margin-top: var(--space-2); }

/* Phones: the sidebar becomes a top strip; content keeps a 16px gutter. */
@media (max-width: 860px) {
  .tp-app { grid-template-columns: minmax(0, 1fr); }
  .tp-side { flex-direction: row; align-items: center; gap: var(--space-3); padding: var(--space-3) max(16px, env(safe-area-inset-right, 0px)) var(--space-3) max(16px, env(safe-area-inset-left, 0px)); border-inline-end: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .tp-side .tp-nav { flex-direction: row; }
  .tp-side .tp-nav .tp-overline, .tp-side .tp-usercard, .tp-side .tp-side-extra { display: none; }
  .tp-side .tp-nav a[aria-current="page"]::before { display: none; }
  .tp-topbar { padding: 0 max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); position: static; }
  .tp-content { padding: var(--space-4) max(16px, env(safe-area-inset-right, 0px)) var(--space-6) max(16px, env(safe-area-inset-left, 0px)); }
}
