/* Sub for Santa — the one stylesheet.
 *
 * Every page links this file and nothing else. The look comes from
 * docs/handbook/: cream ground, a deep green coordinator console, cranberry
 * for the donor's next step, amber for anything still pending. Manrope for
 * headings, IBM Plex Sans for everything else, both self-hosted in /fonts.
 *
 * No inline styles anywhere — the Content-Security-Policy in _headers only
 * allows styles from this origin, and a `style=""` attribute counts as
 * inline. Pages change how things look by changing classes.
 */

/* ---------- Tokens ---------- */

:root {
  --font-display: "Manrope", "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --font-body: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;

  --cream: #f4efe9;
  --cream-2: #fbf6ef;
  --paper: #ffffff;
  --sand: #ece6df;

  --ink: #1a1614;
  --ink-2: #5d5651;
  --ink-3: #8c837d;
  --line: #dcd2c9;

  --green-900: #14432e;
  --green-deep: #124a30;
  --green-700: #1b6b45;
  --green-600: #1f7a4c;
  --green-300: #8fb49e;
  --green-100: #e9f0ea;
  --green-50: #f7faf8;
  --green-xmas-light: #ddf0e2;

  --cranberry: #a81e32;
  --cranberry-700: #8e1829;
  --cranberry-100: #f6e4e7;
  --cranberry-50: #fbf1f2;

  --amber: #e8b54b;
  --amber-800: #8a6212;
  --amber-900: #6e4e0e;
  --amber-200: #ead9b6;
  --amber-100: #f7ecd6;
  --amber-text: #3f2d08;

  --radius: 8px;
  --radius-sm: 6px;
  --radius-pill: 20px;
  --shadow-sm: 0 1px 2px rgba(26, 22, 20, 0.05);
  --shadow: 0 1px 2px rgba(26, 22, 20, 0.06), 0 10px 28px rgba(26, 22, 20, 0.1);

  --content-width: 1180px;
}

/* ---------- Fonts ---------- */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url("/fonts/manrope-variable-latin.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-variable-latin.woff2") format("woff2");
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 15px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.5;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem;
  line-height: 1.2;
}

h1 {
  font-size: 1.9rem;
  font-weight: 800;
}

h2 {
  font-size: 1.25rem;
}

h3 {
  font-size: 1.05rem;
}

p {
  margin: 0 0 0.8rem;
}

a {
  color: var(--green-700);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

.muted {
  color: var(--ink-3);
}

.small {
  font-size: 0.87rem;
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.hidden {
  display: none !important;
}

/* ---------- The brand bar: green, cranberry, green, cranberry ---------- */

.brand-bar {
  height: 5px;
  background: linear-gradient(
    90deg,
    var(--green-900) 0 25%,
    var(--cranberry) 25% 50%,
    var(--green-700) 50% 75%,
    var(--cranberry) 75% 100%
  );
}

/* ---------- Public shell (donor and family pages) ---------- */

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.site-header .inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.brand svg {
  width: 26px;
  height: 26px;
  color: var(--green-700);
  flex: none;
}

.brand .name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  display: block;
  line-height: 1.15;
}

.brand .sub {
  font-size: 0.78rem;
  color: var(--ink-3);
  display: block;
}

.site-nav {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.site-nav a {
  text-decoration: none;
  color: #000;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  border-color: var(--cranberry);
}

.page {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 28px 24px 64px;
}

.page-narrow {
  max-width: 720px;
}

/* ---------- Coordinator console shell ---------- */

.console {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 100vh;
}

.console-nav {
  background: var(--green-900);
  color: #fff;
  padding: 18px 14px;
}

.console-nav .brand,
.console-nav .brand svg {
  color: #fff;
}

.console-nav .brand .sub {
  color: rgba(255, 255, 255, 0.7);
}

.console-nav ul {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
}

.console-nav li + li {
  margin-top: 2px;
}

.console-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border-left: 3px solid transparent;
  font-weight: 500;
}

.console-nav a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.console-nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-left-color: var(--amber);
}

