/* ==========================================================================
   IlmOS · zones.css
   The three work zones: hub grids, the dashboard, the records filter bar and
   the attendance register (the screen a teacher uses every single morning).
   ========================================================================== */

/* ------------------------------------------------------------- hub grids */
.hub-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 560px) {
  .hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .hub-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 720px) {
  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------- dashboard */
.greet {
  padding: 16px;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--pine) 10%, transparent), color-mix(in srgb, #ec4899 7%, transparent)),
    var(--surface);
}

.greet__eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pine);
}

.greet__title {
  font-size: clamp(20px, 5vw, 26px);
  margin: 3px 0 2px;
}

.greet__sub {
  font-size: 13.5px;
  color: var(--ink-2);
}

.greet__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--rule-2);
  font-size: 12.5px;
  color: var(--ink-3);
}

.greet__facts b {
  color: var(--ink);
  font-weight: 650;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

/* Whatever follows a row of figures gets air, not a shared border. */
.stat-grid + * {
  margin-top: 14px;
}

@media (min-width: 900px) {
  .stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.today-list {
  display: flex;
  flex-direction: column;
}

.today-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--rule);
  font-size: 13.5px;
}

.today-item:last-child {
  border-bottom: 0;
}

.today-item__time {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-3);
  flex: 0 0 auto;
}

.today-item__text {
  flex: 1;
  min-width: 0;
}

/* --------------------------------------------------------- record filters */
.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  margin-bottom: 12px;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--lift-1);
}

.filter-bar__row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.filter-bar__row > .field {
  flex: 1 1 160px;
}

.filter-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--ink-3);
}

/* Two paper makers: one visible at a time, the switch kept plain. */
.maker-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.maker-tabs .field__hint {
  flex: 1 1 220px;
}

/* The two quiet ways out of a maker form: check the list, print the paper.
   Links, not buttons with side effects — so they may sit right above the save
   bar without stealing its place. */
.maker-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

/* On a phone the bar is a column: nothing may grow, or a field's width rule
   (flex-basis) turns into height and leaves a hole under the search box. */
.filter-bar > * {
  flex: 0 0 auto;
}

@media (min-width: 720px) {
  .filter-bar {
    flex-direction: row;
    align-items: flex-end;
    gap: 10px;
  }

  .filter-bar > .field {
    flex: 1 1 160px;
  }

  .filter-bar > .field--wide {
    flex: 2 1 220px;
  }
}

/* ------------------------------------------------------ online payments */
/* Gateway settings: the enable-checkbox grid + credential sections. */
.check-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

@media (min-width: 640px) {
  .check-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* The pick-a-voucher payment list on /entry/payments. */
.pay-list {
  display: flex;
  flex-direction: column;
}

/* The sandbox confirm page summary. */

/* ------------------------------------------------------ attendance register */
.reg {
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--lift-1);
}

/* The register's Save bar is sticky. Inside a clipped box it sticks to the box,
   not the screen, and on a short class it rose over "Mark all present". Like
   .card:has(.submit-bar), the register stays unclipped while it holds one; its
   last strip rounds its own corners instead. */
.reg:has(.submit-bar) {
  overflow: visible;
}

.reg:has(.submit-bar) .reg__head {
  border-radius: var(--r) var(--r) 0 0;
}

.reg__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--rule-2);
  background: var(--surface-2);
}

.reg__head-text {
  display: flex;
  flex-direction: column;
}

.reg__head-text strong {
  font-size: 14.5px;
}

.reg__head-text span {
  font-size: 12px;
  color: var(--ink-3);
}

.reg__counts {
  margin-left: auto;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.reg__rows {
  max-height: none;
}

.reg__row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border-bottom: 1px solid var(--rule);
}

.reg__row:last-child {
  border-bottom: 0;
}

.reg__row:nth-child(even) {
  background: var(--surface-2);
}

.reg__row.is-absent {
  background: var(--bad-wash);
}

.reg__row.is-leave {
  background: var(--brass-wash);
}

.reg__roll {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-3);
}

.reg__who {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.reg__name {
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reg__sub {
  font-size: 11.5px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Student and father names are real data: on a narrow screen they wrap instead
   of being sliced off with an ellipsis. Below 430px the P/A/L/H control drops
   to its own row so the name always keeps a readable width. */
@media (max-width: 560px) {
  .reg__name,
  .reg__sub {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 430px) {
  .reg__row {
    grid-template-columns: 38px minmax(0, 1fr);
    row-gap: 7px;
  }

  .reg__row > .seg {
    grid-column: 2 / -1;
    justify-self: start;
  }
}

/* book checklist (admission form + student record) ----------------------- */
.book-picker {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.book-picker__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  background: var(--surface);
  cursor: pointer;
}

.book-picker__item:has(input:checked) {
  border-color: var(--pine);
  background: var(--pine-wash);
}

.book-picker__item input[type='checkbox'] {
  width: 17px;
  height: 17px;
  accent-color: var(--pine);
  flex: 0 0 auto;
}

.book-picker__name {
  font-size: 13.5px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.book-picker__name .code {
  color: var(--ink-3);
  font-size: 12px;
}

/* four-state segmented control ------------------------------------------- */
.seg {
  display: flex;
  border: 1px solid var(--rule-2);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface);
}

.seg__opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 0 8px;
  border-right: 1px solid var(--rule);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-3);
  cursor: pointer;
  user-select: none;
}

.seg__opt:last-child {
  border-right: 0;
}

.seg__opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.seg__opt span {
  line-height: 1;
}

.seg__opt:has(input:checked) {
  color: #fff;
}

.seg__opt[data-state="P"]:has(input:checked) {
  background: var(--pine);
}

.seg__opt[data-state="A"]:has(input:checked) {
  background: var(--bad);
}

.seg__opt[data-state="L"]:has(input:checked) {
  background: var(--warn);
}

.seg__opt[data-state="H"]:has(input:checked) {
  background: var(--ink-3);
}

.seg__opt:active {
  background: var(--paper-2);
}

.reg__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 11px 12px;
  border-top: 1px solid var(--rule);
  background: var(--surface-2);
}

.reg__legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--ink-2);
}

.reg__legend b {
  font-family: var(--font-mono);
}

/* stacked variant: on narrow phones the segmented control drops below ----- */
@media (max-width: 420px) {
  .reg__row {
    grid-template-columns: 40px minmax(0, 1fr);
    grid-template-areas:
      "roll who"
      "seg  seg";
    row-gap: 7px;
  }

  .reg__roll {
    grid-area: roll;
  }

  .reg__who {
    grid-area: who;
  }

  .seg {
    grid-area: seg;
  }

  .seg__opt {
    flex: 1;
  }
}

