:root {
  --seo-ink: #17302f;
  --seo-muted: #60736d;
  --seo-line: rgba(23, 48, 47, 0.12);
  --seo-sage: #dfe9df;
  --seo-mint: #eef5ed;
  --seo-gold: #b8873d;
  --seo-good: #277554;
  --seo-bad: #b44b4f;
}

.page:has(.seo-route-shell) {
  max-width: none;
  padding: 0;
}

.seo-route-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at 88% 3%, rgba(197, 218, 194, 0.58), transparent 30rem),
    linear-gradient(180deg, #f7f8f3 0%, #f2f5ef 100%);
  color: var(--seo-ink);
}

.seo-route-bar {
  position: sticky;
  z-index: 40;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  padding: 12px clamp(18px, 4vw, 54px);
  border-bottom: 1px solid rgba(23, 48, 47, 0.1);
  background: rgba(247, 248, 243, 0.9);
  backdrop-filter: blur(18px);
}

.seo-route-brand,
.seo-route-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.seo-route-brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: var(--seo-ink);
  font-family: Georgia, serif;
  font-size: 22px;
}

.seo-route-brand-copy {
  display: grid;
  gap: 1px;
}

.seo-route-brand-copy strong {
  font: 600 17px/1.2 Georgia, serif;
}

.seo-route-brand-copy span {
  color: var(--seo-muted);
  font-size: 12px;
}

.seo-route-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 7px 13px;
  border: 1px solid rgba(23, 48, 47, 0.16);
  border-radius: 10px;
  color: var(--seo-ink);
  background: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.seo-route-link:hover {
  background: #fff;
}

.seo-route-shell > main {
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: clamp(22px, 4vw, 54px);
}

.seo-dashboard {
  display: grid;
  gap: 24px;
}

.seo-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 430px);
  align-items: stretch;
  gap: 24px;
}

.seo-hero > div:first-child {
  padding: clamp(14px, 3vw, 34px) 0;
}

.seo-kicker {
  display: block;
  margin-bottom: 8px;
  color: #71837c;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.seo-hero h1 {
  max-width: 760px;
  margin: 0 0 14px;
  color: var(--seo-ink);
  font: 500 clamp(38px, 6vw, 70px)/0.98 Georgia, serif;
  letter-spacing: -0.045em;
}

.seo-hero > div:first-child > p {
  max-width: 720px;
  margin: 0;
  color: var(--seo-muted);
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.65;
}

.seo-run-card,
.seo-panel,
.seo-metric {
  border: 1px solid var(--seo-line);
  box-shadow: 0 18px 55px rgba(37, 61, 55, 0.07);
}

.seo-run-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(22px, 3vw, 34px);
  border-radius: 24px;
  background: var(--seo-ink);
  color: #fff;
}

.seo-run-card > div:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #cbd9d3;
  font-size: 13px;
}

.seo-run-card > strong {
  margin-top: 18px;
  font: 500 clamp(24px, 3vw, 34px)/1.2 Georgia, serif;
}

.seo-run-card > small {
  margin-top: 5px;
  color: #aebfb9;
}

.seo-run-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.seo-run-card button.primary {
  background: #eef5ed;
  color: var(--seo-ink);
}

.seo-run-card button.ghost,
.seo-route-actions .ghost {
  border-color: rgba(255, 255, 255, 0.22);
  color: inherit;
  background: rgba(255, 255, 255, 0.08);
}

.seo-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 25px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.seo-status.good {
  background: rgba(39, 117, 84, 0.12);
  color: var(--seo-good);
}

.seo-run-card .seo-status.good,
.seo-run-card .seo-status.active {
  background: rgba(203, 230, 214, 0.17);
  color: #dff2e7;
}

.seo-status.active {
  background: rgba(57, 110, 146, 0.12);
  color: #376f94;
}

.seo-status.warn {
  background: rgba(184, 135, 61, 0.14);
  color: #8d6429;
}

.seo-status.bad {
  background: rgba(180, 75, 79, 0.12);
  color: var(--seo-bad);
}

.seo-status.muted {
  background: rgba(96, 115, 109, 0.11);
  color: var(--seo-muted);
}

.seo-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.seo-metric {
  display: flex;
  min-height: 154px;
  flex-direction: column;
  padding: 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
}

.seo-metric > p {
  margin: 0;
  color: var(--seo-muted);
  font-size: 12px;
  font-weight: 700;
}

.seo-metric > strong {
  margin: 12px 0 7px;
  color: var(--seo-ink);
  font: 500 32px/1 Georgia, serif;
}

.seo-metric > small {
  margin-top: auto;
  padding-top: 10px;
  color: #82908b;
  font-size: 11px;
}

