/* The app's single stylesheet, in Complete I.T. branding (matches completeit.io). */

:root {
  /* Brand */
  --brand: #317c5e;          /* Complete I.T. green (buttons, selections) */
  --brand-dark: #245e47;
  --brand-tint: #eaf4ef;     /* soft green backgrounds */
  --brand-tint-2: #d6ebe1;
  --ink: #1d2226;            /* headings */
  --text: #3e464c;
  --muted: #6b7378;
  --border: #dfe5e2;
  --bg: #f4f7f5;
  --surface: #ffffff;
  --danger: #b42318;
  --danger-tint: #fdeceb;
  --radius: 12px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgb(29 34 38 / 4%), 0 4px 16px rgb(29 34 38 / 5%);
  --font: Inter, "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { color: var(--ink); line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: 1.75rem; font-weight: 800; margin: 0 0 0.35rem; }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }
code { font-size: 0.9em; background: var(--brand-tint); padding: 0.05rem 0.3rem; border-radius: 4px; }

.muted { color: var(--muted); }
.flush-top { margin-top: 0; }
.lead { color: var(--muted); margin: 0 0 1.5rem; }
.back { display: inline-block; margin-bottom: 1rem; font-size: 0.9rem; text-decoration: none; }
.back:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
  background: var(--surface);
  border-top: 4px solid var(--brand);
  border-bottom: 1px solid var(--border);
}
.site-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0.7rem 1rem;
}
.brand { display: flex; align-items: center; gap: 0.85rem; text-decoration: none; }
.brand img { height: 34px; width: auto; display: block; }
.brand-app {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  padding-left: 0.85rem;
  border-left: 1px solid var(--border);
  white-space: nowrap;
}
.who { display: flex; align-items: center; gap: 0.9rem; color: var(--text); font-weight: 500; font-size: 0.9rem; }

.container { max-width: 1040px; margin: 0 auto; padding: 2rem 1rem 3rem; }
.container.wide { max-width: 1400px; }

.main-nav { display: flex; gap: 0.25rem; margin-right: auto; margin-left: 1.5rem; }
.main-nav a {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
}
.main-nav a:hover { background: var(--brand-tint); color: var(--brand-dark); }
.site-footer { text-align: center; font-size: 0.8rem; color: var(--muted); padding: 0 1rem 2rem; }

/* ---------- Cards, buttons, inputs ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
}
.narrow { max-width: 420px; margin: 1.5rem auto; }
.card h1 { font-size: 1.5rem; }

.auth-logo { display: block; width: 220px; max-width: 70%; margin: 1.5rem auto 0; }

form.inline { display: inline; margin: 0; }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.stack label { display: flex; flex-direction: column; gap: 0.3rem; font-weight: 600; color: var(--ink); }

input[type="email"],
input[type="password"],
input[type="text"],
input[type="date"],
input[type="month"],
textarea {
  font: inherit;
  color: var(--ink);
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #cfd8d3;
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { resize: vertical; min-height: 2.8rem; }
input:hover, textarea:hover { border-color: #b7c4bd; }
input:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgb(49 124 94 / 18%);
}
button:focus-visible, a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font: inherit;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  color: #fff;
  background: var(--brand);
  border: 0;
  border-radius: var(--radius);
  box-shadow: 0 2px 6px rgb(49 124 94 / 25%);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}
.button:hover { background: var(--brand-dark); color: #fff; }
.button.secondary {
  color: var(--brand);
  background: var(--surface);
  border: 1px solid var(--brand-tint-2);
  box-shadow: none;
}
.button.secondary:hover { background: var(--brand-tint); }

.link-button {
  font: inherit;
  padding: 0;
  color: var(--brand);
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.error, .success {
  margin: 0 0 1.25rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid;
}
.error { color: var(--danger); background: var(--danger-tint); border-color: #f6c9c4; }
.success { color: #1c4a37; background: var(--brand-tint); border-color: var(--brand-tint-2); }
.success p { margin: 0.5rem 0 0.25rem; }
.success ul { margin: 0.25rem 0 0.5rem; padding-left: 1.25rem; }

pre.json {
  overflow-x: auto;
  font-size: 0.8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
}

table.list {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
table.list th, table.list td { text-align: left; padding: 0.85rem 1rem; border-bottom: 1px solid var(--border); vertical-align: top; }
table.list tr:last-child td { border-bottom: 0; }
table.list th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); background: #fafcfb; }

/* ---------- Form engine (templates/forms/macros.html) ---------- */
.form-card { padding: 0.5rem 1.75rem 1.75rem; }

