/*
 * senkainetwork.com — the only stylesheet.
 *
 * Set on 2026-11-02 for the public release, on the Android app's own design
 * system (docs/design/2026-10-31-ui-rework-spec.md): one green, two faces,
 * no shadows in dark, no red for ordinary states. The register is the
 * document, not the campaign (docs/design/2026-09-14-reference-teardown.md):
 * a definition in the first line, evidence under it, nothing that moves.
 *
 * Rules this file keeps:
 *   - every colour is a token on :root, redefined once for dark;
 *   - fonts are served from this site (assets/fonts), never from a third party;
 *   - the one alert colour is for genuine security matters only (an unverified
 *     download); "not yet" states are neutral;
 *   - every control is at least 48px tall; the page works at 320px wide;
 *   - nothing animates, and reduced-motion is honoured anyway.
 */

/* --- faces ------------------------------------------------------------- */

@font-face {
    font-family: "Plus Jakarta Sans";
    src: url("fonts/PlusJakartaSans-Variable.ttf") format("truetype");
    font-weight: 200 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "IBM Plex Mono";
    src: url("fonts/IBMPlexMono-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "IBM Plex Mono";
    src: url("fonts/IBMPlexMono-SemiBold.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* --- tokens ------------------------------------------------------------ */

:root {
    color-scheme: light dark;

    --hero: #0B5F44;
    --hero-inner: #0F7050;
    --on-hero: #FFFFFF;
    --on-hero-muted: #CFE6DC;
    --accent: #0B7A54;
    --accent-text: #0A6E4D;
    --accent-well: #E3F3EC;
    --on-accent: #FFFFFF;

    --paper: #F4F7F5;
    --surface: #FFFFFF;
    --well: #EEF2EF;
    --line: #E6ECE8;
    --outline: #848F89;

    --ink: #0F1A15;
    --ink-body: #3A4A43;
    --ink-meta: #5C6B64;

    --alert: #A5231C;
    --alert-bg: #FBECEA;

    --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

    --radius-hero: 24px;
    --radius-card: 20px;
    --radius-box: 16px;
    --radius-well: 14px;
    --shadow-card: 0 3px 12px rgba(15, 26, 21, 0.06);
    --shadow-hero: 0 12px 32px rgba(11, 95, 68, 0.28);

    --measure: 42rem;
    --gutter: clamp(1rem, 4vw, 2rem);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --hero: #0F4E38;
        --hero-inner: #135C43;
        --on-hero-muted: #BFD9CD;
        --accent: #2FB886;
        --accent-text: #2FB886;
        --accent-well: #1C3129;
        --on-accent: #151E1A;

        --paper: #0C1310;
        --surface: #151E1A;
        --well: #1E2A25;
        --line: #223029;
        --outline: #5E6E67;

        --ink: #ECF2EE;
        --ink-body: #C5D2CB;
        --ink-meta: #94A49C;

        --alert: #F09A93;
        --alert-bg: #2A1816;

        --shadow-card: none;
        --shadow-hero: none;
    }
}

/* --- base -------------------------------------------------------------- */

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: auto;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink-body);
    font-family: var(--sans);
    font-size: 1rem;
    line-height: 1.65;
    font-feature-settings: "kern";
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
    color: var(--ink);
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 0.6em;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

h1 { font-size: clamp(1.95rem, 2vw + 1.4rem, 2.45rem); }
h2 { font-size: clamp(1.55rem, 1.2vw + 1.2rem, 1.95rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }

p, ul, ol, dl, table, figure, blockquote { margin: 0 0 1.1rem; }
p, li, dd { max-width: var(--measure); }

a {
    color: var(--accent-text);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.16em;
}

a:hover, a:focus-visible { text-decoration-thickness: 2px; }

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

strong { color: var(--ink); font-weight: 600; }

small { font-size: 0.875rem; }

hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 3rem 0;
}

code, kbd, .mono {
    font-family: var(--mono);
    font-size: 0.92em;
}

code {
    background: var(--well);
    border-radius: 6px;
    padding: 0.1em 0.4em;
    color: var(--ink);
    overflow-wrap: anywhere;
}

pre {
    font-family: var(--mono);
    font-size: 0.9rem;
    background: var(--well);
    border-radius: var(--radius-box);
    padding: 1rem 1.2rem;
    overflow-x: auto;
    color: var(--ink);
}

pre code { background: none; padding: 0; }

q { quotes: "\201C" "\201D"; font-style: italic; color: var(--ink); }

img, svg { max-width: 100%; height: auto; }

/* A figure the server decided is a receipt: monospaced, never shrunk. */
.figure, .num, time, .as-of {
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
}

.as-of { color: var(--ink-meta); font-size: 0.875rem; }

.skip {
    position: absolute;
    left: -999px;
    top: 0.5rem;
    background: var(--surface);
    color: var(--ink);
    padding: 0.6rem 1rem;
    border-radius: 999px;
    z-index: 100;
}

.skip:focus { left: 0.5rem; }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* --- layout ------------------------------------------------------------ */

.wrap {
    width: min(100% - 2 * var(--gutter), 72rem);
    margin-inline: auto;
}

.wrap-narrow {
    width: min(100% - 2 * var(--gutter), 48rem);
    margin-inline: auto;
}

main { display: block; }

.section {
    padding: clamp(3rem, 7vw, 5.5rem) 0;
}

.section + .section { border-top: 1px solid var(--line); }

.section-soft { background: var(--surface); }

/* The beat: kicker, heading, two sentences, one link. */
.kicker {
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-meta);
    margin: 0 0 0.9rem;
}

