/* Page CSS: only what sits inside a visual and the kit lacks (design-taste-frontend system.md). Kit tokens only. */

/* The app's own screens, as phone captures rising out of a frame and cut by its bottom */
.shot { width: min(var(--w, 260px), calc(100% - 48px)); }
.shot img, .pair img { display: block; width: 100%; height: auto; border-radius: 28px; box-shadow: 0 1px 0 color-mix(in oklab, var(--ink) 12%, transparent) inset, 0 24px 60px -24px rgb(0 0 0 / .55); }
#money .panel { --p-h: 300px; }
.pair { position: absolute; inset: 48px 24px auto; display: flex; justify-content: center; gap: var(--s-5); }
.pair img { width: min(240px, 44%); }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.facts li { padding-left: 20px; position: relative; color: var(--ink); }
.facts li::before { content: ""; position: absolute; left: 0; top: .6em; width: 8px; height: 8px; border-radius: 50%; background: var(--action); }
.tab-copy { margin-top: var(--s-6); max-width: 46ch; font-size: var(--t-lead); line-height: 1.5; }
.tab-copy p { margin: 0; }

/* The 68-second film: poster first, one play button */
.player { position: relative; margin: 0; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.player .player__play { position: absolute; inset: 0; z-index: 2; margin: auto; width: max-content; height: max-content; display: flex; flex-direction: column; align-items: center; gap: var(--s-3); padding: 0; border: 0; background: none; color: var(--ink); font: 600 var(--t-body)/1.2 var(--font-text); cursor: pointer; }
.player__icon { display: grid; place-items: center; width: 88px; height: 88px; border-radius: 50%; background: var(--action); color: var(--action-ink); box-shadow: 0 10px 30px rgb(0 0 0 / .3), 0 0 0 10px color-mix(in oklab, var(--action) 30%, transparent); transition: transform var(--dur) var(--ease); }
.player__icon svg { margin-left: 4px; }
.player__play > span:last-child { padding: var(--s-1) var(--s-3); border-radius: 999px; background: rgb(0 0 0 / .6); color: #fff; }
.player .player__play:hover .player__icon { transform: scale(1.06); }
.player .player__play:active .player__icon { transform: scale(.96); }
.player .player__play:focus-visible { outline: none; }
.player .player__play:focus-visible .player__icon { outline: 3px solid var(--ink); outline-offset: 4px; }
@media (max-width: 639px) { #tour .fill { flex: none; } #tour .player { aspect-ratio: 16 / 9; } .player__icon { width: 64px; height: 64px; } main > #tour { height: auto; min-height: 0; } }
.player.is-playing .player__play { display: none; }

/* A gas sale, drawn as the app draws it */
.gas-sale { display: grid; gap: var(--s-4); padding: var(--s-5); border-radius: var(--r-lg); background: #fbfaf6; color: #161c1a; font-size: 14px; box-shadow: 0 24px 60px -24px rgb(0 0 0 / .55); }
.gas-sale b { font-weight: 500; }
.gas-sale small { display: block; color: #5d6159; font-size: 13px; }
.gas-sale__head { display: flex; justify-content: space-between; align-items: baseline; font-size: 16px; }
.gas-sale__head span { color: #5d6159; font-size: 13px; }
.gas-sale__who { display: flex; gap: var(--s-3); align-items: center; padding: var(--s-3); border-radius: var(--r-md); background: #eef1ec; }
.gas-sale__av { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #9fc7b8; font-weight: 500; }
.gas-sale__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-2); }
.gas-sale__grid span { padding: var(--s-3) var(--s-2); border: 1px solid #dfe3dc; border-radius: var(--r-md); text-align: center; }
.gas-sale__grid .is-on { border-color: #1f6f5c; background: #e3f0ea; }
.gas-sale__row { display: flex; justify-content: space-between; gap: var(--s-4); padding-bottom: var(--s-3); border-bottom: 1px solid #e6e8e2; }
.gas-sale__btn { padding: var(--s-3); border-radius: 999px; background: #1f6f5c; color: #fff; text-align: center; font-weight: 500; }

/* Language switch, a plain nav word */
.lang { border: 0; background: none; cursor: pointer; font: inherit; color: inherit; padding: 0; }

/* Request popover: the app's compact popover (CodeRequestSheet), in the kit's tokens */
.pop { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgb(8 12 10 / .5); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); animation: pop-fade .2s ease-out; }
.pop[hidden] { display: none; }
.pop-scrim { position: absolute; inset: 0; }
.pop-panel { position: relative; width: 100%; max-width: 420px; max-height: 92vh; overflow: auto; background: var(--p-surface); color: var(--p-ink); border: 1px solid color-mix(in oklab, var(--p-ink) 12%, transparent); border-radius: 18px 18px 0 0; padding: var(--s-5) var(--s-5) calc(var(--s-5) + env(safe-area-inset-bottom)); animation: pop-up .32s cubic-bezier(.16, 1, .3, 1); }
@media (min-width: 640px) { .pop { align-items: center; } .pop-panel { border-radius: 18px; } }
@keyframes pop-fade { from { opacity: 0; } }
@keyframes pop-up { from { transform: translateY(24px); } }
.pop-x { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: color-mix(in oklab, var(--p-ink) 10%, transparent); color: var(--p-ink); font-size: 22px; line-height: 36px; cursor: pointer; }
.pop-panel h3 { margin: 0 44px var(--s-1) 0; font: var(--display-weight) 24px/1.15 var(--font-display); letter-spacing: -0.02em; }
.pop-sub { margin: 0 0 var(--s-2); color: var(--p-muted); font-size: 14px; }
.pop-panel form { display: grid; gap: var(--s-3); }
.pop-panel form > label, .pop-pair > label { display: grid; gap: var(--s-1); font-size: 13px; font-weight: 500; color: var(--p-muted); }
.pop-panel input:not([type="radio"]) { font: 400 16px var(--font-text); padding: 11px 12px; border: 1px solid color-mix(in oklab, var(--p-ink) 14%, transparent); border-radius: var(--r-sm); background: var(--p-bg); color: var(--p-ink); width: 100%; }
.pop-panel input:not([type="radio"]):focus { outline: 2px solid var(--p-action); outline-offset: 0; }
.pop-pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.pop-label { font-size: 13px; font-weight: 500; color: var(--p-muted); margin-bottom: calc(-1 * var(--s-1)); }
.pop-chips { display: flex; gap: 6px; }
.pop-chips label { flex: 1; position: relative; }
.pop-chips input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pop-chips span { display: grid; place-items: center; min-height: 40px; padding: 0 6px; border-radius: 999px; border: 1px solid color-mix(in oklab, var(--p-ink) 16%, transparent); color: var(--p-muted); font-size: 14px; font-weight: 500; }
.pop-chips input:checked + span { background: color-mix(in oklab, var(--p-action) 22%, transparent); border-color: var(--p-action); color: var(--p-ink); }
.pop-chips input:focus-visible + span { outline: 2px solid var(--p-action); outline-offset: 2px; }
.pop-link { justify-self: start; border: 0; background: none; padding: 0; cursor: pointer; color: var(--p-action); font: 500 14px var(--font-text); }
.pop-bot { min-height: 65px; }
.pop-err { margin: 0; color: #f0a49a; font-size: 14px; }
.pop-send { width: 100%; }
.pop-send:disabled { opacity: .6; cursor: wait; }
.pop-alt { margin: 0; text-align: center; font-size: 14px; color: var(--p-muted); }
.pop-alt a { color: var(--p-ink); }
.pop-done { text-align: center; padding: var(--s-4) var(--s-1) 0; display: grid; gap: var(--s-2); justify-items: center; }
.pop-done b { font-size: 44px; line-height: 1; color: var(--p-action); }
.pop-done h3 { margin: 0; }
.pop-done p { margin: 0 0 var(--s-3); color: var(--p-muted); }
@media (prefers-reduced-motion: reduce) { .pop, .pop-panel { animation: none; } }

@media (max-width: 639px) {
  .pair img { width: 46%; }
  .shot { width: min(var(--w, 260px), calc(100% - 32px)); }
}

/* Skip link: hidden until focused, so the logo keeps the left line (system.md, Base) */
.skip { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { width: auto; height: auto; clip-path: none; z-index: 20; padding: var(--s-2) var(--s-4); background: var(--bg); color: var(--ink); border-radius: var(--r-sm); }

/* Split frames take their column's height from 1024, so the screen is never half empty */
@media (min-width: 1024px) {
  .split-frame { height: 100%; }
  .split-frame::before { display: none; }
}

/* The hero window (from the kit's centred-hero demo: demo.css and hero-centred.html), tinted to the palette */
.d-win { background: #fff; color: #16181a; border-radius: 12px; overflow: hidden; font: 400 14px/1.4 var(--font-text);
         box-shadow: 0 0 0 1px rgb(0 0 0 / .07), 0 24px 60px -28px rgb(0 0 0 / .45); text-align: left; }
.d-win--dark { background: #17191c; color: #eceef0; box-shadow: 0 0 0 1px rgb(255 255 255 / .08), 0 30px 70px -30px rgb(0 0 0 / .8); }
.d-win__bar { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px; border-bottom: 1px solid rgb(0 0 0 / .07); font-size: 13px; color: #5d6268; }
.d-win--dark .d-win__bar { border-color: rgb(255 255 255 / .07); color: #9aa0a6; }
.d-win__dots { display: flex; gap: 6px; } .d-win__dots i { width: 10px; height: 10px; border-radius: 50%; background: #dcdfe2; }
.d-win--dark .d-win__dots i { background: #3a3e43; }
.d-win__body { display: grid; grid-template-columns: 160px 1fr; min-height: 420px; }
.d-chat { display: grid; gap: 10px; align-content: start; padding: 18px; font-size: 14px; }
.d-msg { max-width: 78%; padding: 10px 14px; border-radius: 16px; background: rgb(255 255 255 / .07); line-height: 1.45; }
.d-msg--me { justify-self: end; background: #f2f2f0; color: #121314; border-bottom-right-radius: 6px; }
.d-msg--bot { border-bottom-left-radius: 6px; }
.d-msg small { display: block; margin-top: 4px; font-size: 13px; opacity: .6; }
.d-tool { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #9aa0a6; }
.d-tool::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; }
.d-win--dark .d-win__body { grid-template-columns: 250px 1fr; min-height: 420px; }
.d-win--dark .d-win__bar b { color: #eceef0; font-weight: 500; } .d-win--dark .d-win__bar .sp { flex: 1; }
/* the exchange stands in the window's top 260px: one-line question, the tool line, a two-line answer, its actions */
.hero__window .d-chat { padding: 14px 18px; gap: 8px; }
.hero__window .d-msg--me small { display: none; }
.hero__window .d-msg--bot { max-width: 86%; }
.hero__window .d-msg--bot small { display: inline; margin: 0 0 0 8px; white-space: nowrap; }
@media (max-width: 639px) { .hero__window .d-win__bar .sp ~ span { display: none; } }
.inbox { border-right: 1px solid rgb(255 255 255 / .07); padding: 10px; display: grid; align-content: start; gap: 2px; }
.inbox .q { height: 34px; margin-bottom: 6px; border-radius: 9px; background: rgb(255 255 255 / .06); display: flex; align-items: center; padding: 0 10px; color: #7d8389; font-size: 13px; }
.inbox .t { display: grid; grid-template-columns: 30px 1fr auto; gap: 1px 10px; padding: 9px 8px; border-radius: 9px; font-size: 13px; }
.inbox .t.is-on { background: rgb(255 255 255 / .07); }
.inbox .t i { grid-row: 1 / span 2; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 600 13px/1 var(--font-text); font-style: normal; color: #0c0d0f; }
.inbox .t b { font-weight: 500; color: #eceef0; } .inbox .t time { color: #7d8389; font-size: 13px; }
.inbox .t span { grid-column: 2 / -1; color: #8d9399; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convo { display: grid; min-width: 0; align-content: start; }
.d-msg--bot { background: #22262b; color: #e9ecee; }
.acts { display: flex; gap: 8px; } .acts span { height: 30px; padding: 0 12px; border-radius: 99px; display: inline-flex; align-items: center; font-size: 13px; font-weight: 500; background: #f2f2f0; color: #0c0d0f; }
.acts span + span { background: rgb(255 255 255 / .08); color: #e9ecee; }
@media (max-width: 639px) { .d-win--dark .d-win__body { grid-template-columns: 1fr; } .inbox { display: none; } .hero__window .d-chat { font-size: 13px; padding: 12px 14px; } }
.d-win--dark { background: #1b2321; } .d-msg--bot { background: #26302d; } .inbox .t time { color: #9fc7b8; }
.lang { display: inline-flex; align-items: center; line-height: 1; }

/* Split frames on the same lit sage ground as the card panels (data-ground="sage") */
.split-frame { border-color: transparent; background: radial-gradient(120% 90% at 20% 0%, color-mix(in oklab, var(--ground-surface) 90%, #fff), var(--ground-bg) 70%); }
.split-text { display: grid; gap: var(--s-5); align-content: start; }
.closing__cta .t-alt { margin-top: var(--s-4); color: var(--muted); }
.closing__cta .t-alt a { color: var(--ink); }

/* Phone: the money section's two rows stack in one column, the four cards in two screens */
@media (max-width: 639px) {
  #money > .wrap { flex-direction: column; gap: var(--s-6); }
  #money > .wrap > *, #money .group > .fill { flex: none; height: auto; min-height: auto; }
  #money .panel { --p-h: 200px; }
}

/* The statement moment fills its screen on tablets and phones too */
@media (max-width: 1023px) { #statement .mo-la__type { font-size: 17vw; line-height: .98; } }
@media (max-width: 639px) { #statement .mo-la__type { font-size: 23vw; } }


/* Language picker: a plain nav control */
.lang { display: inline-flex; align-items: center; }
.lang select { appearance: none; border: 1px solid var(--line); border-radius: var(--r-sm); background: transparent; color: var(--muted); font: 500 14px var(--font-text); padding: 6px 28px 6px 10px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 15px) 55%, calc(100% - 10px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.lang select:hover { color: var(--ink); }
.lang select option { background: var(--surface); color: var(--ink); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[dir="rtl"] .wrap { direction: rtl; }
[dir="rtl"] :is(.ly-piece, .gas-sale, .screen, .shot, .pair) { direction: ltr; }

/* Landing pages (p/<slug>/, built by site-src/build-pages.py): plain reading layout on the same tokens */
.art-page .nav { position: sticky; top: 0; z-index: 10; background: color-mix(in oklab, var(--p-bg) 88%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.art { padding-block: var(--s-6) var(--s-8); }
.art-page .nav__actions { margin-left: auto; }
.crumbs-path { font-size: 14px; color: var(--p-muted); margin-bottom: var(--s-5); }
.crumbs-path a { color: inherit; }
.art__head { display: grid; gap: var(--s-6); align-items: center; margin-bottom: var(--s-7); }
@media (min-width: 860px) { .art__head:has(.art__shot) { grid-template-columns: 1.4fr 1fr; } }
.art__head h1 { font: var(--display-weight) clamp(34px, 5vw, 56px)/1.05 var(--font-display); letter-spacing: var(--display-tracking); margin: 0 0 var(--s-4); }
.art__lead { font-size: 19px; line-height: 1.55; color: var(--p-muted); max-width: 62ch; margin: 0 0 var(--s-5); }
.art__shot { margin: 0; justify-self: center; }
.art__shot img { width: min(320px, 70vw); height: auto; border-radius: 28px; border: 1px solid color-mix(in oklab, var(--p-ink) 14%, transparent); }
.art__sec { max-width: 70ch; margin-bottom: var(--s-7); }
.art__sec h2 { font: var(--display-weight) clamp(24px, 3vw, 32px)/1.15 var(--font-display); letter-spacing: -0.02em; margin: 0 0 var(--s-3); }
.art__sec p { font-size: 17px; line-height: 1.65; margin: 0 0 var(--s-3); }
.art__table { overflow-x: auto; }
.art__table table { border-collapse: collapse; width: 100%; font-size: 15px; }
.art__table th, .art__table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid color-mix(in oklab, var(--p-ink) 12%, transparent); }
.art__table thead th { color: var(--p-muted); font-weight: 500; }
.art__table td:last-child { color: var(--p-accent); font-weight: 600; }
.faq { display: grid; gap: var(--s-4); }
.faq__item h3 { font-size: 18px; margin: 0 0 var(--s-1); }
.faq__item p { color: var(--p-muted); margin: 0; }
.art__cta { background: var(--p-surface); border-radius: 20px; padding: var(--s-6); margin-bottom: var(--s-7); }
.art__cta h2 { margin: 0 0 var(--s-2); font: var(--display-weight) 30px/1.1 var(--font-display); }
.art__cta p { color: var(--p-muted); margin: 0 0 var(--s-4); }
.art__more { padding-left: 1.1em; line-height: 2; }
.art__more a { color: var(--p-accent); }
.foot-mini { display: flex; gap: var(--s-4); justify-content: space-between; flex-wrap: wrap; padding-block: var(--s-5); color: var(--p-muted); font-size: 14px; border-top: 1px solid color-mix(in oklab, var(--p-ink) 10%, transparent); }
.foot-mini a { color: inherit; }

/* Stock and costs panels: the gas-sale card's look, with a warning and a total */
.mini__warn { padding: var(--s-3); border-radius: var(--r-md); background: #f6ecd2; color: #6b4e0a; }
.mini__warn small { color: #6b4e0a; }
.mini__low { color: #9a6a00; }
.mini__left { padding: var(--s-3); border-radius: var(--r-md); background: #e3f0ea; }
.mini__left b { display: block; font-size: 26px; letter-spacing: -0.02em; color: #1f6f5c; }
/* seven questions on one desktop screen: the rule under each row is the gap */
#questions .faq { gap: 0; }
#questions .faq > .faq__item { padding-block: var(--s-4); }
/* a phone: these take the height they need (more than one screen, less than two) */
@media (max-width: 639px) { main > #costs { height: auto; min-height: 100lvh; } #costs .fill { flex: none; } }
/* the questions take the height they need at every width: no frame in them to collapse */
main > #questions { height: auto; min-height: 100svh; }

/* More in Suds: six short cards; a phone stacks them and the section grows to fit */
.more-grid { row-gap: var(--s-5); margin-top: var(--s-6); }
@media (max-width: 639px) { main > #more { height: auto; min-height: 100lvh; } }
/* the close and its links take the height they need: eight guide links outgrow one screen */
@media (min-width: 640px) { footer.closing { height: auto; min-height: 100svh; } }
/* Tour play button: floats and sends out a ring so it reads as tappable. */
.player .player__play { animation: play-float 3.2s ease-in-out infinite; }
.player__icon { position: relative; box-shadow: 0 14px 34px rgb(0 0 0 / .35); }
.player__icon::before, .player__icon::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--action); opacity: 0; animation: play-ring 2.4s ease-out infinite; pointer-events: none; }
.player__icon::after { animation-delay: 1.2s; }
.player .player__play:hover { animation-play-state: paused; }
@keyframes play-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes play-ring { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.7); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .player .player__play, .player__icon::before, .player__icon::after { animation: none; } }
/* Dark button on the pale video picture, so it stands out. */
.player__icon { background: var(--bg); color: #fff; }
.player__icon::before, .player__icon::after { border-color: var(--bg); }
.player .player__play > span:last-child { background: var(--bg); }
/* Once played, the frame opens to the whole 16:9 picture (the poster frame crops it). */
main > #tour:has(.is-open) { height: auto; }
#tour:has(.is-open) .fill { flex: none; }
.player.is-open { aspect-ratio: 16 / 9; width: min(100%, calc((100svh - 140px) * 16 / 9)); margin-inline: auto; background: #000; }
.player.is-open video { object-fit: contain; }
/* Terms and privacy: present but quiet. */
a.quiet-legal { margin-left: var(--s-3); font-size: 12px; color: var(--p-muted); opacity: .7; text-decoration: none; }
a.quiet-legal:hover { opacity: 1; text-decoration: underline; }