.console-nav .badge {
  margin-left: auto;
  background: var(--cranberry);
  color: #fff;
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 1px 8px;
}

.console-nav .badge:empty {
  display: none;
}

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

.topbar {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar h1 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
}

.spacer {
  flex: 1;
}

.console-content {
  padding: 24px 28px 64px;
}

/* ---------- Cards, buttons, pills ---------- */

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

.card-tinted {
  background: var(--cream-2);
}

.stack {
  display: grid;
  gap: 16px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.93rem;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  background: var(--sand);
  color: var(--ink);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--cranberry);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--cranberry-700);
}

.btn-green {
  background: var(--green-700);
  color: #fff;
}

.btn-green:hover:not(:disabled) {
  background: var(--green-900);
}

.btn-outline {
  background: var(--paper);
  border-color: var(--line);
  color: var(--ink);
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--ink-3);
}

.btn-danger {
  background: var(--paper);
  border-color: var(--cranberry-100);
  color: var(--cranberry);
}

.btn-danger:hover:not(:disabled) {
  background: var(--cranberry-50);
}

.btn-lg {
  padding: 18px 24px;
  font-size: 20px;
  font-weight: 700;
}

.btn-sm {
  padding: 6px 11px;
  font-size: 0.85rem;
}

.btn-block {
  width: 100%;
}

.pill {
  display: inline-block;
  border-radius: var(--radius-pill);
  padding: 2px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.pill-pending {
  background: var(--amber-100);
  color: var(--amber-900);
}

.pill-live {
  background: var(--green-100);
  color: var(--green-700);
}

.pill-rejected,
.pill-withdrawn,
.pill-grey {
  background: var(--sand);
  color: var(--ink-2);
}

.pill-sponsored {
  background: var(--sand);
  color: var(--ink);
}

.pill-delivered {
  background: var(--green-900);
  color: #fff;
}

.pill-xmas {
  background: var(--green-xmas-light);
  color: var(--green-deep);
}

.tag {
  display: inline-block;
  background: var(--green-xmas-light);
  color: var(--green-deep);
  border-radius: var(--radius-pill);
  padding: 2px 10px;
  font-size: 0.78rem;
  font-weight: 600;
}

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

/* ---------- Notices ---------- */

.notice {
  border-radius: var(--radius);
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--cream-2);
  font-size: 0.93rem;
}

.notice-amber {
  background: var(--amber-100);
  border-color: var(--amber-200);
  color: var(--amber-text);
}

.notice-green {
  background: var(--green-50);
  border-color: var(--green-300);
  color: var(--green-900);
}

.notice-red {
  background: var(--cranberry-50);
  border-color: var(--cranberry-100);
  color: var(--cranberry);
}

/* ---------- Forms ---------- */

.field {
  display: block;
  margin-bottom: 14px;
}

.field > span,
.field-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--ink-2);
}

.field .hint {
  display: block;
  font-size: 0.82rem;
  color: var(--ink-3);
  margin-top: 4px;
  font-weight: 400;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="url"],
select,
textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.textarea-compact {
  min-height: 52px;
  resize: none;
}

.char-count {
  display: block;
  text-align: right;
  font-size: 0.78rem;
  color: var(--ink-3);
  margin-top: 4px;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--green-300);
  outline-offset: 1px;
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 8px 0;
}

.check input {
  margin-top: 4px;
  accent-color: var(--green-700);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

.status-line {
  min-height: 1.4em;
  font-size: 0.9rem;
  color: var(--ink-2);
}

/* ---------- Folding sections, lists, tables ---------- */

details.section {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow-sm);
}

details.section + details.section {
  margin-top: 14px;
}

details.section > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
}

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

details.section > summary::before {
  content: "";
  width: 7px;
  height: 7px;
  border: solid var(--ink-3);
  border-width: 0 2px 2px 0;
  transform: rotate(-45deg);
  transition: transform 0.15s;
  flex: none;
}

details.section[open] > summary::before {
  transform: rotate(45deg);
}

