.app-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(900px 280px at 0% 0%, rgba(47, 122, 86, 0.07), transparent 55%),
    var(--ivory);
}
.app-header {
  border-bottom: 1px solid var(--forest-3);
  background: var(--forest);
  color: var(--ivory);
  position: sticky;
  top: 0;
  z-index: 10;
}
.app-header .logo { color: var(--ivory); }
.app-header nav a {
  color: var(--ivory);
  text-decoration: none;
  font-size: 0.94rem;
  opacity: 0.86;
}
.app-header nav a:hover { opacity: 1; color: var(--brass); }
.app-header .who {
  color: var(--muted-on-dark);
  font-size: 0.88rem;
  padding: 0.15rem 0.65rem;
  border: 1px solid var(--line-on-dark);
  border-radius: 999px;
}
.app-header form.inline { display: inline; }
.app-header nav a.nav-cta {
  background: var(--brass);
  border-color: var(--brass);
  color: var(--forest);
  opacity: 1;
}
button.linkish {
  background: none;
  border: 0;
  color: var(--brass);
  font: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.app-main {
  width: min(1120px, calc(100% - 1.5rem));
  margin: 1.25rem auto 3rem;
  flex: 1;
}
.app-footer {
  width: min(1120px, calc(100% - 1.5rem));
  margin: auto;
  padding: 1.5rem 0 2.5rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.page-head {
  display: grid;
  gap: 1.25rem;
  align-items: start;
  margin-bottom: 1.25rem;
}
.stack { display: grid; gap: 0.75rem; }
.auth-panel { max-width: 32rem; margin: 1.5rem auto 0; }
.auth-panel h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
label { display: grid; gap: 0.3rem; font-size: 0.95rem; font-weight: 600; }
.brand-accent-preview {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  border: 1px solid var(--line);
  border-top: 6px solid var(--preview-accent, var(--moss));
  border-radius: 12px;
  padding: 0.85rem 1rem;
  background: var(--ivory-2);
  font-weight: 400;
}
.brand-accent-swatch {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 8px;
  background: var(--preview-accent, var(--moss));
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(12, 20, 17, 0.12);
}
.brand-accent-preview .preview-kicker {
  color: var(--preview-accent, var(--moss));
  margin: 0;
}
.brand-accent-preview p { margin: 0.2rem 0 0; font-size: 0.92rem; color: var(--muted); }
.alert-settings {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1rem 1rem;
  display: grid;
  gap: 0.75rem;
  background: var(--ivory-2);
  min-width: 0;
}
.alert-settings legend {
  font-weight: 700;
  padding: 0 0.2rem;
}
.alert-settings .micro { margin: 0; font-weight: 400; }
label.check {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-weight: 600;
}
label.check input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  min-height: 0;
  margin: 0.15rem 0 0;
  accent-color: var(--moss, #1f6b4a);
  flex: none;
}
.settings-grid {
  display: grid;
  gap: 1.25rem;
}
.settings-grid h2 { margin: 0; font-size: 1.35rem; }
@media (min-width: 900px) {
  .settings-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.85fr);
    align-items: start;
  }
}
input, select {
  font: inherit;
  font-weight: 400;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  min-height: 2.6rem;
}
input:focus, select:focus {
  outline: 2px solid var(--brass);
  outline-offset: 1px;
  border-color: var(--brass);
}
.add-site h2 { margin-bottom: 0.2rem; }
.add-site .row, .actions { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: end; }
.add-site .row label { flex: 1 1 10rem; }
.table-wrap { overflow-x: auto; }
table.sites { width: 100%; border-collapse: collapse; }
table.sites th, table.sites td {
  text-align: left;
  padding: 0.85rem 0.55rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.sites th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
}
table.sites tbody tr:hover { background: rgba(47, 122, 86, 0.04); }
table.sites td .micro { margin-top: 0.15rem; }
.break { word-break: break-all; }
.muted { color: var(--muted); }
.flash {
  padding: 0.8rem 1rem;
  border-radius: 12px;
  margin: 0 0 1rem;
  border: 1px solid transparent;
}
.flash-ok { background: #ecfdf3; color: var(--ok); border-color: #bbf7d0; }
.flash-error { background: #fff1f2; color: var(--down); border-color: #fecdd3; }
.status-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 0.18rem 0.65rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  background: #efe8dc;
  font-weight: 700;
}
.status-ok, .status-active, .status-trialing { background: #dcfce7; color: var(--ok); }
.status-attention, .status-past_due, .status-pending { background: #ffedd5; color: var(--warn); }
.status-down, .status-inactive, .status-canceled { background: #ffe4e6; color: var(--down); }
.history { list-style: none; padding: 0; margin: 0; }
.history li {
  margin: 0;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 0.35rem;
}
.history li:last-child { border-bottom: 0; }
.metric-value {
  font-size: 1.7rem;
  margin: 0.15rem 0 0.55rem;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}
.metric ul { margin: 0; padding-left: 1.1rem; color: var(--muted); }
.billing-card .amount { font-size: 2rem; }
.billing-card form { margin-top: 0.85rem; }
.token-url {
  overflow-x: auto;
  background: var(--forest-2);
  color: var(--ivory);
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
}
.token-url code {
  background: transparent;
  color: var(--ivory);
  padding: 0;
}
.empty-state {
  text-align: center;
  padding: 2.1rem 1.3rem;
}
.empty-state h2 { margin-bottom: 0.35rem; }
.empty-mark {
  width: 2.4rem;
  height: 2.4rem;
  margin: 0 auto 0.85rem;
  border: 1.5px dashed var(--moss);
  border-radius: 8px;
  position: relative;
}
.empty-mark::after {
  content: "";
  position: absolute;
  inset: 0.45rem 0.7rem 0.55rem 0.7rem;
  border-right: 2px solid var(--moss);
  border-bottom: 2px solid var(--moss);
  transform: rotate(40deg);
}
.panel-title-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}
.crumb { margin: 0 0 0.85rem; }
.site-actions { align-items: stretch; }
.site-actions .btn { width: 100%; }
.row-fail { color: var(--down); }
.row-ok { color: var(--ok); }

textarea {
  font: inherit;
  font-weight: 400;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  min-height: 5rem;
  resize: vertical;
  width: 100%;
}
textarea:focus {
  outline: 2px solid var(--brass);
  outline-offset: 1px;
  border-color: var(--brass);
}
.work-log-form .btn-row { margin-top: 0.15rem; }
.work-log-form .row label { flex: 1 1 9rem; }
.work-log-list { list-style: none; padding: 0; margin: 1rem 0 0; }
.work-log-list li {
  display: grid;
  gap: 0.6rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}
.work-log-list li:last-child { border-bottom: 0; }
.work-log-list .actions { justify-content: flex-start; }
.sample-url-add label { flex: 1 1 16rem; }
.sample-url-list { list-style: none; padding: 0; margin: 1rem 0 0; }
.sample-url-list li {
  display: grid;
  gap: 0.5rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}
.sample-url-list li:last-child { border-bottom: 0; }
.sample-url-edit {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}
.sample-url-edit input { flex: 1 1 16rem; }
.sample-url-list .actions { justify-content: flex-start; }
.work-tag {
  background: #efe8dc;
  color: var(--forest);
  margin-right: 0.4rem;
}
.work-log-digest-list { list-style: none; padding: 0; margin: 0.75rem 0 0; }
.work-log-digest-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: start;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}
.work-log-digest-list li:last-child { border-bottom: 0; }
.work-log-digest-list p { margin: 0.2rem 0 0; }
/* Public client digest — editorial care letter */
.report-body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 50% -10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 52%),
    radial-gradient(700px 380px at 100% 8%, rgba(201, 168, 108, 0.16), transparent 48%),
    var(--forest);
  color: var(--ink);
  padding: 1.1rem 0.75rem 3rem;
}
.report-doc {
  width: min(880px, 100%);
  margin: 0 auto;
  background: var(--ivory-2);
  border-radius: 10px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
  padding: 0;
  overflow: hidden;
  border-top: 8px solid var(--accent);
}
.report-doc a { color: var(--accent); }
.report-doc a:hover { color: var(--ink); }
.report-doc .panel {
  border-left: 3px solid color-mix(in srgb, var(--accent) 55%, var(--line));
}
.report-doc .work-log-digest {
  border-left: 4px solid var(--accent);
}
.report-doc .work-log-digest h2 { color: var(--accent); }
.report-doc .uptime-digest {
  border-left: 4px solid var(--accent);
}
.report-doc .uptime-digest h2 { color: var(--accent); }
.report-doc .work-tag {
  background: color-mix(in srgb, var(--accent) 18%, #efe8dc);
  color: var(--accent);
}
.report-doc .status-pill.status-ok,
.report-doc .status-pill.status-active,
.report-doc .status-pill.status-trialing {
  background: color-mix(in srgb, var(--accent) 22%, white);
  color: var(--accent);
}
.report-doc .row-ok { color: var(--accent); }
.report-doc .empty-mark,
.report-doc .empty-mark::after { border-color: var(--accent); }
.report-letterhead {
  display: flex;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  align-items: end;
  padding: 1.2rem 1.2rem 1.05rem;
  background: #fffdf8;
  border-bottom: 2px solid var(--accent);
}
.report-letterhead-main { min-width: 0; }
.report-brand-lockup {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  min-width: 0;
}
.report-logo {
  max-height: 36px;
  max-width: 120px;
  object-fit: contain;
  display: block;
}
.report-letterhead .brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3.6vw, 1.55rem);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.1;
}
.report-kicker {
  margin: 0.35rem 0 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.68rem;
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 600;
}
.report-client {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 4.2vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
}
.report-meta {
  text-align: right;
  color: var(--muted);
  font-size: 0.88rem;
  min-width: 0;
  flex: 0 1 auto;
}
.report-period-meta {
  margin: 0;
  font-size: 0.92rem;
}
.report-period-meta time { font-weight: 700; color: var(--ink); }
.report-sheet { padding: 1.45rem 1.25rem 2.15rem; }
.report-section-label {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.68rem;
  color: var(--accent);
  font-weight: 600;
}
.report-url {
  margin: 0.2rem 0 0;
  min-width: 0;
  max-width: 100%;
}
.report-url-full {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.report-url-full:hover { color: var(--accent); }
.report-hero.editorial {
  padding: 0.2rem 0 1.55rem;
  margin: 0;
  border: 0;
  background: transparent;
  display: grid;
  gap: 0.6rem;
}
.report-hero .status-display {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 9vw, 4.4rem);
  line-height: 0.9;
  letter-spacing: -0.045em;
  margin: 0.15rem 0 0;
  font-weight: 700;
  color: var(--ink);
  text-wrap: balance;
}
.report-hero.status-ok .status-display { color: var(--accent); }
.report-hero.status-attention .status-display { color: var(--warn); }
.report-hero.status-down .status-display { color: var(--down); }
.report-hero .summary {
  font-size: 1.12rem;
  margin: 0;
  max-width: 36rem;
  color: var(--ink);
}
.report-hero.editorial .micro { margin: 0; max-width: 36rem; }
.report-footer {
  margin-top: 1.6rem;
  padding-top: 1rem;
  border-top: 4px solid var(--accent);
  color: var(--muted);
}
.report-contact {
  margin: 0.45rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}
