:root {
  color-scheme: light;
  --ink: #15242d;
  --muted: #61717b;
  --faint: #85929a;
  --paper: #f5f7f4;
  --surface: #ffffff;
  --surface-muted: #edf2ef;
  --line: #dce4df;
  --navy: #132a3a;
  --navy-soft: #24485e;
  --teal: #147d72;
  --teal-soft: #d8efea;
  --amber: #a36314;
  --amber-soft: #fff0d6;
  --red: #a7443a;
  --red-soft: #fbe6e3;
  --blue-soft: #e3eef5;
  --shadow: 0 18px 50px rgb(20 42 55 / 8%);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 100% 0%, rgb(20 125 114 / 9%), transparent 34rem),
    linear-gradient(180deg, #f9faf7 0%, var(--paper) 22rem);
  -webkit-font-smoothing: antialiased;
}

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

button {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  color: white;
  background: var(--navy);
  border-radius: 8px;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  width: min(100%, 1180px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) clamp(18px, 4vw, 44px) max(22px, env(safe-area-inset-bottom));
}

.site-header,
.workspace-heading,
.header-actions,
.brand-lockup,
.auth-actions,
.section-heading,
.run-card__header,
.coverage-card__top,
.site-footer {
  display: flex;
  align-items: center;
}

.site-header {
  justify-content: space-between;
  gap: 18px;
  min-height: 58px;
}

.brand-lockup {
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: white;
  background: var(--navy);
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 13px;
  box-shadow: 0 8px 20px rgb(19 42 58 / 18%);
  font-size: 1.05rem;
  font-weight: 800;
}

.eyebrow,
.brand-name,
.kicker,
.section-title,
.section-caption,
.subhead,
.metric-label,
.metric-note,
.run-time,
.run-summary,
.action-title,
.action-summary,
.coverage-label,
.coverage-detail,
.empty-state p,
.auth-copy {
  margin: 0;
}

.eyebrow,
.kicker,
.metric-label,
.priority-label {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  line-height: 1.3;
  text-transform: uppercase;
}

.brand-name {
  margin-top: 1px;
  font-size: 1rem;
  font-weight: 780;
  letter-spacing: -0.01em;
}

.header-actions {
  justify-content: flex-end;
  gap: 10px;
}

.environment-badge {
  padding: 7px 10px;
  color: #76500c;
  background: var(--amber-soft);
  border: 1px solid #edcf9d;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.08em;
}

main {
  padding: clamp(54px, 8vw, 92px) 0 36px;
}

.auth-panel,
.configuration-panel {
  position: relative;
  width: min(100%, 720px);
  margin: 3vh auto 0;
  padding: clamp(30px, 7vw, 64px);
  overflow: hidden;
  background: rgb(255 255 255 / 91%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.auth-panel__accent {
  position: absolute;
  top: -100px;
  right: -70px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgb(20 125 114 / 19%), rgb(20 125 114 / 0%) 70%);
  border-radius: 50%;
}

h1 {
  max-width: 760px;
  margin: 8px 0 12px;
  color: var(--navy);
  font-size: clamp(2.1rem, 6vw, 4rem);
  font-weight: 760;
  letter-spacing: -0.052em;
  line-height: 0.98;
}

.auth-panel h1,
.configuration-panel h1 {
  max-width: 600px;
  font-size: clamp(2.2rem, 7vw, 4.7rem);
}

.auth-copy,
.configuration-panel > p {
  max-width: 580px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.12rem);
  line-height: 1.65;
}

.auth-actions {
  align-items: flex-start;
  gap: 18px;
  margin-top: 30px;
}