.seo-delta {
  width: fit-content;
  font-size: 11px;
  font-weight: 700;
}

.seo-delta.positive {
  color: var(--seo-good);
}

.seo-delta.negative {
  color: var(--seo-bad);
}

.seo-delta.neutral {
  color: #86948f;
}

.seo-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
  align-items: start;
  gap: 24px;
}

.seo-main,
.seo-side {
  display: grid;
  gap: 24px;
}

.seo-panel {
  overflow: hidden;
  padding: clamp(22px, 3vw, 32px);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
}

.seo-panel h2 {
  margin: 0;
  color: var(--seo-ink);
  font: 500 clamp(22px, 2.4vw, 31px)/1.2 Georgia, serif;
}

.seo-panel h3 {
  margin: 0;
  color: var(--seo-ink);
  font-size: 13px;
}

.seo-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.seo-panel-copy {
  margin: 16px 0 0;
  color: var(--seo-muted);
  line-height: 1.65;
}

.seo-intent-table {
  margin-top: 22px;
}

.seo-intent-table td:first-child {
  min-width: 230px;
}

.seo-intent-table td:first-child strong,
.seo-intent-table td:first-child small {
  display: block;
}

.seo-intent-table td:first-child small {
  max-width: 420px;
  margin-top: 5px;
  color: var(--seo-muted);
  font-size: 11px;
  font-weight: 400;
}

.seo-analysis-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 28px;
}

.seo-analysis-columns h3 {
  margin-bottom: 10px;
  color: var(--seo-muted);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.seo-analysis-columns ul,
.seo-check-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.seo-analysis-columns li {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  background: #f6f8f4;
}

.seo-analysis-columns li p {
  margin: 4px 0 3px;
  color: var(--seo-muted);
  font-size: 13px;
  line-height: 1.45;
}

.seo-analysis-columns li small {
  color: #80908a;
}

.seo-list-icon {
  flex: 0 0 auto;
  font-size: 18px;
  font-weight: 800;
}

.seo-list-icon.positive {
  color: var(--seo-good);
}

.seo-list-icon.negative {
  color: var(--seo-bad);
}

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

.seo-experiment {
  background:
    radial-gradient(circle at 95% 0%, rgba(216, 230, 211, 0.75), transparent 18rem),
    #fff;
}

.seo-experiment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 24px 0 0;
}

.seo-experiment-grid > div {
  padding: 14px;
  border-radius: 14px;
  background: rgba(238, 245, 237, 0.75);
}

.seo-experiment-grid dt {
  color: #74867f;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.seo-experiment-grid dd {
  margin: 6px 0 0;
  color: var(--seo-ink);
  font-size: 13px;
  line-height: 1.45;
}

.seo-foundation {
  color: #f4f7f2;
  background: #24443f;
}

.seo-foundation h2,
.seo-foundation .seo-panel-copy {
  color: inherit;
}

.seo-foundation .seo-kicker {
  color: #a9c5ba;
}

.seo-foundation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 22px;
}

.seo-foundation-grid article {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
}

.seo-foundation-grid p {
  margin: 0;
  color: #b7cbc4;
  font-size: 11px;
}

.seo-foundation-grid strong {
  display: block;
  margin: 6px 0 3px;
  font: 500 25px/1 Georgia, serif;
}

.seo-foundation-grid small {
  color: #c5d5cf;
}

.seo-connections {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.seo-connection {
  padding: 14px;
  border: 1px solid var(--seo-line);
  border-radius: 14px;
  background: #fafbf8;
}

.seo-connection > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.seo-connection p {
  margin: 8px 0 0;
  color: var(--seo-muted);
  font-size: 12px;
  line-height: 1.45;
}

.seo-setup {
  display: grid;
  gap: 18px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--seo-line);
}

.seo-setup p,
.seo-policy p {
  color: var(--seo-muted);
  font-size: 13px;
  line-height: 1.55;
}

.seo-setup code {
  display: block;
  overflow-wrap: anywhere;
  padding: 10px;
  border-radius: 10px;
  background: #edf1eb;
  color: #31514b;
  font-size: 11px;
}

.seo-setup form label {
  display: block;
  margin-bottom: 7px;
  color: var(--seo-ink);
  font-size: 12px;
  font-weight: 800;
}

.seo-setup form > div {
  display: flex;
  gap: 8px;
}

.seo-setup input {
  min-width: 0;
  flex: 1;
}

.seo-setup form small {
  display: block;
  margin-top: 5px;
  color: #84928d;
}

.seo-activation-form {
  display: grid;
  gap: 9px;
}

.seo-activation-form > p {
  margin: -2px 0 2px;
}

