/* The landing site's own small stylesheet (PLAN.md Q11): the app's colours, nothing else of the app's style.css */
:root {
    --bg: #f6f6f3;
    --surface: #ffffff;
    --border: #dcdcd4;
    --field-border: #878c92; /* the language select: 3:1 against the page */
    --text: #22262b;
    --muted: #5f6468;
    --heading: #1b1f24;
    --accent: #1f7d46;
    --accent-text: #ffffff;
    --highlight: #ffe58a;
    --scroll-track: #d4d4cc; /* the scrollbar's track: a darker grey under the green thumb, as in the app */
    --radius: 0.5rem;
    color-scheme: light dark;
}
/* Dark colours: from the device's setting, unless light was chosen with the theme button (site.js), or chosen dark */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #15171a;
        --surface: #1d2024;
        --border: #3a3f45;
    --field-border: #737980;
        --field-border: #737980;
        --text: #e5e7ea;
        --muted: #a3a8ae;
        --heading: #f1f3f5;
        --accent: #5fd38d;
        --accent-text: #0c1a11;
        --highlight: #6b5a12;
        --scroll-track: #0e1012;
    }
}
:root[data-theme="dark"] {
    --bg: #15171a;
    --surface: #1d2024;
    --border: #3a3f45;
    --text: #e5e7ea;
    --muted: #a3a8ae;
    --heading: #f1f3f5;
    --accent: #5fd38d;
    --accent-text: #0c1a11;
    --highlight: #6b5a12;
    --scroll-track: #0e1012;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--accent) var(--scroll-track); } /* a green scrollbar, as in the app */
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 1.0625rem/1.65 system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
}
body > header, main, body > footer { max-width: 60rem; margin: 0 auto; padding: 0 1rem; }
body > header {
    display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; justify-content: space-between;
    padding-top: 1rem; padding-bottom: 1rem;
}
.brand { display: flex; align-items: center; gap: 0.5rem; color: var(--heading); font-weight: 700; font-size: 1.25rem; text-decoration: none; }
nav { display: flex; gap: 1rem; align-items: center; }
h1, h2, h3 { color: var(--heading); line-height: 1.25; }
h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 1rem; }
h2 { font-size: 1.6rem; margin: 0 0 1rem; }
h3 { font-size: 1.1rem; margin: 0 0 0.25rem; }
a { color: var(--accent); }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.button {
    display: inline-block; padding: 0.7rem 1.3rem; border-radius: var(--radius);
    background: var(--accent); color: var(--accent-text); font-weight: 600; text-decoration: none;
}
.button.secondary { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.button:hover { filter: brightness(1.08); }
nav .button { padding: 0.45rem 1rem; }
main > section { padding: 2.5rem 0; border-top: 1px solid var(--border); }
main > section:first-child { border-top: 0; }
.hero { text-align: center; padding-top: 3rem; }
.lead { font-size: 1.2rem; max-width: 40rem; margin: 0 auto 1.5rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }
.hero-art { display: block; width: min(100%, 22rem); height: auto; margin: 1.5rem auto 0; }
@media (min-width: 52rem) { /* text beside the illustration */
    .hero { display: grid; grid-template-columns: 3fr 2fr; gap: 2rem; align-items: center; text-align: left; }
    .hero .lead { margin-left: 0; }
    .hero .actions { justify-content: flex-start; }
    .hero-art { margin: 0; width: 100%; }
}
.memory figure { margin: 0; text-align: center; }
.memory img { width: min(100%, 36rem); height: auto; }
.memory figcaption { max-width: 40rem; margin: 0.75rem auto 0; }
.key { display: inline-block; width: 1.4em; height: 0.35em; border-radius: 1em; vertical-align: middle; }
.key.grey { background: repeating-linear-gradient(90deg, #9aa0a6 0 5px, transparent 5px 9px); }
.key.orange { width: 0.7em; height: 0.7em; background: #f2a541; }
.key.green { background: #2e9d5b; }
.growth { text-align: center; }
.stages { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.5rem; list-style: none; padding: 0; margin: 1.5rem 0 0; }
.stages li { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; min-width: 5rem; font-weight: 600; }
.benefits img, .steps img { display: block; margin-bottom: 0.5rem; }
.price img { width: min(100%, 15rem); height: auto; }
.small { color: var(--muted); font-size: 0.9rem; }
.example { text-align: center; }
.card {
    max-width: 32rem; margin: 0 auto 1rem; padding: 1.5rem; text-align: left;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: 0 2px 8px rgb(0 0 0 / 0.06);
}
.card-front { font-size: 1.3rem; margin: 0; }
.card hr { border: 0; border-top: 1px solid var(--border); margin: 1rem 0; }
.card-meaning, .card-translation { margin: 0.25rem 0; }
mark { background: var(--highlight); color: inherit; padding: 0 0.15em; border-radius: 0.2em; }
.benefits, .steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; padding: 0; }
.benefits { list-style: none; }
.steps { list-style: none; counter-reset: step; }
.steps li { counter-increment: step; position: relative; }
.steps li::before { /* the step number, inside the card's top-right corner */
    content: counter(step); position: absolute; top: 1rem; right: 1.25rem;
    width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center;
    background: var(--accent); color: var(--accent-text); font-weight: 700;
}
.benefits li, .steps li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; }
.benefits p, .steps p { margin: 0; }
.price { text-align: center; }
.price p { max-width: 40rem; margin-left: auto; margin-right: auto; }
.price-amount { font-size: 1.15rem; }
.price-amount strong { font-size: 1.6rem; color: var(--heading); }
body > footer { padding-top: 2rem; padding-bottom: 2rem; color: var(--muted); font-size: 0.9rem; text-align: center; }
body > footer .controls { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.75rem 1.5rem; }
.language { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.5rem; margin: 0; }
.language label { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 600; }
.language select { font: inherit; padding: 0.3rem 0.5rem; color: var(--text); background: var(--surface); border: 1px solid var(--field-border); border-radius: var(--radius); }
.language button { font: inherit; font-size: 0.85rem; padding: 0.3rem 0.8rem; color: var(--accent-text); background: var(--accent); border: 0; border-radius: var(--radius); cursor: pointer; }
.articles { list-style: none; padding: 0; }
.articles li { padding: 1rem 0; border-top: 1px solid var(--border); }
.articles h2 { font-size: 1.25rem; margin: 0 0 0.25rem; }
.articles p { margin: 0; color: var(--muted); }
.article { max-width: 44rem; margin: 0 auto; padding: 2rem 0; }
.article table { border-collapse: collapse; width: 100%; margin: 1rem 0; }
.article th, .article td { border: 1px solid var(--border); padding: 0.4rem 0.6rem; text-align: left; vertical-align: top; }
.article th { background: var(--surface); }
.cta { margin-top: 2.5rem; padding: 1.25rem 1.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); text-align: center; }
.draft { display: inline-block; padding: 0.2rem 0.6rem; border-radius: var(--radius); background: var(--highlight); font-size: 0.9rem; }
/* Footer links, as in the app (public/style.css); the separators are for text browsers (Lynx, Dillo) and hidden elsewhere */
body > footer nav { display: block; margin: 1.25rem 0 0.75rem; }
body > footer nav div { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.25rem; }
body > footer nav a { font-weight: 500; color: var(--muted); text-decoration: none; }
body > footer nav a:hover { color: var(--accent); }
.sep { visibility: hidden; color: var(--bg); }
.legal { max-width: 44rem; margin: 0 auto; padding: 2rem 0; }
.legal h2 { font-size: 1.3rem; margin-top: 2rem; }
.legal dt { font-weight: bold; margin-top: 1rem; }
.legal dd { margin: 0.25rem 0 0; }
.faq details { border-bottom: 1px solid var(--border); padding: 0.75rem 0; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--heading); }
.faq details p { margin: 0.5rem 0 0; }
.faq .actions { justify-content: flex-start; margin-top: 2rem; }

/* With JS (site.js marks <html>): the theme button, and Dashboard instead of Log in / Sign up when the app says signed in */
.theme { display: none; justify-content: center; gap: 0.5rem; margin: 0; }
:root.js .theme { display: flex; }
.theme button { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.35rem 0.85rem; font: inherit; font-size: 0.85rem;
    color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; }
.theme .to-light { display: none; }
:root[data-theme="dark"] .theme .to-light { display: inline-flex; }
:root[data-theme="dark"] .theme .to-dark { display: none; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) .theme .to-light { display: inline-flex; }
    :root:not([data-theme]) .theme .to-dark { display: none; }
}
:root:not([data-signed-in]) .signed-in, :root[data-signed-in] .signed-out { display: none !important; }

/* Accessibility (PLAN.md 12.8): text only screen readers hear, and the "Skip to content" link, hidden until it has focus */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 0.75rem; top: -3rem; z-index: 10; padding: 0.5rem 0.9rem; border-radius: var(--radius);
    color: var(--accent-text); background: var(--accent); font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 0.75rem; }
main:focus { outline: none; } /* focused only by the skip link, which moves on to it */
