/* The marketing home page (public/welcome*.html, all four locales link this
   one file). 2026-09-26 "stationery" redesign: the page is a desk of study
   stationery, drawn from the app icon (a cream index card with a check).
   - Ink navy text, index-card cream ground, highlighter yellow for the one
     thing to press, a red index-card margin rule, ballpoint blue for links,
     and the icon's teal only for check marks.
   - Every section is a different paper: ruled (hero), dot grid (library),
     plain (how, pricing), and a navy night-desk band (TV, closing CTA).
   - Hard ink edges and small offset "sticker" shadows mark what you can
     press; soft shadows are gone.
   Loaded after /marketing/chrome.css and overrides its tokens for this page
   only (the app and the /sets/ pages keep chrome.css's palette). The dark
   selectors repeat chrome.css's own so they win at equal specificity. */

:root {
  --bg: #FAF6EC;
  --bg2: #FFFDF7;
  --bg3: #F1EBDC;
  --ink: #141A38;
  --ink2: #545B78;
  --line: #E3DBC7;
  --accent: #2B3BBF;            /* ballpoint blue: links, eyebrows */
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(43, 59, 191, .09);
  --card: var(--bg2);
  --muted: var(--ink2);
  --hi: #FFD23F;                /* highlighter */
  --work: var(--hi);            /* chrome.css and hero.js paint buttons/chips with these */
  --on-work: #141A38;
  --margin: #E0554A;            /* the index card's red rule */
  --rule: rgba(64, 104, 196, .15);
  --dot: rgba(20, 26, 56, .13);
  --check: #0E8A7A;
  --edge: #141A38;              /* hard borders on things you press */
  --pop-c: #141A38;             /* offset shadow colour */
  --housing: #141A38;           /* night-desk bands */
  --housing-ink: #F6F1E4;
  --tint-y: #FFF0B3;
  --tint-b: #DEE5FF;
  --tint-r: #FFDFD8;
  --tint-g: #D4F0E6;
  --shadow: 0 1px 0 rgba(20, 26, 56, .04), 0 14px 30px -20px rgba(20, 26, 56, .35);
  /* a physical card stays card-coloured in either theme */
  --paper: #FFFDF6;
  --paper-ink: #1B2040;
  --paper-rule: rgba(64, 104, 196, .26);
  --display: "Bricolage Grotesque", "Outfit", system-ui, sans-serif;
  --hand: "Caveat", "Bradley Hand", "Segoe Print", cursive;
  --serif: "Source Serif 4", Georgia, serif;
  --radius: 16px;
  --max: 1120px;
}
:root[data-theme="dark"] {
  --bg: #0C1130;
  --bg2: #141A40;
  --bg3: #1B2250;
  --ink: #F4EFE3;
  --ink2: #A9AFCC;
  --line: #262E62;
  --accent: #AAB7FF;
  --accent-ink: #0C1130;
  --accent-soft: rgba(170, 183, 255, .12);
  --margin: #FF7B6E;
  --rule: rgba(170, 183, 255, .07);
  --dot: rgba(170, 183, 255, .14);
  --check: #52D3BF;
  --edge: #4C579C;
  --pop-c: #04061A;
  --housing: #060920;
  --tint-y: #2B2747;
  --tint-b: #1B2458;
  --tint-r: #2E1F43;
  --tint-g: #142C4A;
  --shadow: 0 14px 30px -20px rgba(0, 0, 0, .8);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C1130;
    --bg2: #141A40;
    --bg3: #1B2250;
    --ink: #F4EFE3;
    --ink2: #A9AFCC;
    --line: #262E62;
    --accent: #AAB7FF;
    --accent-ink: #0C1130;
    --accent-soft: rgba(170, 183, 255, .12);
    --margin: #FF7B6E;
    --rule: rgba(170, 183, 255, .07);
    --dot: rgba(170, 183, 255, .14);
    --check: #52D3BF;
    --edge: #4C579C;
    --pop-c: #04061A;
    --housing: #060920;
    --tint-y: #2B2747;
    --tint-b: #1B2458;
    --tint-r: #2E1F43;
    --tint-g: #142C4A;
    --shadow: 0 14px 30px -20px rgba(0, 0, 0, .8);
  }
}
/* chrome.js paints <html> inline with the app's own ground; this page has its own */
html { background: var(--bg) !important; scroll-behavior: smooth; }

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; font-family: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink); background: var(--bg); line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -.024em; line-height: 1.02; text-wrap: balance; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 760px; }
::selection { background: var(--hi); color: #141A38; }

/* ---- header overrides (chrome.css draws it) ---- */
.fk-sitehead { background: color-mix(in srgb, var(--bg) 86%, transparent); border-bottom-color: var(--line); }
.fk-sitehead-in { max-width: var(--max); }
.fk-sitebrand { font-family: var(--display); font-weight: 800; letter-spacing: -.02em; }
.fk-sitecta {
  background: var(--hi); color: #141A38; border: 1.5px solid var(--edge);
  box-shadow: 2px 2px 0 var(--pop-c); border-radius: 10px;
  transition: transform .12s ease, box-shadow .12s ease;
}
.fk-sitecta:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--pop-c); }
.fk-sitebtn { background: transparent; border: 1.5px solid var(--line); }
@media (max-width: 440px) {
  .fk-sitecta { padding: 0 .55rem; box-shadow: none; font-size: .78rem; }
  .fk-sitebrand { font-size: 1rem; gap: .4rem; }
  .fk-sitehead-in { gap: .2rem; padding: 0 .6rem; }
}
@media (max-width: 350px) { .fk-sitebrand { font-size: .9rem; } .fk-sitebrand img { width: 24px; height: 24px; } .fk-sitecta { padding: 0 .45rem; } }

/* ---- returning-visitor bar ---- */
.fk-returnbar { display: none; background: var(--housing); color: var(--housing-ink); }
.fk-returnbar.show { display: block; }
.fk-returnbar-in { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; padding: 10px 24px; font-size: 14.5px; font-weight: 600; }
.fk-returnbar .btn { padding: 0 18px; min-height: 36px; font-size: 13.5px; border-color: var(--hi); }
.fk-returnbar-kbd { display: none; opacity: .7; font-weight: 600; font-size: 13px; }
@media (pointer: fine) { .fk-returnbar-kbd { display: inline; } }
.fk-returnbar-x { border: 0; background: none; color: inherit; opacity: .7; cursor: pointer; font-size: 20px; line-height: 1; padding: 4px; margin-left: -6px; }

