/* The landing page: one column of short sections divided by hairlines. The loudest thing on the
   page is the headline; the day's ledger below it carries the story. */

.landing main.col { padding-top: 0; padding-bottom: 0; }
.landing main > section { padding: 64px 0; border-top: 1px solid var(--line); }
.landing main > section:first-child { border-top: 0; }
.landing main > section > h2 { margin-bottom: 8px; }

/* --------------------------------------------------------------------- hero */
.landing main > section.hero { padding-top: 64px; }
.hero .app-icon { margin-bottom: 24px; }
.hero h1 { text-wrap: balance; }
.hero .lede { margin: 8px 0 24px; }
.hero .actions { margin-bottom: 12px; }
.hero .stage-note { margin: 0 0 48px; }
.hero .ledger-note { margin: 16px 0 0; }

/* ------------------------------------------------------------------- ledger */
/* The hero's ledger: a day of one fleet, played entry by entry. Two gauges show what Pilot is
   steering by; each entry is chained to the one before it, as in the real ledger. Without
   JavaScript, or with reduced motion, it is the finished day, standing still. */
.ledger { border: 1px solid var(--line); border-radius: var(--r-icon); overflow: hidden; }
.ledger p { margin: 0; }
.ledger-head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 4px 16px; padding: 12px 16px; }
.ledger-head h2 { color: var(--fg); }
.ledger .live { display: inline-flex; align-items: center; gap: 6px; }
.pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--fg); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .2; } }

