/* Writing pages */
:root {
  --page-bg: #171717;
  --panel-bg: #222222;
  --panel-bg-hover: #262626;
  --primary-text: #f5f5f4;
  --secondary-text: #c3c3be;
  --muted-text: #aaa7a2;
  --faint-text: #8f8f89;
  --border: #3f3f46;
  --border-strong: #52525b;
  --button-border: #44403c;
  --light-button: #e7e5e4;
  --light-button-text: #1c1917;
  --radius: 10px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--primary-text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.7;
}

a {
  color: inherit;
}

.container {
  width: min(1080px, calc(100% - 40px));
  margin-inline: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid #353535;
}

.site-nav-brand {
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.site-nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
}

.site-nav-links a {
  color: var(--secondary-text);
  font-size: 0.96rem;
  font-weight: 650;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--primary-text);
}

.site-nav a:focus-visible,
.text-link:focus-visible,
.button:focus-visible {
  outline: 3px solid #d6d3d1;
  outline-offset: 3px;
  border-radius: 3px;
}

.page-header {
  max-width: 820px;
  padding: 62px 0 40px;
}

.eyebrow,
.article-meta {
  color: var(--muted-text);
  font-size: 0.9rem;
}

.eyebrow {
  margin-bottom: 10px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2.35rem, 5.4vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.page-header p {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--secondary-text);
  font-size: 1.08rem;
}

main {
  padding-bottom: 70px;
}

.writing-list {
  border-top: 1px solid #353535;
}

.writing-card {
  padding: 34px 0 36px;
  border-bottom: 1px solid #353535;
}