.privacy-note {
  max-width: 290px;
  padding-top: 7px;
  color: var(--faint);
  font-size: 0.76rem;
  line-height: 1.5;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 11px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 750;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.button-primary {
  color: white;
  background: var(--navy);
  box-shadow: 0 10px 22px rgb(19 42 58 / 20%);
}

.button-primary:hover:not(:disabled) {
  background: var(--navy-soft);
}

.button-secondary {
  color: var(--navy);
  background: var(--surface);
  border-color: var(--line);
  box-shadow: 0 4px 14px rgb(19 42 58 / 5%);
}

.button-quiet {
  min-height: 34px;
  padding: 6px 9px;
  color: var(--muted);
  background: transparent;
}

.button:focus-visible,
.view-tab:focus-visible,
a:focus-visible {
  outline: 3px solid rgb(20 125 114 / 42%);
  outline-offset: 3px;
}

.workspace-heading {
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.subhead {
  max-width: 620px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.status-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 24px;
  padding: 13px 15px;
  color: var(--navy);
  background: var(--blue-soft);
  border: 1px solid #cbdde8;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  line-height: 1.45;
}

.status-banner__dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: 5px;
  background: var(--navy-soft);
  border-radius: 50%;
}

.status-banner--success {
  color: #0c5b52;
  background: var(--teal-soft);
  border-color: #b9ded7;
}

.status-banner--success .status-banner__dot {
  background: var(--teal);
}

.status-banner--warning,
.status-banner--loading {
  color: #76500c;
  background: var(--amber-soft);
  border-color: #edcf9d;
}

.status-banner--warning .status-banner__dot,
.status-banner--loading .status-banner__dot {
  background: var(--amber);
}

.status-banner--error {
  color: #7d3029;
  background: var(--red-soft);
  border-color: #efc5bf;
}

.status-banner--error .status-banner__dot {
  background: var(--red);
}

.status-banner--loading .status-banner__dot,
.button.is-loading span {
  animation: pulse 1s ease-in-out infinite;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-top: 22px;
}

.metric-card {
  min-height: 148px;
  padding: 19px;
  background: rgb(255 255 255 / 88%);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 26px rgb(19 42 58 / 4%);
}

.metric-card--primary {
  color: white;
  background: var(--navy);
  border-color: var(--navy);
}

.metric-card--primary .metric-label,
.metric-card--primary .metric-note {
  color: rgb(255 255 255 / 68%);
}

.metric-label,
.metric-note,
.metric-value {
  display: block;
}

.metric-value {
  margin-top: 13px;
  font-size: 2.35rem;
  font-weight: 780;
  letter-spacing: -0.055em;
  line-height: 1;
}

.metric-value--word {
  font-size: 1.8rem;
}

.metric-note {
  margin-top: 12px;
  color: var(--faint);
  font-size: 0.74rem;
  line-height: 1.35;
}

.view-tabs {
  display: flex;
  width: max-content;
  gap: 4px;
  margin-top: 36px;
  padding: 4px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.view-tab {
  min-width: 78px;
  padding: 9px 14px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 750;
}

.view-tab.is-active {
  color: var(--navy);
  background: white;
  box-shadow: 0 3px 10px rgb(19 42 58 / 8%);
}

.view-panel {
  margin-top: 24px;
}

.section-heading {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.section-title {
  color: var(--navy);
  font-size: 1.05rem;
  font-weight: 790;
  letter-spacing: -0.015em;
}

.section-caption,
.last-updated {
  margin-top: 3px;
  color: var(--faint);
  font-size: 0.74rem;
  line-height: 1.4;
}

.feed-list,
.coverage-list {
  display: grid;
  gap: 12px;
}

.run-card,
.coverage-card {
  padding: clamp(17px, 4vw, 24px);
  background: rgb(255 255 255 / 91%);
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgb(19 42 58 / 4%);
}

.run-card--complete,
.coverage-card--complete {
  border-left-color: var(--teal);
}

.run-card--partial,
.coverage-card--partial {
  border-left-color: var(--amber);
}

.run-card--failed,
.coverage-card--failed {
  border-left-color: var(--red);
}

.run-card--unknown,
.coverage-card--unknown {
  border-left-color: var(--faint);
}

.run-card__header,
.coverage-card__top {
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.run-time {
  color: var(--faint);
  font-size: 0.73rem;
  font-weight: 700;
}

.run-summary {
  margin-top: 5px;
  color: var(--navy);
  font-size: clamp(1rem, 2.5vw, 1.22rem);
  font-weight: 760;
  letter-spacing: -0.018em;
  line-height: 1.28;
}

.status-chip {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 0.67rem;
  font-weight: 800;
  white-space: nowrap;
}

.status-chip--complete {
  color: #0c655b;
  background: var(--teal-soft);
}

.status-chip--partial {
  color: #7c520d;
  background: var(--amber-soft);
}

.status-chip--failed {
  color: #87342c;
  background: var(--red-soft);
}

.status-chip--unknown {
  color: #55646d;
  background: #edf0f1;
}

.run-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.run-facts span {
  padding: 6px 9px;
  color: var(--muted);
  background: var(--surface-muted);
  border-radius: 7px;
  font-size: 0.7rem;
  font-weight: 680;
}

.run-preview {
  display: grid;
  gap: 7px;
  margin: 15px 0 0;
  padding: 14px 16px 0 31px;
  border-top: 1px solid var(--line);
}

.run-preview li {
  padding-left: 3px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.run-notice {
  display: grid;
  gap: 3px;
  margin-top: 15px;
  padding: 12px 14px;
  color: #76500c;
  background: var(--amber-soft);
  border-radius: 9px;
  font-size: 0.76rem;
  line-height: 1.45;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.action-card {
  position: relative;
  padding: 16px;
  overflow: hidden;
  background: #f8faf8;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.action-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--teal);
  content: "";
}

.action-card--urgent::before,
.action-card--high::before {
  background: var(--red);
}

.action-card--low::before {
  background: var(--faint);
}

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

.action-status {
  color: var(--faint);
  font-size: 0.68rem;
}

.action-title {
  margin-top: 9px;
  color: var(--navy);
  font-size: 0.95rem;
  font-weight: 750;
  line-height: 1.35;
}

.action-summary {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.action-details,
.coverage-stats {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 12px;
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 0.72rem;
  line-height: 1.4;
}

.action-details dt,
.coverage-stats dt {
  color: var(--faint);
  font-weight: 700;
}

.action-details dd,
.coverage-stats dd {
  margin: 0;
  color: var(--ink);
}

.coverage-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.coverage-label {
  color: var(--navy);
  font-size: 0.95rem;
  font-weight: 760;
}

.coverage-stats {
  grid-template-columns: repeat(3, 1fr);
}

.coverage-stats dt,
.coverage-stats dd {
  text-align: left;
}

.coverage-stats dd {
  grid-row: 2;
  font-size: 0.82rem;
  font-weight: 720;
}

.coverage-detail {
  margin-top: 11px;
  padding: 10px 12px;
  color: #76500c;
  background: var(--amber-soft);
  border-radius: 8px;
  font-size: 0.72rem;
  line-height: 1.45;
}

.empty-state {
  display: grid;
  min-height: 230px;
  place-items: center;
  align-content: center;
  padding: 40px 24px;
  text-align: center;
  background: rgb(255 255 255 / 60%);
  border: 1px dashed #cad5cf;
  border-radius: var(--radius-md);
}

.empty-state__mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 50%;
  font-size: 1.3rem;
}

.empty-state__title {
  margin-top: 11px !important;
  color: var(--navy);
  font-size: 0.94rem;
  font-weight: 760;
}

.empty-state__copy {
  margin-top: 4px !important;
  color: var(--faint);
  font-size: 0.76rem;
}

.configuration-panel code {
  padding: 2px 5px;
  background: var(--surface-muted);
  border-radius: 5px;
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.85em;
}

.configuration-panel ul {
  margin: 24px 0 0;
  padding: 15px 18px 15px 38px;
  color: #7d3029;
  background: var(--red-soft);
  border-radius: 12px;
  font-size: 0.82rem;
  line-height: 1.6;
}

.site-footer {
  justify-content: center;
  gap: 7px;
  padding-top: 32px;
  color: var(--faint);
  font-size: 0.68rem;
}

.is-hidden {
  display: none !important;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@media (max-width: 820px) {
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .coverage-list,
  .action-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 580px) {
  .app-shell {
    padding-inline: 15px;
  }

  .site-header {
    align-items: flex-start;
  }

  .eyebrow {
    display: none;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .header-actions {
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
  }

  main {
    padding-top: 44px;
  }

  .auth-panel,
  .configuration-panel {
    padding: 28px 22px;
    border-radius: 19px;
  }

  .auth-actions,
  .workspace-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .auth-actions .button,
  .workspace-heading .button {
    width: 100%;
  }

  .summary-grid {
    gap: 9px;
  }

  .metric-card {
    min-height: 130px;
    padding: 15px;
  }

  .metric-value {
    font-size: 2rem;
  }

  .metric-value--word {
    font-size: 1.5rem;
  }

  .view-tabs {
    width: 100%;
  }

  .view-tab {
    min-width: 0;
    flex: 1;
  }

  .section-heading,
  .run-card__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .last-updated {
    margin-top: 0;
  }

  .run-card__header .status-chip {
    order: -1;
  }

  .site-footer {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --line: #87959c;
    --muted: #42525c;
    --faint: #56656d;
  }
}
