/* ==========================================================================
   NordicNodes — "The Index"
   One printed sheet, alive. Ink-ivory, graphite and warm paper.
   Used by: views/home.php, terms.html, privacy.html
   ========================================================================== */

/* ---------- Fonts (self-hosted, latin + latin-ext) ---------- */
@font-face {
    font-family: 'Fraunces';
    font-style: italic;
    font-weight: 300;
    font-display: swap;
    src: url('/assets/fonts/fraunces-300-italic-latin.woff2') format('woff2');
    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: 'Fraunces';
    font-style: italic;
    font-weight: 300;
    font-display: swap;
    src: url('/assets/fonts/fraunces-300-italic-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Fraunces';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('/assets/fonts/fraunces-300-normal-latin.woff2') format('woff2');
    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: 'Fraunces';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('/assets/fonts/fraunces-300-normal-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url('/assets/fonts/inter-400600-normal-latin.woff2') format('woff2');
    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: 'Inter';
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url('/assets/fonts/inter-400600-normal-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/ibm-plex-mono-400-normal-latin.woff2') format('woff2');
    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: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/ibm-plex-mono-400-normal-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens (dark set — replaced by the light set below) ----------
:root {
    --bg: #12151b;
    --bg-deep: #0b0e13;
    --bg-lift: #191d25;

    --ivory: #ece8e1;
    --ivory-2: #b9b3a9;
    --ivory-3: #948e85;
    --stone: #a69f95;
    --accent: #a69f95;
    --ivory-soft: rgba(236, 232, 225, 0.06);

    --line: rgba(236, 232, 225, 0.16);
    --line-strong: rgba(236, 232, 225, 0.34);

    --bone: #ece8e1;
    --bone-2: #e2ddd3;
    --bone-line: rgba(20, 23, 28, 0.15);

    --ink: #14171c;
    --ink-2: #55514b;
    --ink-3: #5e5a54;
    --ink-link: #4a463f;
    --ink-soft: rgba(20, 23, 28, 0.06);

    --display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
    --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --max: 1320px;
    --gutter: clamp(20px, 4.5vw, 56px);
}
   -------------------------------------------------------------------------- */

/* ---------- Tokens ---------- */
:root {
    --bg: #ffffff;
    --bg-deep: #dcebee;
    --bg-lift: #ffffff;

    --ivory: #101318;
    --ivory-2: #46423b;
    --ivory-3: #55514b;
    --stone: #1b1e23;
    --accent: #2e2a25;
    --ivory-soft: rgba(16, 19, 24, 0.05);

    --line: rgba(16, 19, 24, 0.16);
    --line-strong: rgba(16, 19, 24, 0.42);

    --bone: #ffffff;
    --bone-2: #f5f5f4;
    --bone-line: rgba(16, 19, 24, 0.14);

    --ink: #14171c;
    --ink-2: #55514b;
    --ink-3: #5e5a54;
    --ink-link: #4a463f;
    --ink-soft: rgba(20, 23, 28, 0.06);

    --sheet-glow: #ffffff;
    --sheet-glow-fade: rgba(255, 255, 255, 0);

    /* modern brand colour for actions */
    --brand: #0e7490;
    --brand-2: #155e75;
    --brand-ink: #ffffff;
    --brand-wash: rgba(14, 116, 144, 0.08);

    --display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
    --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --max: 1320px;
    --gutter: clamp(20px, 4.5vw, 56px);

    /* Vertical rhythm. The front page is meant to sit on one screen, so
       these tighten on short viewports instead of letting the footer fall
       below the fold (see the height queries near the end of this file). */
    --sheet-head-pad: 20px;
    --sheet-meta-pad: 13px;
    --sheet-hero-pad: clamp(20px, 3.6vh, 38px);
    --sheet-title: clamp(3.1rem, 6.7vw, 6.3rem);
    --sheet-net: min(420px, 41vh);
    --sheet-lede-gap: 22px;
    --sheet-index-gap: clamp(22px, 3vh, 34px);
    --sheet-row-pad: clamp(14px, 1.8vh, 20px);
    --sheet-elsewhere-gap: clamp(20px, 2.4vh, 32px);
    --sheet-foot-pad: 20px;
}

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

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--ivory);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.legal {
    background: var(--bg);
    color: var(--ink);
}

img,
svg,
canvas { display: block; max-width: 100%; }

a { color: inherit; }

h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd {
    margin: 0;
}

ul, ol {
    padding: 0;
    list-style: none;
}

::selection {
    background: var(--brand);
    color: var(--brand-ink);
}

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

body.legal :focus-visible { outline-color: var(--brand); }

.site-head :focus-visible,
.site-foot :focus-visible { outline-color: var(--brand); }

/* ---------- Layout ---------- */
.container {
    width: 100%;
    max-width: var(--max);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.sheet {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    background-color: var(--bg);
    background-image: radial-gradient(110% 68% at 50% 0%, var(--sheet-glow) 0%, var(--sheet-glow-fade) 62%);
}

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(14px, 2.2vh, 26px) 0 clamp(10px, 1.7vh, 20px);
}

/* ---------- Type ---------- */
.eyebrow,
.mono-label {
    font-family: var(--mono);
    font-size: 0.63rem;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ivory-2);
}

.lede {
    max-width: 42ch;
    font-size: clamp(0.98rem, 1.3vw, 1.08rem);
    line-height: 1.6;
    color: var(--ivory-2);
}

.accent { color: var(--stone); }

/* ---------- Brand ---------- */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--stone);
}