/* ------------------------------------------------------- book row editor */
.book-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.book-grid__head {
  display: none;
}

.book-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.7fr) 68px 62px;
  gap: 6px;
}

.book-row .input {
  min-height: 40px;
  padding: 8px 9px;
  font-size: 14px;
}

@media (max-width: 520px) {
  .book-row {
    grid-template-columns: minmax(0, 1fr) 64px 58px;
    grid-template-areas:
      "name name name"
      "code total pass";
  }

  .book-row input:nth-child(1) {
    grid-area: name;
  }

  .book-row input:nth-child(2) {
    grid-area: code;
  }

  .book-row input:nth-child(3) {
    grid-area: total;
  }

  .book-row input:nth-child(4) {
    grid-area: pass;
  }
}

@media (min-width: 720px) {
  .book-grid__head {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.7fr) 68px 62px;
    gap: 6px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-3);
  }
}

/* -------------------------------------------------------------- profiles */
.profile-head {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--lift-1);
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: var(--r-sm);
  border: 1px solid var(--rule-2);
  background: var(--pine-wash);
  color: var(--pine-ink);
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
}

/* the same slot when it holds the student's actual photograph */
.avatar--photo {
  object-fit: cover;
  background: var(--surface-2);
}

.profile-head__text h1 {
  font-size: 20px;
}

.profile-head__text p {
  font-size: 13px;
  color: var(--ink-2);
}

.profile-head__chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.tabs-inline {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin: 14px 0;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface);
  overflow-x: auto;
}

.tabs-inline a {
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
}

.tabs-inline a.is-active {
  background: var(--pine);
  color: var(--pine-fg);
}

/* ---------------------------------------------------------------- login */
.auth-wrap {
  display: flex;
  justify-content: center;
  padding: 26px 0;
}

.auth-card {
  width: 100%;
  max-width: 430px;
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--lift-2);
  overflow: hidden;
}

.auth-card__top {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--rule);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--pine) 12%, transparent), transparent),
    var(--surface);
}

.auth-card__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 10px;
  border-radius: var(--r-sm);
  background: var(--pine);
  color: var(--pine-fg);
  overflow: hidden;
}

/* The school's own crest on the sign-in card, sized to the mark it replaces. */
.auth-card__mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.auth-card__title {
  font-size: 22px;
}

.auth-card__sub {
  font-size: 13px;
  color: var(--ink-2);
  margin-top: 4px;
}

.auth-card__body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-card__foot {
  padding: 12px 20px;
  border-top: 1px solid var(--rule);
  background: var(--surface-2);
  font-size: 12.5px;
  color: var(--ink-3);
}

.auth-card__foot a {
  color: var(--pine);
  font-weight: 600;
}

.auth-card__sep {
  margin: 0 6px;
  color: var(--ink-3);
}

/* Student | Teacher / Staff | Admin — pure CSS so a phone needs no script. */
.auth-tabs {
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
}

.auth-tabs__tab {
  flex: 1;
  position: relative;
  cursor: pointer;
}

.auth-tabs__tab input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.auth-tabs__tab span {
  display: block;
  text-align: center;
  padding: 10px 6px;
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
}

.auth-tabs__tab input:checked + span {
  border-color: var(--pine);
  background: var(--pine);
  color: var(--pine-fg);
}

.auth-tabs__tab input:focus-visible + span {
  outline: 2px solid var(--pine);
  outline-offset: 2px;
}

.steps {
  display: flex;
  gap: 8px;
  margin: 12px 0;
  font-size: 12px;
  color: var(--ink-3);
}

.steps__item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.steps__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--rule-2);
  font-size: 11px;
  font-weight: 700;
}

.steps__item.is-active {
  color: var(--pine);
  font-weight: 650;
}

.steps__item.is-active .steps__num {
  border-color: var(--pine);
  background: var(--pine);
  color: var(--pine-fg);
}

/* ------------------------------------------------------------- calendar */

/* --------------------------------------------- gateway test-send widget */

/* ==========================================================================
   Module screens
   Class names the module views relied on that had no rules at all: blocks
   that should have been grids/flex rows were running together.
   ========================================================================== */

/* ------------------------------------------- fees -> collect (pay counter) */
.pay-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.pay-row__figures {
  min-width: 0;
}

.pay-form {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  background: var(--surface-2);
}

.pay-form__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-amounts {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

@media (min-width: 860px) {
  .pay-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
  }
}

/* ------------------------------------------------- payroll run -> slips */
.slip-list {
  display: grid;
  gap: 12px;
}

.slip {
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--lift-1);
  overflow: hidden;
}

.slip__head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 11px 12px;
  border-bottom: 1px solid var(--rule);
  background: var(--surface-2);
}

.slip__who {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 160px;
}

.slip__who strong {
  font-size: 14.5px;
}

.slip__who .muted {
  font-size: 12px;
}

.slip__net {
  margin-left: auto;
  font-size: 16px;
  font-weight: 650;
}

.slip__figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0 20px;
  padding: 10px 12px;
}

.slip__adjust {
  border-top: 1px solid var(--rule);
}

.slip__adjust > summary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  list-style: none;
}

.slip__adjust > summary::-webkit-details-marker {
  display: none;
}

.slip__adjust[open] > summary {
  border-bottom: 1px solid var(--rule);
  background: var(--surface-2);
}

.slip__form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  padding: 12px;
}

.slip__actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
}

.slip__pay {
  padding: 11px 12px;
  border-top: 1px solid var(--rule);
  background: var(--surface-2);
}

.slip__pay .inline-form {
  width: 100%;
}

/* --------------------------------------------- payments -> bank statement */

/* --------------------------------------------------- media -> file shelf */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.media-card {
  display: flex;
  flex-direction: column;
  margin: 0;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--lift-1);
  overflow: hidden;
}

.media-card__frame {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  background: var(--paper-2);
  overflow: hidden;
}

.media-card__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-card__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--rule-2);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink-3);
}

.media-card__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 10px;
  min-width: 0;
}

.media-card__meta strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.media-card__meta .muted {
  font-size: 11.5px;
}

.media-card__actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

/* ------------------------------------------------ class book -> the diary */
.diary {
  display: grid;
  gap: 14px;
}

.diary__day {
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--surface);
  overflow: hidden;
}

.diary__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule-2);
  background: var(--surface-2);
}

.diary__head strong {
  font-size: 14px;
}

.diary__head .muted {
  font-size: 12px;
}

.diary__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.diary__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule);
}

.diary__item:last-child {
  border-bottom: 0;
}

.diary__when {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-3);
}

