/* ISOStack - trade sheet, not SaaS landing */
:root {
  --paper: #f4f1ea;
  --paper-2: #ebe6dc;
  --ink: #1a1814;
  --ink-soft: #3d3a34;
  --mute: #6b6560;
  --rule: #c9c2b5;
  --rule-strong: #1a1814;
  --red: #9b1c1c;
  --red-deep: #7a1515;
  --cream: #fffdf8;
  --chip: #e8e2d6;
  --max: 1120px;
  --serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", "SF Mono", Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--red); }
a:hover { color: var(--red-deep); }

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* -- Top utility bar -- */
.utility {
  background: var(--ink);
  color: #e8e2d6;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}
.utility-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 1.25rem;
  padding: 0.4rem 0;
}
.utility a { color: #e8e2d6; text-decoration: none; }
.utility a:hover { text-decoration: underline; }
.utility .sep { opacity: 0.45; margin: 0 0.35rem; }

/* -- Masthead -- */
.masthead {
  border-bottom: 3px double var(--rule-strong);
  padding: 1.1rem 0 0.85rem;
  background: var(--paper);
}
.masthead-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}
.brand-block { max-width: 28rem; }
.brand {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 2.85rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
  display: inline-block;
}
.brand:hover { color: var(--ink); text-decoration: none; }
.brand span {
  color: var(--red);
}
.tagline {
  margin: 0.35rem 0 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
  max-width: 36ch;
}
.issue-box {
  text-align: right;
  font-size: 0.78rem;
  color: var(--mute);
  line-height: 1.35;
  border-left: 1px solid var(--rule);
  padding-left: 1rem;
}
.issue-box strong {
  display: block;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.deck {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  font-size: 0.88rem;
}
.deck nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.1rem;
}
.deck nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.78rem;
}
.deck nav a:hover,
.deck nav a[aria-current="page"] {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.deck-note {
  color: var(--mute);
  font-size: 0.8rem;
  font-style: italic;
  font-family: var(--serif);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--rule-strong);
  background: var(--cream);
  padding: 0.35rem 0.65rem;
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}

/* -- Layout -- */
.page {
  padding: 1.35rem 0 2.5rem;
}

.spread {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(240px, 0.85fr);
  gap: 1.5rem 1.75rem;
  align-items: start;
}

.kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 0.4rem;
}

h1.headline {
  font-family: var(--serif);
  font-size: clamp(1.65rem, 3.4vw, 2.35rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 0.65rem;
  font-weight: 700;
}

.lede {
  font-family: var(--serif);
  font-size: 1.12rem;
  line-height: 1.45;
  color: var(--ink-soft);
  margin: 0 0 1rem;
  max-width: 58ch;
}

.byline {
  font-size: 0.8rem;
  color: var(--mute);
  margin: 0 0 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--rule);
}
.byline strong { color: var(--ink); }

/* -- Rail / sidebar -- */
.rail {
  background: var(--cream);
  border: 1px solid var(--rule);
  padding: 0.9rem 1rem 1.1rem;
}
.rail + .rail { margin-top: 1rem; }
.rail h2 {
  font-family: var(--serif);
  font-size: 1.05rem;
  margin: 0 0 0.55rem;
  line-height: 1.2;
}
.rail p, .rail li {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin: 0 0 0.55rem;
}
.rail ul {
  margin: 0;
  padding-left: 1.1rem;
}
.rail .small {
  font-size: 0.78rem;
  color: var(--mute);
  margin: 0.65rem 0 0;
}

.signup label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
}
.signup-row {
  display: flex;
  gap: 0.35rem;
}
.signup input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--rule-strong);
  background: #fff;
  padding: 0.5rem 0.55rem;
  font: inherit;
  font-size: 0.9rem;
}
.signup button,
.btn {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #f4f1ea;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.signup button:hover,
.btn:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  text-decoration: none;
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
}
.btn-ghost:hover {
  background: var(--ink);
  color: #f4f1ea;
}

