:root {
  --paper: #ece7de;
  --paper-strong: #f5f0e8;
  --ink: #201d19;
  --muted: #8e867d;
  --muted-strong: #655d55;
  --line: rgba(32, 29, 25, 0.12);
  --gold: #b78e47;
  --blue: #4f74ff;
  --serif: "Lora", "Iowan Old Style", "Palatino Linotype", serif;
  --sans: "Inter", "Avenir Next", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(rgba(32, 29, 25, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32, 29, 25, 0.03) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 22%),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-shell {
  min-height: 100vh;
  padding: 28px 0 80px;
}

.site-header,
.masthead-dek-band,
.hero-feature,
.editorial-grid,
.section-band {
  padding-left: 52px;
  padding-right: 52px;
}

.site-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 28px;
  padding-bottom: 18px;
}

.brand-lockup {
  display: grid;
  gap: 8px;
}

.issue-brand {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.brand-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.issue-menu {
  display: flex;
  justify-content: center;
  gap: 26px;
  flex-wrap: wrap;
  color: var(--muted-strong);
  font-size: 0.92rem;
}

.issue-menu a {
  position: relative;
}

.issue-menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.issue-menu a:hover::after,
.issue-menu a:focus-visible::after {
  transform: scaleX(1);
}

.utility-actions {
  display: flex;
  align-items: center;
}

.subscribe-button,
.button,
.button-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.subscribe-button,
.button {
  padding: 12px 18px;
  border: 1px solid #1f1f1f;
  background: #1f1f1f;
  color: #f6f1e8;
}

.button:hover,
.subscribe-button:hover,
.button-ghost:hover {
  transform: translateY(-1px);
}

.button-ghost {
  padding: 12px 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.42);
  color: var(--ink);
}

.masthead-dek-band {
  padding-top: 18px;
  padding-bottom: 18px;
  border-top: 1px dashed var(--line);
}

.masthead-dek {
  max-width: 42rem;
  margin: 0;
  color: var(--muted-strong);
  font-size: 1rem;
  line-height: 1.6;
}

.section-label,
.section-tag,
.archive-metric__label {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.section-label--accent {
  color: var(--blue);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.65fr);
  gap: 28px;
  align-items: center;
  padding-top: 34px;
  padding-bottom: 42px;
  border-bottom: 1px dashed var(--line);
}

.hero-feature__copy {
  max-width: 52rem;
}

.hero-feature h1 {
  margin: 14px 0 0;
  font-family: var(--serif);
  font-size: clamp(3.8rem, 7vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-weight: 500;
}

.hero-feature__summary {
  max-width: 26ch;
  margin: 20px 0 0;
  font-family: var(--serif);
  font-size: 1.55rem;
  line-height: 1.45;
  color: var(--ink);
}

.hero-feature__dek {
  max-width: 40rem;
  margin: 16px 0 0;
  color: var(--muted-strong);
  font-size: 1.04rem;
  line-height: 1.8;
}

.hero-feature__footer {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 28px;
  color: var(--muted-strong);
}

.hero-feature__art {
  position: relative;
  min-height: 300px;
}

.hero-feature__art--custom {
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 18px;
  border: 1px dashed var(--line);
  background: transparent;
}

.hero-feature__art--custom > * {
  width: 100%;
}

.orbit,
.orbit-core {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}

.orbit--outer {
  width: 84%;
  aspect-ratio: 1;
  border: 1px solid rgba(183, 142, 71, 0.18);
}

.orbit--middle {
  width: 60%;
  aspect-ratio: 1;
  border: 1px solid rgba(32, 29, 25, 0.08);
}

.orbit--inner {
  width: 38%;
  aspect-ratio: 1;
  border: 1px solid rgba(32, 29, 25, 0.05);
}

.orbit-core {
  width: 22%;
  aspect-ratio: 1;
  background: rgba(32, 29, 25, 0.06);
}

.editorial-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.34fr) minmax(520px, 1fr);
  border-bottom: 1px dashed var(--line);
}

.editorial-column {
  min-width: 0;
  padding: 30px 28px 34px;
  border-right: 1px dashed var(--line);
}

.editorial-column:last-child {
  border-right: 0;
}

.panel-heading {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
}

.section-note {
  margin: 0;
  color: var(--muted-strong);
  font-size: 0.98rem;
  line-height: 1.6;
}

.stack-list {
  display: grid;
  gap: 0;
}

.essay-link,
.signal-link,
.guide-card,
.archive-latest__item {
  display: block;
}