.beat-head { max-width: var(--measure); margin-bottom: 1.6rem; }
.beat-head h2 { margin-bottom: 0.5rem; }
.beat-head p { font-size: 1.1rem; }

.more {
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    min-height: 48px;
}

.more::after { content: "\2192"; margin-left: 0.4em; }
.more:hover, .more:focus-visible { text-decoration: underline; }

.columns {
    display: grid;
    gap: 2rem 3rem;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    align-items: start;
}

/* --- masthead ---------------------------------------------------------- */

.masthead {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.masthead-row {
    display: flex;
    align-items: center;
    gap: 1rem 2rem;
    flex-wrap: wrap;
    min-height: 72px;
    padding: 0.6rem 0;
}

.lockup {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: var(--ink);
    font-weight: 600;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
    min-height: 48px;
}

.lockup svg { width: 32px; height: 32px; flex: none; }

.lockup small {
    display: block;
    font-weight: 400;
    font-size: 0.8rem;
    color: var(--ink-meta);
    line-height: 1.2;
}

.site-nav { margin-left: auto; }

.site-nav ul {
    display: flex;
    gap: 0.25rem 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.site-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 0 0.75rem;
    border-radius: 999px;
    text-decoration: none;
    color: var(--ink-body);
    font-weight: 500;
    font-size: 0.95rem;
}

.site-nav a[aria-current="page"],
.site-nav a:hover,
.site-nav a:focus-visible {
    background: var(--accent-well);
    color: var(--accent-text);
}

/* --- buttons ----------------------------------------------------------- */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 52px;
    padding: 0 1.5rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    border: 1.5px solid transparent;
    cursor: pointer;
    font-family: inherit;
}

.button-primary {
    background: var(--accent);
    color: var(--on-accent);
}

.button-primary:hover, .button-primary:focus-visible { background: var(--hero); }

.button-secondary {
    background: transparent;
    color: var(--ink);
    border-color: var(--outline);
}

.button-secondary:hover, .button-secondary:focus-visible {
    border-color: var(--accent-text);
    color: var(--accent-text);
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.5rem 0 1rem;
}

/* --- hero -------------------------------------------------------------- */

.hero {
    padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2rem, 5vw, 4rem);
}

