/* PlotLamp site. Fonts: Literata and Libre Caslon Text (SIL OFL 1.1, notices in ../fonts/). */
@font-face { font-family: 'Libre Caslon Text'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/libre-caslon-text-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Literata'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(../fonts/literata-normal.woff2) format('woff2'); }
@font-face { font-family: 'Literata'; font-style: italic; font-weight: 400; font-display: swap;
  src: url(../fonts/literata-italic.woff2) format('woff2'); }

/* Brand colours from branding/final-logo/BRAND.md; text colours chosen to pass WCAG AA. */
:root {
  --bg: #FFFAF0; --surface: #FFF4DC; --text: #03132D; --muted: #3A4472;
  --accent: #8A5410; --accent-strong: #B5741A; --line: #E6D6B4;
  --btn-bg: #03132D; --btn-text: #FFF4DC; --draft-bg: #FBE3B0; --draft-text: #5A3608;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #03132D; --surface: #0B1F44; --text: #FFF4DC; --muted: #C9CDE6;
    --accent: #F4B23E; --accent-strong: #FFE3A3; --line: #2A3768;
    --btn-bg: #F4B23E; --btn-text: #03132D; --draft-bg: #3A2A08; --draft-text: #FFE3A3;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 1.0625rem/1.65 'Literata', Georgia, serif; overflow-wrap: break-word; }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
img { max-width: 100%; height: auto; }

.skip { position: absolute; left: -999px; top: 0; background: var(--btn-bg); color: var(--btn-text);
  padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }

.wrap { max-width: 60rem; margin: 0 auto; padding: 0 1rem; }
header.site { border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.5rem 1.5rem; padding-top: 0.9rem; padding-bottom: 0.9rem; }
.brand { font-family: 'Libre Caslon Text', Georgia, serif; font-size: 1.55rem; color: var(--text);
  text-decoration: none; letter-spacing: 0.01em; }
/* Official PlotLamp logo (branding/final-logo via make_favicons.py), never redrawn (L-2044) */
.brand::before { content: ""; display: inline-block; width: 1.25em; height: 1.25em; border-radius: 22%;
  background: url("../img/icons/icon-192.png") center / cover no-repeat; margin-right: 0.45em; vertical-align: -0.28em; }
nav.main ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; }
nav.main a { text-decoration: none; color: var(--text); padding: 0.35rem 0; display: inline-block; }
nav.main a[aria-current="page"] { border-bottom: 2px solid var(--accent); }

main.wrap { padding-top: 2rem; padding-bottom: 3rem; }
h1, h2, h3 { line-height: 1.25; font-weight: 600; }
h1 { font-size: clamp(1.9rem, 6vw, 2.8rem); margin: 0.2em 0 0.4em; }
h2 { font-size: 1.5rem; margin-top: 2.2rem; }
.tagline { font-family: 'Libre Caslon Text', Georgia, serif; text-transform: uppercase; letter-spacing: 0.3em;
  color: var(--accent); font-size: 0.85rem; margin: 0; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 40rem; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1.25rem 1.4rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; }
.grid .card h3 { margin-top: 0; }

.btn { display: inline-block; background: var(--btn-bg); color: var(--btn-text); text-decoration: none;
  border: 0; border-radius: 8px; padding: 0.7rem 1.2rem; font: inherit; font-weight: 600; cursor: pointer; }
.btn:hover { color: var(--btn-text); filter: brightness(1.12); }
.btn.secondary { background: transparent; color: var(--text); border: 2px solid var(--text); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0; }
.placeholder::after { content: " (link coming)"; font-weight: 400; font-size: 0.85em; }

/* A sample beat card, drawn in CSS: shows what the app looks like without an image. */
.demo { max-width: 34rem; margin: 2rem 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 1rem 1.25rem; box-shadow: 0 6px 24px rgba(3, 19, 45, 0.12); }
.demo .label { font-variant: small-caps; letter-spacing: 0.08em; color: var(--muted); font-size: 0.9rem;
  display: flex; justify-content: space-between; gap: 1rem; }
.demo p { margin: 0.4rem 0 0; font-size: 1.15rem; }

.price { font-size: 2.6rem; font-weight: 600; margin: 0.2rem 0; }
.price small { font-size: 1rem; font-weight: 400; color: var(--muted); }
ul.ticks { padding-left: 1.2rem; }
ul.ticks li { margin: 0.3rem 0; }
.note { color: var(--muted); font-size: 0.95rem; }

table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-scroll { overflow-x: auto; }

.draft { background: var(--draft-bg); color: var(--draft-text); border-radius: 8px; padding: 0.8rem 1rem;
  font-weight: 600; margin: 1rem 0 1.5rem; }
.legal code { font-size: 0.92em; overflow-wrap: anywhere; }

.signup { margin-top: 3rem; }
.signup form { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: flex-end; }
.signup label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.signup input[type=email], .signup input[type=text] { font: inherit; padding: 0.6rem 0.75rem; border-radius: 8px; width: 100%;
  border: 2px solid var(--muted); background: var(--bg); color: var(--text); }
.signup .field { flex: 1 1 14rem; min-width: 0; }
.signup .consent { flex: 1 1 100%; display: flex; gap: 0.5rem; align-items: center; }
.signup .consent label { margin: 0; font-weight: 400; }
.signup .consent input { width: 1.2rem; height: 1.2rem; margin: 0; flex: none; }
.signup [role=status] { min-height: 1.5em; margin: 0.6rem 0 0; }

footer.site { border-top: 1px solid var(--line); padding: 1.5rem 0 2.5rem; color: var(--muted); font-size: 0.95rem; }
footer.site ul { list-style: none; padding: 0; margin: 0 0 0.8rem; display: flex; flex-wrap: wrap; gap: 0.3rem 1.1rem; }
footer.site a { color: var(--muted); }

/* Glossary page (L-0627): term in bold, definition indented under it. */
dl.glossary { margin: 0; }
dl.glossary dt { font-weight: 600; font-size: 1.1rem; margin-top: 1.2rem; scroll-margin-top: 1rem; }
dl.glossary dd { margin: 0.2rem 0 0 1rem; }

/* Help pages (guide/): long commands and wide tables scroll inside their box, never the page. */
pre { overflow-x: auto; max-width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; }
code { overflow-wrap: anywhere; }
pre code { display: block; max-width: 100%; white-space: pre-wrap; word-break: break-word; }
.table-scroll { max-width: 100%; }

/* ===================================================================
   Night Desk theme: the whole site is a writer's desk at
   night, lit by one amber lamp. Always dark, whatever the OS setting.
   Contrast (WCAG AA) checked against --bg #03132D and --surface #0A1D40.
   =================================================================== */
:root, :root:is(*) {
  --bg: #03132D; --bg-deep: #020C1E; --surface: #0A1D40; --surface-2: #0E2550;
  --text: #FFF4DC; --muted: #C9CDE6; --accent: #F4B23E; --accent-strong: #FFE3A3;
  --line: #24365F; --edge: rgba(244, 178, 62, 0.38);
  --btn-bg: #F4B23E; --btn-text: #03132D; --draft-bg: #3A2A08; --draft-text: #FFE3A3;
  --glow: rgba(244, 178, 62, 0.22);
  color-scheme: dark;
}
body { background: var(--bg) radial-gradient(ellipse 70rem 38rem at 50% -6rem, rgba(244,178,62,0.10), transparent 70%) no-repeat;
  min-height: 100vh; }
::selection { background: #F4B23E; color: #03132D; }
:focus-visible { outline: 3px solid var(--accent-strong); outline-offset: 3px; border-radius: 4px; }

header.site { border-bottom: 1px solid var(--line); background: rgba(2, 12, 30, 0.55); }
.brand { color: var(--text); }
.brand::before { box-shadow: 0 0 14px rgba(244, 178, 62, 0.45); }
nav.main a { color: var(--muted); }
nav.main a:hover { color: var(--accent-strong); }
nav.main a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }

h1, h2, h3 { color: var(--text); }
h2 { font-family: 'Libre Caslon Text', Georgia, serif; font-weight: 400; letter-spacing: 0.01em; }
h2::after { content: ""; display: block; width: 3rem; height: 2px; margin-top: 0.45rem;
  background: linear-gradient(90deg, var(--accent), transparent); }
.card h2::after, .card h3::after, .hero h2::after { display: none; }

/* Hero: the lamp mark glows large; the beat card sits in its light. */
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 1rem 2.5rem; align-items: center; padding: 1.5rem 0 1rem; isolation: isolate; }
/* The glow is a blurred shadow (paint only), so it never widens the page. */
.hero::before { content: ""; position: absolute; z-index: -1; pointer-events: none;
  width: 10rem; height: 10rem; right: 8rem; top: 9rem; border-radius: 50%;
  background: rgba(244,178,62,0.16); box-shadow: 0 0 12rem 9rem rgba(244,178,62,0.13); }
