:root {
  --ink: #1f2933;
  --muted: #6b7280;
  --accent: #0e7490;
  --accent-dark: #155e75;
  --bg: #f8fafc;
  --card: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background: var(--card);
  border-bottom: 1px solid #e5e7eb;
}

.brand {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--accent-dark);
  text-decoration: none;
}

.site-header nav {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.site-header nav a { color: var(--ink); text-decoration: none; }
.site-header nav a:hover { color: var(--accent); }

.inline-form { display: inline; }

/* User dropdown menu (uses <details>, so it works without JavaScript) */
.user-menu { position: relative; }

.user-menu summary {
  cursor: pointer;
  list-style: none;       /* hide the default disclosure triangle */
  color: var(--ink);
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
}
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover,
.user-menu[open] summary { color: var(--accent); background: var(--bg); }

.user-menu-items {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  min-width: 11rem;
  background: var(--card);
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  padding: 0.4rem 0;
  display: flex;
  flex-direction: column;
  z-index: 10;
}

.user-menu-items a,
.user-menu-items .link-button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 1rem;
  color: var(--ink);
  text-decoration: none;
}
.user-menu-items a:hover,
.user-menu-items .link-button:hover {
  background: var(--bg);
  color: var(--accent);
}

.link-button {
  background: none;
  border: none;
  padding: 0;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
}
.link-button:hover { color: var(--accent); }

.container {
  flex: 1;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.hero { text-align: center; padding: 3.5rem 0 2.5rem; }
.hero h1 {
  font-size: 2.4rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(100deg, var(--accent-dark), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--accent-dark);
}
.hero p { color: var(--muted); font-size: 1.1rem; margin-bottom: 1.6rem; }
.hero-sub { margin-top: 1rem; font-size: 0.95rem; }
.hero-sub a { color: var(--accent-dark); }

.button-large { font-size: 1.1rem; padding: 0.75rem 1.6rem; }
.invite-cta { justify-content: center; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.2rem;
  padding: 1.5rem 0 2.5rem;
}
.feature {
  background: var(--card);
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 1.2rem 1.3rem;
}
.feature-icon { font-size: 1.7rem; margin-bottom: 0.4rem; }
.feature h2 { font-size: 1.05rem; margin: 0 0 0.4rem; }
.feature p { color: var(--muted); font-size: 0.92rem; margin: 0; line-height: 1.5; }

.button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  font-size: 1rem;
  cursor: pointer;
}
.button:hover { background: var(--accent-dark); }
.button, .site-header nav a, .trip-list a { transition: background 0.15s, color 0.15s; }

a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.card-form {
  background: var(--card);
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.5rem;
  max-width: 480px;
}