.report-contact-sep {
  display: inline;
  margin: 0 0.35em;
  color: var(--muted);
}
.report-contact-phone,
.report-contact-email,
.report-contact-site { color: var(--accent); text-decoration: none; }
.report-contact a:hover { text-decoration: underline; text-underline-offset: 3px; }
.report-footer-studio {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}
.report-footer .report-contact { margin-top: 0.35rem; }
.report-feedback { margin: 0.7rem 0 0; }
.report-feedback a {
  color: var(--accent);
  font-weight: 600;
}
.report-empty {
  text-align: center;
  padding: 2rem 1rem;
}

.metric-cards-wrap { padding: 0.75rem 0 2rem; }
.metric-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  list-style: none;
  margin: 0.65rem 0 0;
  padding: 0;
}
.metric-card {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.1rem 1.15rem 1.2rem;
  min-width: 0;
}
.proof-label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
}
.metric-card .metric-value {
  display: block;
  font-size: 1.5rem;
  margin: 0.4rem 0 0.45rem;
  line-height: 1.15;
}
.metric-detail {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.metric-detail + .metric-detail { margin-top: 0.12rem; }

.lighthouse-panel { overflow: visible; }
.lighthouse-cards {
  box-shadow: none;
  background: transparent;
  border: 0;
  padding: 0.55rem 0 1.85rem;
}
.report-doc .lighthouse-panel.lighthouse-cards {
  border: 0;
  border-left: 0;
  background: transparent;
  box-shadow: none;
}
.lighthouse-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 0.95rem;
}
.lighthouse-score {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.95rem 1.05rem 1.1rem;
  min-width: 0;
}
.lighthouse-score h3 {
  margin: 0;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  line-height: 1.35;
}
.lighthouse-score .metric-value { font-size: 1.7rem; margin: 0.4rem 0 0; line-height: 1.1; }
.lighthouse-score.score-ok { border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.report-doc .lighthouse-score.score-ok {
  border-color: color-mix(in srgb, var(--accent) 55%, white);
  background: color-mix(in srgb, var(--accent) 12%, white);
}
.lighthouse-score.score-attention { border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); }
.lighthouse-score.score-down { border-color: color-mix(in srgb, var(--down) 40%, var(--line)); }