.essay-link,
.signal-link {
  padding: 16px 0;
  border-bottom: 1px dashed var(--line);
}

.essay-link:last-child,
.signal-link:last-child {
  border-bottom: 0;
}

.essay-link h2,
.guide-feature-card h2,
.signal-link h3,
.guide-card h3,
.concept-card h3,
.story-article h1,
.admin-panel h2,
.admin-item__top h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.03em;
}

.essay-link h2,
.signal-link h3 {
  margin-top: 8px;
  font-size: 1.9rem;
  line-height: 1.04;
}

.newsletter-card {
  display: grid;
  gap: 18px;
  max-width: 44rem;
  padding: 6px 0 8px;
}

.newsletter-card__heading {
  margin-bottom: 0;
}

.newsletter-card__title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.newsletter-form {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 12px;
  max-width: 34rem;
}

.newsletter-form input {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid rgba(32, 29, 25, 0.12);
  background: rgba(255, 255, 255, 0.52);
  color: var(--ink);
}

.newsletter-form input::placeholder {
  color: #9498a4;
}

.newsletter-card__fineprint {
  margin: 0;
  color: rgba(142, 134, 125, 0.8);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
}

.editorial-column--guides {
  padding-right: 24px;
}

.editorial-column--newsletter {
  display: flex;
  align-items: flex-start;
  padding-left: 28px;
}

.duration {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.text-link {
  display: inline-block;
  margin-top: 20px;
  color: var(--muted);
}

.guide-feature-card {
  display: grid;
  gap: 14px;
}

.guide-feature-card h2 {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 0.98;
}

.guide-feature-card__summary,
.signal-link p,
.guide-card p,
.concept-card p,
.archive-latest__item span,
.archive-latest__item p,
.story-body p,
.story-summary,
.admin-intro,
.admin-item__summary,
.admin-item__meta {
  color: var(--muted-strong);
  line-height: 1.7;
}

.guide-preview {
  position: relative;
  min-height: 240px;
  margin-top: 8px;
  border: 1px solid rgba(32, 29, 25, 0.09);
  background: rgba(255, 255, 255, 0.38);
  overflow: hidden;
}

.guide-preview__line,
.guide-preview__box {
  position: absolute;
  border: 1px solid rgba(32, 29, 25, 0.1);
}

.guide-preview__line {
  left: 32px;
  right: 32px;
  height: 0;
}

.guide-preview__line--short {
  top: 40px;
  right: 120px;
}

.guide-preview__line:not(.guide-preview__line--short):not(.guide-preview__line--accent) {
  top: 88px;
}

.guide-preview__line--accent {
  top: 136px;
  right: 80px;
  border-color: rgba(79, 116, 255, 0.5);
}

.guide-preview__box {
  width: 110px;
  height: 110px;
  right: 44px;
  bottom: 32px;
  background: rgba(32, 29, 25, 0.04);
}

.section-band {
  padding-top: 34px;
  padding-bottom: 40px;
  border-bottom: 1px dashed var(--line);
}

.section-band__header {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 24px;
}

.section-band__intro {
  margin: 0;
  max-width: 42rem;
  color: var(--muted-strong);
  font-size: 1rem;
  line-height: 1.75;
}

.guides-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
}

.guide-card {
  padding: 22px 20px 24px;
  border-right: 1px dashed var(--line);
}

.guide-card:last-child {
  border-right: 0;
}

.guide-card h3 {
  margin-top: 12px;
  font-size: 1.75rem;
  line-height: 1.05;
}

.concepts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.concept-card {
  min-height: 180px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(32, 29, 25, 0.06);
}

.concept-card h3 {
  font-size: 1.55rem;
  line-height: 1.06;
}

.section-band--archive {
  border-bottom: 0;
}

.archive-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.archive-metric {
  padding: 16px;
  background: rgba(255, 255, 255, 0.32);
  border: 1px solid rgba(32, 29, 25, 0.06);
}

.archive-metric strong {
  display: block;
  margin-top: 8px;
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 500;
}

.archive-latest {
  display: grid;
  gap: 0;
  border-top: 1px dashed var(--line);
}

.archive-latest__item {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  padding: 16px 0;
  border-bottom: 1px dashed var(--line);
}

.archive-latest__item h3 {
  margin: 8px 0 0;
  font-size: 1.08rem;
}

.admin-shell,
.story-shell {
  max-width: 1380px;
  margin: 0 auto;
  padding: 28px 24px 60px;
}