.hero-copy { min-width: 0; }
.hero-art { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.lamp-mark { width: 100%; max-width: 22rem; height: auto;
  filter: drop-shadow(0 0 28px rgba(244, 178, 62, 0.45)) drop-shadow(0 0 70px rgba(244, 178, 62, 0.22));
  animation: lamp-breathe 7s ease-in-out infinite; }
@keyframes lamp-breathe {
  0%, 100% { filter: drop-shadow(0 0 24px rgba(244,178,62,0.40)) drop-shadow(0 0 60px rgba(244,178,62,0.18)); }
  50% { filter: drop-shadow(0 0 34px rgba(244,178,62,0.55)) drop-shadow(0 0 90px rgba(244,178,62,0.28)); }
}
.tagline { color: var(--accent); }
.lead { color: var(--muted); }
.actions strong { color: var(--accent-strong); align-self: center; }

/* The beat card, lit by the lamp: lighter navy, amber edge, warm pool of light behind. */
.demo { position: relative; background: linear-gradient(180deg, #102A58, var(--surface));
  border: 1px solid var(--edge); border-top: 2px solid var(--accent); border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(2,12,30,0.6), 0 18px 50px rgba(0,0,0,0.45), 0 0 60px var(--glow); }
.hero .demo { margin: -1.5rem 0 0; width: 100%; max-width: 24rem; }
.demo .label { color: var(--accent-strong); }
.demo p { color: var(--text); }
.demo-wide { max-width: 40rem; margin: 2.5rem auto; }

/* Cards: slightly lighter navy with amber edges. */
.card { background: var(--surface); border: 1px solid var(--edge); border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 227, 163, 0.08), 0 10px 30px rgba(0, 0, 0, 0.28);
  transition: border-color 0.2s, box-shadow 0.2s; }
.card:hover { border-color: rgba(244, 178, 62, 0.7); }
.grid .card h3 { color: var(--accent-strong); font-family: 'Libre Caslon Text', Georgia, serif; font-weight: 400; }

.btn { background: var(--btn-bg); color: var(--btn-text); box-shadow: 0 0 22px rgba(244,178,62,0.25); }
.btn.secondary { background: transparent; color: var(--accent-strong); border: 2px solid var(--accent);
  box-shadow: none; }
.btn.secondary:hover { background: rgba(244, 178, 62, 0.12); color: var(--text); }

/* Features page: each section becomes a lit card on the desk. */
.feature-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); gap: 1.25rem; margin-top: 1.5rem; }
.feature-list .card h2 { margin-top: 0; font-size: 1.3rem; color: var(--accent-strong); }
.feature-list .card.wide { grid-column: 1 / -1; }
.night-shot { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.night-shot img { width: 11rem; flex: none; border-radius: 18px; border: 1px solid var(--edge);
  box-shadow: 0 0 40px var(--glow), 0 12px 30px rgba(0,0,0,0.45); }
.night-shot ul { flex: 1 1 16rem; margin: 0; }

/* Pricing: the Early Access card stands nearest the lamp. */
.pricing-grid { position: relative; isolation: isolate; margin-top: 1.5rem; }
.pricing-grid::before { content: ""; position: absolute; z-index: -1; pointer-events: none;
  width: 8rem; height: 8rem; right: 22%; top: 35%; border-radius: 50%;
  background: rgba(244,178,62,0.12); box-shadow: 0 0 10rem 8rem rgba(244,178,62,0.11); }
.pricing-grid .card h2 { margin-top: 0; }
.pricing-grid .card.lit { border: 1px solid var(--accent); box-shadow: 0 0 50px rgba(244,178,62,0.22), 0 14px 36px rgba(0,0,0,0.4); }
.price { color: var(--accent-strong); font-family: 'Libre Caslon Text', Georgia, serif; font-weight: 400; }
.price small { color: var(--muted); }
.card strong { color: var(--accent-strong); }
.faq p { background: rgba(10, 29, 64, 0.6); border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0;
  padding: 0.85rem 1.1rem; }
.faq p.note { background: none; border: 0; padding: 0; }

ul.ticks { list-style: none; padding-left: 0; }
ul.ticks li { position: relative; padding-left: 1.4rem; }
ul.ticks li::before { content: ""; position: absolute; left: 0.2rem; top: 0.62em; width: 0.45rem; height: 0.45rem;
  border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px rgba(244,178,62,0.7); }

th, td { border-bottom-color: var(--line); }
pre, code { background: var(--bg-deep); color: var(--accent-strong); border-radius: 6px; }
pre { padding: 0.8rem 1rem; border: 1px solid var(--line); }
footer.site { background: var(--bg-deep); border-top: 1px solid var(--line); }
footer.site a { color: var(--muted); }
footer.site a:hover { color: var(--accent-strong); }

@media (max-width: 47.99rem) {
  .hero { grid-template-columns: 1fr; padding-top: 0.5rem; }
  .hero::before { width: 6rem; height: 6rem; right: 30%; top: auto; bottom: 8rem; box-shadow: 0 0 8rem 6rem rgba(244,178,62,0.13); }
  .pricing-grid::before { right: 30%; top: 70%; }
  .lamp-mark { max-width: 15rem; }
  .hero .demo { margin-top: -1rem; }
  .feature-list { grid-template-columns: 1fr; }
  .night-shot img { width: 9rem; }
}
@media (prefers-reduced-motion: reduce) {
  .lamp-mark { animation: none; }
  .card { transition: none; }
}
/* The lamp's glow may spill past the page edge; never let it make a sideways scroll. */
html { overflow-x: clip; }
body { overflow-x: clip; }