.brand-mark {
    width: 28px;
    height: 28px;
    flex: none;
    color: var(--brand);
}

.brand-name {
    font-family: var(--display);
    font-weight: 300;
    font-size: 1rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ivory);
}

.brand-name span { color: var(--ivory); }

body.legal .brand-name { color: var(--ivory); }

/* ---------- Header ---------- */
.site-head {
    position: relative;
    z-index: 20;
    padding: var(--sheet-head-pad) 0;
}

.site-head .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.nav-login {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 1.02em 1.55em;
    border: 1px solid var(--line-strong);
    border-radius: 0;
    font-family: var(--sans);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ivory);
    transition: border-color 0.3s var(--ease), color 0.3s var(--ease),
                background 0.3s var(--ease), transform 0.3s var(--ease);
}

.nav-login:hover {
    border-color: var(--brand);
    color: var(--brand-ink);
    background: var(--brand);
}

.nav-login svg {
    width: 12px;
    height: 12px;
    transition: transform 0.3s var(--ease);
}

.nav-login:hover svg { transform: translate(2px, -2px); }

/* Prominent primary action */
.nav-login--cta {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--brand-ink);
}

.nav-login--cta svg { width: 14px; height: 14px; }

.nav-login--cta:hover {
    background: var(--brand-2);
    border-color: var(--brand-2);
    color: var(--brand-ink);
    transform: translateY(-1px);
}

/* ---------- Meta row ---------- */
.meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: var(--sheet-meta-pad);
    border-bottom: 1px solid var(--line);
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ivory-2);
}

.meta-row .meta-accent { color: var(--ivory); }

/* ---------- Hero ---------- */
.hero { position: relative; }

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: clamp(24px, 5vw, 64px);
    align-items: center;
    padding-top: var(--sheet-hero-pad);
}

.hero-copy { position: relative; z-index: 1; }

.hero h1 {
    font-family: var(--display);
    font-weight: 300;
    font-variation-settings: 'opsz' 144;
    font-size: var(--sheet-title);
    line-height: 1;
    letter-spacing: -0.015em;
    color: var(--ivory);
    text-wrap: balance;
}

.hero h1 span,
.hero h1 em {
    display: block;
}

.hero h1 em {
    font-style: italic;
    color: var(--brand);
    padding-left: 0.72em;
}

.hero .lede { margin-top: var(--sheet-lede-gap); }

/* ---------- Network drawing ---------- */
.network {
    position: relative;
    justify-self: end;
    width: 100%;
    max-width: var(--sheet-net);
    aspect-ratio: 520 / 440;
    color: var(--stone);
    pointer-events: none;
}