.diary__what {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.diary__what .muted {
  font-size: 12.5px;
}

.diary__who {
  font-size: 12px;
  color: var(--ink-3);
}

@media (min-width: 760px) {
  .diary__item {
    grid-template-columns: 120px minmax(0, 1fr) 140px;
    align-items: start;
    gap: 12px;
  }

  .diary__who {
    text-align: right;
  }
}

/* --------------------------------------------- class book -> week picker */
.week-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(62px, 1fr));
  gap: 6px;
  margin-bottom: 14px;
}

.week-strip__day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: var(--tap);
  padding: 6px 4px;
  border: 1px solid var(--rule-2);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink-3);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.week-strip__day b {
  font-size: 14px;
  color: var(--ink);
}

.week-strip__day:hover {
  border-color: var(--ink-3);
}

.week-strip__day.is-active {
  border-color: var(--pine);
  background: var(--pine-wash);
  color: var(--pine-ink);
}

.week-strip__day.is-active b {
  color: var(--pine-ink);
}

/* --------------------------------------------- exams -> printed result */
.result-card__summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.result-card__line {
  display: block;
  min-height: 18px;
  border-bottom: 1px dotted var(--ink-3);
}

.result-card__remarks {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 12px;
}

/* ------------------------------------------- staff -> permission matrix */

/* ------------------------------------------- admission -> live fee chip */
.fee-chip {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  padding: 11px 12px;
  border: 1px dashed var(--rule-2);
  border-radius: var(--r-sm);
  background: var(--brass-wash);
}

.fee-chip__label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--brass-2);
}

.fee-chip__value {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 600;
  color: var(--brass-ink);
}

.fee-chip__note {
  flex-basis: 100%;
  font-size: 12px;
  color: var(--brass);
}

/* ------------------------------------------- admission -> fees at admission */
.adm-fees {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.adm-fees__lines {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
}

.adm-fees__lines:empty {
  display: none;
}

.adm-fees__line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--rule);
}

.adm-fees__line:last-child {
  border-bottom: 0;
}

.adm-fees__line span {
  flex: 1;
  min-width: 0;
}

.adm-fees__line small {
  display: block;
  color: var(--ink-3);
}

.adm-fees__line .input {
  width: 8.5em;
  text-align: right;
}

.adm-fees__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.adm-fees__sum {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding: 10px 12px;
  border: 1px dashed var(--rule-2);
  border-radius: var(--r-sm);
  background: var(--brass-wash);
}

.adm-fees__net b {
  font-size: 18px;
  color: var(--brass-ink);
}

.adm-fees__take {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0;
  padding: 0;
  border: 0;
}

.adm-fees__part {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.adm-fees__part[hidden],
.adm-fees [hidden] {
  display: none;
}

.adm-fees__take--stack {
  flex-direction: column;
}

.adm-fees__line b {
  white-space: nowrap;
}

.adm-fees__take label {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ------------------------------------------------- papers -> question rows */
.q-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* section-first builder --------------------------------------------------- */
.sec-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sec-card {
  padding: 12px;
  border: 1px solid var(--rule-2);
  border-radius: var(--r);
  background: var(--surface);
}

.sec-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.sec-card__title {
  flex: 1 1 180px;
  min-width: 0;
  font-weight: 600;
}

.sec-card__type {
  flex: 0 1 180px;
}

.sec-card__note {
  flex: 1 1 220px;
  min-width: 0;
}

.sec-card__tools {
  display: flex;
  gap: 4px;
}

.sec-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.q-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  background: var(--surface-2);
}

.q-row__main {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
}

.q-row .input {
  width: auto;
}

.q-row .input--figure {
  flex: 0 1 84px;
}

.q-row__text {
  flex: 1 1 240px;
  min-width: 0;
}

.q-row__extras {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
}

.q-row__extras[hidden] {
  display: none !important;
}

.q-opts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 6px;
  flex: 1 1 100%;
}

.q-opt {
  display: flex;
  align-items: center;
  gap: 6px;
}

.q-opt__letter {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--pine);
  color: var(--pine-fg);
  font-size: 11px;
  font-weight: 700;
}

.q-opt .input {
  flex: 1 1 auto;
  min-width: 0;
}

/* ------------------------------------------------ portal -> notice list */
.notice {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--rule);
}

.notice:last-child {
  border-bottom: 0;
}

.notice strong {
  font-size: 14px;
}

.notice p {
  font-size: 13px;
  color: var(--ink-2);
}

/* ------------------------------------------------------ danger zone card */
.danger-zone {
  border-color: var(--bad-line);
}

.danger-zone .card__head {
  background: var(--bad-wash);
  border-bottom-color: var(--bad-line);
}

.danger-zone .card__title {
  color: var(--bad);
}

/* ---------------------------------------------------------- form card */
.card--form {
  max-width: 760px;
}

/* ------------------------------------------------- compose -> SMS preview */
.sms-preview {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--rule-2);
  border-radius: var(--r);
  background: var(--surface-2);
  font-size: 13.5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

@media (max-width: 620px) {
  .q-row .input--figure {
    flex: 1 1 100%;
  }

  .sec-card__title,
  .sec-card__type,
  .sec-card__note {
    flex: 1 1 100%;
  }
}

/* ------------------------------------------------------ hub sections */
.hub-section + .hub-section {
  margin-top: 22px;
}

.hub-section__title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--zone-accent, var(--ink-3));
}

/* ------------------------------------------------------ release notes */
.release-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.release-notes {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.release-notes li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
}

.release-notes .icon {
  flex: none;
  margin-top: 2px;
  color: var(--pine);
}

/* ==========================================================================
   Data Control › Control Center
   A rose-toned workspace: calm when nothing is on hold, loud when something
   is about to run. Every panel is the same card grammar as the rest of IlmOS.
   ========================================================================== */
.dc {
  --dc: var(--hue-danger);
  --dc-wash: var(--bad-wash);
  display: grid;
  gap: 18px;
}

/* ----------------------------------------------------------------- hero */
.dc-hero {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 22px 22px 20px;
  border-radius: var(--r-xl);
  border: 1px solid color-mix(in srgb, var(--dc) 28%, var(--rule));
  background:
    radial-gradient(600px 240px at 100% 0%, color-mix(in srgb, var(--dc) 22%, transparent), transparent 70%),
    radial-gradient(500px 220px at 0% 100%, color-mix(in srgb, var(--pine) 16%, transparent), transparent 70%),
    var(--surface);
  box-shadow: var(--lift-2);
  overflow: hidden;
}

.dc-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--dc) 14%, transparent);
  color: var(--dc);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dc-hero__title {
  margin-top: 10px;
  font-size: clamp(26px, 6vw, 36px);
  font-weight: 850;
  letter-spacing: -0.03em;
}

