/* Shared styles for every page. Editorial dark theme. */
:root {
  --bg: #161513;
  --bg-2: #1e1c1a;
  --line: #33302c;
  --ink: #ece7df;
  --text: #dcd6cd;
  --muted: #aaa49b;
  --cream: #f2ede5;
  --on-cream: #0f0e0c;
  --serif: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --col: 720px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--body); font-size: 18px; line-height: 1.7;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--ink); margin: 0; letter-spacing: -.02em; }
h1 em, h2 em, h3 em { font-style: normal; }
p { margin: 0; }
::selection { background: var(--cream); color: var(--on-cream); }
:focus-visible { outline: 2px solid var(--cream); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(var(--col), 100% - 40px); margin-inline: auto; }
.wide { width: min(1040px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--cream); color: var(--on-cream); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(22, 21, 19, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; gap: 22px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.mark {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--cream); color: var(--on-cream);
  font-family: var(--serif); font-weight: 600; font-size: .82rem; letter-spacing: .02em;
}
.brand-name { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; color: var(--ink); letter-spacing: -.01em; }
.nav-links { display: flex; gap: 22px; }
.nav-links a { font-family: var(--body); font-weight: 500; text-decoration: none; color: var(--ink); font-size: .95rem; }
.nav-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.icon-link { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); color: var(--ink); flex: none; }
.icon-link:hover { background: var(--bg-2); }
.x-link { width: auto; display: inline-flex; gap: 8px; padding: 0 14px; border-radius: 999px; font-size: .9rem; font-weight: 500; text-decoration: none; }

/* Buttons and links */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 28px; border-radius: 999px;
  background: var(--cream); color: var(--on-cream); text-decoration: none;
  font-family: var(--body); font-weight: 500; font-size: .95rem; white-space: nowrap;
  transition: opacity .15s ease;
}
.btn:hover { opacity: .88; }
.btn-sm { height: 36px; padding: 0 18px; font-size: .88rem; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { opacity: 1; background: var(--bg-2); }
.arrow-link { color: var(--ink); text-decoration: none; font-size: .95rem; }
.arrow-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Type helpers */
.label { font-family: var(--body); font-size: .9rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); margin-bottom: 22px; }
.spaced { font-family: var(--body); font-size: .9rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.muted { color: var(--muted); }
.lede { font-size: 1.12rem; color: var(--text); }

/* Hero (centered, Dan Koe style) */
.hero { padding: 88px 0 56px; text-align: center; }
.hero h1 { font-size: clamp(2.2rem, 5.4vw, 3.6rem); line-height: 1.1; margin: 0 auto 20px; max-width: 15em; }
.hero .lede { max-width: 32em; margin: 0 auto 14px; }
.hero-proof { color: var(--ink); font-size: 1rem; margin-bottom: 30px; }
.hero-proof b { font-weight: 600; }
.hero-ctas { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px 26px; }
.hero-sub { margin-top: 22px; font-size: .92rem; }
.hero-sub b { color: var(--ink); font-weight: 600; margin-right: 6px; }
.hero-sub a { color: var(--muted); text-decoration: none; }
.hero-sub a:hover { color: var(--ink); }

/* Stat row */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line); }
.stat { padding: 26px 8px; text-align: center; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat b { display: block; font-family: var(--serif); font-weight: 600; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.05; color: var(--ink); letter-spacing: -.02em; }
.stat span { display: block; margin-top: 6px; color: var(--muted); font-size: .95rem; line-height: 1.35; }
.stats-note { text-align: center; color: var(--muted); font-size: .92rem; margin-top: 14px; }

/* Sections */
.section { padding: 80px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); line-height: 1.15; margin-bottom: 18px; }
.section .lede + .lede { margin-top: 14px; }

/* Rows (Justin Welsh essay-list style) */
.rows { list-style: none; margin: 0; padding: 0; }
.row { padding: 26px 0; border-bottom: 1px solid var(--line); }
.row:first-child { padding-top: 0; }
.row:last-child { border-bottom: 0; }
.row-meta { display: block; color: var(--muted); font-size: .92rem; margin-bottom: 6px; }
.row h3 { font-size: 1.3rem; line-height: 1.25; margin-bottom: 6px; }
.row p { color: var(--text); font-size: 1rem; max-width: 34em; }

/* Two plain lists side by side */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 30px; }
.compare h3 { font-size: 1.2rem; margin-bottom: 10px; }
.compare ul { margin: 0; padding: 0; list-style: none; }
.compare li { padding: 10px 0; border-top: 1px solid var(--line); font-size: .98rem; }
.compare .dim h3, .compare .dim li { color: var(--muted); }

/* Facts line */
.facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 26px; color: var(--muted); font-size: .95rem; }
.facts b { font-family: var(--serif); font-weight: 600; font-size: 1.5rem; color: var(--ink); margin-right: 6px; }

/* Note box */
.note { margin-top: 34px; padding: 22px 24px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; }
.note h3 { font-size: 1.15rem; margin-bottom: 6px; }
.note p { color: var(--text); font-size: .95rem; }