details.section > summary .count {
  color: var(--ink-3);
  font-weight: 600;
}

.row-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}

.row-list li {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.row-list .ref {
  font-family: var(--font-display);
  font-weight: 700;
  min-width: 46px;
}

.row-list .meta {
  color: var(--ink-3);
  font-size: 0.85rem;
}

.row-list .actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  flex: none;
}

.empty {
  color: var(--ink-3);
  padding: 12px 0 4px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.table th {
  text-align: left;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 10px 12px;
  background: #f7f2ec;
  border-bottom: 1px solid var(--line);
}

.table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.table tr:last-child td {
  border-bottom: 0;
}

/* ---------- Tiles and progress ---------- */

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

.tile .num {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 6px;
}

.tile.green .num {
  color: var(--green-700);
}

.tile.red .num {
  color: var(--cranberry);
}

.tile .label {
  font-weight: 600;
}

.progress {
  height: 8px;
  background: var(--green-xmas-light);
  border-radius: 6px;
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  background: var(--green-700);
  width: 0;
  transition: width 0.3s;
}

/* ---------- Sign-in card ---------- */

.auth-card {
  max-width: 460px;
  margin: 36px auto 0;
}

.auth-card .btn {
  margin-top: 6px;
}

.divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 18px 0;
}

/* ---------- Phone ---------- */

@media (max-width: 900px) {
  .console {
    grid-template-columns: 1fr;
  }

  .console-nav {
    padding: 14px 16px;
  }

  .console-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 12px;
  }

  .console-nav a {
    padding: 8px 10px;
    border-left: 0;
    border-bottom: 3px solid transparent;
  }

  .console-nav a[aria-current="page"] {
    border-bottom-color: var(--amber);
  }

  .two-col,
  .form-row {
    grid-template-columns: 1fr;
  }

  .site-nav {
    gap: 14px;
  }
}

@media (max-width: 600px) {
  .page,
  .console-content {
    padding: 18px 16px 48px;
  }

  .topbar {
    padding: 12px 16px;
  }

  .site-header .inner {
    padding: 12px 16px;
    flex-wrap: wrap;
  }

  .row-list li {
    flex-wrap: wrap;
  }

  .row-list .actions {
    margin-left: 0;
    width: 100%;
  }

  .row-list .actions .btn {
    flex: 1;
  }

  .title-tree {
    height: 60px;
  }

  h1 {
    font-size: 1.5rem;
  }
}

/* ---------- Review pane (A2) ---------- */

.review {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
  align-items: start;
}

.review-list {
  padding: 14px 10px;
}

.review-list .eyebrow {
  padding: 0 10px 8px;
}

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

.pick-list .empty {
  padding: 8px 10px;
}

.pick-list button {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-top: 1px solid var(--line);
  border-left: 3px solid transparent;
  padding: 12px 10px;
  cursor: pointer;
  display: grid;
  gap: 3px;
  font: inherit;
}

.pick-list button:hover {
  background: var(--cream-2);
}

.pick-list button[aria-current="true"] {
  background: var(--green-50);
  border-left-color: var(--green-700);
}

.pick-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.pick-top .ref {
  font-family: var(--font-display);
  font-weight: 700;
}

.pick-top .meta,
.pick-summary {
  font-size: 0.88rem;
  color: var(--ink-2);
}