.network svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.net-lines path {
    fill: none;
    stroke: currentColor;
    stroke-width: 1;
    opacity: 0.3;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: net-draw 1.5s var(--ease) forwards;
}

.net-lines path[data-node="0"] { animation-delay: 0.15s; }
.net-lines path[data-node="1"] { animation-delay: 0.3s; }
.net-lines path[data-node="2"] { animation-delay: 0.45s; }
.net-lines path.net-ghost { animation-delay: 0.6s; }

.net-hubs circle {
    fill: var(--bg);
    stroke: currentColor;
    stroke-width: 1.2;
    transition: fill 0.35s var(--ease);
}

.net-rings circle {
    fill: none;
    stroke: currentColor;
    stroke-width: 0.8;
    opacity: 0.24;
    transition: opacity 0.35s var(--ease);
}

.net-dots circle {
    fill: currentColor;
    opacity: 0.34;
}

/* Active destination */
.network[data-active="0"] .net-lines path[data-node="0"],
.network[data-active="1"] .net-lines path[data-node="1"],
.network[data-active="2"] .net-lines path[data-node="2"] {
    opacity: 1;
    stroke-width: 1.7;
}

.network[data-active="0"] .net-hubs circle[data-node="0"],
.network[data-active="1"] .net-hubs circle[data-node="1"],
.network[data-active="2"] .net-hubs circle[data-node="2"] {
    fill: currentColor;
}

.network[data-active="0"] .net-rings circle[data-node="0"],
.network[data-active="1"] .net-rings circle[data-node="1"],
.network[data-active="2"] .net-rings circle[data-node="2"] {
    opacity: 0.8;
}

@keyframes net-draw {
    to { stroke-dashoffset: 0; }
}

/* ---------- The index ---------- */
.index {
    margin-top: var(--sheet-index-gap);
    border-top: 1px solid var(--line);
}

.idx {
    position: relative;
    display: grid;
    grid-template-columns: 52px minmax(0, 1.05fr) minmax(0, 1fr) 38px;
    gap: clamp(14px, 3vw, 40px);
    align-items: center;
    padding: var(--sheet-row-pad) 8px var(--sheet-row-pad) 14px;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
    color: inherit;
    transition: background 0.35s var(--ease);
}

.idx::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--brand);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.4s var(--ease);
}

.idx:hover,
.idx:focus-visible {
    background: var(--brand-wash);
}

.idx:hover::before,
.idx:focus-visible::before { transform: scaleY(1); }

.idx:focus-visible {
    outline: 1px solid var(--ivory);
    outline-offset: -1px;
}

.idx-icon {
    display: grid;
    place-items: center;
    justify-self: start;
    width: 26px;
    height: 26px;
    color: var(--ivory-3);
    transition: color 0.3s var(--ease);
}

.idx-icon svg { width: 22px; height: 22px; }

.idx-name {
    font-family: var(--display);
    font-weight: 300;
    font-variation-settings: 'opsz' 72;
    font-size: clamp(1.7rem, 2.8vw, 2.35rem);
    line-height: 1;
    letter-spacing: -0.01em;
    color: var(--ivory);
    transition: color 0.3s var(--ease);
}

.idx-desc {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--ivory-2);
}

.idx-arrow {
    display: grid;
    place-items: center;
    color: var(--ivory);
    transition: color 0.35s var(--ease), transform 0.35s var(--ease);
}

.idx-arrow svg { width: 21px; height: 21px; }

.idx:hover .idx-name,
.idx:focus-visible .idx-name { color: var(--ivory); }

.idx:hover .idx-icon,
.idx:focus-visible .idx-icon { color: var(--ivory); }

.idx:hover .idx-arrow,
.idx:focus-visible .idx-arrow {
    color: var(--brand);
    transform: translate(3px, -3px);
}

/* ---------- Elsewhere: a separate project, not part of the suite ---------- */
.elsewhere {
    margin-top: var(--sheet-elsewhere-gap);
}

