/* Fonts are served by this app itself: no third-party request, and each
   file is fetched only when a page actually uses characters in its range
   (Thai, Latin, or Arabic/Jawi). */
@font-face {
  font-family: "IBM Plex Sans Thai"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/static/fonts/ibm-plex-sans-thai-thai-400-normal.woff2") format("woff2");
  unicode-range: U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC;
}
@font-face {
  font-family: "IBM Plex Sans Thai"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/static/fonts/ibm-plex-sans-thai-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans Thai"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/static/fonts/ibm-plex-sans-thai-thai-500-normal.woff2") format("woff2");
  unicode-range: U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC;
}
@font-face {
  font-family: "IBM Plex Sans Thai"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/static/fonts/ibm-plex-sans-thai-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans Thai"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/static/fonts/ibm-plex-sans-thai-thai-600-normal.woff2") format("woff2");
  unicode-range: U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC;
}
@font-face {
  font-family: "IBM Plex Sans Thai"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/static/fonts/ibm-plex-sans-thai-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans Thai"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/static/fonts/ibm-plex-sans-thai-thai-700-normal.woff2") format("woff2");
  unicode-range: U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC;
}
@font-face {
  font-family: "IBM Plex Sans Thai"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/static/fonts/ibm-plex-sans-thai-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Noto Naskh Arabic"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/static/fonts/noto-naskh-arabic-arabic-500-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC;
}
@font-face {
  font-family: "Noto Naskh Arabic"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/static/fonts/noto-naskh-arabic-arabic-700-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC;
}

:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --ink: #0f172a;
  --ink-2: #475569;
  --ink-3: #94a3b8;
  --line: #e2e8f0;
  --line-2: #eef2f7;
  --brand: #2563eb;
  --brand-ink: #1d4ed8;
  --brand-soft: #eff4ff;
  --ok: #15803d;
  --ok-soft: #ecfdf3;
  --warn: #b45309;
  --warn-soft: #fff7e6;
  --bad: #dc2626;
  --bad-soft: #fef2f2;
  --radius: 12px;
  /* After the bundled face come the Thai fonts phones already have, so text
     is readable at once even before the web font arrives. */
  --font: "IBM Plex Sans Thai", "Thonburi", "Noto Sans Thai", "Leelawadee UI", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-ar: "Noto Naskh Arabic", "Geeza Pro", "Noto Sans Arabic", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: 22px; font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; }
h2 { font-size: 16px; font-weight: 600; }
a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 0.04em; }
.ar { font-family: var(--font-ar); font-size: 1.1em; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side {
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 17px; font-weight: 500; padding: 0 8px; }
.brand:hover { text-decoration: none; }
.brand b { color: var(--brand); font-weight: 700; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--brand); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 16px;
}
.org { padding: 10px 12px; background: var(--bg); border-radius: 10px; }
.org-name { font-weight: 600; line-height: 1.4; }
.org-meta { font-size: 12.5px; color: var(--ink-2); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  padding: 8px 12px; border-radius: 8px;
  color: var(--ink-2); font-weight: 500;
}
.nav a:hover { background: var(--bg); text-decoration: none; color: var(--ink); }
.nav a.on { background: var(--brand-soft); color: var(--brand-ink); }
.side-foot { margin-top: auto; padding: 12px 12px 0; border-top: 1px solid var(--line); }
.who { font-weight: 500; line-height: 1.4; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--ink-2); cursor: pointer; font-size: 13px; }
.link:hover { color: var(--bad); }

