:root {
  color-scheme: light;
  --paper: #ffffff;
  --ink: #000000;
  --ink-soft: #252525;
  --muted: #666666;
  --faint: #f5f5f5;
  --faint-2: #eeeeee;
  --line: #d7d7d7;
  --line-dark: #000000;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.page {
  min-height: 100vh;
  background: var(--paper);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 68px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line-dark);
  background: rgb(255 255 255 / 0.94);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-weight: 800;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  min-width: 76px;
  padding: 9px 12px;
  border: 1px solid transparent;
  color: var(--ink-soft);
  font-size: 14px;
  text-align: center;
  text-decoration: none;
}

.nav-links a:hover {
  border-color: var(--ink);
  background: var(--paper);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 520px);
  gap: 0;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 72px 0 44px;
}

.hero-copy,
.upload-panel {
  min-height: 650px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--ink);
  border-right: 0;
  background: var(--paper);
  padding: 54px;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 700px;
  margin: 0;
  font-size: 64px;
  line-height: 1;
  letter-spacing: 0;
}

.hero-lede {
  max-width: 620px;
  margin: 24px 0 0;
  color: var(--ink-soft);
  font-size: 20px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 44px 0 0;
  border: 1px solid var(--ink);
  background: var(--paper);
}

.metric-grid div {
  min-height: 112px;
  padding: 18px;
  border-right: 1px solid var(--ink);
}

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

.metric-grid dt {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
}

.metric-grid dd {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.upload-panel {
  border: 1px solid var(--ink);
  background: var(--paper);
  box-shadow: 18px 18px 0 var(--ink);
  padding: 28px;
}

.panel-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.panel-top h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.field {
  display: block;
  margin-bottom: 18px;
}

.label {
  display: block;
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
}

.label span {
  color: var(--muted);
  font-weight: 500;
}

.input,
.textarea {
  width: 100%;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  outline: none;
}

.input {
  height: 46px;
  padding: 0 14px;
}

.textarea {
  min-height: 260px;
  resize: vertical;
  padding: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 14px;
}

.input:focus,
.textarea:focus {
  box-shadow: 4px 4px 0 var(--ink);
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--ink);
}

.tab {
  min-height: 44px;
  border: 0;
  border-right: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-weight: 800;
}

.tab:last-child {
  border-right: 0;
}

.tab.active {
  background: var(--ink);
  color: var(--paper);
}

.tool-pane {
  margin-top: 16px;
}

.drop {
  display: grid;
  min-height: 260px;
  place-items: center;
  border: 1px dashed var(--ink);
  background: var(--faint);
  padding: 28px;
  text-align: center;
  transition: background 140ms ease, box-shadow 140ms ease;
}

.drop.dragging,
.drop:hover {
  background: var(--paper);
  box-shadow: inset 0 0 0 2px var(--ink);
}