.form-section {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1.25rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}
.form-section:last-of-type { border-bottom: 0; }
/* Forms without time hints use the full width (no empty rail). */
.form-sections:not(.has-timeline) .form-section { grid-template-columns: 1fr; }
.form-sections:not(.has-timeline) .rail { display: none; }
.form-section h2 { margin: 0 0 0.85rem; font-size: 1.15rem; font-weight: 700; }
.section-help { margin: -0.6rem 0 1rem; font-size: 0.92rem; }

/* Left rail: the run-sheet timeline */
.rail { position: relative; padding-top: 0.15rem; }
.has-timeline .rail::before {
  content: "";
  position: absolute;
  left: 0.6rem;
  top: 2rem;
  bottom: -1.6rem;
  border-left: 2px dotted var(--brand-tint-2);
}
.has-timeline .form-section:last-of-type .rail::before { display: none; }
.time-hint {
  position: relative;
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--brand-dark);
  background: var(--brand-tint);
  border: 1px solid var(--brand-tint-2);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  white-space: nowrap;
}

.field { margin: 0 0 1.25rem; padding: 0; border: 0; min-width: 0; }
.field:last-child { margin-bottom: 0; }
.conditional { margin-bottom: 1.25rem; }
.conditional:last-child { margin-bottom: 0; }
.field > label,
.field > legend { display: block; font-weight: 600; color: var(--ink); margin-bottom: 0.35rem; padding: 0; }
.field input[type="date"],
.field input[type="month"] { max-width: 14rem; }
.field-help { margin: -0.15rem 0 0.45rem; font-size: 0.87rem; color: var(--muted); }
.field-error { margin: 0 0 0.45rem; font-size: 0.87rem; font-weight: 600; color: var(--danger); }
.has-error textarea, .has-error input[type="text"], .has-error input[type="date"], .has-error input[type="month"] {
  border-color: var(--danger);
}
.has-error .pill span { border-color: #f0b8b2; }
.required {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-left: 0.35rem;
}

.private-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6a4c00;
  background: #fff4d6;
  border: 1px solid #f1dfa6;
  border-radius: 5px;
  padding: 0.05rem 0.4rem;
  margin-left: 0.4rem;
  vertical-align: 0.1em;
}
.not-applicable .field-title { margin: 0 0 0.2rem; font-weight: 600; color: var(--ink); }
.not-applicable .previous-none { margin: 0; }

/* Commitment questions stand out: this is what is being agreed */
.field.commitment,
.field.review {
  background: var(--brand-tint);
  border: 1px solid var(--brand-tint-2);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem 1rem;
}
/* Keep a boxed group's title inside the box instead of on its border. */
.field.review > legend { float: left; width: 100%; margin-bottom: 0.5rem; }
.field.review > legend + * { clear: both; }
.badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  background: var(--brand);
  border-radius: 5px;
  padding: 0.1rem 0.45rem;
  margin-right: 0.35rem;
  vertical-align: 0.12em;
}

/* Last period's commitment, pulled in automatically */
.previous {
  margin: 0 0 0.65rem;
  padding: 0.6rem 0.85rem;
  background: var(--surface);
  border: 1px solid var(--brand-tint-2);
  border-radius: var(--radius-sm);
  color: var(--ink);
}
.previous-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-dark);
  margin-bottom: 0.15rem;
}
.previous-none { margin: 0 0 0.65rem; font-size: 0.87rem; font-style: italic; color: var(--muted); }
.note-label { display: block; font-size: 0.87rem; font-weight: 600; color: var(--ink); margin: 0.75rem 0 0.3rem; }