.admin-topbar,
.story-topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px dashed var(--line);
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(340px, 0.86fr) minmax(0, 1.14fr);
  gap: 24px;
  padding-top: 28px;
}

.admin-panel {
  padding: 24px;
  background: rgba(255, 255, 255, 0.34);
  border: 1px solid rgba(32, 29, 25, 0.06);
}

.admin-stack {
  display: grid;
  gap: 24px;
}

.admin-panel h2 {
  margin: 0 0 18px;
  font-size: 1.8rem;
}

.admin-intro {
  margin: 8px 0 0;
}

.form-grid {
  display: grid;
  gap: 16px;
}

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

.field {
  display: grid;
  gap: 8px;
}

.field label {
  color: var(--muted-strong);
  font-size: 0.92rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(32, 29, 25, 0.12);
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.field-checkbox {
  display: flex;
  gap: 10px;
  align-items: center;
}

.form-actions {
  display: flex;
  gap: 12px;
}

.status-message {
  min-height: 1.4rem;
  margin: 0;
  color: var(--muted-strong);
}

.admin-list {
  display: grid;
  gap: 12px;
}

.admin-item {
  padding: 16px;
  border: 1px solid rgba(32, 29, 25, 0.08);
  background: rgba(255, 255, 255, 0.44);
}

.admin-item__top,
.admin-item__actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.admin-item__top h3 {
  font-size: 1.3rem;
}

.admin-item__meta {
  margin: 8px 0 0;
  font-size: 0.9rem;
}

.admin-item__summary {
  margin: 10px 0 0;
}

.link-button,
.danger-button {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--ink);
  cursor: pointer;
}

.danger-button {
  color: #8f2430;
}

.story-shell {
  max-width: 980px;
}

.story-article {
  padding-top: 34px;
}

.story-article h1 {
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 0.95;
}

.story-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 18px 0 28px;
  color: var(--muted);
}

.story-summary {
  max-width: 54rem;
  margin: 0 0 24px;
  font-family: var(--serif);
  font-size: 1.4rem;
}

.story-hero {
  max-width: 54rem;
  margin: 0 0 12px;
  padding: 22px 0;
  border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
}

.story-hero:empty {
  display: none;
}

.story-body {
  display: grid;
  gap: 18px;
  max-width: 48rem;
}

.story-body h2,
.story-body h3 {
  margin: 40px 0 4px;
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.03em;
}

.story-body h2 {
  font-size: 2.35rem;
  line-height: 1.02;
}

.story-body h3 {
  font-size: 1.75rem;
  line-height: 1.08;
}

.story-body p {
  margin: 0;
  font-size: 1.06rem;
}

.story-body a {
  text-decoration: underline;
  text-decoration-color: rgba(32, 29, 25, 0.24);
  text-underline-offset: 3px;
}

.story-body ul,
.story-body ol {
  margin: 0;
  padding-left: 1.4rem;
  color: var(--muted-strong);
  font-size: 1.04rem;
  line-height: 1.9;
}

.story-body li + li {
  margin-top: 8px;
}

.story-body blockquote {
  margin: 0;
  padding-left: 18px;
  border-left: 2px solid rgba(32, 29, 25, 0.14);
  color: var(--muted-strong);
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.75;
}

.story-body pre {
  margin: 0;
  padding: 22px;
  overflow: auto;
  background: #fcfbf9;
  border: 1px solid rgba(32, 29, 25, 0.1);
  color: var(--muted-strong);
}

.story-body code {
  font-family: "SFMono-Regular", "SFMono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: rgba(32, 29, 25, 0.06);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.story-body pre code {
  background: transparent;
  padding: 0;
}

.table-wrap {
  overflow-x: auto;
}

.story-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.story-body th,
.story-body td {
  padding: 12px 14px;
  border: 1px solid rgba(32, 29, 25, 0.1);
  text-align: left;
  vertical-align: top;
}

.story-body th {
  background: rgba(32, 29, 25, 0.05);
  font-weight: 600;
}

.article-visual {
  margin: 18px 0 10px;
}

.visual-card,
.visual-grid {
  width: 100%;
}

.visual-card {
  position: relative;
  padding: 26px;
  background: #fcfbf9;
  border: 1px solid rgba(32, 29, 25, 0.1);
  overflow: hidden;
}

.visual-card--ecosystem {
  min-height: 360px;
  display: grid;
  place-items: center;
}

.ecosystem-center {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid rgba(32, 29, 25, 0.1);
  min-width: 150px;
}