/* ---- buttons: ink edge, small offset shadow, press-in on click ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; font-size: 15px; text-decoration: none;
  min-height: 46px; padding: 0 22px; border-radius: 12px; cursor: pointer;
  border: 1.5px solid var(--edge); box-shadow: 3px 3px 0 var(--pop-c);
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--pop-c); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--pop-c); }
.btn:focus-visible, .fk-hero-pick:focus-visible, .fk-lib-goal:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.btn-primary { background: var(--hi); color: #141A38; }
.btn-ghost { background: var(--card); color: var(--ink); }
.btn .arr { transition: transform .15s ease; }
.btn:hover .arr { transform: translateX(3px); }

/* ---- highlighter mark: a slightly crooked yellow stroke behind a word,
   swept in from the left once on load when motion is welcome ---- */
mark.hl {
  color: inherit; background: none; position: relative; white-space: nowrap;
  padding: 0 .06em; z-index: 0;
}
mark.hl::before {
  content: ""; position: absolute; z-index: -1; left: -.08em; right: -.1em; top: .5em; bottom: .02em;
  background: var(--hi); border-radius: .18em .4em .22em .5em; transform: rotate(-1.2deg) skewX(-6deg);
  transform-origin: left center;
}
:root[data-theme="dark"] mark.hl { color: #141A38; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) mark.hl { color: #141A38; } }
:root[data-theme="dark"] mark.hl::before, :root:not([data-theme="light"]) mark.hl::before { top: .12em; }
html.js-anim mark.hl::before { animation: fk-hl .7s cubic-bezier(.2, .7, .2, 1) .35s both; }
@keyframes fk-hl { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* ---- eyebrow: red margin dash + ballpoint caps ---- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 12.5px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--accent);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--margin); border-radius: 2px; }

/* ---- sections ---- */
main { position: relative; }
section { padding: 88px 0; position: relative; }
.sec-head { max-width: 720px; margin: 0 0 44px; }
.sec-head h2 { font-size: clamp(32px, 4.4vw, 52px); margin: 14px 0 14px; }
.sec-head p { color: var(--muted); font-size: 17px; margin: 0; max-width: 56ch; }
.sec-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.sec-head.center p { margin: 0 auto; }
.sec-head.split { max-width: none; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .8fr); gap: 16px 48px; align-items: end; }
.sec-head.split p { padding-bottom: 8px; }
@media (max-width: 800px) {
  section { padding: 64px 0; }
  .sec-head { margin-bottom: 32px; }
  .sec-head.split { grid-template-columns: 1fr; }
}

/* =====================================================================
   HERO: ruled notebook paper with a double red margin, copy + try box on
   the left, a real index card on the right, facts along the bottom.
   ===================================================================== */
.hero { position: relative; overflow: hidden; padding: 72px 0 0; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, transparent calc(var(--mx) - 5px), var(--margin) calc(var(--mx) - 5px) calc(var(--mx) - 3.5px), transparent calc(var(--mx) - 3.5px) calc(var(--mx)), var(--margin) calc(var(--mx)) calc(var(--mx) + 1.5px), transparent calc(var(--mx) + 1.5px)),
    repeating-linear-gradient(180deg, transparent 0 35px, var(--rule) 35px 36px);
  --mx: max(12px, calc(50% - var(--max) / 2 - 10px));
  opacity: .9;
  -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 60%, transparent 100%);
}
.hero::after { /* margin line is red, so soften it in dark */
  content: none;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); gap: 64px; align-items: center; }
