:root {
  color-scheme: light;
  --ink: #151515;
  --muted: #626262;
  --line: #ded8cf;
  --paper: #fbfaf7;
  --panel: #ffffff;
  --brick: #8f3f2f;
  --brick-dark: #5b281f;
  --green: #23584d;
  --gold: #b88a33;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 52px);
  border-bottom: 1px solid var(--line);
  background: rgba(251, 250, 247, 0.92);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-weight: 750;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: var(--brick-dark);
  color: white;
  font-size: 13px;
  letter-spacing: 0;
}

.nav {
  color: var(--muted);
  font-size: 14px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: clamp(22px, 4vw, 58px);
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(28px, 6vw, 76px) clamp(18px, 4vw, 52px);
  align-items: start;
}

.tool-panel {
  display: grid;
  gap: 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 13px;
  font-weight: 750;
  text-transform: uppercase;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 0.97;
  letter-spacing: 0;
}

.lede {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.address-form {
  display: grid;
  gap: 10px;
  max-width: 760px;
}

label {
  font-size: 14px;
  font-weight: 700;
}

.input-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

input {
  min-width: 0;
  height: 54px;
  padding: 0 16px;
  border: 1px solid #cfc7ba;
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}

input:focus {
  border-color: var(--green);
  outline: 3px solid rgba(35, 88, 77, 0.14);
}

button {
  height: 54px;
  padding: 0 20px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 750;
}

button:hover {
  background: #1b463d;
}

.featured-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 760px;
  margin-top: -14px;
}

.featured-links a {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: 14px;
  text-decoration: none;
}

.featured-links a:hover {
  border-color: var(--green);
}

.suggestions {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 0;
  right: 160px;
  display: none;
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 36px rgba(32, 24, 18, 0.14);
}

.suggestions.is-open {
  display: grid;
}

.suggestion {
  display: grid;
  gap: 3px;
  width: 100%;
  height: auto;
  min-height: 58px;
  padding: 11px 14px;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
  background: white;
  color: var(--ink);
  text-align: left;
}

.suggestion:last-child {
  border-bottom: 0;
}

.suggestion:hover,
.suggestion:focus {
  background: #f4efe8;
  color: var(--ink);
  outline: none;
}

.suggestion-title {
  font-weight: 750;
  overflow-wrap: anywhere;
}

.suggestion-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.messages {
  max-width: 760px;
}

.message {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #e0b2a9;
  border-radius: 8px;
  background: #fff3f1;
  color: #6d2117;
  max-height: 220px;
  overflow: auto;
  overflow-wrap: anywhere;
}

.job-view {
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(28px, 6vw, 76px) clamp(18px, 4vw, 52px);
}

.job-panel {
  display: grid;
  gap: 22px;
  max-width: 760px;
}

.status-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--gold);
}

.status-dot.queued,
.status-dot.running {
  animation: statusBlink 1.15s ease-in-out infinite;
}

.status-dot.running {
  background: var(--green);
}

.status-dot.succeeded {
  background: #1f7a4d;
}

.status-dot.failed {
  background: #9b2f24;
}

.status-pulse {
  display: inline-flex;
  gap: 3px;
}

.status-pulse::before,
.status-pulse::after {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.35;
  animation: pulseDots 1.2s ease-in-out infinite;
}

.status-pulse::after {
  animation-delay: 0.2s;
}

.status-dot.succeeded + strong + .status-pulse,
.status-dot.failed + strong + .status-pulse,
.status-dot.unsupported + strong + .status-pulse,
.status-dot.unknown + strong + .status-pulse {
  display: none;
}

@keyframes statusBlink {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

@keyframes pulseDots {
  0%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  50% {
    opacity: 0.8;
    transform: translateY(-2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .status-dot,
  .status-pulse::before,
  .status-pulse::after {
    animation: none;
  }
}

.job-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 750;
}

.primary-link {
  background: var(--green);
  color: white;
}

.secondary-link {
  border: 1px solid var(--line);
  color: var(--ink);
  background: white;
}

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

.job-error {
  max-height: 260px;
  overflow: auto;
  margin: 0;
  padding: 14px;
  border: 1px solid #e0b2a9;
  border-radius: 8px;
  background: #fff3f1;
  color: #6d2117;
  white-space: pre-wrap;
}

.snapshot {
  display: grid;
  gap: 32px;
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(28px, 6vw, 76px) clamp(18px, 4vw, 52px);
}

.snapshot-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
}

.snapshot-header h1 {
  font-size: clamp(58px, 10vw, 112px);
}

.snapshot-kicker {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 750;
}

.snapshot-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  padding-top: 12px;
}