.dc-hero__sub {
  margin-top: 6px;
  max-width: 64ch;
  color: var(--ink-2);
  font-size: 14px;
}

.dc-hero__chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.dc-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 14px;
  border: 1px solid var(--rule);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  color: var(--ink-2);
}

.dc-chip b {
  display: block;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.1;
}

.dc-chip em {
  display: block;
  font-style: normal;
  font-size: 11.5px;
  color: var(--ink-3);
}

.dc-chip--access .icon {
  color: var(--pine);
}

.dc-chip--live {
  border-color: color-mix(in srgb, var(--dc) 45%, var(--rule));
  background: var(--dc-wash);
  color: var(--dc);
}

.dc-chip--live b {
  color: var(--dc);
}

/* -------------------------------------------------------------- on hold */
.dc-section-head h2 {
  font-size: 17px;
}

.dc-section-head p {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--ink-3);
}

.dc-queue {
  display: grid;
  gap: 10px;
}

.dc-calm {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px dashed var(--ok-line);
  border-radius: var(--r-lg);
  background: var(--ok-wash);
}

.dc-calm__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ok);
  color: var(--on-signal);
  flex: none;
}

.dc-calm b {
  color: var(--ok);
}

.dc-calm p {
  font-size: 13px;
  color: var(--ink-2);
}

.dc-holds {
  display: grid;
  gap: 10px;
}

.dc-hold {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--dc) 35%, var(--rule));
  border-left: 5px solid var(--dc);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--lift-2);
  animation: dc-pulse 2.4s ease-in-out infinite;
}

.dc-hold.is-due {
  animation: none;
  border-left-color: var(--warn);
}

@keyframes dc-pulse {
  0%,
  100% {
    box-shadow: var(--lift-2);
  }

  50% {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--dc) 14%, transparent), var(--lift-2);
  }
}

@media (min-width: 760px) {
  .dc-hold {
    grid-template-columns: minmax(0, 1fr) 180px auto;
  }
}

.dc-hold__kind {
  display: inline-block;
  margin-bottom: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dc-hold__kind--delete {
  background: var(--bad-wash);
  color: var(--bad);
}

.dc-hold__kind--edit {
  background: var(--info-wash);
  color: var(--info);
}

.dc-hold__main h3 {
  font-size: 15px;
}

.dc-hold__main p {
  font-size: 13px;
  color: var(--ink-2);
}

.dc-hold__timer {
  display: grid;
  gap: 6px;
}

.dc-hold__clock {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--dc);
}

.dc-hold.is-due .dc-hold__clock {
  color: var(--warn);
}

.dc-hold__bar {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: var(--paper-2);
  overflow: hidden;
}

.dc-hold__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--dc), var(--warn));
  transition: width 0.9s linear;
}

.dc-hold__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.dc-pin {
  width: 5.5rem;
}

.dc-readonly {
  margin: 0;
}

/* ----------------------------------------------------------- categories */
.dc-cats {
  display: flex;
  gap: 8px;
  padding: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--lift-1);
  scrollbar-width: none;
}

.dc-cats::-webkit-scrollbar {
  display: none;
}

/* A mouse wheel cannot scroll sideways and the scrollbar is hidden, so on a
   mouse the strip wraps onto more lines instead; touch screens keep the swipe. */
@media (hover: hover) and (pointer: fine) {
  .dc-cats {
    flex-wrap: wrap;
    overflow-x: visible;
  }
}

.dc-cat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 9px 13px;
  border-radius: 11px;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 650;
  white-space: nowrap;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.dc-cat:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.dc-cat__count {
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink-3);
  font-size: 11.5px;
  text-align: center;
}

.dc-cat.is-active {
  background: var(--dc);
  color: var(--on-signal);
  box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--dc) 80%, transparent);
}

.dc-cat.is-active .dc-cat__count {
  background: color-mix(in srgb, var(--on-signal) 22%, transparent);
  color: var(--on-signal);
}

/* ---------------------------------------------------------------- panel */
.dc-panel {
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--lift-2);
  scroll-margin-top: calc(var(--topbar-h) + 12px);
}

.dc-panel__head {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--rule);
}

.dc-panel__head h2 {
  font-size: 18px;
}

.dc-panel__head p {
  font-size: 13px;
  color: var(--ink-3);
}

.dc-panel__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--dc-wash);
  color: var(--dc);
  flex: none;
}

.dc-panel__body {
  display: grid;
  gap: 14px;
  padding: 16px 18px 18px;
}

.dc-sub {
  display: block;
  font-size: 12px;
}

.dc-hold-tag {
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: color-mix(in srgb, currentColor 14%, transparent);
  font-size: 10.5px;
  font-weight: 700;
}

.dc-stack {
  display: grid;
  gap: 12px;
}

.dc-subhead {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Day and month tools: three compact cards side by side on a wide screen. */
.dc-tools {
  display: grid;
  gap: 12px;
}

@media (min-width: 900px) {
  .dc-tools {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.dc-tool {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 16px;
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  background: var(--surface-2);
}

.dc-tool h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
}

.dc-tool p {
  margin-bottom: 4px;
  font-size: 12.5px;
  color: var(--ink-3);
}

.dc-tool .btn {
  margin-top: 6px;
  justify-self: start;
}

.dc-tool--danger {
  border-color: var(--bad-line);
  background: color-mix(in srgb, var(--bad-wash) 60%, var(--surface));
}

.dc-tool--danger h3 .icon {
  color: var(--bad);
}

/* -------------------------------------------------------------- history */
.dc-timeline {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dc-timeline__item {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 10px 0 14px;
}

.dc-timeline__item::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 24px;
  bottom: -2px;
  width: 2px;
  background: var(--rule);
}

.dc-timeline__item:last-child::before {
  display: none;
}

.dc-timeline__dot {
  flex: none;
  width: 12px;
  height: 12px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--ink-3);
  box-shadow: 0 0 0 4px var(--surface);
}

.dc-timeline__item--executed .dc-timeline__dot {
  background: var(--bad);
}

.dc-timeline__item--refused .dc-timeline__dot {
  background: var(--warn);
}

.dc-timeline__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 12px;
}

/* ---------------------------------------------------- fees -> fee card */
.fee-card__input {
  width: 7.5rem;
  margin-left: auto;
  text-align: right;
}

/* builder: numbered questions and a per-section tally -------------------- */
.sec-list {
  counter-reset: paper-q;
}

.q-row {
  counter-increment: paper-q;
}

.q-row__main::before {
  content: 'Q' counter(paper-q);
  flex: 0 0 auto;
  min-width: 34px;
  padding: 6px 8px;
  border-radius: var(--r-sm);
  background: var(--pine-wash);
  color: var(--pine);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.sec-card__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  margin: 6px 0 8px;
}