.visual-proof {
  padding: 0;
  overflow: hidden;
  margin: 0.15rem 0 2.25rem;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.visual-proof-head {
  padding: 0 0 0.85rem;
}
.visual-proof-head h2 { margin: 0; }
.visual-flag {
  display: inline;
  margin: 0 0 0 0.45rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  background: transparent;
  white-space: nowrap;
}
.visual-flag-info { color: #7a5c20; }
.visual-flag-quiet { color: var(--muted); }
.visual-compare {
  display: grid;
  gap: 0.75rem;
  margin: 0;
}
.visual-compare figure {
  margin: 0;
  min-width: 0;
}
.visual-compare img {
  width: 100%;
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: contain;
  object-position: top center;
}
.visual-current img {
  min-height: 0;
  max-height: 520px;
  height: auto;
}
.visual-previous img {
  min-height: 0;
  max-height: 160px;
  opacity: 0.9;
}
.visual-compare figcaption {
  margin-top: 0.4rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.visual-compare figcaption .visual-flag {
  text-transform: none;
  letter-spacing: 0.01em;
  font-weight: 600;
}

.work-log-digest {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0.35rem 0 2.35rem;
}
.work-log-digest h2 { margin: 0 0 0.5rem; }
.work-log-digest > .micro { margin: 0 0 0.85rem; }
.work-timeline {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: 0.5rem;
  border-left: 2px solid color-mix(in srgb, var(--accent) 45%, var(--line));
}
.work-timeline li {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  column-gap: 1.75rem;
  row-gap: 0.4rem;
  align-items: start;
  padding: 1.25rem 0 1.45rem 1.6rem;
  border: 0;
  position: relative;
}
.work-timeline li::before {
  content: "";
  position: absolute;
  left: -0.42rem;
  top: 1.55rem;
  width: 0.65rem;
  height: 0.65rem;
  margin: 0;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--ivory-2);
}
.work-timeline time {
  color: var(--muted);
  font-size: 0.82rem;
  padding-top: 0.2rem;
  line-height: 1.35;
  white-space: nowrap;
}
.work-event, .work-card {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  min-height: 0;
  min-width: 0;
  border-radius: 0;
}
.work-event h3, .work-card h3 {
  font-family: var(--font-display);
  font-size: 1.18rem;
  margin: 0 0 0.4rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.work-event p, .work-card p { margin: 0 0 0.35rem; }
.work-event .micro { margin: 0; }

.uptime-digest {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0.2rem 0 2.15rem;
}
.uptime-digest h2 { margin: 0; }
.uptime-pct {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.6vw, 2.7rem);
  letter-spacing: -0.03em;
  margin: 0.2rem 0 0.25rem;
  color: var(--accent);
  line-height: 1.08;
  font-weight: 700;
}
.uptime-digest.uptime-attention .uptime-pct { color: var(--warn); }
.uptime-digest.uptime-down .uptime-pct { color: var(--down); }
.uptime-digest > .micro { margin: 0; max-width: 36rem; }
.uptime-spark {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  gap: 0.22rem;
  align-items: stretch;
  height: 1.55rem;
}
.uptime-spark li {
  flex: 1;
  min-width: 0;
  border-radius: 3px;
  background: color-mix(in srgb, var(--line) 55%, white);
}
.uptime-spark li.ok { background: var(--accent); }
.uptime-spark li.fail { background: var(--down); }
.uptime-spark li.mixed { background: var(--warn); }
.uptime-spark li.empty { background: color-mix(in srgb, var(--line) 40%, white); }
.uptime-spark li.blocked { background: color-mix(in srgb, var(--line) 70%, white); }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.report-history {
  box-shadow: none;
  background: transparent;
  border: 0;
  padding: 0.2rem 0 0;
}
.history-compact li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  align-items: baseline;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--line);
}
.history-compact .history-status {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}
.history-compact .history-status.status-ok { color: var(--ok); }
.history-compact .history-status.status-attention { color: var(--warn); }
.history-compact .history-status.status-down { color: var(--down); }
.report-archive-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 1.15rem;
  padding: 0 0 0.85rem;
  border-bottom: 1px solid var(--line);
}
.report-back-latest {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-weight: 700;
  text-decoration: none;
  text-underline-offset: 3px;
}
.report-back-latest:hover { text-decoration: underline; }
.report-snapshot-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  align-items: center;
  margin: 0;
}
.report-snapshot-pager a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-weight: 600;
  text-decoration: none;
}
.report-snapshot-pager a:hover { text-decoration: underline; }
.history-compact li.is-current {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  margin: 0 -0.5rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  border-radius: 8px;
  border-bottom-color: transparent;
}
.history-viewing {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.report-links {
  box-shadow: none;
  background: transparent;
  border: 0;
  padding: 0.15rem 0 1rem;
}
.report-links .table-wrap { overflow-x: visible; }
.report-links table.sites td.break,
.report-links table.sites a {
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

@media (max-width: 639px) {
  .report-letterhead {
    flex-direction: column;
    align-items: start;
  }
  .report-meta { text-align: left; }
  .visual-compare.has-previous {
    grid-template-columns: 1fr;
  }
  .visual-current { width: 100%; }
  .visual-current img {
    min-height: 0;
    max-height: none;
    width: 100%;
    height: auto;
  }
  .visual-previous img { max-height: 120px; }
  .work-timeline li {
    grid-template-columns: 1fr;
    gap: 0.4rem;
    padding: 1.05rem 0 1.2rem 1.2rem;
  }
  .work-timeline time {
    white-space: normal;
    padding-top: 0;
  }
  .work-timeline li::before { top: 1.2rem; }
  .report-archive-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
  }
  .report-snapshot-pager {
    justify-content: space-between;
  }
}

@media (min-width: 640px) {
  .app-main, .app-footer { width: min(1120px, calc(100% - 2rem)); }
  .app-main { margin-top: 1.75rem; }
  .report-body { padding: 2rem 1rem 4rem; }
  .report-letterhead { padding: 1.45rem 2.1rem 1.2rem; }
  .report-sheet { padding: 1.85rem 2.4rem 2.6rem; }
  .metric-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
  .metric-card { padding: 1.15rem 1.2rem 1.25rem; }
  .history li {
    grid-template-columns: auto auto 1fr auto;
    align-items: center;
    gap: 0.75rem;
  }
  .history-compact li {
    grid-template-columns: auto auto;
    display: flex;
  }
  .work-log-list li {
    grid-template-columns: 1fr auto;
    align-items: start;
  }
  .sample-url-list li {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }
  .lighthouse-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lighthouse-cards .lighthouse-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
  .visual-compare.has-previous {
    grid-template-columns: minmax(0, 1.75fr) minmax(9rem, 0.55fr);
    align-items: start;
    gap: 0.9rem;
  }
  .visual-previous img { max-height: 200px; }
}

@media (min-width: 800px) {
  .page-head { grid-template-columns: 1.45fr 0.7fr; }
  .site-actions .btn { width: auto; }
}

@media (min-width: 900px) {
  .lighthouse-cards .lighthouse-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
  }
  .lighthouse-cards .lighthouse-score {
    padding: 1.1rem 1.15rem 1.2rem;
  }
}

