/* ============================================================
   Fuji-san Japanese Center — design system
   Quiet, minimal, generous whitespace. Colour carries meaning
   only: navy for structure, crimson for the one main action,
   green/amber/red for payment and attendance state. Nothing else.
   Self-contained: no CDN, no build step, works offline.
   ============================================================ */

:root {
  --navy:        #0f1d36;
  --navy-soft:   #1a2b4c;
  --blue:        #1e40af;
  --blue-bright: #2563eb;
  --crimson:     #dc2626;
  --amber:       #b45309;
  --green:       #15803d;

  --ink:         #17202e;   /* primary text */
  --ink-2:       #5b6676;   /* secondary text */
  --ink-3:       #939daa;   /* tertiary / hints */

  --bg:          #f6f6f4;   /* page — warm off-white, matches the logo field */
  --surface:     #ffffff;
  --surface-2:   #fafafa;
  --line:        #e8e8e5;   /* hairlines */
  --line-2:      #d9dbd8;

  --radius:   12px;
  --radius-s: 9px;
  --shadow:   0 1px 2px rgba(23, 32, 46, .04);
  --ring:     0 0 0 3px rgba(37, 99, 235, .16);
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --jp: "Noto Sans JP", var(--sans);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
:lang(ja) { font-family: var(--jp); }

.shell { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 22px; }

/* ---------- header ---------- */
.app-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 60px; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; min-width: 0; }
.brand-mark { flex: none; display: block; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.brand-text strong { font-size: 14.5px; font-weight: 600; letter-spacing: -.1px; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.header-tools { display: flex; align-items: center; gap: 10px; }

.lang-switch { display: flex; gap: 1px; }
.lang-btn {
  border: 0; background: transparent; color: var(--ink-3); cursor: pointer;
  font: inherit; font-size: 12.5px; font-weight: 500;
  padding: 5px 8px; border-radius: 7px; line-height: 1; white-space: nowrap;
}
.lang-btn:hover { color: var(--ink); background: var(--surface-2); }
.lang-btn[aria-pressed="true"] { color: var(--navy); font-weight: 600; background: #eef0ee; }
.lang-btn .lab { margin-inline-start: 5px; }

.session-box { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.session-user { display: flex; flex-direction: column; line-height: 1.2; text-align: end; }
.session-user b { font-size: 13px; font-weight: 600; color: var(--ink); }
.session-user span { font-size: 11px; color: var(--ink-3); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.nav-toggle { display: none; }

/* bell — open alerts + my tasks */
.bell {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 8px; color: var(--ink-2);
  border: 1px solid var(--line); background: var(--surface); text-decoration: none;
}
.bell:hover { background: var(--surface-2); color: var(--ink); }
.bell.has-alerts { color: var(--crimson); }
.bell-count {
  position: absolute; top: -6px; inset-inline-end: -6px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--navy); color: #fff; font-size: 10.5px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums;
  border: 2px solid var(--surface);
}
.bell.has-alerts .bell-count { background: var(--crimson); }
.nav-count {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; font-size: 10.5px; font-weight: 600;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums;
}
.nav-btn[aria-current="page"] .nav-count { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------- nav ---------- */
.app-nav { background: transparent; border-bottom: 1px solid var(--line); }
.nav-row { display: flex; gap: 26px; overflow-x: auto; scrollbar-width: none; }
.nav-row::-webkit-scrollbar { display: none; }
.nav-btn {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: 13.5px; font-weight: 500; color: var(--ink-2);
  padding: 11px 0; display: inline-flex; align-items: center; gap: 7px;
  border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px;
}
.nav-btn:hover { color: var(--ink); }
.nav-btn[aria-current="page"] { color: var(--navy); font-weight: 600; border-bottom-color: var(--navy); }

.app-main { flex: 1; padding-top: 32px; padding-bottom: 56px; }

/* ---------- footer ---------- */
.footer-legal { flex-basis: 100%; font-size: 12px; color: var(--ink-3); }
.footer-legal a { color: inherit; }
.app-footer { border-top: 1px solid var(--line); color: var(--ink-3); font-size: 12px; padding: 20px 0; }
.app-footer .shell { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- typography ---------- */
h1, h2, h3 { margin: 0; line-height: 1.25; color: var(--ink); letter-spacing: -.2px; }
h1 { font-size: 24px; font-weight: 600; }
h2 { font-size: 16px; font-weight: 600; }
h3 { font-size: 13.5px; font-weight: 600; }
.muted { color: var(--ink-2); }
.tiny { font-size: 12px; }
.jp { font-family: var(--jp); }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-bottom: 22px;
}
.section-head .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.section-head .actions select,
.section-head .actions input { width: auto; max-width: 260px; }

/* ---------- cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card + .card { margin-top: 18px; }
.card-head {
  padding: 15px 18px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.card-body { padding: 18px; }
.card-body.tight { padding: 12px 16px; }

/* ---------- KPI row ---------- */
.kpi-grid {
  display: grid; gap: 0; margin-bottom: 26px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}
.kpi { padding: 17px 20px; border-inline-start: 1px solid var(--line); }
.kpi:first-child { border-inline-start: 0; }
.kpi-label { font-size: 11.5px; font-weight: 500; color: var(--ink-3); letter-spacing: .1px; }
.kpi-value {
  font-size: 27px; font-weight: 600; color: var(--ink); line-height: 1.15;
  margin-top: 5px; letter-spacing: -.8px; font-variant-numeric: tabular-nums;
}
.kpi-value small { font-size: 13px; font-weight: 500; color: var(--ink-3); margin-inline-start: 3px; letter-spacing: 0; }
.kpi-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }
.kpi-sub.warn { color: var(--amber); }
.kpi-sub.danger { color: var(--crimson); }

/* ---------- buttons ---------- */
.btn {
  appearance: none; cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 500;
  border-radius: var(--radius-s); padding: 8px 15px; border: 1px solid transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  transition: background .13s, border-color .13s, color .13s; white-space: nowrap;
  text-decoration: none;
}
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-primary { background: var(--crimson); color: #fff; font-weight: 500; }
.btn-primary:hover { background: #b91c1c; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-soft); }
.btn-blue { background: var(--blue-bright); color: #fff; }
.btn-blue:hover { background: var(--blue); }
.btn-ghost { background: var(--surface); color: var(--ink-2); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field > label { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.field .hint { font-size: 11.5px; color: var(--ink-3); }
input:not([type]), input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="date"], input[type="time"], input[type="search"], input[type="month"], input[type="tel"],
select, textarea {
  font: inherit; font-size: 14px; width: 100%;
  padding: 9px 11px; border: 1px solid var(--line-2); border-radius: var(--radius-s);
  background: var(--surface); color: var(--ink);
  transition: border-color .13s, box-shadow .13s;
}
@media (max-width: 640px) {
  /* 16px stops iOS Safari zooming when a field is focused */
  input:not([type]), input[type="text"], input[type="email"], input[type="password"], input[type="number"],
  input[type="date"], input[type="time"], input[type="search"], input[type="month"], input[type="tel"],
  select, textarea { font-size: 16px; }
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue-bright); box-shadow: var(--ring); }
input::placeholder { color: var(--ink-3); }
textarea { min-height: 72px; resize: vertical; }
.form-grid { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.checkline { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.checkline input { width: auto; }

/* password with a show/hide eye */
.pw-wrap { position: relative; }
.pw-wrap input { padding-inline-end: 42px; }
.pw-eye {
  position: absolute; top: 50%; inset-inline-end: 6px; transform: translateY(-50%);
  width: 30px; height: 30px; border: 0; border-radius: 7px; background: transparent;
  color: var(--ink-3); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.pw-eye:hover { color: var(--ink); background: var(--surface-2); }
.pw-eye:focus-visible { outline: none; box-shadow: var(--ring); }
.pw-eye .eye-shut { display: none; }
.pw-eye[aria-pressed="true"] .eye-open { display: none; }
.pw-eye[aria-pressed="true"] .eye-shut { display: inline; }

/* week-day picker for schedules */
.day-picker { display: flex; gap: 5px; flex-wrap: wrap; }
.day-picker label {
  cursor: pointer; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2);
  font-size: 12.5px; font-weight: 500; padding: 6px 10px; border-radius: 8px; min-width: 44px; text-align: center;
  user-select: none;
}
.day-picker input { position: absolute; opacity: 0; width: 0; height: 0; }
.day-picker label:has(input:checked) { background: var(--navy); border-color: var(--navy); color: #fff; }
.day-picker label:has(input:focus-visible) { box-shadow: var(--ring); }
.time-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }

/* segmented choice (test / homework) */
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 2px; gap: 2px; }
.seg label {
  cursor: pointer; font-size: 12.5px; font-weight: 500; color: var(--ink-2); padding: 6px 12px; border-radius: 7px;
  user-select: none; position: relative;
}
.seg input { position: absolute; opacity: 0; width: 0; height: 0; }
.seg label:has(input:checked) { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }

/* ---------- badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 500;
  padding: 3px 9px; border-radius: 6px; white-space: nowrap;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line);
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.badge-jlpt  { background: transparent; color: var(--crimson); border-color: #f3c9c9; font-weight: 600; }
.badge-quiet { background: var(--surface-2); color: var(--ink-2); }
.badge-navy  { background: var(--surface-2); color: var(--navy); }
.badge-blue  { background: #f2f6fd; color: var(--blue); border-color: #dbe6fa; }
.badge-green { background: #f2f9f4; color: var(--green); border-color: #d6ecdc; }
.badge-amber { background: #fdf7ec; color: var(--amber); border-color: #f2e2c5; }
.badge-red   { background: #fdf3f3; color: var(--crimson); border-color: #f5d7d7; }
.badge-slate { background: var(--surface-2); color: var(--ink-3); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
table.data th {
  text-align: start; font-size: 11.5px; font-weight: 500; color: var(--ink-3);
  padding: 11px 14px; border-bottom: 1px solid var(--line);
  background: var(--surface); position: sticky; top: 0; z-index: 1; white-space: nowrap;
}
table.data td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data .num { text-align: end; font-variant-numeric: tabular-nums; }
.code-cell {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px;
  color: var(--ink-2); white-space: nowrap;
}

/* ---------- progress ---------- */
.bar { height: 4px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; background: var(--navy); transition: width .35s ease; }
.bar.good > span { background: var(--green); }
.bar.warn > span { background: var(--amber); }
.bar.bad  > span { background: var(--crimson); }
.bar-row { display: flex; align-items: center; gap: 10px; }
.bar-row .bar { flex: 1; min-width: 60px; }
.bar-row b { font-size: 12.5px; font-weight: 500; font-variant-numeric: tabular-nums; min-width: 38px; text-align: end; color: var(--ink-2); }

/* ---------- roll call ---------- */
.roll-list { display: flex; flex-direction: column; }
.roll-row {
  display: grid; gap: 14px; align-items: center;
  grid-template-columns: minmax(140px, 1fr) auto minmax(130px, .8fr);
  padding: 11px 2px; border-bottom: 1px solid var(--line);
}
.roll-row:last-child { border-bottom: 0; }
.roll-who { min-width: 0; display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.roll-who b { font-size: 14px; font-weight: 500; }
.roll-who span { font-size: 11.5px; color: var(--ink-3); }
.roll-note { border-color: transparent !important; background: var(--surface-2) !important; font-size: 13px !important; padding: 7px 10px !important; }
.roll-note:focus { border-color: var(--blue-bright) !important; background: var(--surface) !important; }

/* segmented status control */
.status-group {
  display: inline-flex; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 9px; padding: 2px; gap: 2px;
}
.status-btn {
  cursor: pointer; border: 0; background: transparent; color: var(--ink-2);
  font: inherit; font-size: 12.5px; font-weight: 500; border-radius: 7px;
  padding: 7px 12px; min-height: 34px; white-space: nowrap;
  transition: background .12s, color .12s;
}
.status-btn:hover { color: var(--ink); }
.status-btn[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
.status-btn[aria-pressed="true"][data-status="PRESENT"] { color: var(--green); }
.status-btn[aria-pressed="true"][data-status="ABSENT"]  { color: var(--crimson); }
.status-btn[aria-pressed="true"][data-status="LATE"]    { color: var(--amber); }
.status-btn[aria-pressed="true"][data-status="EXCUSED"] { color: var(--ink-2); }

/* ---------- group tiles ---------- */
.tile-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(256px, 1fr)); }
.tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
}
.tile-top { padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.tile-top h3 { font-size: 14.5px; }
.tile-top .meta { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.tile-body { padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.tile-stat { display: flex; justify-content: space-between; font-size: 12.5px; }
.tile-stat span { color: var(--ink-3); }
.tile-stat b { font-weight: 500; font-variant-numeric: tabular-nums; }
.tile-top.is-clickable { cursor: pointer; }
.tile-top.is-clickable:hover h3 { color: var(--crimson); }
/* A number that opens something — looks like a value, behaves like a link. */
.as-link {
  background: none; border: 0; padding: 0; font: inherit; font-weight: 500;
  font-variant-numeric: tabular-nums; color: var(--navy); cursor: pointer;
  text-decoration: underline dotted; text-underline-offset: 3px;
}
.as-link:hover { color: var(--crimson); }

/* ---------- portal ---------- */
.portal-hero { text-align: center; padding: 44px 0 34px; }
.portal-hero h1 { font-size: 27px; font-weight: 600; }
.portal-hero p { color: var(--ink-2); font-size: 14px; margin: 9px 0 22px; }
.portal-search { display: flex; gap: 8px; max-width: 470px; margin: 0 auto; }
.portal-search input { flex: 1; padding: 11px 14px; }
.portal-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.stat-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.stat-line:last-child { border-bottom: 0; }
.stat-line span { color: var(--ink-3); }
.stat-line b { font-weight: 500; font-variant-numeric: tabular-nums; text-align: end; }

.grade-row { padding: 12px 0; border-bottom: 1px solid var(--line); }
.grade-row:last-child { border-bottom: 0; }
.grade-top { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; }
.grade-score {
  font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums;
  color: var(--ink); white-space: nowrap; letter-spacing: -.4px;
}
.grade-score small { font-size: 12px; font-weight: 400; color: var(--ink-3); letter-spacing: 0; }
.grade-score.is-low { color: var(--amber); }
.grade-fb { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; }

/* ---------- portal status banner ---------- */
.note-banner {
  border: 1px solid #f2e2c5; background: #fdf7ec; color: var(--amber);
  border-radius: var(--radius); padding: 13px 16px; font-size: 14px; font-weight: 500; margin-bottom: 18px;
}
.note-banner.is-good { border-color: #d6ecdc; background: #f2f9f4; color: var(--green); }

/* ---------- alerts & tasks ---------- */
.work-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .work-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; } }
.alert-row {
  display: grid; gap: 4px 14px; grid-template-columns: 3px minmax(0, 1fr) auto; align-items: start;
  padding: 13px 0; border-bottom: 1px solid var(--line);
}
.alert-row:last-child { border-bottom: 0; }
.alert-row .stripe { width: 3px; align-self: stretch; border-radius: 2px; background: var(--crimson); }
.alert-row.is-resolved .stripe { background: var(--line-2); }
.alert-row .who { font-size: 14px; font-weight: 500; }
.alert-row .what { font-size: 12.5px; color: var(--ink-2); }
.alert-row .call { font-size: 12.5px; color: var(--crimson); font-weight: 500; }
.alert-row.is-resolved .call { color: var(--ink-3); font-weight: 400; }
.alert-row .phones { font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.alert-row .phones a { color: var(--navy); text-decoration: none; }
.task-row {
  display: grid; gap: 3px 14px; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: start;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.task-row:last-child { border-bottom: 0; }
.task-row .tick {
  width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line-2); background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center; color: #fff; margin-top: 1px;
}
.task-row.is-done .tick { background: var(--green); border-color: var(--green); }
.task-row .title { font-size: 14px; font-weight: 500; }
.task-row.is-done .title { color: var(--ink-3); text-decoration: line-through; }
.task-row .meta { font-size: 12px; color: var(--ink-3); display: flex; gap: 10px; flex-wrap: wrap; }
.task-row .meta .late { color: var(--crimson); font-weight: 500; }
.task-row .note { font-size: 12.5px; color: var(--ink-2); background: var(--surface-2); border-radius: 7px; padding: 7px 10px; margin-top: 4px; }
.task-row .acts { display: flex; gap: 6px; }
.count-pill { font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* staff profile */
.profile-grid { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.profile-grid .full { grid-column: 1 / -1; }

/* ---------- modal ---------- */
.modal-root { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 18px; }
.modal-root[hidden] { display: none !important; }
[hidden] { display: none !important; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(23, 32, 46, .28); backdrop-filter: blur(3px); }
.modal {
  position: relative; background: var(--surface); border-radius: 16px;
  box-shadow: 0 30px 70px -20px rgba(23, 32, 46, .35), 0 0 0 1px var(--line);
  width: 100%; max-width: 600px; max-height: calc(100vh - 36px); display: flex; flex-direction: column;
  animation: pop .15s ease-out;
}
.modal.narrow { max-width: 400px; }
.modal.wide { max-width: 980px; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.99); } }
.modal-head {
  padding: 18px 20px 14px; border-bottom: 1px solid var(--line);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
}
.modal-head h2 { font-size: 16px; }
.modal-head .sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.modal-close {
  background: transparent; border: 0; color: var(--ink-3); width: 30px; height: 30px;
  border-radius: 7px; cursor: pointer; font-size: 20px; line-height: 1; flex: none;
}
.modal-close:hover { background: var(--surface-2); color: var(--ink); }
.modal-logo { display: block; margin: 0 auto 16px; }

/* ---------- toast ---------- */
.toast-root { position: fixed; z-index: 80; inset-block-end: 22px; inset-inline: 18px; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast {
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 9px;
  box-shadow: 0 12px 30px -10px rgba(23, 32, 46, .5); font-size: 13.5px; max-width: 420px;
  animation: rise .17s ease-out;
}
.toast.ok  { background: var(--green); }
.toast.err { background: var(--crimson); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

/* ---------- misc ---------- */
.empty { padding: 44px 16px; text-align: center; color: var(--ink-3); font-size: 13.5px; }
.empty .big { display: none; }
.spinner { width: 22px; height: 22px; border: 2px solid var(--line); border-top-color: var(--ink-3); border-radius: 50%; animation: spin .7s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.toolbar { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.toolbar .grow { flex: 1; min-width: 170px; }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  cursor: pointer; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2);
  font: inherit; font-size: 12.5px; font-weight: 500; padding: 6px 13px; border-radius: 8px;
  display: inline-flex; align-items: center; gap: 6px;
}
.chip:hover { background: var(--surface-2); }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip .count { opacity: .6; font-variant-numeric: tabular-nums; }
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); overflow-x: auto; padding: 0 18px; }
.tab {
  cursor: pointer; border: 0; background: transparent; font: inherit; font-size: 13.5px; font-weight: 500;
  color: var(--ink-2); padding: 13px 0; border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px;
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--navy); font-weight: 600; border-bottom-color: var(--navy); }
/* kanji taught in a lesson is course content — always shown, in every language */
.kanji-strip { font-family: var(--jp); font-size: 15px; letter-spacing: 2px; color: var(--ink); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .lang-btn .lab { display: none; }
  .lang-btn { padding: 5px 6px; font-size: 15px; }
  .brand-text small { display: none; }
}
@media (max-width: 700px) {
  .shell { padding: 0 16px; }
  /* the brand keeps its line; the language row drops below it */
  .header-row { min-height: 0; flex-wrap: wrap; row-gap: 4px; padding-block: 8px; }
  .brand { flex: 1 1 auto; }
  .header-tools { flex: 0 0 auto; }
  .lang-switch { order: 3; width: 100%; justify-content: center; }
  .nav-toggle { display: inline-flex; }
  .app-nav { display: none; }
  .app-nav.open { display: block; }
  .nav-row { flex-direction: column; gap: 0; padding-block: 4px; }
  .nav-btn { border-bottom: 0; width: 100%; justify-content: flex-start; padding: 12px 0; }
  .nav-btn[aria-current="page"] { border-bottom-color: transparent; }
  .session-user { display: none; }
  .app-main { padding-top: 22px; }

  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .kpi { border-top: 1px solid var(--line); }
  .kpi:nth-child(-n+2) { border-top: 0; }
  .kpi:nth-child(odd) { border-inline-start: 0; }
  .kpi-value { font-size: 22px; }

  .roll-row { grid-template-columns: 1fr; gap: 9px; padding: 14px 2px; }
  .status-group { display: grid; grid-template-columns: repeat(2, 1fr); width: 100%; }
  .status-btn { width: 100%; }
  h1 { font-size: 21px; }
  .portal-hero { padding: 30px 0 24px; }
  .portal-hero h1 { font-size: 22px; }
  .portal-search { flex-direction: column; }
  .modal-body { padding: 16px; }
  .tabs { padding: 0 14px; gap: 18px; }
  /* comfortable finger targets */
  .btn { min-height: 38px; }
  .btn-sm { min-height: 34px; }
  .chip { min-height: 34px; }
  .lang-btn { min-height: 34px; min-width: 34px; }
  .icon-btn { width: 36px; height: 36px; }
}
@media (max-width: 430px) {
  .brand-text strong { font-size: 13px; }
  .status-group { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- print ---------- */
/* ---------- sales (the CRM) ----------
   Same restraint as the rest: stage and channel are quiet badges; only alert
   severity uses red/amber/blue, never the green that means "paid". */
.kpi.is-link, tr.is-clickable { cursor: pointer; }
button.kpi { background: none; border: 0; border-inline-start: 1px solid var(--line); font: inherit; color: inherit; text-align: start; }
button.kpi:first-child { border-inline-start: 0; }
.kpi.is-link:hover { background: var(--surface-2); }
tr.is-clickable:hover td { background: var(--surface-2); }
.tabs.inner { padding: 0; margin-bottom: 14px; }
.code-cell.wrap { word-break: break-all; white-space: normal; text-align: end; }
.as-link { color: var(--blue); cursor: pointer; background: none; border: 0; padding: 0; font: inherit; }

.avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--navy); color: #fff; font-size: 10.5px; font-weight: 600; letter-spacing: .2px;
}
.avatar.is-none { background: var(--surface-2); color: var(--ink-3); border: 1px dashed var(--line-2); }

.stat-line { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.stat-line:last-child { border-bottom: 0; }
.stat-line > span { color: var(--ink-2); }


/* pipeline board */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.board-col { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); min-height: 160px; display: flex; flex-direction: column; }
.board-col.is-over { border-color: var(--blue-bright); box-shadow: var(--ring); }
.board-col-head { padding: 10px 12px; font-size: 12.5px; font-weight: 600; color: var(--navy); display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); }
.board-col-body { padding: 10px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.board-empty { text-align: center; padding: 14px 0; }
.lead-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; cursor: pointer; box-shadow: var(--shadow); }
.lead-card:hover { border-color: var(--line-2); }
.lead-card.is-dragging { opacity: .45; }
.lead-card.is-critical { border-inline-start: 3px solid var(--crimson); }
.lead-card.is-warn { border-inline-start: 3px solid var(--amber); }
.lead-card.is-info { border-inline-start: 3px solid var(--blue-bright); }
.lead-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13.5px; }
.lead-card-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; font-size: 12px; color: var(--ink-3); }

/* inbox */
.inbox { display: grid; grid-template-columns: 320px 1fr; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; min-height: 460px; }
.inbox-list { border-inline-end: 1px solid var(--line); overflow-y: auto; max-height: 70vh; }
.inbox-item { display: flex; flex-direction: column; gap: 3px; width: 100%; padding: 11px 14px; background: none; border: 0; border-bottom: 1px solid var(--line); font: inherit; color: inherit; text-align: start; cursor: pointer; }
.inbox-item:hover { background: var(--surface-2); }
.inbox-item.is-selected { background: #f2f6fd; }
.inbox-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; }
.inbox-snippet { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-foot { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.inbox-chat { display: flex; flex-direction: column; min-width: 0; }
.inbox-chat-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }

/* conversation */
.chat { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; overflow-y: auto; max-height: 50vh; min-height: 160px; }
.bubble { max-width: 78%; padding: 8px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); align-self: flex-start; }
.bubble.is-out { align-self: flex-end; background: #f2f6fd; border-color: #dbe6fa; }
.bubble-text { white-space: pre-wrap; word-break: break-word; font-size: 14px; }
.bubble-meta { margin-top: 4px; font-size: 11px; color: var(--ink-3); display: flex; gap: 6px; align-items: center; }
.composer { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); align-items: flex-end; }
.composer textarea { flex: 1; min-height: 42px; resize: vertical; }

/* lead window */
.lead-head { display: grid; gap: 18px; margin-bottom: 14px; }
@media (min-width: 760px) { .lead-head { grid-template-columns: 1fr 1fr; } }
.lead-head-alerts { display: flex; flex-direction: column; gap: 8px; }
.lead-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.alert-mini { display: flex; gap: 8px; align-items: baseline; padding: 6px 0; }

.timeline { display: flex; flex-direction: column; }
.timeline-row { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; align-items: baseline; }
.timeline-row:last-child { border-bottom: 0; }

.task-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.task-row.is-done { opacity: .55; }
.alert-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.alert-row:hover { background: var(--surface-2); }
.feed-row { display: flex; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; align-items: baseline; }

/* settings */
.settings-block { padding: 18px 0; border-bottom: 1px solid var(--line); }
.settings-block:last-child { border-bottom: 0; }
.settings-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.settings-head h3 { margin: 0; font-size: 15px; }
.actions-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.steps { margin: 8px 0 0; padding-inline-start: 20px; color: var(--ink-2); font-size: 13px; }
.checkline { display: flex; align-items: center; gap: 8px; font-size: 14px; }

@media (max-width: 760px) {
  .inbox { grid-template-columns: 1fr; }
  .inbox-list { max-height: 260px; border-inline-end: 0; border-bottom: 1px solid var(--line); }
  .bubble { max-width: 92%; }
}

/* ---------- the sales floor ----------
   Sales is a different department with a different pulse from the classroom:
   a deep navy banner with live gauges, bolder numbers, a coloured pipeline.
   The brand navy and crimson stay; the extra colours below live only inside
   .sx and never stand for paid / pending / overdue. */
body.mode-sales { background: linear-gradient(180deg, #e3e8f5 0, #eef1f7 360px) no-repeat, #eef1f7; }
.sx, #modal-root {
  --t-blue: #5b9bff; --t-violet: #9b8cff; --t-cyan: #35d0e6; --t-orange: #ffa24d;
  --t-coral: #ff6b6b; --t-teal: #2dd4bf; --t-slate: #94a3b8;
}
.tone-blue, .st-blue { --tone: var(--t-blue); }     .tone-violet, .st-violet { --tone: var(--t-violet); }
.tone-cyan, .st-cyan { --tone: var(--t-cyan); }     .tone-orange, .st-orange { --tone: var(--t-orange); }
.tone-coral, .st-coral { --tone: var(--t-coral); }  .tone-teal, .st-teal { --tone: var(--t-teal); }
.tone-slate, .st-slate { --tone: var(--t-slate); }
.src-telegram { --c: #35b3ee; } .src-whatsapp { --c: #2dd4bf; } .src-instagram { --c: #c77dff; }
.src-phone { --c: #ffa24d; }    .src-email { --c: #5b9bff; }    .src-walkin { --c: #94a3b8; } .src-other { --c: #cbd5e1; }

.btn-crimson { background: var(--crimson); color: #fff; font-weight: 600; padding: 10px 18px; box-shadow: 0 6px 18px rgba(220, 38, 38, .38); }
.btn-crimson:hover { background: #c81e1e; }

.sx-hero {
  position: relative; overflow: hidden; color: #fff; border-radius: 22px; padding: 26px 28px 24px; margin-bottom: 14px;
  background: var(--hero-bg,
    radial-gradient(520px 220px at 92% -10%, rgba(255, 90, 95, .34), transparent 70%),
    radial-gradient(420px 260px at 0% 110%, rgba(91, 155, 255, .30), transparent 70%),
    linear-gradient(135deg, #0f1d36 0%, #14295a 58%, #243a96 100%));
  box-shadow: 0 18px 40px var(--hero-shadow, rgba(15, 29, 54, .28));
  --ring-track: rgba(255, 255, 255, .16);
}
.sx-hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; flex-wrap: wrap; }
.sx-hero h1 { margin: 10px 0 2px; font-size: 32px; font-weight: 700; letter-spacing: -.6px; color: #fff; }
.sx-line { margin: 0; color: rgba(255, 255, 255, .72); font-size: 14.5px; }
.sx-line.is-hot { color: #ffc2c2; font-weight: 600; }
.sx-live { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; color: rgba(255, 255, 255, .78); }
.sx-live i { width: 8px; height: 8px; border-radius: 50%; background: #2dd4bf; box-shadow: 0 0 0 0 rgba(45, 212, 191, .6); animation: sx-pulse 2s infinite; }
@keyframes sx-pulse { 70% { box-shadow: 0 0 0 9px rgba(45, 212, 191, 0); } 100% { box-shadow: 0 0 0 0 rgba(45, 212, 191, 0); } }
.sx-hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sx-pills { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, .1); }
.sx-pills button { border: 0; background: none; color: rgba(255, 255, 255, .72); font: inherit; font-size: 12.5px; font-weight: 500; padding: 6px 13px; border-radius: 999px; cursor: pointer; }
.sx-pills button[aria-pressed="true"] { background: #fff; color: var(--navy); font-weight: 600; }

.sx-tiles { display: grid; grid-template-columns: 1fr 1fr 1.25fr 1.25fr; gap: 12px; margin-top: 22px; }
.sx-tile {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; color: #fff; text-align: start;
  font: inherit; cursor: pointer; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .13);
  transition: background .15s, transform .15s;
}
.sx-tile:hover { background: rgba(255, 255, 255, .13); transform: translateY(-1px); }
.sx-tile-wide { flex-direction: column; align-items: stretch; gap: 8px; }
.sx-tile-text { display: flex; flex-direction: column; min-width: 0; }
.sx-tile-label { font-size: 11px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.sx-tile b { font-size: 26px; font-weight: 700; letter-spacing: -.5px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.sx-tile b.sx-big { font-size: 30px; }
.sx-tile b small { font-size: 12px; font-weight: 500; letter-spacing: 0; color: rgba(255, 255, 255, .6); }
.sx-tile b.is-hot { color: #ffc2c2; }
.sx-tile-sub { font-size: 12px; color: rgba(255, 255, 255, .58); }
.sx-tile-spark { display: block; height: 40px; }
.sx-strip { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-top: 16px; font-size: 13px; color: rgba(255, 255, 255, .7); }
.sx-strip b { color: #fff; font-size: 16px; font-weight: 700; margin-inline-end: 3px; }
.sx-strip .is-hot, .sx-strip .is-hot b { color: #ffc2c2; }

.sx-ring { flex: none; display: block; }
.sx-ring-track { stroke: var(--ring-track, rgba(15, 29, 54, .09)); }
.sx-ring-arc { stroke: var(--tone, var(--t-blue)); transition: stroke-dashoffset .8s cubic-bezier(.2, .8, .2, 1); }
.sx-ring-num { fill: currentColor; font-size: 27px; font-weight: 700; letter-spacing: -.5px; }
.sx-ring-unit { font-size: 12px; font-weight: 600; opacity: .65; }
.sx-hero .sx-ring-num { fill: #fff; }
.sx-spark-line { stroke: var(--tone, var(--t-blue)); }
.sx-spark-area { fill: var(--tone, var(--t-blue)); opacity: .2; }

.sx-tabs { display: flex; gap: 4px; padding: 5px; margin-bottom: 16px; overflow-x: auto; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.sx-tabs .tab { margin: 0; padding: 9px 15px; border: 0; border-radius: 10px; font-size: 13.5px; display: inline-flex; align-items: center; gap: 7px; }
.sx-tabs .tab:hover { background: var(--surface-2); }
.sx-tabs .tab[aria-selected="true"] { background: var(--dept, var(--navy)); color: #fff; border: 0; }
.sx-tab-count { min-width: 18px; padding: 1px 6px; border-radius: 999px; background: var(--crimson); color: #fff; font-size: 10.5px; font-weight: 700; text-align: center; }

.sx-body { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); }
.sx-body.is-plain { background: none; border: 0; padding: 0; box-shadow: none; }
.sx-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.sx-span-2 { grid-column: span 2; }
.sx-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; box-shadow: var(--shadow); }
.sx-card > header { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.sx-card h3 { margin: 0; font-size: 15px; letter-spacing: -.1px; }
.sx-callout { padding: 10px 14px; margin-bottom: 14px; border-radius: 12px; background: #eef2ff; border: 1px solid #d9e1ff; font-size: 13.5px; color: var(--navy); }

.sx-funnel { display: flex; flex-direction: column; gap: 4px; }
.sx-funnel-row { display: grid; grid-template-columns: 118px 1fr 36px 52px 42px; align-items: center; gap: 12px; padding: 7px 8px; border: 0; border-radius: 10px; background: none; font: inherit; color: inherit; text-align: start; cursor: pointer; }
.sx-funnel-row:hover { background: var(--surface-2); }
.sx-funnel-track { height: 12px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.sx-funnel-track i { display: block; height: 100%; border-radius: 6px; background: var(--tone); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.sx-funnel-row b { text-align: end; font-variant-numeric: tabular-nums; }
.sx-funnel-val { text-align: end; }
.sx-funnel-pct { text-align: end; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }

.sx-sources { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.sx-sources ul { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 130px; }
.sx-sources li { display: flex; align-items: center; gap: 9px; padding: 5px 0; font-size: 13.5px; }
.sx-sources li span { flex: 1; color: var(--ink-2); }
.sx-sources li i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
.sx-slice { stroke: var(--c, #94a3b8); }
.sx-donut-num { fill: var(--ink); font-size: 26px; font-weight: 700; }

.sx-hot { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; margin-bottom: 8px; border-radius: 10px; background: var(--surface-2); border-inline-start: 4px solid var(--sev, var(--line-2)); cursor: pointer; font-size: 13.5px; }
.sx-hot:hover { background: #f1f4fa; }
.sev-critical { --sev: var(--crimson); } .sev-warn { --sev: #e08a1e; } .sev-info { --sev: var(--blue-bright); }
.sx-clear { padding: 18px; border-radius: 12px; text-align: center; background: #effaf8; color: #0f766e; font-weight: 600; font-size: 14px; }

.sx-rank { display: grid; grid-template-columns: 22px 28px minmax(0, 1.4fr) minmax(60px, 1fr) 64px 44px; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.sx-rank:last-child { border-bottom: 0; }
.sx-rank-no { font-size: 17px; font-weight: 800; color: var(--line-2); text-align: center; }
.sx-rank:first-of-type .sx-rank-no { color: var(--crimson); }
.sx-rank-name { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.sx-rank-bar { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.sx-rank-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--t-blue), var(--t-violet)); }
.sx-rank-val { text-align: end; font-variant-numeric: tabular-nums; }
.sx-rank-pct { text-align: end; color: var(--ink-3); font-weight: 600; }

.sx-day { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.sx-day button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); font: inherit; color: inherit; cursor: pointer; text-align: start; }
.sx-day button:hover { border-color: var(--line-2); background: #fff; }
.sx-day b { font-size: 28px; font-weight: 700; letter-spacing: -.6px; line-height: 1.1; }
.sx-day span { font-size: 12px; color: var(--ink-2); }
.sx-day .is-hot b { color: var(--crimson); }

.sx-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.sx-person { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); }
.sx-person > header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.sx-person > header > span:last-child { display: flex; flex-direction: column; line-height: 1.25; }
.sx-person-main { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sx-person-ring { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.sx-person-ring .sx-ring-num { font-size: 22px; }
.sx-person-money { text-align: end; display: flex; flex-direction: column; }
.sx-person-money b { font-size: 26px; font-weight: 700; letter-spacing: -.5px; }
.sx-person-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sx-person-grid div { padding: 8px 10px; border-radius: 10px; background: var(--surface-2); display: flex; flex-direction: column; }
.sx-person-grid b { font-size: 17px; font-variant-numeric: tabular-nums; }
.sx-person-grid span { font-size: 11px; color: var(--ink-3); line-height: 1.25; }
.sx-person-grid .is-hot b { color: var(--crimson); }

/* the pipeline wears its stage colours */
.board-col { border-top: 3px solid var(--tone, var(--line-2)); background: var(--surface-2); }
.board-col-head { display: flex; align-items: center; gap: 8px; border-bottom: 0; }
.board-col-head > span:first-child { flex: 1; }
.board-col-sum { font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.board-col-head .count { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--tone, var(--line-2)); color: #0f1d36; font-size: 11.5px; font-weight: 700; text-align: center; }
.lead-card-value { margin-top: 4px; font-size: 15px; font-weight: 700; color: var(--navy); letter-spacing: -.2px; }

/* ---------- the production floor (reuses the sales-floor look) ---------- */
.lv-EXCELLENT { --c: var(--t-teal); } .lv-GOOD { --c: var(--t-blue); } .lv-FAIR { --c: var(--t-orange); }
.lv-ATTENTION { --c: var(--t-coral); } .lv-NONE { --c: #cbd5e1; }
.px-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; color: #0f1d36; background: color-mix(in srgb, var(--tone) 38%, #fff); }
.px-flag { display: inline-block; margin: 3px 4px 0 0; padding: 1px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; color: #b42318; background: #fdecec; }
.px-trend { font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.px-trend.is-up { color: #0f766e; } .px-trend.is-down { color: #c81e1e; }
.px-legend { display: flex; align-items: center; gap: 9px; width: 100%; padding: 5px 4px; border: 0; border-radius: 8px; background: none; font: inherit; color: inherit; cursor: pointer; text-align: start; }
.px-legend:hover { background: var(--surface-2); }
.px-legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
.px-legend span { flex: 1; color: var(--ink-2); font-size: 13.5px; }
.px-verdicts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.px-verdict { display: flex; flex-direction: column; gap: 2px; padding: 14px; border: 1px solid var(--line); border-top: 4px solid var(--tone); border-radius: 14px; background: var(--surface-2); font: inherit; color: inherit; cursor: pointer; text-align: start; }
.px-verdict:hover { background: #fff; border-color: var(--tone); }
.px-verdict b { font-size: 30px; font-weight: 700; letter-spacing: -.6px; line-height: 1.1; }
.px-verdict span { font-size: 12px; color: var(--ink-2); line-height: 1.3; }
.px-row, .px-srow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 6px; border: 0; border-radius: 10px; background: none; font: inherit; color: inherit; text-align: start; cursor: pointer; }
.px-row:hover, .px-srow:hover { background: var(--surface-2); }
.px-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.px-row-main > b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.px-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.px-table { padding: 8px 12px; }
.px-srow { border-bottom: 1px solid var(--line); border-radius: 0; }
.px-srow:last-of-type { border-bottom: 0; }
.px-num { display: flex; flex-direction: column; align-items: flex-end; min-width: 82px; line-height: 1.25; }
.px-num b { font-size: 15px; font-variant-numeric: tabular-nums; }
.px-num > span { font-size: 11px; color: var(--ink-3); }
.px-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.px-chips { background: var(--surface); border: 1px solid var(--line); }
.px-chips button { color: var(--ink-2); }
.px-chips button[aria-pressed="true"] { background: var(--dept, var(--navy)); color: #fff; }
.px-q { flex: 1; min-width: 160px; max-width: 280px; }
.px-sel { min-width: 150px; }
.px-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.px-card { display: flex; flex-direction: column; gap: 10px; }
.px-card-head { display: flex; align-items: center; gap: 14px; margin: 0 !important; }
.px-card-title { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; line-height: 1.3; }
.px-card-title > b { font-size: 16px; }
.px-stack { display: flex; gap: 2px; height: 10px; border-radius: 5px; overflow: hidden; background: var(--surface-2); }
.px-stack i { background: var(--tone); }
.px-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.px-mini span { display: flex; flex-direction: column; padding: 7px 10px; border-radius: 10px; background: var(--surface-2); font-size: 11px; color: var(--ink-3); line-height: 1.25; }
.px-mini b { font-size: 17px; color: var(--ink); font-variant-numeric: tabular-nums; }
.px-meter { display: grid; grid-template-columns: 1fr 90px 40px; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-2); }
.px-meter-bar { height: 7px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.px-meter-bar i { display: block; height: 100%; border-radius: 4px; background: var(--tone); }
.px-meter b { text-align: end; font-variant-numeric: tabular-nums; }
.px-card-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: auto; padding-top: 4px; }
.px-card-foot .btn { margin-inline-start: auto; }
.px-duo { display: flex; justify-content: space-around; }
.px-person-ring { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.px-person-ring .sx-ring-num { font-size: 22px; }
@media (max-width: 960px) { .px-verdicts { grid-template-columns: 1fr 1fr; } .px-two { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .px-hide-sm { display: none; } .px-num { min-width: 60px; } .px-meter { grid-template-columns: 1fr 70px 38px; } }

/* senior quality control only looks: the main "do something" buttons on the screens are hidden
   (the server refuses every write from this role regardless). */
body.is-readonly .view .btn-primary, body.is-readonly .view .btn-crimson { display: none; }

/* ---------- each department has its own colour, so you know where you are ----------
   Sales (blue)       — fast and cool: the navy sales floor above.
   Production (stone) — stable: graphite and warm sand, a solid ground to read results on.
   Finance (emerald)  — money: deep green with a gold edge.
   Only the banner, the page tint and the selected tab change; the status colours
   (paid / pending / overdue, levels) mean the same everywhere. */
body.mode-production {
  --dept: #2a3038;
  --hero-bg:
    radial-gradient(480px 220px at 94% -12%, rgba(226, 184, 120, .34), transparent 70%),
    radial-gradient(420px 260px at 0% 112%, rgba(120, 140, 160, .26), transparent 70%),
    linear-gradient(135deg, #171b20 0%, #262c34 58%, #38414c 100%);
  --hero-shadow: rgba(23, 27, 32, .30);
  background: linear-gradient(180deg, #e8e3d9 0, #f1eee8 360px) no-repeat, #f1eee8;
}
body.mode-finance {
  --dept: #0b5a41;
  --hero-bg:
    radial-gradient(480px 220px at 94% -12%, rgba(234, 179, 8, .38), transparent 70%),
    radial-gradient(420px 260px at 0% 112%, rgba(52, 211, 153, .22), transparent 70%),
    linear-gradient(135deg, #04261c 0%, #0a4332 58%, #12694d 100%);
  --hero-shadow: rgba(4, 38, 28, .30);
  background: linear-gradient(180deg, #dcebe2 0, #eef4ef 360px) no-repeat, #eef4ef;
}
/* Finance has no sales-floor banner of its own, so its page heading becomes one. */
body.mode-finance .section-head {
  position: relative; overflow: hidden; color: #fff; padding: 22px 26px; margin-bottom: 18px; border-radius: 20px;
  background: var(--hero-bg); box-shadow: 0 16px 34px var(--hero-shadow); border-bottom: 3px solid #e5b422;
}
body.mode-finance .section-head h1 { color: #fff; letter-spacing: -.5px; }
body.mode-finance .section-head .muted { color: rgba(255, 255, 255, .7); }
body.mode-finance .section-head .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .08); }
body.mode-finance .section-head .btn-ghost:hover { background: rgba(255, 255, 255, .18); }
body.mode-finance .btn-primary { background: #0f7a55; }
body.mode-finance .btn-primary:hover { background: #0b5a41; }
body.mode-finance .tab[aria-selected="true"] { color: #0b5a41; border-bottom-color: #e5b422; }

/* the floor map: one cell per student, grouped by class */
.px-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.px-block { padding: 12px 14px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); border-top: 4px solid var(--c, var(--line-2)); }
.px-block > button.px-block-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 0 0 9px; border: 0; background: none; font: inherit; color: inherit; text-align: start; cursor: pointer; }
.px-block-head b { font-size: 13.5px; line-height: 1.25; }
.px-block-head span { font-size: 12px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.px-cells { display: flex; flex-wrap: wrap; gap: 5px; }
.px-cell { width: 34px; height: 34px; border: 0; border-radius: 9px; background: var(--c); color: #0f1d36; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; transition: transform .12s, box-shadow .12s; }
.px-cell:hover { transform: translateY(-2px) scale(1.08); box-shadow: 0 6px 14px rgba(15, 29, 54, .22); }
.px-cell.has-flag { box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px #b42318; }
.px-legend-row { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 12px; font-size: 12px; color: var(--ink-2); }
.px-legend-row i { display: inline-block; width: 10px; height: 10px; margin-inline-end: 5px; border-radius: 3px; background: var(--c); vertical-align: -1px; }

/* ---- Production's own handwriting: squared, stamped, with a sand-gold accent ---- */
.tone-gold, .st-gold { --tone: #e2b878; }
.px .sx-hero {
  border-radius: 12px; border-top: 4px solid #e2b878;
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 1px, transparent 1px 36px),
                    repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 1px, transparent 1px 36px), var(--hero-bg);
}
.px .sx-hero h1 { text-transform: none; letter-spacing: -.8px; }
.px .sx-live { color: #e2b878; } .px .sx-live i { background: #e2b878; }
.px .sx-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.px .sx-tile.px-conv { grid-column: 1 / -1; }
.px .sx-tile { border-radius: 10px; padding: 14px; gap: 12px; }
.px .sx-tile-text b { font-size: 22px; }
.px .sx-tile.px-conv { background: linear-gradient(135deg, rgba(226,184,120,.22), rgba(226,184,120,.07)); border: 1px solid rgba(226,184,120,.55); }
.px .sx-tile.px-conv b.sx-big { font-size: 44px; letter-spacing: -1.5px; color: #f3d9a8; }
.px .sx-pills, .px .sx-pills button { border-radius: 8px; }
.px .sx-tabs { border-radius: 10px; border: 0; border-bottom: 3px solid var(--dept); background: var(--surface); }
.px .sx-tabs .tab { border-radius: 6px; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; font-size: 12px; }
.px .sx-tabs .tab[aria-selected="true"] { box-shadow: inset 0 -3px 0 #e2b878; }
.px .sx-card { border-radius: 10px; border-top: 3px solid #2a3038; }
.px .sx-card h3 { text-transform: uppercase; letter-spacing: .8px; font-size: 12.5px; color: var(--ink-2); }
.px .px-pill, .px .px-flag { border-radius: 5px; }
.px .px-cell { border-radius: 6px; }
.px .px-block { border-radius: 8px; }
.px .px-verdict { border-radius: 8px; }
.px .btn { border-radius: 8px; }
.px-two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.px-crow { display: grid; grid-template-columns: 22px minmax(0, 1.3fr) minmax(70px, 1fr) 52px auto; align-items: center; gap: 12px; width: 100%; padding: 9px 6px; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; color: inherit; text-align: start; cursor: pointer; }
.px-crow:last-child { border-bottom: 0; }
.px-crow:hover { background: var(--surface-2); }
.px-crow-no { font-size: 16px; font-weight: 800; color: var(--line-2); text-align: center; }
.px-crow:first-of-type .px-crow-no { color: #c99a4a; }
.px-crow-name { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.px-crow-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.px-crow-bar { height: 10px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.px-crow-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #c99a4a, #e2b878); }
.px-crow-pct { text-align: end; font-size: 15px; font-variant-numeric: tabular-nums; }
.px-mini-4 { grid-template-columns: repeat(3, 1fr); }
.px-mini-4 .px-mini-conv { grid-column: 1 / -1; background: #f7ecd9; color: #7a5a22; }
.px-mini-4 .px-mini-conv b { color: #5c4213; font-size: 22px; }
@media (max-width: 1100px) { .px .sx-tiles { grid-template-columns: 1fr 1fr; } .px .sx-tile.px-conv { grid-column: 1 / -1; } }
@media (max-width: 960px) { .px-two-cols { grid-template-columns: 1fr; } }

/* facts: lesson log, missed dates, the textbook strip */
.px-detail-head { display: flex; align-items: center; gap: 18px; margin-bottom: 6px; }
.px-detail-head > div { flex: 1; min-width: 0; }
.px-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 20px 0 8px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .8px; color: var(--ink-2); }
.px-lessons { display: flex; flex-direction: column; }
.px-lesson { display: grid; grid-template-columns: 96px minmax(0, 1fr) 42px 64px 54px; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.px-lesson:last-child { border-bottom: 0; }
.px-lesson-date { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.px-lesson-main { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.px-lesson-num { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.px-lesson-num span { font-size: 10.5px; color: var(--ink-3); }
.px-lchip { display: inline-block; padding: 1px 7px; border-radius: 5px; background: #f7ecd9; color: #7a5a22; font-size: 11.5px; font-weight: 700; text-align: center; }
.px-lchip.is-none { background: var(--surface-2); color: var(--ink-3); }
.px-missed { padding: 8px 0; border-bottom: 1px solid var(--line); }
.px-book { display: flex; flex-wrap: wrap; gap: 3px; }
.px-bk { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--line); font-style: normal; font-size: 10.5px; color: var(--ink-3); }
.px-bk.is-on { background: #e2b878; border-color: #c99a4a; color: #3d2b0a; font-weight: 700; }
.px-bk.is-now { box-shadow: 0 0 0 2px #2a3038; }
.px-currow { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.px-currow:last-child { border-bottom: 0; }
.px-curname { display: flex; flex-direction: column; gap: 1px; border: 0; background: none; font: inherit; color: inherit; text-align: start; cursor: pointer; line-height: 1.3; }
.px-curname:hover b { text-decoration: underline; }
@media (max-width: 760px) { .px-currow { grid-template-columns: 1fr; } .px-lesson { grid-template-columns: 76px minmax(0, 1fr) 40px; } .px-lesson-num { display: none; } }

/* student profile */
.pf-head { display: flex; gap: 22px; align-items: flex-start; margin-bottom: 8px; }
.pf-photo-col { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pf-photo { width: 132px; height: 132px; border-radius: 14px; object-fit: cover; background: var(--surface-2); border: 1px solid var(--line); }
.pf-initials { display: flex; align-items: center; justify-content: center; font-size: 38px; font-weight: 700; color: #7a5a22; background: #f7ecd9; }
.pf-title h3 { margin: 0 0 2px; font-size: 22px; letter-spacing: -.4px; }
.pf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.pf-more { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.pf-more summary { cursor: pointer; font-weight: 600; color: var(--ink-2); margin-bottom: 10px; }
.px-bar { display: grid; grid-template-columns: minmax(120px, 1.2fr) minmax(60px, 1fr) 30px 38px; align-items: center; gap: 10px; padding: 6px 0; font-size: 13.5px; }
.px-bar.is-unknown { opacity: .6; }
.px-bar > b { text-align: end; }
.px-three { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 14px; }
.px-srow .sx-ring-num, .px-row .sx-ring-num { font-size: 14px; }
.px-srow .sx-ring-unit, .px-row .sx-ring-unit { display: none; }
@media (max-width: 760px) { .pf-grid { grid-template-columns: 1fr; } .pf-head { flex-direction: column; } }

/* the student's place in the group (parent portal) */
.rank-me { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.rank-me b { font-size: 34px; font-weight: 800; letter-spacing: -1px; color: var(--navy); }
.rank-me span { color: var(--ink-2); font-size: 14px; }
.rank-row { display: grid; grid-template-columns: 34px 1fr 1.4fr 46px; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; font-size: 14px; }
.rank-row.is-you { background: #eef2ff; font-weight: 700; }
.rank-medal { font-size: 18px; text-align: center; }
.rank-bar { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.rank-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #5b9bff, #9b8cff); }
.rank-row b { text-align: end; font-variant-numeric: tabular-nums; }

@media (max-width: 1100px) {
  .sx-tiles { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  .sx-grid { grid-template-columns: 1fr; }
  .sx-span-2 { grid-column: auto; }
}
@media (max-width: 640px) {
  .sx-hero { padding: 20px 18px; border-radius: 18px; }
  .sx-hero h1 { font-size: 25px; }
  .sx-tiles { grid-template-columns: 1fr; }
  .sx-funnel-row { grid-template-columns: 92px 1fr 30px 0 38px; gap: 8px; }
  .sx-funnel-val { display: none; }
  .sx-rank { grid-template-columns: 20px 28px 1fr 60px 38px; }
  .sx-rank-bar { display: none; }
  .sx-day { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .sx-live i { animation: none; }
  .sx-ring-arc, .sx-funnel-track i { transition: none; }
  .sx-tile:hover { transform: none; }
}

@media print {
  body { background: #fff; }
  .app-header, .app-nav, .app-footer, .toast-root, .no-print, .btn { display: none !important; }
  .app-main { padding: 0; }
  .card { box-shadow: none; border-color: #ddd; break-inside: avoid; }
  .modal-root { position: static; padding: 0; }
  .modal-backdrop { display: none; }
  .modal { max-width: none; max-height: none; box-shadow: none; }
  .modal-foot { display: none; }
  table.data { min-width: 0; font-size: 11px; }
  .roll-row { break-inside: avoid; }
  @page { margin: 15mm; }
}

/* ---------- finance: trend bars, payment grid, notes ---------- */
.trend {
  display: flex; gap: 6px; align-items: flex-end;
  padding: 10px 0; overflow-x: auto;
}
.trend-col { flex: 1 1 0; min-width: 44px; text-align: center; }
.trend-bars {
  display: flex; gap: 3px; align-items: flex-end; justify-content: center;
  height: 110px; padding-bottom: 4px; border-bottom: 1px solid var(--line);
}
.trend-bar { width: 12px; border-radius: 3px 3px 0 0; min-height: 2px; display: block; }
.trend-bar.is-income  { background: var(--green); }
.trend-bar.is-expense { background: var(--navy-soft); }
.trend-profit {
  font-size: 11px; font-variant-numeric: tabular-nums; margin-top: 5px; color: var(--ink-2);
}
.trend-profit.is-negative { color: var(--crimson); }
.trend-label { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.legend { display: flex; gap: 14px; align-items: center; margin-top: 6px; }
.legend .dot { width: 9px; height: 9px; border-radius: 2px; display: inline-block; margin-inline-end: 5px; }
.legend .dot.is-income  { background: var(--green); }
.legend .dot.is-expense { background: var(--navy-soft); }

.grid-table th.num, .grid-table td.num { text-align: center; white-space: nowrap; }
.grid-table td.num .badge { min-width: 62px; justify-content: center; }

.note-card {
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px;
  background: var(--surface);
}
.note-card.is-pinned { border-inline-start: 3px solid var(--navy); }
.note-card .note-body { white-space: pre-wrap; font-size: 13.5px; }
.note-card .note-meta {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  margin-top: 8px; font-size: 11.5px; color: var(--ink-3);
}

/* The two sides of the house: one is always chosen, never both. */
.branch-seg { margin-bottom: 10px; max-width: 460px; }
.branch-seg label { padding: 9px 14px; font-size: 13.5px; }
.sx-hero .px-trend.is-down { color: #ff9a9a; } .sx-hero .px-trend.is-up { color: #5eead4; }