.elsewhere-label {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 18px;
    padding: 0 8px 0 14px;
    font-family: var(--mono);
    font-size: 0.58rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ivory-3);
}

.elsewhere-host {
    letter-spacing: 0.1em;
    text-transform: none;
}

.idx--separate {
    margin-top: 8px;
    border-top: 1px solid var(--line);
}

.idx--separate::before { content: none; }

.idx--separate:hover,
.idx--separate:focus-visible {
    background: var(--bg-deep);
}

.idx--separate .idx-name {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
    font-size: clamp(1.5rem, 2.4vw, 2rem);
}

.idx--separate:hover .idx-name,
.idx--separate:focus-visible .idx-name { color: var(--brand); }

.idx-tag {
    font-family: var(--mono);
    font-size: 0.55rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ivory-3);
    transition: color 0.3s var(--ease);
}

.idx--separate:hover .idx-tag,
.idx--separate:focus-visible .idx-tag { color: var(--ivory-2); }

/* ---------- Sheet note ---------- */
.sheet-note {
    margin-top: clamp(14px, 2.6vh, 22px);
    font-family: var(--mono);
    font-size: 0.61rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ivory-3);
}

/* ---------- Footer ---------- */
.site-foot {
    background: var(--bg-deep);
    border-top: 1px solid var(--line);
}

.site-foot .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px 28px;
    flex-wrap: wrap;
    padding-top: var(--sheet-foot-pad);
    padding-bottom: var(--sheet-foot-pad);
    font-family: var(--mono);
    font-size: 0.59rem;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: var(--ivory-3);
}

.site-foot a {
    text-decoration: none;
    color: var(--ivory-2);
    transition: color 0.25s var(--ease);
}

.site-foot a:hover { color: var(--ivory); }

.foot-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}

/* ---------- Legal head ---------- */
.legal-head {
    background-color: var(--bg);
    background-image: radial-gradient(110% 80% at 50% 0%, var(--sheet-glow) 0%, var(--sheet-glow-fade) 66%);
    color: var(--ivory);
    border-bottom: 1px solid var(--line-strong);
    padding-bottom: clamp(42px, 6vw, 70px);
}

.legal-hero {
    padding-top: clamp(36px, 6vw, 64px);
}

.legal-hero .meta-row {
    margin-bottom: clamp(28px, 4vw, 44px);
}

.legal-hero h1 {
    font-family: var(--display);
    font-weight: 300;
    font-variation-settings: 'opsz' 144;
    font-size: clamp(2.9rem, 5.4vw, 4.8rem);
    line-height: 1;
    letter-spacing: -0.015em;
    color: var(--ivory);
}

.legal-hero h1 em {
    display: block;
    font-style: italic;
    color: var(--brand);
    padding-left: 0.45em;
}

.legal-hero .lede {
    margin-top: 22px;
    max-width: 52ch;
    color: var(--ivory-2);
}

.legal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 26px;
    margin-top: 30px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-family: var(--mono);
    font-size: 0.61rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ivory-3);
}

/* ---------- Legal body ---------- */
.legal-body {
    padding: clamp(44px, 6vw, 80px) 0 clamp(64px, 8vw, 110px);
}

.legal-grid {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: clamp(32px, 6vw, 80px);
    align-items: start;
}

.legal-toc {
    position: sticky;
    top: 32px;
}

.legal-toc p {
    margin-bottom: 12px;
    font-family: var(--mono);
    font-size: 0.61rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-3);
}

.legal-toc a {
    display: block;
    padding: 9px 0;
    border-bottom: 1px solid var(--bone-line);
    font-size: 0.83rem;
    text-decoration: none;
    color: var(--ink-2);
    transition: color 0.25s var(--ease);
}

.legal-toc a:hover,
.legal-toc a.is-active { color: var(--brand); }

.prose { max-width: 74ch; }

.callout {
    padding: clamp(20px, 3vw, 28px);
    background: var(--bg-deep);
    border: 1px solid var(--bone-line);
    border-left: 3px solid var(--ink-link);
    border-radius: 0;
}