.story-box {
  background: var(--green-xmas-light);
  border: 1px solid var(--green-700);
  border-left: 6px solid var(--cranberry);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 0 0 16px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

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

.title-row h1 {
  color: var(--green-deep);
}

.title-tree {
  height: 90px;
  flex: none;
}

.people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.person {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
}

.person h3 {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 4px 8px;
  font-size: 1rem;
  margin-bottom: 6px;
}

.person-label {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.person .sizes {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.size {
  background: var(--green-xmas-light);
  border: 1px solid var(--green-700);
  box-sizing: border-box;
  border-radius: var(--radius-sm);
  padding: 1px 8px;
  font-size: 15px;
  font-weight: 400;
  white-space: normal;
  overflow-wrap: anywhere;
}

.person p {
  margin: 6px 0 0;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.person p b {
  color: var(--green-700);
  font-weight: 600;
}

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

.check-list li {
  display: flex;
  gap: 10px;
  padding: 6px 0;
  align-items: flex-start;
}

.check-list .mark {
  font-weight: 700;
  width: 1.2em;
  flex: none;
  text-align: center;
}

.check-list .ok {
  color: var(--green-700);
}

.check-list .info {
  color: var(--ink-2);
}

.check-list .warn {
  color: var(--amber-800);
}

.check-list .bad {
  color: var(--cranberry);
}

@media (max-width: 900px) {
  .review {
    grid-template-columns: 1fr;
  }
}

/* ---------- Public pages: landing and browse (D1, D2, D10) ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr);
  gap: 28px;
  align-items: start;
  padding: 12px 0 28px;
  border-bottom: 1px solid var(--line);
}

.hero-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero h1 {
  font-size: 2.3rem;
  margin: 6px 0 12px;
  color: var(--green-deep);
}

.hero-tree {
  height: 110px;
  flex: none;
}

.lede {
  font-size: 1.05rem;
  color: var(--ink-2);
  max-width: 44rem;
}

.count-card .num {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  color: var(--green-700);
  line-height: 1;
}

.count-card .label {
  font-weight: 600;
  margin: 4px 0 12px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.step-icon {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--green-100);
  color: var(--green-700);
  font-family: var(--font-display);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.step h3 {
  margin-bottom: 4px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0 0;
  flex-wrap: wrap;
}

.browse-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.browse-head-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.browse-head h1 {
  color: var(--green-deep);
}

.browse-tree {
  height: 60px;
  flex: none;
}

.filters {
  display: flex;
  gap: 12px;
}

.filters .field {
  margin: 0;
  min-width: 160px;
}

.family-list {
  display: grid;
  gap: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--cranberry);
  border-radius: var(--radius);
  overflow: hidden;
}

.family-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border-top: 1px solid var(--line);
}

.family-row:first-child {
  border-top: 0;
}

.family-row:nth-child(even) {
  background: var(--cream-2);
}

.family-icon {
  width: 56px;
  height: 56px;
  box-sizing: border-box;
  border-radius: var(--radius);
  background: var(--green-xmas-light);
  border: 1px solid var(--green-700);
  display: flex;
  align-items: center;
  justify-content: center;
}

.family-icon img {
  height: 34px;
}

.family-body h2 {
  font-size: 1.05rem;
  margin-bottom: 2px;
  color: var(--green-700);
}

.family-ref {
  font-weight: 400;
  font-family: var(--font-body);
}

.family-body .tags {
  margin-top: 8px;
}

.family-actions {
  display: flex;
  gap: 14px;
  align-items: center;
}

.family-view {
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .hero,
  .steps {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero-tree {
    height: 60px;
  }
}

@media (max-width: 600px) {
  .family-row {
    grid-template-columns: 1fr;
  }

  .family-actions {
    width: 100%;
    justify-content: space-between;
  }

  .family-actions .btn {
    flex: 1;
  }

  .filters {
    width: 100%;
  }

  .filters .field {
    flex: 1;
    min-width: 0;
  }
}

/* ---------- Story, confirmation, my families (D3–D8) ---------- */

.story-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr);
  gap: 24px;
  align-items: start;
}

.sponsor-steps {
  padding-left: 1.3em;
  margin: 0 0 16px;
}

.sponsor-steps li {
  margin-bottom: 6px;
}

.card-feature {
  padding: 28px 28px;
}

.card-feature h2 {
  font-size: 26px;
}

.card-feature .sponsor-steps {
  font-size: 18px;
  line-height: 1.5;
}

.card-feature .sponsor-steps li {
  margin-bottom: 12px;
}

.card-feature .btn {
  padding: 18px 24px;
  font-size: 20px;
  font-weight: 700;
}

.card-feature-banner {
  display: block;
  height: 48px;
  margin: 0 auto 14px;
}

.gift-icon {
  height: 28px;
  vertical-align: middle;
}

.thank-you-tree {
  height: 32px;
  vertical-align: middle;
  margin-left: 6px;
}

.confirmed-head {
  text-align: center;
  padding: 16px 0 24px;
}

.confirmed-head h1 {
  color: var(--green-deep);
}

.confirmed-mark {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--green-xmas-light);
  border: 2px solid var(--green-700);
  box-sizing: border-box;
  color: var(--green-700);
  font-size: 1.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.confirmed-thanks {
  margin: 10px 0 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--cranberry);
}

.confirmed-gifts {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}

.confirmed-gift {
  height: 40px;
}

.eyebrow-xmas {
  color: var(--green-deep);
}

.plain-list {
  margin: 6px 0 12px;
  padding-left: 1.2em;
}

.plain-list b {
  color: var(--green-700);
  font-weight: 600;
}

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

.checklist li {
  padding: 6px 0;
}

.checklist li.done span {
  text-decoration: line-through;
  color: var(--ink-3);
}

.checklist .check {
  margin: 0;
  align-items: center;
}

.claim-card {
  border-left: 6px solid var(--cranberry);
}

.claim-title-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.claim-card h2 {
  margin-bottom: 2px;
  color: var(--green-700);
}

.claim-card .two-col {
  margin-top: 14px;
}

.claim-member + .claim-member {
  margin-top: 14px;
}

.claim-member-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  column-gap: 10px;
  row-gap: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
}

