:root {
  --bg: #f3f1ec;
  --ink: #1c2430;
  --muted: #5b6573;
  --card: #ffffff;
  --line: #d7d2c8;
  --ok: #1f6b45;
  --ok-bg: #e5f4ea;
  --warn: #8a5a00;
  --warn-bg: #fff3d6;
  --bad: #8b2e2e;
  --bad-bg: #f8e6e6;
  --cpa: #1f4f7a;
  --cpa-soft: #e7f0f8;
  --tpb: #3d5c3a;
  --tpb-soft: #eaf3e8;
  --accent: #245b8a;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1100px 480px at 8% -8%, #e7eef6 0%, transparent 55%),
    radial-gradient(900px 420px at 100% 0%, #e8efe4 0%, transparent 50%),
    var(--bg);
  line-height: 1.45;
}
main { max-width: 1400px; margin: 0 auto; padding: 1.25rem 1.25rem 3rem; }
a { color: var(--accent); }
h1 { font-size: 1.55rem; margin: 0; letter-spacing: -0.02em; }
h2 { font-size: 1.15rem; margin: 0 0 0.35rem; }
.sub { color: var(--muted); margin: 0.2rem 0 1rem; }
.top { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.top .sub { margin-bottom: 0.85rem; }
nav.site {
  display: flex; flex-wrap: wrap; gap: 0.35rem;
  margin: 0 0 1.75rem;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 1px 0 rgba(28, 36, 48, 0.04);
}
nav.site a {
  text-decoration: none; font-weight: 650; font-size: 0.9rem;
  padding: 0.55rem 0.95rem; border-radius: 9px; border: 1px solid transparent;
  background: transparent; color: var(--accent);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
nav.site a:hover {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}
nav.site a.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 1px 2px rgba(36, 91, 138, 0.28);
}
nav.site a.active:hover {
  background: #1d4f78;
  border-color: #1d4f78;
  color: #fff;
}
.card, .note, table {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
}
.card, .note { padding: 1rem; margin-bottom: 1rem; }
.grid { display: grid; gap: 0.85rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.body-row {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  align-items: stretch;
  margin-bottom: 0.85rem;
}
.body-row > .card { margin-bottom: 0; }
.body-row .progress-card { display: flex; flex-direction: column; }
.body-row .progress-card .hero-num { margin-top: auto; }
.body-row .table-card { padding: 0.65rem; }
.body-row .table-card .table-wrap { margin-bottom: 0; overflow: visible; }
.body-row .table-card table { overflow: visible; }
.body-row .table-card table { border: 0; border-radius: 8px; }
@media (max-width: 900px) {
  .body-row { grid-template-columns: 1fr; }
}
.bar { height: 12px; background: #ece8e0; border-radius: 999px; overflow: hidden; margin: 0.45rem 0; }
.bar > span { display: block; height: 100%; background: var(--accent); }
.bar.cpa > span { background: var(--cpa); }
.bar.tpb > span { background: var(--tpb); }
.bar.ca_anz > span { background: #5c3d82; }
.bar.ipa > span { background: #1f6b5a; }
.bar.tax_institute > span { background: #2a5080; }
.bar.stacked {
  display: flex;
  flex-direction: row;
  align-items: stretch;
}
.bar.stacked > .seg {
  display: block;
  height: 100%;
  flex: 0 0 auto;
  min-width: 0;
}
.bar.stacked.cpa > .seg.completed { background: var(--cpa); }
.bar.stacked.cpa > .seg.watchlist { background: #7aa3c7; }
.bar.stacked.tpb > .seg.completed { background: var(--tpb); }
.bar.stacked.tpb > .seg.watchlist { background: #8fb08c; }
.bar-legend {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem 0.75rem;
  font-size: 0.72rem;
  margin: -0.15rem 0 0.45rem;
  white-space: nowrap;
}
.bar-legend .swatch {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 2px;
  margin-right: 0.25rem;
  vertical-align: -0.05rem;
}
.bar-legend .swatch.completed.cpa { background: var(--cpa); }
.bar-legend .swatch.watchlist.cpa { background: #7aa3c7; }
.bar-legend .swatch.completed.tpb { background: var(--tpb); }
.bar-legend .swatch.watchlist.tpb { background: #8fb08c; }
.bar-legend .swatch.gap { background: #ece8e0; border: 1px solid #d7d2c8; }
.terms h3 { margin: 1.1rem 0 0.35rem; font-size: 1rem; }
.terms ul { margin: 0.35rem 0 0.75rem; padding-left: 1.2rem; }
.terms li { margin: 0.25rem 0; }
.terms p { margin: 0.4rem 0 0.65rem; }
.nums { display: flex; justify-content: space-between; gap: 0.5rem; font-variant-numeric: tabular-nums; }
.pill, .tag {
  display: inline-block; font-size: 0.75rem; font-weight: 700;
  padding: 0.15rem 0.45rem; border-radius: 999px;
}
.pill.ok, .cell.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn, .cell.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad, .cell.bad { background: var(--bad-bg); color: var(--bad); }
.pill.neutral, .cell.neutral { background: #f3f1ec; color: var(--muted); }
a.pill-link {
  text-decoration: none;
  cursor: pointer;
}
a.pill-link:hover {
  filter: brightness(0.96);
  box-shadow: 0 0 0 2px rgba(36, 91, 138, 0.18);
}
.score-breakdown { font-size: 0.82rem; margin-top: 0.65rem; color: var(--muted); }
.score-breakdown strong { color: var(--ink); }
.tight { margin: 0.15rem 0 0; font-size: 0.8rem; }
.note.bad a { color: inherit; font-weight: 700; }
.watch-next-head {
  display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.watch-next-list { list-style: none; margin: 0; padding: 0; }
.watch-next-list > li {
  display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start;
  padding: 0.75rem 0; border-top: 1px solid var(--line);
}
.watch-next-list > li:first-child { border-top: 0; padding-top: 0; }
.watch-next-main { min-width: 0; flex: 1; }
.browse-gaps h2 { margin: 0 0 0.35rem; font-size: 1rem; }
.browse-gap-list { margin: 0.65rem 0 0; padding: 0; display: grid; gap: 0.45rem; }
.browse-gap-line {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  column-gap: 0.75rem;
  row-gap: 0.25rem;
  align-items: baseline;
  font-size: 0.9rem; line-height: 1.35;
}
.browse-gap-line > .tag {
  justify-self: start;
  width: max-content;
  max-width: 100%;
}
.browse-gap-text,
.browse-gap-line > .pill {
  justify-self: start;
}
.browse-gap-text {
  color: var(--text); font-variant-numeric: tabular-nums;
  display: inline-flex; flex-wrap: wrap; gap: 0.2rem 0.35rem; align-items: baseline;
}
.browse-gap-item { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem; }
.gap-explain { vertical-align: baseline; }
.sort-link {
  color: inherit;
  text-decoration: none;
  font-weight: 650;
  white-space: nowrap;
}
.sort-link:hover { text-decoration: underline; }
.th-with-tip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}
.th-with-tip .req-tip-panel {
  left: 0;
  right: auto;
  width: min(20rem, 70vw);
  white-space: normal;
}
td.tabular { font-variant-numeric: tabular-nums; white-space: nowrap; }
.watch-next-actions {
  display: flex; flex-wrap: wrap; gap: 0.4rem; flex-shrink: 0;
  align-items: center;
}
.watch-next-actions .btn {
  padding: 0.45rem 0.65rem;
  line-height: 1.25;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.watch-next-actions .icon-btn {
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  border-radius: 8px;
  border: 1px solid #e2b4b4;
  background: #fff;
  color: var(--bad);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.watch-next-actions .icon-btn:hover {
  background: var(--bad-bg);
  border-color: var(--bad);
}
.check-inline {
  display: flex; flex-direction: column; gap: 0.35rem; align-items: flex-start;
}
.check-inline input { width: auto; }
.form-stack { display: grid; gap: 0.75rem; }
.form-stack .form-row { margin: 0; }
.playtime-bar {
  display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center;
  margin: 0 0 0.75rem; padding: 0.65rem 0.85rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
}
.playtime-bar strong { font-variant-numeric: tabular-nums; }
.watch-plan-stats { display: grid; gap: 0.85rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 1rem; }
.eligibility-note { font-size: 0.78rem; color: var(--muted); max-width: 14rem; }
.inline-form { display: inline; margin: 0; }
.pill-btn {
  font: inherit; font-size: 0.75rem; font-weight: 700;
  padding: 0.15rem 0.55rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--accent);
}
.pill-btn.add-watchlist { border-color: #9bb6d1; color: var(--cpa); background: #f4f8fc; }
.pill-btn.in-watchlist { border-color: #9bb89a; color: var(--tpb); background: var(--tpb-soft); }
.tag.cpa { background: var(--cpa-soft); color: var(--cpa); }
.tag.tpb { background: var(--tpb-soft); color: var(--tpb); }
.tag.ca,
.tag.ca_anz { background: #f3eef8; color: #5c3d82; }
.tag.ipa { background: #eef6f4; color: #1f6b5a; }
.tag.tti,
.tag.tax_institute { background: #eef3f9; color: #2a5080; }

.how-hero .sub { max-width: 40rem; }
.how-steps {
  list-style: none;
  margin: 1rem 0 1.25rem;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}
.how-steps > li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
}
.how-step-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: var(--cpa-soft);
  color: var(--cpa);
  font-weight: 700;
  font-size: 0.9rem;
}
.how-steps p { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.95rem; }
.how-cta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; }
.how-bullets { margin: 0.35rem 0 1.1rem; padding-left: 1.2rem; }
.how-bullets li { margin: 0.35rem 0; }
a.linkish,
.how-bullets .linkish {
  display: inline;
  margin-left: 0.35rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-weight: 650;
  text-decoration: underline;
  cursor: pointer;
}
a.linkish:hover,
.how-bullets .linkish:hover { color: var(--text); }
.back-row {
  margin: 0 0 0.75rem;
}
.back-row .linkish { margin-left: 0; }
.qa-page .sub { max-width: 46rem; }
.qa-page h3 { margin-top: 1.25rem; }
.qa-page .qa-checks { margin-bottom: 0.25rem; }
.how-it-works h3, .card h3 { font-size: 1rem; margin: 1rem 0 0.35rem; }
.filters, .form-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: end; }
.filters-heading {
  width: 100%;
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}
.filters-bar {
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
}
.filters-actions {
  display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
}
.filters-actions .btn {
  display: inline-flex; align-items: center; min-height: 2.35rem;
  padding: 0.5rem 0.85rem; line-height: 1.2;
}
.log-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1rem;
  justify-content: space-between;
  align-items: end;
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 1px 0 rgba(28, 36, 48, 0.04);
}
.log-filters { align-items: start; }
.log-filter-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.85rem;
  align-items: end;
  flex: 1;
  min-width: 0;
}
.log-flag-set {
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  align-items: center;
}
.log-flag-set legend {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0;
  width: 100%;
  margin-bottom: 0.15rem;
}
.tight-check {
  flex-direction: row;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  color: var(--ink);
}
.tight-check input { width: auto; margin: 0; }
.log-results-strip { margin-bottom: 1rem; }
.claim-note { font-size: 0.72rem; max-width: 11rem; }
.log-table-wrap {
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
.log-table {
  table-layout: auto;
  width: max(100%, 56rem);
  border-collapse: separate;
  border-spacing: 0;
  overflow: visible;
}
.log-table th,
.log-table td {
  vertical-align: top;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  padding: 0.5rem 0.45rem;
}
.log-table thead th {
  white-space: nowrap;
  vertical-align: bottom;
}
.log-table col.col-date { width: 6.2rem; }
.log-table col.col-hours { width: 2.8rem; }
.log-table col.col-body { width: 3.1rem; }
.log-table col.col-cat { width: 7.5rem; }
.log-table col.col-activity { width: auto; }
.log-table col.col-provider { width: 4.5rem; }
.log-table col.col-evidence { width: 8.5rem; }
.log-table col.col-edit { width: 3.2rem; }
.log-table .col-date,
.log-table .col-hours,
.log-table .col-provider,
.log-table .col-edit {
  white-space: nowrap;
}
.log-table .col-hours,
.log-table .col-body {
  text-align: right;
  font-variant-numeric: tabular-nums;
  padding-left: 0.25rem;
  padding-right: 0.35rem;
}
.log-table .col-cat {
  overflow-wrap: break-word;
  word-break: normal;
  line-height: 1.3;
}
.log-table .col-activity {
  min-width: 12rem;
  max-width: 22rem;
}
.log-table .col-evidence {
  max-width: 9rem;
  font-size: 0.84rem;
}
.log-table .col-edit {
  text-align: right;
  vertical-align: middle;
}
.log-table .log-group-head {
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  border: 1px solid #d9d3c8;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #efeae2;
  color: var(--text);
  padding: 0.4rem 0.35rem 0.25rem;
}
.log-table .log-group-subrow th {
  background: #f4f0ea;
  border-top: 0;
  border-bottom: 1px solid #d9d3c8;
  font-size: 0.7rem;
  padding-top: 0.2rem;
  padding-bottom: 0.4rem;
}
.log-table .log-group-sub {
  border-left: 1px solid transparent;
  border-right: 1px solid transparent;
}
.log-table th.log-group-start,
.log-table td.log-group-start {
  border-left: 1px solid #d9d3c8;
}
.log-table th.log-group-end,
.log-table td.log-group-end {
  border-right: 1px solid #d9d3c8;
}
.log-table tbody td.log-group-start,
.log-table tbody td.col-body,
.log-table tbody td.log-group-end {
  background: #faf8f5;
}
.log-table tbody tr:last-child td.log-group-start {
  border-bottom-left-radius: 8px;
}
.log-table tbody tr:last-child td.log-group-end {
  border-bottom-right-radius: 8px;
}
.log-body-pill {
  display: inline-block;
  min-width: 1.9rem;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.12rem 0.3rem;
  border-radius: 999px;
  white-space: nowrap;
}
.log-edit-link {
  display: inline-block;
  white-space: nowrap;
  color: var(--accent);
  font-weight: 650;
  font-size: 0.86rem;
  text-decoration: none;
  padding: 0.2rem 0.15rem;
}
.log-edit-link:hover { text-decoration: underline; }
.log-activity-title { font-weight: 650; line-height: 1.3; }
.log-expand { margin: 0; }
.log-expand > summary {
  list-style: none;
  cursor: pointer;
  line-height: 1.35;
}
.log-expand > summary::-webkit-details-marker { display: none; }
.log-expand-preview { color: var(--text); }
.log-expand-more,
.log-expand-less {
  color: var(--accent);
  font-weight: 650;
  white-space: nowrap;
}
.log-expand-less { display: none; margin-left: 0.25rem; }
.log-expand[open] > summary .log-expand-preview,
.log-expand[open] > summary .log-expand-more { display: none; }
.log-expand[open] > summary .log-expand-less { display: inline; }
.log-expand-full { margin-top: 0.35rem; }
.log-evidence-status {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 100%;
  line-height: 1.3;
}
.log-evidence-file {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .log-table {
    width: max(100%, 48rem);
  }
  .log-table .col-activity {
    min-width: 10rem;
    max-width: 16rem;
  }
}
.log-toolbar-year label {
  margin: 0;
  min-width: 7.5rem;
}
.log-toolbar-year select {
  min-width: 7.5rem;
  min-height: 2.35rem;
}
.log-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.log-toolbar-actions .btn,
.log-toolbar-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0.5rem 0.9rem;
  line-height: 1.2;
  margin: 0;
  box-sizing: border-box;
}
.log-stats {
  margin-bottom: 1.35rem;
}
.stat-card {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-height: 8.5rem;
}
.stat-card h2 {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.stat-card .hero-num {
  margin: 0.15rem 0 0.1rem;
  color: var(--ink);
}
.stat-card .muted {
  margin: 0;
  margin-top: auto;
  font-size: 0.84rem;
}
.filters-bar .filter-fields {
  display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: end;
}
.filter-label-with-tip .th-with-tip {
  color: var(--muted);
  font-size: inherit;
}
.filter-label-with-tip .req-tip-panel {
  z-index: 50;
  width: min(22rem, 75vw);
}
.filters-bar .watchlist-toggle {
  white-space: nowrap;
  margin-left: auto;
}
label { display: grid; gap: 0.25rem; font-size: 0.82rem; color: var(--muted); }
input, select, button {
  font: inherit; padding: 0.45rem 0.65rem; border-radius: 8px; border: 1px solid var(--line); background: #fff;
}
button, .btn, a.btn {
  background: var(--accent); color: #fff;
  border: 1px solid var(--accent);
  border-radius: 8px;
  font-weight: 650;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.65rem;
  line-height: 1.25;
  box-sizing: border-box;
  cursor: pointer;
}
button.secondary, a.secondary, a.btn.secondary {
  background: #fff; color: var(--accent); border-color: var(--accent);
}
table { width: 100%; border-collapse: collapse; overflow: hidden; }
th, td { text-align: left; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 0.92rem; }
th { background: #f7f5f0; color: var(--muted); font-weight: 650; }
.right { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; margin-bottom: 1rem; }
.browse-activity {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.browse-thumb {
  flex: 0 0 112px;
  width: 112px;
  height: 63px;
  border-radius: 8px;
  overflow: hidden;
  background: #1a2332;
  border: 1px solid var(--line);
  display: block;
  line-height: 0;
}
.browse-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.browse-thumb.is-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #2a3a52, #1a2332);
  text-decoration: none;
}
.browse-thumb-fallback {
  color: #d7dde8;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.browse-activity-text { min-width: 0; }
@media (max-width: 720px) {
  .browse-thumb { flex-basis: 88px; width: 88px; height: 50px; }
}
.muted { color: var(--muted); }
.flags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.4rem 0 0.8rem; }
footer { color: var(--muted); font-size: 0.82rem; margin-top: 1.5rem; }
.player { position: relative; padding-top: 56.25%; background: #0b1220; border-radius: 12px; overflow: hidden; margin-bottom: 1rem; }
.player iframe, .player #yt-player { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.flash { background: var(--ok-bg); color: var(--ok); }
.note.bad { background: var(--bad-bg); color: var(--bad); }
textarea {
  font: inherit; padding: 0.45rem 0.65rem; border-radius: 8px; border: 1px solid var(--line); background: #fff;
}
ul.clean { margin: 0.3rem 0 0; padding-left: 1.1rem; }
.hero-num { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.03em; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.export-dialog {
  border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem 1.25rem;
  max-width: 28rem; width: calc(100% - 2rem); background: #fff;
  box-shadow: 0 12px 40px rgba(26, 35, 50, 0.18);
}
.export-dialog::backdrop { background: rgba(26, 35, 50, 0.35); }
.export-dialog h2 { margin: 0 0 0.35rem; font-size: 1.15rem; }
.export-dialog p { margin: 0 0 0.85rem; }
.export-body-choices {
  border: 0; margin: 0 0 1rem; padding: 0; display: grid; gap: 0.55rem;
}
.export-body-option {
  display: flex; gap: 0.55rem; align-items: flex-start;
  padding: 0.55rem 0.65rem; border: 1px solid var(--line); border-radius: 10px;
  background: #faf9f6; cursor: pointer;
}
.export-body-option:has(input:checked) {
  border-color: var(--accent); background: #f4f8fc;
}
.export-body-option input { margin-top: 0.2rem; }
.export-dialog-actions {
  display: flex; justify-content: flex-end; gap: 0.5rem; flex-wrap: wrap;
}
.info-tip {
  position: relative;
  display: inline-block;
}
.info-tip.inline { margin-left: 0.35rem; vertical-align: middle; }
.info-tip-btn {
  list-style: none;
  width: 1.35rem; height: 1.35rem; padding: 0;
  border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--muted);
  font: inherit; font-size: 0.72rem; font-weight: 700; font-style: italic;
  line-height: 1.35rem; text-align: center; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.info-tip-btn::-webkit-details-marker { display: none; }
.info-tip[open] .info-tip-btn {
  border-color: var(--accent); color: var(--accent); background: #f4f8fc;
}
.info-tip-panel {
  position: absolute; z-index: 5; left: 0; top: calc(100% + 0.35rem);
  min-width: 12rem; max-width: 16rem;
  padding: 0.45rem 0.6rem; border-radius: 8px;
  border: 1px solid var(--line); background: #fff;
  box-shadow: 0 8px 20px rgba(26, 35, 50, 0.12);
  font-size: 0.78rem; color: var(--text); line-height: 1.35;
}
.req-cell {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.3rem 0.35rem;
  max-width: 28rem;
  position: relative;
}
.req-label-text {
  flex: 0 1 auto;
  min-width: 0;
  line-height: 1.3;
}
.req-tip {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
}
.req-tip .info-tip-btn:hover,
.req-tip:focus-within .info-tip-btn {
  border-color: var(--accent); color: var(--accent); background: #f4f8fc;
}
.req-tip-panel {
  position: absolute;
  z-index: 40;
  left: 0;
  top: calc(100% + 0.4rem);
  width: min(22rem, 72vw);
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 10px 28px rgba(26, 35, 50, 0.14);
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(0.15rem);
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s;
}
.req-tip:hover .req-tip-panel,
.req-tip:focus-within .req-tip-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.req-tip-panel p { margin: 0 0 0.45rem; }
.req-tip-panel p:last-child { margin-bottom: 0; }
.req-info-lead { margin-bottom: 0.35rem; }
.req-info-ref,
.req-info-notes { color: var(--text); }
.req-search-btn {
  flex: 0 0 auto;
  width: 1.35rem; height: 1.35rem;
  border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none;
}
.req-search-btn:hover {
  border-color: var(--accent); color: var(--accent); background: #f4f8fc;
}
.req-filter-note { margin: 0 0 0.75rem; }
.browse-gap-item .req-tip-panel { left: auto; right: 0; }
.completed-banner {
  display: flex; flex-wrap: wrap; gap: 0.45rem 0.65rem; align-items: center;
}
.completed-banner .pill { flex: 0 0 auto; }
h2 .title-status { margin-left: 0.45rem; vertical-align: middle; font-size: 0.75rem; }
.relog-details { margin-top: 0.75rem; }
.relog-details > summary {
  cursor: pointer; color: var(--accent); font-weight: 650; font-size: 0.9rem;
  margin-bottom: 0.65rem;
}
.topic-filter {
  display: grid;
  gap: 0.25rem;
  font-size: 0.82rem;
  color: var(--muted);
  min-width: 12.5rem;
}
.topic-filter-label { font-size: 0.82rem; color: var(--muted); }
.body-filter .topic-filter-label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.body-picker-panel {
  min-width: 12.5rem;
  max-width: 16rem;
  display: grid;
  gap: 0.15rem;
}
.body-picker-panel .topic-check {
  padding: 0.35rem 0.4rem;
  border-radius: 8px;
}
.body-picker-panel .topic-check:hover { background: #f7f5f1; }
.topic-picker { position: relative; }
.topic-picker-summary {
  list-style: none;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  min-width: 12rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.topic-picker-summary::-webkit-details-marker { display: none; }
.topic-picker-summary::after {
  content: "▾";
  color: var(--muted);
  font-size: 0.75rem;
}
.topic-picker[open] .topic-picker-summary {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(36, 91, 138, 0.12);
}
.topic-picker-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.3rem);
  left: 0;
  min-width: 18rem;
  max-width: min(24rem, 90vw);
  max-height: 22rem;
  overflow: auto;
  padding: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(26, 35, 50, 0.14);
}
.topic-cat { border-bottom: 1px solid #efece6; }
.topic-cat:last-child { border-bottom: 0; }
.topic-cat-head {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.25rem;
}
.topic-cat-head .topic-check { flex: 1; min-width: 0; }
.topic-check {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  color: var(--ink);
  font-size: 0.88rem;
  cursor: pointer;
  margin: 0;
}
.topic-check input { margin-top: 0.15rem; }
.topic-check.sub { font-weight: 400; padding: 0.2rem 0 0.2rem 0.15rem; }
.topic-check:not(.sub) { font-weight: 650; }
.topic-expand {
  flex: 0 0 auto;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.7rem;
  line-height: 1.5rem;
  text-align: center;
  cursor: pointer;
  border-radius: 4px;
}
.topic-expand:hover { color: var(--accent); background: #f4f8fc; }
.topic-subs {
  display: none;
  gap: 0.1rem;
  margin: 0 0 0.35rem 1.45rem;
}
.topic-cat.is-open .topic-subs {
  display: grid;
}
.topic-subs[hidden] {
  display: none !important;
}
.meta-list {
  margin: 0.85rem 0 1rem;
  padding: 0;
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #faf9f6;
}
.meta-row {
  display: grid;
  grid-template-columns: minmax(9rem, 11.5rem) minmax(0, 1fr);
  gap: 0.75rem 1rem;
  padding: 0.7rem 0.85rem;
  border-top: 1px solid var(--line);
  align-items: start;
}
.meta-row:first-child { border-top: 0; }
.meta-list dt {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1.35;
}
.meta-list dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.45;
}
@media (max-width: 640px) {
  .meta-row { grid-template-columns: 1fr; gap: 0.2rem; }
}
