/* ضبط النظام+ — an administration system for a girls' primary school.

   The look is deliberately unlike a children's app: this is paperwork, and the
   people using it are reading tables, not playing. Calm teal, generous white
   paper, quiet lines, and type large enough to read on a phone held in one
   hand while the other holds a register.

   Right-to-left throughout. Every offset uses a logical property (inline-start
   rather than left) so nothing has to be mirrored by hand. */

:root {
  --teal-900: #06373f;
  --teal-800: #0a5260;
  --teal-700: #0e6e7d;      /* the brand */
  --teal-600: #14838f;
  --teal-500: #2f9dab;
  --teal-200: #b7dbe1;
  --teal-100: #dcedf0;
  --teal-50:  #f0f8f9;

  --gold:     #b07d1a;
  --gold-soft:#fdf3dd;

  --ink:      #16262a;
  --ink-soft: #5c7076;
  --ink-faint:#8ba0a6;
  --line:     #d7e3e6;
  --line-soft:#e8f0f2;
  --paper:    #ffffff;
  --bg:       #f3f7f8;

  --ok:        #14764f;
  --ok-soft:   #e2f4ec;
  --warn:      #9a6612;
  --warn-soft: #fcf1da;
  --danger:    #b5342a;
  --danger-soft:#fbe9e7;

  --radius:    14px;
  --radius-sm: 10px;
  --shadow:    0 1px 2px rgba(6, 55, 63, .06), 0 6px 18px rgba(6, 55, 63, .06);
  --shadow-lg: 0 10px 34px rgba(6, 55, 63, .14);
  --tap: 44px;

  --font: 'Baloo Bhaijaan 2', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  padding-bottom: 48px;
}

h1, h2, h3 { color: var(--teal-900); line-height: 1.3; margin: 0 0 .5rem; font-weight: 700; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.2rem; margin-top: 1.5rem; }
h3 { font-size: 1.02rem; }
p  { margin: 0 0 .7rem; }
a  { color: var(--teal-700); text-underline-offset: 3px; }
a:hover { color: var(--teal-800); }
small { font-size: .82rem; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 14px; }
.wrap-narrow { max-width: 620px; }
.muted { color: var(--ink-soft); }
.faint { color: var(--ink-faint); }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.ltr { direction: ltr; unicode-bidi: isolate; }

