/* TrueMed FPE — shared ground for all three screens (admin, employee, board).
   Tokens are the GAMOT app's editorial system: warm paper, near-black ink,
   orange reserved for the primary action and live counts, teal for "this is
   fine / open". Screen-specific layout lives in its own sheet next to this one. */

:root {
  --orange: #f16122;
  --orange-tint: #f1612212;
  --orange-soft: #f4815240;
  --teal: #79cac1;
  --teal-tint: #79cac118;
  --teal-soft: #79cac150;
  --paper: #eeeae2;
  --paper-2: #e6e1d8;
  --paper-3: #ddd7cb;
  --ink: #1c1c1c;
  --ink-mute: #5e5a53;
  --ink-faint: #807c74;
  --line: #1c1c1c24;
  --line-soft: #1c1c1c12;
  --danger: #a5361c;

  --serif: 'Instrument Serif', 'New York', 'Times New Roman', Georgia, serif;
  --sans: 'Inter Tight', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;

  --pad: clamp(1.05rem, 4.6vw, 1.75rem);
  --tap: 46px; /* every control is at least this tall */
  --radius: 4px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* ── Type ─────────────────────────────────────────────── */

.eyebrow {
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.7rem;
}
.eyebrow::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
h1.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 7vw, 2.7rem);
  line-height: 1.06;
  letter-spacing: -0.012em;
  margin: 0 0 0.5rem;
  text-wrap: balance;
}
h2.sec {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.4rem, 4.6vw, 1.75rem);
  line-height: 1.16;
  margin: 0 0 0.6rem;
  text-wrap: balance;
}
h3.sub {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.3rem;
  letter-spacing: -0.005em;
}
p {
  margin: 0 0 0.85rem;
}
.lede {
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--ink-mute);
  max-width: 46ch;
}
.small {
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--ink-mute);
}
.faint {
  color: var(--ink-faint);
}
.mono {
  font-family: var(--mono);
  font-variant-ligatures: none;
}
.rule {
  height: 1px;
  background: var(--line-soft);
  border: 0;
  margin: 1.6rem 0;
}

/* ── Buttons ──────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
  text-decoration: none;
  padding: 0.72rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  min-height: var(--tap);
}
.btn.primary {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn.ghost:hover {
  border-color: var(--ink);
}
.btn.wide {
  width: 100%;
}
.btn:active {
  opacity: 0.75;
}
.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

/* A small square control that still meets the 44px tap floor. */
.tap {
  min-height: var(--tap);
  min-width: var(--tap);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ── Fields ───────────────────────────────────────────── */

.field {
  display: block;
  margin: 0 0 0.95rem;
}
.field > .label {
  display: block;
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 0.35rem;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 16px; /* below 16px iOS zooms the page on focus */
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.62rem 0.75rem;
  min-height: var(--tap);
  -webkit-appearance: none;
  appearance: none;
}
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-faint) 50%),
    linear-gradient(135deg, var(--ink-faint) 50%, transparent 50%);
  background-position: calc(100% - 1.05rem) 1.28rem, calc(100% - 0.75rem) 1.28rem;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2.2rem;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--orange-soft);
  outline-offset: 1px;
  border-color: var(--orange);
}
.field .hint {
  display: block;
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin: 0.3rem 0 0;
  line-height: 1.45;
}
.field.wrong input {
  border-color: var(--danger);
}

/* ── Cards, pills, notices ────────────────────────────── */

.card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.card.accent {
  border-left: 3px solid var(--orange);
}
.card.teal {
  border-left: 3px solid var(--teal);
}

.pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 0.26rem 0.5rem;
  border-radius: 3px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-mute);
  line-height: 1.35;
  white-space: nowrap;
}
.pill.on {
  background: var(--teal-tint);
  border-color: var(--teal-soft);
  color: #276b63;
}
.pill.off {
  background: var(--paper-3);
  color: var(--ink-faint);
}
.pill.done {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.notice {
  border: 1px solid var(--line);
  border-left: 3px solid var(--ink);
  background: var(--paper-2);
  border-radius: var(--radius);
  padding: 0.7rem 0.85rem;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 1rem;
}
.notice.error {
  border-left-color: var(--danger);
  color: var(--danger);
}
.notice.good {
  border-left-color: var(--teal);
}

.empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.2rem;
  text-align: center;
  color: var(--ink-mute);
}
.empty h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.3rem;
  margin: 0 0 0.35rem;
  color: var(--ink);
}
.empty p {
  margin: 0 auto;
  max-width: 34ch;
  font-size: 0.92rem;
}

/* Screen-reader-only, for labels a sighted user reads from context. */
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