.writing-card h2 {
  max-width: 800px;
  margin: 9px 0 0;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.writing-card h2 a {
  text-decoration: none;
}

.writing-card h2 a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.writing-card p {
  max-width: 760px;
  margin: 13px 0 0;
  color: var(--secondary-text);
}

.tags {
  margin-top: 13px;
  color: var(--muted-text);
  font-size: 0.86rem;
}

.text-link {
  display: inline-block;
  margin-top: 18px;
  font-weight: 750;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.article-shell {
  width: min(730px, 100%);
  margin: 0 auto;
  padding: 58px 0 90px;
}

.article-header {
  margin-bottom: 50px;
}

.article-header h1 {
  font-size: clamp(2.35rem, 5.6vw, 3.9rem);
  line-height: 1.04;
}

.article-deck {
  max-width: 680px;
  margin: 21px 0 17px;
  color: #d0d0cb;
  font-size: 1.17rem;
  line-height: 1.67;
}

.article-header .article-meta {
  color: #b3b0ab;
  font-size: 0.92rem;
}

.article-body {
  color: #e4e4e0;
  font-size: 1.11rem;
  line-height: 1.76;
}

.article-body h2 {
  margin: 54px 0 18px;
  color: var(--primary-text);
  font-size: clamp(1.58rem, 3vw, 2.02rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.article-body p {
  margin: 0 0 23px;
}

.article-body strong {
  color: #fafaf9;
}

.article-body blockquote {
  margin: 28px 0;
  padding: 16px 20px;
  border-left: 3px solid #737373;
  border-radius: 0 7px 7px 0;
  background: #1d1d1d;
  color: #f0efeb;
  font-size: 1.06em;
  line-height: 1.65;
}

.article-body blockquote p {
  margin: 0;
}

.article-body pre {
  overflow-x: auto;
  margin: 28px 0;
  padding: 20px 22px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: #202020;
  color: #ecebe8;
  line-height: 1.6;
}

.article-body code {
  font-family:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    monospace;
  font-size: 0.91em;
}

.article-body ul {
  padding-left: 25px;
}

.article-body li + li {
  margin-top: 7px;
}

.domain-grid {
  display: grid;
  grid-template-columns: minmax(150px, 0.72fr) minmax(0, 1.8fr);
  margin: 28px 0 30px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #1d1d1d;
}

.domain-grid > div {
  padding: 15px 17px;
  border-bottom: 1px solid #343434;
}

.domain-grid > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.domain-label {
  color: #f0efeb;
  font-weight: 750;
}

.domain-question {
  color: var(--secondary-text);
}

.signal-diagram {
  margin: 32px 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #1d1d1d;
}

.signal-diagram-title {
  margin-bottom: 17px;
  color: var(--primary-text);
  font-size: 0.93rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.signal-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.signal-node {
  display: grid;
  place-items: center;
  min-height: 84px;
  padding: 13px;
  border: 1px solid #454545;
  border-radius: 8px;
  background: #242424;
  color: #e9e8e5;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
}

.signal-node.warning {
  border-color: #65615b;
  background: #292826;
}

.signal-arrow {
  display: grid;
  place-items: center;
  color: #85817b;
  font-size: 1.2rem;
  font-weight: 800;
}

.signal-consequences {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.signal-consequence {
  padding: 12px;
  border: 1px solid #3f3f3f;
  border-radius: 8px;
  background: #202020;
  color: var(--secondary-text);
  text-align: center;
  font-size: 0.84rem;
  line-height: 1.4;
}

.article-cta {
  margin-top: 72px;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-bg);
  position: relative;
}

.article-cta::before {
  position: absolute;
  top: -36px;
  left: 0;
  width: 100%;
  height: 1px;
  background: #343434;
  content: "";
}

.article-cta h2 {
  margin: 0;
  font-size: 1.46rem;
  line-height: 1.25;
}

.article-cta p {
  margin: 11px 0 0;
  color: var(--secondary-text);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 19px;
  padding: 11px 18px;
  border: 1px solid var(--light-button);
  border-radius: 8px;
  background: var(--light-button);
  color: var(--light-button-text);
  font: inherit;
  font-weight: 750;
  text-decoration: none;
}

.button:hover {
  background: #f5f5f4;
}

footer {
  padding: 30px 0 60px;
  border-top: 1px solid #353535;
  color: var(--faint-text);
  font-size: 0.84rem;
}

@media (max-width: 780px) {
  .site-nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .site-nav-links {
    gap: 14px;
  }

  .page-header {
    padding-top: 50px;
  }

  .article-shell {
    width: 100%;
    padding-top: 48px;
  }

  .article-body {
    font-size: 1.05rem;
  }

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

  .domain-grid > div {
    border-bottom: 0;
  }

  .domain-label {
    padding-bottom: 4px !important;
  }

  .domain-question {
    padding-top: 0 !important;
    padding-bottom: 16px !important;
    border-bottom: 1px solid #343434 !important;
  }

  .domain-grid > .domain-question:last-child {
    border-bottom: 0 !important;
  }

  .signal-flow {
    grid-template-columns: 1fr;
  }

  .signal-arrow {
    min-height: 22px;
    transform: rotate(90deg);
  }

  .signal-consequences {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

/* LIGHT EDITORIAL THEME START */
:root {
  --page-bg: #fafaf8;
  --panel-bg: #ffffff;
  --panel-bg-hover: #f4f4f1;
  --primary-text: #181817;
  --secondary-text: #5f5f5b;
  --muted-text: #77746f;
  --faint-text: #8b8882;
  --border: #d9d8d3;
  --border-strong: #343434;
  --button-border: #cecdc7;
  --light-button: #1c1c1b;
  --light-button-text: #ffffff;
}

body {
  background: var(--page-bg);
  color: var(--primary-text);
}

.site-nav {
  border-bottom-color: #e2e1dc;
}

.site-nav-links a {
  color: #5b5955;
}

.site-nav a:hover {
  color: #111110;
}

.site-nav a:focus-visible,
.text-link:focus-visible,
.button:focus-visible {
  outline-color: #52514d;
}

.eyebrow,
.article-meta {
  color: #77746f;
}

.page-header p {
  color: #5f5f5b;
}

.writing-list {
  border-top-color: #e2e1dc;
}

.writing-card {
  border-bottom-color: #e2e1dc;
}

.writing-card p {
  color: #5f5f5b;
}

.tags {
  color: #77746f;
}

.article-deck {
  color: #4e4d49;
}

.article-header .article-meta {
  color: #77746f;
}

.article-body {
  color: #292927;
}

.article-body h2 {
  color: #181817;
}

.article-body strong {
  color: #111110;
}

.article-body blockquote {
  border-left-color: #8f8c85;
  background: #f1f1ed;
  color: #292927;
}

.article-body pre {
  border-color: #343434;
  background: #1f1f1f;
  color: #efefec;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.domain-grid {
  border-color: #d9d8d3;
  background: #ffffff;
}

.domain-grid > div {
  border-bottom-color: #e5e4df;
}

.domain-label {
  color: #242421;
  background: #f6f6f3;
}

.domain-question {
  color: #5f5f5b;
}

.signal-diagram {
  border-color: #d9d8d3;
  background: #ffffff;
}

.signal-diagram-title {
  color: #181817;
}

.signal-node {
  border-color: #d6d5cf;
  background: #f5f5f2;
  color: #292927;
}

.signal-node.warning {
  border-color: #c8c5bd;
  background: #efeee9;
}

.signal-arrow {
  color: #86827b;
}

.signal-consequence {
  border-color: #ddddd7;
  background: #fafaf8;
  color: #5f5f5b;
}

.article-cta {
  border-color: #d9d8d3;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(24, 24, 23, 0.02);
}

.article-cta::before {
  background: #e2e1dc;
}

.article-cta p {
  color: #5f5f5b;
}

.button {
  border-color: #1c1c1b;
  background: #1c1c1b;
  color: #ffffff;
}

.button:hover {
  border-color: #000000;
  background: #000000;
}

footer {
  border-top-color: #e2e1dc;
  color: #8b8882;
}

@media (max-width: 780px) {
  .domain-question {
    border-bottom-color: #e5e4df !important;
  }
}
/* LIGHT EDITORIAL THEME END */