.valuation-chart {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 44px 18px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.anchor-line {
  position: absolute;
  top: 18px;
  bottom: 40px;
  width: 0;
  border-left: 2px dashed var(--brick);
  color: var(--brick-dark);
}

.anchor-line span {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-weight: 800;
  font-size: 13px;
}

.method-row {
  display: grid;
  grid-template-columns: 180px minmax(180px, 1fr) 210px;
  gap: 16px;
  align-items: center;
  min-height: 76px;
}

.method-label {
  display: grid;
  gap: 4px;
}

.method-label span,
.method-values span,
.snapshot-grid span {
  color: var(--muted);
  font-size: 13px;
}

.distribution-track {
  position: relative;
  height: 48px;
  border-bottom: 1px solid var(--line);
}

.distribution-band {
  position: absolute;
  top: 8px;
  height: 34px;
  border-radius: 999px;
  background: rgba(35, 88, 77, 0.18);
  border: 1px solid rgba(35, 88, 77, 0.28);
}

.method-row.sf .distribution-band {
  background: rgba(143, 63, 47, 0.18);
  border-color: rgba(143, 63, 47, 0.28);
}

.distribution-mid {
  position: absolute;
  top: 4px;
  bottom: 0;
  width: 2px;
  transform: translateX(-1px);
  background: var(--ink);
}

.distribution-mean {
  position: absolute;
  top: 1px;
  width: 10px;
  height: 10px;
  transform: translateX(-5px);
  border: 2px solid white;
  border-radius: 999px;
  background: var(--brick-dark);
  box-shadow: 0 0 0 1px var(--brick-dark);
}

.method-values {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: baseline;
}

.method-values span:last-child {
  text-align: right;
}

.chart-axis {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  padding-left: 196px;
}

.snapshot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  overflow: hidden;
}

.snapshot-grid div {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-right: 1px solid var(--line);
}

.snapshot-grid div:last-child {
  border-right: 0;
}

.snapshot-grid small {
  color: var(--muted);
  font-size: 12px;
}

.snapshot-adjustment {
  display: grid;
  gap: 10px;
  max-width: 520px;
}

.report-teaser {
  display: grid;
  gap: 14px;
}

.report-teaser h2 {
  margin: 0;
  font-size: 18px;
}

.teaser-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.teaser-list span {
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font-size: 14px;
}

.seo-page {
  display: grid;
  gap: 36px;
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(28px, 6vw, 76px) clamp(18px, 4vw, 52px);
}

.seo-hero {
  display: grid;
  gap: 28px;
  max-width: 860px;
}

.seo-form {
  max-width: 820px;
}

.seo-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  overflow: hidden;
}

.seo-band div {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-right: 1px solid var(--line);
}

.seo-band div:last-child {
  border-right: 0;
}

.seo-band span {
  color: var(--muted);
  font-size: 13px;
}

.seo-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.seo-content h2,
.seo-faq h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

.seo-content p {
  color: var(--muted);
  line-height: 1.6;
}

.seo-faq {
  display: grid;
  gap: 10px;
  max-width: 820px;
}

.seo-directory,
.seo-related {
  display: grid;
  gap: 18px;
}

.seo-directory-group {
  display: grid;
  gap: 10px;
}

.seo-directory h2,
.seo-directory-group h2,
.seo-related h2 {
  margin: 0;
  font-size: 16px;
}

.directory-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.directory-links a {
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-size: 14px;
  text-decoration: none;
}

.directory-links a:hover {
  border-color: var(--green);
}

.seo-faq details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 12px 14px;
}

.seo-faq summary {
  cursor: pointer;
  font-weight: 750;
}

.seo-faq p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.recent h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.report-list {
  display: grid;
  gap: 8px;
  max-width: 540px;
}

.report-list a {
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  text-decoration: none;
}

.report-list a:hover {
  border-color: var(--green);
}

.context-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3eee6;
  overflow: hidden;
}

.context-panel img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  background: var(--panel);
}

.metric-grid div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 14px;
  border-right: 1px solid var(--line);
}

.metric-grid div:last-child {
  border-right: 0;
}

.metric-grid span {
  color: var(--muted);
  font-size: 12px;
}

.metric-grid strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

@media (max-width: 820px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .input-row {
    grid-template-columns: 1fr;
  }

  .suggestions {
    right: 0;
  }

  button {
    width: 100%;
  }

  .snapshot-header,
  .method-row,
  .snapshot-grid,
  .seo-band,
  .seo-content {
    grid-template-columns: 1fr;
  }

  .snapshot-actions {
    padding-top: 0;
  }

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

  .chart-axis {
    padding-left: 0;
  }

  .snapshot-grid div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .snapshot-grid div:last-child {
    border-bottom: 0;
  }

  .seo-band div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .seo-band div:last-child {
    border-bottom: 0;
  }
}
