/* managesocialaddiction.com — shared styles
   Palette: morning fog, deep lake, moss, lamplight. Type: Newsreader + Atkinson Hyperlegible (self-hosted). */

@font-face { font-family: "Atkinson Hyperlegible"; src: url("fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("fonts/atkinson-hyperlegible-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-latin-opsz-normal.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-latin-opsz-italic.woff2") format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }

:root {
  --fog: #F1F4F2;
  --paper: #FFFFFF;
  --ink: #1B2A30;
  --ink-soft: #445960;
  --lake: #1E5A61;
  --lake-deep: #15434A;
  --moss: #5F8467;
  --moss-wash: #E3ECE5;
  --lamp: #EDB24E;
  --lamp-wash: #FBF0DA;
  --mist: #D5DFDB;

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Atkinson Hyperlegible", "Segoe UI", system-ui, -apple-system, sans-serif;

  --measure: 40rem;
  --wide: 68rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }

body {
  margin: 0;
  background: var(--fog);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; }

a { color: var(--lake); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--lake-deep); text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--lamp); outline-offset: 3px; border-radius: 2px; }

.skip-link { position: absolute; left: 1rem; top: -4rem; background: var(--paper); padding: .5rem 1rem; z-index: 10; }
.skip-link:focus { top: 1rem; }

/* ---------- Crisis bar (every page) ---------- */
.crisis-bar {
  background: var(--ink);
  color: #F4F7F5;
  font-size: .9375rem;
  line-height: 1.45;
}
.crisis-bar p { margin: 0 auto; max-width: var(--wide); padding: .6rem var(--gutter); }
.crisis-bar strong { color: var(--lamp); font-weight: 700; }
.crisis-bar a { color: #F4F7F5; }
.crisis-bar a:hover { color: var(--lamp); }

/* ---------- Header / nav ---------- */
.site-header { border-bottom: 1px solid var(--mist); background: var(--fog); }
.site-header .inner {
  max-width: var(--wide); margin: 0 auto; padding: 1rem var(--gutter);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 2rem;
}
.brand { display: flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand span { font-family: var(--serif); font-size: 1.2rem; font-weight: 560; letter-spacing: -0.005em; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.site-nav a { color: var(--ink-soft); text-decoration: none; font-size: .9375rem; padding: .25rem 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--ink); border-bottom-color: var(--mist); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--lake); }

/* ---------- Page structure ---------- */
main { display: block; }
.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }
.prose { max-width: var(--measure); }

.page-intro { padding: clamp(2.5rem, 7vw, 4.5rem) 0 1.5rem; }
.page-intro h1 { max-width: 18ch; }
.page-intro .lede { max-width: 36rem; }

h1, h2, h3 { font-family: var(--serif); color: var(--ink); font-weight: 520; line-height: 1.15; letter-spacing: -0.01em; font-optical-sizing: auto; }
h1 { font-size: clamp(2.3rem, 5.5vw, 3.6rem); margin: 0 0 1rem; font-weight: 480; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 3rem 0 .75rem; }
h3 { font-size: 1.3rem; margin: 2rem 0 .4rem; font-weight: 600; }
p { margin: 0 0 1.1rem; }
.lede { font-size: 1.2rem; line-height: 1.55; color: var(--ink-soft); }

section { padding-bottom: 1rem; }

ul.plain, ol.plain { padding-left: 1.2rem; }
ul.plain li, ol.plain li { margin-bottom: .55rem; }
ul.plain li::marker { color: var(--moss); }

sup.ref { font-size: .72em; line-height: 0; margin-left: .08em; }
sup.ref a { text-decoration: none; font-weight: 700; }