@media print {
  .report-body { background: #fff; padding: 0; }
  .report-doc {
    box-shadow: none;
    width: 100%;
    border-radius: 0;
    overflow: visible;
  }
  .report-letterhead, .visual-proof, .work-event, .metric-cards, .lighthouse-panel, .uptime-digest {
    box-shadow: none;
    break-inside: avoid;
  }
  .report-hero .status-display { font-size: 2.2rem; }
  .visual-compare img {
    min-height: 0;
    max-height: 260px;
    object-fit: contain;
  }
  .report-url-full {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }
  .report-archive-nav { display: none; }
}

.btn-spinner {
  width: 0.85rem;
  height: 0.85rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  display: inline-block;
  animation: check-spin 0.7s linear infinite;
}
@keyframes check-spin {
  to { transform: rotate(360deg); }
}
.check-progress {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
body.is-checking .site-check-results {
  position: relative;
  pointer-events: none;
  opacity: 0.58;
  transition: opacity 0.15s ease;
}
body.is-checking .site-check-results::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: repeating-linear-gradient(
    -65deg,
    transparent,
    transparent 12px,
    rgba(47, 122, 86, 0.05) 12px,
    rgba(47, 122, 86, 0.05) 24px
  );
}

.probe-target-add .row,
.probe-target-list .row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: end;
}
.probe-target-add .row label,
.probe-target-list .row label { flex: 1 1 10rem; font-weight: 600; }
.probe-target-list { list-style: none; padding: 0; margin: 1rem 0 0; }
.probe-target-list li {
  display: grid;
  gap: 0.55rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}