/* ---------- app bar ---------- */
.appbar {
  background: var(--teal-800);
  color: #fff;
  position: sticky; top: 0; z-index: 30;
  box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 2px 10px rgba(6,55,63,.22);
}
.appbar .wrap { display: flex; align-items: center; gap: 12px; min-height: 58px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-width: 0; }
.brand:hover, .brand:focus { color: #fff; }
.brand img { height: 34px; width: auto; flex: none; }
.brand-name { font-weight: 700; font-size: 1.14rem; white-space: nowrap; }
.brand-sub { display: block; font-size: .72rem; font-weight: 500; opacity: .78; line-height: 1.2; }
.appbar .spacer { flex: 1; }
.appbar-actions { display: flex; align-items: center; gap: 8px; }
/* The generic a:hover turns links dark teal, which on the dark teal app bar
   made the signed-in name vanish under the cursor. */
.who { font-size: .82rem; opacity: .9; text-align: start; line-height: 1.25; color: #fff; text-decoration: none; }
.who:hover, .who:focus { color: #fff; opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.who b { display: block; font-weight: 700; font-size: .92rem; }
/* On a phone the name and the school name fight over the same 40 pixels.
   The name loses: it is on the account page, one tap away. */
@media (max-width: 620px) {
  .who { display: none; }
  .brand-sub { display: none; }
  .appbar .wrap { min-height: 52px; }
  .nav { top: 52px; }
}

.chip-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 36px; padding: 0 13px;
  border-radius: var(--radius-sm); border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.12); color: #fff;
  font-family: inherit; font-size: .86rem; font-weight: 600;
  text-decoration: none; cursor: pointer;
}
.chip-btn:hover { background: rgba(255,255,255,.22); color: #fff; }

/* ---------- navigation ---------- */
.nav { background: var(--teal-700); position: sticky; top: 58px; z-index: 25; }
.nav .wrap {
  display: flex; gap: 2px; overflow-x: auto;
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.nav .wrap::-webkit-scrollbar { display: none; }
.nav a {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  min-height: 42px; padding: 0 14px;
  color: rgba(255,255,255,.86); text-decoration: none;
  font-size: .9rem; font-weight: 600;
  border-bottom: 3px solid transparent;
}
.nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav a.active { color: #fff; border-bottom-color: var(--gold); background: rgba(0,0,0,.14); }
.count {
  display: inline-block; min-width: 20px; padding: 0 6px;
  background: var(--gold); color: #fff;
  border-radius: 999px; font-size: .74rem; font-weight: 700; line-height: 19px; text-align: center;
}

/* ---------- page furniture ---------- */
main.wrap { padding-top: 18px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-bottom: 14px; }
.page-head h1 { margin: 0; }
.page-head .spacer { flex: 1; }
.page-head .sub { color: var(--ink-soft); font-size: .9rem; }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 16px;
}
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: -16px -16px 14px; padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--teal-50);
  border-radius: var(--radius) var(--radius) 0 0;
}
.card-head h2, .card-head h3 { margin: 0; }
.card-head .spacer { flex: 1; }
.card.flat { box-shadow: none; }

.grid { display: grid; gap: 14px; }
.grid.two   { grid-template-columns: 1fr; }
.grid.three { grid-template-columns: 1fr; }
@media (min-width: 760px) {
  .grid.two   { grid-template-columns: 1fr 1fr; }
  .grid.three { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- figures ---------- */
.stats { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 14px;
}
.stat .n { font-size: 1.7rem; font-weight: 700; color: var(--teal-800); line-height: 1.15; }
.stat .k { font-size: .84rem; color: var(--ink-soft); }
.stat.ok     .n { color: var(--ok); }
.stat.warn   .n { color: var(--warn); }
.stat.danger .n { color: var(--danger); }
a.stat { text-decoration: none; display: block; }
a.stat:hover { border-color: var(--teal-500); }

/* ---------- the day's board ---------- */
.board-stats .stat { padding: 16px 18px; }
.board-stats .n { font-size: 2.6rem; }
.board-stats .k { font-size: .95rem; font-weight: 600; }
@media (min-width: 900px) { .board-stats .n { font-size: 3.2rem; } }
.board-note { margin: -4px 0 16px; font-size: .9rem; line-height: 1.8; }
.board-note b { color: var(--teal-800); }

/* ---------- tables ---------- */
.table-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper);
}
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
thead th {
  background: var(--teal-700); color: #fff;
  font-weight: 600; font-size: .86rem; text-align: start;
  padding: 10px 11px; white-space: nowrap;
  position: sticky; top: 0;
}
tbody td, tbody th {
  padding: 9px 11px; border-top: 1px solid var(--line-soft);
  text-align: start; vertical-align: middle; font-weight: 400;
}
tbody tr:nth-child(even) { background: #fbfdfd; }
tbody tr:hover { background: var(--teal-50); }
tfoot td, tfoot th {
  padding: 10px 11px; border-top: 2px solid var(--teal-200);
  background: var(--teal-50); font-weight: 700; color: var(--teal-900);
}
td.center, th.center { text-align: center; }
td.tight, th.tight { width: 1%; white-space: nowrap; }
.table-note { padding: 18px; text-align: center; color: var(--ink-soft); }

/* ---------- status pills ---------- */
.pill {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: .78rem; font-weight: 600; white-space: nowrap;
  background: var(--line-soft); color: var(--ink-soft);
}
.pill.ok      { background: var(--ok-soft);     color: var(--ok); }
.pill.warn    { background: var(--warn-soft);   color: var(--warn); }
.pill.danger  { background: var(--danger-soft); color: var(--danger); }
.pill.info    { background: var(--teal-100);    color: var(--teal-800); }
.pill.gold    { background: var(--gold-soft);   color: var(--gold); }

/* ---------- forms ---------- */
.field { margin-bottom: 13px; }
.field > label, .label {
  display: block; font-size: .87rem; font-weight: 600;
  color: var(--teal-900); margin-bottom: 5px;
}
.hint { display: block; font-size: .8rem; color: var(--ink-soft); margin-top: 4px; font-weight: 400; }

input[type=text], input[type=password], input[type=number], input[type=date],
input[type=time], input[type=email], input[type=tel], input[type=search],
input[type=file], select, textarea {
  width: 100%; min-height: var(--tap);
  padding: 9px 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--paper); color: var(--ink);
  font-family: inherit; font-size: 1rem;
}
textarea { min-height: 84px; resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--teal-600);
  box-shadow: 0 0 0 3px rgba(20, 131, 143, .16);
}
input[readonly], input:disabled, select:disabled, textarea:disabled {
  background: var(--line-soft); color: var(--ink-soft);
}
select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%),
                    linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%);
  background-position: 14px calc(50% + 1px), 19px calc(50% + 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-left: 34px;          /* physical: the arrow sits on the left in RTL */
  padding-right: 12px;
}
.form-row { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 680px) {
  .form-row.two   { grid-template-columns: 1fr 1fr; }
  .form-row.three { grid-template-columns: repeat(3, 1fr); }
}
fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin: 0 0 14px; }
legend { font-size: .86rem; font-weight: 700; color: var(--teal-800); padding: 0 6px; }

