/*
 * Taku VPN — the whole design.
 *
 * Idea: stationery. Cool paper, ink, a graphite pencil, a blue pen and one yellow highlighter.
 * The type and the grid are plain and precise; the pencil strike, the handwriting and the
 * highlighter are the only ornaments, and each appears once or twice per screen at most.
 *
 * Layout: one 1120px column, left-aligned. No inline styles anywhere (the CSP forbids them).
 */

/* ---------------------------------------------------------------------------------------------
   Fonts (all served from this origin)
   --------------------------------------------------------------------------------------------- */
@font-face { font-family: "Onest"; src: url("/fonts/onest-latin.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Onest"; src: url("/fonts/onest-latin-ext.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Onest"; src: url("/fonts/onest-cyrillic.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap;
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; src: url("/fonts/onest-cyrillic-ext.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap;
    unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }

@font-face { font-family: "Caveat"; src: url("/fonts/caveat-latin.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Caveat"; src: url("/fonts/caveat-latin-ext.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Caveat"; src: url("/fonts/caveat-cyrillic.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap;
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

/* Only the Chinese characters the site writes by hand (see resources/fonts/build-hand-sc.sh). */
@font-face { font-family: "Taku Hand SC"; src: url("/fonts/hand-sc.woff2?v=28c1d03b47") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

/* ---------------------------------------------------------------------------------------------
   Tokens
   --------------------------------------------------------------------------------------------- */
:root {
    color-scheme: light;

    --paper: #F5F6F1;
    --paper-deep: #ECEEE6;
    --sheet: #FFFFFF;
    --card: #FFFEF9;
    --ink: #14171B;
    --ink-soft: #454B54;
    --ink-faint: #767D87;
    --rule: #D8DBD2;
    --graphite: #50565F;
    --pen: #2440D0;
    --marker: #FFE45E;
    --danger: #B3261E;
    --ruled-line: #D6DFEF;
    --margin-line: #F0B4AD;

    --font: "Onest", "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --hand: "Caveat", "Taku Hand SC", "Kaiti SC", "STKaiti", "KaiTi", cursive;

    --wrap: 70rem;
    --gutter: clamp(1.25rem, 4vw, 2.5rem);
    --tight: -0.035em;
    --paper-shadow: 0 1px 0 rgba(20, 23, 27, .05), 0 2px 6px rgba(20, 23, 27, .04), 0 22px 44px -30px rgba(20, 23, 27, .42);
}

/* ---------------------------------------------------------------------------------------------
   Base
   --------------------------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5.5rem; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font);
    font-size: 1.0625rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
::selection { background: var(--marker); color: var(--ink); }

:focus-visible { outline: 3px solid var(--pen); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.defs { position: absolute; }

.skip { position: absolute; left: var(--gutter); top: -4rem; z-index: 50; padding: .6rem 1rem; background: var(--ink); color: var(--paper); border-radius: 8px; text-decoration: none; font-weight: 600; }
.skip:focus { top: .75rem; }

h1 { font-size: clamp(2.55rem, 5.2vw + .85rem, 4.85rem); line-height: 1.02; letter-spacing: var(--tight); font-weight: 750; }
h2 { font-size: clamp(1.85rem, 2.2vw + 1.1rem, 2.85rem); line-height: 1.08; letter-spacing: -0.03em; font-weight: 720; }
h3 { font-size: 1.3rem; line-height: 1.25; letter-spacing: -0.015em; font-weight: 680; }

.lead { font-size: clamp(1.15rem, .5vw + 1.02rem, 1.375rem); line-height: 1.5; color: var(--ink-soft); max-width: 36em; }

/* Highlighter: a marker swipe along the lower half of the words. */
mark { background: linear-gradient(to top, transparent 7%, var(--marker) 7%, var(--marker) 46%, transparent 46%); color: inherit; padding-inline: .06em; margin-inline: -.06em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* Handwriting: the blue pen. */
.hand { font-family: var(--hand); font-weight: 600; letter-spacing: 0; }

/* Pencil strokes inherit their colour from the text they sit on. */
.scribble { overflow: visible; max-width: none; pointer-events: none; }
.struck { position: relative; display: inline-block; color: var(--ink-faint); }
.struck .strike { position: absolute; left: -8%; top: 50%; width: 116%; height: .9em; transform: translateY(-52%); color: var(--graphite); }
/* The line keeps its thickness however far the drawing is stretched over a word. */
.strike path { vector-effect: non-scaling-stroke; stroke-width: var(--stroke, 1.7px); }
.strike path + path { stroke-width: calc(var(--stroke, 1.7px) * .6); }

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: .9rem 1.45rem; border: 0; border-radius: 12px;
    background: var(--ink); color: var(--paper);
    font: inherit; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer;
    transition: background-color .15s ease, transform .15s ease;
}
.btn:hover { background: #2A3038; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.link { color: var(--pen); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .22em; }
.link::after { content: "\00a0\2192"; display: inline-block; text-decoration: none; transition: transform .15s ease; }
.link:hover { text-decoration-thickness: 2.5px; }
.link:hover::after { transform: translateX(3px); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; margin-top: 2.25rem; }

.section { padding-block: clamp(3.5rem, 8vw, 7rem); }
.section-head { max-width: 44rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.section-head .lead { margin-top: 1rem; }
.section-more { margin-top: clamp(2rem, 4vw, 3rem); }

.page-head { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(1.5rem, 3vw, 2.5rem); }
.page-head h1 { font-size: clamp(2.4rem, 4.6vw + .8rem, 4.25rem); }
.page-head .lead { margin-top: 1.4rem; }

/* ---------------------------------------------------------------------------------------------
   Header
   --------------------------------------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(245, 246, 241, .9); -webkit-backdrop-filter: saturate(1.2) blur(12px); backdrop-filter: saturate(1.2) blur(12px); }
.header-row { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.5rem); min-height: 4.5rem; }

.brand { display: inline-flex; align-items: baseline; gap: .42rem; color: var(--ink); text-decoration: none; }
.brand-name { position: relative; z-index: 0; font-size: 1.6rem; font-weight: 800; letter-spacing: -0.045em; line-height: 1; }
.brand-name::after { content: ""; position: absolute; z-index: -1; left: -.07em; right: -.07em; bottom: .02em; height: .36em; background: var(--marker); border-radius: 2px; transform: rotate(-1.4deg); }
.brand-tag { font-size: .7rem; font-weight: 700; letter-spacing: .14em; color: var(--ink-soft); }

.nav { display: flex; align-items: center; gap: clamp(1.1rem, 2.4vw, 2.1rem); margin-inline-start: auto; }
.nav a, .mobile-nav a { color: var(--ink); font-weight: 500; text-decoration: none; }
.nav a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .32em; }
.nav a[aria-current="page"]:not(.nav-pricing) { background: linear-gradient(to top, transparent 4%, var(--marker) 4%, var(--marker) 40%, transparent 40%); }

.nav-pricing { display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap; }
.nav-pricing:hover { text-decoration: none !important; }
.nav-pricing .hand { display: inline-block; color: var(--pen); font-size: 1.75em; font-weight: 700; line-height: .7; transform: rotate(-5deg) translateY(-.03em); transition: transform .15s ease; }
.nav-pricing:hover .hand { transform: rotate(-8deg) scale(1.06); }

.header-tools { display: flex; align-items: center; gap: 1rem; }

.login { display: inline-flex; align-items: center; gap: .45rem; color: var(--ink-faint); font-weight: 500; white-space: nowrap; cursor: default; }
.login small { padding: .12rem .42rem; border: 1px solid var(--rule); border-radius: 999px; font-size: .62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); background: var(--sheet); }

/* Language menu */
.lang { position: relative; }
.lang summary { display: inline-flex; align-items: center; gap: .45rem; padding: .38rem .6rem .38rem .42rem; border: 1px solid var(--rule); border-radius: 999px; background: var(--sheet); font-size: .84rem; font-weight: 650; letter-spacing: .02em; cursor: pointer; list-style: none; user-select: none; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover { border-color: #B9BEB4; }
.lang img, .suggest img { width: 1.25rem; height: 1.25rem; border-radius: 50%; box-shadow: 0 0 0 1px rgba(20, 23, 27, .14); }
.lang .chevron { color: var(--ink-faint); transition: transform .15s ease; }
.lang[open] .chevron { transform: rotate(180deg); }
.lang-list { position: absolute; z-index: 30; inset-inline-end: 0; top: calc(100% + .5rem); min-width: 12.5rem; padding: .4rem; background: var(--sheet); border: 1px solid var(--rule); border-radius: 14px; box-shadow: 0 18px 40px -18px rgba(20, 23, 27, .35); }
.lang-list a { display: flex; align-items: center; gap: .7rem; padding: .55rem .7rem; border-radius: 9px; font-size: .95rem; font-weight: 500; text-decoration: none; }
.lang-list a:hover { background: var(--paper); }
.lang-list a[aria-current="true"] { background: var(--paper); font-weight: 700; }

.menu-toggle { display: none; padding: .45rem .8rem; border: 1px solid var(--rule); border-radius: 999px; background: var(--sheet); color: var(--ink); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; }
.menu-toggle-close, .menu-toggle[aria-expanded="true"] .menu-toggle-open { display: none; }
.menu-toggle[aria-expanded="true"] .menu-toggle-close { display: inline; }

.mobile-nav { border-top: 1px solid var(--rule); background: var(--paper); }
.mobile-nav .wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 1.1rem; padding-block: 1.25rem 1.75rem; font-size: 1.25rem; }
.mobile-nav[hidden] { display: none; }

/* Language suggestion */
.suggest { background: var(--ink); color: var(--paper); font-size: .95rem; }
.suggest-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding-block: .65rem; }
.suggest p { margin: 0; margin-inline-end: auto; }
.suggest-switch { padding: .32rem .8rem; border-radius: 999px; background: var(--marker); color: var(--ink); font-weight: 650; text-decoration: none; }
.suggest-dismiss { color: #C9CED6; text-underline-offset: .2em; }

/* "We do not serve your country yet": a small sheet over the dimmed page (partials/notice) */
.notice { width: min(29rem, calc(100% - 2.5rem)); padding: 0; border: 0; border-radius: 12px; background: var(--sheet); color: var(--ink); box-shadow: 0 30px 80px -24px rgba(20, 23, 27, .55); }
.notice::backdrop { background: rgba(20, 23, 27, .5); }
.notice-body { padding: clamp(1.5rem, 5vw, 2.25rem); }
.notice h2 { font-size: clamp(1.45rem, 1.2vw + 1.2rem, 1.75rem); line-height: 1.15; }
.notice p { margin-top: .8rem; color: var(--ink-soft); }
.notice form { margin-top: 1.6rem; }
.notice-bar { margin: 0; padding: .7rem var(--gutter); background: var(--marker); color: var(--ink); text-align: center; }

/* ---------------------------------------------------------------------------------------------
   Home
   --------------------------------------------------------------------------------------------- */
.hero { padding-block: clamp(2.75rem, 6.5vw, 6rem) clamp(2rem, 4vw, 3.5rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.hero .lead { margin-top: 1.5rem; }

.hero-note { margin: 1.75rem 0 0; color: var(--pen); font-size: 1.55rem; line-height: 1.1; transform: rotate(-1.5deg); transform-origin: left center; }

/* The index card with the to-do list */
.hero-card { display: flex; justify-content: center; }
.note-card {
    --row: 3.3rem;
    --stroke: 2.1px;
    width: min(100%, 27rem);
    padding: 0 1.75rem 1.4rem;
    background-color: var(--card);
    background-image: linear-gradient(var(--margin-line), var(--margin-line)), repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--row) - 1px), var(--ruled-line) calc(var(--row) - 1px), var(--ruled-line) var(--row));
    background-size: 100% 2px, 100% 100%;
    background-position: 0 calc(var(--row) - 1px), 0 0;
    background-repeat: no-repeat;
    border-radius: 5px;
    box-shadow: var(--paper-shadow);
    transform: rotate(2deg);
}
.note-card-title { margin: 0; height: var(--row); display: flex; align-items: center; font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }
.note-card li { display: flex; align-items: center; gap: .85rem; height: var(--row); }
.note-card .box { flex: none; width: 1.45rem; height: 1.45rem; color: var(--graphite); }
.note-card .hand { position: relative; font-size: 1.95rem; line-height: 1; white-space: nowrap; }
.note-card .is-struck .hand { color: #7C838C; }
.note-card .is-struck .strike { position: absolute; left: -4%; top: 50%; width: 108%; height: .75em; transform: translateY(-46%); color: var(--graphite); }
.note-card .checked { position: relative; flex: none; display: inline-flex; }
.note-card .checked .tick { position: absolute; left: -.3rem; top: -1.05rem; width: 2.45rem; height: 2.45rem; color: var(--pen); }
.note-card-foot { margin: .7rem 0 0; color: var(--pen); font-size: 1.55rem; line-height: 1; text-align: end; transform: rotate(-2deg); }

/* Three plain points */
.triad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.75rem, 3.5vw, 3.25rem); }
.triad article, .feature-grid article { padding-top: 1.3rem; border-top: 3px solid var(--ink); }
.triad h3 { margin-bottom: .6rem; }
.triad p, .feature-grid p { color: var(--ink-soft); }

/* What we keep: two ruled notebook pages */
.ledger { background: var(--paper-deep); }
.ledger-pages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 2.5rem); align-items: start; }
.ruled {
    --row: 2.75rem;
    position: relative;
    padding: calc(var(--row) * .5) 1.5rem var(--row) 0;
    background-color: var(--sheet);
    background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--row) - 1px), var(--ruled-line) calc(var(--row) - 1px), var(--ruled-line) var(--row));
    background-position: 0 calc(var(--row) * .5);
    border-radius: 4px;
    box-shadow: var(--paper-shadow);
}
.ruled::before { content: ""; position: absolute; top: 0; bottom: 0; inset-inline-start: 3.5rem; width: 1.5px; background: var(--margin-line); }
.ruled h3 { padding-inline-start: 4.5rem; font-size: 1.2rem; line-height: var(--row); font-weight: 720; letter-spacing: -0.01em; }
.ruled .marks li { padding-inline-start: 4.5rem; line-height: var(--row); }
.ruled .marks .scribble { inset-inline-start: 1.15rem; top: calc(var(--row) * .5 - .68rem); }

.marks li { position: relative; padding-inline-start: 2.3rem; }
.marks .scribble { position: absolute; inset-inline-start: 0; top: .16em; width: 1.36rem; height: 1.36rem; }
.marks-no .scribble, .marks-todo .scribble { color: var(--graphite); }
.marks-yes .scribble { color: var(--pen); }

.footnote { margin-top: clamp(1.5rem, 3vw, 2.25rem); max-width: 46rem; color: var(--ink-soft); font-size: .98rem; }

/* Pricing, crossed out. Free, handwritten. */
.free-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.free-display { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1em .28em; margin: 0; font-size: clamp(3.1rem, 7.6vw, 6.5rem); font-weight: 760; letter-spacing: -0.045em; line-height: 1; }
.free-display .struck { color: #A3A9B0; }
.free-display .strike { height: .7em; --stroke: .056em; }
.free-display .hand { display: inline-block; color: var(--pen); font-size: 1.2em; font-weight: 700; line-height: .75; transform: rotate(-5deg); }
.free-copy .lead { margin-bottom: 1.25rem; }

/* ---------------------------------------------------------------------------------------------
   Features
   --------------------------------------------------------------------------------------------- */
.flow { display: flex; align-items: center; gap: clamp(.5rem, 2vw, 1.5rem); padding: clamp(1.5rem, 3.5vw, 2.75rem) clamp(1.25rem, 4vw, 3.25rem); background: var(--sheet); border-radius: 6px; box-shadow: var(--paper-shadow); color: var(--graphite); }
.flow-node { flex: none; width: clamp(5.25rem, 10.5vw, 7.75rem); margin: 0; text-align: center; }
.flow-node .sketch { width: 100%; height: auto; }
.flow .hand { display: block; color: var(--pen); font-size: clamp(1.25rem, 1.2vw + 1rem, 1.6rem); line-height: 1.05; }
.flow-node figcaption { margin: .35rem -3rem 0; white-space: nowrap; }
.flow-link { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: .15rem; }
.tunnel-h { width: 100%; height: 3.4rem; }
.tunnel-v, .flow-arrow-v { display: none; }
.flow-arrow { flex: none; width: clamp(2.75rem, 7vw, 5.5rem); }
.flow-arrow-h { width: 100%; height: 2.4rem; }
.flow-captions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem clamp(1.5rem, 4vw, 3rem); margin-top: 1.5rem; color: var(--ink-soft); }

.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 4vw, 3.25rem) clamp(2rem, 6vw, 6rem); }
.feature-grid h2 { margin-bottom: .6rem; font-size: 1.35rem; line-height: 1.25; letter-spacing: -0.015em; font-weight: 680; }

/* ---------------------------------------------------------------------------------------------
   Pricing
   --------------------------------------------------------------------------------------------- */
.plan-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(1.25rem, 3vw, 2.5rem); align-items: start; }
.plan { padding: clamp(1.5rem, 3vw, 2.5rem); border-radius: 10px; }
.plan header { margin-bottom: 1.5rem; }
.plan h2 { font-size: clamp(1.8rem, 2vw + 1.1rem, 2.4rem); }
.plan header p { margin-top: .5rem; color: var(--ink-soft); }
.plan .marks li + li { margin-top: .75rem; }
.plan-free { background: var(--sheet); border: 2.5px solid var(--ink); box-shadow: var(--paper-shadow); }
.plan-premium { border: 2px dashed #AAB0B8; color: var(--ink-soft); }
.plan-premium h2 { color: var(--ink); }
/* The rocket is doodled over the top right corner of the dashed sheet. */
.plan-premium { position: relative; }
.plan-premium h2 { padding-inline-end: 5.5rem; }
.rocket { position: absolute; top: -3.6rem; inset-inline-end: .25rem; width: 8.75rem; height: auto; color: var(--graphite); transition: transform .25s ease; }
.rocket-paper { fill: var(--paper); }
.rocket-flame { fill: var(--marker); }
.plan-premium:hover .rocket { transform: translate(6px, -7px); }
.plan-status { display: block; width: fit-content; margin: .45rem 0 0 .15rem; color: var(--pen); font-size: .78em; font-weight: 700; letter-spacing: 0; line-height: 1; transform: rotate(-3deg); transform-origin: left center; white-space: nowrap; }

.faq-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 2rem clamp(2rem, 6vw, 6rem); }
.faq dl { margin: 0; }
.faq dl > div { padding-block: 1.4rem; border-top: 1px solid var(--rule); }
.faq dl > div:last-child { border-bottom: 1px solid var(--rule); }
.faq dt { font-size: 1.2rem; font-weight: 680; letter-spacing: -0.01em; line-height: 1.3; }
.faq dd { margin: .5rem 0 0; color: var(--ink-soft); }

/* ---------------------------------------------------------------------------------------------
   Contact
   --------------------------------------------------------------------------------------------- */
.contact { padding-block: clamp(3rem, 7vw, 6rem); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.contact-copy h1 { font-size: clamp(2.4rem, 4.6vw + .8rem, 4.25rem); }
.contact-copy .lead { margin-top: 1.4rem; }
.contact-panel { padding: clamp(1.5rem, 3.5vw, 2.5rem); background: var(--sheet); border-radius: 10px; box-shadow: var(--paper-shadow); }

.field + .field { margin-top: 1.25rem; }
.field label { display: block; margin-bottom: .45rem; font-size: .95rem; font-weight: 620; }
.optional { margin-inline-start: .3rem; color: var(--ink-faint); font-size: .85rem; font-weight: 400; }
.field input, .field textarea { display: block; width: 100%; padding: .8rem .95rem; border: 1.5px solid #B7BDC5; border-radius: 10px; background: #fff; color: var(--ink); font: inherit; line-height: 1.5; }
.field textarea { min-height: 10rem; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { outline: 3px solid rgba(36, 64, 208, .28); outline-offset: 0; border-color: var(--pen); border-radius: 10px; }
.field.has-error input, .field.has-error textarea { border-color: var(--danger); }
.field-error { margin: .4rem 0 0; color: var(--danger); font-size: .9rem; }
.form-error { margin-bottom: 1.25rem; padding: .8rem 1rem; border-radius: 10px; background: #FBEAE8; color: #7A1C16; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.5rem; margin-top: 1.6rem; }
.privacy { margin: 0; color: var(--ink-faint); font-size: .9rem; }

.sent .tick { width: 3.6rem; height: 3.6rem; color: var(--pen); }
.sent h2 { margin-top: 1rem; font-size: clamp(1.6rem, 1.6vw + 1.1rem, 2.1rem); }
.sent p { margin-top: .75rem; color: var(--ink-soft); }

/* ---------------------------------------------------------------------------------------------
   Download, 404
   --------------------------------------------------------------------------------------------- */
.download { padding-top: clamp(1rem, 2vw, 2rem); }
.platforms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 2.5vw, 2rem); max-width: 48rem; }
.platforms li { display: flex; align-items: center; gap: 1.25rem; padding: 1.25rem 1.5rem; background: var(--sheet); border-radius: 10px; box-shadow: var(--paper-shadow); }
.platforms .sketch { flex: none; width: 4.25rem; color: var(--graphite); }
.platforms strong { display: block; font-size: 1.25rem; font-weight: 680; letter-spacing: -0.01em; }
.platforms .hand { display: inline-block; margin-top: .1rem; color: var(--pen); font-size: 1.5rem; line-height: 1; transform: rotate(-2deg); }
.download-note { margin-top: 2rem; max-width: 36em; color: var(--ink-soft); font-size: 1.15rem; }

.not-found { padding-bottom: clamp(4rem, 10vw, 8rem); }
.not-found-code { display: inline-block; margin: 0 0 .5rem; color: var(--pen); font-size: clamp(4rem, 10vw, 6.5rem); font-weight: 700; line-height: .8; transform: rotate(-5deg); }

/* ---------------------------------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------------------------------- */
.site-footer { margin-top: clamp(1rem, 3vw, 2.5rem); padding-block: clamp(2.5rem, 5vw, 4rem) 2rem; border-top: 1px solid var(--rule); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 2rem clamp(1.5rem, 4vw, 4rem); }
.footer-brand p { margin-top: .9rem; max-width: 22em; color: var(--ink-soft); text-wrap: balance; }
.footer-nav h2 { margin-bottom: .9rem; font-size: .74rem; font-weight: 700; letter-spacing: .14em; line-height: 1.4; text-transform: uppercase; color: var(--ink-faint); }
.footer-nav li + li { margin-top: .5rem; }
.footer-nav a { color: var(--ink-soft); text-decoration: none; }
.footer-nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: .25em; }
.footer-nav a[aria-current="true"] { color: var(--ink); font-weight: 650; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 2rem; margin-top: clamp(2rem, 4vw, 3rem); padding-top: 1.25rem; border-top: 1px solid var(--rule); color: var(--ink-faint); font-size: .875rem; }
.footer-base p { margin: 0; }

/* ---------------------------------------------------------------------------------------------
   Languages with long words: a slightly smaller headline keeps it to three lines
   --------------------------------------------------------------------------------------------- */
.lang-ru .hero h1, .lang-de .hero h1 { font-size: clamp(2.3rem, 4.3vw + .8rem, 4.2rem); }

/* ---------------------------------------------------------------------------------------------
   Chinese: no negative tracking, a little more air, its own handwriting font
   --------------------------------------------------------------------------------------------- */
.lang-zh { line-height: 1.75; }
.lang-zh h1, .lang-zh h2, .lang-zh h3, .lang-zh .free-display, .lang-zh .feature-grid h2, .lang-zh .faq dt { letter-spacing: 0; }
.lang-zh h1 { line-height: 1.16; }
.lang-zh h2 { line-height: 1.22; }
.lang-zh .lead { line-height: 1.7; }
.lang-zh .hand { font-family: "Taku Hand SC", "Caveat", "Kaiti SC", "STKaiti", "KaiTi", cursive; font-weight: 400; }
.lang-zh .note-card-title, .lang-zh .footer-nav h2 { font-size: .84rem; letter-spacing: .1em; }
.lang-zh .login small { font-size: .7rem; letter-spacing: .04em; }
.lang-zh .nav-pricing .hand { font-size: 1.45em; line-height: 1; }
.lang-zh .free-display .hand { font-size: 1.05em; line-height: 1; }
.lang-zh .note-card .hand { font-size: 1.5rem; }
.lang-zh .hero-note { font-size: 1.35rem; }
.lang-zh .note-card-foot, .lang-zh .platforms .hand { font-size: 1.3rem; }

/* ---------------------------------------------------------------------------------------------
   Narrow screens
   --------------------------------------------------------------------------------------------- */
@media (max-width: 62rem) {
    .hero-grid, .free-grid, .plan-grid, .faq-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); }
    .plan-grid { row-gap: 3.5rem; } /* room for the rocket above the second sheet */
    .hero-card { justify-content: flex-start; padding-inline: .5rem; }
    .note-card { transform: rotate(1.2deg); }
    .triad { grid-template-columns: minmax(0, 1fr); }
    .ledger-pages { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 58rem) {
    .nav, .header-row .login { display: none; }
    .menu-toggle { display: inline-block; }
    .header-tools { margin-inline-start: auto; gap: .6rem; }
}

@media (min-width: 58.01rem) {
    .mobile-nav { display: none !important; }
}

@media (max-width: 46rem) {
    .feature-grid, .flow-captions, .platforms { grid-template-columns: minmax(0, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-brand { grid-column: 1 / -1; }

    .flow { flex-direction: column; gap: .35rem; }
    .flow-node { width: 6.5rem; }
    .flow-link { flex: none; flex-direction: row; gap: .9rem; }
    .tunnel-h, .flow-arrow-h { display: none; }
    .tunnel-v { display: block; order: -1; width: 3.2rem; height: 6.5rem; }
    .flow-arrow { width: 2.2rem; }
    .flow-arrow-v { display: block; width: 100%; height: 3.6rem; }

    .ruled::before { inset-inline-start: 2.75rem; }
    .ruled h3, .ruled .marks li { padding-inline-start: 3.5rem; }
    .ruled .marks .scribble { inset-inline-start: .75rem; }
    .ruled { padding-inline-end: 1rem; }

    .rocket { top: -3rem; width: 7.25rem; }
    .plan-premium h2 { padding-inline-end: 4.75rem; }

    .note-card { --row: 2.75rem; padding-inline: 1.15rem; }
    .note-card .hand { font-size: 1.5rem; }
    .lang-zh .note-card .hand { font-size: 1.3rem; }
    .hero-note { font-size: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
}
