/* Author display rules would otherwise beat the UA rule for the hidden
   attribute; keep `hidden` authoritative everywhere. */
[hidden] { display: none !important; }
/* Fortress CMS — landing page
   White Swiss layout. Two visual anchors: the 3D mark and the download card. */

.landing-page { background: #fff; }

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

.hero {
    position: relative;
    padding: clamp(40px, 6vw, 78px) 0 clamp(32px, 5vw, 64px);
    border-bottom: 1px solid var(--line);
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute; inset: 0;
    background-image:
        linear-gradient(90deg, #f1f3f6 1px, transparent 1px),
        linear-gradient(180deg, #f1f3f6 1px, transparent 1px);
    background-size: 25% 100%, 100% 180px;
    opacity: .75;
    pointer-events: none;
    mask-image: linear-gradient(180deg, rgba(0,0,0,.9), rgba(0,0,0,.15));
}
.hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
    gap: clamp(28px, 5vw, 64px);
    align-items: center;
}
.hero-copy { max-width: 34rem; }

.hero-eyebrow {
    display: inline-flex; align-items: center; gap: .5rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    padding: .3rem .8rem .3rem .55rem;
    font-family: var(--mono);
    font-size: .66rem;
    line-height: 1;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink-2);
    margin: 0 0 clamp(18px, 2.5vw, 26px);
}
.hero-eyebrow > span { display: block; line-height: 1.2; padding-top: .05em; }
.hero-eyebrow .dot { border-radius: 50%; }
/* Flag: sized against the label, optically centred on the cap height. */
.flag-pill {
    width: 2.15em; height: 2.15em;
    flex: none; display: block; align-self: center;
}

.hero h1 {
    font-size: clamp(2.2rem, 4.4vw, 3.5rem);
    letter-spacing: -.045em;
    line-height: 1.02;
    margin: 0 0 clamp(16px, 2vw, 22px);
}
.hero h1 em {
    font-style: normal;
    /* Ink, not accent: the rotating line is part of the headline, so it carries
       the headline's weight and colour. */
    color: var(--ink);
    display: block;
    min-height: 1.06em;
    transition: opacity .32s ease, transform .32s ease;
}
.hero h1 em.is-swapping { opacity: 0; transform: translateY(-.16em); }
.hero-lead {
    font-size: clamp(.98rem, 1.2vw, 1.06rem);
    color: var(--ink-2);
    max-width: 32rem;
    margin: 0 0 clamp(20px, 2.5vw, 28px);
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.hero-meta {
    margin: 1.1rem 0 0;
    font-family: var(--mono);
    font-size: .72rem;
    letter-spacing: .04em;
    color: var(--dim);
}
.hero-meta span + span::before { content: "·"; margin: 0 .5rem; color: #c3c8d0; }

/* 3D stage */
.hero-visual { position: relative; }
.stage {
    position: relative;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fbfcfd;
    background-image:
        linear-gradient(180deg, rgba(10,102,255,.07), rgba(255,255,255,0) 55%),
        radial-gradient(circle at 50% 42%, #ffffff 0%, #f4f7fb 62%, #eef2f7 100%);
    overflow: hidden;
    padding: clamp(44px, 4.4vw, 62px) clamp(18px, 3vw, 34px) clamp(30px, 3.4vw, 46px);
}
.stage::before {
    content: "";
    position: absolute; inset: 0;
    background-image:
        linear-gradient(90deg, #e7ebf1 1px, transparent 1px),
        linear-gradient(180deg, #e7ebf1 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: radial-gradient(circle at 50% 45%, rgba(0,0,0,.7), transparent 72%);
    pointer-events: none;
}
.stage-tag {
    position: absolute; top: 12px; left: 12px;
    font-family: var(--mono); font-size: .6rem; letter-spacing: .14em;
    text-transform: uppercase; color: var(--dim);
    display: inline-flex; align-items: center; gap: .35rem;
}
.stage-tag b { color: var(--accent); font-weight: 400; }
.stage-logo {
    position: relative;
    width: clamp(190px, 24vw, 268px);
    margin: 0 auto;
    filter: drop-shadow(0 18px 24px rgba(10, 80, 220, .22));
}
/* Real 3D: the canvas replaces the flat mark as soon as it can render.
   The cube is anchored at the centre of its box and reacts to the pointer —
   it never drifts or floats. */
.stage-cube {
    display: block;
    width: clamp(212px, 29vw, 322px);
    aspect-ratio: 1;
    margin: 0 auto;
    cursor: grab;
    touch-action: pan-y;
}
.stage-cube:active { cursor: grabbing; }
/* Sits under the cube, sized from the projected footprint by cube.js. Anchored
   on the canvas centre so it tracks the cube instead of the (wider) grid cell. */
.cube-shadow {
    position: absolute;
    left: calc(50% + var(--shadow-dx, 0px));
    top: calc(50% + var(--shadow-dy, 40%));
    width: var(--shadow-w, 60%);
    height: var(--shadow-h, 14px);
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(11, 13, 16, .30), rgba(11, 13, 16, .13) 46%, rgba(11, 13, 16, 0) 78%);
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.stage-visual {
    position: relative;
    display: grid;
    place-items: center;
}
.stage-visual[hidden] { display: none; }

/* ----------------------------------------------------------------- trust */

.trust {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-bottom: 1px solid var(--line);
    background: #fff;
}
.trust > div {
    padding: 1rem clamp(10px, 1.6vw, 22px);
    border-left: 1px solid var(--line);
    display: flex; align-items: center; gap: .55rem;
    font-family: var(--mono);
    font-size: .73rem;
    letter-spacing: .01em;
    color: var(--ink-2);
}
.trust > div:first-child { border-left: 0; padding-left: 0; }
.trust svg { width: 15px; height: 15px; flex: none; color: var(--accent); }

/* --------------------------------------------------------------- compare */

.compare { border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; background: #fff; }
.compare-row {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.15fr) repeat(3, minmax(0, 1fr));
    border-bottom: 1px solid var(--line-soft);
    min-width: 860px;
}
.compare-row:last-child { border-bottom: 0; }
.compare-row > div {
    padding: .7rem clamp(10px, 1.4vw, 18px);
    font-size: .88rem;
    display: flex; align-items: center; gap: .5rem;
    border-left: 1px solid var(--line-soft);
    color: var(--ink-2);
}
.compare-row > div:first-child { border-left: 0; }
.compare-row.head { border-bottom: 1px solid var(--line); }
.compare-row.head > div {
    font-family: var(--mono);
    font-size: .64rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--dim);
    background: var(--bg-soft);
    padding-top: .8rem; padding-bottom: .8rem;
}
.compare-row.head .col-fortress { color: var(--ink); font-weight: 600; }
.compare-row .col-fortress { background: #f5f9fe; border-left: 1px solid #cfe2f8; color: var(--ink); font-weight: 500; }
.compare-row.head .col-fortress { background: var(--accent-soft); border-left: 2px solid var(--accent); }
.compare-row:not(.head):hover .col-fortress { background: #eef5fd; }
.mark { font-family: var(--sans); font-size: .78rem; width: 1rem; text-align: center; flex: none; line-height: 1; }
.mark-yes { color: var(--accent); }
.mark-no { color: #98a0ac; }
.mark-part { color: #8a929d; }
.compare-note { color: var(--dim); font-size: .78rem; margin-top: .9rem; }

/* ------------------------------------------------- new generation band */

.gen-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.gen-item { background: #fff; padding: clamp(1.1rem, 2vw, 1.5rem); display: grid; gap: .4rem; align-content: start; border-top: 2px solid var(--ink); }
.gen-num { font-family: var(--mono); font-size: .66rem; letter-spacing: .16em; color: var(--accent); }
.gen-item h3 { font-size: 1rem; letter-spacing: -.015em; margin: 0; }
.gen-item p { margin: 0; color: var(--dim); font-size: .87rem; }

/* -------------------------------------------------------------- security */

.sec-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.sec-card { background: #fff; padding: clamp(1rem, 2vw, 1.4rem); display: grid; gap: .35rem; align-content: start; }
.sec-num { font-family: var(--mono); font-size: .64rem; letter-spacing: .12em; color: var(--accent); }
.sec-card h3 { font-size: .95rem; margin: .1rem 0 0; }
.sec-card p { margin: 0; color: var(--dim); font-size: .85rem; }

/* ---------------------------------------------------------- sovereignty */

.sov-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 3vw, 32px); }
.sov-item { border-top: 2px solid var(--ink); padding-top: .9rem; }
.sov-item h3 { font-size: .98rem; margin: 0 0 .3rem; }
.sov-item p { margin: 0; color: var(--dim); font-size: .86rem; }
.sov-tag {
    display: inline-flex; align-items: center; gap: .35rem;
    font-family: var(--mono); font-size: .62rem; letter-spacing: .12em;
    text-transform: uppercase; color: var(--ink); margin-bottom: .45rem;
}

/* ---------------------------------------------------------------- modules */

.mod-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.mod-card { background: #fff; display: flex; flex-direction: column; }
.mod-card .mod-body { padding: 1rem 1.1rem 1.15rem; display: grid; gap: .2rem; border-top: 1px solid var(--line); }
.mod-card h3 { margin: 0; font-size: .95rem; }
.mod-card p { margin: 0; color: var(--dim); font-size: .84rem; }

.mod-visual {
    height: 148px;
    background: #f7f9fc;
    background-image: linear-gradient(180deg, #ffffff, #f4f7fb);
    padding: 14px;
    display: grid;
    align-content: center;
    gap: 7px;
    position: relative;
    overflow: hidden;
}
.sk {
    height: 7px;
    border-radius: 1px;
    background: #e2e7ee;
    width: 100%;
}
.sk.w40 { width: 40%; }
.sk.w55 { width: 55%; }
.sk.w70 { width: 70%; }
.sk.w85 { width: 85%; }
.sk.blue { background: #bcd7f4; }
.sk.dark { background: #cdd4dd; }
.sk.line { height: 1px; }
.mod-row { display: grid; grid-template-columns: 52px 1fr; gap: 8px; align-items: center; }
.mod-pill {
    height: 18px; border-radius: 2px;
    background: #fff; border: 1px solid #dde3ea;
    display: flex; align-items: center; padding: 0 6px;
    font-family: var(--mono); font-size: .56rem; letter-spacing: .08em;
    text-transform: uppercase; color: var(--dim);
    white-space: nowrap; overflow: hidden;
}
.mod-pill.on { border-color: #c9defa; background: var(--accent-soft); color: var(--accent-dark); }

.mod-file {
    background: #fff; border: 1px solid #dde3ea; border-radius: 2px;
    padding: 8px 9px;
    font-family: var(--mono); font-size: .6rem; line-height: 1.5; color: #58606c;
    display: grid; gap: 3px;
}
.mod-file b { color: var(--accent); font-weight: 400; }
.mod-file i { color: #a3aab5; font-style: normal; }

.mod-rec {
    background: #fff; border: 1px solid #dde3ea; border-radius: 2px;
    display: grid; grid-template-columns: 44px 1fr; gap: 9px; align-items: center;
    padding: 9px;
}
.mod-rec-dot {
    width: 44px; height: 44px; border-radius: 2px;
    background: #0b0d10;
    display: grid; place-items: center;
    color: #fff; font-family: var(--mono); font-size: .6rem;
}
.mod-rec-dot.rec { background: #b42318; }
.mod-rec-lines { display: grid; gap: 5px; }

/* --------------------------------------------------------------- themes */

.theme-showcase {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(14px, 2.2vw, 26px);
}
.tp { display: grid; gap: .9rem; align-content: start; }

/* A miniature browser window: the frame is what sells the preview. */
.tp-frame {
    border: 1px solid var(--line);
    border-radius: 3px;
    background: #fff;
    overflow: hidden;
    container-type: inline-size;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.tp:hover .tp-frame {
    border-color: #c9d0d9;
    box-shadow: 0 16px 34px rgba(11, 13, 16, .075);
    transform: translateY(-2px);
}
.tp-bar {
    display: flex; align-items: center; gap: 4px;
    padding: .42rem .55rem;
    border-bottom: 1px solid var(--line-soft);
    background: #fbfcfd;
}
.tp-bar i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink); opacity: .15; }
.tp-bar b {
    margin-left: auto;
    font-family: var(--mono); font-size: .54rem; font-weight: 400;
    letter-spacing: .1em; text-transform: uppercase; color: var(--dim);
}
.tp-view {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #fff;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    /* One type scale for the whole preview, so all three stay comparable.
       Sized from the frame width (container query) so a preview reads the same
       in one, two or three columns. The vw line is the fallback. */
    font-size: clamp(.58rem, .92vw, .8rem);
    font-size: clamp(.58rem, 3.65cqw, .8rem);
}

/* Mini site header — every theme preview starts with the same chrome. */
.tp-nav {
    display: flex; align-items: center; justify-content: space-between;
    gap: .5em; padding: .62em .8em;
    border-bottom: 1px solid var(--line);
}
.tp-mark { width: .62em; height: .62em; background: var(--ink); border-radius: 1px; }
.tp-links { display: flex; gap: .42em; }
.tp-links i { display: block; width: 1.55em; height: .12em; background: var(--ink); opacity: .22; }
.tp-nav-heavy { border-bottom: 2px solid var(--ink); padding-block: .7em; }
.tp-nav-sticky { background: rgba(255, 255, 255, .82); backdrop-filter: saturate(180%) blur(8px); padding-block: .85em; }

.tp-canvas { min-height: 0; overflow: hidden; }

/* — Aurora: white ground, hairline list, wide measure. */
.tp-aurora { padding: .95em 1em; display: grid; gap: .18em; align-content: start; }
.tp-kicker {
    margin: 0;
    font-family: var(--mono); font-size: .8em;
    letter-spacing: .16em; text-transform: uppercase; color: var(--accent);
}
.tp-aurora .tp-title {
    margin: .1em 0 0;
    font-family: var(--display); font-size: 2.1em;
    letter-spacing: -.04em; line-height: 1.05; color: var(--ink);
}
.tp-lead { margin: .15em 0 .5em; font-size: .92em; line-height: 1.35; color: var(--dim); }
.tp-aurora ul { list-style: none; margin: 0; padding: 0; display: grid; }
.tp-aurora li {
    display: grid; grid-template-columns: 1.9em minmax(0, 1fr);
    gap: .6em; align-items: baseline;
    padding: .78em 0;
    border-top: 1px solid var(--line);
    font-size: .94em; line-height: 1.25; color: var(--ink-2);
}
.tp-aurora li em {
    font-family: var(--mono); font-style: normal;
    font-size: .8em; letter-spacing: .06em; color: var(--dim);
}

/* — Editorial: heavy rule, narrow measure, drop cap. */
.tp-editorial { padding: 1.05em 1.15em; display: grid; gap: .1em; align-content: start; }
.tp-editorial .tp-title {
    margin: 0;
    font-family: var(--display); font-size: 2.35em;
    letter-spacing: -.05em; line-height: 1.02; color: var(--ink);
    max-width: 10em;
}
.tp-meta {
    margin: .5em 0 .7em; padding: .45em 0;
    border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
    font-family: var(--mono); font-size: .78em;
    letter-spacing: .08em; text-transform: uppercase; color: var(--dim);
}
.tp-lede {
    margin: 0 0 .7em; padding-left: .85em;
    border-left: 2px solid var(--ink);
    font-size: 1.02em; line-height: 1.4; color: var(--ink);
}
.tp-drop { margin: 0; max-width: 18em; line-height: 1.5; color: var(--ink-2); font-size: .95em; }
.tp-drop::first-letter {
    float: left;
    font-family: var(--display); font-size: 2.7em; line-height: .84;
    padding: .06em .1em 0 0; color: var(--ink);
}

/* — Studio: bento tiles, one elevated hero panel. */
.tp-studio {
    height: 100%;
    padding: .7em;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1.35fr 1fr .9fr;
    gap: .38em;
    background: #fff;
}
.tp-tile {
    border: 1px solid var(--line);
    border-radius: 2px;
    background: #fff;
    padding: .55em;
    display: grid; gap: .34em; align-content: end;
    min-width: 0;
}
.tp-tile-hero {
    grid-column: span 2;
    background: var(--accent-soft);
    border-color: var(--accent-line);
    padding: .7em .8em;
}
.tp-tag {
    font-family: var(--mono); font-size: .72em;
    letter-spacing: .12em; text-transform: uppercase; color: var(--accent-dark);
}
.tp-tile-hero b {
    font-family: var(--display); font-size: 1.12em; font-weight: 600;
    letter-spacing: -.03em; line-height: 1.12; color: var(--ink);
}
.tp-tile-wide { grid-column: span 2; background: #f7f9fc; }
.tp-sk { display: block; height: .22em; border-radius: 1px; background: var(--line); }
.tp-sk.dark { background: var(--ink); opacity: .55; }
.tp-sk.w45 { width: 45%; }
.tp-sk.w55 { width: 55%; }
.tp-sk.w60 { width: 60%; }
.tp-sk.w70 { width: 70%; }
.tp-sk.w80 { width: 80%; }
.tp-sk.w85 { width: 85%; }

/* — Card captions. */
.tp-info { display: grid; gap: .3rem; padding: 0 .1rem; }
.tp-head { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.tp-head h3 {
    margin: 0;
    font-family: var(--display); font-size: 1.02rem;
    font-weight: 600; letter-spacing: -.025em; color: var(--ink);
}
.tp-chip {
    font-family: var(--mono); font-size: .56rem; letter-spacing: .09em;
    text-transform: uppercase; color: var(--dim);
    border: 1px solid var(--line); border-radius: 2px; padding: .1rem .32rem;
    white-space: nowrap;
}
.tp-info p { margin: 0; font-size: .85rem; line-height: 1.5; color: var(--dim); }
.tp-note {
    margin: 1.5rem 0 0;
    display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center;
    padding-top: .9rem;
    border-top: 1px solid var(--line);
    font-size: .82rem; color: var(--dim);
}
.tp-note a { color: var(--accent); font-size: .82rem; margin-left: auto; }
.tp-tints { display: inline-flex; gap: .3rem; }
.tp-tints i { width: .72rem; height: .72rem; border-radius: 50%; display: block; }
.tp-tints .t-azure { background: #0a66ff; }
.tp-tints .t-ink { background: #0b0d10; }
.tp-tints .t-emerald { background: #00a06b; }
.tp-tints .t-violet { background: #6a3cff; }

/* — Card actions: two hairline buttons, no fill, no shadow. */
.tp-actions {
    margin-top: .55rem;
    display: flex; gap: .4rem;
}
.tp-btn {
    appearance: none;
    font: inherit;
    font-size: .78rem;
    line-height: 1;
    padding: .46rem .7rem;
    background: var(--ink);
    color: #fff;
    border: 1px solid var(--ink);
    border-radius: var(--radius);
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, color .16s ease;
}
.tp-btn:hover { background: #1b2027; border-color: #1b2027; }
.tp-btn-ghost { background: #fff; color: var(--ink-2); border-color: #d8dde4; }
.tp-btn-ghost:hover { background: #fff; color: var(--ink); border-color: var(--ink); }
.tp-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Three frames need width; below that they go two-up, then one-up. */
@media (max-width: 980px) {
    .theme-showcase { grid-template-columns: 1fr 1fr; }
}

/* — Dark frames: the wireframe is drawn on the ink ground these themes ship. */
.tp-view-dark { background: #0b0d10; }
.tp-frame.is-dark .tp-view { background: #0b0d10; }
.tp-frame.is-dark .tp-bar { background: #0f1216; border-bottom-color: #232830; }
.tp-frame.is-dark .tp-bar b { color: #8b93a1; }
.tp-frame.is-dark .tp-bar i { background: #fff; opacity: .18; }
.tp-nav-dark { border-bottom-color: #232830; }
.tp-nav-dark .tp-mark { background: #f3f5f8; }
.tp-nav-dark .tp-links i { background: #f3f5f8; opacity: .3; }

/* — Photo: a gallery. One full frame, a mono caption, then two half frames. */
.tp-photo { padding: .85em 1em 1.1em; display: grid; gap: .4em; align-content: start; }
.tp-ph-frame {
    display: block;
    aspect-ratio: 16 / 9;
    border: 1px solid #232830;
    background: linear-gradient(135deg, #39424f 0%, #1c222a 52%, #0f1216 100%);
}
.tp-ph-caption {
    display: block;
    font-family: var(--mono); font-size: .55em; letter-spacing: .18em;
    text-transform: uppercase; color: #8b93a1;
}
.tp-ph-row { display: grid; grid-template-columns: 1fr 1fr; gap: .4em; margin-top: .15em; }
.tp-ph-half {
    display: block;
    aspect-ratio: 3 / 2;
    border: 1px solid #232830;
    background: #1b2129;
}

/* — Fortress: the house look, centred, numbered hairline rows. */
.tp-fortress { padding: 1.1em 1.15em; display: grid; gap: .1em; align-content: start; text-align: center; }
.tp-fortress .tp-kicker {
    color: var(--dim);
    font-size: .74em;
    letter-spacing: .18em;
}
.tp-fortress .tp-title {
    margin: .25em auto .55em;
    font-family: var(--display); font-size: 2.05em; font-weight: 600;
    letter-spacing: -.05em; line-height: 1.02; color: var(--ink);
    max-width: 9em;
}
.tp-fs-rule { height: 2px; background: var(--ink); margin: .1em 0 .3em; }
.tp-fs-row {
    display: grid; grid-template-columns: 1.8em minmax(0, 1fr);
    gap: .55em; align-items: baseline; text-align: left;
    padding: .62em 0;
    border-bottom: 1px solid var(--line);
    font-size: .9em; color: var(--ink-2);
}
.tp-fs-row em {
    font-family: var(--mono); font-style: normal;
    font-size: .78em; letter-spacing: .06em; color: var(--dim);
}

/* — Slate: dark, flat rows, right-aligned micro link. */
.tp-slate { padding: .3em 1em 1em; display: grid; align-content: start; }
.tp-sl-row {
    display: flex; align-items: center; justify-content: space-between; gap: .8em;
    padding: .78em 0;
    border-bottom: 1px solid #232830;
}
.tp-sl-row .tp-sk { background: #2c333d; }
.tp-sl-row .tp-sk.dark { background: #f3f5f8; opacity: .82; }
.tp-sl-row em {
    font-family: var(--mono); font-style: normal;
    font-size: .7em; letter-spacing: .1em; text-transform: uppercase; color: #8b93a1;
}

/* ------------------------------------------------------- live demo shell */

.demo-shell {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    overflow: hidden;
}
/* Device widths are declared here, not inline: the CSP forbids style attrs.
   `data-demo-size` is the shell's state; `data-demo-width` is the button. */
.demo-shell[data-demo-size="834"] .demo-frame { width: 834px; }
.demo-shell[data-demo-size="390"] .demo-frame { width: 390px; }
.demo-chrome {
    display: flex; align-items: center; gap: .55rem;
    padding: .5rem .6rem;
    border-bottom: 1px solid var(--line);
    background: #fbfcfd;
}
.demo-dots { display: inline-flex; gap: 4px; flex: none; }
.demo-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); opacity: .14; display: block; }

.demo-tabs {
    display: inline-flex;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
}
.demo-tab {
    appearance: none;
    font: inherit;
    font-size: .76rem;
    line-height: 1;
    padding: .42rem .66rem;
    background: transparent;
    color: var(--dim);
    border: 0;
    border-left: 1px solid var(--line);
    cursor: pointer;
    transition: background .14s ease, color .14s ease;
}
.demo-tab:first-child { border-left: 0; }
.demo-tab:hover { background: #f4f6f9; color: var(--ink); }
.demo-tab.is-on { background: var(--ink); color: #fff; }
.demo-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.demo-devices { display: inline-flex; gap: 4px; margin-left: auto; }
.demo-device {
    appearance: none;
    font: inherit;
    line-height: 0;
    width: 28px; height: 28px;
    display: inline-grid; place-items: center;
    padding: 0;
    background: #fff;
    color: var(--dim);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color .14s ease, color .14s ease, background .14s ease;
}
.demo-device svg { display: block; }
.demo-device:hover { border-color: #c9d0d9; color: var(--ink); }
.demo-device.is-on { border-color: var(--ink); color: #fff; background: var(--ink); }
.demo-device:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.demo-open {
    font-size: .76rem;
    color: var(--dim);
    white-space: nowrap;
}
.demo-open:hover { color: var(--accent); }

/* Light/dark toggle: one square button, the icon shows what you get. */
.demo-scheme {
    appearance: none;
    font: inherit;
    line-height: 0;
    width: 28px; height: 28px;
    display: inline-grid; place-items: center;
    padding: 0;
    background: #fff;
    color: var(--dim);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color .14s ease, color .14s ease;
}
.demo-scheme svg { display: block; }
.demo-scheme .i-moon { display: none; }
.demo-scheme.is-dark .i-sun { display: none; }
.demo-scheme.is-dark .i-moon { display: block; }
.demo-scheme:hover { border-color: #c9d0d9; color: var(--ink); }
.demo-scheme:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.demo-stage {
    /* A neutral canvas so a white theme still reads as a page, not as a hole. */
    background: #eef1f5;
    padding: clamp(8px, 1.4vw, 16px);
    display: flex;
    justify-content: center;
    overflow-x: auto;
}
.demo-frame {
    display: block;
    flex: none;
    width: 100%;
    height: clamp(400px, 58vh, 660px);
    border: 1px solid #d8dde4;
    border-radius: 1px;
    background: #fff;
    transition: width .2s ease;
}
.demo-caption {
    margin: .9rem 0 0;
    font-size: .8rem;
    line-height: 1.5;
    color: var(--dim);
}

/* --------------------------------------------------------------- lightbox */

.demo-dialog {
    width: min(1440px, 95vw);
    max-width: none;
    max-height: 94vh;
    padding: 0;
    border: 0;
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
    overflow: hidden;
}
.demo-dialog::backdrop { background: rgba(11, 13, 16, .58); }
.demo-dialog-inner { display: grid; }
.demo-dialog-head {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: .8rem 1rem;
    border-bottom: 1px solid var(--line);
}
.demo-dialog-head h2 {
    margin: 0;
    font-family: var(--display);
    font-size: .98rem;
    font-weight: 600;
    letter-spacing: -.02em;
}
.demo-dialog-close {
    appearance: none;
    font: inherit;
    font-size: .78rem;
    line-height: 1;
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .46rem .7rem;
    background: #fff;
    color: var(--ink-2);
    border: 1px solid #d8dde4;
    border-radius: var(--radius);
    cursor: pointer;
}
.demo-dialog-close:hover { border-color: var(--ink); color: var(--ink); }
.demo-dialog .demo-shell { border: 0; border-radius: 0; }
.demo-dialog .demo-stage { padding: 0; }
.demo-dialog .demo-frame {
    height: min(74vh, 820px);
    border: 0;
    border-radius: 0;
}

html.demo-scroll-lock { overflow: hidden; }

@media (prefers-reduced-motion: no-preference) {
    /* Transform only: an opacity animation that never gets a frame (throttled
       tab, webview) would leave the dialog invisible. */
    .demo-dialog[open] { animation: demo-dialog-in .16s ease-out; }
    @keyframes demo-dialog-in {
        from { transform: translateY(6px) scale(.995); }
        to { transform: none; }
    }
}

/* ----------------------------------------------------------------- i18n */

.locale-row { display: flex; flex-wrap: wrap; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.locale-row a { flex: 1 1 150px; background: #fff; padding: .85rem 1rem; display: grid; gap: .1rem; }
.locale-row a:hover { background: #fbfcfd; }
.locale-row .locale-code { font-family: var(--mono); font-size: .64rem; letter-spacing: .12em; color: var(--accent); }
.locale-row strong { font-size: .92rem; font-weight: 500; color: var(--ink); }

/* ------------------------------------------------------------------- cta */

.cta-band { background: var(--ink); color: #c9ced6; padding: clamp(44px, 6vw, 80px) 0; }
.cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: clamp(20px, 4vw, 48px); }
.cta-inner > div:first-child { max-width: 48ch; }
.cta-band h2 { color: #fff; font-size: clamp(1.5rem, 3.2vw, 2.3rem); letter-spacing: -.035em; margin-bottom: .5rem; }
.cta-band p { margin: 0; color: #a7aeb9; }
.cta-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.cta-actions .btn-secondary { --btn-bg: transparent; --btn-fg: #fff; --btn-bd: #3a424f; }
.cta-actions .btn-secondary:hover { --btn-bd: #fff; color: #fff; }
.cta-meta { font-family: var(--mono); font-size: .68rem; letter-spacing: .04em; color: #6f7783; width: 100%; margin-top: .2rem; }

/* -------------------------------------------------------------- install */

/* Six steps on the left, the requirements and the one command you need on the
   right. Deliberately the density of a README, not of a marketing block: the
   section exists to be followed, not admired. */
.inst {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: clamp(18px, 3vw, 40px);
    align-items: start;
}
.inst-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}
.inst-step {
    display: grid;
    grid-template-columns: 2.6rem minmax(0, 1fr);
    gap: .9rem;
    align-items: baseline;
    background: #fff;
    padding: 1.05rem 1.15rem;
}
.inst-num {
    font-family: var(--mono);
    font-size: .68rem;
    letter-spacing: .1em;
    color: var(--accent);
}
.inst-body h3 {
    margin: 0 0 .2rem;
    font-size: .98rem;
    letter-spacing: -.02em;
    color: var(--ink);
}
.inst-body p { margin: 0; font-size: .88rem; line-height: 1.55; color: var(--dim); }
.inst-card {
    display: grid;
    gap: .7rem;
    padding: 1.15rem 1.2rem 1.25rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-soft);
}
.inst-card-title {
    margin: 0;
    font-family: var(--mono);
    font-size: .62rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--dim);
}
.inst-req {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .35rem;
    font-size: .84rem;
    color: var(--ink-2);
}
.inst-req li { display: grid; grid-template-columns: .9rem minmax(0, 1fr); gap: .45rem; }
.inst-req li::before { content: "✓"; color: var(--accent); font-size: .78rem; line-height: 1.5; }
.inst-code {
    margin: 0;
    padding: .7rem .8rem;
    background: #0b0d10;
    color: #e7ebf1;
    border-radius: var(--radius);
    overflow-x: auto;
    font-family: var(--mono);
    font-size: .72rem;
    line-height: 1.65;
}
.inst-code code { font-family: inherit; }
.inst-note { margin: 0; font-size: .8rem; line-height: 1.5; color: var(--dim); }
.inst-card .btn { justify-self: start; }

/* ------------------------------------------------------------ responsive */

@media (max-width: 1024px) {
    .hero-inner { grid-template-columns: 1fr; }
    /* Copy always comes first on small screens: title, then lead, then visual. */
    .hero-copy { order: 1; max-width: none; }
    .hero-visual { order: 2; }
    .stage { padding-bottom: clamp(30px, 5vw, 46px); }
    .stage-logo { width: clamp(150px, 32vw, 210px); }
    .stage-cube { width: clamp(178px, 30vw, 258px); }
    .trust { grid-template-columns: 1fr 1fr; }
    .trust > div:nth-child(3) { border-left: 0; padding-left: 0; }
    .trust > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
    .sec-grid { grid-template-columns: 1fr 1fr; }
    .mod-grid { grid-template-columns: 1fr; }
    .gen-grid { grid-template-columns: 1fr; }
    .sov-row { grid-template-columns: 1fr; }
    .inst { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
    .compare-row { min-width: 720px; }
    .hero { padding-top: 26px; }
    .hero h1 { font-size: clamp(2rem, 9vw, 2.6rem); }
    .hero-ctas .btn { width: 100%; }
    .stage { margin-top: .4rem; padding: 40px 14px 30px; }
    .stage-cube { width: clamp(150px, 48vw, 214px); }
    .trust { grid-template-columns: 1fr; }
    .trust > div { border-left: 0; padding-left: 0; }
    .trust > div + div { border-top: 1px solid var(--line); }
    .sec-grid { grid-template-columns: 1fr; }
    .theme-showcase { grid-template-columns: 1fr; }
    .cta-inner { flex-direction: column; align-items: start; }
}

/* The demo chrome carries tabs + device buttons + a link: it wraps, never
   scrolls sideways, and the frame keeps its own scroll when a phone width is
   wider than the screen. */
@media (max-width: 780px) {
    .demo-chrome { flex-wrap: wrap; gap: .45rem; }
    .demo-dots { display: none; }
    .demo-tabs { order: 1; flex: 1 1 100%; }
    .demo-tab { flex: 1 1 0; text-align: center; }
    .demo-devices { order: 2; margin-left: 0; }
    .demo-scheme { order: 3; }
    .demo-open { order: 4; margin-left: auto; }
    .demo-frame { height: 460px; }
    .demo-dialog { width: 100vw; max-height: 100vh; border-radius: 0; }
    .demo-dialog .demo-frame { height: calc(100vh - 118px); }
}
