:root {
  --ink: #233936;
  --muted: #667773;
  --paper: #f5f3ec;
  --white: #fffdf8;
  --line: #d9dfd6;
  --teal: #176b60;
  --teal-soft: #e5f0eb;
  --gold: #ad8048;
  --gold-soft: #f5ead8;
  --red: #9a443c;
  --red-soft: #f7e8e5;
  --slate-soft: #edf0ee;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.5 Arial, sans-serif; }
a { color: var(--teal); }
button, select { font: inherit; }
[hidden] { display: none !important; }

.topbar { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 12px 36px; background: var(--white); border-bottom: 1px solid var(--line); }
.wordmark { font: bold 25px Georgia, serif; letter-spacing: 2px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.wordmark span { font: 12px Arial, sans-serif; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin-left: 18px; }
.workspace-links { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.workspace-links a { color: var(--teal); text-decoration: none; border: 1px solid transparent; border-radius: 6px; padding: 8px 11px; }
.workspace-links a:hover, .workspace-links a:focus-visible, .workspace-links a[aria-current="page"] { border-color: #9db6a9; background: var(--teal-soft); }

.portfolio-shell { max-width: 1380px; margin: auto; padding: 46px 30px 70px; }
.breadcrumbs { min-height: 22px; font-size: 12px; color: var(--muted); margin-bottom: 24px; }
.breadcrumbs a { color: var(--teal); }
.hero { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 30px; }
.eyebrow { margin: 0 0 8px; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--teal); font-weight: bold; }
h1, h2, h3 { font-family: Georgia, serif; font-weight: normal; }
h1 { margin: 5px 0 10px; font-size: 46px; line-height: 1.08; }
h2 { margin: 3px 0 0; font-size: 29px; }
h3 { margin: 0 0 8px; font-size: 21px; }
.lede { color: var(--muted); line-height: 1.65; max-width: 760px; margin: 0; }
.evidence-summary { min-width: 230px; padding: 15px 18px; border-left: 3px solid var(--teal); background: var(--white); }
.evidence-summary strong, .evidence-summary span { display: block; }
.evidence-summary span { color: var(--muted); font-size: 12px; margin-top: 3px; }

.status, .panel, .delivery-focus { background: var(--white); border: 1px solid var(--line); border-radius: 12px; }
.status { padding: 26px; }
.status.error { border-color: #d5aaa5; color: var(--red); }
.status.denied { background: var(--red-soft); }
.panel { padding: 26px; margin-top: 22px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.count { margin: 0; color: var(--muted); font-size: 12px; }

.filters { display: grid; grid-template-columns: repeat(5, minmax(130px, 1fr)) auto; align-items: end; gap: 12px; margin: 24px 0 18px; padding: 16px; background: #f8f7f2; border: 1px solid var(--line); border-radius: 9px; }
.filters label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: bold; }
.filters select { width: 100%; min-width: 0; border: 1px solid #aebdb5; border-radius: 6px; background: white; color: var(--ink); padding: 9px 10px; }
.quiet-button { border: 1px solid #9db6a9; border-radius: 6px; padding: 9px 13px; background: transparent; color: var(--teal); cursor: pointer; }

.blocker-grid, .portfolio-cards, .record-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 14px; }
.blocker-grid { margin-top: 20px; }
.blocker-card, .portfolio-card, .record-card { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.blocker-card { border-left: 4px solid var(--gold); }
.blocker-card p, .portfolio-card p, .record-card p { margin: 7px 0; color: var(--muted); }

.table-wrap { overflow-x: auto; }
.portfolio-table { width: 100%; border-collapse: collapse; text-align: left; }
.portfolio-table th { color: var(--muted); background: var(--slate-soft); font-size: 11px; letter-spacing: .5px; text-transform: uppercase; }
.portfolio-table th, .portfolio-table td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.portfolio-table td { min-width: 130px; }
.portfolio-table td:first-child { min-width: 190px; }
.portfolio-table td:nth-child(2), .portfolio-table td:nth-child(4) { min-width: 220px; }
.brand-link { display: block; font: 19px Georgia, serif; }
.subtle { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.portfolio-cards { display: none; }

.state-pill { display: inline-block; max-width: 100%; padding: 5px 8px; border-radius: 99px; background: var(--slate-soft); color: #4d5d59; font-size: 11px; font-weight: bold; overflow-wrap: anywhere; }
.state-pill.ready, .state-pill.released, .state-pill.built, .state-pill.available, .state-pill.verified { color: #15584e; background: var(--teal-soft); }
.state-pill.stale, .state-pill.needs-repair, .state-pill.blocked { color: #795017; background: var(--gold-soft); }
.state-pill.unavailable, .state-pill.missing, .state-pill.denied { color: #873a34; background: var(--red-soft); }

.delivery-focus { display: grid; grid-template-columns: 1.25fr .75fr; gap: 28px; padding: 28px; border-top: 5px solid var(--teal); }
.focus-output { font: 30px/1.2 Georgia, serif; margin: 8px 0 12px; }
.focus-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.next-action { padding: 20px; background: var(--teal-soft); border-radius: 9px; }
.next-action h2 { font-size: 22px; }
.next-action p { color: #405b55; }
.brand-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 22px; }
.brand-sections .panel { margin: 0; min-width: 0; }
.brand-sections .wide { grid-column: 1 / -1; }
.section-note { margin: 7px 0 20px; color: var(--muted); }

.matrix-wrap { overflow-x: auto; margin-top: 18px; }
.matrix { width: 100%; border-collapse: collapse; text-align: left; }
.matrix th, .matrix td { min-width: 130px; padding: 11px; border: 1px solid var(--line); vertical-align: top; }
.matrix th { background: var(--slate-soft); font-size: 11px; color: var(--muted); }
.matrix th:first-child { position: sticky; left: 0; background: var(--slate-soft); z-index: 1; }
.matrix td:first-child { position: sticky; left: 0; background: var(--white); font-weight: bold; }

.journey { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 0; }
.journey li { position: relative; padding: 0 0 22px 40px; min-height: 55px; }
.journey li::before { content: ''; position: absolute; left: 13px; top: 22px; bottom: 0; width: 2px; background: var(--line); }
.journey li:last-child::before { display: none; }
.journey-marker { position: absolute; left: 3px; top: 1px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--teal-soft); color: var(--teal); font-size: 11px; font-weight: bold; }
.journey li.broken .journey-marker { background: var(--red-soft); color: var(--red); }
.journey h3 { font: bold 15px Arial, sans-serif; margin: 0 0 4px; }
.journey p { color: var(--muted); margin: 3px 0; }

.field-list { margin: 12px 0 0; }
.field-row { display: grid; grid-template-columns: minmax(90px, .35fr) minmax(0, 1fr); gap: 12px; padding: 8px 0; border-top: 1px solid #edf0ec; }
.field-row dt { color: var(--muted); font-size: 11px; font-weight: bold; text-transform: capitalize; }
.field-row dd { margin: 0; overflow-wrap: anywhere; }
.record-card .field-list { margin-top: 8px; }
.record-link { display: inline-block; margin-top: 10px; font-weight: bold; }
.empty-state { padding: 28px; text-align: center; color: var(--muted); border: 1px dashed #b8c4bd; border-radius: 9px; margin-top: 18px; }

@media (max-width: 900px) {
  .filters { grid-template-columns: repeat(3, minmax(130px, 1fr)); }
  .brand-sections { grid-template-columns: 1fr; }
  .brand-sections .wide { grid-column: auto; }
}

@media (max-width: 680px) {
  .topbar { min-height: 65px; padding: 10px 18px; align-items: flex-start; }
  .wordmark span { display: none; }
  .workspace-links { justify-content: flex-start; }
  .workspace-links a { padding: 6px 8px; }
  .portfolio-shell { padding: 30px 16px 50px; }
  .hero { display: block; }
  h1 { font-size: 35px; }
  .evidence-summary { margin-top: 20px; }
  .section-heading { display: block; }
  .count { margin-top: 7px; }
  .filters { grid-template-columns: 1fr 1fr; }
  .portfolio-table { display: none; }
  .portfolio-cards { display: grid; }
  .delivery-focus { grid-template-columns: 1fr; }
  .panel, .delivery-focus { padding: 20px; }
  .field-row { grid-template-columns: 1fr; gap: 3px; }
}

@media (max-width: 440px) {
  .topbar { display: block; }
  .workspace-links { margin-top: 8px; }
  .filters { grid-template-columns: 1fr; }
}