.sec-card__tally {
  font-size: 12px;
  color: var(--ink-2);
}

.q-fig {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 0 1 84px;
}

.q-fig[hidden] {
  display: none;
}

.q-fig .input--figure {
  width: 100%;
}

.q-fig__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3, var(--ink-2));
}

/* The register's controls sit in a fieldset only so a locked day can disable
   them all at once; it adds no box of its own. */
.reg__fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

/* ==========================================================================
   Compact and consistent, everywhere (kept last so it wins)
   ========================================================================== */

/* The menu already says where you are; the zone chip above each title was a
   leftover of the old Operations / Records / Reports split. */
.zone-strip {
  display: none;
}

/* Tables speak one type scale: every cell the same size and weight. Only the
   first column (the record's name) is semi-bold; figures, codes and states in
   the other columns are plain, so no column shouts louder than another. */
.table td {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
}

.table td .code,
.table td .num {
  font-size: 1em;
}

.table td :is(strong, b, .strong) {
  font-weight: 600;
}

.table td:not(:first-child) :is(strong, b, .strong, .pos, .neg) {
  font-weight: 400;
}

@media (max-width: 640px) {
  /* One line under the title is enough on a phone. */
  .page-head__sub {
    display: none;
  }

  .card + .card,
  .section-title + .card {
    margin-top: 10px;
  }

  .table td {
    padding-top: 8px;
    padding-bottom: 8px;
    font-size: 13px;
  }
}

/* A cell breaks between words, never inside one: "waqaskhan" must not become
   "waqask / han" because a neighbouring column wanted room. Only a single
   word longer than the column may break. */
.table td,
.table th {
  overflow-wrap: break-word;
  word-break: normal;
}

/* The row buttons stay on one line. On a phone they show their icon only
   (the word is in the tooltip), so a row stays one line tall. */
.table .row-actions {
  flex-wrap: nowrap;
  gap: 4px;
}

.table .row-actions .row-actions {
  display: contents;
}

@media (max-width: 640px) {
  .table .row-actions .btn {
    gap: 0;
    min-height: 32px;
    padding: 0 8px;
    font-size: 0;
  }
}

/* Timetable: one column per day, days stack on a phone. */
.seg-switch { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.seg-switch .btn { flex: 1 1 160px; justify-content: center; }

/* Who gets what: an event per line, its channels as tick chips that wrap. */
.np-group { font-size: 13px; font-weight: 600; color: var(--ink-3); margin: 14px 0 4px; text-transform: uppercase; letter-spacing: .03em; }
.np-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.np-row__name { flex: 1 1 180px; min-width: 0; font-size: 14px; }
.np-row__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.np-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border: 1px solid var(--rule); border-radius: 999px; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.np-chip:has(input:checked) { background: var(--pine-wash); border-color: var(--pine); color: var(--pine-ink); }

.ttm-dialog { border: 1px solid var(--rule); border-radius: 12px; padding: 16px; width: min(340px, calc(100vw - 32px)); background: var(--surface); color: inherit; }
.ttm-dialog h3 { margin: 0 0 10px; font-size: 16px; }
.ttm-dialog .field { display: block; margin-bottom: 10px; }
.ttm-dialog__actions { display: flex; justify-content: flex-end; gap: 8px; }

/* ==========================================================================
   Phone first: the work (the list, the form) must start on the first screen.
   Stats become one thin swipeable row, the heading one or two lines, the
   filters two to a row, and every card and box gives back its spare padding.
   ========================================================================== */
@media (max-width: 640px) {
  .main { padding: 8px 8px 84px; }

  /* Heading: title, one short note, small buttons beside it. */
  .page-head { margin-bottom: 6px; }
  .page-head__title { font-size: 19px; line-height: 1.2; }
  .page-head__note { font-size: 12px; margin-top: 1px; }
  .page-head__row { flex-wrap: wrap; align-items: center; gap: 6px; }
  .page-head__actions { gap: 6px; flex-wrap: wrap; }
  .page-head__actions .btn { min-height: 32px; padding: 0 10px; font-size: 12.5px; }
  .page-head__back { font-size: 12.5px; margin-bottom: 2px; }

  /* Stats: one thin row you can swipe, not a wall of cards. */
  .stat-grid {
    display: flex;
    gap: 6px;
    margin: 4px 0 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .stat-grid::-webkit-scrollbar { display: none; }
  .stat-grid > * { flex: 0 0 auto; min-width: 104px; max-width: 48vw; margin: 0; }
  .stat { padding: 6px 10px; gap: 0; min-height: 0; }
  .stat__top .icon, .stat__hint { display: none; }
  .stat__label { font-size: 10.5px; }
  .stat__value { font-size: 16px; line-height: 1.25; }

  /* Cards and notes. */
  .card__head { padding: 8px 10px; gap: 8px; }
  .card__title { font-size: 14.5px; }
  .card__note { font-size: 11.5px; margin-top: 1px; }
  .card__body { padding: 10px; }
  .callout { padding: 8px 10px; font-size: 12.5px; gap: 8px; }
  .callout .icon { width: 16px; height: 16px; }

  /* Filters: two to a row, small labels. */
  .filter-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
    gap: 6px 8px;
    padding: 8px;
    margin-bottom: 8px;
  }
  .filter-bar:not(:has(> .field ~ .field)) { grid-template-columns: minmax(0, 1fr); }
  .filter-bar > .filter-bar__row,
  .filter-bar > .filter-count,
  .filter-bar > .field--wide,
  .filter-bar > .field:has(input[type='search']),
  .filter-bar > .field:has(input[name='q']) { grid-column: 1 / -1; }
  .filter-bar > .filter-bar__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 8px; }
  .filter-bar .field { margin: 0; min-width: 0; }
  .filter-bar .field__label { font-size: 10.5px; margin-bottom: 2px; }
  .filter-bar .input { min-height: 38px; padding-top: 4px; padding-bottom: 4px; }
  .filter-bar .btn { min-height: 38px; }
  .filter-count { margin-left: 0; }

  /* Forms: less air between fields, same easy-to-hit boxes. */
  .form-grid { gap: 8px 10px; }
  .field__hint { font-size: 11.5px; }
  .input { min-height: 40px; }
  .section-title { margin: 12px 0 6px; font-size: 13px; }
  .seg-switch { margin-bottom: 8px; gap: 6px; }
  .seg-switch .btn { flex: 1 1 120px; min-height: 36px; font-size: 13px; }
}

/* A wide printed sheet (a month of attendance) scrolls inside its paper on a
   phone instead of pushing the whole page sideways. */
@media (max-width: 640px) {
  .paper { overflow-x: auto; }
}

