/* lunar-phase-protocol — lunar.css
   Monochrome with lunar light, teal #0fc / #9ff. One file, system fonts, no dependencies. */
:root {
  --hue: 168;                  /* moved by the pointer (lunar.js), 150–195 */
  --lum: 0.5;                  /* illuminated fraction of the moon, set by lunar.js */
  --teal: #0fc;
  --teal-pale: #9ff;
  --bg: hsl(var(--hue) 10% calc(4% + var(--lum) * 16%));   /* new moon near-black, full moon charcoal */
  --ink: #e4efed;
  --muted: #9fb3b0;
  --accent: hsl(var(--hue) 100% 50%);
  --rule: hsl(var(--hue) 30% 30%);
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", "Courier New", monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--bg); transition: background-color .8s ease; }
body {
  margin: 0; color: var(--ink); font-family: var(--mono);
  font-size: clamp(15px, 1rem + .15vw, 18px); line-height: 1.65; letter-spacing: .02em;
  background:
    radial-gradient(60vmax 60vmax at 85% -10%,
      hsl(var(--hue) 100% 70% / calc(var(--lum) * .14)), transparent 70%);
  min-height: 100vh;
}
.lpp-wrap { max-width: 74ch; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover, a:focus-visible { color: var(--teal-pale); }
:focus-visible { outline: 2px solid var(--teal-pale); outline-offset: 3px; }
h1, h2, h3, h4 { line-height: 1.25; letter-spacing: .04em; font-weight: 600; }
h2 { color: var(--teal-pale); margin-top: 2.2em; }
h3, h4 { color: var(--muted); }
hr { border: 0; border-top: 1px dashed var(--rule); margin: 2.5rem 0; }
img, video, iframe { max-width: 100%; height: auto; }
img { display: block; filter: contrast(1.05); background: #111; }
figure { margin: 1.5rem 0; }
figcaption, small, .lpp-meta { color: var(--muted); font-size: .85em; }
blockquote { margin: 1.5rem 0; padding-left: 1rem; border-left: 2px solid var(--accent); color: var(--muted); }
code, pre { font-family: var(--mono); }
pre { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .92em; }
th, td { text-align: left; padding: .35em .6em; border-bottom: 1px dashed var(--rule); vertical-align: top; }

/* header and navigation */
.lpp-header { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: flex-start; justify-content: space-between; }
.lpp-brand { text-decoration: none; color: var(--accent); }
.lpp-nav ul { list-style: none; padding: 0; margin: .5rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.lpp-nav a { text-decoration: none; }
.lpp-nav a[aria-current="page"] { text-decoration: underline; }

/* figlet: one <pre> per phase font, the current phase's shown */
.lpp-figlet { display: none; margin: 0; color: var(--accent); font-size: clamp(5px, 1.35vw, 12px); line-height: 1.1; letter-spacing: 0; }
html:not([data-phase]) .lpp-figlet[data-first],
html[data-phase="0"] .lpp-figlet[data-i="0"], html[data-phase="1"] .lpp-figlet[data-i="1"],
html[data-phase="2"] .lpp-figlet[data-i="2"], html[data-phase="3"] .lpp-figlet[data-i="3"],
html[data-phase="4"] .lpp-figlet[data-i="4"], html[data-phase="5"] .lpp-figlet[data-i="5"],
html[data-phase="6"] .lpp-figlet[data-i="6"], html[data-phase="7"] .lpp-figlet[data-i="7"],
.lpp-figlet[data-fallback] { display: block; }
.lpp-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* the moon */
.lpp-moon-box { text-align: right; }
#lpp-moon { margin: 0; color: var(--teal-pale); font-size: 9px; line-height: 1; letter-spacing: 0; opacity: .9; }
.lpp-hemi button {
  font: inherit; font-size: .75em; color: var(--muted); background: none; border: 1px dashed var(--rule);
  padding: .1em .5em; cursor: pointer; border-radius: 0;
}
.lpp-hemi button[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }

/* lists of pages */
.lpp-list { list-style: none; padding: 0; }
.lpp-list li { padding: .6rem 0; border-bottom: 1px dashed var(--rule); }
.lpp-list a { text-decoration: none; }

.lpp-footer { margin-top: 4rem; padding-top: 1rem; border-top: 1px dashed var(--rule); color: var(--muted); font-size: .8em; }

@media (prefers-reduced-motion: reduce) { html { transition: none; } }
@media print { :root { --bg: #fff; --ink: #000; --accent: #000; } body { background: #fff; } .lpp-moon-box, .lpp-nav { display: none; } }

/* celestial rain (celestial.js) */
.lpp-rain { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 5; }
.lpp-rain span { position: absolute; top: -2em; color: var(--teal-pale); animation: lpp-fall linear 1 forwards; will-change: transform; }
@keyframes lpp-fall { to { transform: translateY(calc(100vh + 3em)); } }
#lpp-rain-toggle { font: inherit; font-size: 1em; color: var(--muted); background: none; border: 1px dashed var(--rule); padding: .1em .5em; cursor: pointer; }
#lpp-rain-toggle[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }

/* ASCIIMoon art: lit side in pale teal, the dark side faint (earthshine) */
#lpp-moon { font-size: clamp(3px, .55vw, 5px); line-height: 1.05; }
#lpp-moon .lpp-dark { color: var(--rule); opacity: .35; }

/* optional site logo (layouts/partials/site-logo.html in the site) */
.lpp-brand { display: flex; align-items: center; gap: 1rem; }
.lpp-logo { width: clamp(48px, 9vw, 88px); height: auto; color: var(--accent); flex: none; }

/* attribution block */
.lpp-attribution { margin-top: 3rem; padding: 1rem 1.2rem; border: 1px dashed var(--rule); font-size: .85em; color: var(--muted); }
.lpp-attribution dl { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: 0; }
.lpp-attribution dt { color: var(--teal-pale); }
.lpp-attribution dd { margin: 0; }
.lpp-attribution p { margin: 0; }

/* tabs for bundles: overview · speakers · report … */
.lpp-subnav ul { list-style: none; padding: 0; margin: 0 0 1.5rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.lpp-subnav a { display: inline-block; padding: .25em .8em; border: 1px dashed var(--rule); text-decoration: none; color: var(--accent); }
.lpp-subnav a:hover, .lpp-subnav a:focus-visible { border-color: var(--accent); }
.lpp-subnav a[aria-current="page"] { border: 1px solid var(--accent); background: hsl(var(--hue) 100% 50% / .1); }

/* image sizes: add class="small" / "medium" to a figure, or wrap figures in {{< grid >}} */
figure.small { max-width: 220px; }
figure.medium { max-width: 360px; }
.lpp-grid { display: grid; gap: 1.2rem; margin: 1.5rem 0; align-items: start; }
.lpp-grid-small  { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.lpp-grid-medium { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.lpp-grid-large  { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.lpp-grid figure { margin: 0; max-width: none; }

/* speaker blocks (shortcode "speaker"): photo beside text */
.lpp-speaker { display: grid; grid-template-columns: minmax(120px, 200px) 1fr; gap: 1.2rem 1.5rem; align-items: start; margin: 1.5rem 0 2.5rem; }
.lpp-speaker figure { margin: 0; }
.lpp-speaker-text > :first-child { margin-top: 0; }
@media (max-width: 560px) { .lpp-speaker { grid-template-columns: 1fr; } .lpp-speaker figure { max-width: 240px; } }

/* a small image set beside the text, which wraps around it: <figure class="aside"> */
figure.aside { float: right; width: 130px; margin: .3rem 0 1rem 1.2rem; }
figure.aside figcaption { font-size: .75em; line-height: 1.35; }
.lpp-speaker-text::after { content: ""; display: block; clear: both; }
@media (max-width: 560px) { figure.aside { float: none; margin: 1rem 0; } }

/* speaker photos a little larger */
.lpp-speaker { grid-template-columns: minmax(140px, 260px) 1fr; }
/* size="wide" on a speaker block: for landscape images */
.lpp-speaker-wide { grid-template-columns: minmax(180px, 400px) 1fr; }
@media (max-width: 760px) { .lpp-speaker-wide { grid-template-columns: 1fr; } .lpp-speaker-wide figure { max-width: 100%; } }