.claim-actions {
  margin-top: 16px;
  flex-wrap: wrap;
}

.release-box {
  margin-top: 16px;
}

@media (max-width: 900px) {
  .story-layout {
    grid-template-columns: 1fr;
  }
}

.uses-field {
  margin: 0;
  width: 240px;
}

p.hint {
  font-size: 0.82rem;
  color: var(--ink-3);
  margin: -6px 0 12px;
}

/* A logo set in Drive settings replaces the gift icon. */
.brand img {
  height: 32px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  flex: none;
}

.color-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.color-row .field {
  min-width: 150px;
}

input[type="color"] {
  width: 64px;
  height: 36px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
}

/* A button that reads as a link, for "send a new code" and the like inside
   a sentence. A real <button> so it is keyboard-reachable and never
   navigates. */
.link-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--green-700);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.link-button:disabled {
  color: var(--ink-3);
  text-decoration: none;
  cursor: default;
}

/* ---------- Printable wish list (D5 print) ---------- */

.print-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--green-300);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.print-banner-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green-xmas-light);
  color: var(--green-700);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.print-banner-icon svg {
  width: 22px;
  height: 22px;
}

.print-banner button svg {
  width: 16px;
  height: 16px;
}

.print-banner-text {
  flex: 1 1 280px;
  min-width: 0;
}

.print-banner-text p {
  margin: 0;
}

.print-banner-sub {
  color: var(--ink-3);
  font-size: 0.85rem;
}

.list-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px 12px;
  margin-bottom: 4px;
}

.tick-box {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  margin-right: 8px;
  flex: none;
  vertical-align: middle;
}

.bag-tags-row {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.bag-tag {
  flex: 1;
  border: 1.5px dashed var(--ink-3);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  text-align: center;
}

.bag-tag div:first-child {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  line-height: 1.1;
}

.bag-tag-sub {
  font-size: 0.78rem;
  color: var(--ink-3);
}

.print-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--ink-3);
}

/* Coordinator copy only (Epic #30): the "Coordinator copy" stamp and the
   family heading that the donor's page draws for itself. */
.coord-copy-stamp {
  text-align: right;
  font-size: 0.82rem;
  color: var(--ink-3);
  padding-bottom: 8px;
  margin: 0 0 12px;
  border-bottom: 1px solid var(--line);
}

.coord-head {
  margin-bottom: 16px;
}

.coord-head h1 {
  margin: 0 0 4px;
}

