:root {
  --ink: #10234a;
  --blue: #3157d5;
  --blue-soft: #dfe8ff;
  --paper: #ffffff;
  --mist: #f3f6fb;
  --line: #d8dfec;
  --muted: #65718a;
  --risk: #c7453b;
  --risk-soft: #fdecea;
  --good: #14735a;
  --good-soft: #dcf3e9;
  --amber: #d69a35;
}

* { box-sizing: border-box; }

html { background: var(--mist); color: var(--ink); }

body {
  margin: 0;
  min-width: 320px;
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  line-height: 1.45;
}

a { color: inherit; }

/* Account pilot: reuse the analytics palette and typography, with a compact
   project ledger instead of a second dashboard of metric cards. */
.account-page { max-width: 1240px; margin: 0 auto; padding: 56px 36px; }
.account-brand { color: var(--ink); font-size: 20px; font-weight: 700; text-decoration: none; }
.account-page h1 { font-size: clamp(30px, 4vw, 44px); line-height: 1.15; margin: 28px 0 16px; letter-spacing: -.03em; }
.account-page h2 { font-size: 20px; margin: 0 0 12px; overflow-wrap: anywhere; }
.account-page p { max-width: 65ch; }
.auth-layout { display: grid; grid-template-columns: 1fr 420px; gap: 80px; align-items: start; padding-top: 8vh; }
.auth-intro > p { font-size: 17px; line-height: 1.6; }
.auth-panel, .account-create { background: var(--paper); border: 1px solid var(--line); padding: 28px; border-radius: 10px; }
.account-form { display: grid; gap: 18px; }
.account-form label { display: grid; gap: 7px; font-size: 14px; }
.account-form :is(input,select) { width: 100%; min-width: 0; min-height: 44px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 5px; background: white; color: var(--ink); font: inherit; }
.account-form small, .account-project small { color: var(--muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.account-page button { min-height: 44px; padding: 10px 16px; border: 1px solid var(--blue); border-radius: 5px; background: var(--blue); color: white; font: inherit; font-size: 14px; cursor: pointer; }
.account-page button.account-secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.account-page .account-muted { color: var(--muted); font-size: 13px; line-height: 1.6; }
.account-notice { padding: 14px 16px; background: var(--blue-soft); border-left: 3px solid var(--blue); overflow-wrap: anywhere; }
.account-heading { display: flex; justify-content: space-between; align-items: start; gap: 24px; margin-bottom: 32px; }
.account-identity { display: grid; gap: 12px; justify-items: end; font-size: 13px; overflow-wrap: anywhere; }
.account-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: start; }
.account-project { display: flex; gap: 24px; justify-content: space-between; align-items: center; padding: 24px 0; border-top: 1px solid var(--line); }
.account-project > div { min-width: 0; }
.account-project p { margin: 0 0 8px; overflow-wrap: anywhere; }
.account-project form { flex-shrink: 0; }
.account-empty { padding: 32px 0; border-top: 1px solid var(--line); }
.account-bar { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; padding: 12px 24px; background: white; border-bottom: 1px solid var(--line); font-size: 13px; }
.account-bar strong { overflow-wrap: anywhere; }
.account-bar > span { margin-left: auto; color: var(--muted); overflow-wrap: anywhere; }
.account-bar button { font: inherit; padding: 5px 10px; border: 1px solid var(--line); border-radius: 4px; background: white; color: var(--ink); cursor: pointer; }
.account-page :is(a,input,select,button):focus-visible, .account-bar :is(a,button):focus-visible { outline: 3px solid #7194fa; outline-offset: 3px; }
.project-rail { overflow-y: auto; }
@media (max-width: 850px) {
  .account-page { padding: 28px 20px; }
  .auth-layout, .account-workspace { grid-template-columns: minmax(0,1fr); gap: 30px; padding-top: 0; }
  .auth-layout { max-width: 540px; margin: auto; }
  .account-heading { flex-direction: column; }
  .account-identity { justify-items: start; }
  .account-project { align-items: start; flex-direction: column; gap: 16px; }
  .account-bar > span { margin-left: 0; }
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
}

.project-rail {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 28px 18px 20px;
  color: #fff;
  background: var(--ink);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 0 6px 38px;
  color: #fff;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 50%;
  font-family: Charter, Georgia, serif;
  font-size: 23px;
}

.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; letter-spacing: .01em; }
.brand small { margin-top: 1px; color: #aebce1; font-size: 11px; }

.project-link {
  display: block;
  margin-bottom: 6px;
  padding: 12px 14px;
  border-radius: 8px;
  color: #c9d3ee;
  text-decoration: none;
}

.project-link:hover, .project-link:focus-visible { background: rgba(255,255,255,.08); }
.project-link.is-active { color: var(--ink); background: #fff; }
.project-domain, .project-count { display: block; overflow: hidden; text-overflow: ellipsis; }
.project-domain { font-size: 14px; font-weight: 650; white-space: nowrap; }
.project-count { margin-top: 3px; color: #8fa0cb; font-size: 11px; }
.project-link.is-active .project-count { color: var(--muted); }
.project-dates { display: grid; gap: 1px; margin-top: 6px; color: #91a1c8; font-size: 10px; line-height: 1.35; }
.project-link.is-active .project-dates { color: var(--muted); }

.research-page { min-width: 0; padding: 36px; }
.research-page h1 { margin: 0; }
.research-page h2 { font-size: 18px; margin: 0 0 12px; }
.research-connection { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.research-add { padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.research-add-form, .research-run-form, .research-filter, .research-history { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; }
.research-page label { display: grid; gap: 6px; font-size: 12px; color: var(--muted); }
.research-add-form label:first-of-type { flex: 1; min-width: 240px; }
.research-page input, .research-page select { min-height: 40px; border: 1px solid var(--line); background: white; color: var(--ink); border-radius: 6px; padding: 8px 10px; font: inherit; }
.research-page button { min-height: 40px; border: 1px solid var(--blue); border-radius: 6px; padding: 8px 14px; background: var(--blue); color: white; font: inherit; font-size: 13px; cursor: pointer; }
.research-page button.secondary-button { color: var(--blue); background: white; }
.research-page button:disabled { opacity: .45; cursor: not-allowed; }
.research-page :is(button,a,input,select):focus-visible { outline: 3px solid #7194fa; outline-offset: 3px; }
.research-add p, .research-hint { margin: 12px 0 0; color: var(--muted); font-size: 12px; max-width: 78ch; }
.research-workspace { display: grid; grid-template-columns: 230px minmax(0,1fr); gap: 28px; align-items: start; }
.research-registry { min-width: 0; }
.research-registry h2 { display: flex; justify-content: space-between; }
.research-registry h2 span { color: var(--muted); font-weight: normal; }
.research-target { display: block; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; padding: 14px 12px; text-decoration: none; overflow-wrap: anywhere; }
.research-target:hover { background: white; }
.research-target.is-selected { background: white; border-left-color: var(--blue); }
.research-target strong { display: block; font-size: 13px; }
.research-target span, .research-target small { display: block; color: var(--muted); font-size: 11px; margin-top: 5px; }
.research-detail { min-width: 0; padding: 24px; background: white; border: 1px solid var(--line); border-radius: 8px; }
.research-heading h2 { overflow-wrap: anywhere; }
.research-heading p { color: var(--muted); font-size: 13px; }
.research-run-form input[type=number] { width: 95px; }
.research-notice { padding: 14px 16px; background: var(--blue-soft); border-left: 3px solid var(--blue); font-size: 13px; overflow-wrap: anywhere; }
.research-empty { padding: 26px 4px; color: var(--muted); }
.research-history { margin: 25px 0 12px; border-top: 1px solid var(--line); padding-top: 22px; }
.research-history label { flex: 1; min-width: 0; }
.research-history select { width: 100%; }
.research-run-status { font-size: 12px; color: var(--muted); }
.research-metrics { display: flex; flex-wrap: wrap; gap: 22px; margin: 24px 0; }
.research-metrics strong { display: block; font-size: 26px; font-weight: 600; }
.research-metrics span { color: var(--muted); font-size: 11px; }
.research-filter { margin-top: 22px; }
.research-filter label:first-of-type { flex: 1; }
.research-detail table { min-width: 850px; font-size: 12px; }
.research-detail td { max-width: 300px; overflow-wrap: anywhere; }
.research-detail td small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.research-detail .table-wrap { margin-top: 10px; }
@media (max-width: 1150px) {
  .research-workspace { grid-template-columns: minmax(0,1fr); }
  .research-registry { display: flex; overflow-x: auto; gap: 8px; padding-bottom: 8px; }
  .research-registry h2 { min-width: 130px; font-size: 15px; }
  .research-target { flex: 0 0 215px; border-bottom: 0; }
}
@media (max-width: 700px) {
  .research-page { padding: 20px 12px; }
  .research-detail { padding: 16px 12px; }
  .research-page .project-header { align-items: start; flex-direction: column; gap: 16px; }
  .research-add-form label:first-of-type { min-width: 100%; }
  .research-history { align-items: stretch; flex-direction: column; }
}

.directory-link { border: 1px solid rgba(255,255,255,.16); }
.directory-link .project-domain::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border: 2px solid currentColor;
  border-radius: 2px;
  box-shadow: 4px 4px 0 -1px var(--ink), 4px 4px 0 0 currentColor;
  vertical-align: 1px;
}
.directory-link.is-active .project-domain::before { box-shadow: 4px 4px 0 -1px #fff, 4px 4px 0 0 currentColor; }
.rail-divider { height: 1px; margin: 15px 8px; background: rgba(255,255,255,.14); }
.rail-label { margin: 0 10px 7px; color: #91a1c8; font-size: 10px; font-weight: 650; }
.competitor-label { margin-top: 18px; color: #d7ad68; }
.rail-empty { margin: 0 10px; color: #7182aa; font-size: 11px; }
.strategy-link { border: 1px solid rgba(93,133,255,.42); background: rgba(49,87,213,.14); }

.rail-note {
  margin-top: auto;
  padding: 16px 8px 0;
  border-top: 1px solid rgba(255,255,255,.16);
  color: #91a1c8;
  font-size: 11px;
}

.workspace { min-width: 0; padding: 42px clamp(22px, 4vw, 64px) 80px; }
.timeline-workspace { max-width: 1760px; width: 100%; margin: 0 auto; }
.timeline-explainer { max-width: 92ch; color: var(--muted); font-size: 13px; line-height: 1.7; }
.timeline-notice { border-left: 3px solid var(--blue); background: var(--blue-soft); padding: 14px 18px; font-size: 13px; }
.timeline-chart, .timeline-section { margin: 28px 0; border: 1px solid var(--line); background: var(--paper); padding: 24px; border-radius: 8px; }
.timeline-chart h2, .timeline-section h2 { font-size: 22px; margin-bottom: 12px; }
.timeline-section p, .timeline-legend { color: var(--muted); font-size: 12px; line-height: 1.7; }
.timeline-legend span { display: inline-flex; align-items: center; gap: 6px; margin-right: 12px; }
.timeline-legend span::before { content: ''; width: 10px; height: 10px; background: var(--blue); display: inline-block; }
.timeline-legend span + span::before { background: var(--risk); }
.timeline-svg { overflow-x: auto; }
.timeline-svg svg { width: 100%; min-width: 650px; display: block; }
.timeline-svg a:hover rect, .timeline-svg a:focus rect { stroke: var(--ink); stroke-width: 1; }
.timeline-workspace table { min-width: 750px; width: 100%; }
.timeline-workspace td { max-width: 320px; overflow-wrap: anywhere; }
.timeline-workspace td a { color: var(--blue); text-underline-offset: 3px; }
.timeline-pages { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.timeline-pages a { padding: 7px 12px; border: 1px solid var(--line); border-radius: 4px; }
.timeline-pages [aria-current] { background: var(--blue); color: white; }
#timeline-links { scroll-margin-top: 20px; }
.project-rail { overflow-y: auto; }

/* AI journal uses the application's blue palette and a reading-width text column. */
.ai-workspace { max-width: 1540px; width: 100%; margin-inline: auto; }
.ai-intro { color: var(--muted); margin: 14px 0 0; }
.ai-howto { max-width: 86ch; font-size: 14px; color: var(--muted); line-height: 1.7; margin-bottom: 24px; }
.ai-filters { display: flex; gap: 14px; flex-wrap: wrap; align-items: end; margin-bottom: 28px; }
.ai-filters label { display: flex; flex-direction: column; gap: 7px; font-size: 12px; min-width: 130px; max-width: 100%; }
.ai-filters select, .ai-filters input { max-width: 320px; width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 5px; font: inherit; color: var(--ink); background: var(--paper); }
.ai-filters button { min-height: 40px; padding: 8px 18px; border: 0; border-radius: 5px; background: var(--blue); color: white; font: inherit; cursor: pointer; }
.ai-workspace :is(a, summary, button, input, select):focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.ai-report { border-left: 4px solid var(--blue); padding: 8px 0 8px 22px; max-width: 85ch; margin-bottom: 24px; }
.ai-report h2 { font-size: 26px; margin: 10px 0; }
.ai-report p { line-height: 1.7; white-space: pre-line; }
.ai-report-meta, .ai-result-count { color: var(--muted); font-size: 12px; }
.ai-workspace summary { cursor: pointer; color: var(--blue); font-size: 13px; padding-block: 9px; }
.ai-journal { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }
.ai-note { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 30px; padding: 32px; scroll-margin-top: 20px; }
.ai-note + .ai-note { border-top: 1px solid var(--line); }
.ai-note:target { box-shadow: inset 4px 0 var(--blue); }
.ai-note-aside { font-size: 12px; }
.ai-category { font-weight: 650; color: var(--blue); }
.ai-note-aside dl { margin: 20px 0; }
.ai-note-aside dt { color: var(--muted); margin-top: 14px; }
.ai-note-aside dd { margin: 3px 0 0; font-weight: 650; }
.ai-priority-high { color: var(--risk); }
.ai-permalink { color: var(--muted); text-underline-offset: 3px; }
.ai-note-body { min-width: 0; max-width: 76ch; font-size: 15px; line-height: 1.7; overflow-wrap: anywhere; }
.ai-note-body h2 { font-size: 23px; line-height: 1.3; margin-bottom: 16px; }
.ai-note-body h3 { font-size: 14px; margin: 22px 0 8px; }
.ai-note-body p { white-space: pre-line; }
.ai-note-body ol { padding-left: 22px; }
.ai-note-body li { margin-bottom: 10px; }
.ai-limitation { font-size: 13px; color: var(--muted); padding: 14px 16px; background: var(--mist); border-radius: 4px; }
.ai-evidence ul { list-style: none; padding: 0; }
.ai-evidence > ul > li { border-top: 1px solid var(--line); padding: 14px 0; font-size: 13px; }
.ai-evidence p { margin-bottom: 4px; }
.ai-source-meta { color: var(--muted); font-size: 12px; }
.ai-source-links { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 6px; color: var(--blue); }
.ai-snapshot pre { max-height: 340px; overflow: auto; white-space: pre-wrap; font-size: 11px; padding: 14px; background: var(--mist); }
.ai-empty { padding: 28px; color: var(--muted); }
@media (max-width: 1000px) {
  .ai-note { grid-template-columns: 1fr; gap: 18px; padding: 24px; }
  .ai-note-aside { display: flex; gap: 20px; flex-wrap: wrap; align-items: baseline; }
  .ai-note-aside dl { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
  .ai-note-aside dt { margin: 0; }
  .ai-note-aside dd { margin: 0; }
}

.project-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  max-width: 1500px;
  margin: 0 auto 28px;
}

.context-line { margin: 0 0 4px; color: var(--blue); font-size: 13px; font-weight: 650; }

h1, h2, p { margin-top: 0; }

h1 {
  margin-bottom: 6px;
  font-family: Charter, "Iowan Old Style", Georgia, serif;
  font-size: clamp(34px, 4vw, 58px);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1;
}

h2 { margin-bottom: 4px; font-size: 18px; letter-spacing: -.015em; }
.freshness, .section-heading p { margin-bottom: 0; color: var(--muted); font-size: 12px; }

.export-link {
  flex: 0 0 auto;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
}

.export-link:hover, .export-link:focus-visible { border-color: var(--blue); color: var(--blue); }

.summary-ledger {
  max-width: 1500px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(240px, 1.15fr) minmax(460px, 2fr);
  border: 1px solid var(--line);
  background: var(--paper);
}

.primary-fact {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 190px;
  padding: 28px;
  color: #fff;
  background: var(--blue);
}

.primary-fact span { font-size: clamp(56px, 7vw, 92px); font-weight: 650; letter-spacing: -.06em; line-height: .85; }
.primary-fact p { max-width: 180px; margin: 18px 0 0; font-size: 13px; }

.summary-ledger dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
}

.summary-ledger dl div { padding: 25px 22px; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.summary-ledger dl div:nth-last-child(-n+3) { border-bottom: 0; }
.summary-ledger dt { color: var(--muted); font-size: 11px; }
.summary-ledger dd { margin: 8px 0 0; font-size: 29px; font-weight: 650; letter-spacing: -.04em; }
.summary-ledger dd small { margin-left: 2px; color: var(--muted); font-size: 12px; font-weight: 500; }

.quality-profile {
  max-width: 1500px;
  margin: 18px auto 38px;
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(380px, 2fr) 145px;
  gap: 28px;
  align-items: center;
  padding: 24px 26px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.quality-copy p { max-width: 390px; margin-bottom: 0; color: var(--muted); font-size: 12px; }
.quality-track { display: flex; height: 16px; overflow: hidden; border-radius: 3px; background: #e4e8f0; }
.segment { min-width: 2px; }
.segment-strong { background: var(--good); }
.segment-weak { background: var(--amber); }
.segment-zero { background: #b7c0d1; }
.quality-key { display: flex; gap: 18px; margin-top: 10px; color: var(--muted); font-size: 10px; }
.quality-key span { white-space: nowrap; }
.quality-key i { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; }
.key-strong { background: var(--good); }
.key-weak { background: var(--amber); }
.key-zero { background: #b7c0d1; }

.risk-stamp { display: flex; gap: 10px; align-items: center; padding-left: 22px; border-left: 1px solid var(--line); }
.risk-stamp strong { color: var(--risk); font-size: 34px; letter-spacing: -.05em; }
.risk-stamp span { color: var(--muted); font-size: 10px; line-height: 1.25; }

.backlink-digest { max-width: 1500px; margin: 18px auto 38px; padding: 24px 26px; border: 1px solid var(--line); background: var(--paper); }
.backlink-digest p { max-width: 85ch; font-size: 13px; line-height: 1.65; }
.backlink-digest .digest-conclusion { max-width: 80ch; font-size: 16px; color: var(--ink); }
.digest-conclusion strong { color: var(--blue); }
.digest-breakdown { display: flex; flex-wrap: wrap; gap: 20px 32px; margin: 24px 0; }
.digest-breakdown div { display: flex; flex-direction: column-reverse; gap: 5px; }
.digest-breakdown dt { color: var(--muted); font-size: 11px; }
.digest-breakdown dd { margin: 0; font-size: 23px; font-weight: 650; }
.digest-breakdown div:first-child dd { color: var(--good); }
.backlink-digest .digest-count { color: inherit; text-decoration: underline; text-decoration-style: dotted; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.backlink-digest .digest-count:hover, .backlink-digest .digest-count.is-active { color: var(--blue); text-decoration-style: solid; }
.digest-filter-note { padding: 12px 14px; border-left: 3px solid var(--blue); background: var(--blue-soft); font-size: 12px; }
.digest-filter-note a { margin-left: 10px; color: var(--blue); }
#backlinks { scroll-margin-top: 18px; }
.backlink-digest .digest-scope { color: var(--muted); font-size: 11px; }
.backlink-digest details { margin-top: 14px; }
.backlink-digest summary { width: fit-content; color: var(--blue); font-size: 12px; cursor: pointer; }
.backlink-digest summary:focus-visible { outline: 3px solid #b9c9ef; outline-offset: 3px; }
.digest-method p { color: var(--muted); font-size: 12px; }
.backlink-digest a { color: var(--blue); }
.digest-donors ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px 24px; padding: 0; list-style: none; }
.digest-donors li { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; }
.digest-donors li a { overflow-wrap: anywhere; min-width: 0; }
.digest-donors li span { flex-shrink: 0; color: var(--muted); }
@media (max-width: 600px) {
  .backlink-digest { padding: 18px; }
  .digest-breakdown { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
}

.backlinks-section { max-width: 1500px; margin: 0 auto; }
.section-heading { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 15px; }
.api-cost { white-space: nowrap; }

.filters {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(4, minmax(120px, .85fr)) auto;
  gap: 9px;
  align-items: end;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.filters label span { display: block; margin: 0 0 5px 2px; color: var(--muted); font-size: 10px; }
.filters input, .filters select, .filters button {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
}

.filters input { padding: 0 11px; }
.filters select { padding: 0 28px 0 9px; }
.filters button { padding: 0 14px; border-color: var(--blue); background: var(--blue); color: #fff; cursor: pointer; font-weight: 650; }
.filters :focus-visible, a:focus-visible { outline: 3px solid rgba(49,87,213,.25); outline-offset: 2px; }

.table-wrap { overflow: auto; border: 1px solid var(--line); background: var(--paper); }
table { width: 100%; min-width: 1180px; border-collapse: collapse; table-layout: fixed; }
th { position: sticky; top: 0; z-index: 2; padding: 11px 12px; background: #e9eef8; color: #4f5e7a; font-size: 10px; font-weight: 650; text-align: left; }
th:nth-child(1) { width: 27%; }
th:nth-child(2) { width: 25%; }
th:nth-child(3), th:nth-child(4), th:nth-child(5) { width: 7%; text-align: center; }
th:nth-child(6) { width: 13%; }
th:nth-child(7) { width: 14%; }
td { padding: 13px 12px; border-top: 1px solid #e5e9f1; vertical-align: top; font-size: 11px; }
.backlink-row:hover { background: #f7f9fd; }
.backlink-row.is-risky { box-shadow: inset 3px 0 0 var(--risk); }
.domain-link { display: inline-block; color: var(--blue); font-size: 12px; font-weight: 700; text-decoration: none; }
.domain-link:hover { text-decoration: underline; }
.page-title, .source-url, .target-url, .attributes, .date-cell small { display: block; }
.page-title { margin-top: 4px; overflow: hidden; color: #35415a; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.source-url, .target-url { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.anchor-text { display: -webkit-box; overflow: hidden; color: #273550; font-weight: 550; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.target-url a { color: var(--blue); text-decoration: none; }
.signal-cell { text-align: center; }
.signal-number { display: block; font-size: 18px; font-weight: 650; letter-spacing: -.04em; }
.signal-cell small { color: var(--muted); font-size: 8px; }
.signal-good { color: var(--good); }
.signal-risk { color: var(--risk); }
.tag { display: inline-block; margin: 0 4px 4px 0; padding: 3px 6px; border-radius: 3px; background: #e8edf6; color: #53617d; font-size: 8px; font-weight: 700; }
.tag-follow, .tag-new { background: var(--good-soft); color: var(--good); }
.tag-risk { background: var(--risk-soft); color: var(--risk); }
.attributes { margin-top: 3px; color: var(--muted); font-size: 9px; }
.date-cell { color: #34415b; white-space: nowrap; }
.date-cell small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.no-results { padding: 50px; color: var(--muted); text-align: center; }

.project-view-nav { display: flex; gap: 4px; max-width: 1500px; margin: -12px auto 22px; border-bottom: 1px solid var(--line); }
.project-view-nav a { padding: 9px 12px; color: var(--muted); font-size: 12px; font-weight: 650; text-decoration: none; }
.project-view-nav a.is-active { margin-bottom: -1px; border-bottom: 2px solid var(--blue); color: var(--blue); }
.snapshot-cost { padding: 9px 12px; border: 1px solid var(--line); background: var(--paper); color: var(--muted); font-size: 11px; }
.snapshot-cost strong { margin-left: 5px; color: var(--ink); }
.organic-ledger { display: grid; grid-template-columns: minmax(220px, .85fr) minmax(500px, 2fr); max-width: 1500px; margin: 0 auto 18px; border: 1px solid var(--line); background: var(--paper); }
.organic-primary { display: flex; min-height: 150px; flex-direction: column; justify-content: flex-end; padding: 26px; background: var(--blue); color: #fff; }
.organic-primary strong { font-size: clamp(56px, 7vw, 84px); letter-spacing: -.06em; line-height: .85; }
.organic-primary span { margin-top: 16px; font-size: 12px; }
.organic-ledger dl { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; }
.organic-ledger dl div { padding: 25px 18px; border-left: 1px solid var(--line); }
.organic-ledger dt { color: var(--muted); font-size: 10px; }
.organic-ledger dd { margin: 9px 0 0; font-size: 25px; font-weight: 650; letter-spacing: -.04em; }
.rank-distribution { display: grid; grid-template-columns: minmax(210px, .7fr) minmax(420px, 2fr); gap: 10px 28px; align-items: center; max-width: 1500px; margin: 0 auto 28px; padding: 20px 22px; border: 1px solid var(--line); background: var(--paper); }
.rank-distribution p { margin-bottom: 0; color: var(--muted); font-size: 11px; }
.rank-track { display: flex; height: 19px; overflow: hidden; border-radius: 3px; background: #e4e8f0; }
.rank-track span { min-width: 2px; }
.rank-top10 { background: var(--good); }
.rank-top20 { background: #7c8eaa; }
.rank-top50 { background: var(--amber); }
.rank-top100 { background: #aeb8ca; }
.rank-legend { grid-column: 2; display: flex; gap: 18px; color: var(--muted); font-size: 10px; }
.rank-legend i { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; }
.organic-grid { display: grid; grid-template-columns: minmax(260px, .7fr) minmax(540px, 1.3fr); gap: 18px; max-width: 1500px; margin: 0 auto 34px; }
.organic-pages-panel, .organic-competitors { min-width: 0; padding: 18px; border: 1px solid var(--line); background: var(--paper); }
.organic-page { display: block; padding: 11px 0; border-top: 1px solid #e5e9f1; color: var(--blue); font-size: 10px; text-decoration: none; }
.organic-page span, .organic-page strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.organic-page strong { margin-top: 4px; color: var(--muted); font-size: 9px; font-weight: 550; }
.organic-competitors table { min-width: 580px; table-layout: auto; }
.organic-competitors th, .organic-competitors td { width: auto !important; text-align: left !important; }
.organic-filters { grid-template-columns: minmax(260px, 2fr) minmax(150px, 1fr) minmax(150px, 1fr) auto; }
.organic-keyword-table { min-width: 1080px; }
.organic-keyword-table th:nth-child(1) { width: 20%; }
.organic-keyword-table th:nth-child(2) { width: 10%; text-align: left; }
.organic-keyword-table th:nth-child(3), .organic-keyword-table th:nth-child(4), .organic-keyword-table th:nth-child(5), .organic-keyword-table th:nth-child(6) { width: 9%; text-align: center; }
.organic-keyword-table th:nth-child(7) { width: 33%; }
.keyword-cell strong, .keyword-cell span, .organic-url a, .organic-url span { display: block; }
.keyword-cell strong { font-size: 12px; }
.keyword-cell span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.rank-cell strong { display: inline-block; min-width: 28px; font-size: 22px; }
.rank-delta { margin-right: 5px; color: var(--muted); font-size: 10px; font-weight: 700; }
.rank-up { color: var(--good); }
.rank-down { color: var(--risk); }
.organic-url a { display: block; overflow: hidden; color: var(--blue); font-weight: 650; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.organic-url span { display: block; margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.organic-empty { max-width: 1500px; margin: 0 auto; padding: 42px; border: 1px solid var(--line); background: var(--paper); }
.technical-audit { display: grid; grid-template-columns: 130px minmax(220px, .8fr) minmax(500px, 1.5fr); gap: 22px; align-items: center; max-width: 1500px; margin: 0 auto 28px; padding: 18px 22px; border: 1px solid var(--line); background: var(--paper); }
.technical-score { padding-right: 20px; border-right: 1px solid var(--line); }
.technical-score strong, .technical-score span { display: block; }
.technical-score strong { color: var(--good); font-size: 34px; letter-spacing: -.05em; }
.technical-score span { color: var(--muted); font-size: 9px; }
.technical-audit p { margin-bottom: 0; color: var(--muted); font-size: 11px; }
.technical-audit dl { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; }
.technical-audit dl div { padding: 6px 14px; border-left: 1px solid var(--line); }
.technical-audit dt { color: var(--muted); font-size: 9px; }
.technical-audit dd { margin: 4px 0 0; font-size: 20px; font-weight: 650; }

.directory-header .freshness { max-width: 690px; }

.directory-overview {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  max-width: 1500px;
  margin: 0 auto 38px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.directory-overview div { padding: 22px 20px; border-left: 1px solid var(--line); }
.directory-overview div:first-child { border-left: 0; background: var(--blue); color: #fff; }
.directory-overview strong, .directory-overview span { display: block; }
.directory-overview strong { font-size: 30px; letter-spacing: -.045em; }
.directory-overview span { margin-top: 5px; color: var(--muted); font-size: 10px; }
.directory-overview div:first-child span { color: #dce5ff; }

.directory-accounts-panel { max-width: 1500px; margin: 0 auto 32px; padding: 22px; border: 1px solid var(--line); background: var(--paper); }
.directory-accounts-panel .section-heading { margin-bottom: 16px; }
.directory-accounts-panel .section-heading p { max-width: 85ch; margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.directory-account-add { display: grid; grid-template-columns: minmax(240px, 1.5fr) minmax(180px, .8fr) minmax(220px, 1fr) auto; gap: 10px; align-items: end; margin-bottom: 18px; }
.directory-account-add label, .directory-account-form label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; }
.directory-account-add input, .directory-account-add select, .directory-account-add button,
.directory-account-form input, .directory-account-form select, .directory-account-form button {
  width: 100%; min-width: 0; height: 38px; box-sizing: border-box; border: 1px solid var(--line);
  border-radius: 5px; padding: 0 10px; background: #fff; color: var(--ink); font: inherit; font-size: 12px;
}
.directory-account-add button, .directory-account-form button { border-color: var(--blue); background: var(--blue); color: #fff; font-weight: 650; cursor: pointer; }
.directory-account-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.directory-account-card { min-width: 0; padding: 13px 14px; border: 1px solid var(--line); border-radius: 5px; background: #f9fbff; }
.directory-account-card[id], .directory-table tr[id] { scroll-margin-top: 18px; }
.directory-account-card.directory-updated { border-color: #91b8a6; background: #f0faf4; }
.directory-table tr.directory-updated td { background: #f0faf4; }
.directory-table tr.directory-updated td:first-child { box-shadow: inset 3px 0 0 var(--good); }
.directory-saved { display: inline-block; margin: 5px 0 0; padding: 3px 6px; border-radius: 3px; background: var(--good-soft); color: var(--good); font-size: 10px; font-weight: 700; }
.directory-account-summary { display: flex; flex-wrap: wrap; gap: 5px 8px; align-items: center; }
.directory-account-summary strong { color: var(--ink); font-size: 13px; }
.directory-account-email { width: 100%; overflow-wrap: anywhere; color: #35415a; font-size: 11px; }
.directory-account-summary small { color: var(--muted); font-size: 10px; }
.directory-account-card details { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.directory-account-card summary { color: var(--blue); cursor: pointer; font-size: 11px; }
.directory-account-form { display: grid; gap: 8px; margin-top: 10px; }

.directory-filters { grid-template-columns: repeat(4, minmax(150px, 1fr)); }
.directory-check { margin-top: 14px; font-size: 12px; line-height: 1.55; white-space: normal; }
.directory-check p { margin: 8px 0; max-width: 65ch; }
.directory-check a { color: var(--blue); overflow-wrap: anywhere; }
.directory-check small { display: block; margin: 8px 0; color: var(--muted); }
.directory-check summary { cursor: pointer; color: var(--blue); }
.directory-check details[open] { border-top: 1px solid var(--line); padding-top: 8px; }
.directory-check-summary { max-width: 90ch; color: var(--muted); font-size: 13px; margin-bottom: 24px; }
.directory-table { min-width: 1500px; }
.directory-table th:nth-child(1) { width: 25%; min-width: 350px; }
.directory-table th:nth-child(2) { width: 13%; }
.directory-table th:nth-child(3) { width: 6%; text-align: center; }
.directory-table th:nth-child(4) { width: 9%; text-align: left; }
.directory-table th:nth-child(5),
.directory-table th:nth-child(6) { width: 7%; text-align: center; }
.directory-table th:nth-child(7) { width: 10%; }
.directory-table th:nth-child(8) { width: 15%; }
.directory-table th:nth-child(9) { width: 8%; }
.directory-table th:hover, .directory-table th:focus-within { z-index: 4; }
.directory-header-label { display: flex; align-items: center; gap: 6px; }
.directory-header-label .sort-link { flex: 1; min-width: 0; }
.header-help {
  position: relative; display: inline-grid; flex: none; place-items: center;
  width: 18px; height: 18px; padding: 0; border: 1px solid #a8b6d0;
  border-radius: 50%; background: #fff; color: #526687; font: inherit;
  font-size: 11px; font-weight: 750; cursor: help;
}
.header-help:hover, .header-help:focus-visible { border-color: var(--blue); color: var(--blue); outline: 2px solid #b9c9ef; outline-offset: 2px; }
.header-help-bubble {
  position: absolute; top: calc(100% + 10px); left: 50%; z-index: 10;
  width: 250px; box-sizing: border-box; padding: 12px 14px;
  border-radius: 6px; background: #263551; color: #fff;
  box-shadow: 0 8px 24px rgba(20, 39, 73, .22);
  font-size: 11px; font-weight: 450; line-height: 1.5; text-align: left;
  white-space: normal; transform: translateX(-50%);
  visibility: hidden; opacity: 0; pointer-events: none;
}
.directory-table th:first-child .header-help-bubble { left: 0; transform: none; }
.directory-table th:nth-last-child(-n+2) .header-help-bubble { left: auto; right: 0; transform: none; }
.header-help:hover .header-help-bubble, .header-help:focus-visible .header-help-bubble { visibility: visible; opacity: 1; }
.directory-access .access-email { display: block; margin-top: 6px; overflow-wrap: anywhere; color: var(--muted); }
.directory-access-preview { display: flex; flex-wrap: wrap; gap: 5px 8px; align-items: center; margin-top: 8px; }
.directory-access-preview span:last-child { overflow-wrap: anywhere; color: var(--muted); }
.directory-access-edit { margin-top: 10px; }
.directory-access-edit summary { color: var(--blue); cursor: pointer; }
.directory-access-form { display: grid; gap: 8px; margin-top: 10px; }
.directory-access-form label { display: grid; gap: 4px; color: var(--muted); font-size: 10px; }
.directory-access-form input, .directory-access-form select, .directory-access-form button {
  width: 100%; min-width: 0; height: 32px; box-sizing: border-box; border: 1px solid var(--line);
  border-radius: 4px; padding: 0 7px; font: inherit; font-size: 11px;
}
.directory-access-form button { border-color: var(--blue); background: var(--blue); color: #fff; font-weight: 650; cursor: pointer; }
.directory-projects { padding-top: 11px; }
.project-pill {
  display: inline-block;
  margin: 0 4px 4px 0;
  padding: 4px 7px;
  border: 1px solid #cbd5ea;
  border-radius: 4px;
  color: var(--blue);
  font-size: 9px;
  font-weight: 650;
  text-decoration: none;
}
.project-pill:hover, .project-pill:focus-visible { border-color: var(--blue); background: var(--blue-soft); }
.follow-split {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1px 6px;
  align-items: baseline;
}
.follow-split strong { color: var(--ink); font-size: 12px; }
.follow-split span { color: var(--muted); font-size: 9px; }
.directory-kind small { display: block; max-width: 260px; margin-top: 4px; color: var(--muted); font-size: 9px; }
.sort-link {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: space-between;
  color: inherit;
  text-decoration: none;
}
.sort-link span { color: #8a96ad; font-size: 12px; }
.sort-link:hover, .sort-link:focus-visible, .sort-link.is-active { color: var(--blue); }
.sort-link.is-active span { color: var(--blue); }

.strategy-workspace { background: linear-gradient(90deg, rgba(49,87,213,.025), transparent 38%); }
.strategy-header { align-items: center; }
.own-site-chip { display: inline-flex; gap: 8px; align-items: center; padding: 9px 12px; border: 1px solid #b9c9ef; background: var(--blue-soft); color: var(--blue); font-size: 11px; font-weight: 650; }
.own-site-chip i, .role-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.own-site-chip i, .role-own { background: var(--blue); }
.role-competitor { background: var(--amber); }
.opportunity-ledger { display: grid; grid-template-columns: 1.15fr 1fr 1fr; max-width: 1500px; margin: 0 auto 34px; border: 1px solid var(--line); background: var(--paper); }
.opportunity-ledger > div { min-height: 150px; padding: 26px; border-left: 1px solid var(--line); }
.opportunity-ledger > div:first-child { border-left: 0; }
.opportunity-ledger strong, .opportunity-ledger span { display: block; }
.opportunity-ledger strong { font-size: clamp(40px, 5vw, 68px); letter-spacing: -.055em; line-height: 1; }
.opportunity-ledger span { max-width: 240px; margin-top: 16px; color: var(--muted); font-size: 11px; }
.opportunity-ledger .opportunity-lead { color: #fff; background: var(--blue); }
.opportunity-ledger .opportunity-lead span { color: #dce5ff; }
.strategy-section { max-width: 1500px; margin: 0 auto 28px; }
.strategy-section > .section-heading { padding: 0 2px; }
.strategy-scoreboard table { min-width: 760px; table-layout: auto; }
.strategy-scoreboard th, .strategy-scoreboard td { width: auto !important; text-align: right !important; }
.strategy-scoreboard th:first-child, .strategy-scoreboard td:first-child { text-align: left !important; }
.strategy-scoreboard td:first-child a, .strategy-scoreboard td:first-child small { display: block; }
.strategy-scoreboard td:first-child a { color: var(--ink); font-size: 13px; font-weight: 700; text-decoration: none; }
.strategy-scoreboard td:first-child small { margin: 3px 0 0 16px; color: var(--muted); font-size: 9px; }
.strategy-scoreboard .role-dot { margin-right: 8px; }
.strategy-scoreboard .own-row { background: #f3f6ff; box-shadow: inset 3px 0 0 var(--blue); }
.strategy-split { display: grid; grid-template-columns: minmax(600px, 1.35fr) minmax(300px, .65fr); gap: 18px; max-width: 1500px; margin: 0 auto 28px; }
.strategy-split .strategy-section { min-width: 0; margin: 0; padding: 18px; border: 1px solid var(--line); background: var(--paper); }
.backlink-gap-panel .table-wrap { border: 0; }
.backlink-gap-panel table { min-width: 650px; table-layout: auto; }
.backlink-gap-panel th, .backlink-gap-panel td { width: auto !important; }
.page-gap-panel { border-top: 4px solid var(--amber) !important; }
.gap-page { display: grid; grid-template-columns: minmax(80px, .6fr) minmax(130px, 1fr); gap: 2px 10px; padding: 11px 2px; border-top: 1px solid #e5e9f1; color: var(--ink); text-decoration: none; }
.gap-page span { color: #956619; font-size: 9px; }
.gap-page strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.gap-page small { grid-column: 2; color: var(--muted); font-size: 9px; }
.keyword-gap-panel table { min-width: 940px; }
.keyword-gap-panel th:nth-child(1) { width: 30%; }
.keyword-gap-panel th:nth-child(2), .keyword-gap-panel th:nth-child(3), .keyword-gap-panel th:nth-child(4) { width: 12%; text-align: center; }
.keyword-gap-panel th:nth-child(5) { width: 34%; }
.roster-panel { display: grid; grid-template-columns: minmax(220px, .7fr) minmax(420px, 1.4fr) minmax(260px, .9fr); gap: 28px; align-items: end; padding: 22px; border: 1px solid var(--line); border-left: 4px solid var(--blue); background: var(--paper); }
.roster-panel p { margin-bottom: 0; color: var(--muted); font-size: 11px; }
.roster-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; }
.roster-form.own-form { grid-template-columns: 1fr auto; }
.roster-form label span { display: block; margin: 0 0 5px 2px; color: var(--muted); font-size: 9px; }
.roster-form input, .roster-form select, .roster-form button, .role-setup input, .role-setup select, .role-setup button { height: 38px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--ink); font: inherit; font-size: 11px; }
.roster-form input, .roster-form select { width: 100%; padding: 0 9px; }
.roster-form button, .role-setup button { padding: 0 14px; border-color: var(--blue); background: var(--blue); color: #fff; cursor: pointer; font-weight: 650; }
.role-setup { max-width: 760px; margin: 0 auto; padding: 28px; border: 1px solid var(--line); background: var(--paper); }
.role-setup form { display: flex; gap: 10px; align-items: end; }
.role-setup label { flex: 1; }
.role-setup label span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; }
.role-setup select { width: 100%; padding: 0 9px; }

.empty-state { display: grid; min-height: 100vh; place-content: center; padding: 30px; text-align: center; }
.empty-mark { margin-bottom: 8px; color: var(--blue); font-size: 64px; }
.empty-state h1 { font-size: 40px; }
.empty-state p { color: var(--muted); }
.empty-state code { padding: 10px 12px; background: #e5eaf4; font-size: 12px; }

@media (max-width: 1100px) {
  .filters { grid-template-columns: repeat(3, 1fr); }
  .search-field { grid-column: span 2; }
  .quality-profile { grid-template-columns: 1fr 2fr; }
  .risk-stamp { grid-column: 1 / -1; padding: 14px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .directory-overview { grid-template-columns: repeat(3, 1fr); }
  .directory-overview div:nth-child(4) { border-left: 0; border-top: 1px solid var(--line); }
  .directory-overview div:nth-child(5) { border-top: 1px solid var(--line); }
  .directory-overview div:nth-child(6) { border-top: 1px solid var(--line); }
  .directory-filters { grid-template-columns: repeat(3, 1fr); }
  .directory-account-add { grid-template-columns: 1fr 1fr; }
  .organic-grid { grid-template-columns: 1fr; }
  .technical-audit { grid-template-columns: 120px 1fr; }
  .technical-audit dl { grid-column: 1 / -1; }
  .organic-ledger dl { grid-template-columns: repeat(2, 1fr); }
  .organic-ledger dl div:nth-child(3) { border-top: 1px solid var(--line); }
  .organic-ledger dl div:nth-child(4) { border-top: 1px solid var(--line); }
  .strategy-split { grid-template-columns: 1fr; }
  .roster-panel { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .project-rail { position: static; width: 100%; height: auto; padding: 16px; }
  .brand { margin: 0 0 14px; }
  .project-rail nav { display: flex; gap: 7px; overflow-x: auto; }
  .project-link { flex: 0 0 auto; min-width: 170px; margin: 0; }
  .directory-link { margin-right: 7px; }
  .rail-divider { display: none; }
  .rail-note { display: none; }
  .workspace { padding: 28px 14px 50px; }
  .project-header { align-items: end; }
  .summary-ledger { grid-template-columns: 1fr; }
  .primary-fact { min-height: 145px; }
  .summary-ledger dl { grid-template-columns: repeat(2, 1fr); }
  .summary-ledger dl div { border-left: 0; border-right: 1px solid var(--line); }
  .summary-ledger dl div:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }
  .summary-ledger dl div:nth-last-child(-n+2) { border-bottom: 0; }
  .quality-profile { grid-template-columns: 1fr; gap: 18px; }
  .risk-stamp { grid-column: auto; }
  .quality-key { flex-wrap: wrap; gap: 7px 14px; }
  .filters { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
  .filters button { grid-column: 1 / -1; }
  .directory-overview { grid-template-columns: 1fr 1fr; }
  .directory-overview div { border-top: 1px solid var(--line); }
  .directory-overview div:nth-child(odd) { border-left: 0; }
  .directory-overview div:first-child, .directory-overview div:nth-child(2) { border-top: 0; }
  .directory-filters { grid-template-columns: 1fr 1fr; }
  .directory-account-add { grid-template-columns: 1fr; }
  .organic-ledger { grid-template-columns: 1fr; }
  .organic-ledger dl div { border-left: 0; border-right: 1px solid var(--line); }
  .rank-distribution { grid-template-columns: 1fr; }
  .rank-legend { grid-column: 1; flex-wrap: wrap; }
  .organic-filters { grid-template-columns: 1fr 1fr; }
  .technical-audit { grid-template-columns: 1fr; }
  .technical-score { padding: 0 0 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .technical-audit dl { grid-column: 1; grid-template-columns: repeat(2, 1fr); }
  .opportunity-ledger { grid-template-columns: 1fr; }
  .opportunity-ledger > div { min-height: 120px; border-top: 1px solid var(--line); border-left: 0; }
  .opportunity-ledger > div:first-child { border-top: 0; }
  .strategy-split .strategy-section { padding: 14px; }
  .roster-form, .roster-form.own-form { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
