/* Studlo website. Theme "Ink and check" (docs/LANDING_PLAN.md §5).
   Colours carry meaning: indigo = action, teal = right / remembered, rose = mistake. */

@font-face { font-family: "Bricolage"; src: url("../fonts/bricolage-latin.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/figtree-latin.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }

:root {
    --paper: #FAFAF7;
    --paper-2: #F2F1EB;
    --card: #FFFFFF;
    --ink: #16142B;
    --ink-2: #48465E;
    --ink-3: #7B798F;
    --line: #E3E1D8;
    --rule: #E8E6F3;
    /* Hover is a wash of the ink over whatever is underneath, not a colour of its own, so
       one rule is right on paper and on a card, and in both themes: --ink is dark on light
       and light on dark, so the wash darkens or lightens to suit without a second rule. */
    --wash: color-mix(in oklab, var(--ink) 6%, transparent);
    --wash-strong: color-mix(in oklab, var(--ink) 10%, transparent);
    --brand: #4F46E5;
    --brand-deep: #3730A3;
    --brand-soft: #EEF0FF;
    --on-brand: #FFFFFF;
    --teal: #14B8A6;
    --teal-ink: #0F766E;
    --teal-soft: #E7F8F5;
    --rose: #E11D48;
    --rose-soft: #FFF0F2;
    --amber: #B45309;
    --shadow: 0 1px 2px rgba(22, 20, 43, .06), 0 12px 32px -12px rgba(22, 20, 43, .18);
    --radius: 18px;
    --head: "Bricolage", ui-sans-serif, system-ui, sans-serif;
    --body: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --wrap: 1180px;
    --gutter: 20px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --paper: #0F0E1A;
        --paper-2: #15142A;
        --card: #1B1A31;
        --ink: #EEEDF7;
        --ink-2: #BAB8CC;
        --ink-3: #8A88A0;
        --line: #2B2945;
        --rule: #24223C;
        --brand: #7F78F8;
        --brand-deep: #A5A0FF;
        --brand-soft: #232153;
        --teal: #2DD4BF;
        --teal-ink: #5EEAD4;
        --teal-soft: #11302E;
        --rose: #FB7185;
        --rose-soft: #35141E;
        --amber: #FBBF24;
        --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 40px -16px rgba(0, 0, 0, .7);
    }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
    margin: 0; background: var(--paper); color: var(--ink);
    font: 17px/1.6 var(--body); font-feature-settings: "ss01";
    -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
    overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--brand); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--brand-deep); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--head); color: var(--ink); margin: 0; letter-spacing: -0.025em; font-weight: 750; }