/* ---------- Home hero ---------- */
.hero { padding: clamp(3rem, 9vw, 6rem) 0 0; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); max-width: 14ch; margin-bottom: 1.25rem; }
.hero .lede { max-width: 34rem; font-size: 1.25rem; }
.horizon { display: block; width: 100%; height: auto; margin: 1.5rem 0 0; }
.horizon path { fill: none; stroke: var(--lake); stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.horizon .sun { fill: var(--lamp); }
@media (prefers-reduced-motion: no-preference) {
  .horizon path { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 3.2s cubic-bezier(.45,.05,.25,1) .3s forwards; }
  .horizon .sun { opacity: 0; animation: rise 1.4s ease-out 2.6s forwards; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
.horizon-caption { font-size: .875rem; color: var(--ink-soft); margin-top: .5rem; }

/* ---------- Paths (home) ---------- */
.paths { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1px; background: var(--mist); border: 1px solid var(--mist); margin: 3rem 0; }
.path { background: var(--paper); padding: 1.75rem 1.5rem 1.5rem; display: flex; flex-direction: column; }
.path h2 { font-size: 1.45rem; margin: 0 0 .5rem; }
.path p { color: var(--ink-soft); flex: 1; }
.path a.go { font-weight: 700; text-decoration: none; }
.path a.go:hover { text-decoration: underline; }
.path.urgent { background: var(--lamp-wash); }

/* ---------- Figures / stats ---------- */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 2rem 2.5rem; margin: 1.5rem 0 2rem; }
.figure { border-top: 3px solid var(--moss); padding-top: 1rem; }
.figure .num { font-family: var(--serif); font-size: 2.6rem; line-height: 1; font-weight: 450; color: var(--lake-deep); display: block; margin-bottom: .5rem; }
.figure p { margin: 0 0 .5rem; }
.figure .src { font-size: .8125rem; color: var(--ink-soft); }

/* ---------- Callouts ---------- */
.note { background: var(--moss-wash); border-left: 4px solid var(--moss); padding: 1.1rem 1.35rem; margin: 1.75rem 0; max-width: var(--measure); }
.note p:last-child { margin-bottom: 0; }
.note h3 { margin-top: 0; font-size: 1.15rem; }

.now { background: var(--paper); border: 2px solid var(--ink); padding: 1.5rem 1.5rem .75rem; margin: 1.5rem 0 2.5rem; max-width: 46rem; }
.now h2 { margin-top: 0; }
.now dl { margin: 0; display: grid; grid-template-columns: minmax(8rem, max-content) 1fr; gap: .9rem 1.5rem; }
.now dt { font-weight: 700; }
.now dd { margin: 0; }
@media (max-width: 34rem) { .now dl { grid-template-columns: 1fr; gap: .2rem; } .now dd { margin-bottom: .8rem; } }

/* ---------- Two-column blocks ---------- */
.split { display: grid; grid-template-columns: 1fr; gap: 0 3rem; }
@media (min-width: 56rem) { .split { grid-template-columns: minmax(0, 1fr) 18rem; } }
.aside { font-size: .9375rem; color: var(--ink-soft); }
.aside h3 { font-size: 1.1rem; }
@media (min-width: 56rem) { .aside { position: sticky; top: 1.5rem; align-self: start; margin-top: 3rem; } }

/* ---------- Method blocks (approaches) ---------- */
.method { border-top: 1px solid var(--mist); padding: 1.5rem 0 .5rem; max-width: var(--measure); }
.method h3 { margin-top: 0; }
.method .try { font-size: .9375rem; background: var(--paper); border: 1px solid var(--mist); padding: .8rem 1rem; margin-top: .75rem; }
.method .try strong { color: var(--lake-deep); }

ol.steps { counter-reset: step; list-style: none; padding: 0; max-width: var(--measure); }
ol.steps li { counter-increment: step; position: relative; padding: 0 0 1.1rem 3rem; }
ol.steps li::before { content: counter(step); position: absolute; left: 0; top: -.1rem; width: 2rem; height: 2rem; border-radius: 50%; background: var(--lake); color: var(--paper); font-weight: 700; display: grid; place-items: center; font-size: .95rem; }

/* ---------- Resource lists ---------- */
.res-group { margin-bottom: 2rem; }
.res-list { list-style: none; padding: 0; margin: 0; max-width: 48rem; }
.res-list li { padding: .9rem 0; border-bottom: 1px solid var(--mist); }
.res-list a { font-weight: 700; }
.res-list .who { color: var(--ink-soft); font-size: .9375rem; }
.res-list p { margin: .25rem 0 0; font-size: .9375rem; }

/* ---------- Sources ---------- */
.sources { border-top: 2px solid var(--ink); margin-top: 3.5rem; padding-top: 1rem; font-size: .875rem; color: var(--ink-soft); max-width: 48rem; }
.sources h2 { font-size: 1.25rem; margin: 0 0 .75rem; }
.sources ol { padding-left: 1.4rem; margin: 0; }
.sources li { margin-bottom: .5rem; }
.sources li:target { background: var(--lamp-wash); }

/* ---------- Mission (about) ---------- */
.mission { font-family: var(--serif); font-size: clamp(1.45rem, 2.8vw, 1.9rem); line-height: 1.4; font-weight: 400; max-width: 34em; margin: 1rem 0 2.5rem; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 5rem; background: var(--ink); color: #D6E0DC; font-size: .9rem; }
.site-footer .inner { max-width: var(--wide); margin: 0 auto; padding: 2.5rem var(--gutter) 3rem; display: grid; gap: 1.5rem 3rem; grid-template-columns: 1fr; }
@media (min-width: 48rem) { .site-footer .inner { grid-template-columns: 1.4fr 1fr; } }
.site-footer a { color: #F4F7F5; }
.site-footer a:hover { color: var(--lamp); }
.site-footer p { margin: 0 0 .75rem; }
.site-footer .together { font-family: var(--serif); font-size: 1.35rem; color: #F4F7F5; line-height: 1.3; }
.site-footer ul { list-style: none; padding: 0; margin: 0; columns: 2; }
.site-footer li { margin-bottom: .35rem; }
.site-footer .small { font-size: .8125rem; color: #AFC0BA; }

@media print {
  .crisis-bar, .site-nav, .site-footer { display: none; }
  body { background: #fff; }
}

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.split .figures { grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1.5rem; }
.split .figure .num { font-size: 2.2rem; }
