/* getlineage: the public page. Same colour roles as the app: green is Lineage, brass is a citation, yellow is safety. */
:root {
  --bg: #f4f7f5;
  --panel: #ffffff;
  --raised: #e3eee8;
  --line: #cfdcd4;
  --text: #17231d;
  --muted: #405a4e;
  --faint: #5d7569;
  --accent: #176b47;
  --accent-deep: #0f4a31;
  --brass: #85590f;
  --brass-line: #c9a86e;
  --brass-wash: #fbf5e9;
  --caution: #dcb000;
  --caution-text: #5e4900;
  --caution-wash: #fff8d6;
  --brain-node: 31,104,72;
  --brain-edge: 38,140,98;
  --brain-plane: 60,170,120;
  --brain-flash-edge: 20,110,70;
  --brain-flash-node: 12,70,45;
  --sans: 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  --display: Bahnschrift, 'Barlow Semi Condensed', 'DIN Alternate', 'Arial Narrow', sans-serif;
  --wrap: 1160px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0; letter-spacing: -0.005em; }
h2 { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.1; max-width: 22ch; }
h3 { font-size: 21px; line-height: 1.2; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
section { padding: 96px 0; }
.section-lede { color: var(--muted); font-size: 18px; max-width: 58ch; margin-top: 16px; }
.small, .fine { font-size: 14px; color: var(--faint); }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 8px;
  background: var(--accent); color: #fff; font: 600 16px var(--display); text-decoration: none; border: 1px solid var(--accent); }
.button:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.button.quiet { background: transparent; color: var(--accent); border-color: var(--line); }
.button.quiet:hover { background: var(--panel); border-color: var(--accent); }
.button.small { min-height: 38px; padding: 0 14px; font-size: 15px; }

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: rgba(244,247,245,.88); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; }
.top.scrolled { border-bottom-color: var(--line); }
.top-row { display: flex; align-items: center; gap: 32px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 600 22px var(--display); }
.brand svg { width: 30px; height: 30px; }
.brand rect { fill: var(--accent); }
.brand g { stroke: #fff; stroke-width: 3; stroke-linecap: round; fill: none; }
.top-nav { display: flex; gap: 26px; margin-left: auto; }
.top-nav a { color: var(--muted); text-decoration: none; font: 500 16px var(--display); }
.top-nav a:hover { color: var(--text); }

/* Hero */
.hero { padding: 56px 0 88px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(40px, 5vw, 62px); line-height: 1.02; letter-spacing: -0.015em; max-width: 14ch; }
.lede { font-size: 19px; color: var(--muted); max-width: 46ch; margin: 24px 0 32px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.hero .fine { max-width: 48ch; }

/* The example answer */
.demo { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 30px 60px -36px rgba(15,74,49,.45); overflow: hidden; }
.demo-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.chip-asset { font: 500 14px var(--display); color: var(--accent); background: var(--raised); padding: 3px 10px; border-radius: 6px; }
.replay { font: 500 14px var(--display); color: var(--muted); background: none; border: 1px solid var(--line); border-radius: 6px; padding: 4px 10px; cursor: pointer; }
.replay:hover { color: var(--text); border-color: var(--accent); }
.demo-body { padding: 20px 22px 8px; display: grid; }
.ask { justify-self: end; max-width: 88%; background: var(--raised); padding: 10px 14px; border-radius: 12px 12px 4px 12px; font-size: 15px; margin: 0 0 18px; }
.work, .answer { grid-area: 2 / 1; }
.work { display: grid; grid-template-columns: 132px 1fr; gap: 18px; align-items: center; opacity: 0; visibility: hidden; }
.orb-wrap { display: grid; justify-items: center; gap: 2px; }
#cloud-band { width: 132px; height: 132px; }
#cloudCanvas { width: 100%; height: 100%; display: block; }
#stateLabel { font: 500 11px var(--display); letter-spacing: .08em; color: var(--faint); }
.steps { list-style: none; margin: 0; padding: 0; font-size: 14px; color: var(--muted); }
.steps li { position: relative; padding: 5px 0 5px 24px; opacity: .3; transition: opacity .3s; }
.steps li::before { content: ''; position: absolute; left: 2px; top: 11px; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--line); }
.steps li.on { opacity: 1; }
.steps li.on::before { border-color: var(--accent); border-top-color: transparent; animation: spin .8s linear infinite; }
.steps li.done { opacity: 1; }
.steps li.done::before { border: 0; background: var(--accent); width: 10px; height: 10px;
  -webkit-mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'><path d='M1.5 5.2l2.3 2.3L8.6 2.6' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'><path d='M1.5 5.2l2.3 2.3L8.6 2.6' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/contain no-repeat; }
@keyframes spin { to { transform: rotate(360deg); } }
.answer { font-size: 15px; line-height: 1.6; transition: opacity .5s; }
.answer ol { margin: 0 0 12px; padding-left: 22px; }
.answer li { margin-bottom: 8px; padding-left: 2px; }
.caution { background: var(--caution-wash); border-left: 3px solid var(--caution); color: var(--caution-text); padding: 9px 12px; border-radius: 0 6px 6px 0; font-size: 14.5px; }
cite { font: normal 500 13.5px var(--display); color: var(--brass); background: var(--brass-wash); border: 1px solid var(--brass-line); border-radius: 5px; padding: 0 6px; white-space: nowrap; }
.demo figcaption { font-size: 13px; color: var(--faint); padding: 12px 22px 16px; border-top: 1px solid var(--line); background: var(--bg); }

/* Playing: the answer waits while the orb works. Without script, or with reduced motion, the finished answer shows. */
.demo.playing .answer { opacity: 0; visibility: hidden; }
.demo.playing .work { opacity: 1; visibility: visible; }
.demo.answered .work { opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s .3s; }
.demo.answered .answer { opacity: 1; visibility: visible; }

/* The one rule */
.rule { background: var(--panel); border-block: 1px solid var(--line); }
.rule-text { font: 500 clamp(26px, 3.3vw, 42px)/1.18 var(--display); letter-spacing: -0.01em; max-width: 30ch; margin: 0 0 28px; }
.rule-after { color: var(--muted); font-size: 18px; max-width: 62ch; margin: 0; }

/* Sources */
.reads h2 + .section-lede { margin-bottom: 64px; }
.source { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; padding: 40px 0; border-top: 1px solid var(--line); }
.source.flip .source-art { order: -1; }
.source-text { max-width: 50ch; }
.source-text h3 { margin-bottom: 12px; }
.source-text p:not(.small) { color: var(--muted); }
.source-art { display: grid; justify-items: start; gap: 12px; }
.source-art svg { width: 100%; max-width: 440px; height: auto; display: block; filter: drop-shadow(0 18px 28px rgba(15,74,49,.12)); }
.paper { fill: #fff; stroke: var(--line); }
.lines rect { fill: #e2eae5; rx: 2; }
.hit { fill: rgba(201,168,110,.16); stroke: var(--brass-line); stroke-width: 1.2; }
.pg-title { font: 600 14px var(--display); fill: var(--text); }
.pg-strong { font: 600 13px var(--display); fill: var(--text); }
.pg-small, .pin { font: 10px var(--sans); fill: var(--faint); }
.grid-nums text { font: 600 10px var(--display); fill: var(--faint); text-anchor: middle; }
.grid-lines path { stroke: var(--line); fill: none; }
.wire, .wire path { stroke: #2b3d33; stroke-width: 1.4; fill: none; }
.device { fill: #fff; stroke: #2b3d33; stroke-width: 1.4; }
.term circle { fill: #fff; stroke: #2b3d33; stroke-width: 1.4; }
.tag { font: 600 11px var(--display); fill: var(--text); }
.wno { font: 10px var(--display); fill: var(--muted); }
.rail { stroke: #2b3d33; stroke-width: 2.2; fill: none; }
.contact path, .coil { stroke: #2b3d33; stroke-width: 1.8; fill: none; }
.addr { font: 500 11px var(--display); fill: var(--text); }
.note-art .note { width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 20px 22px; box-shadow: 0 18px 28px -14px rgba(15,74,49,.18); font-size: 15px; }
.note-head { font: 600 14px var(--display); color: var(--muted); margin-bottom: 8px; }
.note-by { font-size: 13px; color: var(--faint); margin: 0; }

/* How it answers: a real sequence, so it is numbered */
.how { background: var(--panel); border-block: 1px solid var(--line); }
.flow { list-style: none; counter-reset: step; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.flow li { counter-increment: step; border-top: 2px solid var(--accent); padding-top: 18px; }
.flow li::before { content: counter(step); display: block; font: 600 15px var(--display); color: var(--accent); margin-bottom: 10px; }
.flow h3 { margin-bottom: 10px; }
.flow p { color: var(--muted); font-size: 15.5px; margin: 0; }

/* The floor */
.floor-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 64px; }
.facts { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 36px 40px; }
.facts dt, .qa dt { font: 600 18px var(--display); margin-bottom: 6px; }
.facts dd, .qa dd { margin: 0; color: var(--muted); font-size: 15.5px; }

/* IT */
.qa { margin: 48px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 56px; }
.qa > div { padding: 24px 0; border-top: 1px solid var(--line); }

/* Start */
.start { background: var(--accent); color: #fff; }
.start-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 64px; align-items: center; }
.start h2 { color: #fff; }
.start-grid > div:first-child p { color: #d7ebe0; font-size: 18px; max-width: 52ch; }
.start-grid > div:first-child p:first-of-type { margin-top: 18px; }
.start-card { background: var(--panel); color: var(--text); border-radius: 14px; padding: 28px; display: grid; gap: 12px; }
.start-head { font: 600 20px var(--display); margin: 0 0 4px; }
.start-card .fine { margin: 4px 0 0; }

/* Footer */
.foot { padding: 28px 0 40px; font-size: 14px; color: var(--faint); }
.foot-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

@media (max-width: 980px) {
  .hero-grid, .source, .floor-grid, .start-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .source.flip .source-art { order: 0; }
  .flow { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  section { padding: 64px 0; }
  .hero { padding: 32px 0 56px; }
  .top-nav { display: none; }
  .top-row { justify-content: space-between; }
  .flow, .facts, .qa { grid-template-columns: 1fr; }
  .work { grid-template-columns: 96px 1fr; gap: 12px; }
  #cloud-band { width: 96px; height: 96px; }
  .demo-body { padding: 16px 16px 4px; }
  .demo figcaption { padding: 12px 16px 14px; }
  cite { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  .steps li.on::before { animation: none; }
}
.coil-u { font: 600 12px var(--display); fill: var(--text); }

/* A job safety analysis: the cited row is brass like any citation; the hazard itself carries the safety yellow. */
.jsa { width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 18px 18px 14px; box-shadow: 0 18px 28px -14px rgba(15,74,49,.18); }
.jsa table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.4; }
.jsa th { text-align: left; font: 600 12.5px var(--display); color: var(--muted); padding: 0 8px 6px; border-bottom: 1px solid var(--line); }
.jsa td { padding: 8px; vertical-align: top; color: var(--muted); border-bottom: 1px solid #e6eee9; }
.jsa tr:last-child td { border-bottom: 0; }
.jsa tr.cited td { background: rgba(201,168,110,.16); color: var(--text); border-block: 1px solid var(--brass-line); }
.jsa .warn { color: #b58f00; }