/* Class order: one line per class, moves on the right. */
.order-list { list-style: none; margin: 0; padding: 0; }
.order-item { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--rule); }
.order-item__n { width: 24px; text-align: right; color: var(--ink-3); font-variant-numeric: tabular-nums; flex: none; }
.order-item__name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.order-item__name small { color: var(--ink-3); font-size: 12px; }
.order-item__moves { display: flex; gap: 4px; flex: none; }
.order-item__moves .btn { min-width: 38px; min-height: 36px; padding: 0 8px; justify-content: center; }
.order-item.is-moved { animation: order-flash .6s ease; }
@keyframes order-flash { from { background: var(--pine-wash); } to { background: transparent; } }
.order-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }

/* School profile → Signature. */
.sig-card { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.sig-card__preview { position: relative; width: 220px; padding-top: 58px; display: flex; flex-direction: column; align-items: center; background: #fff; border: 1px solid var(--rule); border-radius: 8px; padding-bottom: 8px; }
.sig-card__preview img { position: absolute; top: 6px; max-height: 54px; max-width: 90%; object-fit: contain; }
.sig-card__preview .muted { position: absolute; top: 22px; }
.sig-card__line { width: 80%; border-top: 1px solid #1a1c1a; }
.sig-card__title { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #4e5450; margin-top: 3px; }
.sig-card__upload { flex: 1 1 240px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.sig-card__use { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.sig-card__reports { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; width: 100%; }
.sig-card__tick { display: flex; gap: 8px; align-items: center; font-size: 13.5px; }

/* Home → Phone apps: two big download buttons, side by side or stacked. */
.app-downloads { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.app-downloads .btn { flex-wrap: wrap; justify-content: flex-start; min-height: 52px; text-align: left; }
.app-downloads__note { flex-basis: 100%; font-size: 12px; font-weight: 400; color: var(--ink-3); margin-left: 24px; }

/* Timetable entry: the same sheet as the printout, with tappable boxes. The
   class column stays put while a phone scrolls the periods sideways. */
.ttb-day { border: 1px solid var(--rule); border-radius: var(--r); padding: 8px 12px; margin-bottom: 12px; background: var(--surface); }
.ttb-day summary { cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.ttb-day__grid, .ttb-break { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 12px; margin-top: 10px; }
.ttb-day .field { margin: 0; }
.ttb-hint { font-size: 12.5px; margin: 8px 0 0; }
.ttb-box { width: 100%; min-width: 86px; min-height: 46px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border: 1px dashed var(--rule); border-radius: 8px; background: transparent; color: var(--ink-3); cursor: pointer; font: inherit; font-size: 12.5px; padding: 4px; }
.ttb-box.is-set { border-style: solid; color: inherit; background: var(--pine-wash); }
.ttb-box small { font-size: 11.5px; color: var(--ink-3); }
.ttb-box.is-clash { border-color: #d92d20; background: rgba(217, 45, 32, .12); }
.ttb-box.is-clash small { color: #d92d20; font-weight: 600; }
.ttb-note { display: block; margin-top: 12px; }
.ttb-note textarea { width: 100%; }
.ttb-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.ttb-grid th, .ttb-grid td { text-align: center; vertical-align: middle; padding: 4px 3px; }
.ttb-grid thead th { font-size: 12px; white-space: nowrap; }
.ttb-grid th small { display: block; font-weight: 400; font-size: 11px; color: var(--ink-3); }
.ttb-grid .tt-sheet__class { text-align: left; white-space: nowrap; position: sticky; left: 0; z-index: 1; background: var(--surface); }
.ttb-grid .tt-sheet__break { width: 54px; background: rgba(214, 150, 0, .14); color: var(--ink-3); }
.ttb-grid .tt-sheet__changed .ttb-box { border-color: #3b82f6; box-shadow: inset 0 0 0 1px #3b82f6; }
/* The grid's heading is editable: a name and two times per column. */
.ttb-head { min-width: 96px; }
.ttb-head__name { width: 100%; border: 1px solid transparent; border-radius: 6px; background: transparent; color: inherit; font: inherit; font-weight: 600; text-align: center; padding: 2px; }
.ttb-head__name:hover, .ttb-head__name:focus { border-color: var(--rule); }
.ttb-head__time { display: flex; gap: 2px; margin-top: 2px; }
.ttb-head__time input { width: 50%; min-width: 0; font-size: 11px; padding: 1px; border: 1px solid var(--rule); border-radius: 6px; background: transparent; color: var(--ink-3); }

/* ==========================================================================
   In / Out attendance (modules/inout) and ID cards
   Colour language: green on time · grey late or left early · red not in or
   absent · blue leave. Every chip also says it in words.
   ========================================================================== */
.io-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border: 1px solid var(--rule-2);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.io-chip--ontime {
  border-color: var(--ok-line);
  background: var(--ok-wash);
  color: var(--ok);
}

.io-chip--late {
  border-color: var(--rule-2);
  background: var(--paper-2);
  color: var(--ink-2);
}

.io-chip--absent {
  border-color: var(--bad-line);
  background: var(--bad-wash);
  color: var(--bad);
}

.io-chip--leave {
  border-color: var(--info);
  background: var(--info-wash);
  color: var(--info);
}

.io-chip--none {
  border-style: dashed;
  background: transparent;
  color: var(--ink-3);
}

.io-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 12px;
}

.io-empty {
  margin: 0;
  padding: 14px;
  color: var(--ink-3);
  font-size: 14px;
}

/* scanner ------------------------------------------------------------------ */
.io-scan {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr);
  gap: 16px;
  align-items: start;
}

.io-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.io-mode__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  border: 2px solid var(--rule-2);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--ink-2);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.io-mode__btn[aria-pressed="true"] {
  border-color: var(--pine);
  background: var(--pine);
  color: var(--pine-fg);
}

.io-scan__camera {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: #0b0d18;
}

.io-scan__camera video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.io-scan__frame {
  display: none;
  position: absolute;
  inset: 14% 22%;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.28);
}

.io-scan.is-live .io-scan__frame {
  display: block;
}

.io-scan__idle {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  color: #fff;
  text-align: center;
}

.io-scan__idle p {
  max-width: 28ch;
  margin: 0;
}

.io-scan__idle[hidden],
.io-scan__queue[hidden],
.io-row__time[hidden],
.io-scan__tools [hidden] {
  display: none;
}

.io-scan__tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
}

.io-scan__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.io-scan__device {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-size: 13px;
  color: var(--ink-2);
}

.io-scan__device .input {
  width: 130px;
  min-height: 34px;
}

.io-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 2px solid var(--rule);
  border-radius: var(--r);
  background: var(--surface);
}

.io-result--ok {
  border-color: var(--ok);
  background: var(--ok-wash);
}

.io-result--late {
  border-color: var(--ink-3);
  background: var(--paper-2);
}

.io-result--warn {
  border-color: var(--warn);
  background: var(--warn-wash);
}

.io-result--bad {
  border-color: var(--bad);
  background: var(--bad-wash);
}

.io-result.is-fresh {
  animation: io-flash 0.45s ease-out;
}

@keyframes io-flash {
  from {
    transform: scale(1.03);
  }

  to {
    transform: none;
  }
}

.io-result__photo {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 58px;
  height: 58px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink-2);
  font-weight: 800;
}

.io-result__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.io-result__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.io-result__text strong {
  font-size: 20px;
  line-height: 1.2;
}

.io-result--ok .io-result__text strong {
  color: var(--ok);
}

.io-result--late .io-result__text strong {
  color: var(--ink-2);
}

.io-result--warn .io-result__text strong {
  color: var(--warn);
}

.io-result--bad .io-result__text strong {
  color: var(--bad);
}

.io-result__text small {
  color: var(--ink-2);
  font-size: 13px;
}

.io-scan__typed {
  margin-top: 12px;
}

.io-scan__typed-row {
  display: flex;
  gap: 8px;
}

.io-scan__queue {
  margin: 8px 0 0;
  color: var(--warn);
  font-size: 13px;
  font-weight: 600;
}

.io-scan__side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.io-stats {
  display: grid;
  gap: 10px;
}

.io-stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--surface);
}

.io-stat__label {
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.io-stat__value {
  font-size: 28px;
  font-weight: 800;
}

.io-stat__line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.io-scan__h {
  margin: 4px 0 0;
  font-size: 14px;
}

.io-recent {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 420px;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.io-recent__row {
  display: flex;
  flex-direction: column;
  padding: 8px 10px;
  border-left: 4px solid var(--ok);
  border-radius: var(--r-sm);
  background: var(--surface);
}

.io-recent__row--late {
  border-left-color: var(--ink-3);
}

.io-recent__name {
  font-size: 14px;
  font-weight: 600;
}

.io-recent__meta,
.io-recent__empty {
  color: var(--ink-3);
  font-size: 12.5px;
}

@media (max-width: 860px) {
  .io-scan {
    grid-template-columns: 1fr;
  }

  .io-scan__device {
    margin-left: 0;
  }
}

/* by hand ------------------------------------------------------------------ */
.io-switches {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 12px;
}

.io-switches__class {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 200px;
}

.io-row--locked {
  background: var(--surface-2);
}

.io-row__done {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.io-row__done small {
  color: var(--ink-3);
  font-size: 11.5px;
}

.io-row__pick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.io-row__time {
  width: 120px;
  min-height: 40px;
}

.seg__opt[data-state="ontime"]:has(input:checked) {
  background: var(--ok);
}

.seg__opt[data-state="late"]:has(input:checked),
.seg__opt[data-state="early"]:has(input:checked) {
  background: var(--ink-3);
}

.seg__opt[data-state="absent"]:has(input:checked) {
  background: var(--bad);
}

.seg__opt[data-state="leave"]:has(input:checked) {
  background: var(--info);
}

@media (max-width: 560px) {
  .reg__row.io-row {
    grid-template-columns: 38px minmax(0, 1fr);
    row-gap: 7px;
  }

  .io-row__pick,
  .io-row__done {
    grid-column: 2 / -1;
    align-items: flex-start;
    justify-content: flex-start;
  }
}

/* day list, cards list ------------------------------------------------------ */
.io-day {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.io-day__row {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: 10px 14px;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-left: 4px solid var(--rule-2);
  border-radius: var(--r);
  background: var(--surface);
}

.io-day__row--ontime {
  border-left-color: var(--ok);
}

.io-day__row--late {
  border-left-color: var(--ink-3);
}

.io-day__row--none,
.io-day__row--absent {
  border-left-color: var(--bad);
}

.io-day__row--leave {
  border-left-color: var(--info);
}

.io-day__who {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.io-day__who span {
  color: var(--ink-3);
  font-size: 12.5px;
  overflow-wrap: anywhere;
}

.io-day__mark {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.io-day__mark small {
  color: var(--ink-3);
  font-size: 11.5px;
}

.io-day__label {
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.io-day__edited {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--warn);
  font-size: 12px;
}

.io-fix {
  grid-column: 1 / -1;
}

.io-fix summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--pine);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.io-fix__form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.io-fix__field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--ink-2);
  font-size: 12px;
}

.io-fix__field--wide {
  flex: 1 1 220px;
}

.io-fix__remove {
  margin-top: 8px;
}

.idc-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

@media (max-width: 720px) {
  .io-day__row {
    grid-template-columns: 1fr 1fr;
  }

  .io-day__who,
  .idc-actions {
    grid-column: 1 / -1;
  }

  .idc-actions {
    justify-content: flex-start;
  }
}

/* timings ------------------------------------------------------------------ */
.io-classtimes {
  display: flex;
  flex-direction: column;
}

.io-classtime {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
}

.io-classtime__name {
  min-width: 110px;
  align-self: center;
}

.io-classtime__field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--ink-2);
  font-size: 12px;
}

.io-classtime__field .input {
  width: 130px;
}

/* report ------------------------------------------------------------------- */
.io-sheet__sub {
  display: block;
  color: var(--ink-3);
  font-size: 8pt;
}

.io-sheet--late {
  background: #e4e6ee;
}

.io-sheet--absent {
  color: #c01c43;
  font-weight: 700;
}

/* ID cards: bank-card size (85.6 x 54 mm), ten to an A4 page ---------------- */
.idc-paper {
  page: idcards;
}

@page idcards {
  size: A4 portrait;
  margin: 8mm;
}

.idc-sheet {
  display: grid;
  grid-template-columns: repeat(auto-fit, 85.6mm);
  justify-content: center;
  gap: 2.5mm 6mm;
  overflow-x: auto;
}

.idc {
  display: flex;
  flex-direction: column;
  width: 85.6mm;
  height: 54mm;
  overflow: hidden;
  border: 0.3mm solid var(--rule-2);
  border-radius: 3mm;
  background: #fff;
  color: #13152b;
  font-size: 2.6mm;
  line-height: 1.25;
  break-inside: avoid;
  page-break-inside: avoid;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.idc__band {
  display: flex;
  align-items: center;
  gap: 2mm;
  height: 11mm;
  padding: 0 2.5mm;
  background: var(--pine);
  color: var(--pine-fg);
}

.idc__logo,
.idc__crest {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 7.5mm;
  height: 7.5mm;
  border-radius: 50%;
  background: #fff;
  object-fit: contain;
}

.idc__crest {
  color: var(--pine);
  font-size: 2.2mm;
  font-weight: 800;
}

.idc__school {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* A long school name takes two lines rather than losing its end. */
.idc__school strong {
  font-size: 3mm;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.idc__school span {
  font-size: 2.2mm;
  opacity: 0.92;
}

.idc__body {
  display: grid;
  flex: 1;
  grid-template-columns: 17mm minmax(0, 1fr) 25mm;
  align-items: center;
  gap: 2mm;
  padding: 1.5mm 2.5mm;
}

.idc__photo {
  display: grid;
  place-items: center;
  width: 17mm;
  height: 21mm;
  overflow: hidden;
  border-radius: 1.5mm;
  background: var(--pine-wash);
  color: var(--pine-ink);
  font-size: 5mm;
  font-weight: 800;
}

.idc__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.idc__info {
  display: flex;
  flex-direction: column;
  gap: 0.8mm;
  min-width: 0;
}

.idc__name {
  font-size: 3.4mm;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.idc__line {
  color: #13152b;
  font-size: 2.85mm;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.idc__line b {
  font-weight: 800;
}

.idc__qr {
  width: 25mm;
  height: 25mm;
}

.idc__qr svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* A clear strip above the card's rounded edge, never touching it. */
.idc__foot {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 2mm;
  min-height: 5.5mm;
  padding: 1.2mm 3mm 1.8mm;
  border-top: 0.3mm solid #e3e6f0;
  color: #13152b;
  font-size: 2.3mm;
  line-height: 1.2;
}

.idc__foot b {
  font-weight: 800;
}

@media print {
  .idc-sheet {
    grid-template-columns: repeat(2, 85.6mm);
    overflow: visible;
  }
}
/* monthly In/Out register: two lines a person, 1st above 2nd -------------- */
.io-reg .io-reg__cell {
  min-width: 4.2mm;
  padding: 1px 0;
  font-weight: 700;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.io-reg__which {
  color: var(--ink-3);
  font-size: 7pt;
  white-space: nowrap;
}

.io-reg__out td {
  border-bottom: 1px solid var(--rule-2);
}

/* Paper is white in either theme, so the register's colours are fixed. */
.io-reg--ok {
  color: #047857;
}

.io-reg--late {
  background: #e4e6ee;
  color: #454a66;
}

.io-reg--bad {
  background: #ffe8ee;
  color: #c01c43;
}

.io-reg--leave {
  background: #e3edff;
  color: #1d4ed8;
}

.io-reg--none,
.io-reg--off {
  color: #5d627e;
}

.io-reg__sun {
  background: #f4f5f9;
}

.io-reg__key {
  margin: 8px 0 0;
  color: var(--ink-2);
  font-size: 8.5pt;
}
/* portal: today's In/Out line for a student or parent --------------------- */
.io-portal-today {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

/* phone notifications switch (portal) ------------------------------------- */
.push-card__body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.push-card__mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--pine-wash);
  color: var(--pine-ink);
}

.push-card__text {
  display: flex;
  flex: 1 1 260px;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  color: var(--ink-2);
  font-size: 13.5px;
}

.push-card__text strong {
  color: var(--ink);
  font-size: 15px;
}

.push-card__steps {
  margin: 4px 0 0;
  padding-left: 18px;
}

.push-card__steps[hidden],
.push-card__actions [hidden] {
  display: none;
}

.push-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* parent poster: one QR that opens the school's portal ----------------------- */
.poster {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 170mm;
  margin: 0 auto;
  color: #13152b;
  text-align: center;
}

.poster__head {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
}

.poster__logo,
.poster__crest {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--pine);
  color: var(--pine-fg);
  font-size: 20px;
  font-weight: 800;
  object-fit: contain;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.poster__logo {
  background: #fff;
}

.poster__school {
  margin: 0;
  font-size: 24px;
}

.poster__lead {
  margin: 2px 0 0;
  color: #454a66;
  font-size: 16px;
}

.poster__qr {
  width: 78mm;
  height: 78mm;
  padding: 3mm;
  border: 0.5mm solid #13152b;
  border-radius: 4mm;
  background: #fff;
}

.poster__qr svg {
  display: block;
  width: 100%;
  height: 100%;
}

.poster__address {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.poster__steps {
  margin: 0;
  padding-left: 24px;
  font-size: 15px;
  line-height: 1.6;
  text-align: left;
}

.poster__steps--ur {
  padding-right: 24px;
  padding-left: 0;
  font-size: 17px;
  line-height: 2;
  text-align: right;
}

.poster__tip {
  margin: 0;
  color: #454a66;
  font-size: 13px;
}

/* parent sign-in with the school card -------------------------------------- */
.cardpin__who {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--pine-wash);
  color: var(--pine-ink);
  font-size: 14px;
}

.cardpin__input {
  font-size: 22px;
  letter-spacing: 0.5em;
  text-align: center;
}

.cardpin__note {
  margin: 0;
  color: var(--ink-3);
  font-size: 12.5px;
  text-align: center;
}

.idc-login {
  grid-column: 1 / -1;
}

.idc-login summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--pine);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.idc-login__forms {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.idc-login__forms .input {
  width: 110px;
}

/* public demo school -------------------------------------------------------- */
.demo-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  margin: 0 0 14px;
  padding: 9px 14px;
  border: 1px solid var(--warn-line);
  border-radius: var(--r);
  background: var(--warn-wash);
  color: var(--warn);
  font-size: 13px;
}

.demo-bar a {
  color: var(--warn);
  font-weight: 700;
  text-decoration: underline;
}

.demo-pick {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 20px 4px;
  padding: 14px;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--pine-wash);
}

.demo-pick__title {
  color: var(--pine-ink);
  font-size: 15px;
}

.demo-pick__note {
  color: var(--ink-2);
  font-size: 12.5px;
}

.demo-pick__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.demo-pick__grid form {
  margin: 0;
}

.demo-pick__btn {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid var(--rule-2);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.demo-pick__btn:hover {
  border-color: var(--pine);
}

.demo-pick__btn b {
  font-size: 14px;
}

.demo-pick__btn small {
  color: var(--ink-3);
  font-size: 11.5px;
}

.demo-pick__cta {
  color: var(--pine);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

/* portal fee ledger ---------------------------------------------------------- */
.fee-ledger__last {
  margin: 0 0 12px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 13.5px;
}

.demo-bar__views {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.demo-bar a.demo-bar__view {
  padding: 3px 10px;
  border: 1px solid var(--warn-line);
  border-radius: 999px;
  background: var(--surface);
  font-weight: 600;
  text-decoration: none;
}

.demo-bar a.demo-bar__view.is-on {
  background: var(--warn);
  color: var(--on-signal);
}