h1 { font-size: clamp(2.6rem, 8.6vw, 5rem); line-height: .98; letter-spacing: -0.04em; font-weight: 800; }
h2 { font-size: clamp(2rem, 5.4vw, 3.25rem); line-height: 1.04; letter-spacing: -0.035em; }
h3 { font-size: 1.3rem; line-height: 1.2; }
p { margin: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(72px, 11vw, 136px) 0; }
.eyebrow { font: 600 .8rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; }
.lede { font-size: clamp(1.08rem, 2.2vw, 1.25rem); line-height: 1.55; color: var(--ink-2); max-width: 36em; margin-top: 18px; }
.small { font-size: .9rem; color: var(--ink-3); }
.mark-right { color: var(--teal-ink); }
.mark-wrong { color: var(--rose); }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px; padding: 0 22px; border-radius: 14px; border: 0;
    background: var(--brand); color: var(--on-brand); font: 700 1rem/1 var(--body);
    text-decoration: none; cursor: pointer; box-shadow: 0 3px 0 var(--brand-deep);
    transition: transform .15s ease-out, box-shadow .15s ease-out;
}
.btn:hover { color: var(--on-brand); transform: translateY(-1px); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--brand-deep); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: .92rem; border-radius: 12px; }
@media (prefers-color-scheme: dark) { .btn { color: #0F0E1A; } .btn:hover { color: #0F0E1A; } }

/* Header */
.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; gap: 16px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo img { border-radius: 9px; }
.wordmark { font: 800 1.35rem/1 var(--head); letter-spacing: -0.03em; }
.wordmark span { color: var(--teal); }
.nav { display: none; align-items: center; gap: 4px; margin-left: 28px; }
.nav > a, .nav summary { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .96rem; padding: 10px 12px; border-radius: 10px; cursor: pointer; list-style: none; }
.nav > a:hover, .nav summary:hover { color: var(--ink); background: var(--paper-2); background: var(--wash); }
.nav summary::-webkit-details-marker { display: none; }
.nav summary::after { content: ""; display: inline-block; width: 7px; height: 7px; border: solid currentColor; border-width: 0 1.8px 1.8px 0; transform: translateY(-3px) rotate(45deg); margin-left: 8px; }
.nav-features { position: relative; }
.nav-panel { position: absolute; top: calc(100% + 10px); left: -12px; width: 560px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.nav-panel a { display: block; padding: 12px 14px; border-radius: 12px; text-decoration: none; }
.nav-panel a:hover, .nav-panel a[aria-current] { background: var(--paper-2); background: var(--wash); }
/* The open page in the menu reads as chosen, not merely hovered. */
.nav-panel a[aria-current] { background: var(--wash-strong); }
.nav-panel strong { display: block; color: var(--ink); font-size: .96rem; }
.nav-panel span { display: block; color: var(--ink-3); font-size: .86rem; line-height: 1.4; margin-top: 2px; }
.header-cta { margin-left: auto; }
.menu { position: static; }
.menu summary { list-style: none; width: 44px; height: 44px; display: grid; place-content: center; gap: 6px; cursor: pointer; border-radius: 12px; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary span { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s; }
.menu[open] summary span:first-child { transform: translateY(4px) rotate(45deg); }
.menu[open] summary span:last-child { transform: translateY(-4px) rotate(-45deg); }
.menu-panel { position: absolute; left: 0; right: 0; top: 64px; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 24px; display: grid; max-height: calc(100vh - 64px); overflow-y: auto; }
.menu-panel a { color: var(--ink); text-decoration: none; font-weight: 600; padding: 12px 0; border-bottom: 1px solid var(--line); }
.menu-label { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin: 18px 0 2px; font-weight: 700; }
@media (min-width: 960px) {
    .nav { display: flex; }
    .menu { display: none; }
}

/* Hero */
.hero { padding: clamp(36px, 7vw, 88px) 0 clamp(56px, 8vw, 104px); position: relative; }
.hero-grid { display: grid; gap: 48px; align-items: center; }
.hero h1 { max-width: 9.5em; }
.hero .lede { max-width: 31em; }
.hero-file { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 26px; padding: 7px 14px 7px 8px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; font-size: .9rem; color: var(--ink-2); }
.hero-file b { color: var(--ink); font-weight: 650; }
.file-ico { width: 26px; height: 26px; border-radius: 7px; background: var(--rose-soft); color: var(--rose); display: grid; place-items: center; font: 800 .58rem/1 var(--body); letter-spacing: .02em; }
.check-word { position: relative; white-space: nowrap; display: inline-block; }
.check-word svg { position: absolute; left: -2%; bottom: -.2em; width: 104%; height: .42em; overflow: visible; }
.check-word path { fill: none; stroke: var(--teal); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 400; stroke-dashoffset: 400; animation: draw 1s .45s cubic-bezier(.65, 0, .35, 1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.hero .cta { margin-top: 34px; }
.hero-art { position: relative; justify-self: center; width: min(78vw, 330px); }
.hero-art .phone { transform: rotate(2.5deg); }
.hero-note {
    position: absolute; left: -24%; top: 54%; width: 60%; background: var(--card); border: 1px solid var(--line);
    border-radius: 14px; padding: 14px 16px 16px; box-shadow: var(--shadow); transform: rotate(-4deg);
    font-size: .82rem; line-height: 1.45; color: var(--ink-2);
    background-image: repeating-linear-gradient(to bottom, transparent 0 22px, var(--rule) 22px 23px); background-position: 0 38px;
}
.hero-note b { display: block; font: 700 .72rem/1 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.hero-note .hl { background: color-mix(in srgb, var(--teal) 22%, transparent); padding: 0 2px; border-radius: 3px; color: var(--ink); }
.hero-tag { position: absolute; right: -8%; bottom: 22%; background: var(--teal-soft); color: var(--teal-ink); border-radius: 12px; padding: 10px 14px; font-weight: 700; font-size: .86rem; display: flex; align-items: center; gap: 8px; box-shadow: var(--shadow); transform: rotate(-2deg); }
.hero-tag svg { width: 18px; height: 18px; }
@media (min-width: 960px) {
    .hero-grid { grid-template-columns: 1.15fr .85fr; gap: 40px; }
    .hero-art { width: 320px; }
}
@media (max-width: 520px) {
    .hero-note { left: -8%; width: 60%; top: 52%; font-size: .74rem; }
    .hero-tag { right: -4%; }
}

/* Phone frame: thin and flat, the screenshot is the star */
.phone { margin: 0; border-radius: 34px; padding: 7px; background: #16142B; box-shadow: var(--shadow); }
.phone img { border-radius: 28px; width: 100%; aspect-ratio: 9 / 16; object-fit: cover; object-position: top; background: #F5F6FA; }
@media (prefers-color-scheme: dark) { .phone { background: #2E2C4A; } }

/* Play CTA */
.cta { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.play-badge { display: inline-block; margin: -14px -12px; border-radius: 14px; }
.play-badge img { width: 210px; }
.cta-note { font-size: .9rem; color: var(--ink-3); margin-top: 10px; }
.ios-only { display: none; }
.is-ios .ios-only { display: block; color: var(--ink-2); font-weight: 600; }
.is-ios .android-only { display: none; }
.qr { display: none; align-items: center; gap: 14px; padding-left: 28px; border-left: 1px solid var(--line); font-size: .86rem; color: var(--ink-3); line-height: 1.35; }
.qr svg { width: 92px; height: 92px; border-radius: 10px; background: #fff; padding: 4px; border: 1px solid var(--line); }
@media (min-width: 960px) and (hover: hover) { .qr { display: flex; } }

/* Sticky install bar (mobile only) */
.sticky-cta {
    position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 50;
    display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px;
    background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
    transform: translateY(140%); transition: transform .25s ease-out;
}
.sticky-cta.show { transform: none; }
.sticky-cta img { border-radius: 9px; }
.sticky-cta span { font-size: .88rem; color: var(--ink-3); line-height: 1.25; flex: 1; }
.sticky-cta strong { display: block; color: var(--ink); font-size: .98rem; }
.is-ios .sticky-cta { display: none; }
@media (min-width: 960px) { .sticky-cta { display: none; } }

/* Problem: three ruled lines, like a page of notes */
.problem { background: var(--paper-2); }
.ruled { list-style: none; margin: 34px 0 0; padding: 0; counter-reset: r; }
.ruled li { counter-increment: r; display: grid; grid-template-columns: 52px 1fr; align-items: baseline; padding: 22px 0; border-bottom: 1.5px solid var(--line); font: 650 clamp(1.3rem, 3.4vw, 2rem)/1.2 var(--head); letter-spacing: -0.02em; color: var(--ink); }
.ruled li:first-child { border-top: 1.5px solid var(--line); }
.ruled li::before { content: "0" counter(r); font: 600 .85rem/1 var(--body); color: var(--rose); letter-spacing: .06em; }
.ruled li em { font-style: normal; color: var(--ink-3); }
.problem-grid { display: grid; gap: 24px; }
@media (min-width: 960px) { .problem-grid { grid-template-columns: .8fr 1.2fr; gap: 64px; align-items: end; } .ruled { margin-top: 0; } }

/* How it works */
.steps { list-style: none; padding: 0; margin: 56px 0 0; display: grid; gap: 56px; }
.step { display: grid; gap: 22px; }
.step-num { font: 700 .85rem/1 var(--body); color: var(--brand); letter-spacing: .1em; }
.step h3 { font-size: clamp(1.5rem, 3vw, 1.9rem); margin: 10px 0 10px; }
.step p { color: var(--ink-2); max-width: 30em; }
.step .phone { width: min(70vw, 270px); }
.step-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tag { font-size: .84rem; font-weight: 600; padding: 6px 11px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink-2); }
@media (min-width: 960px) {
    .steps { grid-template-columns: repeat(3, 1fr); gap: 40px; }
    .step { align-content: start; }
    .step:nth-child(2) { margin-top: 72px; }
    .step:nth-child(3) { margin-top: 144px; }
    .step .phone { width: 100%; max-width: 280px; }
}

/* Live demo */
.demo { background: var(--ink); color: #EEEDF7; }
.demo h2, .demo .eyebrow { color: #FFFFFF; }
.demo .eyebrow { color: #A8A6C2; }
.demo .lede { color: #BAB8CC; }
@media (prefers-color-scheme: dark) { .demo { background: #090814; border-block: 1px solid var(--line); } }
.demo-grid { display: grid; gap: 28px; margin-top: 48px; }
.page-sheet {
    background: #FBFAF4; color: #2A2840; border-radius: 6px 18px 18px 6px; padding: 26px 26px 22px 46px; position: relative;
    font-size: .98rem; line-height: 1.75; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6);
    background-image: linear-gradient(to right, transparent 30px, #F3B4BF 30px 31.5px, transparent 31.5px);
}
.page-sheet h3 { color: #16142B; font-size: 1.1rem; margin-bottom: 10px; letter-spacing: -0.01em; }
.page-sheet p + p { margin-top: 12px; }
.page-sheet .meta { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: #8A889C; margin-bottom: 8px; font-weight: 700; }
.page-sheet .pno { position: absolute; right: 18px; bottom: 12px; font-size: .78rem; color: #8A889C; }
.page-sheet mark { background: transparent; box-shadow: inset 0 -.45em 0 rgba(20, 184, 166, .28); color: inherit; transition: box-shadow .3s; }
.quiz { background: var(--card); color: var(--ink); border-radius: 22px; padding: 22px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6); }
.quiz-top { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.quiz-bar { flex: 1; height: 10px; border-radius: 99px; background: var(--paper-2); overflow: hidden; }
.quiz-bar i { display: block; height: 100%; width: 33.3%; background: var(--teal); border-radius: 99px; transition: width .35s ease-out; }
.quiz-count { font: 700 .76rem/1 var(--body); letter-spacing: .12em; color: var(--ink-3); text-transform: uppercase; }
.q { border: 0; margin: 0; padding: 0; min-width: 0; }
.q[hidden] { display: none; }
.q legend { font: 700 clamp(1.25rem, 3vw, 1.5rem)/1.2 var(--head); letter-spacing: -0.02em; margin-bottom: 18px; padding: 0; }
.opt {
    display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 14px 16px; margin-bottom: 10px;
    background: var(--paper); border: 1.5px solid var(--line); border-bottom-width: 4px; border-radius: 16px; cursor: pointer;
    font: 500 1rem/1.35 var(--body); color: var(--ink); transition: border-color .15s, background .15s, transform .1s;
}
.opt:hover:not(:disabled) { border-color: var(--brand); }
.opt:active:not(:disabled) { transform: translateY(1px); }
.opt:disabled { cursor: default; }
.opt .k { flex: none; width: 32px; height: 32px; border-radius: 10px; border: 1.5px solid var(--line); display: grid; place-items: center; font-weight: 700; font-size: .85rem; color: var(--ink-3); }
.opt.right { border-color: #16A34A; background: #EFFBF3; color: #14532D; }
.opt.right .k { background: #16A34A; border-color: #16A34A; color: #fff; }
.opt.wrong { border-color: var(--rose); background: var(--rose-soft); }
.opt.wrong .k { background: var(--rose); border-color: var(--rose); color: #fff; }
.opt.dim { opacity: .55; }
@media (prefers-color-scheme: dark) { .opt.right { background: #0F2A1B; color: #BBF7D0; } }
.why { margin-top: 6px; padding: 14px 16px; border-radius: 14px; background: var(--paper-2); font-size: .95rem; color: var(--ink-2); }
.why[hidden] { display: none; }
.why strong { color: var(--ink); }
.why .src { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: .82rem; font-weight: 700; color: var(--ink-3); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px; }
.quiz-next { margin-top: 14px; width: 100%; }
.quiz-next[hidden] { display: none; }
.notebook { margin-top: 18px; border-top: 1px dashed var(--line); padding-top: 14px; }
.notebook-h { display: flex; justify-content: space-between; font-size: .82rem; font-weight: 700; color: var(--ink-3); letter-spacing: .04em; }
.notebook-h b { color: var(--rose); }
.notebook ul { list-style: none; padding: 0; margin: 8px 0 0; }
.notebook li { font-size: .9rem; padding: 8px 10px; border-radius: 10px; background: var(--rose-soft); margin-top: 6px; animation: slidein .35s ease-out; }
.notebook li span { display: block; font-size: .78rem; color: var(--rose); font-weight: 700; }
.notebook-empty { font-size: .88rem; color: var(--ink-3); margin-top: 6px; }
@keyframes slidein { from { opacity: 0; transform: translateY(-6px); } }
.quiz-done[hidden] { display: none; }
.quiz-done h3 { font-size: 1.5rem; }
.quiz-done p { color: var(--ink-2); margin: 10px 0 18px; }
.tick { width: 56px; height: 56px; margin-bottom: 14px; }
.tick circle { fill: var(--teal-soft); }
.tick path { fill: none; stroke: var(--teal); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; }
.drawn .tick path { animation: draw .6s .1s ease-out forwards; }
@media (min-width: 960px) {
    .demo-grid { grid-template-columns: 1fr 1.05fr; gap: 48px; align-items: start; }
    .page-sheet { transform: rotate(-1.2deg); margin-top: 24px; }
}

/* Feature rows (split layout, alternating) */
.feature-row { display: grid; gap: 40px; align-items: center; }
.feature-row + .feature-row { margin-top: clamp(80px, 12vw, 140px); }
.feature-row .phone { width: min(70vw, 290px); justify-self: center; }
.feature-row h2 { font-size: clamp(1.9rem, 4.6vw, 2.9rem); }
.points { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 14px; }
.points li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; color: var(--ink-2); }
.points li::before { content: ""; width: 20px; height: 20px; margin-top: 3px; border-radius: 6px; background: var(--teal-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%230F766E' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat; }
.points strong { color: var(--ink); }
.text-link { display: inline-block; margin-top: 26px; font-weight: 700; text-decoration: none; }
.text-link::after { content: " →"; }
@media (min-width: 960px) {
    .feature-row { grid-template-columns: 1fr 1fr; gap: 80px; }
    .feature-row.flip > :first-child { order: 2; }
}

/* Revision loop strip */
.loop { background: var(--paper-2); }
.timeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 36px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 6%; right: 6%; top: 21px; height: 2px; background: var(--line); }
.tl { position: relative; text-align: center; font-size: .84rem; color: var(--ink-3); }
.tl i { display: grid; place-items: center; width: 44px; height: 44px; margin: 0 auto 10px; border-radius: 14px; background: var(--card); border: 1.5px solid var(--line); font-style: normal; font-weight: 800; color: var(--ink); position: relative; }
.tl.miss i { border-color: var(--rose); color: var(--rose); background: var(--rose-soft); }
.tl.ok i { border-color: var(--teal); color: var(--teal-ink); background: var(--teal-soft); }
.tl b { display: block; color: var(--ink); font-size: .9rem; }
.loop-cards { display: grid; gap: 16px; margin-top: 48px; }
.loop-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.loop-card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.loop-card p { color: var(--ink-2); font-size: .98rem; }
.loop-card .big { font: 800 2.4rem/1 var(--head); letter-spacing: -0.04em; margin-bottom: 14px; display: block; }
@media (min-width: 760px) { .loop-cards { grid-template-columns: 1.3fr 1fr 1fr; } }

/* Audience chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.chip { font: 650 1rem/1 var(--body); padding: 13px 18px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); }
.chip small { color: var(--ink-3); font-weight: 500; margin-left: 6px; font-size: .86rem; }

/* Languages */
.scripts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 30px; font: 600 clamp(1.4rem, 3.6vw, 2.2rem)/1.3 var(--body); color: var(--ink-3); }
.scripts span:nth-child(3n+1) { color: var(--ink); }
.lang-grid { display: grid; gap: 40px; }
@media (min-width: 960px) { .lang-grid { grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; } }

/* Trust */
.trust-list { list-style: none; padding: 0; margin: 40px 0 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.trust-list li { background: var(--paper); padding: 26px; }
.trust-list h3 { font-size: 1.12rem; margin-bottom: 8px; }
.trust-list p { color: var(--ink-2); font-size: .97rem; }
@media (min-width: 760px) { .trust-list { grid-template-columns: 1fr 1fr; } }

/* FAQ */
.faq-grid { display: grid; gap: 36px; }
.faq-list details { border-bottom: 1.5px solid var(--line); }
.faq-list details:first-child { border-top: 1.5px solid var(--line); }
.faq-list summary { list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative; font: 650 1.1rem/1.35 var(--head); letter-spacing: -0.01em; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 14px; height: 14px; margin-top: -7px; background: linear-gradient(currentColor, currentColor) center / 14px 2px no-repeat, linear-gradient(currentColor, currentColor) center / 2px 14px no-repeat; transition: transform .2s; }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-a { padding: 0 0 22px; color: var(--ink-2); max-width: 40em; }
@media (min-width: 960px) { .faq-grid { grid-template-columns: .8fr 1.2fr; gap: 80px; } }

/* Final CTA */
.final { border-top: 1px solid var(--line); }
.final-inner { display: grid; gap: 36px; align-items: end; }
.final h2 { font-size: clamp(2.4rem, 7vw, 4.4rem); line-height: 1; }
.final .check-word::after { content: ""; position: absolute; left: 0; right: 0; bottom: .02em; height: .12em; background: var(--teal); border-radius: 99px; }
@media (min-width: 960px) { .final-inner { grid-template-columns: 1.3fr 1fr; } .final .cta { justify-content: flex-end; } }

/* Feature pages */
.crumbs { font-size: .88rem; color: var(--ink-3); margin-bottom: 26px; }
.crumbs a { color: var(--ink-3); }
.answer { margin-top: 26px; padding: 18px 20px; border-left: 3px solid var(--teal); background: var(--card); border-radius: 0 14px 14px 0; color: var(--ink-2); max-width: 36em; }
.prose { max-width: 42em; }
.prose h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin-bottom: 18px; }
.prose p { color: var(--ink-2); margin-top: 14px; }
.prose p strong { color: var(--ink); }
.steps-list { list-style: none; padding: 0; margin: 28px 0 0; counter-reset: s; display: grid; gap: 18px; }
.steps-list li { counter-increment: s; display: grid; grid-template-columns: 44px 1fr; gap: 14px; color: var(--ink-2); }
.steps-list li::before { content: counter(s); width: 36px; height: 36px; border-radius: 11px; background: var(--brand-soft); color: var(--brand); font-weight: 800; display: grid; place-items: center; }
.steps-list strong { color: var(--ink); display: block; font-size: 1.05rem; }
.sample { margin-top: 30px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.sample-h { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--ink-3); margin-bottom: 12px; }
.sample p { color: var(--ink); }
.sample ol { margin: 12px 0 0; padding-left: 0; list-style: none; display: grid; gap: 8px; }
.sample ol li { padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--line); color: var(--ink-2); }
.sample ol li.is-right { border-color: #16A34A; color: var(--ink); font-weight: 600; }
.sample .src { display: inline-block; margin-top: 12px; font-size: .82rem; color: var(--ink-3); font-weight: 700; }
.related { display: grid; gap: 12px; margin-top: 30px; }
.related a { display: block; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); text-decoration: none; transition: border-color .15s, transform .15s; }
.related a:hover { border-color: var(--brand); transform: translateY(-2px); }
.related strong { display: block; color: var(--ink); font: 700 1.1rem/1.2 var(--head); }
.related span { display: block; color: var(--ink-3); font-size: .93rem; margin-top: 6px; }
@media (min-width: 760px) { .related { grid-template-columns: repeat(3, 1fr); } }
.two-col { display: grid; gap: 48px; }
@media (min-width: 960px) { .two-col { grid-template-columns: 1.25fr .75fr; gap: 80px; align-items: start; } .two-col .phone { position: sticky; top: 100px; } }

/* Study guides (blog) */
.guides-hero { padding-bottom: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.guide-kicker { font-size: .84rem; font-weight: 600; color: var(--ink-3); }
.learn { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.learn li { position: relative; padding-left: 26px; color: var(--ink-2); font-size: .97rem; line-height: 1.45; }
.learn li::before { content: ""; position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 5px; background: var(--teal-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%230F766E' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }
.learn-h { font: 700 .74rem/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-top: 14px; }

/* Guide art: small themed SVGs, no stock images */
.art { display: block; width: 100%; height: 100%; }
.art-bg { fill: var(--paper-2); }
.art-rule path { stroke: var(--rule); stroke-width: 1.5; }
.art-brand { fill: var(--brand); }
.art-brand-soft { fill: color-mix(in srgb, var(--brand) 26%, transparent); }
.art-rose-fill { fill: color-mix(in srgb, var(--rose) 70%, transparent); }
.art-teal-fill { fill: var(--teal); }
.art-teal-dot { fill: var(--teal-soft); stroke: var(--teal); stroke-width: 3; }
.art-teal-dot-sm { fill: var(--teal); }
.art-teal-solid { fill: var(--teal); }
.art-check { fill: none; stroke: var(--teal-ink); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.art-check-sm { fill: none; stroke: #fff; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.art-forget { fill: none; stroke: var(--rose); stroke-width: 3; stroke-dasharray: 7 7; }
.art-review { fill: none; stroke: var(--teal); stroke-width: 4.5; stroke-linejoin: round; stroke-linecap: round; }
.art-card { fill: var(--card); stroke: var(--line); stroke-width: 1.5; }
.art-line-ink { fill: var(--ink); }
.art-line-soft { fill: var(--line); }
.art-q { fill: #fff; font: 800 64px var(--head); }

/* Featured guide */
.guides-featured { padding: 24px 0 8px; }
.featured-card { display: grid; background: var(--card); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; text-decoration: none; box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.featured-card:hover { transform: translateY(-2px); border-color: var(--brand); }
.featured-art { aspect-ratio: 16 / 10; }
.featured-body { padding: 26px 24px 28px; }
.featured-body h2 { font-size: clamp(1.7rem, 4.6vw, 2.5rem); line-height: 1.08; margin: 10px 0 12px; }
.featured-body p { color: var(--ink-2); }
.featured-body .text-link { margin-top: 20px; }
@media (min-width: 900px) {
    .featured-card { grid-template-columns: 1.05fr 1fr; align-items: stretch; }
    .featured-art { aspect-ratio: auto; min-height: 340px; }
    .featured-body { padding: 44px 44px; align-self: center; }
}

/* Start here path */
.start-here { padding-bottom: 32px; }
.path { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 12px; counter-reset: none; }
.path a { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); text-decoration: none; transition: border-color .15s, transform .15s; height: 100%; }
.path a:hover { border-color: var(--brand); transform: translateY(-2px); }
.path-num { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font: 800 1.2rem/1 var(--head); color: var(--brand); background: var(--brand-soft); }
.path-text strong { display: block; color: var(--ink); font: 700 1.05rem/1.25 var(--head); letter-spacing: -0.01em; }
.path-text span { display: block; font-size: .86rem; color: var(--ink-3); margin-top: 4px; }
@media (min-width: 900px) {
    .path { grid-template-columns: repeat(3, 1fr); position: relative; }
    .path li { position: relative; }
    .path li + li::before { content: ""; position: absolute; left: -12px; top: 50%; width: 12px; height: 2px; background: var(--line); }
}

/* All guides grid */
.guides-all { padding-top: 40px; }
.guide-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.guide-grid a { display: flex; flex-direction: column; height: 100%; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; transition: border-color .15s, transform .15s; }
.guide-grid a:hover { border-color: var(--brand); transform: translateY(-2px); }
.guide-art { aspect-ratio: 16 / 9; }
.guide-body { padding: 20px 22px 24px; }
.guide-body h3 { font-size: 1.3rem; line-height: 1.2; margin: 8px 0 0; }
.guide-body p { color: var(--ink-2); margin-top: 10px; }
@media (min-width: 700px) { .guide-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .guide-grid { grid-template-columns: repeat(3, 1fr); } }
.guide-meta, .article-meta { font-size: .88rem; color: var(--ink-3); }
@media (min-width: 900px) { .guide-list { grid-template-columns: repeat(2, 1fr); } }

.article-wrap { width: 100%; max-width: 720px; margin: 0 auto; padding: 0 var(--gutter); }
.article-head { padding-bottom: 8px; }
.article-head h1 { font-size: clamp(2.1rem, 6.4vw, 3.4rem); line-height: 1.05; letter-spacing: -0.035em; }
.article-meta { margin-top: 16px; }
.in-short { margin-top: 28px; background: var(--teal-soft); border-radius: var(--radius); padding: 20px 22px; }
.in-short-h { font: 700 .78rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--teal-ink); margin-bottom: 10px; }
.in-short ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--ink); }
.toc { margin-top: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.toc summary { cursor: pointer; padding: 14px 18px; font-weight: 700; list-style: none; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: " +"; color: var(--ink-3); }
.toc[open] summary::after { content: " −"; }
.toc ol { margin: 0; padding: 0 18px 16px 38px; display: grid; gap: 8px; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--brand); }

.article-body { padding-top: 24px; padding-bottom: clamp(56px, 9vw, 96px); font-size: 1.08rem; line-height: 1.75; }
.article-body > * + * { margin-top: 1.1em; }
.article-body h2 { font-size: clamp(1.55rem, 4.2vw, 2.1rem); line-height: 1.15; margin-top: 2.2em; scroll-margin-top: 90px; }
.article-body h3 { font-size: 1.22rem; margin-top: 1.8em; }
.article-body p, .article-body li { color: var(--ink-2); }
.article-body strong { color: var(--ink); }
.article-body ul, .article-body ol { padding-left: 1.3em; }
.article-body li + li { margin-top: .45em; }
.article-body li::marker { color: var(--brand); font-weight: 700; }
.article-body blockquote { margin: 1.6em 0; padding: 16px 20px; border-left: 3px solid var(--brand); background: var(--brand-soft); border-radius: 0 14px 14px 0; }
.article-body blockquote p { color: var(--ink); }
.article-body hr { border: 0; border-top: 1.5px solid var(--line); margin: 2.4em 0; }
.article-body code { font-size: .92em; background: var(--paper-2); padding: 1px 6px; border-radius: 6px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.table-wrap table { border-collapse: collapse; width: 100%; min-width: 480px; font-size: .95rem; line-height: 1.45; }
.table-wrap th, .table-wrap td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-2); }
.table-wrap th { color: var(--ink); font-weight: 700; background: var(--paper-2); }
.table-wrap tr:last-child td { border-bottom: 0; }
.figure { margin: 1.8em 0; padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.figure svg { width: 100%; height: auto; }
.figure figcaption { font-size: .88rem; color: var(--ink-3); margin-top: 10px; }
.curve-axis { stroke: var(--line); stroke-width: 2; fill: none; }
.curve-forget { stroke: var(--rose); stroke-width: 3; fill: none; stroke-dasharray: 6 6; }
.curve-review { stroke: var(--teal); stroke-width: 3.5; fill: none; stroke-linejoin: round; }
.curve-label { fill: var(--ink-2); font: 700 21px var(--body); }
.curve-dot { fill: var(--teal); }
.callout { padding: 16px 20px; border-radius: 14px; background: var(--paper-2); border: 1px solid var(--line); }
.callout.mistake { background: var(--rose-soft); border-color: transparent; }
.callout p { color: var(--ink); margin: 0; }
.inline-cta { display: grid; grid-template-columns: 48px 1fr; gap: 16px; margin: 2.2em 0 !important; padding: 20px; border-radius: var(--radius); background: var(--card); border: 1.5px solid var(--brand); box-shadow: var(--shadow); }
.inline-cta img { border-radius: 12px; }
.inline-cta p { font-size: .98rem; line-height: 1.55; color: var(--ink-2); margin: 0; }
.inline-cta .inline-cta-h { font: 700 1.1rem/1.25 var(--head); color: var(--ink); margin-bottom: 6px; }
.inline-cta .btn { margin-top: 14px; }
.is-ios .inline-cta .btn { display: none; }

/* Reveal on scroll (only when JS is on and motion is allowed) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .5s ease-out, transform .5s ease-out; }
.js .reveal.in { opacity: 1; transform: none; }

/* Footer */
.site-footer { background: var(--paper-2); padding: 64px 0 calc(28px + 84px); border-top: 1px solid var(--line); }
@media (min-width: 960px) { .site-footer { padding-bottom: 28px; } }
.footer-grid { display: grid; gap: 36px; }
.footer-brand p { color: var(--ink-2); margin-top: 14px; max-width: 24em; }
.footer-grid nav { display: grid; gap: 10px; align-content: start; }
.footer-grid nav a { color: var(--ink-2); text-decoration: none; overflow-wrap: anywhere; }
.footer-grid nav a:hover { color: var(--brand); }
.footer-h { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; margin-bottom: 4px; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); font-size: .84rem; color: var(--ink-3); }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }

/* 404 */
.notfound { min-height: 60vh; display: grid; align-content: center; }
.notfound .big { font: 800 clamp(5rem, 18vw, 10rem)/1 var(--head); letter-spacing: -0.06em; color: var(--rose); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0s !important; animation-delay: 0s !important; transition: none !important; scroll-behavior: auto !important; }
    .check-word path, .tick path { stroke-dashoffset: 0; }
    .js .reveal { opacity: 1; transform: none; }
}