.check { display: flex; align-items: flex-start; gap: 9px; padding: 7px 0; font-size: .94rem; }
.check input { width: 20px; height: 20px; min-height: 0; margin: 2px 0 0; flex: none; accent-color: var(--teal-700); }
.check-grid { display: grid; gap: 2px 14px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .check-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .check-grid.wide { grid-template-columns: repeat(4, 1fr); } }

/* the four-way attendance choice, as a row of buttons rather than a dropdown */
.choice { display: flex; gap: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label {
  flex: 1; text-align: center; padding: 9px 4px; cursor: pointer;
  font-size: .86rem; font-weight: 600; color: var(--ink-soft);
  border-inline-start: 1px solid var(--line); background: var(--paper);
  min-height: var(--tap); display: flex; align-items: center; justify-content: center;
  user-select: none;
}
.choice label:first-of-type { border-inline-start: none; }
.choice input:checked + label { background: var(--teal-700); color: #fff; }
.choice input:focus-visible + label { box-shadow: inset 0 0 0 3px rgba(20,131,143,.35); }
.choice.compact label { padding: 6px 4px; min-height: 36px; font-size: .8rem; }
.choice input[value="absent"]:checked  + label { background: var(--danger); }
.choice input[value="late"]:checked    + label { background: var(--warn); }
.choice input[value="excused"]:checked + label { background: var(--teal-500); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: var(--tap); padding: 0 18px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  background: var(--teal-700); color: #fff;
  font-family: inherit; font-size: .95rem; font-weight: 600;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--teal-800); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.secondary { background: var(--paper); color: var(--teal-800); border-color: var(--line); }
.btn.secondary:hover { background: var(--teal-50); border-color: var(--teal-500); }
.btn.ghost { background: transparent; color: var(--teal-700); border-color: transparent; }
.btn.ghost:hover { background: var(--teal-50); }
.btn.danger { background: var(--danger); }
.btn.danger:hover { background: #96271e; }
.btn.small { min-height: 34px; padding: 0 12px; font-size: .85rem; }
.btn.block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.btn-row.end { justify-content: flex-end; }
.inline-form { display: inline; }

/* a sticky bar so the save button is always in reach on a long register */
.sticky-actions {
  position: sticky; bottom: 0; z-index: 12;
  margin: 16px -14px -48px; padding: 11px 14px;
  background: rgba(255,255,255,.96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(6px);
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
}
.sticky-actions .spacer { flex: 1; }
.tally-line { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .9rem; }
.tally-line b { color: var(--teal-800); }

/* ---------- flashes and notes ---------- */
.flash {
  border: 1px solid var(--line); border-inline-start: 4px solid var(--teal-600);
  background: var(--paper); border-radius: var(--radius-sm);
  padding: 11px 14px; margin-bottom: 12px; font-size: .94rem;
}
.flash.ok      { border-inline-start-color: var(--ok);     background: var(--ok-soft); }
.flash.warning { border-inline-start-color: var(--warn);   background: var(--warn-soft); }
.flash.error   { border-inline-start-color: var(--danger); background: var(--danger-soft); }
.note {
  background: var(--teal-50); border: 1px solid var(--teal-200);
  border-radius: var(--radius-sm); padding: 11px 14px; font-size: .9rem;
  color: var(--teal-900); margin-bottom: 14px;
}
.note.warn { background: var(--warn-soft); border-color: #e9d5ab; color: #6c4a10; }
.empty { text-align: center; padding: 34px 16px; color: var(--ink-soft); }
.empty h3 { color: var(--ink-soft); }

/* ---------- toolbars, filters, paging ---------- */
.toolbar {
  display: flex; flex-wrap: wrap; gap: 9px; align-items: flex-end;
  margin-bottom: 14px;
}
.toolbar .field { margin: 0; }
.toolbar .grow { flex: 1 1 200px; }
.toolbar .spacer { flex: 1; }

.pager { display: flex; gap: 7px; align-items: center; justify-content: center; margin: 16px 0; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 38px; min-height: 38px; padding: 0 11px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--paper); text-decoration: none; font-size: .9rem;
}
.pager .current { background: var(--teal-700); color: #fff; border-color: var(--teal-700); font-weight: 700; }
.pager .disabled { opacity: .45; }

.date-nav { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.date-nav input[type=date] { width: auto; min-width: 165px; }

/* ---------- the school's crest ---------- */
.school-mark { text-align: center; }
.school-mark img {
  height: 120px; width: auto; max-width: 100%; object-fit: contain;
}
@media (max-width: 480px) { .school-mark img { height: 96px; } }

/* ---------- a generated document ---------- */
.doc {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; margin-bottom: 18px;
}
.doc-title { text-align: center; margin: 14px 0 4px; }
.doc-title h1 { font-size: 1.3rem; margin: 0; }
.doc-title .sub { color: var(--ink-soft); font-size: .95rem; }
.doc-meta {
  display: flex; justify-content: center; gap: 26px; flex-wrap: wrap;
  margin: 12px 0 16px; font-size: .95rem;
}
.doc-meta b { color: var(--teal-900); }
.doc table { font-size: .9rem; }
.doc thead th { background: var(--teal-700); }
.doc .table-wrap { border-radius: var(--radius-sm); }
.doc-sign {
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  margin-top: 26px; padding-top: 14px; border-top: 1px dashed var(--line);
  font-size: .92rem;
}
.doc-sign div { min-width: 210px; }
.doc-sign .line { display: inline-block; min-width: 150px; border-bottom: 1px dotted var(--ink-faint); }
.doc-foot { margin-top: 16px; text-align: center; color: var(--ink-faint); font-size: .8rem; }

/* ---------- the two big choices on the teacher's home ---------- */
.big-action {
  display: block; text-decoration: none; color: inherit;
  border-color: var(--teal-200);
}
.big-action:hover { border-color: var(--teal-600); box-shadow: var(--shadow-lg); }
.big-action h2 { margin-top: 0; }
.big-action .btn { margin-top: 6px; pointer-events: none; }

/* ---------- picking a class ---------- */
.class-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
}
.class-tile {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 12px 8px; min-height: 104px; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--paper); text-decoration: none; color: inherit;
}
.class-tile:hover { border-color: var(--teal-600); background: var(--teal-50); color: inherit; }
.class-tile .code { font-size: 1.5rem; font-weight: 700; color: var(--teal-800); line-height: 1.1; }
.class-tile .meta { font-size: .78rem; color: var(--ink-soft); }
.class-tile.done { background: var(--ok-soft); border-color: #bfe3d3; }
.class-tile[hidden] { display: none; }

/* ---------- one editable line of the duty roster ---------- */
.duty-row {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  padding: 7px 0; border-top: 1px solid var(--line-soft);
}
.duty-row:first-of-type { border-top: none; }
.duty-row input[type=text] { flex: 1 1 130px; min-width: 0; min-height: 38px; font-size: .9rem; }

/* ---------- back ---------- */
.backbar { margin: 12px 0 2px; }
.btn-back {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 38px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--paper); color: var(--teal-800);
  font-family: inherit; font-size: .9rem; font-weight: 600;
  text-decoration: none; cursor: pointer;
}
.btn-back:hover { background: var(--teal-50); border-color: var(--teal-500); color: var(--teal-900); }
.btn-back::before { content: "→"; font-size: 1.05rem; line-height: 1; }

/* ---------- roll of names ---------- */
.roll { list-style: none; margin: 0; padding: 0; }
.roll li {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 11px 0; border-top: 1px solid var(--line-soft);
}
.roll li:first-child { border-top: none; }
.roll .who-name { flex: 1 1 180px; font-weight: 600; min-width: 0; }
.roll .who-name small { display: block; font-weight: 400; color: var(--ink-soft); }
.roll .who-mark { flex: 1 1 280px; max-width: 420px; }
.roll .n { color: var(--ink-faint); font-size: .84rem; min-width: 28px; }

/* ---------- login ---------- */
.auth-page { max-width: 470px; margin: 28px auto; padding: 0 14px; }
.auth-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 22px; }
.auth-card .school-mark { margin-bottom: 6px; }
.auth-title { text-align: center; margin: 10px 0 4px; }
.auth-title h1 { font-size: 1.45rem; margin: 0; }
.auth-title p { color: var(--ink-soft); font-size: .92rem; margin: 2px 0 0; }
.auth-foot { text-align: center; margin-top: 16px; font-size: .88rem; color: var(--ink-soft); }

/* ---------- "how to install this on your phone" ---------- */
.install-help {
  margin-top: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.install-help > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px; min-height: var(--tap);
  font-weight: 700; font-size: 1.02rem; color: var(--teal-700);
}
.install-help > summary::-webkit-details-marker { display: none; }
.install-help > summary::after {
  content: "+";
  margin-inline-start: auto;
  font-size: 1.5rem; font-weight: 700; line-height: 1;
  color: var(--teal-600);
}
.install-help[open] > summary::after { content: "–"; }
.install-help > summary:hover { background: var(--teal-50); }
.install-help[open] > summary { border-bottom: 1px solid var(--line-soft); }
.install-body { padding: 4px 20px 18px; }
.install-body h3 { color: var(--teal-700); margin: 16px 0 6px; font-size: 1.02rem; }
.install-body ol { margin: 0; padding-inline-start: 22px; }
.install-body li { margin-bottom: 7px; line-height: 1.6; }
.install-body p { margin-top: 14px; }

/* ---------- footer ---------- */
.site-footer {
  margin-top: 30px; padding: 16px 14px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft); font-size: .84rem; text-align: center;
  display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center;
}

/* ---------- printing ---------- */
@media print {
  @page { size: A4 portrait; margin: 12mm 10mm; }
  body { background: #fff; padding: 0; font-size: 11pt; }
  .appbar, .nav, .site-footer, .no-print, .sticky-actions, .flash, .toolbar, .pager { display: none !important; }
  main.wrap { padding: 0; max-width: none; }
  .wrap { padding: 0; max-width: none; }
  .doc { border: none; box-shadow: none; border-radius: 0; padding: 0; margin: 0; }
  .school-mark img { height: 70px; }
  .doc + .doc { page-break-before: always; }
  .table-wrap { border: none; overflow: visible; }
  table { font-size: 10pt; }
  thead { display: table-header-group; }            /* repeat headings per page */
  tr { page-break-inside: avoid; }
  thead th {
    background: #0e6e7d !important; color: #fff !important;
    position: static;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  tfoot td, tfoot th, .pill {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  tbody tr:nth-child(even) { background: #f6fafb !important; }
  a { text-decoration: none; color: inherit; }
}

/* The six-period round is eight columns wide and only fits sideways. Named
   pages are honoured by Chrome and Edge; elsewhere the reader picks landscape
   in the print dialog and the table still fits, so nothing is lost. */
@media print {
  @page landscape { size: A4 landscape; margin: 10mm; }
  .print-landscape { page: landscape; }
}