/* Pill buttons (choices) */
.pills { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.pill { position: relative; cursor: pointer; }
.pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill span {
  display: inline-block;
  min-width: 2.6rem;
  text-align: center;
  font-weight: 500;
  padding: 0.4rem 0.95rem;
  color: var(--text);
  border: 1px solid #cfd8d3;
  border-radius: 999px;
  background: var(--surface);
  user-select: none;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.pill:hover span { border-color: var(--brand); color: var(--brand-dark); }
.pill input:checked + span {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 1px 4px rgb(49 124 94 / 30%);
}
.pill input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

/* 1–5 scales */
.scale { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem; }
.scale .pill span { min-width: 2.5rem; padding-left: 0; padding-right: 0; }
.scale-end { font-size: 0.82rem; color: var(--muted); }

.form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

/* ---------- Read-only answers (templates/forms/answers.html) ---------- */
.answer-section { padding: 1.1rem 0; border-bottom: 1px solid var(--border); }
.answer-section:first-child { padding-top: 0.25rem; }
.answer-section:last-child { border-bottom: 0; padding-bottom: 0; }
.answer-section h3 { font-size: 1.02rem; margin: 0 0 0.75rem; display: flex; align-items: center; gap: 0.6rem; }
.answer-section dl { margin: 0; display: grid; gap: 0.85rem; }
.answer dt { font-weight: 600; color: var(--ink); font-size: 0.9rem; margin-bottom: 0.2rem; }
.answer dd { margin: 0; }
.answer.commitment { background: var(--brand-tint); border-left: 4px solid var(--brand); border-radius: var(--radius-sm); padding: 0.6rem 0.8rem; }
.answer-previous { font-size: 0.87rem; color: var(--muted); font-style: italic; margin-bottom: 0.25rem !important; }
.answer-text { white-space: pre-line; color: var(--ink); }
.answer-pill {
  display: inline-block;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--brand-dark);
  background: var(--brand-tint);
  border: 1px solid var(--brand-tint-2);
  border-radius: 999px;
  padding: 0.1rem 0.65rem;
  margin-right: 0.35rem;
}

/* ---------- Check-in pages ---------- */
.status {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  white-space: nowrap;
  border: 1px solid;
}
.status-not_started { color: var(--muted); background: #f1f3f2; border-color: var(--border); }
.status-draft { color: #6a4c00; background: #fff4d6; border-color: #f1dfa6; }
.status-submitted { color: var(--brand-dark); background: var(--brand-tint); border-color: var(--brand-tint-2); }
.status-completed { color: #fff; background: var(--brand); border-color: var(--brand); }

.period-cards { display: grid; gap: 1rem; margin-bottom: 2rem; }
.period-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.period-card h2 { margin: 0 0 0.25rem; font-size: 1.2rem; }
.period-card p { margin: 0; }
.section-title { font-size: 1.05rem; margin: 0 0 0.75rem; }
.page-head { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.35rem; }
.page-head h1 { margin: 0; }
.notice { margin: 0 0 1.25rem; padding: 0.75rem 1rem; border-radius: var(--radius-sm); background: #f1f3f2; border: 1px solid var(--border); }

.flush-bottom { margin-bottom: 0; }
.row-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }

/* Follow-up report and commitment history */
.report-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin: 0 0 1.25rem; }
.report-highlight, .report-section { margin-bottom: 1.25rem; }
.report-highlight { background: var(--brand-tint); border-color: var(--brand-tint-2); border-left: 4px solid var(--brand); }
.report-highlight h2, .report-section h2 { font-size: 1.15rem; margin: 0 0 0.85rem; }
.commitment-list { list-style: none; margin: 0 0 0.75rem; padding: 0; display: grid; gap: 0.75rem; }
.commitment-list li { color: var(--ink); font-weight: 500; }
.commitment-result { margin-top: 0.35rem; display: flex; gap: 0.5rem; align-items: baseline; flex-wrap: wrap; font-weight: 400; }
details.report-section > summary { cursor: pointer; list-style-position: inside; }
details.report-section > summary h2 { display: inline; }
details.report-section[open] > summary { margin-bottom: 1rem; }

.result {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
  border: 1px solid;
  white-space: nowrap;
}
.result-done { color: #fff; background: var(--brand); border-color: var(--brand); }
.result-partly { color: #6a4c00; background: #fff4d6; border-color: #f1dfa6; }
.result-not_done { color: var(--danger); background: var(--danger-tint); border-color: #f6c9c4; }
.result-open { color: var(--muted); background: #f1f3f2; border-color: var(--border); }
.result-note { margin-top: 0.3rem; font-size: 0.9rem; }
.tally { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin: 0 0 1.25rem; }

/* Month switch on My team */
.period-switch { display: flex; gap: 0.5rem; margin: 0 0 1.25rem; flex-wrap: wrap; }
.pill-link {
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  border: 1px solid #cfd8d3;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
}
.pill-link:hover { border-color: var(--brand); color: var(--brand-dark); }
.pill-link.active { color: #fff; background: var(--brand); border-color: var(--brand); }

/* Check-in screen: employee's pre-check-in beside the run sheet */
.checkin-layout {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 1.5rem;
  align-items: start;
}
.checkin-side {
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  padding: 1.25rem 1.4rem;
}
.checkin-side h2 { font-size: 1.1rem; margin: 0 0 1rem; }
.checkin-side .notice { margin-bottom: 0; }

/* Printing (e.g. the follow-up report): just the content, on white. */
/* ---------- Admin pages ---------- */
select,
input[type="file"] {
  font: inherit;
  color: var(--ink);
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid #cfd8d3;
  border-radius: var(--radius-sm);
  background: var(--surface);
}
select:focus, input[type="file"]:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgb(49 124 94 / 18%); }
.has-error select, .has-error input[type="email"], .has-error input[type="password"] { border-color: var(--danger); }

.admin-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; margin: 0 0 2rem; }
.admin-tile { display: block; color: inherit; text-decoration: none; padding: 1.25rem 1.4rem; transition: border-color 0.15s, transform 0.15s; }
.admin-tile:hover { border-color: var(--brand); color: inherit; transform: translateY(-1px); }
.admin-tile h2 { font-size: 1.1rem; margin: 0 0 0.25rem; color: var(--brand); }
.admin-tile p { margin: 0; }
.tile-count { font-size: 1.6rem; font-weight: 700; color: var(--ink); margin-bottom: 0.4rem !important; }
.steps { margin: 0 0 1rem; padding-left: 1.3rem; }
.steps li { margin-bottom: 0.35rem; }

.admin-form h2, .admin-panel h2 { font-size: 1.1rem; margin-bottom: 0; }
.admin-panel { margin-top: 1.25rem; }
.admin-panel h2 { margin-bottom: 0.6rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.stack .field-help { font-weight: 400; margin: 0; }
.stack .field-error { margin: 0; }
.stack fieldset.field { border: 0; margin: 0; padding: 0; }
.role-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
.role-choices.two { grid-template-columns: repeat(2, 1fr); }
.stack .field-help { margin-top: 0.1rem; }
.link-notice { background: var(--brand-tint); border-color: var(--brand-tint-2); }
.copy-field { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.85rem; margin: 0.5rem 0; }
.stack label.role-choice { flex-direction: row; align-items: flex-start; gap: 0.6rem; font-weight: 400;
  padding: 0.75rem 0.85rem; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; }
.role-choice:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }
.role-choice input { margin-top: 0.25rem; accent-color: var(--brand); }
.role-choice > span { display: flex; flex-direction: column; gap: 0.15rem; font-size: 0.9rem; }
.role-choice strong { color: var(--ink); font-size: 1rem; }

.button.danger { background: var(--danger); border-color: var(--danger); }
.button.danger:hover { background: #8f1c13; }
.danger-zone { border-color: #f6c9c4; }
.danger-zone h2 { color: var(--danger); }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.inline-form { display: flex; align-items: flex-end; gap: 0.75rem; flex-wrap: wrap; margin: 1rem 0 0.5rem; }
.inline-form label { display: flex; flex-direction: column; gap: 0.3rem; font-weight: 600; color: var(--ink); flex: 1 1 260px; }
.pre-line { white-space: pre-line; }
.small { font-size: 0.85rem; }
.narrow-left { max-width: 520px; }
.who a { color: inherit; text-decoration: none; }
.who a:hover { color: var(--brand); text-decoration: underline; }

.sandbox-bar { background: #fff4d6; color: #4d3700; border-bottom: 1px solid #f1dfa6; text-align: center;
  font-size: 0.88rem; padding: 0.45rem 1rem; }

/* ---------- Lessons ---------- */
.lesson-add { margin-bottom: 1.25rem; }
.lesson-add > summary { cursor: pointer; list-style-position: inside; }
.lesson-add > summary h2 { display: inline; font-size: 1.1rem; }
.lesson-add[open] > summary { margin-bottom: 1rem; }
.repeat-box { margin-bottom: 1.5rem; border-left: 4px solid #d9a521; }
.repeat-box h2 { font-size: 1.05rem; margin: 0 0 0.6rem; }
.repeat-box li { display: flex; gap: 0.6rem; align-items: baseline; flex-wrap: wrap; }
.repeat-notice { background: #fff4d6; border-color: #f1dfa6; color: #4d3700; }
.times {
  display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 0.1rem 0.55rem; border-radius: 999px;
  color: #6a4c00; background: #fff4d6; border: 1px solid #f1dfa6; white-space: nowrap;
}
.reason {
  display: inline-block; font-size: 0.75rem; font-weight: 600; padding: 0.1rem 0.55rem; border-radius: 999px;
  border: 1px solid var(--border); color: var(--muted); background: #f1f3f2; white-space: nowrap;
}
.reason-mistake { color: var(--danger); background: var(--danger-tint); border-color: #f6c9c4; }
.reason-asked_for_help { color: var(--brand-dark); background: var(--brand-tint); border-color: var(--brand-tint-2); }
.lesson-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.85rem; }
.lesson { padding: 1rem 1.25rem; }
.lesson-repeat { border-left: 4px solid #d9a521; }
.lesson-head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.lesson-head h3 { margin: 0; font-size: 1.05rem; margin-right: 0.25rem; }
.lesson-meta { margin: 0.25rem 0 0.6rem; font-size: 0.87rem; }
.lesson-actions { margin: 0.6rem 0 0; font-size: 0.9rem; }
.stack label.check-line { align-self: start; }
.lesson-groups { display: grid; gap: 0.75rem; }
.lesson-group { padding: 0.9rem 1.25rem; }
.lesson-group > summary { cursor: pointer; display: flex; align-items: baseline; gap: 0.75rem; flex-wrap: wrap; list-style: none; }
.lesson-group > summary::-webkit-details-marker { display: none; }
.lesson-group > summary::before { content: "\25B8"; display: inline-block; color: var(--brand); font-size: 1rem; transition: transform 0.15s; }
.lesson-group[open] > summary::before { transform: rotate(90deg); }
.lesson-group > summary h3 { margin: 0; font-size: 1.1rem; }
.lesson-group[open] > summary { margin-bottom: 0.85rem; }
.lesson-group .lesson-list { margin-bottom: 0.75rem; }
.lesson-group .lesson { box-shadow: none; background: #fbfcfb; }
.sub-title { font-size: 0.95rem; margin: 0.75rem 0 0.5rem; color: var(--ink); }
.similar-box { margin-top: -0.25rem; padding: 0.85rem 1rem; border-radius: var(--radius-sm);
  background: #fff4d6; border: 1px solid #f1dfa6; border-left: 4px solid #d9a521; }
.similar-title { margin: 0 0 0.6rem; color: #4d3700; }
.similar-item { padding: 0.5rem 0; border-top: 1px solid #f1dfa6; }
.similar-item:first-child { border-top: 0; padding-top: 0; }
.similar-snippet { margin-top: 0.2rem; color: var(--text); }
.similar-snippet mark { background: #f7d77a; color: inherit; padding: 0 0.1rem; border-radius: 2px; }
.category-card { padding: 1rem 1.4rem; }
.category-head { display: flex; align-items: baseline; gap: 0.75rem; flex-wrap: wrap; }
.category-head h2 { margin: 0 0 0.5rem; }
.sub-list { margin: 0 0 0.25rem 1rem; }
.sub-list li { display: flex; gap: 0.6rem; align-items: baseline; }
.side-lessons { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.side-lessons h2 { font-size: 1.05rem; margin: 0 0 0.75rem; }
.side-lessons .plain-list { gap: 0.75rem; }
.side-lessons .answer-text { margin-top: 0.15rem; }

@media print {
  body { background: #fff; font-size: 11pt; }
  .site-header, .site-footer, .no-print, .back, .main-nav { display: none !important; }
  .container { max-width: none; padding: 0; }
  .card { box-shadow: none; border-color: #ccc; break-inside: avoid; }
  .report-highlight { border-left-color: var(--brand); }
  details.report-section > summary { list-style: none; }
  a { color: inherit; text-decoration: none; }
}

@media (max-width: 1000px) {
  .checkin-layout { grid-template-columns: 1fr; }
  .checkin-side { position: static; max-height: none; }
}

@media (max-width: 640px) {
  .two-col, .role-choices, .role-choices.two { grid-template-columns: 1fr; }
  .container { padding-top: 1.25rem; }
  .card, .form-card { padding-left: 1rem; padding-right: 1rem; }
  .form-section { grid-template-columns: 1fr; gap: 0.4rem; }
  .has-timeline .rail::before { display: none; }
  .brand img { height: 28px; }
  .brand-app { display: none; }
  .site-header-inner { flex-wrap: wrap; }
  .main-nav { order: 3; width: 100%; margin: 0.25rem 0 0; }

  /* Tables become stacked cards on phones */
  table.list.stacked thead { display: none; }
  table.list.stacked, table.list.stacked tbody, table.list.stacked tr, table.list.stacked td { display: block; width: 100%; }
  table.list.stacked tr { padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
  table.list.stacked tr:last-child { border-bottom: 0; }
  table.list.stacked td { border: 0; padding: 0.25rem 1rem; }
  table.list.stacked td[data-label]::before {
    content: attr(data-label);
    display: inline-block;
    min-width: 7.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
  }
}