.coord-head p {
  margin: 0;
}

/* The roster's Print and Open buttons, side by side. */
.cell-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

/* Where the dashboard builds a coordinator copy. Never shown on screen. */
.print-root {
  display: none;
}

/* ---------- Roster search (Epic #17) ---------- */

/* Read by screen readers, invisible on screen: the search box's label. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.roster-head {
  flex-wrap: wrap;
  align-items: center;
}

/* "Roster" with the count beside it, as the artifact draws it. */
.roster-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  min-width: 0;
}

/* Its own row, right above the table (decided 2026-11-21): the search box,
   then a chip per filter that's on. */
.roster-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 14px 0 12px;
}

/* The magnifier and the × sit inside the box. */
.roster-search {
  position: relative;
  flex: 1 1 320px;
  max-width: 460px;
}

.roster-search > svg {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  color: var(--ink-2);
  pointer-events: none;
}

.roster-search input[type="text"] {
  min-height: 44px;
  padding-left: 38px;
  padding-right: 44px;
}

.roster-search-clear {
  position: absolute;
  right: 4px;
  top: 50%;
  width: 36px;
  height: 36px;
  margin-top: -18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--ink-2);
  cursor: pointer;
}

.roster-search-clear:hover {
  background: var(--sand);
}

.roster-search-clear svg {
  width: 14px;
  height: 14px;
}

/* No match: a message under the table's header, not a missing table. */
.table td.roster-empty {
  padding: 40px 20px;
  text-align: center;
  vertical-align: middle;
}

.roster-empty p {
  margin: 0 0 4px;
}

.roster-empty-title {
  font-weight: 700;
  color: var(--ink);
}

.roster-empty-clear {
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  background: none;
  font-weight: 600;
  color: var(--green-700);
  cursor: pointer;
}

/* ---------- Roster column filters (Epic #17, slice 17c) ---------- */

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 4px 10px 4px 12px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--green-100);
  color: var(--green-700);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.filter-chip svg,
.filter-option svg {
  width: 12px;
  height: 12px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.filter-clear-all {
  min-height: 36px;
  padding: 4px 6px;
  border: 0;
  background: none;
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--green-700);
  cursor: pointer;
}

/* A filtered column's header is one big button: its label and a caret. */
.table th.has-filter {
  padding-top: 0;
  padding-bottom: 0;
  padding-right: 6px;
}

.filter-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  text-transform: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}

.filter-caret {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 4px;
}

.filter-caret svg {
  width: 10px;
  height: 10px;
  fill: currentColor;
}

.filter-button:hover .filter-caret {
  background: var(--sand);
}

/* Green once that column is filtered, as the artifact draws it. */
.filter-button.is-active .filter-caret {
  background: var(--green-600);
  color: #fff;
}

/* The menus are popovers. Closed, they're hidden: by the browser, and by
   the first rule here too, for a browser that doesn't know popovers.
   Only :popover-open shows one, so a closed menu can't appear by
   accident. Open, it sits above the page and dashboard.js places it. */