.ecosystem-center__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(32, 29, 25, 0.06);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.ecosystem-center__label {
  font-family: var(--serif);
  font-size: 1.1rem;
}

.ecosystem-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.ecosystem-node {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(32, 29, 25, 0.1);
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--muted-strong);
  transform-origin: center;
}

.visual-grid--two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.compare-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  background: #fcfbf9;
  border: 1px solid rgba(32, 29, 25, 0.1);
}

.compare-card--accent {
  border-color: rgba(79, 116, 255, 0.22);
}

.compare-card__eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.compare-card__eyebrow--accent {
  color: var(--blue);
}

.compare-card__title {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 500;
}

.compare-card__body {
  display: grid;
  gap: 8px;
  padding: 16px;
  background: #fff;
  border: 1px solid rgba(32, 29, 25, 0.08);
  font-family: "SFMono-Regular", "SFMono", Menlo, Consolas, monospace;
  font-size: 0.82rem;
}

.compare-card__line {
  color: var(--muted-strong);
}

.compare-card__line--check[data-step="true"]::before {
  content: "✓";
  display: inline-block;
  width: 1.2rem;
  color: var(--blue);
}

.compare-card__caption {
  margin: 0;
  color: var(--muted);
  font-family: var(--serif);
  font-style: italic;
}

.visual-card--tree .tree-root {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-family: "SFMono-Regular", "SFMono", Menlo, Consolas, monospace;
  font-size: 1rem;
  color: var(--ink);
}

.visual-card--tree .tree-branch {
  margin-left: 12px;
  padding-left: 20px;
  border-left: 1px solid rgba(32, 29, 25, 0.12);
  display: grid;
  gap: 12px;
}

.tree-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: baseline;
}

.tree-row__name {
  font-family: "SFMono-Regular", "SFMono", Menlo, Consolas, monospace;
  color: var(--muted-strong);
}

.tree-row__note {
  color: var(--muted);
  font-size: 0.88rem;
  font-style: italic;
}

.visual-card--steps {
  display: grid;
  gap: 12px;
}

.step-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid rgba(32, 29, 25, 0.1);
}

.step-row__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(32, 29, 25, 0.45);
  flex: 0 0 auto;
}

.step-row__text {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  width: 100%;
}

.step-row__title {
  font-size: 0.96rem;
  letter-spacing: 0.02em;
}

.step-row__size {
  color: var(--muted);
  font-family: "SFMono-Regular", "SFMono", Menlo, Consolas, monospace;
  font-size: 0.82rem;
}

.story-related {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px dashed var(--line);
}

.story-related__list {
  display: grid;
  gap: 14px;
}

.empty-state {
  padding: 20px 0;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .site-header,
  .hero-feature,
  .section-band__header,
  .admin-topbar,
  .story-topbar {
    grid-template-columns: 1fr;
  }

  .site-header {
    justify-items: start;
  }

  .hero-feature,
  .editorial-grid,
  .guides-grid,
  .concepts-grid,
  .archive-summary,
  .admin-grid,
  .form-grid--two {
    grid-template-columns: 1fr;
  }

  .editorial-column,
  .guide-card {
    border-right: 0;
    border-bottom: 1px dashed var(--line);
  }

  .guide-card:last-child,
  .editorial-column:last-child {
    border-bottom: 0;
  }

  .newsletter-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-header,
  .masthead-dek-band,
  .hero-feature,
  .editorial-grid,
  .section-band {
    padding-left: 18px;
    padding-right: 18px;
  }

  .site-shell {
    padding-top: 18px;
  }

  .site-header {
    gap: 16px;
  }

  .issue-brand {
    font-size: 1.6rem;
  }

  .hero-feature h1 {
    font-size: 3.2rem;
  }

  .hero-feature__summary {
    font-size: 1.25rem;
  }

  .hero-feature__footer,
  .admin-topbar,
  .story-topbar,
  .admin-item__top,
  .admin-item__actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .editorial-column,
  .guide-card {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero-feature__art {
    min-height: 250px;
  }

  .concept-card {
    min-height: auto;
  }

  .story-article h1 {
    font-size: 2.8rem;
  }

  .visual-grid--two,
  .step-row__text,
  .tree-row {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

  .ecosystem-node {
    position: static;
    transform: none !important;
  }

  .visual-card--ecosystem {
    gap: 12px;
    min-height: auto;
  }

  .ecosystem-lines {
    display: none;
  }
}
