@font-face {
  font-family: Inter;
  src: url("./inter.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --blue: #174aca;
  --blue-dark: #113baf;
  --ink: #111d35;
  --muted: #4e5e76;
  --line: #dbe4f2;
  --line-strong: #cbd8eb;
  --pale: #f4f7fd;
  --paper: #fff;
  --radius: 16px;
  --gutter: clamp(18px, 4vw, 46px);
  font: 16px/1.55 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  scroll-padding-top: 94px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  margin: 0;
  background: var(--pale);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { color: var(--ink); font-weight: 730; line-height: 1.13; }
h1 { letter-spacing: -.06em; }
h2 { letter-spacing: -.035em; }
h3 { letter-spacing: -.022em; }
p { color: var(--muted); }
a { color: var(--blue); text-underline-offset: .19em; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 3px solid #2d66ec; outline-offset: 3px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 10px;
  left: 12px;
  transform: translateY(-160%);
  padding: 10px 14px;
  border-radius: 7px;
  background: var(--paper);
  font-weight: 650;
}

.skip-link:focus { transform: none; }
.shell { width: min(1200px, calc(100% - var(--gutter) - var(--gutter))); margin-inline: auto; }

.site-header {
  position: sticky;
  z-index: 5;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.topbar {
  display: grid;
  min-height: 76px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}

.brand {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}

.brand strong { display: block; font-size: 23px; line-height: 1.06; letter-spacing: -.06em; }
.brand small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.25; }
.brand-suffix { color: var(--blue); }

.brand-icon {
  position: relative;
  display: inline-grid;
  width: 39px;
  height: 39px;
  flex: none;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(145deg, #346cff, #1650d6 69%, #123fb2);
  color: #fff;
}

.brand-icon::before, .brand-icon::after,
.search-icon::before, .search-icon::after,
.symbol-search::before, .symbol-search::after {
  position: absolute;
  display: block;
  content: "";
}

.brand-icon::before { width: 12px; height: 12px; margin: -3px 3px 0 0; border: 2px solid; border-radius: 50%; }
.brand-icon::after { width: 8px; height: 2px; margin: 11px 0 0 11px; transform: rotate(45deg); border-radius: 2px; background: currentColor; }

.topbar nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 34px); }
.topbar nav a {
  padding: 8px 0;
  color: #394962;
  font-size: 15px;
  font-weight: 630;
  text-decoration: none;
  white-space: nowrap;
}

.topbar nav a:hover, .topbar nav a[aria-current] { color: var(--blue); }
.topbar nav a[aria-current] { text-decoration: underline; text-decoration-thickness: 2px; }
.header-actions { justify-self: end; }

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 680;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
}