.upload-icon {
  display: grid;
  width: 66px;
  height: 66px;
  margin: 0 auto 16px;
  place-items: center;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.drop-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.drop-subtitle,
.hint {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.button-row,
.result-row {
  display: flex;
  gap: 10px;
}

.button {
  min-height: 46px;
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 0 16px;
  font-weight: 900;
}

.button.primary {
  background: var(--ink);
  color: var(--paper);
}

.button.secondary {
  background: var(--paper);
  color: var(--ink);
}

.button.full {
  width: 100%;
  margin-top: 14px;
}

.button.compact {
  min-width: 76px;
}

.message {
  min-height: 24px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
}

.message.error,
.message.success {
  color: var(--ink);
  font-weight: 800;
}

.result {
  margin-top: 16px;
  border: 1px solid var(--ink);
  background: var(--paper);
  padding: 14px;
}

.result-label {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.result-input {
  min-width: 0;
}

.recent {
  margin-top: 18px;
}

.recent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.recent-head p {
  margin: 0;
}

.recent-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 10px 0;
  font-size: 14px;
}

.recent-row a {
  overflow: hidden;
  color: var(--ink);
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-row a:hover {
  text-decoration: underline;
}

.recent-row button {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
}

.seo-section,
.question-grid {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto 44px;
  border: 1px solid var(--ink);
  background: var(--paper);
}

.section-heading {
  padding: 34px;
  border-bottom: 1px solid var(--ink);
}

.section-heading h2 {
  max-width: 760px;
  margin: 0;
  font-size: 38px;
  line-height: 1.1;
  letter-spacing: 0;
}

.section-heading p:last-child {
  max-width: 780px;
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 17px;
}

.fact-table {
  display: grid;
}

.fact-table [role="row"] {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  min-height: 58px;
  border-bottom: 1px solid var(--line);
}

.fact-table [role="row"]:first-child {
  background: var(--ink);
  color: var(--paper);
  font-weight: 900;
}

.fact-table [role="row"]:last-child {
  border-bottom: 0;
}

.fact-table span {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border-right: 1px solid var(--line);
}

.fact-table span:last-child {
  border-right: 0;
}

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

.question-grid .section-heading {
  grid-column: 1 / -1;
}

.question-grid article {
  min-height: 210px;
  padding: 30px 34px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.question-grid article:nth-child(odd) {
  border-right: 0;
}

.question-grid article:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.question-grid h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0;
}

.question-grid p {
  margin: 14px 0 0;
  color: var(--ink-soft);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 32px;
  border-top: 1px solid var(--ink);
  background: var(--paper);
  color: var(--muted);
  font-size: 14px;
}

.footer span:first-child {
  color: var(--ink);
  font-weight: 800;
}

.hidden {
  display: none;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
}

.preview {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--paper);
}

.not-found,
.static-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  text-align: center;
}

.static-shell {
  display: block;
  min-height: auto;
  max-width: 760px;
  margin: 80px auto;
  text-align: left;
}

.static-shell h1 {
  margin: 0;
  font-size: 52px;
  line-height: 1;
  letter-spacing: 0;
}

.static-shell p:last-child {
  color: var(--ink-soft);
  font-size: 18px;
}

@media (max-width: 980px) {
  .site-header {
    position: static;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    width: min(720px, calc(100% - 32px));
    padding-top: 32px;
  }

  .hero-copy,
  .upload-panel {
    min-height: 0;
  }

  .hero-copy {
    border-right: 1px solid var(--ink);
    border-bottom: 0;
    padding: 34px;
  }

  .upload-panel {
    box-shadow: 10px 10px 0 var(--ink);
  }

  .hero-copy h1 {
    font-size: 46px;
  }

  .seo-section,
  .question-grid {
    width: min(720px, calc(100% - 32px));
  }
}

@media (max-width: 680px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  .nav-links {
    width: 100%;
  }

  .nav-links a {
    flex: 1;
    min-width: 0;
  }

  .hero-grid {
    width: calc(100% - 20px);
    padding-top: 18px;
  }

  .hero-copy,
  .upload-panel,
  .section-heading,
  .question-grid article {
    padding: 22px;
  }

  .hero-copy h1 {
    font-size: 36px;
  }

  .hero-lede {
    font-size: 17px;
  }

  .metric-grid,
  .fact-table [role="row"],
  .question-grid {
    grid-template-columns: 1fr;
  }

  .metric-grid div,
  .fact-table span,
  .question-grid article,
  .question-grid article:nth-child(odd),
  .question-grid article:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .metric-grid div:last-child,
  .fact-table [role="row"]:last-child span:last-child,
  .question-grid article:last-child {
    border-bottom: 0;
  }

  .drop {
    min-height: 220px;
    padding: 22px;
  }

  .button-row,
  .result-row,
  .footer {
    flex-direction: column;
  }

  .button,
  .button.compact {
    width: 100%;
  }

  .section-heading h2 {
    font-size: 30px;
  }
}
