:root {
  --geek-ink: #21150f;
  --geek-night: #191714;
  --geek-panel: #26231f;
  --geek-cream: #f7f1e7;
  --geek-paper: #fffaf3;
  --geek-orange: #c86632;
  --geek-copper: #e8925d;
  --geek-blue: #88a9b4;
  --geek-muted: #75675e;
  --geek-line: rgba(33, 21, 15, .14);
  --geek-light-line: rgba(255, 250, 243, .16);
  --geek-shadow: 0 26px 80px rgba(58, 37, 23, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--geek-cream);
  color: var(--geek-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
a { color: inherit; }
.geek-wrap { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.geek-hero { padding: 32px 0 56px; }
.geek-hero__shell {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 650px;
  border-radius: 34px;
  background: var(--geek-night);
  color: #fffaf3;
  box-shadow: var(--geek-shadow);
}
.geek-hero__shell::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(18,15,13,.98) 0%, rgba(18,15,13,.9) 38%, rgba(18,15,13,.32) 68%, rgba(18,15,13,.05) 100%);
}
.geek-hero__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.geek-hero__copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(58%, 720px);
  padding: clamp(38px, 6vw, 78px);
}
.geek-kicker {
  color: var(--geek-copper);
  font-size: .75rem;
  font-weight: 950;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.geek-hero h1 {
  max-width: 760px;
  margin: 18px 0 24px;
  font-family: Georgia, serif;
  font-size: clamp(3.25rem, 6.2vw, 5.7rem);
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: .94;
}
.geek-hero__lead {
  max-width: 620px;
  margin: 0;
  color: #ded6cd;
  font-size: clamp(1.08rem, 1.7vw, 1.35rem);
}
.geek-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.geek-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 19px;
  border-radius: 999px;
  background: var(--geek-orange);
  color: #fff;
  font-weight: 900;
  text-decoration: none;
  transition: transform .2s, background .2s;
}
.geek-button:hover,
.geek-button:focus-visible { background: #a94d27; transform: translateY(-2px); outline: none; }
.geek-text-link { color: #fffaf3; font-weight: 850; text-underline-offset: 5px; }
.geek-text-link:focus-visible { outline: 3px solid rgba(232,146,93,.55); outline-offset: 5px; }

.geek-system-band { position: relative; z-index: 3; margin-top: -88px; padding: 0 0 30px; }
.geek-system {
  position: relative;
  margin: 0;
  padding: clamp(28px, 4vw, 46px);
  border: 1px solid rgba(255,250,243,.12);
  border-radius: 28px;
  background:
    linear-gradient(rgba(255,255,255,.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.026) 1px, transparent 1px),
    var(--geek-panel);
  background-size: 30px 30px;
  color: #fffaf3;
  box-shadow: 0 24px 70px rgba(0,0,0,.23);
}
.geek-system__meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
  color: #bfb5ab;
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.geek-system__title {
  margin: 0 0 34px;
  font-family: Georgia, serif;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  font-weight: 500;
  line-height: 1.08;
}
.geek-flow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.geek-flow li {
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 12px 16px;
  border: 1px solid var(--geek-light-line);
  border-radius: 16px;
  background: rgba(17,15,13,.42);
}
.geek-flow li:not(:last-child)::after {
  position: absolute;
  z-index: 2;
  right: -18px;
  bottom: auto;
  left: auto;
  content: "→";
  color: var(--geek-copper);
  font-weight: 950;
}
.geek-flow__number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--geek-orange);
  color: #fff;
  font-size: .78rem;
  font-weight: 950;
}
.geek-flow strong { font-size: .98rem; }
.geek-flow small { grid-column: 2; color: #bfb5ab; font-size: .78rem; }

.geek-jump {
  position: sticky;
  top: 76px;
  z-index: 20;
  padding: 12px 0;
  border-bottom: 1px solid var(--geek-line);
  background: rgba(247, 241, 231, .93);
  backdrop-filter: blur(15px);
}
.geek-jump__inner { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.geek-jump__inner::-webkit-scrollbar { display: none; }
.geek-jump a {
  flex: 0 0 auto;
  padding: 9px 14px;
  border: 1px solid var(--geek-line);
  border-radius: 999px;
  background: var(--geek-paper);
  font-size: .875rem;
  font-weight: 850;
  text-decoration: none;
}
.geek-jump a:hover,
.geek-jump a:focus-visible { border-color: var(--geek-orange); outline: none; }

.geek-intro { padding: 86px 0 38px; }
.geek-intro__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 70px; align-items: end; }
.geek-intro h2,
.geek-section h2,
.geek-safety h2 {
  margin: 10px 0 0;
  font-family: Georgia, serif;
  font-size: clamp(2.65rem, 5vw, 4.6rem);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: .98;
}
.geek-intro p { margin: 0; color: var(--geek-muted); font-size: 1.12rem; }

.geek-library { padding: 28px 0 96px; }
.geek-section { scroll-margin-top: 150px; padding: 48px 0 0; }
.geek-section__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--geek-line);
}
.geek-section h2 { font-size: clamp(2.25rem, 4vw, 3.65rem); }
.geek-section__number {
  color: rgba(33,21,15,.24);
  font-family: Georgia, serif;
  font-size: 2.4rem;
  line-height: 1;
}
.geek-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.geek-card {
  display: block;
  min-height: 255px;
  padding: clamp(24px, 3.5vw, 36px);
  border: 1px solid var(--geek-line);
  border-radius: 24px;
  background: var(--geek-paper);
  box-shadow: 0 12px 35px rgba(58,37,23,.055);
  color: inherit;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.geek-card:hover { transform: translateY(-4px); border-color: rgba(200,102,50,.42); box-shadow: 0 20px 45px rgba(58,37,23,.1); }
.geek-card:focus-visible { outline: 3px solid rgba(200,102,50,.35); outline-offset: 4px; }
.geek-card--wide { grid-column: 1 / -1; }
.geek-card__top { display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.geek-card__tag {
  color: var(--geek-orange);
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.geek-card__status {
  padding: 6px 10px;
  border-radius: 999px;
  background: #ede4d8;
  color: #5d5149;
  font-size: .72rem;
  font-weight: 850;
  white-space: nowrap;
}
.geek-card__status--live { background: #e1eadb; color: #364c31; }
.geek-card h3 {
  margin: 26px 0 12px;
  font-family: Georgia, serif;
  font-size: clamp(1.75rem, 3vw, 2.45rem);
  font-weight: 500;
  letter-spacing: -.035em;
  line-height: 1.05;
}
.geek-card p { max-width: 660px; margin: 0; color: var(--geek-muted); }
.geek-card__map { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 24px; }
.geek-card__map span {
  padding: 7px 10px;
  border-radius: 9px;
  background: #f0e8dd;
  color: #574a41;
  font-size: .75rem;
  font-weight: 800;
}
.geek-card__action { display: inline-block; margin-top: 24px; color: var(--geek-orange); font-size: .9rem; }

.geek-note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
  margin: 74px 0 0;
  padding: 28px;
  border-radius: 24px;
  background: #273025;
  color: #f7f1e7;
}
.geek-note__mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: var(--geek-orange);
  font-family: Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
}
.geek-note strong { display: block; margin-bottom: 4px; }
.geek-note p { margin: 0; color: #dce2d8; }

.geek-safety { padding: 88px 0; background: #e9ddcf; }
.geek-safety__shell { display: grid; grid-template-columns: .8fr 1.2fr; gap: 70px; align-items: start; }
.geek-safety h2 { font-size: clamp(2.45rem, 4vw, 3.8rem); }
.geek-safety__list { display: grid; gap: 12px; }
.geek-safety__item {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 18px;
  padding: 20px;
  border-radius: 18px;
  background: rgba(255,250,243,.72);
}
.geek-safety__item b { color: var(--geek-orange); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.geek-safety__item p { margin: 0; color: var(--geek-muted); }

.geek-footer {
  padding: 44px 0 54px;
  border-top: 1px solid var(--geek-line);
  color: var(--geek-muted);
}
.geek-footer__inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.geek-footer a { font-weight: 850; text-underline-offset: 4px; }

/* Geek article pages */
.geek-article-hero {
  padding: 74px 0 82px;
  background:
    linear-gradient(rgba(255,255,255,.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.024) 1px, transparent 1px),
    var(--geek-night);
  background-size: 34px 34px;
  color: #fffaf3;
}
.geek-article-hero__grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 72px; align-items: end; }
.geek-breadcrumb {
  display: inline-block;
  margin-bottom: 44px;
  color: #d0c5bb;
  font-size: .875rem;
  font-weight: 850;
  text-decoration: none;
}
.geek-breadcrumb:hover,
.geek-breadcrumb:focus-visible { color: #fff; text-decoration: underline; text-underline-offset: 5px; outline: none; }
.geek-article-hero h1 {
  max-width: 880px;
  margin: 17px 0 24px;
  font-family: Georgia, serif;
  font-size: clamp(3.4rem, 7vw, 6.5rem);
  font-weight: 500;
  letter-spacing: -.057em;
  line-height: .91;
}
.geek-article-lead { max-width: 790px; margin: 0; color: #d8d0c8; font-size: clamp(1.05rem, 1.6vw, 1.27rem); }
.geek-article-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.geek-article-meta span {
  padding: 7px 11px;
  border: 1px solid var(--geek-light-line);
  border-radius: 999px;
  color: #d8d0c8;
  font-size: .76rem;
  font-weight: 800;
}
.geek-simple {
  padding: clamp(25px, 3vw, 36px);
  border: 1px solid var(--geek-light-line);
  border-radius: 24px;
  background: rgba(255,250,243,.075);
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.geek-simple__label { color: var(--geek-copper); font-size: .75rem; font-weight: 950; letter-spacing: .14em; text-transform: uppercase; }
.geek-simple p { margin: 15px 0 0; font-family: Georgia, serif; font-size: clamp(1.35rem, 2.3vw, 1.85rem); line-height: 1.32; }

.geek-article-map { padding: 68px 0 74px; background: #e9ddcf; }
.geek-article-map__head { display: grid; grid-template-columns: .55fr 1.45fr; gap: 30px; align-items: end; margin-bottom: 28px; }
.geek-article-map h2,
.geek-body-section h2,
.geek-sources h2,
.geek-related h2 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: clamp(2.35rem, 4vw, 3.7rem);
  font-weight: 500;
  letter-spacing: -.043em;
  line-height: 1;
}
.geek-article-flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 0; padding: 0; list-style: none; }
.geek-article-flow li {
  position: relative;
  min-height: 165px;
  padding: 20px;
  border: 1px solid var(--geek-line);
  border-radius: 18px;
  background: rgba(255,250,243,.76);
}
.geek-article-flow li:not(:last-child)::after {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: -14px;
  width: 18px;
  height: 18px;
  content: "→";
  color: var(--geek-orange);
  font-weight: 950;
  transform: translateY(-50%);
}
.geek-article-flow span { display: block; margin-bottom: 22px; color: var(--geek-orange); font-size: .72rem; font-weight: 950; letter-spacing: .1em; }
.geek-article-flow strong { display: block; font-size: 1rem; line-height: 1.25; }
.geek-article-flow small { display: block; margin-top: 7px; color: var(--geek-muted); font-size: .8rem; line-height: 1.45; }

.geek-article-body { padding: 38px 0 100px; }
.geek-warning {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  margin: 32px 0 0;
  padding: 25px 28px;
  border: 1px solid rgba(143,63,34,.35);
  border-left: 6px solid #8f3f22;
  border-radius: 18px;
  background: #f1dfd4;
}
.geek-warning strong { color: #7d341d; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; }
.geek-warning p { margin: 0; color: #533b31; }
.geek-body-section { padding: 78px 0 0; }
.geek-section-dek { max-width: 700px; margin: 15px 0 0; color: var(--geek-muted); font-size: 1.08rem; }
.geek-prose { display: grid; grid-template-columns: minmax(250px,.72fr) minmax(0,1.28fr); column-gap: 70px; }
.geek-prose h2 { grid-row: 1 / span 6; }
.geek-prose > p { grid-column: 2; margin: 0 0 18px; color: #55483f; font-size: 1.05rem; }
.geek-prose > ul { grid-column: 2; margin: 10px 0 0; padding-left: 22px; }
.geek-prose li { margin: 9px 0; padding-left: 5px; }
.geek-explain-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 28px; }
.geek-explain-card {
  padding: clamp(24px,3.4vw,36px);
  border: 1px solid var(--geek-line);
  border-radius: 22px;
  background: var(--geek-paper);
}
.geek-explain-label,
.geek-task-level { color: var(--geek-orange); font-size: .72rem; font-weight: 950; letter-spacing: .13em; text-transform: uppercase; }
.geek-explain-card h3 { margin: 18px 0 11px; font-family: Georgia, serif; font-size: clamp(1.55rem, 2.5vw, 2.1rem); font-weight: 500; line-height: 1.08; }
.geek-explain-card p { margin: 0; color: var(--geek-muted); }
.geek-explain-card ul { margin: 20px 0 0; padding-left: 20px; }
.geek-explain-card li { margin: 7px 0; color: #55483f; }
.geek-task-grid { display: grid; gap: 12px; margin-top: 28px; }
.geek-task-card { display: grid; grid-template-columns: 190px minmax(210px,.7fr) 1.3fr; gap: 24px; align-items: start; }
.geek-task-card h3 { margin: 0; font-size: 1.5rem; }
.geek-task-level { padding: 7px 10px; border-radius: 8px; background: #f0e4d7; line-height: 1.4; }

.geek-level { margin-top: 80px; border: 1px solid var(--geek-line); border-radius: 22px; background: #ece3d8; overflow: hidden; }
.geek-level summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 28px;
  cursor: pointer;
  font-family: Georgia, serif;
  font-size: clamp(1.35rem, 2.5vw, 1.8rem);
  font-weight: 600;
  list-style: none;
}
.geek-level summary::-webkit-details-marker { display: none; }
.geek-level summary:focus-visible { outline: 3px solid rgba(200,102,50,.36); outline-offset: -5px; }
.geek-level summary span { color: var(--geek-orange); font-family: Inter, sans-serif; font-size: 1.8rem; transition: transform .2s; }
.geek-level[open] summary span { transform: rotate(45deg); }
.geek-level > div { padding: 0 28px 24px; }
.geek-level p { max-width: 820px; margin: 0 0 14px; color: var(--geek-muted); }

.geek-sources { margin-top: 78px; padding-top: 34px; border-top: 1px solid var(--geek-line); }
.geek-sources h2 { font-size: 2.2rem; }
.geek-sources p { max-width: 760px; color: var(--geek-muted); }
.geek-sources ul { margin: 22px 0 0; padding-left: 22px; }
.geek-sources li { margin: 9px 0; }
.geek-sources a { font-weight: 800; text-underline-offset: 4px; }
.geek-related { margin-top: 84px; padding-top: 42px; border-top: 1px solid var(--geek-line); }
.geek-related h2 { margin-top: 9px; }
.geek-related-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-top: 27px; }
.geek-related-card { min-height: 220px; padding: 25px; border-radius: 20px; background: var(--geek-night); color: #fffaf3; text-decoration: none; transition: transform .2s, background .2s; }
.geek-related-card:hover { transform: translateY(-3px); background: #2d2924; }
.geek-related-card:focus-visible { outline: 3px solid rgba(200,102,50,.45); outline-offset: 4px; }
.geek-related-card span { color: var(--geek-copper); font-size: .72rem; font-weight: 950; letter-spacing: .12em; text-transform: uppercase; }
.geek-related-card h3 { margin: 25px 0 22px; font-family: Georgia, serif; font-size: 1.55rem; font-weight: 500; line-height: 1.08; }
.geek-related-card b { color: #dfd6cd; font-size: .82rem; }

@media (max-width: 900px) {
  .geek-intro__grid,
  .geek-safety__shell { grid-template-columns: 1fr; }
  .geek-hero__shell { min-height: auto; }
  .geek-hero__copy { width: min(76%, 650px); }
  .geek-system-band { margin-top: -54px; }
  .geek-flow { grid-template-columns: 1fr; }
  .geek-flow li:not(:last-child)::after { right: auto; left: 36px; bottom: -18px; content: "↓"; }
  .geek-jump { top: 68px; }
  .geek-intro__grid,
  .geek-safety__shell { gap: 26px; }
  .geek-article-hero__grid { grid-template-columns: 1fr; gap: 38px; }
  .geek-article-map__head { grid-template-columns: 1fr; gap: 10px; }
  .geek-article-flow { grid-template-columns: 1fr 1fr; }
  .geek-article-flow li:not(:last-child)::after { display: none; }
  .geek-prose { grid-template-columns: 1fr; }
  .geek-prose h2 { grid-row: auto; }
  .geek-prose > p,
  .geek-prose > ul { grid-column: 1; }
  .geek-prose > p:first-of-type { margin-top: 22px; }
  .geek-task-card { grid-template-columns: 150px 1fr; }
  .geek-task-card p { grid-column: 2; }
  .geek-related-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .geek-wrap { width: min(100% - 24px, 1180px); }
  .geek-jump__inner { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
  .geek-jump a { text-align: center; }
  .geek-section { scroll-margin-top: 200px; }
  .geek-hero { padding-top: 12px; }
  .geek-hero__shell { border-radius: 24px; }
  .geek-hero__copy { padding: 42px 26px 30px; }
  .geek-hero__copy { width: 100%; min-height: 540px; }
  .geek-hero__shell::after { background: linear-gradient(90deg, rgba(18,15,13,.94), rgba(18,15,13,.48)); }
  .geek-hero h1 { font-size: 3.15rem; }
  .geek-system-band { margin-top: -32px; }
  .geek-system { padding: 22px 18px; border-radius: 20px; }
  .geek-system__meta { margin-bottom: 22px; }
  .geek-flow li { grid-template-columns: 38px 1fr; }
  .geek-flow small { grid-column: 2; }
  .geek-grid { grid-template-columns: 1fr; }
  .geek-card--wide { grid-column: auto; }
  .geek-section__head { align-items: start; }
  .geek-safety__item { grid-template-columns: 1fr; gap: 5px; }
  .geek-intro { padding-top: 66px; }
  .geek-library { padding-bottom: 70px; }
  .geek-article-hero { padding: 48px 0 58px; }
  .geek-breadcrumb { margin-bottom: 34px; }
  .geek-article-hero h1 { font-size: 3.35rem; }
  .geek-article-map { padding: 54px 0; }
  .geek-article-flow { grid-template-columns: 1fr; }
  .geek-article-flow li { min-height: 0; }
  .geek-explain-grid { grid-template-columns: 1fr; }
  .geek-warning { grid-template-columns: 1fr; gap: 7px; }
  .geek-task-card { grid-template-columns: 1fr; gap: 10px; }
  .geek-task-card p { grid-column: 1; }
  .geek-related-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