.filter-menu {
  display: none;
  position: absolute;
  inset: auto;
  margin: 0;
  width: 240px;
  max-height: min(60vh, 420px);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.filter-menu:popover-open {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.filter-menu-heading {
  margin: 0;
  padding: 6px 10px 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  font-size: 0.92rem;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.filter-option:hover {
  background: var(--cream);
}

.filter-option[aria-pressed="true"] {
  background: var(--green-100);
  color: var(--green-900);
  font-weight: 600;
}

.filter-option svg {
  width: 14px;
  height: 14px;
}

/* Keeps unticked options' words lined up with the ticked one's. */
.filter-check-space {
  width: 14px;
  flex: none;
}

.filter-menu-divider {
  margin: 4px 6px;
  border: 0;
  border-top: 1px solid var(--line);
}

/* ---------- The note's soft stop (Epic #27) ---------- */

/* A native <dialog>, like the print picker: its closed state is hidden by
   the browser, and nothing here sets display. */
.note-check {
  width: 440px;
  max-width: calc(100% - 32px);
  margin: 120px auto auto;
  padding: 22px 24px;
  border: 0;
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(26, 22, 20, 0.06), 0 18px 48px rgba(26, 22, 20, 0.28);
}

.note-check::backdrop {
  background: rgba(26, 22, 20, 0.5);
}

.note-check h2 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.note-check p {
  margin: 0 0 10px;
}

.note-check-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

/* ---------- Print wish lists picker (Epic #30) ---------- */

.roster-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.roster-actions .btn svg,
.cell-actions .btn svg,
.picker-foot .btn svg {
  width: 14px;
  height: 14px;
  flex: none;
}

/* A native <dialog>. Its closed state is hidden by the browser; nothing
   here sets display, so it can't accidentally show while closed. */
.picker {
  width: 600px;
  max-width: calc(100% - 32px);
  margin: 72px auto auto;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(26, 22, 20, 0.06), 0 18px 48px rgba(26, 22, 20, 0.28);
}

.picker::backdrop {
  background: rgba(26, 22, 20, 0.5);
}

.picker-top {
  padding: 20px 22px 0;
}

.picker-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.picker-head h2 {
  margin: 0;
  font-size: 1.25rem;
}

.picker-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: -6px -8px 0 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
}

.picker-close svg {
  width: 18px;
  height: 18px;
}

.picker-intro {
  margin: 6px 0 16px;
  color: var(--ink-2);
  font-size: 0.875rem;
}

.picker-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 14px;
}

.picker-search {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 200px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-2);
}

.picker-search input {
  width: 100%;
  font-weight: 400;
}

.picker-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.picker-list {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.picker-list legend {
  padding: 0 22px 8px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* A few hundred approved families scroll inside the dialog, so the
   footer's Print button never leaves the screen. */
.picker-rows {
  max-height: min(50vh, 440px);
  overflow-y: auto;
  border-bottom: 1px solid var(--line);
}

.picker-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  background: var(--paper);
  cursor: pointer;
}

.picker-row:has(input:checked) {
  background: var(--green-50);
}

.picker-row input {
  width: 18px;
  height: 18px;
  margin: 0 0 0 8px;
  accent-color: var(--green-700);
  flex: none;
}

.picker-num {
  min-width: 40px;
  font-family: var(--font-display);
  font-weight: 700;
}

.picker-summary {
  flex: 1;
  min-width: 0;
  font-size: 0.875rem;
  color: var(--ink-2);
}

.picker-empty {
  margin: 0;
  padding: 14px 22px;
  color: var(--ink-2);
  font-size: 0.875rem;
}

.picker-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 16px 22px;
  background: var(--cream-2);
  border-radius: 0 0 10px 10px;
}

.picker-count {
  margin-right: auto;
  font-size: 0.875rem;
  color: var(--ink-2);
}

@media print {
  .site-header,
  .site-nav,
  .brand-bar,
  .print-banner,
  .confirmed-mark,
  .confirmed-gifts,
  .form-actions,
  .drop-contact {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .card {
    box-shadow: none;
    border-color: #000;
  }

  .bag-tag,
  .tick-box {
    border-color: #000;
  }

  /* A long wish list flows onto a second sheet, but one person's sizes
     and items are never split across the break (decided 2026-11-18). */
  .wish-person {
    break-inside: avoid;
  }

  /* Dashboard: only after a roster row's Print button is clicked does the
     page swap to the coordinator copy. Pressing Cmd-P on its own still
     prints the dashboard. */
  body.printing-wishlist .console {
    display: none !important;
  }

  /* The space above a family lives on each family rather than once on the
     box around them all, so every family's first sheet starts the same. */
  body.printing-wishlist .print-root {
    display: block;
    padding-top: 0;
  }

  .print-family {
    padding-top: 28px;
  }

  /* Several families: each starts on a fresh sheet. "+" means every
     family after the first, so there is never a blank sheet at the end. */
  .print-family + .print-family {
    break-before: page;
  }
}
