/* Homepage and pricing only, loaded after site.css: product scenes, soft depth and plan cards.
   Same rules as everywhere: dashed is a preview, solid is live, magenta is live or the button that starts you. */

:root {
  --proof-pale: #eff7fb;
  --proof-deep: #b9dbea;
  --edge: 1px solid rgb(20 41 74 / 0.1);
  --lift: 0 1px 2px rgb(20 41 74 / 0.06), 0 0.75rem 1.5rem -0.75rem rgb(20 41 74 / 0.22);
  --text-ui: 0.875rem;
}

/* One quiet wash runs behind the header and the first section */
body { background: linear-gradient(transparent, var(--paper)) 0 0 / 100% 52rem no-repeat, radial-gradient(60rem 30rem at 85% 26rem, rgb(30 111 153 / 0.14), transparent) 0 0 / 100% 52rem no-repeat, linear-gradient(var(--proof) 0 0) 0 0 / 100% 52rem no-repeat; }
.site-header, .hero, .page-head { background: none; }
.page-head { padding-bottom: 1rem; }
.flow { margin-top: clamp(2rem, 3vw, 2.5rem); }
.flow figcaption { margin-top: 1.25rem; }
.close { background: linear-gradient(100deg, var(--proof) 40%, #c9e3ef); }

/* Shared pieces */
.panel { border: var(--edge); border-radius: 0.875rem; background: var(--paper); color: var(--ink); box-shadow: var(--lift); }
.bubble { width: fit-content; padding: 0.625rem 1rem; border-radius: var(--radius-bubble) var(--radius-bubble) 0.25rem; background: var(--ink); line-height: 1.4; }
.state { font-size: var(--text-ui); font-style: normal; font-weight: 600; white-space: nowrap; }
.state::before { content: ""; display: inline-block; width: 0.625rem; height: 0.625rem; margin-right: 0.375rem; border-radius: 50%; }
.state.live::before { background: var(--live); }
.state.preview { color: var(--pencil); }
.state.preview::before { border: 2px dashed var(--pencil); }
.state.offline { color: var(--ink-soft); }
.state.offline::before { border: 2px solid var(--ink-soft); }
.tag { display: inline-block; padding: 0.125rem 0.625rem; border-radius: 1rem; background: var(--ink); color: var(--paper); font-size: var(--text-ui); font-weight: 600; line-height: 1.5; white-space: nowrap; }
.frame { border-radius: 0.75rem; box-shadow: var(--lift); }
.frame-bar { align-items: center; padding: 0.5rem 0.75rem; background: var(--proof-pale); }
.frame-bar p:first-child { overflow: hidden; flex: 1; padding: 0.125rem 0.75rem; border: var(--edge); border-radius: 1rem; background: var(--paper); text-overflow: ellipsis; white-space: nowrap; }

/* Hero: the same four steps, lifted off the page. The live page lies on the earlier sheet */
.flow .message { box-shadow: var(--lift); }
.flow .frame-live { overflow: visible; box-shadow: 0.5rem 0.5rem 0 -2px var(--paper), 0.5rem 0.5rem 0 0 var(--proof-deep), var(--lift); }
.flow .frame-live .frame-bar { border-radius: 0.625rem 0.625rem 0 0; }

@media (prefers-reduced-motion: no-preference) {
  .flow .frame-live { animation: settle 1s 0.8s backwards; }
  .flow .frame-live .frame-state::before { animation: go-live 0.3s 1.5s backwards; }
}
@keyframes settle { 0%, 60% { border-style: dashed; border-color: var(--pencil); } }
@keyframes go-live { 0% { transform: scale(0); } }

/* How it works. The line is dashed until the client says yes */
#how { display: block; }
#how .steps { grid-template-columns: repeat(3, 1fr); grid-template-rows: auto auto auto 1fr; gap: 0 clamp(1.5rem, 3vw, 2.5rem); margin-top: var(--space-4); }
#how .steps li { display: grid; grid-row: span 4; grid-template-rows: subgrid; align-content: start; padding: 0; }
#how .steps li::before { position: static; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; margin-bottom: 1rem; border: 2px solid var(--ink); border-radius: 50%; font-size: var(--text-body); }
#how .steps li:first-child::before { border: 2px dashed var(--pencil); }
#how .steps li:not(:last-child)::after { content: ""; position: absolute; top: calc(1.25rem - 1px); left: 3.25rem; right: calc(0.75rem - clamp(1.5rem, 3vw, 2.5rem)); border-top: 2px solid var(--ink); }
#how .steps li:first-child::after { border-top: 2px dashed var(--pencil); }
.visual { display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; gap: 0.75rem; margin-top: 1.5rem; padding: 1.5rem; border-radius: 1rem; background: var(--proof); }
#how .visual p { max-width: none; margin-top: 0; color: inherit; }
#how .visual .frame-proof .frame-state { color: var(--pencil); }
#how .visual .who { color: var(--ink-soft); font-size: var(--text-small); }
#how .visual .bubble { justify-self: end; color: var(--paper); font-size: 1rem; }
#how .visual .yes { justify-self: start; border-radius: var(--radius-bubble) var(--radius-bubble) var(--radius-bubble) 0.25rem; border: var(--edge); background: var(--paper); color: var(--ink); }
.visual .tide { margin: 0; }
#how .visual .tide-title { margin-block: 0.75rem; padding-inline: 0.75rem; font-size: 1.375rem; }
.visual .tide img { margin: 0; aspect-ratio: 5 / 2; }
.ask { display: grid; gap: 0.75rem; padding: 1.25rem; }
.link-chip { width: fit-content; padding: 0.5rem 0.875rem; border: 2px dashed var(--pencil); border-radius: 0.625rem; font-size: var(--text-ui); line-height: 1.4; }
.link-chip b { display: block; color: var(--pencil); }
.versions .frame { overflow: visible; box-shadow: 0.5rem 0.5rem 0 -2px var(--paper), 0.5rem 0.5rem 0 0 var(--proof-deep), var(--lift); }
.versions .frame-bar { border-radius: 0.625rem 0.625rem 0 0; }
:is(.versions, .flow .frame-live) img { border-radius: 0 0 0.5rem 0.5rem; }

/* The pricing story: one headline at a reading measure, no cards */
.story { padding-block: calc(var(--space-section) + var(--space-4)); }
.story h2 { max-width: 15ch; font-size: var(--text-title); line-height: 1.04; letter-spacing: -0.04em; }
.story .lead { max-width: 62ch; margin-top: var(--space-4); }

/* One account, many clients */
.showcase { display: grid; grid-template-columns: 5fr 7fr; gap: var(--space-4) clamp(3rem, 7vw, 6rem); align-items: center; }
.showcase h2 { grid-column: 1 / -1; }
.showcase .points { grid-template-columns: 1fr; gap: 2rem; margin: 0; }
.dashboard { padding: 0.5rem 1.25rem; }
.dashboard li { display: grid; grid-template-columns: 3.5rem 1fr auto; align-items: center; gap: 0 1rem; padding-block: 0.875rem; line-height: 1.35; }
.dashboard li + li { border-top: 1px solid var(--rule); }
.dashboard :is(img, .thumb) { grid-row: 1 / 3; width: 3.5rem; height: 2.75rem; border-radius: 0.375rem; object-fit: cover; }
.thumb { display: grid; place-items: center; background: var(--proof); font-style: normal; font-weight: 600; }
.dashboard span { grid-row: 2; grid-column: 2; color: var(--ink-soft); font-size: var(--text-ui); overflow-wrap: anywhere; }
.dashboard .state { grid-area: 1 / 3 / 3 / 4; }

/* Translated homepages: send a request and the page changes */
.demo { display: grid; grid-template-columns: 7fr 5fr; gap: 2rem clamp(2rem, 4vw, 4rem); align-items: start; margin-top: var(--space-4); }
.bakery { padding: 1rem; }
.bakery p { padding: 0; }
.bakery-head, .bakery-head span, .bakery li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0 1rem; }
.bakery .tide-title { margin: 0; }
.bakery > * + * { margin-top: 1rem; }
.bakery-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 2rem; }
.bakery li { padding-block: 0.375rem; border-bottom: 1px solid var(--rule); }
.bakery .banner { padding: 0.75rem; }
.bakery :is(.banner, .sun-new), .bakery .special-new { background: var(--proof); }
.demo:not(:has(#ask-1:checked)) .sun-new, .demo:has(#ask-1:checked) .sun-old, .demo:not(:has(#ask-2:checked)) .special-new, .demo:not(:has(#ask-3:checked)) .banner { display: none; }
.requests { display: grid; gap: 0.75rem; }
.requests label { position: relative; margin: 0; padding: 0.75rem 1rem; border: 1px solid var(--ink-soft); border-radius: var(--radius-bubble) var(--radius-bubble) 0.25rem; background: var(--paper); font-weight: 400; line-height: 1.4; cursor: pointer; }
.requests label:hover { border-color: var(--ink); }
.requests label:has(:checked) { background: var(--ink); color: var(--paper); }
.requests label:has(:focus-visible) { outline: 3px solid var(--ink); outline-offset: 4px; }
.requests input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.requests .done { display: block; margin-top: 0.25rem; font-size: var(--text-small); }
.requests input:not(:checked) ~ .done { display: none; }

/* Homepage prices. The bars are on a logarithmic scale */
#pricing .price-table { padding: 1rem 1.5rem 0.5rem; border: var(--edge); border-radius: 1.125rem; border-collapse: separate; border-spacing: 0; background: var(--paper); box-shadow: var(--lift); }
#pricing thead th:nth-child(2) { width: 30%; }
#pricing .tag { color: var(--paper); }
.bar { display: block; height: 0.375rem; margin-top: 0.375rem; border-radius: 1rem; background: var(--pencil); }
.bar-10 { width: 37%; }
.bar-30 { width: 55%; }
.bar-100 { width: 74%; }
.bar-500 { width: 100%; }

/* Two answers as pictures: the client's other addresses stay put, and a page can be locked */
#faq { grid-template-rows: auto 1fr; gap: 2rem clamp(3rem, 7vw, 6rem); }
#faq .questions { grid-area: 1 / 2 / 3 / 3; }
.aside { display: grid; align-content: start; gap: 2rem; max-width: 24rem; font-size: var(--text-small); }
.addresses li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.75rem 1rem; border: 1px solid var(--rule); border-bottom: 0; }
.addresses li:first-child { border-radius: 0.75rem 0.75rem 0 0; }
.addresses b { font-weight: 400; }
.addresses span { color: var(--ink-soft); font-size: var(--text-ui); }
.addresses li:last-child { border: 2px solid var(--ink); border-radius: 0 0 0.75rem 0.75rem; }
.addresses li:last-child b { font-weight: 600; }
.lock { display: grid; grid-template-columns: 1fr auto; gap: 0.5rem; padding: 1rem; }
.lock p:first-child { grid-column: 1 / -1; }
.lock .code { padding: 0.5rem 0.75rem; border: 1px solid var(--ink-soft); border-radius: var(--radius); color: var(--ink-soft); }
.lock .go { padding: 0.5rem 0.875rem; border-radius: var(--radius); background: var(--ink); color: var(--paper); font-weight: 600; }

/* Plan finder */
#fit { align-self: center; padding: 2rem; border-radius: 1.125rem; }
#fit output { display: block; min-height: calc(var(--leading) * 1em); font-weight: 600; }
#fit output.is-hint { font-weight: 400; color: var(--ink-soft); }
/* Keeps the finder's place until plan.js shows it, so the plans do not jump */
@media (scripting: enabled) { #fit[hidden] { display: block !important; visibility: hidden; } }

/* The 3-month trial: a proof, dashed like a preview, next to the plans it turns into */
#pilot { padding-top: var(--space-4); }
.pilot { display: grid; grid-template-columns: 5fr 7fr; gap: var(--space-3) clamp(3rem, 7vw, 6rem); padding: clamp(1.5rem, 4vw, 3rem); border: 2px dashed var(--pencil); border-radius: 1.125rem; background: var(--proof); }
.pilot h2 { font-size: var(--text-sub); line-height: 1.3; letter-spacing: 0; }
.pilot-line { margin-top: 0.75rem; color: var(--pencil); font-size: var(--text-lead); font-weight: 600; line-height: 1.4; }
.pilot p + p { margin-top: 1rem; }
.pilot .actions { margin-top: var(--space-3); }

/* Plans: every sheet holds exactly as many pages as the plan has sites */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; margin-top: var(--space-4); }
.plan { --page: var(--pencil); --blank: var(--proof); --ground: var(--paper); display: grid; grid-template-columns: 1fr auto; align-content: start; align-items: center; column-gap: 1rem; padding: 2rem; border: var(--edge); border-radius: 1.125rem; background: var(--ground); box-shadow: var(--lift); }
.plan > :not(h3, .tag) { grid-column: 1 / -1; }
.plan .price { margin-top: 0.5rem; line-height: 1.4; }
.plan .price b { font-size: 3rem; font-weight: 600; line-height: 1.1; letter-spacing: -0.04em; }
.plan .price > span { display: block; }
.plan :is(.price span, .where) { color: var(--ink-soft); font-size: var(--text-small); }
.plan .price .tax { display: inline; }
.plan .total { margin-top: 0.25rem; font-weight: 600; }
.plan .sites { font-weight: 600; }
.plan h3 { white-space: nowrap; }
.plan .tag { background: var(--proof); color: var(--ink); white-space: normal; }
.plan .fit-tag { background: var(--pencil); color: var(--paper); }
.plan.fits .tag:not(.fit-tag) { display: none; }
.plan-pick { --page: var(--proof); --blank: #35507a; --ground: var(--ink); color: var(--paper); }
.plan-pick :is(.price span, .where, .tax) { color: var(--proof); }
.plan.fits { outline: 3px solid var(--pencil); outline-offset: 3px; }
.plan-pick.fits { outline: none; }
.plan-pick.fits .tag:not(.fit-tag) { display: inline-block; }
.plan-pick.fits .fit-tag { display: none; }
.plans > .plan-larger { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 2rem; padding-block: 1rem; background: var(--proof-pale); }
.plan-larger .text-link { margin-left: auto; }

/* plan.js sets how many pages are printed: --full rows, then --part pages of the next row */
.sheet {
  width: calc(var(--cols) * var(--w));
  height: calc(var(--rows) * var(--h));
  margin-block: 1.5rem 1rem;
  background:
    linear-gradient(to left, var(--ground) var(--gap), transparent 0) 0 0 / var(--w) 100%,
    linear-gradient(to top, var(--ground) var(--gap), transparent 0) 0 0 / 100% var(--h),
    linear-gradient(var(--page) 0 0) 0 0 / 100% calc(var(--full, var(--rows)) * var(--h)) no-repeat,
    linear-gradient(var(--page) 0 0) 0 calc(var(--full, 0) * var(--h)) / calc(var(--part, 0) * var(--w)) var(--h) no-repeat,
    var(--blank);
}
.sheet-10 { --cols: 5; --rows: 2; --w: 30px; --h: 40px; --gap: 3px; }
.sheet-30 { --cols: 10; --rows: 3; --w: 20px; --h: 27px; --gap: 3px; }
.sheet-100 { --cols: 20; --rows: 5; --w: 12px; --h: 16px; --gap: 2px; }
.sheet-500 { --cols: 50; --rows: 10; --w: 6px; --h: 8px; --gap: 2px; }

/* The same plans at a glance */
#plans .price-table { position: relative; margin-top: var(--space-4); }
#plans .price-table caption { position: static; width: auto; height: auto; clip-path: none; padding: 0 0.75rem 0.5rem; color: var(--ink-soft); font-size: var(--text-small); text-align: left; }
#plans .price-table tr:not(.group) > * { height: 3rem; padding-block: 0.25rem; }
#plans .price-table .text-link { padding-block: 0.375rem; }

/* Plan rules in pages: one waiting outside a full plan, two offline but still there */
.slots { display: flex; gap: 0.375rem; margin-top: 1.5rem; }
.slots i { flex: 0 1 2.25rem; height: 3rem; border-radius: 0.1875rem; background: var(--proof); }
.slots .off { border: 2px solid var(--proof); background: none; }
.slots .waiting { margin-left: 1rem; border: 2px dashed var(--proof-deep); background: none; }


@media (max-width: 50rem) and (min-width: 40.01rem) {
  .sheet-100 { --w: 10px; --h: 13px; }
  .sheet-500 { --w: 5px; --h: 7px; }
}

@media (max-width: 859.98px) {
  .pilot { grid-template-columns: 1fr; }
  #how .steps, .showcase { grid-template: none; }
  .demo { grid-template-columns: 1fr; }
  #how .steps { gap: 2.5rem; }
  #how .steps li { grid-template: auto / auto 1fr; grid-row: auto; gap: 0 0.75rem; align-items: center; }
  #how .steps li::before { width: 2rem; height: 2rem; margin: 0; }
  #how .steps li::after { content: none !important; }
  #how .steps li > :not(h3) { grid-column: 1 / -1; }
  .visual { max-width: 30rem; margin-top: 1rem; }
  #faq { grid-template-rows: none; }
  #faq .questions { grid-area: auto; }
}

/* Phones: one column, text then scene, nothing on top of anything else */
@media (max-width: 40rem) {
  .story { padding-block: calc(var(--space-section) + var(--space-2)); }
  .flow { margin-top: 2rem; }
  .flow ol { gap: 0.875rem; }
  .flow .reply { margin-top: 0; justify-self: end; }
  .flow .tide img { aspect-ratio: 3 / 1; }
  .bakery-cols { grid-template-columns: 1fr; }
  .visual { padding: 1rem; }
  .visual .tide img { aspect-ratio: 4 / 1; }
  .showcase .points { gap: 1.5rem; }
  .dashboard { padding: 0.25rem 1rem; }
  .dashboard li { padding-block: 0.625rem; }
  #pricing .price-table { padding: 0.5rem; }
  :is(#pricing, #plans) .price-table thead th { white-space: normal; }
  #pricing .price-table tbody tr:not(.group) > * { height: 3.25rem; padding-block: 0.625rem; }
  #plans .split { gap: 1.5rem; }
  #fit { padding: 1.5rem; }
  #fit output { min-height: calc(var(--leading) * 2em); }
  .plans { grid-template-columns: minmax(0, 1fr); gap: var(--space-2); }
  .plan { padding: 1.5rem; }
  .plan:not(.plan-larger) { grid-template-columns: minmax(0, 1fr); justify-items: start; align-items: start; }
  .plan:not(.plan-larger) > :is(h3, .tag, .sites) { grid-column: 1; }
  .plan .total { font-size: var(--text-small); }
  .plan .price > span { display: inline; }
  .plan .price b { font-size: 2rem; }
  .sheet { order: 1; margin-block: 0.75rem 0.25rem; }
  .sheet-10 { --w: 14px; --h: 12px; --gap: 2px; }
  .sheet-30 { --w: 11px; --h: 8px; --gap: 2px; }
  .sheet-100 { --w: 7px; --h: 5px; --gap: 1px; }
  .sheet-500 { --w: 5px; --h: 4px; --gap: 1px; }
  #plans .price-table tr:not(.group) > * { height: 2.75rem; }
  :is(#pricing, #plans) .price-table td span { display: inline; }
  :is(#pricing, #plans) .price-table tbody tr:not(.group) > :last-child { white-space: normal; }
  #plans .price-table caption { padding-inline: 0.5rem; }
}

@media (max-width: 23rem) {
  .sheet-500 { --w: 4px; }
  :is(#pricing, #plans) .price-table .tax { white-space: normal; }
  .price-table .tag { padding-inline: 0.375rem; font-size: 0.75rem; }
}