.main { padding: 28px 32px 64px; max-width: 1180px; width: 100%; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.head .muted { margin-top: 2px; }
.crumb { font-size: 13px; color: var(--ink-2); margin-bottom: 4px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.section { margin-top: 28px; }
.section > h2 { margin-bottom: 12px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }

/* ---------- pieces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card.flush { padding: 0; overflow: hidden; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.card-title { font-weight: 600; font-size: 16px; line-height: 1.4; }
.card-foot { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
a.card { display: block; color: inherit; transition: border-color .12s, box-shadow .12s; }
a.card:hover { text-decoration: none; border-color: #bfd0f5; box-shadow: 0 2px 10px rgba(37, 99, 235, .08); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.stat-n { font-size: 28px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-of { font-size: 15px; font-weight: 400; color: var(--ink-2); }
.meter { height: 8px; margin: 8px 0 10px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.meter > span { display: block; height: 100%; min-width: 2px; border-radius: inherit; background: var(--brand); }
.meter.warn > span { background: var(--warn); }
.meter.full > span { background: var(--bad); }
.stat-l { color: var(--ink-2); font-size: 13.5px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 38px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--bg); text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-ink); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); border-color: #fecaca; }
.btn.sm { min-height: 30px; padding: 0 10px; font-size: 13px; border-radius: 7px; }
.btn.block { width: 100%; }

.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.input, select.input, textarea.input {
  width: 100%; min-height: 40px; padding: 8px 12px;
  border: 1px solid #cbd5e1; border-radius: 9px;
  background: #fff; color: var(--ink); font: inherit;
}
textarea.input { min-height: 96px; resize: vertical; line-height: 1.6; }
.input:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: var(--brand); }
.form { display: grid; gap: 14px; }
.form.row { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); align-items: end; }
.form.row .btn { min-height: 40px; }
.hint { font-size: 13px; color: var(--ink-2); }

.flash { padding: 10px 14px; border-radius: 10px; margin-bottom: 18px; font-weight: 500; border: 1px solid; }
.flash.ok { background: var(--ok-soft); color: var(--ok); border-color: #bbf7d0; }
.flash.err { background: var(--bad-soft); color: var(--bad); border-color: #fecaca; }

.badge { display: inline-block; padding: 1px 9px; border-radius: 99px; font-size: 12.5px; font-weight: 500; background: var(--bg); color: var(--ink-2); border: 1px solid var(--line); }
.badge.brand { background: var(--brand-soft); color: var(--brand-ink); border-color: #dbe6ff; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: #bbf7d0; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: #fde3b0; }
.badge.bad { background: var(--bad-soft); color: var(--bad); border-color: #fecaca; }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
.table th, .table td { text-align: left; padding: 10px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table th { font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: #fafbfd; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table td.right, .table th.right { text-align: right; }
.table form { display: inline; }

.empty { text-align: center; padding: 36px 20px; color: var(--ink-2); }
.empty b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.empty .btn { margin-top: 14px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tabs a { padding: 9px 14px; color: var(--ink-2); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.tabs a.on { color: var(--brand-ink); border-bottom-color: var(--brand); }

.list > * + * { border-top: 1px solid var(--line-2); }
.item { padding: 14px 18px; }
.item-title { font-weight: 600; }
.item-body { white-space: pre-line; color: var(--ink-2); margin-top: 2px; }
.item-meta { font-size: 13px; color: var(--ink-2); margin-top: 6px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.item-meta form { margin-left: auto; }

.code-big { font: 600 30px/1.2 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 0.14em; color: var(--brand-ink); }

/* ---------- homework, photos and clips ---------- */
.works { display: grid; gap: 14px; }
.work { display: grid; gap: 10px; scroll-margin-top: 16px; }
.work:target { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.work-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.work .code { color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.media { display: flex; flex-wrap: wrap; gap: 8px; }
.media .shot img { display: block; width: 132px; height: 132px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); }
.media .clip { width: min(100%, 360px); max-height: 300px; border-radius: 10px; background: #000; }
.form.row.grade { grid-template-columns: 150px minmax(0, 1fr) auto; padding-top: 10px; border-top: 1px solid var(--line-2); }
.form.row.grade:not(:has(input[name=score])) { grid-template-columns: minmax(0, 1fr) auto; }

/* ---------- attendance + settings ---------- */
.seg { display: inline-flex; gap: 4px; background: var(--bg); border-radius: 10px; padding: 3px; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: block; min-width: 46px; text-align: center; padding: 5px 10px; border-radius: 8px; font-weight: 500; font-size: 14px; color: var(--ink-2); }
.seg input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 1px; }
.seg-present input:checked + span { background: var(--ok); color: #fff; }
.seg-late input:checked + span { background: #d97706; color: #fff; }
.seg-absent input:checked + span { background: var(--bad); color: #fff; }
.seg-leave input:checked + span { background: #475569; color: #fff; }
.bands { display: grid; gap: 8px; max-width: 420px; }
.bands-head, .band { display: grid; grid-template-columns: 130px 1fr; gap: 8px; }
.bands-head { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14.5px; }
.check input { margin-top: 5px; width: 16px; height: 16px; accent-color: var(--brand); }

/* ---------- gradebook ---------- */
.gb-wrap { overflow: auto; max-height: calc(100vh - 220px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.gb { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; }
.gb th, .gb td { border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line-2); padding: 0; background: var(--surface); }
.gb thead th { position: sticky; top: 0; z-index: 2; background: #fafbfd; padding: 10px 12px; text-align: center; vertical-align: bottom; font-weight: 600; min-width: 112px; }
.gb .who-col { position: sticky; left: 0; z-index: 1; text-align: left; padding: 8px 14px; min-width: 200px; max-width: 280px; }
.gb tbody .who-col { font-weight: 500; }
.gb thead th.narrow { min-width: 84px; }
.gb thead .who-col { z-index: 3; }
.gb .code { color: var(--ink-3); font-size: 12.5px; margin-right: 8px; font-variant-numeric: tabular-nums; }
.gb-col-title { font-size: 13.5px; line-height: 1.35; max-width: 150px; margin: 0 auto; }
.gb-col-max { font-size: 12px; color: var(--ink-2); font-weight: 400; }
.gb-col-acts { display: flex; gap: 4px; justify-content: center; margin-top: 6px; }
.gb-col-acts form { display: inline; }
.gb input {
  width: 100%; height: 42px; border: 0; background: transparent;
  text-align: center; font: inherit; font-variant-numeric: tabular-nums; color: var(--ink);
}
.gb input:focus { outline: 2px solid var(--brand); outline-offset: -2px; background: var(--brand-soft); border-radius: 0; }
.gb input.bad { background: var(--bad-soft); color: var(--bad); }
.gb input.saved { animation: saved 1.2s ease-out; }
@keyframes saved { from { background: #d1fae5; } to { background: transparent; } }
.gb .sum { text-align: center; padding: 8px 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gb .grade { font-weight: 600; color: var(--brand-ink); }
.save-status { font-size: 13px; color: var(--ink-2); min-width: 120px; text-align: right; }
.save-status.err { color: var(--bad); font-weight: 500; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-box { width: 100%; max-width: 420px; }
.auth-box .brand { justify-content: center; margin-bottom: 20px; font-size: 20px; }
.auth-box h1 { text-align: center; margin-bottom: 4px; }
.auth-box .sub { text-align: center; color: var(--ink-2); margin-bottom: 20px; }
.auth-foot { text-align: center; margin-top: 16px; color: var(--ink-2); font-size: 14px; }
.kinds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kinds label { position: relative; }
.kinds input { position: absolute; opacity: 0; }
.kinds span { display: block; text-align: center; padding: 10px 6px; border: 1px solid #cbd5e1; border-radius: 9px; font-weight: 500; cursor: pointer; font-size: 14px; }
.kinds input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); box-shadow: inset 0 0 0 1px var(--brand); }
.kinds input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- choosing a school, applications, the operator's console ---------- */
.search { display: flex; gap: 8px; margin-bottom: 14px; }
.pick a.item { display: block; color: inherit; }
.pick a.item:hover { background: var(--bg); text-decoration: none; }
.quiet { color: var(--ink-3); }
.form.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 12px 0; }
.facts dt { color: var(--ink-2); font-size: 13.5px; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.pre { white-space: pre-line; }
.notice { display: grid; gap: 2px; padding: 10px 14px; margin-top: 12px; border-radius: 10px; border: 1px solid; }
.notice.bad { background: var(--bad-soft); border-color: #fecaca; }
.notice.warn { background: var(--warn-soft); border-color: #fde3b0; }
.decide { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.decide details { flex: 1 1 240px; }
.decide summary { list-style: none; }
.decide summary::-webkit-details-marker { display: none; }
.decide details[open] summary { margin-bottom: 10px; }
.meter.slim { height: 5px; margin: 4px 0 0; min-width: 96px; }
/* The list of every school has many short columns: keep each on one line
   and let the card scroll sideways, rather than breaking badges and dates. */
.table.wide th, .table.wide td { white-space: nowrap; padding-inline: 12px; }
.table.wide td.name { white-space: normal; min-width: 190px; }
.pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 16px; }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  /* Thai needs a little more size than Latin to read comfortably on a
     phone: 16px body, and nothing below 13.5px. */
  body { font-size: 16px; }
  h1 { font-size: 21px; }
  .small, .hint, .crumb, .org-meta, .item-meta, .badge, .gb-col-max, .save-status { font-size: 13.5px; }
  .field > span, .stat-l, .table th, .bands-head { font-size: 14px; }
  .gb-col-title, .seg span, .btn.sm { font-size: 14.5px; }

  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 16px; gap: 10px; }
  .org { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
  .nav { flex-direction: row; overflow-x: auto; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; }
  .side-foot { margin-top: 0; padding: 8px 0 0; display: flex; justify-content: space-between; align-items: center; }
  .main { padding: 20px max(16px, env(safe-area-inset-right)) 48px max(16px, env(safe-area-inset-left)); }
  .gb .who-col { min-width: 150px; max-width: 170px; }
  .gb-wrap { max-height: none; }
  .section-head { flex-wrap: wrap; }
  .form.row.grade, .form.row.grade:not(:has(input[name=score])) { grid-template-columns: minmax(0, 1fr); }
  .media .shot img { width: 104px; height: 104px; }
  .media .clip { width: 100%; }
  .form.two { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .facts dd { margin-bottom: 8px; }

  /* Wide tables scroll sideways inside their card rather than squeezing
     Thai names into three-line columns. */
  .table th, .table td { white-space: nowrap; padding: 12px 14px; }

  /* The roll call is used on phones more than anything else, so there it
     stops being a table: each student is a block with the name on top and
     four full-width status buttons underneath. */
  .roll thead { display: none; }
  .roll, .roll tbody, .roll tr { display: block; }
  .roll tr { padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
  .roll tr:last-child { border-bottom: 0; }
  .roll td { display: block; padding: 0; border: 0; white-space: normal; }
  .roll td.r-code { display: inline; margin-inline-end: 8px; color: var(--ink-3); font-size: 13.5px; }
  .roll td.r-name { display: inline; font-weight: 500; }
  .roll td.r-seg { margin-top: 10px; }
  .roll .seg { display: flex; }
  .roll .seg label { flex: 1; }
  .roll .seg span { min-width: 0; }
  .roll td.r-rec { margin-top: 8px; font-size: 13.5px; color: var(--ink-2); }
}

/* Any field smaller than 16px makes iOS Safari zoom the whole page in when
   it is focused, and it stays zoomed. Touch devices get 16px fields and
   finger-sized controls. */
@media (pointer: coarse) {
  .input, select.input, textarea.input, .gb input { font-size: 16px; }
  .input, select.input { min-height: 46px; }
  .btn { min-height: 46px; }
  .btn.sm { min-height: 40px; padding: 0 14px; }
  .form.row .btn { min-height: 46px; }
  .nav a { padding: 11px 14px; }
  .link { font-size: 14.5px; padding: 8px 0; }
  .tabs a { padding: 12px 16px; }
  .seg span { min-width: 52px; padding: 10px 12px; }
  .gb input { height: 48px; }
  .check input { width: 20px; height: 20px; margin-top: 3px; }
  .kinds span { padding: 13px 6px; }
}

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