.button.primary { border-color: var(--blue); background: var(--blue); color: #fff; }
.button.primary:hover { border-color: var(--blue-dark); background: var(--blue-dark); }
.button.quiet { border-color: var(--line-strong); background: var(--paper); color: #243a5d; }
.button.quiet:hover { border-color: #819fdf; background: #f5f8ff; color: var(--blue-dark); }
.button.small { min-height: 38px; padding: 7px 12px; }
.button:disabled, .button:disabled:hover { border-color: var(--line); background: #edf2f9; color: #5e6e85; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle, rgb(55 107 221 / 19%) 1px, transparent 1.2px) right top / 20px 20px,
    radial-gradient(ellipse at 83% 30%, #d9e7ff 0, transparent 62%),
    linear-gradient(119deg, #fbfdff, #edf4ff 57%, #e8f1ff);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr);
  align-items: center;
  gap: clamp(30px, 5.5vw, 74px);
  padding-block: clamp(58px, 7vw, 100px);
}

.hero h1 { font-size: clamp(43px, 4.48vw, 65px); line-height: 1.02; }
.hero h1 span { display: block; color: var(--blue); }
.hero-copy > p:first-of-type {
  max-width: 46ch;
  margin-top: 22px;
  color: #435674;
  font-size: clamp(17px, 1.38vw, 19px);
  line-height: 1.6;
}

.hero .actions { margin-top: 27px; }
.hero .button { min-height: 48px; padding-inline: 17px; font-size: 15px; }
.hero-note { margin-top: 14px; font-size: 14px; color: #4e6281; }

.preview-frame {
  min-width: 0;
  padding: clamp(20px, 2.55vw, 36px);
  border: 1px solid #365fb1;
  border-radius: 22px;
  background:
    linear-gradient(rgb(178 205 255 / 12%) 1px, transparent 1px) 50% 50% / 27px 27px,
    linear-gradient(90deg, rgb(178 205 255 / 12%) 1px, transparent 1px) 50% 50% / 27px 27px,
    radial-gradient(ellipse at 96% 93%, #285cdb 0%, transparent 64%),
    linear-gradient(144deg, #101e45 3%, #13326c 64%, #1545bc 100%);
  box-shadow: 0 22px 45px rgb(23 55 107 / 22%);
}

.preview-window {
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 70%);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 0 10px 24px rgb(6 20 56 / 22%);
}

.preview-top {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: #f8faff;
  font-size: 14px;
}

.brand-icon.mini { width: 23px; height: 23px; border-radius: 6px; }
.brand-icon.mini::before { width: 8px; height: 8px; margin: -2px 2px 0 0; border-width: 1.5px; }
.brand-icon.mini::after { width: 5px; height: 1.5px; margin: 7px 0 0 6px; }
.preview-body { padding: 16px 16px 15px; }

.preview-query {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: #1a2f52;
  font-size: 14px;
}

.search-icon { position: relative; width: 16px; height: 16px; flex: none; color: #466895; }
.search-icon::before { top: 1px; left: 1px; width: 8px; height: 8px; border: 1.6px solid; border-radius: 50%; }
.search-icon::after { top: 10px; left: 9px; width: 6px; height: 1.6px; transform: rotate(45deg); transform-origin: left; border-radius: 2px; background: currentColor; }
.preview-generated { margin-top: 10px; font-size: 14px; }
.preview-keywords { margin: 8px 0 0; padding: 0; list-style: none; }
.preview-keywords li {
  padding: 8px 0;
  border-bottom: 1px solid #e9eef7;
  color: #263a58;
  overflow-wrap: anywhere;
}
.preview-link { display: inline-block; margin-top: 13px; color: var(--blue); font-size: 14px; font-weight: 660; text-decoration: none; }
.preview-link:hover { text-decoration: underline; }

.tag {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 3px 8px;
  border-radius: 5px;
  background: #edf3fd;
  color: #305387;
  font-size: 14px;
  font-weight: 590;
  line-height: 1.35;
  white-space: nowrap;
}

.tag.question { background: #e5f5ee; color: #236348; }
.tag.comparison { background: #eee9fb; color: #5b408b; }
.tag.modifier { background: #eaf1fd; color: #315b9d; }

.workflow { padding-block: clamp(40px, 5.4vw, 70px); }
.section-heading h2 { font-size: clamp(30px, 3.3vw, 43px); }
.section-heading p { margin-top: 8px; font-size: 17px; }
.workflow-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.workflow-grid article { padding: 22px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); }
.workflow-grid h3 { margin-top: 13px; font-size: 19px; }
.workflow-grid p { margin-top: 7px; }

.feature-symbol {
  position: relative;
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 9px;
  background: #eaf1ff;
  color: var(--blue);
}

.symbol-search::before { top: 10px; left: 10px; width: 11px; height: 11px; border: 2px solid; border-radius: 50%; }
.symbol-search::after { top: 25px; left: 23px; width: 8px; height: 2px; transform: rotate(45deg); transform-origin: left; border-radius: 2px; background: currentColor; }
.symbol-filter::before, .symbol-export::before, .symbol-export::after { position: absolute; content: ""; }
.symbol-filter::before { top: 12px; left: 10px; width: 20px; height: 16px; background: currentColor; clip-path: polygon(0 0,100% 0,100% 13%,0 13%,0 0,15% 44%,85% 44%,85% 57%,15% 57%,15% 44%,32% 87%,68% 87%,68% 100%,32% 100%,32% 87%); }
.symbol-export::before { top: 9px; left: 15px; width: 10px; height: 15px; background: currentColor; clip-path: polygon(40% 0,60% 0,60% 69%,88% 49%,100% 60%,50% 100%,0 60%,12% 49%,40% 69%); }
.symbol-export::after { top: 23px; left: 10px; width: 20px; height: 7px; border: 2px solid; border-top: 0; border-radius: 0 0 3px 3px; }

.workspace, .pricing, .access { padding-block: clamp(30px, 5vw, 65px); }
.access-card { max-width: 620px; padding: clamp(22px, 4vw, 43px); margin-inline: auto; }
.access-card h1 { font-size: clamp(30px, 4vw, 43px); }
.access-card p { margin: 12px 0 20px; }
.view-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.view-heading h1 { font-size: clamp(35px, 4.2vw, 55px); }
.view-heading p { margin-top: 6px; font-size: 17px; }
#search-panel, #job-panel, #result-panel, #project-library { scroll-margin-top: 86px; }
.project-library { margin-block: 14px 18px; }
.project-library > summary { padding: 12px clamp(14px, 2vw, 24px); color: var(--blue-dark); font-size: 15px; font-weight: 670; cursor: pointer; }
.project-library[open] > summary { border-bottom: 1px solid var(--line); }
.research-disclosure > summary { width: fit-content; padding-block: 3px; color: var(--blue-dark); font-size: 14px; font-weight: 670; cursor: pointer; }
.result-sharing { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
.result-sharing summary { width: fit-content; color: var(--blue-dark); font-size: 14px; font-weight: 670; cursor: pointer; }
.result-sharing p { margin: 7px 0; font-size: 14px; }
#result-sharing-status { color: var(--ink); font-weight: 630; }
#extension-readiness { margin-top: 8px; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(264px, 300px); align-items: start; gap: 20px; }
.workspace-main, .workspace-side { display: grid; min-width: 0; gap: 17px; }

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 2px 4px rgb(15 39 82 / 3%);
}

.search-panel, .results-panel { padding: 21px; }
.search-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 12px; }
#search-title { font-size: 20px; }
#search-project-context { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.search-panel:has(#search-project-field:not([hidden])) #search-project-context { display: none; }
.extension-gate {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  margin-bottom: 14px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--pale);
}
.extension-gate p { flex: 1 1 220px; color: var(--ink); font-size: 14px; }
.search-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(145px, .38fr) minmax(145px, .38fr); align-items: end; gap: 12px; }
.search-fields:has(#search-project-field[hidden]) { grid-template-columns: minmax(0, 1fr) minmax(145px, .38fr); }
.search-fields label { display: grid; min-width: 0; gap: 5px; color: #263857; font-size: 14px; font-weight: 670; }
.search-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 15px; margin-top: 12px; }
.search-actions .button { min-height: 44px; }
.search-allowance { color: var(--muted); font-size: 14px; }
.search-actions .quota-usage-link { margin-top: 0; }
.search-options { margin-top: 10px; }

input[type="search"], input[type="number"], select, textarea {
  display: block;
  min-width: 0;
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fcfdff;
  color: var(--ink);
  font-size: 16px;
  font-weight: 450;
}

select { padding-right: 27px; }
input::placeholder { color: #5f6e84; opacity: 1; }
input:hover, select:hover, textarea:hover { border-color: #8da4c6; }
textarea { min-height: 92px; resize: vertical; }
.search-fields input, .search-fields select { min-height: 46px; }
.search-fields textarea { min-height: 71px; }
.notify-option { display: inline-flex; align-items: baseline; gap: 8px; margin-top: 5px; color: #344f75; font-size: 14px; cursor: pointer; }
.notify-option input { width: 16px; height: 16px; margin: 0; accent-color: var(--blue); align-self: center; }
.job-panel { min-width: 0; padding: clamp(14px, 2.2vw, 22px); border-color: #c5d6f3; background: #f8fbff; }
.job-header, .job-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: start; gap: 5px 14px; }
.job-header h2 { font-size: 21px; }
#job-seeds { margin-top: 3px; font-size: 14px; overflow-wrap: anywhere; }
#job-percent { color: var(--blue-dark); font-size: 21px; font-variant-numeric: tabular-nums; }
.job-panel progress { display: block; width: 100%; height: 9px; margin: 13px 0 8px; accent-color: var(--blue); }
.job-meta { font-size: 14px; }
#job-stage { color: #223b66; font-weight: 650; }
#job-notice, #view-job-results, #preview-completion-email { margin-top: 9px; }
.payg-budget { grid-column: 1 / -1; padding: 12px 14px; border: 1px solid #dbe6fb; border-radius: 10px; background: #f7faff; }
.payg-budget-fields { display: grid; grid-template-columns: minmax(0, 180px) minmax(0, 1fr); align-items: end; gap: 10px 18px; }
.payg-budget-fields input { max-width: 128px; }
.payg-cost { display: grid; gap: 3px; color: var(--muted); font-size: 14px; line-height: 1.4; }
.payg-cost output { color: var(--ink); font-size: 19px; font-weight: 720; font-variant-numeric: tabular-nums; }
.payg-note { margin-top: 9px; color: #344f75; font-size: 14px; }
.job-charge { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(120px, 100%), 1fr)); gap: 9px 15px; margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.job-charge dt { color: var(--muted); font-size: 13px; }
.job-charge dd { margin: 0; color: var(--ink); font-size: 20px; font-weight: 720; font-variant-numeric: tabular-nums; }
.job-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.stop-job { color: #922b29; }
.stop-job:hover { background: #fff3f0; }
.job-cap-notice { margin-top: 14px; padding: 14px; border: 1px solid #efdbb3; border-radius: 10px; background: #fff9ed; }
.job-cap-notice h3 { color: #563e17; font-size: 17px; }
.job-cap-notice p { margin: 5px 0 12px; color: #5e4b2c; font-size: 14px; }
.custom-cap-options { margin-top: 8px; }
.job-raise-cap { display: flex; flex-wrap: wrap; align-items: end; gap: 9px 14px; margin-top: 7px; }
.job-raise-cap label { display: grid; gap: 5px; color: #263857; font-size: 14px; font-weight: 670; }
.job-raise-cap input { max-width: 160px; }
.email-fields { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 13px; margin: 14px 0; border-top: 1px solid var(--line); padding-top: 12px; }
.email-fields dt { font-weight: 670; color: #344f75; }
.email-fields dd { margin: 0; overflow-wrap: anywhere; }
.email-body { padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #f7faff; white-space: pre-wrap; overflow-wrap: anywhere; }
.example-row { display: flex; align-items: baseline; gap: 5px 9px; margin-left: auto; color: var(--muted); font-size: 13px; }
#examples { display: flex; flex-wrap: wrap; gap: 3px; }
#examples button, #examples a {
  min-height: 28px;
  padding: 3px 4px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #234d9f;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

#examples button:hover, #examples a:hover { background: #e9f0ff; }
#search-status {
  margin-top: 13px;
  padding: 9px 12px;
  border: 1px solid #cbdaf6;
  border-radius: 8px;
  background: #f0f5ff;
  color: #294b82;
  font-size: 14px;
}

#search-status.is-warning { border-color: #efdbb3; background: #fff6e5; color: #74501a; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-heading h2 { font-size: clamp(22px, 2.18vw, 28px); }
.panel-heading p { margin-top: 4px; font-size: 14px; }
.filter-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(130px, 170px); gap: 10px; margin: 17px 0 13px; }
.filter-row:has(select[hidden]) { grid-template-columns: minmax(0, 1fr); }
.result-analysis { margin-top: 13px; }
.processing-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.processing-tools:has(#eligibility-tool[hidden]) { grid-template-columns: minmax(0, 1fr); }
.processing-card { display: flex; flex-direction: column; align-items: start; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: #f7faff; }
.processing-card h3 { font-size: 17px; }
.processing-card p { font-size: 14px; }
.processing-card .button { margin-top: auto; }
.tool-state { color: #344f75; }
.version-panel { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: 8px 14px; margin-top: 15px; }
.version-panel label { color: #344f75; font-size: 14px; font-weight: 670; }
.version-panel select { max-width: 415px; }
.version-upgrade { margin-top: 11px; color: #344f75; font-size: 14px; }
.eligibility-options { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 13px; margin: 0 0 12px; }
.eligibility-options label { display: inline-flex; align-items: center; gap: 6px; color: #263857; font-size: 14px; font-weight: 660; cursor: pointer; }
.eligibility-options input { width: 16px; height: 16px; margin: 0; accent-color: var(--blue); }
.eligibility-status { font-size: 12px; white-space: normal; }
.eligibility-status.eligible { background: #e5f5ee; color: #236348; }
.eligibility-status.low-volume { background: #fff2dd; color: #74501a; }
.eligibility-status.unchecked { background: #edf1f7; color: #4e5e76; }
.result-table table { width: 100%; border-collapse: collapse; text-align: left; }
.result-table thead { background: #edf3fd; color: #354b6c; font-size: 14px; }
.result-table th { padding: 8px 10px; font-weight: 680; }
.result-table th:first-child { border-radius: 7px 0 0 7px; }
.result-table th:last-child { border-radius: 0 7px 7px 0; }
.result-table td { padding: 9px 10px; border-bottom: 1px solid #e4ebf5; color: #223651; font-size: 15px; overflow-wrap: anywhere; }
.result-table td:first-child { width: 100%; }
.result-table td:last-child { text-align: right; white-space: nowrap; }
.result-table tbody tr:hover { background: #f8faff; }
.result-table td:last-child button { min-height: 34px; padding: 4px 8px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--paper); color: #285098; font-size: 14px; }
.result-table td:last-child button:hover, .result-table td:last-child button[aria-pressed="true"] { border-color: #a8bff0; background: #eaf1ff; }
.table-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 15px; color: var(--muted); font-size: 14px; }
.empty, .subtle { color: var(--muted); font-size: 14px; }
.empty { padding: 18px 10px 6px; }

.plan-panel, .side-panel { padding: 19px; }
.plan-panel { border-color: #cbdaf3; background: linear-gradient(160deg, #eef4ff, #fff 90%); }
.plan-panel h2 { margin: 3px 0 5px; font-size: 25px; }
.plan-panel p:not(.subtle) { font-size: 15px; }
.plan-panel .button { width: 100%; margin-top: 13px; }
.side-panel h2 { font-size: 19px; }
.side-title { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
#saved-count { min-width: 25px; padding: 2px 6px; border-radius: 6px; background: #eaf1ff; color: #244a95; font-size: 14px; font-weight: 670; text-align: center; }
.side-list { margin: 0; padding: 0; list-style: none; }
.side-list:not(:empty) { margin-top: 7px; }
.side-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid #e7edf6; color: #30415d; font-size: 14px; overflow-wrap: anywhere; }
.side-list li:last-child { border-bottom: 0; }
.side-panel .subtle, .side-panel .button { margin-top: 9px; }

.footer {
  display: flex;
  min-height: 69px;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.footer span:first-child { color: #2b4269; font-weight: 680; }

dialog {
  width: min(560px, calc(100% - 32px));
  max-height: calc(100% - 30px);
  padding: clamp(19px, 4vw, 30px);
  border: 1px solid var(--line-strong);
  border-radius: 17px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 20px 60px rgb(7 27 65 / 26%);
}

dialog::backdrop { background: rgb(11 23 50 / 52%); }
.dialog-header { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.dialog-header h2 { font-size: clamp(22px, 4vw, 28px); }
.dialog-header + p { margin-top: 10px; }
.icon-button { display: grid; width: 38px; height: 38px; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: #f7f9fd; color: #2c4264; font-size: 23px; line-height: 1; }
.icon-button:hover { background: #eaf1ff; }
.dialog-state { margin: 14px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #f3f7fd; color: #315076; font-size: 14px; }
.dialog-state:empty { display: none; }
.dialog-actions { margin-top: 18px; }
.extension-steps { margin: 14px 0 0; padding-left: 1.5em; color: var(--muted); font-size: 14px; }
.extension-steps li + li { margin-top: 8px; }
.extension-steps a, .extension-steps strong { font-weight: 670; }
.extension-steps code { overflow-wrap: anywhere; }

@media (max-width: 1020px) {
  .workspace-grid { grid-template-columns: minmax(0, 1fr) minmax(230px, 260px); gap: 15px; }
  .search-panel, .results-panel { padding: 16px; }
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; padding-block: 43px; }
  .hero h1 { font-size: clamp(42px, 7.3vw, 59px); }
  .hero-copy > p:first-of-type { margin-top: 14px; }
  .hero .actions { margin-top: 19px; }
  .preview-frame { width: min(100%, 625px); }
  .workspace-grid { grid-template-columns: minmax(0, 1fr); }
  .workspace-side { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .workflow-grid { gap: 11px; }
  .workflow-grid article { padding: 16px; }
}

@media (max-width: 640px) {
  :root { scroll-padding-top: 117px; }
  .topbar { min-height: 0; grid-template-columns: 1fr auto; gap: 6px 12px; padding-top: 11px; }
  .brand { gap: 8px; }
  .brand strong { font-size: 21px; }
  .brand-icon { width: 34px; height: 34px; border-radius: 8px; }
  .topbar nav { grid-area: 2 / 1 / 3 / 3; gap: clamp(12px, 5vw, 30px); flex-wrap: wrap; }
  .topbar nav a { padding: 7px 0 9px; font-size: 14px; }
  .header-action { min-height: 39px; padding-inline: 9px; }
  .hero-grid { gap: 23px; padding-block: 34px; }
  .hero h1 { font-size: clamp(36px, 10.25vw, 55px); }
  .hero-copy > p:first-of-type { font-size: 16px; }
  .hero .button { min-height: 44px; padding-inline: 12px; font-size: 14px; }
  .preview-frame { padding: 13px; border-radius: 16px; }
  .preview-window { border-radius: 9px; }
  .preview-top { min-height: 46px; padding: 7px 9px; }
  .preview-body { padding: 10px 9px; }
  .preview-query { padding-inline: 7px; }
  .preview-link { margin-top: 9px; }
  .workflow { padding-block: 35px; }
  .workflow-grid, .workspace-side, .processing-tools, .version-panel { grid-template-columns: minmax(0, 1fr); }
  .workflow-grid article { padding: 17px; }
  .workspace, .pricing { padding-block: 30px; }
  .view-heading { align-items: start; flex-direction: column; gap: 12px; margin-bottom: 16px; }
  .workspace-main, .workspace-side { gap: 12px; }
  .search-fields, .search-fields:has(#search-project-field[hidden]) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  #seed-group, #seeds-group, .search-fields:has(#search-project-field[hidden]) label[for="locale"] { grid-column: 1 / -1; }
  .example-row { flex-basis: 100%; margin-left: 0; }
  .panel-heading { align-items: start; }
  .panel-heading .button { flex: none; min-height: 36px; padding: 7px 8px; }
  .search-panel, .results-panel, .plan-panel, .side-panel { padding: 13px; }
  .filter-row { grid-template-columns: minmax(0, 1fr) minmax(110px, .7fr); gap: 6px; }
  .result-table th, .result-table td { padding-inline: 5px; }
  .result-table td:last-child button { padding-inline: 6px; }
  .footer { min-height: 62px; }
}

@media (max-width: 440px) {
  .filter-row { grid-template-columns: minmax(0, 1fr); }
  .payg-budget-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
}

@media (max-width: 360px) {
  .panel-heading { flex-wrap: wrap; }
  .preview-top, .preview-query { font-size: 13px; }
  .tag { font-size: 12px; }
  .footer { align-content: center; flex-wrap: wrap; }
}