.hero-layout {
    display: grid;
    gap: 2.5rem 4rem;
    grid-template-columns: minmax(0, 1.25fr) minmax(16rem, 0.75fr);
    align-items: center;
}

.hero h1 {
    font-size: clamp(2rem, 2.6vw + 1.2rem, 2.75rem);
    max-width: 24ch;
}

.hero .sub {
    font-size: 1.2rem;
    line-height: 1.55;
    color: var(--ink-body);
    max-width: 38rem;
}

/* The plain-speaking line: body size, a rule on the left, never grey. */
.plain {
    border-left: 3px solid var(--hero);
    padding: 0.2rem 0 0.2rem 1rem;
    margin: 1.5rem 0;
    color: var(--ink);
    max-width: 38rem;
}

.under-button {
    font-size: 0.875rem;
    color: var(--ink-meta);
    margin-top: 0;
}

/* The one honest picture: a screenshot of the app, labelled as such. */
.shot {
    margin: 0;
    justify-self: center;
    width: min(100%, 300px);
}

.shot img {
    display: block;
    width: 100%;
    border-radius: 28px;
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow-card);
}

.shot figcaption {
    font-size: 0.8rem;
    color: var(--ink-meta);
    text-align: center;
    margin-top: 0.75rem;
}

/* The three doors. */
.router {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
}

.router a {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-height: 64px;
    padding: 1rem 1.2rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-box);
    text-decoration: none;
    color: var(--ink);
    font-weight: 600;
}

.router a small { color: var(--ink-meta); font-weight: 400; }

.router a:hover, .router a:focus-visible { border-color: var(--accent-text); }

/* --- the hour timeline ------------------------------------------------- */

.timeline {
    counter-reset: step;
    list-style: none;
    margin: 2rem 0;
    padding: 0;
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.timeline li {
    counter-increment: step;
    position: relative;
    padding-top: 2.6rem;
    max-width: none;
}

.timeline li::before {
    content: counter(step);
    position: absolute;
    top: 0; left: 0;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--accent-well);
    color: var(--accent-text);
    font-family: var(--mono);
    font-weight: 600;
    font-size: 0.85rem;
    display: grid;
    place-items: center;
}

.timeline li::after {
    content: "";
    position: absolute;
    top: 15px; left: 40px; right: -1.25rem;
    border-top: 1px solid var(--line);
}

.timeline li:last-child::after { display: none; }

.timeline strong { display: block; margin-bottom: 0.2rem; }
.timeline small { color: var(--ink-meta); display: block; }

/* --- the comparison pair ----------------------------------------------- */

.pair {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-box);
    overflow: hidden;
}

.pair th, .pair td {
    padding: 0.9rem 1rem;
    text-align: left;
    vertical-align: top;
    border-top: 1px solid var(--line);
    width: 50%;
}

.pair thead th {
    border-top: 0;
    background: var(--well);
    color: var(--ink);
    font-weight: 600;
}

/* --- panels and lists -------------------------------------------------- */

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    padding: 1.5rem 1.6rem;
    box-shadow: var(--shadow-card);
}

.panel > :last-child { margin-bottom: 0; }

.panel-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    align-items: start;
}

.check-list, .plain-list, .install-steps {
    padding-left: 1.3rem;
}

.check-list li, .plain-list li, .install-steps li { margin-bottom: 0.6rem; }

.never {
    list-style: none;
    padding: 0;
    margin: 0;
}

.never li {
    padding: 0.6rem 0 0.6rem 1.6rem;
    position: relative;
    border-top: 1px solid var(--line);
}

.never li:first-child { border-top: 0; }

.never li::before {
    content: "\2715";
    position: absolute;
    left: 0; top: 0.65rem;
    font-size: 0.8rem;
    color: var(--ink-meta);
}

/* "Not yet" is a neutral state. */
.state-note {
    background: var(--well);
    border-radius: var(--radius-box);
    padding: 1rem 1.2rem;
    color: var(--ink-body);
}