.probe-target-list li:last-child { border-bottom: 0; }

.status-body {
  background:
    radial-gradient(900px 280px at 0% 0%, rgba(47, 122, 86, 0.07), transparent 55%),
    var(--ivory);
  color: var(--ink);
}
.status-page {
  width: min(40rem, calc(100% - 1.5rem));
  margin: 1.25rem auto 3rem;
}
.status-head { margin-bottom: 1.25rem; }
.status-head h1 {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  letter-spacing: -0.03em;
  margin: 0.2rem 0 0.35rem;
}
.status-banner {
  margin: 0.9rem 0 0.45rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 4vw, 1.8rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.status-banner.status-operational { background: #e7f5ee; color: var(--ok); }
.status-banner.status-degraded { background: #fff4e5; color: var(--warn); }
.status-banner.status-down { background: #fdecec; color: var(--down); }
.status-banner.status-blocked,
.status-banner.status-unknown { background: var(--ivory-2); color: var(--ink); border: 1px solid var(--line); }
.status-panel { margin-bottom: 1rem; }
.status-components,
.status-incidents { list-style: none; padding: 0; margin: 0.5rem 0 0; }
.status-component,
.status-incidents li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}
.status-component:last-child,
.status-incidents li:last-child { border-bottom: 0; }
.status-component-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
}
.status-component-head .micro { margin: 0.15rem 0 0; }
.status-foot { margin-top: 1.5rem; }
.uptime-targets {
  padding: 0.2rem 0 2rem;
}
.uptime-targets h2 { margin: 0 0 0.4rem; }
@media (max-width: 640px) {
  .status-component-head { flex-wrap: wrap; }
  .status-page { margin-top: 1rem; }
}