/* -- Section heads -- */
.section {
  margin-top: 1.75rem;
}
.section-rule {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 0.85rem;
  padding-bottom: 0.25rem;
}
.section-rule h2 {
  font-family: var(--serif);
  font-size: 1.25rem;
  margin: 0;
  white-space: nowrap;
}
.section-rule .fill {
  flex: 1;
  height: 1px;
  background: transparent;
}
.section-rule .meta {
  font-size: 0.75rem;
  color: var(--mute);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* -- Dense comparison table -- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
}
.chip {
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  cursor: pointer;
}
.chip.active,
.chip:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: #f4f1ea;
}

.sheet {
  border: 1px solid var(--rule-strong);
  background: var(--cream);
  overflow-x: auto;
}
table.matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  min-width: 780px;
}
table.matrix th {
  text-align: left;
  background: var(--paper-2);
  border-bottom: 1px solid var(--ink);
  border-right: 1px solid var(--rule);
  padding: 0.45rem 0.65rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--ink);
}
table.matrix th:last-child,
table.matrix td:last-child { border-right: none; }
table.matrix td {
  border-bottom: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  padding: 0.65rem 0.65rem;
  vertical-align: top;
  color: var(--ink-soft);
}
table.matrix tr:nth-child(even) td { background: rgba(255, 253, 248, 0.65); }
table.matrix tr:hover td { background: #fff8e8; }
.tool {
  font-weight: 700;
  color: var(--ink);
  font-size: 0.92rem;
}
.aka {
  display: block;
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--mute);
  margin-top: 0.1rem;
}
.blurb {
  display: block;
  font-size: 0.78rem;
  color: var(--mute);
  margin-top: 0.25rem;
  max-width: 28ch;
}
.cat {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  background: var(--chip);
  padding: 0.12rem 0.35rem;
  white-space: nowrap;
}
.linkout {
  font-weight: 700;
  font-size: 0.78rem;
  text-decoration: none;
  white-space: nowrap;
}
.linkout:hover { text-decoration: underline; }

.footnote {
  margin: 0.65rem 0 0;
  font-size: 0.78rem;
  color: var(--mute);
  max-width: 72ch;
}

/* -- Two-col editorial notes (uneven) -- */
.notes {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem 1.5rem;
  margin-top: 1.5rem;
}
.note {
  border-top: 3px solid var(--ink);
  padding-top: 0.55rem;
}
.note.accent { border-top-color: var(--red); }
.note h3 {
  font-family: var(--serif);
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
}
.note p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* -- About prose -- */
.prose {
  max-width: 66ch;
}
.prose h1 {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  line-height: 1.15;
  margin: 0 0 0.6rem;
}
.prose h2 {
  font-family: var(--serif);
  font-size: 1.15rem;
  margin: 1.5rem 0 0.4rem;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.2rem;
}
.prose p, .prose li {
  color: var(--ink-soft);
  margin: 0 0 0.75rem;
}
.prose ul { padding-left: 1.2rem; }
.prose strong { color: var(--ink); }
.pull {
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.35;
  border-left: 3px solid var(--red);
  padding: 0.15rem 0 0.15rem 0.85rem;
  margin: 1.1rem 0;
  color: var(--ink);
}

/* -- Footer -- */
.site-footer {
  border-top: 3px double var(--rule-strong);
  padding: 1.1rem 0 1.75rem;
  font-size: 0.8rem;
  color: var(--mute);
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
}
.footer-row a { color: var(--ink-soft); text-decoration: none; }
.footer-row a:hover { color: var(--red); text-decoration: underline; }
.footer-links { display: flex; gap: 0.9rem; flex-wrap: wrap; }

@media (max-width: 860px) {
  .spread, .notes { grid-template-columns: 1fr; }
  .issue-box {
    text-align: left;
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--rule);
    padding-top: 0.55rem;
    width: 100%;
  }
  .nav-toggle { display: inline-block; }
  .deck nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--rule);
    padding-top: 0.35rem;
  }
  .deck nav.open { display: flex; }
  .deck nav a {
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--rule);
  }
}

@media (max-width: 480px) {
  .signup-row { flex-direction: column; }
}