.callout-kicker {
    margin-bottom: 8px;
    font-family: var(--mono);
    font-size: 0.61rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-link);
}

.callout p {
    font-size: 0.99rem;
    line-height: 1.7;
    color: var(--ink);
}

.prose section {
    margin-top: clamp(34px, 4vw, 46px);
    padding-top: clamp(28px, 3.4vw, 38px);
    border-top: 1px solid var(--bone-line);
}

.sec-kicker {
    margin-bottom: 8px;
    font-family: var(--mono);
    font-size: 0.63rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-link);
}

.prose h2 {
    margin-bottom: 13px;
    font-family: var(--display);
    font-weight: 300;
    font-size: clamp(1.7rem, 2.8vw, 2.25rem);
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--ink);
}

.prose h3 {
    margin: 24px 0 8px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink);
}

.prose p {
    margin-bottom: 14px;
    font-size: 1.005rem;
    line-height: 1.78;
    color: var(--ink-2);
}

.prose p:last-child { margin-bottom: 0; }

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

.prose a {
    color: var(--ink-link);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

.prose a:hover { color: var(--ink); }

.prose .inline-link { color: var(--brand); }

.inline-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding-bottom: 2px;
    border-bottom: 1px solid rgba(14, 116, 144, 0.45);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--brand);
    text-decoration: none;
}

.company-card {
    margin-top: 18px;
    padding: clamp(20px, 3vw, 28px);
    background: var(--bg-deep);
    border: 1px solid var(--bone-line);
    border-radius: 0;
}

.company-card dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 28px;
}

.company-card dt {
    margin-bottom: 3px;
    font-family: var(--mono);
    font-size: 0.6rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-3);
}

.company-card dd {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--ink);
}

/* ---------- Legal pages ---------- */
/* They now share the white sheet; the old dark override was removed. */

/* ---------- Grain + skip link ---------- */
.grain {
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
    opacity: 0.08;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
}

body.legal .grain { opacity: 0.08; }

.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 300;
    padding: 10px 16px;
    background: var(--brand);
    color: var(--brand-ink);
    border-radius: 4px;
    font-family: var(--mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
}

.skip-link:focus { top: 16px; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
    .idx {
        grid-template-columns: 44px minmax(0, 1fr) minmax(0, 0.9fr) 34px;
        gap: 18px;
    }
}

@media (max-width: 900px) {
    .hero { overflow: hidden; }

    .hero-grid {
        grid-template-columns: 1fr;
        position: relative;
        padding-top: clamp(20px, 4vh, 36px);
    }

    .network {
        position: absolute;
        right: -20%;
        top: -12%;
        width: 76%;
        max-width: none;
        opacity: 0.18;
        z-index: 0;
    }

    .hero-copy { z-index: 1; }

    .legal-grid { grid-template-columns: 1fr; }
    .legal-toc { position: static; display: none; }
}

@media (max-width: 820px) {
    .idx {
        grid-template-columns: 36px minmax(0, 1fr) 34px;
        row-gap: 6px;
        align-items: start;
    }

    .idx-icon { padding-top: 4px; }

    .idx-desc {
        grid-column: 2;
        grid-row: 2;
        padding-bottom: 2px;
    }

    .idx-arrow {
        grid-column: 3;
        grid-row: 1 / span 2;
        margin-top: 4px;
    }
}