.state-note > :last-child { margin-bottom: 0; }

/* The alert colour: security matters the visitor must act on, only. */
.notice {
    background: var(--alert-bg);
    border: 1px solid var(--alert);
    border-left-width: 4px;
    border-radius: var(--radius-box);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    color: var(--ink);
}

.notice > :first-child { margin-top: 0; }
.notice > :last-child { margin-bottom: 0; }
.notice strong { color: var(--alert); }

/* --- tables and facts -------------------------------------------------- */

.scroller {
    overflow-x: auto;
    margin: 0 0 1.5rem;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-box);
    overflow: hidden;
}

caption {
    text-align: left;
    caption-side: top;
    color: var(--ink-meta);
    font-size: 0.875rem;
    padding: 0 0 0.6rem;
}

th, td {
    padding: 0.7rem 0.9rem;
    text-align: left;
    vertical-align: top;
    border-top: 1px solid var(--line);
}

thead th {
    border-top: 0;
    background: var(--well);
    color: var(--ink);
    font-weight: 600;
    font-size: 0.85rem;
}

tbody th { font-weight: 500; color: var(--ink); }

tfoot th, tfoot td { background: var(--well); color: var(--ink); font-weight: 600; }

td.num, th.num { text-align: right; white-space: nowrap; }

dl.facts {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 0.5rem 1.5rem;
    margin: 1.25rem 0;
    padding: 1rem 1.2rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-box);
    max-width: var(--measure);
}

dl.facts dt { color: var(--ink-meta); }
dl.facts dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }

.unavailable { color: var(--ink-meta); font-style: italic; font-family: var(--sans); }

/* --- downloads --------------------------------------------------------- */

.downloads {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    margin: 1.5rem 0;
    padding: 0;
    list-style: none;
}

.downloads li { max-width: none; }

.download {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-height: 64px;
    border: 1px solid var(--line);
    border-radius: var(--radius-box);
    padding: 1rem 1.15rem;
    background: var(--surface);
    text-decoration: none;
    color: var(--ink);
}

a.download { border-color: var(--accent-text); }

a.download:hover, a.download:focus-visible {
    background: var(--accent-well);
}

.download[aria-disabled="true"] { color: var(--ink-body); }

.download .name { font-weight: 600; }

.download .state { font-size: 0.875rem; color: var(--ink-meta); }

/* Status is never carried by colour alone: a text label is always present. */
.download .state::before { content: "\2014  "; }

a.download .state { color: var(--accent-text); }

.release-facts {
    display: grid;
    gap: 0.6rem;
    margin: 1rem 0 1.25rem;
}

.release-facts > div {
    display: grid;
    grid-template-columns: minmax(9rem, 12rem) minmax(0, 1fr);
    gap: 0.25rem 1rem;
    align-items: baseline;
    border-top: 1px solid var(--line);
    padding-top: 0.6rem;
}

.release-facts dt { font-weight: 600; font-size: 0.9rem; color: var(--ink); }

.release-facts dd {
    margin: 0;
    font-size: 0.9rem;
    color: var(--ink);
    overflow-wrap: anywhere;
    font-family: var(--mono);
}

.release-facts dd.fingerprint { font-size: 0.8rem; }

.release-facts dd[data-pending="true"] {
    color: var(--ink-meta);
    font-family: var(--sans);
    font-style: italic;
}

.release-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    margin-top: 2rem;
}

.release-block h3 { margin-bottom: 0.75rem; }

.release-block p, .release-block li { font-size: 0.95rem; }

.release-footnote { font-size: 0.85rem; color: var(--ink-meta); }

/* --- document pages ---------------------------------------------------- */

.doc-head {
    padding: clamp(2.5rem, 6vw, 4.5rem) 0 2rem;
}

.doc-head .lede {
    font-size: 1.2rem;
    line-height: 1.55;
    max-width: 38rem;
}