.hero-copy { min-width: 0; }
.hero h1 { font-size: clamp(42px, 6.2vw, 80px); margin: 0 0 22px; letter-spacing: -.032em; line-height: .98; text-wrap: balance; }
.hero p.lead { font-size: clamp(17px, 1.6vw, 19.5px); max-width: 50ch; margin: 0; color: var(--muted); font-weight: 500; line-height: 1.5; }
.hero-alt { margin: 16px 0 0; font-size: 14.5px; color: var(--muted); }
.hero-alt a { color: var(--accent); font-weight: 700; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

/* fact row: five short true statements, each with the icon's check */
.hero-facts {
  list-style: none; margin: 64px 0 0; padding: 22px 0 30px; border-top: 1.5px dashed var(--line);
  display: flex; flex-wrap: wrap; gap: 12px 34px; font-size: 14.5px; font-weight: 600; color: var(--ink);
}
.hero-facts li { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hero-facts li::before {
  content: ""; flex: none; width: 18px; height: 18px; background: var(--check);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12.5l5 5L20 6' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12.5l5 5L20 6' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.hero-facts a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
@media (max-width: 920px) {
  .hero { padding-top: 44px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  .hero-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; margin-top: 48px; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: clamp(38px, 11.5vw, 48px); }
  .hero-facts { grid-template-columns: 1fr; }
}

/* ---- the try box (hero.js): one ink-edged panel, one row ---- */
.fk-hero {
  margin: 30px 0 0; padding: 10px; border: 1.5px solid var(--edge); border-radius: 16px; background: var(--card);
  box-shadow: 5px 5px 0 var(--pop-c); text-align: left; outline: 2px dashed transparent; outline-offset: 5px;
  transition: outline-color .15s, transform .15s;
}
.fk-hero.drag { outline-color: var(--accent); transform: rotate(-.4deg); }
.fk-hero-form { display: flex; gap: 8px; flex-wrap: wrap; }
.fk-hero-input {
  flex: 1 1 240px; min-width: 0; border: 1.5px solid var(--line); border-radius: 10px; padding: 0 16px; min-height: 50px;
  font: inherit; font-size: 16px; background: var(--bg); color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.fk-hero-input::placeholder { color: var(--muted); }
.fk-hero-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.fk-hero-go { padding: 0 22px; font-size: 15.5px; border-radius: 10px; min-height: 50px; box-shadow: none; }
.fk-hero-sample { padding: 0 22px; font-size: 15.5px; border-radius: 10px; min-height: 50px; background: var(--accent); color: var(--accent-ink); box-shadow: none; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.fk-hero-sample:hover { box-shadow: 2px 2px 0 var(--pop-c); }
.fk-hero-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 6px 0; }
.fk-hero-chips-lbl { font-size: 12.5px; color: var(--muted); }
.fk-hero-chip { font: inherit; font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--bg3); color: var(--ink); cursor: pointer; }
.fk-hero-chip:hover { border-color: var(--accent); color: var(--accent); }
.fk-hero-chip:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.fk-hero-go:hover { box-shadow: 2px 2px 0 var(--pop-c); }
.fk-hero-pick {
  border: 1.5px dashed var(--edge); background: transparent; color: var(--ink); border-radius: 10px; padding: 0 16px;
  min-height: 50px; font: inherit; font-weight: 700; font-size: 14.5px; cursor: pointer;
}
.fk-hero-pick:hover { background: var(--bg3); border-style: solid; }
.fk-hero-note { margin: 10px 6px 2px; font-size: 13px; color: var(--muted); }
@media (max-width: 640px) { .fk-hero-input { flex-basis: 100%; } .fk-hero-go, .fk-hero-sample { flex: 1; } .fk-hero-go, .fk-hero-sample, .fk-hero-pick { min-height: 48px; } }

/* hero.js output: progress, errors and the draft cards */
.fk-hero-out { padding-top: 28px; }
.fk-hero-steps { display: flex; gap: 18px; flex-wrap: wrap; font-weight: 700; font-size: 14px; color: var(--muted); }
.fk-hero-step::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line); margin-right: 8px; vertical-align: middle; }
.fk-hero-step.on { color: var(--ink); }
.fk-hero-step.on::before { border-color: var(--accent); animation: fk-heropulse 1.2s infinite; }
.fk-hero-step.done::before { background: var(--check); border-color: var(--check); }
@keyframes fk-heropulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.fk-hero-progress { display: flex; flex-direction: column; gap: 12px; }
.fk-hero-bar { height: 8px; border-radius: 999px; background: var(--bg3); border: 1px solid var(--line); overflow: hidden; }
.fk-hero-bar > i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--hi) 0%, var(--hi) 55%, rgba(255, 255, 255, .7) 72%, var(--hi) 90%); background-size: 220% 100%; animation: fk-heroshimmer 1.4s linear infinite; transition: width .25s ease; }
@keyframes fk-heroshimmer { from { background-position: 0 0; } to { background-position: -220% 0; } }
@media (prefers-reduced-motion: reduce) { .fk-hero-bar > i { animation: none; background: var(--hi); } }
.fk-hero-error { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--tint-r); border: 1.5px solid var(--margin); color: var(--ink); font-weight: 600; font-size: 14.5px; text-align: left; }
.fk-hero-error a { color: var(--accent); }
.fk-hero-head h3 { font-family: var(--display); font-weight: 800; font-size: 22px; margin: 0 0 4px; letter-spacing: -.02em; }
.fk-hero-head p { margin: 0 0 14px; color: var(--muted); font-size: 14.5px; }
.fk-hero-upsell { color: var(--ink) !important; font-weight: 600; }
.fk-hero-upsell a { color: var(--accent); }
.fk-hero-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; text-align: left; }
.fk-hero-tile {
  position: relative; text-align: left; background: var(--paper); color: var(--paper-ink); border: 1.5px solid var(--edge); border-radius: 8px;
  padding: 40px 16px 16px; box-shadow: 3px 3px 0 var(--pop-c); cursor: pointer; font: inherit; display: flex; flex-direction: column; gap: 10px;
  background-image: linear-gradient(180deg, transparent 30px, var(--margin) 30px 31.5px, transparent 31.5px);
}
.fk-hero-tile .chip { position: absolute; top: 7px; left: 12px; font-size: 10.5px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; border: 1px solid #D9D2BE; color: #5D6378; }
.fk-hero-tile .chip.ok { color: #fff; background: #0E8A7A; border-color: #0E8A7A; }
.fk-hero-tile .f { font-family: var(--serif); font-weight: 600; font-size: 17px; line-height: 1.35; }
.fk-hero-tile .b { display: none; border-top: 1px dashed #D9D2BE; padding-top: 10px; font-size: 14.5px; color: #5D6378; }
.fk-hero-tile.open .b { display: block; }
.fk-hero-tile .c { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.fk-hero-tile .c li { padding: 6px 10px; border: 1px solid #D9D2BE; border-radius: 8px; }
.fk-hero-tile .c li.right { border-color: #0E8A7A; color: var(--paper-ink); font-weight: 700; background: rgba(14, 138, 122, .08); }
.fk-hero-deck { max-width: 560px; margin: 0 auto; text-align: left; }
.fk-flip { display: block; width: 100%; min-height: 230px; padding: 0; border: 0; background: none; cursor: pointer; perspective: 1200px; font: inherit; color: inherit; }
.fk-flip-in { position: relative; display: block; min-height: 230px; transform-style: preserve-3d; transition: transform .45s ease; }
.fk-flip.flipped .fk-flip-in { transform: rotateY(180deg); }
.fk-flip-face { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 26px 30px; text-align: center; border: 1.5px solid var(--edge); border-radius: 16px; background: var(--card); box-shadow: 4px 4px 0 var(--pop-c); font-family: var(--serif); font-weight: 600; font-size: 21px; line-height: 1.4; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.fk-flip-face.back { transform: rotateY(180deg); }
.fk-flip-face .c { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 16px; text-align: left; width: 100%; }
.fk-flip-face .c li { padding: 6px 10px; border: 1px solid #D9D2BE; border-radius: 8px; }
.fk-flip-face .c li.right { border-color: #0E8A7A; font-weight: 700; background: rgba(14, 138, 122, .08); }
.fk-flip:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 16px; }
.fk-flip-main { display: block; width: 100%; margin-top: 16px; min-height: 48px; font-size: 15.5px; }
.fk-flip-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; font-size: 13px; color: var(--muted); }
.fk-flip-nav { min-height: 34px; padding: 0 14px; font-size: 13px; }
.fk-flip-nav:disabled { opacity: .4; cursor: default; }
@media (prefers-reduced-motion: reduce) { .fk-flip-in { transition: none; } }
.fk-hero-acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.fk-hero-fine { margin: 12px 0 0; font-size: 13px; color: var(--muted); text-align: left; }

/* ---- the sample card: a ruled index card on a small messy stack. Three
   faces (question, answer, source), one tap each; the card is a physical
   object, so it keeps its paper colours in dark mode too. ---- */
.fk-sample-wrap { position: relative; display: flex; flex-direction: column; align-items: center; gap: 26px; padding: 18px 10px 0; }
.fk-sample {
  position: relative; width: 100%; max-width: 420px; cursor: pointer; color: var(--paper-ink); text-align: left;
  perspective: 1200px; -webkit-tap-highlight-color: transparent; transform: rotate(-2deg);
  transition: transform .35s cubic-bezier(.2, .7, .2, 1);
}
.fk-sample:hover { transform: rotate(-.5deg) translateY(-3px); }
.fk-sample .stack { position: absolute; inset: 0; border-radius: 8px; border: 1.5px solid var(--edge); }
.fk-sample .stack.s2 { background: #FFE27A; transform: rotate(6deg) translate(18px, 8px); }
.fk-sample .stack.s3 { background: #D6E0FF; transform: rotate(-7deg) translate(-20px, 14px); }
.fk-sample .face {
  position: relative; min-height: 318px; border-radius: 8px; border: 1.5px solid var(--edge);
  box-shadow: 6px 6px 0 var(--pop-c); padding: 18px 24px 18px; display: flex; flex-direction: column; gap: 10px;
  background:
    linear-gradient(180deg, transparent 63px, #E0554A 63px 65px, transparent 65px),
    repeating-linear-gradient(180deg, transparent 0 33px, var(--paper-rule) 33px 34px) 0 65px / 100% calc(100% - 65px) no-repeat,
    var(--paper);
}
html.js-anim .fk-sample .face { transition: transform .14s ease-in; }
html.js-anim .fk-sample.turn .face { transform: rotateY(90deg); }
.fk-sample:focus-visible { outline: none; }
.fk-sample:focus-visible .face { outline: 3px solid var(--accent); outline-offset: 4px; }
.fk-sample .tabs { display: flex; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; color: #6A6F84; height: 30px; align-items: center; }
.fk-sample .tabs span { padding: 4px 10px; border-radius: 999px; border: 1.5px solid #DDD5C0; }
.fk-sample[data-state="0"] .tabs span:nth-child(1), .fk-sample[data-state="1"] .tabs span:nth-child(2),
.fk-sample[data-state="2"] .tabs span:nth-child(3) { color: #141A38; background: #FFD23F; border-color: #141A38; }
.fk-sample .body { flex: 1; display: none; flex-direction: column; justify-content: center; gap: 12px; padding: 14px 0 6px; }
.fk-sample[data-state="0"] .body.q, .fk-sample[data-state="1"] .body.a, .fk-sample[data-state="2"] .body.s { display: flex; }
.fk-sample .body p { margin: 0; font-family: var(--serif); font-weight: 600; font-size: clamp(22px, 2.3vw, 27px); line-height: 34px; }
.fk-sample .body.s blockquote { margin: 0; padding: 0 0 0 14px; border-left: 3px solid #0E8A7A; font-family: var(--serif); font-weight: 600; font-size: 17.5px; line-height: 34px; }
.fk-sample .body.s .from { margin: 0; font-family: inherit; font-weight: 500; font-size: 13.5px; color: #5D6378; line-height: 1.45; }
.fk-sample .chip { align-self: flex-start; font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; background: #0E8A7A; color: #fff; }
.fk-sample .deck { font-size: 12.5px; color: #6A6F84; font-weight: 600; }
/* the hint reads as a pencilled margin note with an arrow up at the card */
.fk-sample-hint {
  position: relative; margin: 0; font-family: var(--hand); font-weight: 600; font-size: 23px; line-height: 1.15;
  color: var(--accent); text-align: center; max-width: 30ch; transform: rotate(-1.5deg);
}
.fk-sample-hint::before {
  content: ""; position: absolute; left: -44px; top: -22px; width: 38px; height: 38px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M34 34C18 33 9 25 8 8M8 8l-5 8M8 8l7 6' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M34 34C18 33 9 25 8 8M8 8l-5 8M8 8l7 6' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
@media (max-width: 920px) { .fk-sample-hint::before { display: none; } }
@media (max-width: 480px) {
  .fk-sample .tabs { gap: 4px; font-size: 10px; letter-spacing: .4px; }
  .fk-sample .tabs span { padding: 3px 8px; }
  .fk-sample .face { min-height: 290px; padding: 16px 16px; }
  .fk-sample .stack.s2 { transform: rotate(5deg) translate(10px, 6px); }
  .fk-sample .stack.s3 { transform: rotate(-5deg) translate(-10px, 10px); }
}

/* =====================================================================
   IN THE APP: three coloured index-card tiles, numbered, phone sitting
   into the bottom edge.
   ===================================================================== */
.fk-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.fk-tile {
  position: relative; overflow: hidden; border: 1.5px solid var(--edge); border-radius: 20px;
  display: flex; flex-direction: column; min-width: 0; background: var(--tint-y);
}
.fk-tile:nth-child(2) { background: var(--tint-b); }
.fk-tile:nth-child(3) { background: var(--tint-g); }
.fk-tile-copy { padding: 26px 28px 0; }
.fk-tile-n { display: block; font-family: var(--hand); font-weight: 700; font-size: 30px; line-height: 1; color: var(--accent); margin: 0 0 10px; }
.fk-tile h3 { font-size: 24px; letter-spacing: -.025em; line-height: 1.1; margin: 0 0 10px; }
.fk-tile p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.fk-tile-shot { margin-top: auto; padding: 30px 36px 0; display: flex; justify-content: center; overflow: hidden; }
.fk-tile-shot img {
  width: 100%; max-width: 236px; height: auto; display: block; margin-bottom: -84px;
  filter: drop-shadow(0 18px 22px rgba(20, 26, 56, .22)); transition: transform .4s cubic-bezier(.2, .7, .2, 1);
}
.fk-tile:hover .fk-tile-shot img { transform: translateY(-10px); }
@media (max-width: 1000px) { .fk-tile-copy { padding: 22px 22px 0; } .fk-tile-shot { padding: 26px 26px 0; } }
@media (max-width: 700px) {
  .fk-tiles { grid-template-columns: 1fr; gap: 14px; }
  .fk-tile { flex-direction: row; align-items: stretch; gap: 6px; }
  .fk-tile-copy { flex: 1 1 auto; padding: 22px 4px 22px 20px; align-self: center; }
  .fk-tile h3 { font-size: 20px; }
  .fk-tile-n { font-size: 26px; margin-bottom: 6px; }
  .fk-tile-shot { flex: 0 0 40%; margin: 0; padding: 22px 16px 0 0; align-items: flex-end; }
  .fk-tile-shot img { max-width: 150px; margin-bottom: -56px; }
}
@media (max-width: 380px) { .fk-tile-shot { flex-basis: 44%; } .fk-tile-copy { padding-left: 16px; } }

/* =====================================================================
   LIBRARY: dot-grid paper, binder-tab goals, featured decks as index cards.
   ===================================================================== */
.sec-dots {
  background: radial-gradient(var(--dot) 1.1px, transparent 1.4px) 0 0 / 22px 22px, var(--bg3);
  border-top: 1.5px solid var(--line); border-bottom: 1.5px solid var(--line);
}
.fk-lib-search { max-width: 560px; margin: 0 0 20px; position: relative; }
.fk-lib-search::before {
  content: ""; position: absolute; left: 18px; top: 50%; width: 18px; height: 18px; margin-top: -9px; background: var(--muted); pointer-events: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5' fill='none' stroke='%23000' stroke-width='2.2'/%3E%3Cpath d='M15.5 15.5L21 21' stroke='%23000' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5' fill='none' stroke='%23000' stroke-width='2.2'/%3E%3Cpath d='M15.5 15.5L21 21' stroke='%23000' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.fk-lib-search input { width: 100%; padding: 14px 18px 14px 46px; border: 1.5px solid var(--edge); background: var(--card); box-shadow: 3px 3px 0 var(--pop-c); border-radius: 12px; }
.fk-lib-results { display: flex; flex-direction: column; gap: 10px; max-width: 760px; margin: 0 0 30px; }
.fk-lib-results:empty { display: none; }
.fk-lib-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; padding: 14px 18px; }
.fk-lib-row .name { font-weight: 700; }
.fk-lib-row .meta { color: var(--muted); font-size: 13.5px; }
.fk-lib-row .acts { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.fk-lib-row .acts .btn { padding: 0 16px; font-size: 14px; min-height: 40px; }
.fk-lib-empty { color: var(--muted); font-size: 14.5px; }
.fk-lib-h {
  font-family: var(--hand); font-weight: 700; font-size: 28px; letter-spacing: 0; line-height: 1; color: var(--ink);
  margin: 44px 0 18px; display: flex; align-items: center; gap: 14px;
}
.fk-lib-h::after { content: ""; flex: 1; height: 0; border-top: 1.5px dashed var(--line); }
.fk-lib-goals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 14px; margin: 0; padding-top: 12px; }
.fk-lib-goal {
  --tab: #FFD23F;
  position: relative; display: flex; flex-direction: column; gap: 4px; background: var(--card);
  border: 1.5px solid var(--line); border-radius: 0 12px 12px 12px; padding: 16px 18px 14px; text-decoration: none; color: inherit; min-width: 0;
  transition: border-color .12s, transform .12s, box-shadow .12s;
}
.fk-lib-goal::before { /* the binder tab */
  content: ""; position: absolute; left: -1.5px; top: -13px; width: 72px; height: 13px; background: var(--tab);
  border: 1.5px solid var(--edge); border-bottom: 0; border-radius: 8px 8px 0 0;
}
.fk-lib-goal:nth-child(4n+2) { --tab: #A9BCFF; }
.fk-lib-goal:nth-child(4n+3) { --tab: #FFA595; }
.fk-lib-goal:nth-child(4n+4) { --tab: #86DCC4; }
.fk-lib-goal:hover { border-color: var(--edge); transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--pop-c); }
.fk-lib-goal:hover::before { border-color: var(--edge); }
.fk-lib-goal .name { font-weight: 700; font-size: 15.5px; line-height: 1.25; }
.fk-lib-goal .desc { color: var(--muted); font-size: 13.5px; line-height: 1.4; }
.fk-lib-goal .count { align-self: flex-start; color: var(--ink); font-size: 12px; font-weight: 700; margin-top: 6px; padding: 1px 9px; border-radius: 999px; background: var(--bg3); }
@media (max-width: 640px) { .fk-lib-goals > :nth-child(n+5) { display: none; } }
@media (max-width: 800px) { .fk-lib-goals { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .fk-lib-goals { grid-template-columns: 1fr; } }

.fk-lib-featured { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.fk-lib-feat {
  position: relative; background: var(--card); border: 1.5px solid var(--edge); border-radius: 10px;
  padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; min-width: 0;
  transition: transform .15s, box-shadow .15s;
}
.fk-lib-feat:hover { transform: translate(-2px, -2px) rotate(-.4deg); box-shadow: 5px 5px 0 var(--pop-c); }
.fk-lib-feat::before { /* the card's coloured rule, one colour per subject family */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--fam, var(--margin)); border-radius: 8px 8px 0 0;
}
.fk-lib-feat .cover { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: var(--bg); margin: 6px 0 6px; border: 1.5px solid var(--edge); }
.fk-lib-feat .name { font-weight: 800; font-size: 16px; line-height: 1.25; }
.fk-lib-feat .meta { color: var(--muted); font-size: 13px; }
.fk-lib-feat .q {
  margin: 8px 0 10px; flex: 1; font-family: var(--serif); font-weight: 600; font-size: 17px; line-height: 28px; padding-top: 2px;
  background: repeating-linear-gradient(180deg, transparent 0 27px, var(--rule) 27px 28px);
}
.fk-lib-feat .btn { align-self: flex-start; padding: 0 18px; font-size: 14px; min-height: 40px; margin-top: auto; }
.fk-lib-feat[data-cover="vocabulary-grammar"] { --fam: #d97706; }
.fk-lib-feat[data-cover="world-languages"] { --fam: #db2777; }
.fk-lib-feat[data-cover="history-humanities"] { --fam: #b45309; }
.fk-lib-feat[data-cover="music-arts"] { --fam: #7c3aed; }
.fk-lib-feat[data-cover="psychology"] { --fam: #9333ea; }
.fk-lib-feat[data-cover="law"] { --fam: #64748b; }
.fk-lib-feat[data-cover="technology-it"] { --fam: #2563eb; }
.fk-lib-feat[data-cover="health-medicine"] { --fam: #e11d48; }
.fk-lib-feat[data-cover="science"] { --fam: #059669; }
.fk-lib-feat[data-cover="finance-business"] { --fam: #16a34a; }
.fk-lib-feat[data-cover="math-numbers"] { --fam: #ea580c; }
.fk-lib-feat[data-cover="nature-geography"] { --fam: #65a30d; }
.fk-lib-feat[data-cover="trades-aviation"] { --fam: #0284c7; }
.fk-lib-feat[data-cover="food-life"] { --fam: #ca8a04; }
@media (max-width: 800px) { .fk-lib-featured { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .fk-lib-featured { grid-template-columns: 1fr; } }
.fk-lib-more { margin: 36px 0 0; }
.fk-lib-more a {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; text-decoration: none;
  min-height: 46px; padding: 0 22px; border-radius: 12px; border: 1.5px solid var(--edge); background: var(--card);
  color: var(--ink); box-shadow: 3px 3px 0 var(--pop-c); transition: transform .12s, box-shadow .12s;
}
.fk-lib-more a::after { content: "\2192"; }
.fk-lib-more a:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--pop-c); }

/* =====================================================================
   HOW IT WORKS: big outlined numerals down a dashed spine, the MCQ card
   as a tilted ink card beside them.
   ===================================================================== */
.how-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.steps { display: flex; flex-direction: column; gap: 0; counter-reset: step; }
.step { position: relative; display: flex; gap: 24px; align-items: flex-start; padding: 0 0 34px; }
.step:last-child { padding-bottom: 0; }
.step::after { /* the spine */
  content: ""; position: absolute; left: 27px; top: 64px; bottom: 6px; border-left: 2px dashed var(--line);
}
.step:last-child::after { display: none; }
.step .n {
  flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  font-family: var(--display); font-weight: 800; font-size: 26px; color: #141A38; background: var(--hi);
  border: 1.5px solid var(--edge); box-shadow: 3px 3px 0 var(--pop-c);
}
.step:nth-child(2) .n { background: #D6E0FF; }
.step:nth-child(3) .n { background: #CBEFE3; }
.step > div { min-width: 0; }
.step h3 { font-size: 23px; letter-spacing: -.02em; margin: 12px 0 6px; }
.step p { color: var(--muted); margin: 0; font-size: 15.5px; max-width: 46ch; }
@media (max-width: 800px) { .how-grid { grid-template-columns: 1fr; gap: 48px; } .step .n { width: 48px; height: 48px; font-size: 22px; } .step::after { left: 23px; top: 56px; } .step { gap: 18px; } .step h3 { margin-top: 8px; font-size: 20px; } }

/* step 3's strip: seven days, the fourth a day off */
.step .strip {
  display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; align-items: end; margin-top: 16px; padding: 14px 16px;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; width: max-content; max-width: 100%;
  font-size: 12px; font-weight: 700; color: var(--muted);
}
.step .strip .bars { display: flex; gap: 5px; align-items: flex-end; height: 30px; }
.step .strip i { display: block; width: 14px; height: calc(30px * var(--h)); background: var(--line); border-radius: 3px; }
.step .strip .fk i { background: var(--check); }
.step .strip i.off { height: 30px; background: none; border: 1.5px dashed var(--line); }
.step .strip .cap { grid-column: 1 / -1; font-weight: 600; font-size: 11.5px; }

.card3d {
  position: relative; background: var(--housing); color: var(--housing-ink); border-radius: 22px; border: 1.5px solid var(--edge);
  padding: 34px 22px 24px; display: flex; flex-direction: column; align-items: center; gap: 14px;
  box-shadow: 8px 8px 0 var(--hi); transform: rotate(1.5deg); margin: 10px 8px;
}
:root[data-theme="dark"] .card3d { border-color: #3A4488; }
.card3d .lab { font-size: 12px; font-weight: 800; letter-spacing: 1.6px; color: rgba(255, 255, 255, .6); }
.card3d .face { width: 100%; min-height: 124px; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); display: flex; align-items: center; justify-content: center; padding: 18px; }
.card3d .face span { font-family: var(--serif); font-weight: 600; font-size: 22px; color: #fff; text-align: center; line-height: 1.35; }
.card3d .mcq { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
.card3d .opt { border: 1px solid rgba(255, 255, 255, .18); border-radius: 10px; padding: 11px 12px; font-size: 13.5px; color: rgba(255, 255, 255, .85); font-weight: 600; }
.card3d .opt.right { border-color: #52D3BF; background: rgba(82, 211, 191, .14); color: #fff; }
.card3d .live {
  position: absolute; top: -15px; left: 22px; background: var(--hi); color: #141A38; border: 1.5px solid #141A38;
  font-weight: 800; font-size: 11.5px; padding: 5px 12px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; transform: rotate(-3deg);
}
.card3d .live i { width: 7px; height: 7px; border-radius: 50%; background: #141A38; font-style: normal; }

/* =====================================================================
   TV: a night-desk band with the room code as big letter tiles.
   ===================================================================== */
#tv { padding-top: 0; }
.tv-scene {
  position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center;
  background: var(--housing); color: var(--housing-ink); border-radius: 28px; padding: 52px 52px; border: 1.5px solid var(--edge);
}
.tv-scene::before { /* faint ruled lines, as on the hero, but chalk on navy */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(180deg, transparent 0 35px, rgba(255, 255, 255, .045) 35px 36px);
}
.tv-scene > * { position: relative; }
.tv-scene .eyebrow { color: var(--hi); }
.tv-scene .eyebrow::before { background: var(--hi); }
.tv-scene h2 { font-size: clamp(32px, 4.2vw, 50px); margin: 14px 0 14px; color: #fff; }
.tv-scene p { color: rgba(246, 241, 228, .74); margin: 0; font-size: 17px; max-width: 42ch; }
.tv-code { display: flex; gap: 8px; margin-top: 28px; }
.tv-code span {
  display: grid; place-items: center; width: 52px; height: 58px; border-radius: 10px;
  background: #FFFDF6; color: #141A38; font-family: var(--display); font-weight: 800; font-size: 28px;
  box-shadow: 0 4px 0 #C9C0A8; transform: rotate(var(--r, 0deg));
}
.tv-code span:nth-child(1) { --r: -3deg; } .tv-code span:nth-child(2) { --r: 2deg; } .tv-code span:nth-child(3) { --r: -1deg; }
.tv-code span:nth-child(4) { --r: 3deg; background: var(--hi); box-shadow: 0 4px 0 #C9A21F; } .tv-code span:nth-child(5) { --r: -2deg; }
.tv-mock { background: #000; border-radius: 16px; padding: 10px; border: 1px solid rgba(255, 255, 255, .14); transform: rotate(-1deg); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7); }
.tv-mock .screen {
  background: #F7F5F0; color: #1A1D22; border-radius: 8px; aspect-ratio: 16 / 9; display: flex; flex-direction: column;
  justify-content: space-between; text-align: center; padding: 12px 16px 10px;
}
.tv-mock .tbar { display: flex; justify-content: space-between; gap: 10px; font-size: 10.5px; font-weight: 800; }
.tv-mock .tbar span { color: #5F6773; font-weight: 600; }
.tv-mock .tcard { font-family: var(--serif); font-weight: 600; font-size: clamp(16px, 1.8vw, 22px); line-height: 1.3; padding: 0 8%; }
.tv-mock .code { font-size: 10.5px; font-weight: 700; letter-spacing: .4px; color: #5F6773; }
.tv-mock .code b { color: #0F6E68; letter-spacing: 1.4px; margin-left: 4px; }
.tv-mock .stand { width: 34%; height: 6px; background: #0a0a0a; margin: 8px auto 0; border-radius: 0 0 6px 6px; }
@media (max-width: 800px) {
  .tv-scene { grid-template-columns: 1fr; padding: 36px 24px; border-radius: 22px; gap: 36px; }
  .tv-code span { width: 44px; height: 50px; font-size: 24px; }
}

/* =====================================================================
   iPHONE AND iPAD (2026-09-26): the native app. Copy, four true points,
   the official App Store badge (black on paper, white at night) and, for a
   desktop visitor, a QR code on a sticky note; the iPad and iPhone renders
   overlap on the right. An iPhone/iPad visitor (chrome.js stamps .is-ios)
   and any phone-width screen skip the QR - Safari's own Smart App Banner
   (the apple-itunes-app meta) covers them.
   ===================================================================== */
.app-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 56px; align-items: center; }
.app-copy h2 { font-size: clamp(32px, 4.4vw, 52px); margin: 14px 0 14px; }
.app-lead { color: var(--muted); font-size: 17px; margin: 0 0 22px; max-width: 46ch; }
.app-points { list-style: none; margin: 0 0 30px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.app-points li { position: relative; padding-left: 30px; font-size: 15.5px; font-weight: 600; line-height: 1.45; }
.app-points li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 18px; height: 18px; background: var(--check);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12.5l5 5L20 6' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12.5l5 5L20 6' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.app-get { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.app-badge { display: inline-block; line-height: 0; border-radius: 10px; transition: transform .15s ease; }
.app-badge:hover { transform: translateY(-2px); }
.app-badge:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.app-badge img { height: 54px; width: auto; display: block; }
.app-badge .on-dark { display: none; }
:root[data-theme="dark"] .app-badge .on-light { display: none; }
:root[data-theme="dark"] .app-badge .on-dark { display: block; }
.app-qr {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; max-width: 250px;
  background: #FFE27A; color: #141A38; border-radius: 4px; transform: rotate(2deg);
  box-shadow: 0 12px 20px -12px rgba(20, 26, 56, .45);
}
.app-qr img { flex: none; width: 88px; height: 88px; border-radius: 3px; display: block; }
.app-qr span { font-family: var(--hand); font-weight: 700; font-size: 21px; line-height: 1.1; }
.app-android { margin: 14px 0 0; font-size: 15px; }
.app-android a { font-weight: 700; }
.is-ios .app-qr { display: none; }
.app-devices { position: relative; padding: 0 14% 0 0; }
.app-ipad { width: 100%; height: auto; display: block; }
.app-iphone { position: absolute; right: 0; bottom: -6%; width: 38%; height: auto; display: block; }
@media (max-width: 860px) {
  .app-grid { grid-template-columns: 1fr; gap: 44px; }
  .app-devices { max-width: 560px; }
}
@media (max-width: 700px) { .app-qr { display: none; } }

/* =====================================================================
   PRICING: a plain Free card and a highlighter-yellow Pro card with a
   rubber-stamp price.
   ===================================================================== */
.price-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 24px; align-items: stretch; max-width: 980px; }
.price-card { position: relative; border-radius: 20px; padding: 30px 30px 30px; border: 1.5px solid var(--line); background: var(--card); display: flex; flex-direction: column; }
.price-card h3 { font-size: 26px; letter-spacing: -.025em; margin: 0 0 4px; }
.price-card .sub { margin: 0 0 20px; color: var(--muted); font-size: 14.5px; font-weight: 600; }
.price-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.price-card li { position: relative; padding: 12px 0 12px 30px; border-top: 1.5px dashed var(--line); font-size: 15.5px; line-height: 1.45; }
.price-card li::before {
  content: ""; position: absolute; left: 0; top: 14px; width: 18px; height: 18px; background: var(--check);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12.5l5 5L20 6' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12.5l5 5L20 6' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.price-card.pro { background: #FFE58A; color: #141A38; border-color: var(--edge); box-shadow: 7px 7px 0 var(--pop-c); }
.price-card.pro .sub { color: #3F4560; }
.price-card.pro li { border-top-color: rgba(20, 26, 56, .22); }
.price-card.pro li::before { background: #141A38; }
.price-stamp {
  position: absolute; top: -22px; right: 22px; display: grid; place-items: center; width: 96px; height: 96px; border-radius: 50%;
  border: 2.5px solid #C2362C; color: #C2362C; background: rgba(255, 253, 246, .92); transform: rotate(12deg);
  font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -.02em; line-height: 1;
  box-shadow: inset 0 0 0 4px rgba(255, 253, 246, .92), inset 0 0 0 5.5px #C2362C;
}
.price-card.pro .btn { margin-top: 24px; align-self: flex-start; background: #141A38; color: #FFFDF6; border-color: #141A38; box-shadow: 3px 3px 0 rgba(20, 26, 56, .35); font-size: 16px; min-height: 52px; padding: 0 26px; }
.price-card.pro .btn:hover { box-shadow: 4px 4px 0 rgba(20, 26, 56, .35); }
.pro-cta-note { font-size: 13.5px; color: #3F4560; margin: 14px 0 0; line-height: 1.5; }
@media (max-width: 800px) { .price-grid { grid-template-columns: 1fr; } .price-card { padding: 26px 22px; } .price-stamp { width: 80px; height: 80px; font-size: 18px; top: -18px; right: 14px; } }

/* compare disclosure */
.cmp-details { max-width: 1040px; margin: 48px 0 0; }
.cmp-details summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 12px; font-weight: 700; font-size: 15px;
  min-height: 46px; padding: 0 20px; border-radius: 12px; background: var(--card); color: var(--ink); border: 1.5px solid var(--edge); box-shadow: 3px 3px 0 var(--pop-c);
}
.cmp-details summary::-webkit-details-marker { display: none; }
.cmp-details summary::after { content: "+"; font-size: 20px; color: var(--accent); font-weight: 700; line-height: 1; transition: transform .2s; }
.cmp-details[open] summary::after { transform: rotate(45deg); }
.cmp-details .cmp-scroll { margin-top: 22px; }
.cmp-scroll { max-width: 1040px; }
@media (max-width: 860px) { .cmp-scroll { overflow-x: auto; } }
.cmp-table { width: 100%; min-width: 760px; border-collapse: separate; border-spacing: 0; background: var(--card); border: 1.5px solid var(--edge); border-radius: 14px; overflow: hidden; }
.cmp-table th, .cmp-table td { padding: 13px 16px; font-size: 14px; text-align: left; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.cmp-table th:last-child, .cmp-table td:last-child { border-right: 0; }
.cmp-table tr:last-child td { border-bottom: 0; }
.cmp-table thead th { font-weight: 800; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cmp-table td:first-child, .cmp-table th:first-child { font-weight: 700; }
.cmp-table td.fk, .cmp-table th.fk { background: var(--tint-y); color: var(--ink); }
.cmp-table thead th.fk { color: var(--ink); }
.cmp-note { color: var(--muted); font-size: 14.5px; margin: 18px 0 0; }
.cmp-note a { color: var(--accent); font-weight: 700; }
@media (max-width: 640px) { .cmp-table th, .cmp-table td { padding: 10px 12px; font-size: 13px; } }

/* =====================================================================
   FAQ: heading pinned left, questions as ruled lines on the right.
   ===================================================================== */
.faq-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 56px; align-items: start; }
.faq-grid .sec-head { position: sticky; top: calc(var(--sitehead-h) + 32px); margin: 0; }
.faq { border-top: 2px solid var(--edge); }
.faq details { border-bottom: 1.5px solid var(--line); }
.faq summary {
  cursor: pointer; font-weight: 700; font-size: 17.5px; padding: 20px 0; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary:hover { color: var(--accent); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  border: 1.5px solid var(--edge); font-size: 18px; font-weight: 700; line-height: 1; color: var(--ink); transition: transform .2s, background-color .2s;
}
.faq details[open] summary::after { transform: rotate(45deg); background: var(--hi); color: #141A38; }
.faq p { color: var(--muted); margin: -4px 0 22px; font-size: 15.5px; max-width: 60ch; }
@media (max-width: 800px) { .faq-grid { grid-template-columns: 1fr; gap: 28px; } .faq-grid .sec-head { position: static; } }

/* =====================================================================
   CLOSING CTA: a night-desk band with index cards scattered off its edges.
   ===================================================================== */
.final-cta { padding: 0; }
.final-band {
  position: relative; overflow: hidden; text-align: center; background: var(--housing); color: var(--housing-ink);
  border-radius: 28px; padding: 88px 24px; border: 1.5px solid var(--edge);
}
.final-band::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(180deg, transparent 0 35px, rgba(255, 255, 255, .045) 35px 36px); }
.final-band > * { position: relative; }
.final-band h2 { font-size: clamp(36px, 5.4vw, 66px); margin: 0 0 16px; color: #fff; letter-spacing: -.04em; }
.final-band h2 mark.hl { color: #141A38; }
.final-band h2 mark.hl::before { top: .1em; }
.final-band p { color: rgba(246, 241, 228, .74); max-width: 540px; margin: 0 auto 30px; font-size: 17px; }
.final-cta-acts { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.final-band .btn { border-color: #FFFDF6; box-shadow: 3px 3px 0 rgba(0, 0, 0, .45); min-height: 52px; font-size: 16px; padding: 0 26px; }
.final-band .btn-ghost { background: transparent; color: #FFFDF6; }
.final-band .btn-ghost:hover { background: rgba(255, 255, 255, .07); }
.deco-card { position: absolute; width: 180px; height: 116px; border-radius: 6px; background: #FFFDF6; pointer-events: none;
  background-image: linear-gradient(180deg, transparent 24px, #E0554A 24px 25.5px, transparent 25.5px), repeating-linear-gradient(180deg, transparent 0 17px, rgba(64, 104, 196, .25) 17px 18px);
  background-size: 100% 100%, 100% calc(100% - 26px); background-position: 0 0, 0 26px; background-repeat: no-repeat;
  box-shadow: 0 18px 30px -12px rgba(0, 0, 0, .5);
}
.deco-card.d1 { left: -40px; top: 34px; transform: rotate(-14deg); }
.deco-card.d2 { left: 60px; bottom: -58px; transform: rotate(9deg); background-color: #FFE27A; }
.deco-card.d3 { right: -46px; top: 60px; transform: rotate(12deg); background-color: #D6E0FF; }
.deco-card.d4 { right: 70px; bottom: -64px; transform: rotate(-8deg); }
@media (max-width: 900px) { .deco-card { display: none; } .final-band { padding: 64px 22px; } }

/* =====================================================================
   SUPPORT
   ===================================================================== */
.support-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 56px; align-items: start; }
.support-grid .sec-head { margin: 0; }
.support-card { background: var(--card); border: 1.5px solid var(--edge); border-radius: 18px; padding: 28px; box-shadow: 5px 5px 0 var(--pop-c); }
.cform .row { display: flex; gap: 14px; flex-wrap: wrap; }
.cform .fld { flex: 1; min-width: 180px; margin-bottom: 14px; }
.cform label { display: block; font-weight: 700; font-size: 13px; margin-bottom: 6px; color: var(--ink); }
.cform input, .cform textarea { width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 13px; font: inherit; background: var(--bg); color: var(--ink); }
.cform input:focus, .cform textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cform input::placeholder, .cform textarea::placeholder { color: var(--muted); }
.cform textarea { min-height: 120px; resize: vertical; }
.form-ok { display: none; background: var(--tint-g); border: 1.5px solid var(--check); color: var(--ink); border-radius: 12px; padding: 14px; margin-bottom: 14px; font-weight: 600; }
@media (max-width: 800px) { .support-grid { grid-template-columns: 1fr; gap: 24px; } .support-card { padding: 22px 18px; } }

/* =====================================================================
   FOOTER
   ===================================================================== */
footer { padding: 36px 0; border-top: 1.5px solid var(--line); color: var(--muted); font-size: 14px; }
.foot-in { display: flex; justify-content: space-between; gap: 14px 24px; flex-wrap: wrap; align-items: center; }
.foot-brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; color: var(--ink); font-size: 16px; letter-spacing: -.02em; }
.foot-brand img { border-radius: 6px; }
.foot-in a { text-decoration: none; font-weight: 600; }
.foot-in a:hover { color: var(--ink); }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.foot-lang { display: flex; gap: .4rem; font-weight: 700; }
.foot-lang .cur { color: var(--ink); }
.foot-lang .sep { opacity: .5; }

/* reveal-on-scroll (the page script adds .in) */
.reveal { opacity: 1; transform: none; }
html.js-anim .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); }
html.js-anim .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .fk-sample, .fk-tile-shot img, .btn, .fk-lib-feat, .fk-lib-goal { transition: none !important; }
}

/* Japanese: Bricolage has no kana/kanji, so headings fall to the system
   Japanese face; tight Latin tracking would crush it, and phrase-aware
   breaking keeps words together. */
:lang(ja) h1, :lang(ja) h2, :lang(ja) h3 {
  font-family: var(--display), "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
  letter-spacing: 0; line-height: 1.2; word-break: auto-phrase;
}
:lang(ja) .hero h1 { letter-spacing: 0; line-height: 1.18; font-size: clamp(36px, 5.2vw, 66px); }
:lang(ja) .fk-sample-hint, :lang(ja) .fk-lib-h, :lang(ja) .app-qr span { font-family: "Hiragino Maru Gothic ProN", "Zen Maru Gothic", var(--hand), sans-serif; font-size: 18px; }
@media (max-width: 400px) {
  .step .strip { padding: 12px; gap: 8px 8px; }
  .step .strip .bars { gap: 3px; }
  .step .strip i { width: 10px; }
}
