@layer reset, palette, type, frame, reading, evidence, tools, responsive, print;
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: auto; }
  body { margin: 0; }
  img { display: block; max-width: 100%; }
  button, input { font: inherit; }
  a { color: inherit; }
  [hidden] { display: none !important; }
}
@layer palette {
  :root { color-scheme: light; --paper: #fdfcf9; --ink: #29352f; --muted: #526259; --blue: #244f84; --wash: #e8f0f7; --soft: #f1f4ed; --gold: #f4e8bd; --red: #8d3930; --line: #c5cfc6; }
  body { background: var(--paper); color: var(--ink); }
  a { color: var(--blue); display: inline-flex; align-items: center; min-height: 44px; max-width: 100%; text-decoration-thickness: 1px; text-underline-offset: .2em; }
  a:hover { text-decoration-thickness: 2px; }
  :focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; border-radius: 4px; }
  ::selection { background: var(--gold); color: var(--ink); }
}
@layer type {
  body { font: 18px/1.6 Georgia, 'Times New Roman', serif; overflow-wrap: break-word; }
  h1, h2, h3, p, ul, dl { margin: 0; }
  h1, h2, h3 { font-weight: 400; text-wrap: balance; }
  h1 { font-size: clamp(2.3rem, 4.2vw, 3.7rem); line-height: 1.12; max-width: 19ch; }
  h2 { font-size: clamp(1.6rem, 2.7vw, 2rem); line-height: 1.23; margin-bottom: 1.2rem; }
  h3 { font-size: 1.35rem; line-height: 1.3; margin-bottom: .75rem; }
  p + p { margin-top: 1rem; }
  ul { padding-left: 1.25rem; }
  li { padding: .4rem 0; }
  [class$="-deck"] { font-size: 1.3rem; line-height: 1.5; max-width: 52ch; margin-top: 1.5rem; }
  [class$="-eyebrow"] { color: var(--muted); font-size: 1rem; margin-bottom: 1rem; }
}
@layer frame {
  [class$="-skip"] { position: absolute; top: -100px; left: 1rem; padding: .7rem 1rem; background: white; z-index: 10; }
  [class$="-skip"]:focus { top: .5rem; }
  [class$="-utility"] { background: var(--wash); }
  [class$="-utility-inner"] { max-width: 1220px; margin: auto; display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: .3rem 2rem; }
  [class$="-utility-inner"] p { font-size: 1rem; }
  [class$="-utility"] nav { display: flex; flex-wrap: wrap; gap: .25rem; }
  [class$="-utility"] a { display: inline-flex; min-height: 44px; align-items: center; padding: .4rem .7rem; font-size: 1rem; }
  [class$="-header"] { position: relative; z-index: 2; max-width: 1220px; margin: auto; padding: 1.8rem 2rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
  [class$="-identity"] { text-decoration: none; display: flex; flex-direction: column; min-height: 44px; justify-content: center; color: var(--ink); }
  [class$="-identity"] span:first-child { font-size: 1.5rem; line-height: 1.15; }
  [class$="-identity"] span:last-child { color: var(--muted); font-size: 1rem; }
  summary { cursor: pointer; min-height: 48px; padding: .6rem 1rem; border-radius: 100px; background: var(--soft); color: var(--ink); font-size: 1rem; }
  summary::marker { color: var(--blue); }
  [class$="-menu-links"] { position: absolute; right: 2rem; top: calc(100% - 1rem); width: min(620px, calc(100% - 4rem)); max-height: 72vh; overflow-y: auto; background: white; border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 12px 30px #29352f14; padding: 1rem; display: grid; grid-template-columns: 1fr 1fr; gap: .25rem; }
  [class$="-menu-links"] a { min-height: 48px; padding: .6rem .75rem; border-radius: 12px; text-decoration: none; font-size: 1rem; }
  [class$="-menu-links"] a:hover, [aria-current="page"] { background: var(--wash); }
  [class$="-main"] { max-width: 1220px; margin: auto; padding: 1.2rem 2rem 4rem; }
  [class$="-intro"] { padding: 1.4rem 0 2.5rem; margin-left: 220px; }
  [class$="-footer"] { border-top: 1px solid var(--line); max-width: 1156px; margin: auto; padding: 2rem 0 2.5rem; font-size: 1rem; }
  [class$="-footer"] p { max-width: 68ch; }
  [class$="-footer"] nav { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 1rem; }
  [class$="-footer"] a { display: inline-flex; min-height: 44px; align-items: center; padding: .45rem 0; }
  [class$="-mirror"] { margin-top: .5rem; }
}
@layer reading {
  [class$="-section"] { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 40px; padding: 2.4rem 0; border-top: 1px solid var(--line); }
  [class$="-prose"] { grid-column: 2; max-width: 70ch; min-width: 0; }
  [class$="-prose"] > ul { margin: 1rem 0; }
  [class$="-prose"] > p a { display: inline-flex; align-items: center; min-height: 44px; }
  [class$="-margin"] { grid-column: 1; grid-row: 1; font-size: 1rem; color: var(--muted); padding: .4rem .9rem 1rem 0; }
  [class$="-margin"] dt { color: var(--ink); margin-bottom: .5rem; font-weight: bold; }
  [class$="-margin"] dd { margin: 0; line-height: 1.5; }
  [class$="-ask"] { background: var(--wash); border-radius: 24px; padding: 1.5rem 1.75rem; margin: 1.3rem 0 1.7rem; }
  [class$="-ask"] > p:last-child { font-size: 1.45rem; line-height: 1.4; margin-top: .6rem; }
  [class$="-ask-label"] { font-size: 1rem; color: var(--blue); }
  [class$="-next"] { margin: 2rem 0 0 220px; padding: 1.5rem 1.7rem; border-radius: 22px; background: var(--soft); max-width: 70ch; }
  [class$="-next"] a { display: inline-flex; min-height: 48px; align-items: center; margin-top: .35rem; font-size: 1.2rem; }
  [class$="-still"] { margin: 1.8rem 0 0; }
  [class$="-still"] img { width: 100%; height: auto; aspect-ratio: 3/2; object-fit: cover; border-radius: 22px; background: #e7ece2; color: var(--muted); font-size: 1rem; }
  figcaption { font-size: 1rem; color: var(--muted); margin-top: .75rem; }
  .p-home-intro { margin-left: 0; max-width: 840px; padding-top: 2rem; }
  .p-home-intro h1 { max-width: 21ch; }
  .p-home-opening { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 3rem; padding: 1rem 0 3.5rem; align-items: start; }
  .p-home-opening > div > p { max-width: 59ch; }
  .p-home-opening .p-home-ask { margin: 0; background: var(--gold); }
  .p-home-action { display: inline-flex; min-height: 48px; align-items: center; padding: .65rem 1.2rem; margin-top: 1.5rem; border-radius: 100px; background: var(--blue); color: white; text-decoration: none; }
  .p-home-paths { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: 1.5rem 0; }
  .p-home-paths a { padding: 1rem 1.1rem; min-height: 72px; background: var(--soft); border-radius: 18px; text-decoration: none; display: flex; align-items: center; }
  .p-home-paths a:hover { background: var(--wash); }
  [class$="-note-lines"] { padding: 1.1rem 0; min-height: 110px; color: var(--muted); border-bottom: 1px solid var(--line); }
}
@layer evidence {
  [class$="-evidence"] { margin-top: 1.6rem; padding: 1.5rem 1.7rem; background: #f4f1e8; border-radius: 22px; }
  [class$="-evidence-label"] { font-size: 1rem; color: var(--muted); margin-bottom: .7rem; }
  [class$="-source-links"] { display: flex; flex-direction: column; align-items: flex-start; margin-top: .75rem; }
  [class$="-source-links"] a { display: inline-flex; min-height: 44px; align-items: center; padding: .5rem 0; font-size: 1rem; }
  [class$="-urgent"] { padding: 1.5rem; border-left: 5px solid var(--red); background: #faeee7; border-radius: 0 22px 22px 0; margin-top: 1.5rem; }
}
@layer tools {
  .p-wordbook-filter { background: var(--wash); border-radius: 22px; padding: 1.5rem; margin-bottom: 1.5rem; }
  .p-wordbook-filter label { display: block; margin-bottom: .5rem; }
  .p-wordbook-filter-row { display: flex; gap: .75rem; }
  .p-wordbook-filter input { min-width: 0; flex: 1; width: 100%; min-height: 48px; border: 1px solid var(--muted); background: white; border-radius: 12px; padding: .6rem .8rem; font-size: 1.1rem; color: var(--ink); }
  .p-wordbook-filter button { min-height: 48px; min-width: 64px; padding: .5rem .8rem; border: 1px solid var(--blue); background: white; border-radius: 12px; color: var(--blue); cursor: pointer; }
  .p-wordbook-filter p { font-size: 1rem; margin-top: .65rem; }
  .p-wordbook-words { margin: 0; }
  .p-wordbook-word { border-top: 1px solid var(--line); padding: 1.4rem 0; }
  .p-wordbook-word dt { font-size: 1.3rem; margin-bottom: .5rem; }
  .p-wordbook-word dd { margin: 0; }
}
@layer responsive {
  @media (max-width: 800px) {
    [class$="-utility-inner"] { flex-direction: column; align-items: flex-start; gap: 0; padding: .7rem 1.25rem .3rem; }
    [class$="-utility"] nav { margin-left: -.7rem; }
    [class$="-header"] { padding: 1.2rem 1.25rem; }
    [class$="-main"] { padding: .5rem 1.25rem 2.5rem; }
    [class$="-intro"] { margin-left: 0; padding: 1.2rem 0 2rem; }
    [class$="-section"] { grid-template-columns: minmax(0, 1fr); gap: 1.1rem; padding: 1.8rem 0; }
    [class$="-prose"], [class$="-margin"] { grid-column: 1; }
    [class$="-margin"] { grid-row: auto; padding: .6rem 1rem; background: var(--soft); border-radius: 14px; max-width: 70ch; }
    [class$="-margin"] dt { margin-bottom: .2rem; }
    [class$="-next"] { margin-left: 0; padding: 1.25rem; }
    [class$="-footer"] { margin: 0 1.25rem; }
    [class$="-footer"] nav { flex-direction: column; gap: .15rem; }
    [class$="-menu-links"] { right: 1.25rem; width: calc(100% - 2.5rem); top: calc(100% - .5rem); }
    .p-home-opening { grid-template-columns: 1fr; gap: 1.8rem; padding-bottom: 2.2rem; }
    [class$="-ask"], [class$="-evidence"] { padding: 1.25rem; }
  }
  @media (max-width: 450px) {
    h1 { font-size: 2.25rem; }
    [class$="-deck"] { font-size: 1.2rem; }
    [class$="-menu-links"] { grid-template-columns: 1fr; max-height: 65vh; }
    .p-home-paths { grid-template-columns: 1fr; }
    summary { padding: .6rem .8rem; }
  }
  @media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
}
@layer print {
  @media print {
    body { background: white; color: black; font-size: 12pt; }
    [class$="-utility"], [class$="-menu"], [class$="-skip"], [class$="-footer"] nav, [class$="-mirror"], [class$="-next"], .p-wordbook-filter { display: none; }
    [class$="-header"], [class$="-main"], [class$="-footer"] { padding: .5rem 0; margin: 0; max-width: none; }
    [class$="-intro"] { margin-left: 0; }
    [class$="-section"] { display: block; padding: 1rem 0; }
    [class$="-margin"] { margin-bottom: 1rem; }
    [class$="-ask"], [class$="-evidence"] { break-inside: avoid; border: 1px solid #aaa; }
    h1 { font-size: 28pt; }
    h2 { font-size: 20pt; }
    img { max-height: 200px; width: auto !important; }
  }
}