.doc-layout {
    display: grid;
    gap: 3rem;
    grid-template-columns: minmax(0, 1fr);
    padding-bottom: 4rem;
}

.doc-body section { margin-bottom: 3rem; scroll-margin-top: 1rem; }

.doc-body h2 { padding-top: 0.5rem; }

.contents {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-box);
    padding: 1rem 1.2rem;
    align-self: start;
}

.contents h2 { font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-meta); font-family: var(--mono); }

.contents ol { margin: 0; padding-left: 1.2rem; }

.contents li { margin: 0.35rem 0; font-size: 0.95rem; max-width: none; }

.contents a { text-decoration: none; display: inline-block; min-height: 32px; }

.contents a:hover, .contents a:focus-visible { text-decoration: underline; }

.status-banner {
    background: var(--accent-well);
    border-radius: var(--radius-box);
    padding: 1.2rem 1.4rem;
    margin: 1.5rem 0 2rem;
    color: var(--ink);
}

.status-banner > :last-child { margin-bottom: 0; }

.status-banner dt { font-weight: 600; margin-top: 0.6rem; }
.status-banner dd { margin: 0 0 0.3rem; }

/* --- footer ------------------------------------------------------------ */

.site-footer {
    border-top: 1px solid var(--line);
    background: var(--surface);
    padding: 3rem 0 2rem;
    font-size: 0.95rem;
}

.footer-grid {
    display: grid;
    gap: 2rem 3rem;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

.footer-grid h2 {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-family: var(--mono);
    color: var(--ink-meta);
    margin-bottom: 0.75rem;
}

.footer-grid ul { list-style: none; margin: 0; padding: 0; }

.footer-grid li { margin: 0.3rem 0; }

.footer-grid a { display: inline-block; min-height: 32px; }

.footer-bottom {
    margin-top: 2.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
    color: var(--ink-meta);
    font-size: 0.85rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 2rem;
    justify-content: space-between;
}

.footer-bottom p { margin: 0; max-width: none; }

/* --- motion ------------------------------------------------------------ */

/* Nothing on this site moves by itself. This rule exists so that nothing
   added later can, without a deliberate edit here. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* --- widths ------------------------------------------------------------ */

@media (min-width: 60rem) {
    .doc-layout {
        grid-template-columns: 15rem minmax(0, 1fr);
    }

    .contents {
        position: sticky;
        top: 1rem;
        max-height: calc(100vh - 2rem);
        overflow: auto;
    }
}

@media (max-width: 56rem) {
    .hero-layout { grid-template-columns: 1fr; }

    .shot { width: min(100%, 260px); }

    .timeline { grid-template-columns: 1fr; gap: 0; }

    .timeline li {
        padding: 0 0 1.4rem 3rem;
    }

    .timeline li::before { top: 0; }

    .timeline li::after {
        top: 36px; bottom: 0; left: 15px; right: auto;
        border-top: 0;
        border-left: 1px solid var(--line);
    }

    .release-details { grid-template-columns: 1fr; }
}

@media (max-width: 440px) {
    .masthead-row { gap: 0.5rem 1rem; }

    .lockup { font-size: 1.1rem; }

    .site-nav { margin-left: 0; width: 100%; }

    .site-nav a { padding: 0 0.6rem; font-size: 0.9rem; min-height: 44px; }

    .button { width: 100%; }

    .release-facts > div { grid-template-columns: 1fr; }

    .pair th, .pair td { padding: 0.7rem 0.6rem; font-size: 0.9rem; }

    dl.facts { grid-template-columns: 1fr; gap: 0.1rem 0; }

    dl.facts dt { margin-top: 0.6rem; }
}

/* --- print ------------------------------------------------------------- */

@media print {
    .masthead, .site-footer, .skip, .button-row { display: none; }
    body { background: #fff; color: #000; }
    a { color: inherit; }
}
