:root {
  color-scheme: light;
  --paper: #f5f8fb;
  --surface: #ffffff;
  --ink: #102235;
  --muted: #5f6f82;
  --line: #d8e2eb;
  --teal: #0b6f72;
  --teal-dark: #064f55;
  --amber: #ad6a16;
  --red: #b3362d;
  --green: #24744e;
  --soft-blue: #edf5f8;
  --soft-amber: #fff4e6;
  --shadow: 0 18px 54px rgba(16, 34, 53, 0.11);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #ffffff 0%, var(--paper) 46%, #edf3f7 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 42px;
}

.topbar,
.pressure-strip,
.tabs,
.panel-grid,
.field-row {
  display: grid;
  gap: 14px;
}

.topbar {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.topbar-title h1 {
  margin: 6px 0 0;
  max-width: 760px;
  font-size: 44px;
  line-height: 1.04;
  letter-spacing: 0;
}

.lede,
.section-note,
.pressure-strip p,
.result-card p,
.result-card li {
  color: var(--muted);
}

.lede {
  max-width: 760px;
  margin: 12px 0 0;
  font-size: 18px;
}

.kicker {
  margin: 0;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.home-link,
.privacy-pill,
.utility-button,
.tab,
.primary,
.secondary-button,
.link-card {
  min-height: 44px;
  border-radius: 8px;
  text-decoration: none;
}

.home-link,
.privacy-pill,
.utility-button,
.tab,
.primary,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.home-link {
  width: fit-content;
  color: var(--teal-dark);
  font-size: 14px;
  font-weight: 850;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: end;
}

.privacy-pill,
.utility-button,
.tab,
.secondary-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 820;
}

.privacy-pill {
  padding: 0 12px;
  color: var(--teal-dark);
}

.utility-button,
.secondary-button {
  padding: 0 14px;
}

.utility-button.danger {
  color: var(--red);
}

.primary {
  border: 1px solid var(--teal);
  background: var(--teal);
  color: #ffffff;
  font-weight: 900;
  padding: 0 16px;
}

.pressure-strip,
.surface,
.result-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.pressure-strip {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin: 22px 0 14px;
  padding: 20px;
  background: linear-gradient(90deg, #ffffff 0%, var(--soft-amber) 100%);
}

.pressure-strip h2,
.section-heading h2,
.result-card h3 {
  margin: 4px 0 0;
  line-height: 1.12;
  letter-spacing: 0;
}

.pressure-strip h2 {
  font-size: 28px;
}

.tabs {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 14px 0;
}

.tab {
  padding: 0 10px;
}

.tab.is-active {
  border-color: var(--teal-dark);
  background: var(--ink);
  color: #ffffff;
}

.panel {
  display: none;
}

.panel.is-active {
  display: block;
}

.panel-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(310px, 0.65fr);
  align-items: start;
}

.surface,
.result-card {
  padding: 22px;
}

.surface.narrow {
  max-width: 850px;
}

.stack {
  display: grid;
  gap: 14px;
}

.section-heading {
  margin-bottom: 4px;
}

.field,
.check-field {
  display: grid;
  gap: 7px;
}

.field span,
.check-field legend {
  color: #33465c;
  font-size: 14px;
  font-weight: 850;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  color: var(--ink);
  padding: 11px 12px;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  border-color: var(--teal);
  outline: 2px solid rgba(11, 111, 114, 0.22);
  outline-offset: 2px;
}

.check-field {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.check-field label,
.check-item {
  display: flex;
  gap: 10px;
  align-items: start;
  min-height: 34px;
  color: #33465c;
}

.check-field input,
.check-item input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  margin-top: 3px;
}

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

.result-card {
  position: sticky;
  top: 16px;
}

.result-card h3 {
  font-size: 24px;
}

.risk-label {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 900;
}

.risk-low {
  background: #eaf6ef;
  color: var(--green);
}

.risk-pause {
  background: #fff4e6;
  color: #8a4d0e;
}

.risk-high {
  background: #fdecea;
  color: var(--red);
}

.result-card ul,
.result-card ol {
  padding-left: 20px;
}

.script-box,
.wallet-card {
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  margin-top: 14px;
  padding: 14px;
  background: #f7fbfd;
  color: var(--ink);
  font-weight: 760;
}

.wallet-card {
  border-color: var(--amber);
  background: var(--soft-amber);
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.checklist {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.check-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfdff;
}

.link-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.link-card {
  display: block;
  border: 1px solid var(--line);
  padding: 12px;
  background: #fbfdff;
  color: var(--ink);
}

.link-card strong,
.link-card span {
  display: block;
}

.link-card span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 14px;
}

.local-data-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 26px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 920px) {
  .topbar,
  .pressure-strip,
  .panel-grid {
    grid-template-columns: 1fr;
  }

  .topbar-actions {
    justify-content: start;
  }

  .tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .result-card {
    position: static;
  }
}

@media (max-width: 560px) {
  .app-shell {
    width: min(100% - 22px, 430px);
    padding-top: 14px;
  }

  .topbar-title h1 {
    font-size: 34px;
  }

  .lede {
    font-size: 16px;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .privacy-pill {
    grid-column: 1 / -1;
  }

  .pressure-strip,
  .surface,
  .result-card {
    padding: 16px;
  }

  .pressure-strip .primary,
  .primary,
  .secondary-button {
    width: 100%;
  }

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

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

  .local-data-line {
    width: min(100% - 22px, 430px);
    align-items: flex-start;
    justify-content: flex-start;
  }
}

@media print {
  body {
    background: #ffffff;
  }

  .topbar,
  .pressure-strip,
  .tabs,
  .surface,
  .local-data-line,
  .result-actions {
    display: none !important;
  }

  .panel,
  .panel.is-active,
  .result-card {
    display: block;
    box-shadow: none;
    border: 0;
    position: static;
  }
}
