/* Quillnest public pages (home, features, pricing). Same press-sheet world as the app, set for persuading:
   a white sheet on a cool room, a black rail band, four process inks. Tokens come from app.css. */

.lp { background: var(--paper); }
.lp-wrap { width: min(1120px, 100% - 2 * clamp(16px, 4vw, 40px)); margin-inline: auto; }
.lp-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lp h1, .lp h2, .lp h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; margin: 0; }
.lp h1 { font-size: clamp(36px, 5.4vw, 66px); line-height: 1.05; }
.lp h2 { font-size: clamp(27px, 3.2vw, 40px); line-height: 1.12; }
.lp h3 { font-size: 21px; line-height: 1.2; }
.lp p { margin: 0; }
.lp-lede { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; color: var(--ink-2); max-width: 56ch; }
.lp .btn.lg { padding: 12px 22px; font-size: 16px; }
.lp-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.lp-fine, .lp-note { font-size: 14px; color: var(--ink-3); }
.lp-link { font-weight: 650; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.lp kbd { font: 600 12.5px var(--font); padding: 1px 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; background: var(--sheet); }

/* header and footer */
.lp-head { background: var(--rail); color: var(--rail-ink); position: sticky; top: 0; z-index: 30; }
.lp-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.lp-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font: 700 21px var(--font); letter-spacing: -0.01em; }
.lp-brand .qn-logo { width: 32px; height: 32px; color: var(--rail-ink); }
.lp-nav { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 28px); font-weight: 600; font-size: 15px; }
.lp-nav a:not(.btn) { text-decoration: none; padding: 6px 2px; border-bottom: 2px solid transparent; }
.lp-nav a:not(.btn):hover, .lp-nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.lp-head :focus-visible, .lp-foot :focus-visible, .lp-close :focus-visible, .lp-rail :focus-visible { outline-color: var(--accent); }
.lp-foot { background: var(--rail); color: var(--rail-ink); padding-block: 34px; margin-top: 0; }
.lp-foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.lp-foot-brand { display: flex; align-items: center; gap: 10px; font: 700 18px var(--font); }
.lp-foot-brand .qn-logo { width: 26px; height: 26px; color: var(--rail-ink); }
.lp-foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14.5px; }
.lp-foot a { color: #c3cad0; }
.lp-foot a:hover { color: #fff; }

/* hero: a sheet with crop marks beside the headline */
.lp-hero { padding-block: clamp(40px, 7vw, 96px); }
.lp-hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.lp-hero-copy { display: grid; gap: 22px; }
.lp-sheet { position: relative; margin: 0; padding: 22px clamp(16px, 2.4vw, 28px) 10px; background: var(--sheet); border: 1px solid var(--line); }
.lp-sheet::before, .lp-sheet::after, .lp-sheet figcaption::before, .lp-sheet figcaption::after {
  content: ""; position: absolute; width: 14px; height: 14px; border: 0 solid var(--ink-3); pointer-events: none; }
.lp-sheet::before { top: -9px; left: -9px; border-right-width: 1px; border-bottom-width: 1px; }
.lp-sheet::after { top: -9px; right: -9px; border-left-width: 1px; border-bottom-width: 1px; }
.lp-sheet figcaption::before { bottom: -9px; left: -9px; border-right-width: 1px; border-top-width: 1px; }
.lp-sheet figcaption::after { bottom: -9px; right: -9px; border-left-width: 1px; border-top-width: 1px; }
.lp-sheet figcaption { font-size: 13px; font-weight: 600; color: var(--ink-3); padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.lp-rows { list-style: none; margin: 0; padding: 0; }
.lp-rows li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.lp-rows li:last-child { border-bottom: 0; }
.lp-row-main { display: grid; min-width: 0; }
.lp-row-main b { font-weight: 650; }
.lp-row-main small { color: var(--ink-3); font-size: 13.5px; overflow-wrap: anywhere; }
.lp-due { font-size: 13.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.lp-due.is-late { color: var(--signal); }

/* the four inks: whole fields of colour */
.lp-inks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.lp-ink { padding: clamp(24px, 3.4vw, 44px) clamp(18px, 2.4vw, 32px); display: grid; align-content: start; gap: 10px; }
.lp-ink p { font-size: 15.5px; line-height: 1.5; max-width: 30ch; }
.lp-ink-you { background: #d6176f; color: #fff; }
.lp-ink-them { background: #0a8fc4; color: #07121a; }
.lp-ink-date { background: #f2b01e; color: #1a1300; }
.lp-ink-done { background: #14171a; color: #eef1f3; }

/* sections */
.lp-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; padding-block: clamp(56px, 8vw, 112px); }
.lp-split > div:first-child, .lp-feature-text { display: grid; gap: 18px; align-content: start; }
.lp-split p, .lp-feature-text p { color: var(--ink-2); max-width: 54ch; font-size: 16.5px; line-height: 1.6; }
.lp-rail { background: var(--rail); color: var(--rail-ink); }
.lp-rail p { color: #c3cad0; }
.lp-rail .lp-split, .lp-rail .lp-feature { padding-block: clamp(56px, 8vw, 104px); }
.lp-rail .lp-feature-text p, .lp-rail .lp-checks { color: #c3cad0; }

.lp-tree, .lp-tree ol { list-style: none; margin: 0; padding: 0; }
.lp-tree { font-size: 17px; }
.lp-tree ol { margin: 10px 0 0 22px; padding-left: 20px; border-left: 1px solid var(--line-2); }
.lp-tree li { margin-top: 12px; }
.lp-tree li > b { display: block; font: 600 22px var(--serif); letter-spacing: -0.01em; }
.lp-tree ol li > b { font-size: 19px; }
.lp-tree ol ol li > b { font-size: 16.5px; font-family: var(--font); font-weight: 650; }
.lp-tree small { display: block; color: var(--ink-3); font-size: 14px; }

.lp-views { display: grid; gap: 14px; }
.lp-view { background: #1f2327; padding: 18px 20px; }
.lp-view-who { font-size: 13px; font-weight: 700; color: #c3cad0 !important; margin-bottom: 8px !important; }
.lp-msg { display: grid; gap: 4px; background: #fff; color: #14171a; padding: 12px 14px; border-top: 3px solid var(--accent); }
.lp-msg b { font-size: 14px; }
.lp-msg span { font-size: 15px; color: #454c53; }

.lp-three, .lp-defs-wrap { padding-block: clamp(48px, 7vw, 96px); display: grid; gap: 28px; }
.lp-defs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(20px, 3vw, 44px); margin: 0; }
.lp-defs > div { padding-block: 18px; border-top: 2px solid var(--ink); }
.lp-defs dt { font: 600 21px/1.2 var(--serif); letter-spacing: -0.01em; margin-bottom: 8px; }
.lp-defs dd { margin: 0; color: var(--ink-2); line-height: 1.55; max-width: 46ch; }
.lp-defs-wide > div:nth-child(n+4) { grid-column: auto; }

.lp-feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; padding-block: clamp(48px, 7vw, 96px); }
.lp-feature-flip .lp-views { order: -1; }
.lp-checks { margin: 0; padding-left: 20px; display: grid; gap: 10px; color: var(--ink-2); line-height: 1.55; }
.lp-checks li::marker { color: var(--accent-text); }

.lp-pagehead { padding-block: clamp(44px, 7vw, 88px) clamp(12px, 2vw, 24px); }
.lp-pagehead .lp-wrap { display: grid; gap: 20px; }
.lp-pagehead h1 { max-width: 20ch; }

/* pricing */
.lp-table-wrap { overflow-x: auto; margin-block: 28px 18px; }
.lp-plans { width: 100%; border-collapse: collapse; background: var(--sheet); border: 1px solid var(--line); min-width: 560px; }
.lp-plans thead th { font: 600 24px var(--serif); text-align: left; padding: 18px 20px; border-bottom: 2px solid var(--ink); }
.lp-plans tbody th { text-align: left; font-weight: 600; color: var(--ink-2); padding: 16px 20px; width: 26%; }
.lp-plans td, .lp-plans thead th:not(:first-child) { text-align: left; } .lp-plans td { padding: 16px 20px; font-weight: 650; font-size: 17px; font-variant-numeric: tabular-nums; }
.lp-plans tbody tr { border-bottom: 1px solid var(--line); }
.lp-plans tbody tr:last-child { border-bottom: 0; }
.lp-plans tbody tr:last-child td { font-weight: 500; color: var(--ink-2); font-size: 15px; }
.lp-note { margin-bottom: 20px !important; max-width: 70ch; }
.lp-faq { display: grid; gap: 8px; padding-block: clamp(40px, 6vw, 80px); max-width: 820px; margin-inline: auto; }
.lp-faq h2 { margin-bottom: 14px; }
.lp-faq details { border-top: 1px solid var(--line-2); padding-block: 4px; }
.lp-faq details:last-of-type { border-bottom: 1px solid var(--line-2); }
.lp-faq summary { cursor: pointer; padding: 14px 4px; font-weight: 650; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--ink-3); }
.lp-faq details[open] summary::after { content: "\2212"; }
.lp-faq details p { padding: 0 4px 16px; color: var(--ink-2); line-height: 1.6; max-width: 62ch; }

/* closing band */
.lp-close { background: var(--rail); color: var(--rail-ink); padding-block: clamp(56px, 8vw, 104px); }
.lp-close .lp-wrap { display: grid; gap: 20px; justify-items: start; }
.lp-close h2 { max-width: 22ch; font-size: clamp(30px, 4vw, 50px); }
.lp-close p:not(.lp-actions) { color: #c3cad0; max-width: 58ch; font-size: 17px; line-height: 1.6; }
.lp-close .btn:not(.primary) { background: transparent; color: #fff; border-color: #5a626a; }
.lp-close .btn:not(.primary):hover { border-color: #fff; }

/* one authored moment: the bar fills in once on load */
@media (prefers-reduced-motion: no-preference) {
  .lp-hero .lp-rows li .press i.on { animation: lp-ink .5s var(--ease) both; }
  .lp-hero .lp-rows li:nth-child(2) .press i.on { animation-delay: .08s; }
  .lp-hero .lp-rows li:nth-child(3) .press i.on { animation-delay: .16s; }
  .lp-hero .lp-rows li:nth-child(4) .press i.on { animation-delay: .24s; }
  .lp-hero .lp-rows li:nth-child(5) .press i.on { animation-delay: .32s; }
}
@keyframes lp-ink { from { transform: scaleY(0); transform-origin: bottom; } to { transform: scaleY(1); transform-origin: bottom; } }

@media (max-width: 900px) {
  .lp-hero-grid, .lp-split, .lp-feature { grid-template-columns: minmax(0, 1fr); }
  .lp-feature-flip .lp-views { order: 0; }
  .lp-inks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-defs { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .lp-bar { flex-wrap: wrap; padding-block: 10px; }
  .lp-nav { gap: 14px; font-size: 14px; flex-wrap: wrap; }
  .lp-nav .btn { padding: 7px 12px; }
  .lp-inks { grid-template-columns: minmax(0, 1fr); }
  .lp-rows li { grid-template-columns: auto minmax(0, 1fr); }
  .lp-due { grid-column: 2; }
}

/* ── saas only: the home page as one story (hero, hook, turn, eight chapters, end) and the plan cards.
   Every class here starts with sq- so it can sit beside main's own story block in a later merge. ─────────── */
.lp main { overflow-x: clip; }                       /* sliding reveals never widen the page */
.lp .btn.lg, .sq-cta { min-height: 48px; justify-content: center; }
.lp-nav a:not(.btn) { min-height: 44px; display: inline-flex; align-items: center; }
.lp-nav .btn { min-height: 44px; }
.lp-actions { align-items: center; }
.sq-alt { font-weight: 650; font-size: 15.5px; color: var(--ink-2); text-underline-offset: 4px; text-decoration-color: var(--accent); min-height: 48px; display: inline-flex; align-items: center; }
.sq-alt:hover { color: var(--ink); }
.lp-close .sq-alt { color: #c3cad0; }
.lp-close .sq-alt:hover { color: #fff; }

.sq-kicker { display: flex; align-items: center; gap: 10px; font: 700 13px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }
.sq-kicker span { display: inline-grid; place-items: center; width: 28px; height: 28px; background: var(--accent); color: var(--on-accent); letter-spacing: 0; font-variant-numeric: tabular-nums; }

/* the hook: the mess, on the black rail */
.sq-hook { background: var(--rail); color: var(--rail-ink); padding-block: clamp(56px, 8vw, 104px); }
.sq-hook-grid, .sq-turn-grid, .sq-ch-grid, .sq-end-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.sq-hook-copy, .sq-ch-copy, .sq-end-copy, .sq-turn-grid > div { display: grid; gap: 18px; align-content: start; }
.sq-hook-copy p:not(.sq-kicker) { color: #c3cad0; font-size: 17px; line-height: 1.6; max-width: 54ch; }
.sq-hook .sq-kicker { color: var(--accent); }
.sq-pile { margin: 0; display: grid; gap: 10px; }
.sq-scrap { display: grid; gap: 2px; background: #fff; color: #14171a; padding: 12px 16px; border-left: 4px solid #d6176f; max-width: 30rem; }
.sq-scrap:nth-child(odd) { transform: rotate(-1deg); margin-left: 4%; }
.sq-scrap:nth-child(even) { transform: rotate(.8deg); }
.sq-scrap:nth-child(2) { border-left-color: #f2b01e; }
.sq-scrap:nth-child(4) { border-left-color: #0a8fc4; }
.sq-scrap small { font-size: 12.5px; color: #59616a; font-weight: 600; }
.sq-scrap b { font-weight: 650; overflow-wrap: anywhere; }

/* the turn, and its index of chapters */
.sq-turn { padding-block: clamp(56px, 8vw, 104px) clamp(24px, 4vw, 48px); }
.sq-turn p { color: var(--ink-2); font-size: 17px; line-height: 1.6; max-width: 54ch; }
.sq-index { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; border-top: 2px solid var(--ink); }
.sq-index a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 4px; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 650; }
.sq-index a:hover { background: var(--brand-soft); }
.sq-index a span { display: inline-grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--line-2); font-size: 13px; font-variant-numeric: tabular-nums; }

/* a chapter: words one side, the vignette the other, alternating. Off-screen chapters skip rendering. */
.sq-ch { padding-block: clamp(48px, 7vw, 96px); border-top: 1px solid var(--line); content-visibility: auto; contain-intrinsic-size: auto 620px; scroll-margin-top: 72px; }
.sq-ch-copy p:not(.sq-kicker) { color: var(--ink-2); font-size: 16.5px; line-height: 1.6; max-width: 52ch; }
.sq-flip .sq-fig { order: -1; }
.sq-fig { padding-bottom: 22px; }
.sq-fig > figcaption { margin-bottom: 16px; }
.sq-mock { display: inline-flex; align-items: center; justify-self: start; width: fit-content; padding: 7px 14px; font-weight: 700; font-size: 14px; background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent); }
.sq-mock.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); font-weight: 600; }
.sq-box { display: inline-block; flex: none; width: 18px; height: 18px; border: 2px solid var(--line-2); }
.sq-box.is-on { background: var(--ok); border-color: var(--ok); box-shadow: inset 0 0 0 3px var(--sheet); }

.sq-mail { display: grid; border: 1px solid var(--line); }
.sq-mail-from { display: grid; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.sq-mail-from small { color: var(--ink-3); font-size: 13px; overflow-wrap: anywhere; }
.sq-mail-rail { display: flex; align-items: center; gap: 10px; background: #14171a; color: #fff; padding: 10px 14px; border-top: 4px solid #2f8f7b; font-weight: 700; }
.sq-mail-logo { display: inline-grid; place-items: center; width: 28px; height: 28px; background: #2f8f7b; color: #fff; font: 700 15px var(--serif); }
.sq-mail-body { display: grid; gap: 12px; padding: 16px 14px; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.sq-mail-title { font: 600 21px var(--serif); color: var(--ink); }
.sq-sign { font-weight: 650; color: var(--ink); }
.sq-sign small { font-weight: 500; color: var(--ink-3); }

.sq-agree { display: grid; gap: 14px; }
.sq-agree-title { display: grid; }
.sq-agree-title small, .sq-field small { color: var(--ink-3); font-size: 13px; }
.sq-lines { display: grid; gap: 7px; }
.sq-lines i { display: block; height: 7px; background: var(--line); }
.sq-lines i:nth-child(2) { width: 92%; }
.sq-lines i:nth-child(3) { width: 96%; }
.sq-lines i:nth-child(4) { width: 60%; }
.sq-check { display: flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 600; }
.sq-field { display: grid; gap: 4px; }
.sq-field span { border: 1px solid var(--line-2); padding: 8px 10px; font: italic 600 17px var(--serif); }
.sq-audit { margin: 0; display: grid; gap: 4px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; }
.sq-audit div { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.sq-audit dt { font-weight: 700; }
.sq-audit dd { margin: 0; color: var(--ink-3); }

.sq-file { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.sq-thumb { display: grid; place-items: center; width: 52px; height: 66px; background: #14171a; border: 1px solid var(--line-2); }
.sq-thumb i { width: 60%; height: 40%; background: linear-gradient(#f2b01e 0 40%, #fff 40% 52%, #d6176f 52%); }
.sq-file-main { display: grid; min-width: 0; }
.sq-file-main small { color: var(--ink-3); font-size: 13px; }
.sq-versions { list-style: none; margin: 14px 0 0; padding: 10px 0 0; border-top: 1px dashed var(--line-2); display: grid; gap: 8px; font-size: 14px; color: var(--ink-2); }
.sq-versions li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.sq-versions span { font-weight: 700; font-size: 12px; padding: 1px 6px; border: 1px solid var(--line-2); }
.sq-versions small { color: var(--ink-3); }

.sq-chat { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sq-bubble { display: grid; gap: 2px; max-width: 86%; padding: 10px 12px; background: var(--brand-soft); font-size: 14.5px; line-height: 1.5; }
.sq-bubble b { font-size: 13px; }
.sq-bubble.is-team { justify-self: end; background: var(--sheet); border: 1px solid var(--line); border-top: 3px solid var(--accent); }
.sq-at { font-weight: 700; color: var(--accent-text); }

.sq-approve, .sq-deliver { display: grid; gap: 12px; }
.sq-approve-head, .sq-deliver-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; }
.sq-approve-head small { color: var(--ink-3); font-size: 13px; }
.sq-dels { list-style: none; margin: 0; padding: 0; display: grid; }
.sq-dels li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.sq-dels small { margin-left: auto; color: var(--ink-3); font-weight: 500; font-size: 13px; }
.sq-dels.is-done small { color: var(--ok); font-weight: 700; }
.sq-note { font-style: italic; color: var(--ink-2); font-size: 14.5px; }
.sq-mocks { display: flex; flex-wrap: wrap; gap: 8px; }
.sq-chip { font-size: 12.5px; font-weight: 700; padding: 2px 8px; background: #17724a; color: #fff; }
.sq-progress { height: 8px; background: var(--p-off); }
.sq-progress i { display: block; height: 100%; width: 100%; background: var(--ok); }
.sq-progress-label { font-size: 13.5px; color: var(--ink-3); font-weight: 600; }
.sq-fig .lp-tree { margin-top: 4px; }

/* interactive vignettes: local "try it" demos (site.js). JS-only controls are rendered hidden. */
.sq-fig [hidden] { display: none !important; }
.sq-try { display: inline-block; margin-left: 6px; padding: 1px 7px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--accent); color: var(--on-accent); vertical-align: 1px; }
.sq-btn, .sq-reset, .sq-chip-btn, .sq-bell { min-height: 44px; border-radius: 0; box-shadow: none; }
.sq-btn { padding: 8px 16px; font-weight: 700; background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent); }
.sq-btn:hover { background: color-mix(in srgb, var(--accent) 86%, black); border-color: color-mix(in srgb, var(--accent) 86%, black); color: var(--on-accent); }
.sq-btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); font-weight: 600; }
.sq-btn.ghost:hover { border-color: var(--ink-3); background: transparent; }
.sq-btn:disabled { opacity: .45; cursor: not-allowed; }
.sq-reset { justify-self: start; width: fit-content; padding: 0 2px; background: none; border: 0; color: var(--ink-2); font-weight: 650; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.sq-reset:hover { color: var(--ink); background: none; }
.sq-fig input[type="text"] { min-height: 44px; width: 100%; min-width: 0; padding: 8px 10px; font: inherit; font-size: 16px; color: var(--ink); background: var(--sheet); border: 1px solid var(--line-2); border-radius: 0; }
.sq-fig input[type="checkbox"] { width: 20px; height: 20px; margin: 0; accent-color: var(--ok); }
.sq-fig label.sq-check { min-height: 44px; cursor: pointer; }
.sq-demo-field { display: grid; gap: 4px; margin-bottom: 14px !important; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.sq-send { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 12px; }
.sq-send input.has-at { border-color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.sq-nudge { margin-top: 12px !important; font-size: 14.5px; color: var(--ink-2); }
.sq-state { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.sq-stamp { justify-self: start; padding: 4px 10px; border: 2px solid var(--ok); color: var(--ok); font-weight: 700; font-size: 14px; transform: rotate(-1.5deg); }
.sq-kept, .sq-fine { font-size: 13px; color: var(--ink-3); }
.sq-approve .sq-bubble { max-width: none; }
.sq-signed { display: grid; gap: 4px; padding: 10px 0; border-top: 1px solid var(--line); }
.sq-sigline { font: italic 600 24px var(--serif); border-bottom: 1px solid var(--ink); padding-bottom: 2px; overflow-wrap: anywhere; }
.sq-signed small { color: var(--ink-3); font-size: 12.5px; }
.sq-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px !important; }
.sq-chip-btn { padding: 6px 12px; font-size: 14px; font-weight: 650; background: transparent; color: var(--ink-2); border: 1px solid var(--line-2); }
.sq-chip-btn[aria-pressed="true"] { background: var(--ink); color: var(--sheet); border-color: var(--ink); }
.sq-thumb[data-v="2"] i { background: linear-gradient(#0a8fc4 0 40%, #fff 40% 52%, #d6176f 52%); }
.sq-thumb[data-v="1"] i { background: linear-gradient(#c6ccd1 0 40%, #fff 40% 52%, #59616a 52%); }
.sq-bellbox { margin-bottom: 12px; }
.sq-bell { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; background: var(--sheet); color: var(--ink); border: 1px solid var(--line-2); font-weight: 650; }
.sq-bell svg { width: 20px; height: 20px; }
.sq-count { min-width: 22px; padding: 1px 6px; background: #b0125c; color: #fff; font-size: 12.5px; font-weight: 700; text-align: center; }
.sq-bell.is-read .sq-count { background: var(--p-off); color: var(--ink-2); }
.sq-menu { list-style: none; margin: 8px 0 0; padding: 0; border: 1px solid var(--line-2); background: var(--raised); box-shadow: var(--e3); }
.sq-menu li { display: grid; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.sq-menu li:last-child { border-bottom: 0; }
.sq-menu li.is-new { box-shadow: inset 4px 0 0 var(--p-you); font-weight: 600; }
.sq-menu small { color: var(--ink-3); font-size: 12.5px; }
@media (prefers-reduced-motion: no-preference) {
  .sq-stamp:not([hidden]), .sq-kept:not([hidden]), .sq-signed:not([hidden]), .sq-menu:not([hidden]), .sq-approve .sq-bubble:not([hidden]) { animation: sq-pop .35s var(--ease) both; }
}
@keyframes sq-pop { from { opacity: 0; transform: translateY(6px); } }

/* the mid-story reminder */
.sq-mid { background: var(--sheet); border-block: 1px solid var(--line); padding-block: 20px; }
.sq-mid-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; }
.sq-mid-row p { font: 600 clamp(19px, 2vw, 23px) var(--serif); }

/* legal pages (/terms/, /privacy/, /refunds/): a long read with a contents list beside it */
.sq-foot-legal { flex-basis: 100%; padding-top: 14px; border-top: 1px solid #2a2f34; font-size: 13.5px !important; }
.sq-legal-head .lp-wrap { gap: 14px; }
.sq-legal-meta { color: var(--ink-3); font-size: 15px; }
.sq-legal-switch { display: flex; flex-wrap: wrap; gap: 4px 20px; font-weight: 650; font-size: 15px; }
.sq-legal-switch a { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; border-bottom: 2px solid transparent; }
.sq-legal-switch a:hover, .sq-legal-switch a[aria-current="page"] { border-bottom-color: var(--accent); }
.sq-legal-grid { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; padding-block: 12px clamp(56px, 8vw, 96px); }
.sq-toc { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; font-size: 14.5px; }
.sq-toc h2 { font: 700 13px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.sq-toc ol { margin: 0; padding-left: 22px; display: grid; gap: 2px; color: var(--ink-3); }
.sq-toc li { padding: 4px 0; line-height: 1.4; }
.sq-toc a { text-decoration: none; color: var(--ink-2); }
.sq-toc a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); }
.sq-doc { max-width: 72ch; min-width: 0; font-size: 16.5px; line-height: 1.7; color: var(--ink-2); }
.sq-doc section { padding-top: 28px; scroll-margin-top: 80px; }
.sq-doc h2 { font-size: clamp(22px, 2.4vw, 27px); color: var(--ink); margin-bottom: 12px; }
.sq-doc p { margin: 0 0 12px; }
.sq-doc a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: 3px; }
.sq-doc b, .sq-doc dt, .sq-doc th { color: var(--ink); }
.sq-cl { display: inline-block; min-width: 2.6em; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.sq-list { margin: 0 0 12px; padding-left: 22px; display: grid; gap: 6px; }
.sq-defs { margin: 0 0 12px; display: grid; grid-template-columns: minmax(0, 12rem) minmax(0, 1fr); gap: 8px 20px; }
.sq-defs dt { font-weight: 700; }
.sq-defs dd { margin: 0; }
.sq-table-wrap { overflow-x: auto; margin: 0 0 14px; }
.sq-table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.5; background: var(--sheet); border: 1px solid var(--line); }
.sq-table th, .sq-table td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.sq-table thead th { border-bottom: 2px solid var(--ink); font-weight: 700; }
.sq-table code, .sq-doc code { font-size: .92em; overflow-wrap: anywhere; }
.sq-ph { background: #ffe58a; color: #1a1300; padding: 0 3px; font-weight: 700; outline: 1px dashed #b07d00; }
.sq-review { margin: 0 0 8px; padding: 14px 16px; border: 2px dashed var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--sheet)); color: var(--ink); font-size: 15px; line-height: 1.55; }
.sq-review p { margin: 0; }
.sq-callout { padding: 12px 14px; border-left: 4px solid var(--accent); background: var(--sheet); color: var(--ink); }
@media (max-width: 900px) {
  .sq-legal-grid { grid-template-columns: minmax(0, 1fr); }
  .sq-toc { position: static; max-height: none; padding: 14px 16px; border: 1px solid var(--line); background: var(--sheet); }
  .sq-defs { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .sq-defs dd { margin-bottom: 8px; }
}
@media print {
  .lp-head, .lp-foot, .sq-toc, .sq-legal-switch, .sq-sticky, .skip { display: none !important; }
  .lp, .sq-doc, .sq-table { background: #fff !important; color: #000 !important; }
  .sq-legal-grid { display: block; padding: 0; }
  .sq-doc { max-width: none; font-size: 11pt; line-height: 1.5; color: #000; }
  .sq-doc h2 { break-after: avoid; color: #000; }
  .sq-table tr, .sq-review { break-inside: avoid; }
  .sq-doc a { color: #000; }
  .sq-doc a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
  .lp-pagehead { padding: 0 0 12pt; }
}

/* the end: the resolution, with a before and after */
.sq-end { background: var(--sheet); border-top: 1px solid var(--line); padding-block: clamp(56px, 8vw, 104px); }
.sq-end-copy p:not(.lp-actions) { color: var(--ink-2); font-size: 17px; line-height: 1.6; max-width: 52ch; }
.sq-ba { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border: 1px solid var(--line); }
.sq-ba > div { padding: 18px 20px; }
.sq-ba > .is-after { background: var(--rail); color: var(--rail-ink); }
.sq-ba-h { font: 700 13px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px !important; }
.sq-ba .is-after .sq-ba-h { color: var(--accent); }
.sq-ba ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: 15px; line-height: 1.45; }
.sq-ba > div:first-child li { color: var(--ink-2); text-decoration: line-through; text-decoration-color: var(--line-2); }
.sq-more { margin-top: 18px !important; display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--ink-3); }

/* the sticky trial button on phones: part of the story's flow, so it never covers the footer */
.sq-sticky { display: none; }

/* plan cards */
.sq-tiers { list-style: none; margin: 28px 0 18px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.sq-tier { display: grid; grid-template-rows: auto auto auto 1fr auto; gap: 14px; padding: 24px 22px; background: var(--sheet); border: 1px solid var(--line); }
.sq-tier.is-rec { border: 2px solid var(--accent); box-shadow: var(--e3); }
.sq-tier h2 { font-size: 28px; }
.sq-badge { justify-self: start; font: 700 12.5px var(--font); letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; background: var(--accent); color: var(--on-accent); }
.sq-tier-blurb { color: var(--ink-2); line-height: 1.5; }
.sq-limits { margin: 0; display: grid; align-content: start; }
.sq-limits div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sq-limits dt { color: var(--ink-2); }
.sq-limits dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.sq-tier-foot { font-size: 14px; color: var(--ink-3); line-height: 1.5; }
.sq-tier .sq-cta { width: 100%; }
.sq-tier-cta { margin-top: 12px !important; }

@media (max-width: 900px) {
  .sq-hook-grid, .sq-turn-grid, .sq-ch-grid, .sq-end-grid { grid-template-columns: minmax(0, 1fr); }
  .sq-flip .sq-fig { order: 0; }
  .sq-tiers { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
  .sq-tier.is-rec { order: -1; }
}
@media (max-width: 720px) {
  .sq-sticky { display: block; position: sticky; bottom: 0; z-index: 25; padding: 10px clamp(16px, 4vw, 40px) calc(10px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--line-2); }
  .sq-sticky .sq-cta { width: 100%; }
}
@media (max-width: 560px) {
  /* one header row on phones: the trial button lives in the hero and the sticky bar instead */
  .lp-nav .btn.primary { display: none; }
  .lp-nav { gap: 4px 14px; }
  .lp-bar { flex-wrap: nowrap; }
  .lp-brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .lp h1 { font-size: clamp(31px, 8.6vw, 36px); }
  .lp-actions .sq-cta { width: 100%; }
  .sq-index { grid-template-columns: minmax(0, 1fr); }
  .sq-ba { grid-template-columns: minmax(0, 1fr); }
  .sq-scrap:nth-child(odd) { margin-left: 0; }
  .sq-file { grid-template-columns: auto minmax(0, 1fr); }
  .sq-file .sq-mock { grid-column: 2; }
}

/* reduced motion means none: no transitions, animations, hover lifts or page cross-fades on the public pages */
@media (prefers-reduced-motion: reduce) {
  .lp *, .lp *::before, .lp *::after, .lp-faq details::details-content { animation: none !important; transition: none !important; }
  .lp .btn:hover, .lp .btn:active { transform: none !important; }
  @view-transition { navigation: none; }
}
/* ── end saas only ── */

@media (max-width: 400px) {
  /* keep the header on one row on small phones: the logo stays, the link's label still says Quillnest */
  .lp-brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .lp-nav { gap: 8px; }
}

/* ---- theme toggle ---- */
/* The app's own switch (theme.js, data-theme-toggle, the same stored choice), dressed for the black header.
   It is rendered hidden and site.js shows it, so without JavaScript the page simply follows the system. */
.lp-theme { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; color: var(--rail-ink); background: transparent; border: 1.5px solid transparent; border-radius: 0; box-shadow: none; cursor: pointer; }
.lp-theme:hover, .lp-theme:focus-visible { color: #fff; background: transparent; border-color: #5a626a; box-shadow: none; }
.lp-theme svg { width: 20px; height: 20px; }
.lp-theme[hidden] { display: none; }
/* ---- end theme toggle ---- */