.button-block { display: block; text-align: center; }
.or-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0 0.5rem;
  color: #6b7280;
  font-size: 0.9rem;
}
.or-divider::before,
.or-divider::after { content: ""; flex: 1; border-top: 1px solid #e5e7eb; }

.card-form input,
.card-form textarea,
.card-form select {
  width: 100%;
  padding: 0.5rem;
  margin-top: 0.25rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font: inherit;
}

/* Checkbox groups (CheckboxSelectMultiple): the full-width input rule
   above would stretch each box onto its own line away from its label. */
.card-form input[type="checkbox"],
.card-form input[type="radio"] {
  width: auto;
  margin: 0;
}
/* Radio/checkbox choices (Django renders each as <label><input> text</label>) */
.card-form label:has(> input[type="radio"]),
.card-form label:has(> input[type="checkbox"]) {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 400;
  margin: 0.25rem 0;
}
.card-form ul {
  list-style: none;
  padding: 0;
  margin: 0.25rem 0 0;
}
.card-form ul li { margin: 0.25rem 0; }
.card-form ul label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 400;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.trip-list { list-style: none; padding: 0; }
.trip-list li {
  background: var(--card);
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.9rem 1.2rem;
  margin-bottom: 0.6rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.trip-list li:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(14, 116, 144, 0.08);
}
.trip-list a { color: var(--accent-dark); font-weight: 600; text-decoration: none; font-size: 1.05rem; }

.trip-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.trip-card-dates { text-align: right; font-variant-numeric: tabular-nums; }
.trip-countdown { color: var(--accent-dark); font-size: 0.85rem; font-weight: 600; }
.trip-underway { color: #15803d; }

.empty-state {
  text-align: center;
  background: var(--card);
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  padding: 2.5rem 1.5rem;
}
.empty-state p { margin: 0 0 0.5rem; }
.empty-state .button { margin-top: 0.8rem; }

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

.messages { list-style: none; padding: 0; }
.messages li {
  padding: 0.6rem 1rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  background: #ecfeff;
  border: 1px solid #a5f3fc;
}
.messages li.success { background: #f0fdf4; border-color: #86efac; }
.messages li.error   { background: #fef2f2; border-color: #fca5a5; }

/* --- Planning: shared bits ---------------------------------------------- */

.button-row { display: flex; gap: 0.5rem; align-items: center; }

.button-secondary { background: #e2e8f0; color: var(--ink); }
.button-secondary:hover { background: #cbd5e1; }

.button-danger { background: #b91c1c; }
.button-danger:hover { background: #991b1b; }

.button-small { padding: 0.25rem 0.7rem; font-size: 0.85rem; }
.button-voted { background: #15803d; }
.button-voted:hover { background: #166534; }

.card-form-wide { max-width: 640px; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 1.2rem;
}
.data-table th, .data-table td {
  padding: 0.55rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
}
.data-table thead th { font-size: 0.8rem; text-transform: uppercase; color: var(--muted); }
.data-table .num { text-align: right; }
.data-table tfoot th { border-top: 2px solid #e5e7eb; }

.row-cancelled td { opacity: 0.45; text-decoration: line-through; }
.row-chosen td { background: #f0fdf4; }

.detail-grid {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.35rem 1.2rem;
}
.detail-grid dt { color: var(--muted); }
.detail-grid dd { margin: 0; }

.decision-callout {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 0.8rem 1.2rem;
  margin-bottom: 1.2rem;
}
.decision-callout h2 { margin: 0 0 0.4rem; font-size: 1.05rem; }
.decision-callout ul { margin: 0; padding-left: 1.2rem; }

/* Status badges */
.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
}
.badge-researching { background: #e0f2fe; color: #075985; }
.badge-deciding    { background: #fef3c7; color: #92400e; }
.badge-decided     { background: #dcfce7; color: #166534; }
.badge-booked      { background: #dbeafe; color: #1e40af; }
.badge-completed   { background: #e2e8f0; color: #334155; }
.badge-cancelled   { background: #fee2e2; color: #991b1b; }

/* Category colors (bars, chips, headings) */
.cat-transport { background: #0e7490; }
.cat-lodging   { background: #7c3aed; }
.cat-activity  { background: #16a34a; }
.cat-dining    { background: #ea580c; }
.cat-logistics { background: #64748b; }
.cat-other     { background: #a21caf; }

.cat-text-transport { color: #0e7490; }
.cat-text-lodging   { color: #7c3aed; }
.cat-text-activity  { color: #16a34a; }
.cat-text-dining    { color: #ea580c; }
.cat-text-logistics { color: #64748b; }
.cat-text-other     { color: #a21caf; }

.category-head { margin-bottom: 0.4rem; }
.category-link { color: inherit; text-decoration: none; }
.category-link:hover { text-decoration: underline; }

/* Persistent trip navigation tabs */
.trip-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 1.2rem;
}
.trip-tabs a {
  padding: 0.45rem 0.9rem;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 6px 6px 0 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}
.trip-tabs a:hover { color: var(--accent-dark); background: #eef4f6; }
.trip-tabs a.active {
  color: var(--accent-dark);
  border-bottom-color: var(--accent);
  background: #eef4f6;
}

/* Planning-area sub-tabs (one per category workspace) */
.subtabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0.6rem 0 1rem;
}
.subtab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.8rem;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}
.subtab:hover { border-color: var(--accent); color: var(--accent-dark); }
.subtab.active { border-color: var(--accent); background: #eef4f6; color: var(--accent-dark); }
.subtab-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  display: inline-block;
}
.subtab-count { color: var(--muted); font-weight: 400; }

/* "Add area" menu on the sub-tab row (JS-free, like the user menu) */
.add-area { position: relative; }
.add-area summary {
  list-style: none;
  cursor: pointer;
  padding: 0.3rem 0.8rem;
  border: 1px dashed #cbd5e1;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}
.add-area summary::-webkit-details-marker { display: none; }
.add-area summary:hover { color: var(--accent-dark); border-color: var(--accent); }
.add-area-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 0.35rem);
  min-width: 12rem;
  background: var(--card);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  padding: 0.4rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  z-index: 10;
}

.overdue { color: #b91c1c; font-weight: 700; }

.option-details { font-size: 0.85rem; }

.scope-tag {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #7c3aed;
  border: 1px solid #ddd6fe;
  background: #f5f3ff;
  border-radius: 999px;
  padding: 0.05rem 0.45rem;
  vertical-align: middle;
}

.member-list { list-style: none; padding: 0; }
.member-row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  padding: 0.3rem 0;
}
.member-row select {
  padding: 0.25rem 0.4rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font: inherit;
}

/* Checklists */
.checklist-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}
.checklist-panel {
  background: var(--card);
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem 1.2rem;
}
.checklist { list-style: none; padding: 0; margin: 0 0 1rem; }
.checklist-row {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  padding: 0.3rem 0;
  border-bottom: 1px dashed #f1f5f9;
}
.checklist-text { flex: 1; }
.checklist-done .checklist-text { text-decoration: line-through; opacity: 0.55; }
.check-button {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--accent-dark);
  padding: 0;
}
.checklist-panel .card-form { max-width: none; padding: 0.8rem; }

.option-fieldset {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.8rem 1rem;
  margin: 1rem 0;
  background: #f8fafc;
}
.option-fieldset legend {
  font-weight: 700;
  color: var(--accent-dark);
  padding: 0 0.4rem;
}

.invite-list { list-style: none; padding: 0; margin: 0; }
.invite-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding: 0.3rem 0;
}

.net-positive { color: #15803d; font-weight: 700; }
.net-negative { color: #b91c1c; font-weight: 700; }

.transfer-list li { margin-bottom: 0.4rem; }
.transfer-amount {
  background: #ecfeff;
  border: 1px solid #a5f3fc;
  border-radius: 6px;
  padding: 0.1rem 0.5rem;
  font-weight: 700;
}

.payment-callout { background: #fef2f2; border-color: #fca5a5; }

/* --- Itinerary (day-by-day agenda) --------------------------------------- */

.day-block { margin-bottom: 1.2rem; }
.day-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: 1.05rem;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 0.25rem;
  margin-bottom: 0.5rem;
}
.day-add {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-dark);
  text-decoration: none;
  white-space: nowrap;
}
.day-add:hover { color: var(--accent); }

.agenda { list-style: none; padding: 0; margin: 0; }
.agenda-row {
  display: flex;
  gap: 1rem;
  padding: 0.4rem 0.4rem;
  border-bottom: 1px dashed #f1f5f9;
  align-items: baseline;
}
.agenda-time {
  flex: 0 0 5.5rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.agenda-body { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: baseline; }
.agenda-ongoing { opacity: 0.8; }
.agenda-empty { padding-left: 6.9rem; }

.chip {
  color: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
}

/* --- Gantt timeline ------------------------------------------------------ */

.gantt-scroll { overflow-x: auto; padding-bottom: 0.5rem; }

.gantt {
  display: grid;
  gap: 3px;
  min-width: 100%;
  background: var(--card);
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.6rem;
}

.gantt-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.72rem;
  color: var(--muted);
  padding: 0.2rem 0;
  border-bottom: 2px solid #e5e7eb;
  position: relative;
}
.gantt-weekend { background: #f1f5f9; border-radius: 4px 4px 0 0; }
.gantt-num { font-weight: 700; color: var(--ink); }
.gantt-month {
  position: absolute;
  top: -0.1rem;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--accent-dark);
}
.gantt-day { padding-top: 0.85rem; }

.gantt-bar {
  color: #fff;
  font-size: 0.8rem;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gantt-bar:hover { filter: brightness(1.12); }

.gantt-legend { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.8rem; }
.legend-chip {
  color: #fff;
  font-size: 0.75rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
}

/* --- Date poll ------------------------------------------------------------ */

.date-option {
  background: var(--card);
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.9rem 1.2rem;
  margin-bottom: 0.8rem;
}
.date-option-best { border-color: #86efac; background: #f0fdf4; }
.date-option-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.date-votes {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0;
  margin: 0 0 0.7rem;
}
.date-vote-chip {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: var(--bg);
  color: var(--muted);
}
.date-vote-yes   { background: #dcfce7; border-color: #86efac; color: #166534; }
.date-vote-maybe { background: #fef3c7; border-color: #fcd34d; color: #92400e; }
.date-vote-no    { background: #fee2e2; border-color: #fca5a5; color: #991b1b; }

/* --- Activity feed -------------------------------------------------------- */

.activity-feed {
  background: var(--card);
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.8rem 1.2rem;
  margin-bottom: 1.2rem;
}
.activity-feed h2 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.activity-feed ul { list-style: none; margin: 0; padding: 0; }
.activity-feed li {
  padding: 0.28rem 0.4rem;
  border-bottom: 1px dashed #f1f5f9;
  font-size: 0.92rem;
}
.activity-feed li:last-child { border-bottom: none; }
.activity-new { background: #fefce8; border-radius: 4px; }

.new-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  vertical-align: middle;
  white-space: nowrap;
}

.email-pref { font-size: 0.9rem; }

/* --- Attachments ----------------------------------------------------------- */

.attachment-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.attachment-list li {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  padding: 0.35rem 0;
  border-bottom: 1px dashed #f1f5f9;
}
.attachment-list a { color: var(--accent-dark); font-weight: 600; text-decoration: none; }
.attachment-list a:hover { color: var(--accent); }

/* --- Discussion ----------------------------------------------------------- */

.comment-list { list-style: none; padding: 0; margin: 0 0 1.2rem; }
.comment {
  background: var(--card);
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.7rem 1rem;
  margin-bottom: 0.6rem;
}
.comment-meta {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  margin-bottom: 0.3rem;
}
.comment-meta .inline-form { margin-left: auto; }
.comment-body { white-space: normal; }

.site-footer {
  text-align: center;
  color: var(--muted);
  padding: 1rem;
  border-top: 1px solid #e5e7eb;
}

/* --- Overview dashboard --------------------------------------------------- */

.cat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.8rem;
}
.cat-card {
  background: var(--card);
  border: 1px solid #e5e7eb;
  border-top: 4px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  min-width: 0;
}
.cat-card p { margin: 0.35rem 0; }
.cat-border-transport { border-top-color: #0e7490; }
.cat-border-lodging   { border-top-color: #7c3aed; }
.cat-border-activity  { border-top-color: #16a34a; }
.cat-border-dining    { border-top-color: #ea580c; }
.cat-border-logistics { border-top-color: #64748b; }
.cat-border-other     { border-top-color: #a21caf; }
.cat-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}
.cat-card-title { font-weight: 700; text-decoration: none; }
.cat-card-title:hover { text-decoration: underline; }
.cat-card-cost { font-variant-numeric: tabular-nums; font-weight: 600; }
.cat-card-stats { font-size: 0.85rem; }
.cat-card-list { list-style: none; margin: 0.3rem 0; padding: 0; font-size: 0.9rem; }
.cat-card-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: baseline;
  padding: 0.15rem 0;
}
.cat-card-list li > a:first-child { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.cat-card-next { font-size: 0.9rem; }
.cat-card-add {
  border-style: dashed;
  border-top-width: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cat-card-add summary { border: none; }

.meter {
  height: 0.45rem;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}
.meter-fill { display: block; height: 100%; border-radius: 999px; }
.meter-ok   { background: var(--accent); }
.meter-over { background: #b91c1c; }

.attention-text { color: #92400e; font-weight: 600; }

.dash-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin: 1.2rem 0;
}
.dash-panel {
  background: var(--card);
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.8rem 1.1rem;
  min-width: 0;
}
.dash-panel h2 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.dash-panel p { margin: 0.4rem 0; }
.dash-panel .data-table { font-size: 0.85rem; }
.budget-line { font-size: 1.05rem; }

.people-list { list-style: none; margin: 0 0 0.5rem; padding: 0; }
.people-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.2rem 0.6rem;
  padding: 0.35rem 0;
  border-bottom: 1px dashed #f1f5f9;
}
.people-list li:last-child { border-bottom: none; }
.people-meta { display: flex; gap: 0.6rem; font-size: 0.85rem; }

.manage-travelers {
  background: var(--card);
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.8rem 1.1rem;
  margin-bottom: 1.2rem;
}
.manage-travelers > summary { cursor: pointer; font-weight: 700; font-size: 1.05rem; }
.manage-travelers .member-row { flex-wrap: wrap; }

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

/* Admin-only destructive actions at the foot of a trip */
.danger-zone { margin-top: 2.5rem; padding: 1rem 1.25rem; border: 1px solid #fecaca; border-radius: 8px; background: #fef2f2; }
.danger-zone h2 { margin-top: 0; font-size: 1.05rem; color: #991b1b; }

/* --- Today (one day of the trip, phone-first) ----------------------------- */
.day-nav { flex-wrap: nowrap; }
.day-nav .button { white-space: nowrap; }
.today-banner { padding: 0.7rem 1rem; border-radius: 8px; background: #eef4f6; }
.today-card { margin: 1rem 0; padding: 1rem 1.1rem; border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; }
.today-card h2 { margin: 0 0 0.6rem; font-size: 1.05rem; }
.today-stay { border-color: #c7dfe6; background: #f5fafb; }
.today-stay-row + .today-stay-row { margin-top: 0.5rem; }
.today-agenda { list-style: none; margin: 0; padding: 0; }
.today-event { display: grid; grid-template-columns: 5.2rem 1fr; gap: 0.75rem; padding: 0.65rem 0; border-top: 1px solid #f0f0f0; }
.today-event:first-child { border-top: 0; padding-top: 0; }
.today-time { font-weight: 600; white-space: nowrap; }
.today-title { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: baseline; font-weight: 600; }
.today-details { font-size: 0.92rem; margin-top: 0.2rem; }
.today-notes { font-size: 0.92rem; margin-top: 0.3rem; white-space: normal; }
.today-ongoing { opacity: 0.8; }
.conf-code { font-family: ui-monospace, Consolas, monospace; letter-spacing: 0.03em; }
.today-todos, .today-tomorrow ul { margin: 0; padding-left: 1.1rem; }
.today-time-inline { display: inline-block; min-width: 4.8rem; font-weight: 600; }
@media (max-width: 480px) {
  .today-event { grid-template-columns: 1fr; gap: 0.15rem; }
}

/* --- Checklist templates & trip duplication ------------------------------ */
.template-picker { margin: 1rem 0 1.5rem; }
.template-picker > summary { cursor: pointer; font-weight: 600; color: var(--accent-dark); }
.template-picker .card-form { margin-top: 0.75rem; max-width: 34rem; }
.template-audience { border: 0; padding: 0; margin: 0.5rem 0; }
.template-audience legend { font-weight: 600; margin-bottom: 0.25rem; }
.template-audience label { display: flex; align-items: center; gap: 0.5rem; font-weight: normal; margin: 0.2rem 0; }
.template-audience input { width: auto; margin: 0; }
.reuse-trip { margin-top: 2rem; }
.duplicate-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; margin: 1rem 0 1.5rem; }
.duplicate-summary > div { padding: 0.8rem 1rem; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; }
.duplicate-summary h2 { margin: 0 0 0.4rem; font-size: 1rem; }
.duplicate-summary ul { margin: 0; padding-left: 1.2rem; }

/* --- Chores polish --------------------------------------------------------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.kid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 0.75rem; margin: 0.5rem 0 1rem; }
.kid-card { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.75rem 1rem; border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; color: inherit; text-decoration: none; }
.kid-card:hover { border-color: var(--accent); }
.kid-owed { font-size: 1.25rem; font-weight: 600; color: #15803d; }
.chore-actions { white-space: nowrap; }
.chore-actions > * { vertical-align: middle; }
.done-for-form { display: inline-flex; gap: 0.35rem; align-items: center; margin: 0 0.35rem 0.25rem 0; }
.done-for-form select { width: auto; padding: 0.25rem 0.4rem; font-size: 0.85rem; }
.chore-undo { font-size: 0.85rem; text-decoration: underline; }
.chore-resets { font-size: 0.8rem; margin-top: 0.2rem; }
/* Phones: each chore becomes a small card instead of a too-wide row. */
@media (max-width: 640px) {
  .chore-table thead { display: none; }
  .chore-table, .chore-table tbody, .chore-table tr { display: block; }
  .chore-table tr { padding: 0.7rem 0.9rem; border-bottom: 1px solid #f1f5f9; }
  .chore-table td { display: inline-block; padding: 0.1rem 0.6rem 0.1rem 0; border: 0; text-align: left; }
  .chore-table td:first-child, .chore-table td.chore-actions { display: block; }
  .chore-table td.chore-actions { white-space: normal; padding-top: 0.5rem; }
}

/* Printing any regular page: drop the site chrome. */
@media print {
  .site-header, .site-footer, .trip-tabs, .button-row, .day-add { display: none !important; }
  body { background: #fff; }
}

/* --- Privacy / terms --------------------------------------------------------- */
.legal-page { max-width: 42rem; }
.legal-page h2 { font-size: 1.1rem; margin-top: 1.5rem; }
.footer-links { font-size: 0.85rem; }

.brand { display: inline-flex; align-items: center; gap: 0.5rem; }
.brand img { display: block; border-radius: 7px; }

/* --- Form errors --------------------------------------------------------------- */
.errorlist { list-style: none; margin: 0.4rem 0 0.2rem; padding: 0; color: #b91c1c; font-weight: 600; font-size: 0.9rem; }
.form-error-summary { margin: 0 0 1rem; padding: 0.75rem 1rem; border: 1px solid #fecaca; border-left: 4px solid #dc2626; border-radius: 8px; background: #fef2f2; color: #7f1d1d; }
.form-error-summary ul { margin: 0.35rem 0 0; padding-left: 1.2rem; }
.form-error-summary a { color: inherit; }