@media (max-width: 560px) {
    .site-head { padding: 16px 0; }
    .site-head .container { gap: 16px; }
    .brand-name { font-size: 0.86rem; letter-spacing: 0.14em; }
    .nav-login { padding: 0.85em 1.05em; font-size: 0.6rem; letter-spacing: 0.1em; }
    .nav-login--cta { padding: 0.9em 1.1em; font-size: 0.62rem; }
    .network { display: none; }
    .meta-row { font-size: 0.55rem; letter-spacing: 0.13em; }
    .hero h1 { font-size: clamp(2.9rem, 13vw, 3.7rem); }
    .hero h1 em { padding-left: 0.3em; }
    .hero .lede { margin-top: 18px; }
    .index { margin-top: 26px; }
    .idx { padding: 15px 8px 15px 12px; }
    .idx-name { font-size: 1.6rem; }
    .idx-desc { font-size: 0.85rem; }
    .idx-arrow { width: 30px; height: 30px; }
    .elsewhere-label {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        padding-left: 12px;
        font-size: 0.54rem;
        letter-spacing: 0.13em;
    }
    .sheet-note { font-size: 0.55rem; letter-spacing: 0.1em; }
    .site-foot .container { flex-direction: column; align-items: flex-start; }
    .company-card dl { grid-template-columns: 1fr; }
    .legal-hero h1 em { padding-left: 0.2em; }
}

/* ---------- One-screen fit ---------- */
/* The front page is composed as a single sheet. On shorter desktop viewports
   the rhythm tightens step by step so the footer stays on screen instead of
   the page growing a scrollbar. Below 901px the hero stacks, where scrolling
   is expected, so these only target the side-by-side layout. */
@media (min-width: 901px) and (max-height: 899px) {
    :root {
        --sheet-head-pad: 16px;
        --sheet-hero-pad: 3vh;
        --sheet-net: min(420px, 39vh);
        --sheet-index-gap: 20px;
        --sheet-row-pad: 13px;
        --sheet-elsewhere-gap: 15px;
    }
}

@media (min-width: 901px) and (max-height: 800px) {
    :root {
        --sheet-head-pad: 14px;
        --sheet-meta-pad: 11px;
        --sheet-hero-pad: 2.8vh;
        --sheet-net: min(420px, 37vh);
        --sheet-lede-gap: 20px;
        --sheet-index-gap: 19px;
        --sheet-row-pad: 12px;
        --sheet-elsewhere-gap: 14px;
        --sheet-foot-pad: 16px;
    }
}

@media (min-width: 901px) and (max-height: 740px) {
    :root {
        --sheet-head-pad: 12px;
        --sheet-meta-pad: 9px;
        --sheet-hero-pad: 2.4vh;
        --sheet-net: min(420px, 36vh);
        --sheet-title: clamp(2.6rem, min(6.7vw, 10.6vh), 6.3rem);
        --sheet-lede-gap: 18px;
        --sheet-index-gap: 15px;
        --sheet-row-pad: 10px;
        --sheet-elsewhere-gap: 11px;
        --sheet-foot-pad: 14px;
    }
}

@media (min-width: 901px) and (max-height: 660px) {
    :root {
        --sheet-head-pad: 10px;
        --sheet-meta-pad: 8px;
        --sheet-hero-pad: 2.2vh;
        --sheet-net: min(420px, 34vh);
        --sheet-title: clamp(2.4rem, min(6.7vw, 10vh), 6.3rem);
        --sheet-lede-gap: 15px;
        --sheet-index-gap: 13px;
        --sheet-row-pad: 9px;
        --sheet-elsewhere-gap: 9px;
        --sheet-foot-pad: 12px;
    }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    .net-lines path {
        animation: none;
        stroke-dashoffset: 0;
    }

    .idx,
    .idx::before,
    .idx-name,
    .idx-icon,
    .idx-arrow,
    .idx-tag,
    .net-hubs circle,
    .net-rings circle { transition: none; }
}

/* ---------- Print (legal) ---------- */
@media print {
    .grain,
    .site-head,
    .site-foot,
    .legal-toc { display: none !important; }

    body,
    body.legal { background: #fff; color: #000; }

    .legal-head {
        background: #fff;
        color: #000;
        border-bottom: 1px solid #999;
        padding-bottom: 16px;
    }

    .legal-hero .meta-row,
    .legal-meta { color: #555; border-color: #ccc; }

    .legal-hero h1,
    .legal-hero h1 em { color: #000; }

    .legal-hero .lede { color: #333; }

    .legal-grid { display: block; }
    .prose { max-width: 100%; }
    .prose section { break-inside: avoid; }
    .callout { background: #f4f4f4; border-color: #999; }
}