.gauges { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.gauge { padding: 12px 16px 16px; min-width: 0; }
.gauge + .gauge { border-left: 1px solid var(--line); }
.gauge .reading { margin: 2px 0 10px; font-size: 14px; line-height: 20px; color: var(--fg-2); }
.gauge .reading b { font-size: 16px; font-weight: 600; letter-spacing: var(--track); color: var(--fg); }
.gauge .meter > i { transition: width .8s cubic-bezier(.2, .7, .2, 1), background-color .3s; }

.ledger-view { height: 424px; overflow: hidden; padding: 0 16px; border-top: 1px solid var(--line);
               -webkit-mask-image: linear-gradient(#000 calc(100% - 72px), transparent); mask-image: linear-gradient(#000 calc(100% - 72px), transparent); }
.ledger .entries { border-bottom: 0; }
/* Until the script takes over, hold the entries back so the finished day never flashes by. */
.js .ledger:not(.ready) .entries { visibility: hidden; animation: reveal 0s 2s forwards; }
@keyframes reveal { to { visibility: visible; } }
.ledger .entry { grid-template-columns: 40px 7px minmax(0, 1fr); column-gap: 12px; padding: 0; border-top: 0; overflow: hidden; }
.ledger .entry > time { padding-top: 13px; }
.ledger .entry > div { padding: 12px 0 14px; border-top: 1px solid var(--line); }
.ledger .entry:first-child > div { border-top-color: transparent; }

/* the chain: a node for each entry on a line running back through the day */
.ledger .link { position: relative; }
.ledger .link::before { content: ""; position: absolute; left: 3px; top: 0; bottom: 0; width: 1px; background: var(--line); }
.ledger .entry:first-child .link::before { top: 16px; }
.ledger .link::after { content: ""; position: absolute; left: 0; top: 16px; width: 7px; height: 7px; border-radius: 50%;
                       background: var(--bg); border: 1px solid var(--fg-2); }
.ledger .entry.change .link::after { background: var(--fg); border-color: var(--fg); }
.ledger .entry.refused .link::after { border-color: var(--fg-3); }
.ledger .entry.fresh .link::after { animation: ring .9s ease-out; }
@keyframes ring { from { outline: 1px solid var(--fg-2); outline-offset: 0; } to { outline: 1px solid transparent; outline-offset: 7px; } }

.ledger .meta { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.ledger .hash { font: 400 12px/16px var(--mono); color: var(--fg-3); white-space: nowrap; }
.ledger .what code, .ledger .why code { font-size: 12px; }
.ledger .delta { display: flex; align-items: center; gap: 6px; width: fit-content; max-width: 100%; height: 24px; margin: 6px 0 2px; padding: 0 8px;
                 font: 400 12px/16px var(--mono); color: var(--fg-2); border: 1px solid var(--line); border-radius: var(--r-code); white-space: nowrap; }
.ledger .delta code { padding: 0; font-size: 12px; background: none; }
.ledger .delta s { color: var(--fg-3); }
.ledger .delta .to { color: var(--fg-3); }
.ledger .delta b { color: var(--fg); }
.ledger .ask { display: flex; gap: 8px; margin: 10px 0 2px; }
.ledger .ask .btn { cursor: default; transition: border-color .2s, color .2s; }
.ledger .ask .btn:hover { background: transparent; }
.ledger .ask .btn .icon { display: none; }
.ledger .ask .btn.on { border-color: var(--fg); }
.ledger .ask .btn.on .icon { display: block; }
.ledger .ask .btn.on ~ .btn { color: var(--fg-3); }

.ledger-foot { display: flex; align-items: center; gap: 6px; padding: 10px 16px; border-top: 1px solid var(--line); }
.ledger-foot .icon { width: 14px; height: 14px; }
@media (max-width: 480px) {
  .ledger .hash { display: none; }
  .gauge .reading .faint { display: block; }
}

/* -------------------------------------------------------------------- doors */
/* The two ways in, side by side: each is a whole pitch, so each gets its own box. */
.doors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.door { display: flex; flex-direction: column; align-items: flex-start; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-icon); }
.door .label { margin: 0 0 8px; }
.door h3 { margin-bottom: 8px; font-weight: 600; text-wrap: balance; }
.door p { margin: 0 0 12px; font-size: 14px; line-height: 20px; color: var(--fg-2); }
.door .for { flex: 1; color: var(--fg); }
@media (max-width: 600px) { .doors { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------------- levels */
/* Three levels of trust, least to most: the name, what Pilot may do, what you grant for it. */
.levels { margin: 24px 0 16px; border-top: 1px solid var(--line); }
.levels > div { display: grid; grid-template-columns: 136px minmax(0, 1fr); column-gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.levels dt { font-weight: 500; letter-spacing: var(--track); }
.levels dt .tag { margin-left: 4px; }
.levels dd { margin: 0; font-size: 14px; line-height: 20px; color: var(--fg-2); }
.levels .grant { display: block; margin-top: 4px; color: var(--fg); }
#levels > .fine { margin: 0; }
@media (max-width: 480px) { .levels > div { grid-template-columns: minmax(0, 1fr); row-gap: 4px; } }

/* ------------------------------------------------------------------- prompt */
.steps .codeblock { margin: 16px 0 0; }
pre.prompt { white-space: pre-wrap; overflow-wrap: anywhere; }
pre.prompt .ph { color: var(--fg-3); }
.steps .more-link { margin-top: 12px; }

/* -------------------------------------------------------------------- steps */
.steps { list-style: none; margin: 24px 0 0; padding: 0; }
.steps > li { padding: 32px 0; border-top: 1px solid var(--line); }
.steps > li:last-child { padding-bottom: 0; }
.step-n { display: block; margin-bottom: 8px; font: 400 12px/16px var(--mono); color: var(--fg-3); }
.steps h3 { margin-bottom: 4px; }
.steps p { color: var(--fg-2); }
.steps > li > :last-child { margin-bottom: 0; }

/* ----------------------------------------------------------------- replaces */
.swap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.swap > div { padding: 16px; border: 1px solid var(--line); border-radius: var(--r-icon); }
.swap p { margin: 0; }
.swap .was { margin-bottom: 4px; font-size: 14px; line-height: 20px; color: var(--fg-3); text-decoration: line-through; text-decoration-color: var(--fg-3); }

/* ------------------------------------------------------------------ control */
.ruled { list-style: none; margin: 0 0 16px; padding: 0; border-top: 1px solid var(--line); }
.ruled li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 20px; }

/* ------------------------------------------------------------------ pricing */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 24px 0; }
@media (max-width: 600px) { .plans, .swap { grid-template-columns: minmax(0, 1fr); } }
.plan { display: flex; flex-direction: column; align-items: flex-start; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-icon); }
.plan--main { border-color: var(--fg); }
.plan-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; width: 100%; }
.price { margin: 0; font-size: 14px; line-height: 20px; color: var(--fg-2); }
.price b { font-size: 16px; font-weight: 600; letter-spacing: var(--track); color: var(--fg); margin-right: 4px; }
.plan .for { margin: 4px 0 12px; font-size: 14px; line-height: 20px; color: var(--fg-2); }
.plan ul { list-style: none; margin: 0 0 16px; padding: 0; width: 100%; flex: 1; }
.plan li { padding: 4px 0 4px 14px; font-size: 14px; line-height: 20px; position: relative; break-inside: avoid; }
.plan li::before { content: "–"; position: absolute; left: 0; color: var(--fg-3); }
#pricing > .fine, #control > .fine { margin: 0; }

/* ---------------------------------------------------------------------- faq */
.qa { margin-top: 24px; border-top: 1px solid var(--line); }
.qa details { border-bottom: 1px solid var(--line); }
.qa summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; cursor: pointer; list-style: none; font-weight: 500; letter-spacing: var(--track); }
.qa summary::-webkit-details-marker { display: none; }
.qa summary .icon { color: var(--fg-2); transition: transform .15s; }
.qa details[open] summary .icon { transform: rotate(180deg); }
.qa details p { margin: 0 0 16px; color: var(--fg-2); }

/* -------------------------------------------------------------------- close */
#alpha .ruled { margin: 16px 0 0; }
.landing main > section.close { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; padding-bottom: 96px; }
.close h2 { font-size: 24px; line-height: 32px; }