/* About */
.about { display: grid; grid-template-columns: 120px 1fr; gap: 28px; align-items: start; }
.avatar {
  width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center;
  background: var(--cream); color: var(--on-cream); font-family: var(--serif); font-size: 2.3rem;
}
.about p { font-size: 1rem; }
.about p + p { margin-top: 14px; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 0; display: flex; justify-content: space-between; gap: 16px; align-items: baseline;
  font-family: var(--serif); font-weight: 500; font-size: 1.1rem; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--body); color: var(--muted); flex: none; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 0 22px; color: var(--text); font-size: 1rem; max-width: 36em; }

/* Closing CTA */
.closing h2 { font-size: clamp(2rem, 4.6vw, 2.8rem); }
.closing .lede { margin-bottom: 26px; }
.closing-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; }

/* Cross-link line */
.crosslink { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 22px 0; border-top: 1px solid var(--line); color: var(--muted); text-decoration: none; font-size: .98rem; }
.crosslink b { font-family: var(--serif); font-weight: 600; color: var(--ink); font-size: 1.1rem; }
.crosslink:hover .arrow-link { text-decoration: underline; text-underline-offset: 4px; }

/* Footer */
.footer { padding: 48px 0 56px; text-align: center; color: var(--muted); font-size: .95rem; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-top: 10px; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--ink); }

/* Websites page */
.price-line { display: inline-flex; align-items: baseline; gap: 12px; margin-bottom: 26px; }
.price-line b { font-family: var(--serif); font-weight: 600; font-size: 2.6rem; color: var(--ink); line-height: 1; }
.price-line span { color: var(--muted); text-align: left; font-size: .95rem; line-height: 1.35; }
.contact-lines { margin-top: 18px; color: var(--muted); font-size: .95rem; }
.contact-lines a { color: var(--ink); }

/* TODO placeholders: loud on purpose so they never ship */
.todo-tag {
  display: inline-block; vertical-align: middle; margin-left: 8px;
  background: #ffe14d; color: #111; border: 1.5px solid #111;
  font-family: system-ui, sans-serif; font-size: .66rem; font-weight: 700; letter-spacing: .04em;
  line-height: 1.2; padding: 2px 6px; border-radius: 4px; text-transform: uppercase;
}

@media (max-width: 720px) {
  body { font-size: 17px; }
  .wrap, .wide { width: min(var(--col), 100% - 32px); }
  .nav-inner { height: 56px; gap: 14px; }
  .brand-name { display: none; }
  .nav-links { gap: 14px; }
  .nav-links a { font-size: .92rem; }
  .nav-links .hide-sm { display: none; }
  .icon-link { width: 32px; height: 32px; }
  .x-link { padding: 0; width: 32px; justify-content: center; }
  .x-handle { display: none; }
  .btn-sm { padding: 0 14px; font-size: .84rem; }
  .btn-sm .todo-tag { display: none; }
  .hero { padding: 36px 0 30px; }
  .spaced { font-size: .82rem; letter-spacing: .06em; margin-bottom: 10px; }
  .hero h1 { font-size: 1.95rem; line-height: 1.15; margin-bottom: 14px; }
  .hero .lede { font-size: 1.08rem; line-height: 1.5; margin-bottom: 10px; }
  .hero-proof { font-size: .95rem; margin-bottom: 20px; }
  .hero-sub { margin-top: 14px; }
  .stat { padding: 18px 4px; }
  .stat b { font-size: 1.8rem; }
  .stat span { font-size: .85rem; }
  .section { padding: 56px 0; }
  .row h3 { font-size: 1.3rem; }
  .compare { grid-template-columns: 1fr; gap: 24px; }
  .about { grid-template-columns: 1fr; gap: 18px; }
  .avatar { width: 80px; height: 80px; font-size: 1.6rem; }
  .faq summary { font-size: 1.08rem; }
}
@media (max-width: 360px) {
  .nav-links { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

/* Lining numerals for stats and prices */
.stat b, .price-line b, .facts b { font-variant-numeric: lining-nums; }
@media (max-width: 720px) {
  .price-line { flex-direction: column; align-items: center; gap: 6px; margin-bottom: 22px; }
  .price-line span { text-align: center; }
  .section .lede { font-size: 1.05rem; }
}

/* Founder offer: work with me, recent posts, small links */
section[hidden] { display: none !important; }
#work-with-me .price-line { margin: 26px 0 14px; }
#work-with-me .start { margin-top: 34px; }
#work-with-me .start h3 { font-size: 1.15rem; margin-bottom: 6px; }
#work-with-me .start p { color: var(--text); }
#work-with-me .closing-ctas { margin-top: 30px; }
.posts { display: grid; gap: 12px; }
.posts .twitter-tweet { margin: 0 auto !important; }
.posts blockquote.twitter-tweet:not(.twitter-tweet-rendered) { padding: 18px 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-2); }
.small-link { margin: 0 0 4px; font-size: .92rem; }
.small-link a { color: var(--muted); text-decoration: none; }
.small-link a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 720px) {
  #work-with-me .price-line { flex-direction: column; align-items: flex-start; gap: 8px; }
  #work-with-me .price-line span { text-align: left; }
  #work-with-me .closing-ctas { flex-direction: column; align-items: flex-start; }
}
section[id] { scroll-margin-top: 64px; }