.seo-activation-form > label {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  margin: 0 !important;
  padding: 10px;
  border: 1px solid var(--seo-line);
  border-radius: 12px;
  background: #fafbf8;
  cursor: pointer;
}

.seo-activation-form input[type="checkbox"] {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin-top: 1px;
  accent-color: var(--seo-good);
}

.seo-activation-form span {
  min-width: 0;
}

.seo-activation-form strong,
.seo-activation-form small {
  display: block;
}

.seo-activation-form strong {
  color: var(--seo-ink);
  font-size: 12px;
}

.seo-activation-form small {
  margin-top: 2px !important;
  font-weight: 400;
  line-height: 1.35;
}

.seo-activation-form button {
  justify-self: start;
  margin-top: 2px;
}

.seo-trend-chart {
  display: flex;
  height: 170px;
  align-items: flex-end;
  gap: 8px;
  margin: 24px 0;
  padding: 20px 12px 0;
  border-bottom: 1px solid var(--seo-line);
  background:
    linear-gradient(var(--seo-line) 1px, transparent 1px) 0 0 / 100% 25%;
}

.seo-trend-pending {
  align-self: center;
  margin: auto;
  color: var(--seo-muted);
  font-size: 13px;
}

.seo-trend-column {
  display: flex;
  height: 100%;
  min-width: 20px;
  flex: 1;
  flex-direction: column;
  justify-content: flex-end;
  text-align: center;
}

.seo-trend-column span {
  display: block;
  min-height: 4px;
  border-radius: 7px 7px 0 0;
  background: linear-gradient(180deg, #5b8e79, #24443f);
}

.seo-trend-column small {
  min-height: 28px;
  margin-top: 5px;
  color: #788983;
  font-size: 9px;
}

.seo-table-wrap {
  overflow-x: auto;
}

.seo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.seo-table th {
  color: #788983;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
}

.seo-table th,
.seo-table td {
  padding: 11px 8px;
  border-bottom: 1px solid var(--seo-line);
}

.seo-table td:first-child {
  min-width: 180px;
}

.seo-table td:first-child small {
  display: block;
  margin-top: 3px;
  color: #84928d;
}

.seo-check-list {
  grid-template-columns: 1fr 1fr;
  margin-top: 22px;
}

.seo-check-list li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px;
  border-radius: 13px;
  background: #f7f9f5;
}

.seo-check {
  display: grid;
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.seo-check.passed {
  background: var(--seo-good);
}

.seo-check.failed {
  background: var(--seo-bad);
}

.seo-check-list strong,
.seo-check-list small {
  display: block;
}

.seo-check-list strong {
  font-size: 12px;
}

.seo-check-list small {
  margin-top: 3px;
  color: var(--seo-muted);
  line-height: 1.35;
}

.seo-policy {
  background: #f3ede2;
}

.seo-policy h2 {
  font-size: 22px;
}

.seo-flash {
  padding: 14px 18px;
  border: 1px solid rgba(39, 117, 84, 0.2);
  border-radius: 14px;
  background: #e9f4ed;
  color: #27664a;
  font-size: 13px;
}

.seo-flash.error {
  border-color: rgba(180, 75, 79, 0.2);
  background: #f9eaea;
  color: #903b3f;
}

.seo-loading,
.seo-empty {
  display: grid;
  min-height: 50vh;
  place-content: center;
  text-align: center;
}

.seo-loading span {
  width: 32px;
  height: 32px;
  margin: 0 auto 16px;
  border: 3px solid #cfdbd4;
  border-top-color: var(--seo-ink);
  border-radius: 50%;
  animation: seo-spin 0.8s linear infinite;
}

.seo-loading h1,
.seo-empty h1 {
  margin: 0;
  font: 500 32px/1.2 Georgia, serif;
}

.seo-loading p,
.seo-empty p {
  color: var(--seo-muted);
}

@keyframes seo-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1150px) {
  .seo-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .seo-layout {
    grid-template-columns: 1fr;
  }

  .seo-side {
    grid-template-columns: 1fr 1fr;
  }

  .seo-side .seo-policy {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .seo-route-bar,
  .seo-route-actions,
  .seo-hero,
  .seo-analysis-columns,
  .seo-experiment-grid,
  .seo-side,
  .seo-check-list {
    grid-template-columns: 1fr;
  }

  .seo-route-bar {
    position: static;
    display: grid;
  }

  .seo-route-actions {
    display: flex;
  }

  .seo-hero {
    display: grid;
  }

  .seo-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .seo-metric {
    min-height: 135px;
  }
}

@media (max-width: 480px) {
  .seo-metrics,
  .seo-foundation-grid {
    grid-template-columns: 1fr;
  }

  .seo-route-shell > main {
    padding: 16px;
  }
}
