:root
{
    --body: #0b1220;
    --band: #dfe5f0;
    --head: #fff;
    --deep: #ffb300;
    --wide: #111;
    --card: #d99700;
    --thin: #070b16;
    --foot: #fff;
    --depth: color-mix(in srgb, var(--band) 6%, var(--body));
    --base: color-mix(in srgb, var(--band) 3%, var(--body));
    --lift: color-mix(in srgb, var(--band) 18%, var(--body));
    --edge: var(--band);
    --paper: 1160px;
    --plain: 78ch;
    --soft: 14px;
    --flow: 8px;
    --warm: 0 2px 4px rgb(0 0 0 / 10%), 0 16px 40px rgb(0 0 0 / 16%);
    --tile: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
    --shell: clamp(1.15rem, 1.08rem + 0.35vw, 1.35rem);
    --core: clamp(1.4rem, 1.24rem + 0.75vw, 1.95rem);
    --zone: clamp(1.95rem, 1.5rem + 1.9vw, 3.1rem);
}

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

body
{
    margin: 0;
    background: var(--body);
    color: var(--band);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: var(--tile);
    line-height: 1.65;
    -webkit-text-size-adjust: 100%;
    overflow-wrap: break-word;
}

img
{
    max-width: 100%;
    height: auto;
    display: block;
}

a
{
    color: inherit;
}

.marker
{
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--thin);
    color: var(--foot);
}

.margin-flat, .case-soft, .marker-sub, .plate-meta, .circuit-dark
{
    width: min(100% - 2rem, var(--paper));
    margin-inline: auto;
}

.marker-sub
{
    display: flex;
    align-items: center;
    gap: 1.25rem;
    min-height: 60px;
    padding-block: 0.5rem;
}

.trunk
{
    display: inline-flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
    text-decoration: none;
    color: inherit;
    white-space: nowrap;
    flex-shrink: 0;
}

.trunk img
{
    height: 32px;
    width: auto;
    object-fit: contain;
}

.board
{
    display: flex;
    gap: 0.15rem;
    margin-inline-end: auto;
    min-width: 0;
}

.board a
{
    padding: 0.4rem 0.7rem;
    border-radius: var(--flow);
    text-decoration: none;
    color: inherit;
    opacity: 0.82;
    white-space: nowrap;
    font-size: 0.92rem;
}

.board a:hover
{
    background: color-mix(in srgb, var(--foot) 14%, transparent);
    opacity: 1;
}

.board:empty
{
    display: none;
}

.board:empty + .marker-off
{
    margin-inline-start: auto;
}

.marker-off
{
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.peak
{
    display: none;
    position: relative;
    flex-shrink: 0;
}

.peak-plain
{
    list-style: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--foot) 40%, transparent);
    border-radius: var(--flow);
}

.peak-plain::-webkit-details-marker
{
    display: none;
}

.peak-plain span, .peak-plain span::before, .peak-plain span::after
{
    content: "";
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
}

.peak-plain span
{
    position: relative;
}

.peak-plain span::before
{
    position: absolute;
    top: -6px;
}

.peak-plain span::after
{
    position: absolute;
    top: 6px;
}

.peak-narrow
{
    position: absolute;
    inset-inline-end: 0;
    top: calc(100% + 0.5rem);
    z-index: 25;
    min-width: 14rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.5rem;
    background: var(--thin);
    border: 1px solid color-mix(in srgb, var(--foot) 20%, transparent);
    border-radius: var(--soft);
    box-shadow: var(--warm);
}

.peak-narrow a
{
    padding: 0.6rem 0.7rem;
    border-radius: var(--flow);
    text-decoration: none;
    color: var(--foot);
}

.peak-narrow a:hover
{
    background: color-mix(in srgb, var(--foot) 12%, transparent);
}

.peak-narrow .rail
{
    margin-top: 0.4rem;
    color: var(--foot);
    border-color: color-mix(in srgb, var(--foot) 40%, transparent);
}

.marker .rail-icon
{
    color: inherit;
    border-color: color-mix(in srgb, var(--foot) 45%, transparent);
}

.marker .rail-icon:hover
{
    background: color-mix(in srgb, var(--foot) 14%, transparent);
}

.plate
{
    background: color-mix(in srgb, var(--foot) 8%, var(--thin));
    border-top: 1px solid color-mix(in srgb, var(--foot) 12%, transparent);
    font-size: 0.9rem;
}

.plate-meta
{
    display: flex;
    gap: 0.25rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.plate-meta::-webkit-scrollbar
{
    display: none;
}

.plate a
{
    padding: 0.55rem 0.7rem;
    text-decoration: none;
    color: var(--foot);
    opacity: 0.8;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
}

.plate a:hover
{
    opacity: 1;
    border-bottom-color: var(--deep);
}

.rail
{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: 1px solid var(--lead, transparent);
    border-radius: var(--flow);
    padding: 0.6rem 1.1rem;
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    background: var(--deep);
    color: var(--wide);
    transition: background-color 0.15s ease, transform 0.05s ease;
}

.rail:hover
{
    background: var(--card);
}

.rail:active
{
    transform: translateY(1px);
}

.rail-icon
{
    background: transparent;
    color: var(--head);
    border-color: var(--lift);
}

.rail-icon:hover
{
    background: var(--depth);
}

.rail-foot
{
    padding: 0.9rem 1.8rem;
    font-size: var(--shell);
}

:focus-visible
{
    outline: 2px solid var(--deep);
    outline-offset: 2px;
}

.trail, .circuit-line, .window h2, .plot h2, .window h3, .plot h3
{
    color: var(--head);
    line-height: 1.18;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.trail
{
    font-size: var(--zone);
    margin: 0 0 1rem;
}

.circuit-line
{
    font-size: var(--core);
    margin: 0 0 1.25rem;
}

.window h3, .plot h3
{
    font-size: var(--shell);
    margin: 1.75rem 0 0.5rem;
}

.window p, .plot p
{
    margin: 0 0 1rem;
}

.window > :last-child, .plot > :last-child
{
    margin-bottom: 0;
}

.plot a, .window a
{
    color: color-mix(in srgb, var(--deep) 72%, var(--head));
    text-underline-offset: 3px;
}

.teaser
{
    display: block;
}

.circuit
{
    padding-block: clamp(2rem, 1.4rem + 2vw, 3.5rem);
    scroll-margin-top: 72px;
}

.teaser > .circuit:not(.margin):nth-of-type(odd)
{
    background: var(--depth);
}

.plot
{
    max-width: var(--plain);
}

.circuit-list .plot ul
{
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    display: grid;
    gap: 0.5rem;
}

.circuit-list .plot ul > li
{
    position: relative;
    padding-inline-start: 1.9rem;
    padding-block: 0.15rem;
}

.circuit-list .plot ul > li::before
{
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0.55em;
    width: 0.75rem;
    height: 0.4rem;
    border-inline-start: 2px solid var(--deep);
    border-bottom: 2px solid var(--deep);
    transform: rotate(-45deg);
}

.circuit-list .plot ol
{
    counter-reset: step;
    list-style: none;
    padding: 0;
    display: grid;
    gap: 0.6rem;
}

.circuit-list .plot ol > li
{
    counter-increment: step;
    position: relative;
    padding-inline-start: 2.6rem;
}

.circuit-list .plot ol > li::before
{
    content: counter(step);
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 50%;
    background: var(--deep);
    color: var(--wide);
    font-weight: 700;
    font-size: 0.9rem;
    display: grid;
    place-items: center;
}

.note
{
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border: 1px solid var(--lift);
    border-inline-start: 3px solid var(--edge);
    border-radius: 0 var(--flow) var(--flow) 0;
    background: var(--depth);
    font-size: 0.95rem;
}

.note p
{
    margin: 0 0 0.6rem;
}

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

.note strong
{
    color: var(--head);
}

.note--disclosure
{
    color: var(--edge);
    font-size: 0.88rem;
    background: transparent;
    border-inline-start-color: var(--lift);
}

.note--warning
{
    border-inline-start-color: var(--deep);
    background: color-mix(in srgb, var(--deep) 10%, var(--body));
}

.note--takeaway
{
    font-variant-numeric: tabular-nums;
    border-inline-start-color: var(--head);
}

.note--rg
{
    border: 1px solid color-mix(in srgb, var(--head) 30%, var(--lift));
    border-radius: var(--soft);
    background: var(--base);
}

.note--rg a
{
    font-weight: 600;
}

.note--independent
{
    margin-top: 2.5rem;
    font-size: 0.85rem;
    color: var(--edge);
    background: transparent;
    border: 0;
    border-top: 1px solid var(--lift);
    border-radius: 0;
    padding: 1rem 0 0;
}

.window blockquote, .plot blockquote
{
    margin: 1.25rem 0;
    padding: 1rem 1.25rem;
    border-inline-start: 3px solid var(--deep);
    border-radius: 0 var(--flow) var(--flow) 0;
    background: var(--body);
    color: var(--band);
    font-size: 0.95rem;
}

.window blockquote p, .plot blockquote p
{
    margin: 0 0 0.6rem;
}

.window blockquote > :last-child, .plot blockquote > :last-child
{
    margin-bottom: 0;
}

.window blockquote strong, .plot blockquote strong
{
    color: var(--head);
}

.plot hr
{
    border: 0;
    border-top: 1px solid var(--lift);
    margin: 2rem 0;
}

.plot table
{
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1.25rem;
    font-size: 0.95rem;
    background: var(--base);
    border: 1px solid var(--lift);
    border-radius: var(--soft);
    overflow: hidden;
}

.circuit-table .plot
{
    max-width: none;
    overflow-x: auto;
}

.plot td, .plot th
{
    border-bottom: 1px solid var(--lift);
    padding: 0.7rem 0.9rem;
    text-align: start;
    vertical-align: top;
}

.plot caption
{
    caption-side: top;
    text-align: start;
    padding: 0 0 0.6rem;
    font-weight: 700;
    color: var(--head);
}

.plot thead th
{
    background: color-mix(in srgb, var(--deep) 16%, var(--depth));
    color: var(--band);
    font-weight: 700;
    white-space: nowrap;
}

.plot tbody tr:last-child td
{
    border-bottom: 0;
}

.plot tbody tr:nth-child(even)
{
    background: color-mix(in srgb, var(--band) 3%, transparent);
}

.unit
{
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(200px, 260px);
    gap: 2rem;
    align-items: start;
}

.unit-figure
{
    border: 1px solid var(--lift);
    border-radius: var(--soft);
    box-shadow: var(--warm);
    width: 100%;
}

.margin
{
    position: relative;
    padding-block: clamp(2rem, 1.2rem + 3vw, 4rem);
    background: var(--thin);
    isolation: isolate;
}

.margin::before
{
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: linear-gradient(rgb(0 0 0 / 72%), rgb(0 0 0 / 82%)), var(--dim, none);
    background-size: cover;
    background-position: center;
}

.piece-soft
{
    margin-top: 1.25rem;
    text-align: center;
}

.piece-soft a
{
    color: var(--deep);
    font-weight: 600;
}

.footer2
{
    text-align: center;
}

.footer2-open
{
    font-size: clamp(3.5rem, 12vw, 6rem);
    line-height: 1;
    font-weight: 800;
    color: var(--deep);
    margin-bottom: 0.5rem;
}

.footer2-bottom
{
    max-width: 46ch;
    margin-inline: auto;
    color: var(--edge);
}

.footer2-flat
{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.75rem;
}

@media (max-width: 700px) {
    .margin::before
    {
        background-image: linear-gradient(rgb(0 0 0 / 72%), rgb(0 0 0 / 82%)), var(--line, var(--dim, none));
    }

}
.margin-flat
{
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 22rem);
    grid-template-areas: "title offer" "text offer";
    align-content: start;
    gap: 0 2rem;
}

.margin .trail
{
    grid-area: title;
    color: #fff;
}

.margin-wide
{
    grid-area: text;
    color: #f2f4f8;
    max-width: 62ch;
}

.margin .window
{
    margin-bottom: 1.5rem;
}

.margin-icon
{
    margin: 0.75rem 0 0;
    font-size: 0.85rem;
    opacity: 0.75;
}

.block
{
    grid-area: offer;
    background: var(--body);
    border: 1px solid color-mix(in srgb, var(--deep) 40%, var(--lift));
    border-radius: var(--soft);
    box-shadow: var(--warm);
    overflow: hidden;
    align-self: start;
}

.block .rail
{
    width: 100%;
}

.block-small
{
    display: grid;
    place-items: center;
    min-height: 74px;
    padding: 0.9rem 1.25rem;
    background: color-mix(in srgb, var(--deep) 12%, var(--body));
    color: var(--head);
    border-bottom: 3px solid var(--deep);
}

.block-small img
{
    height: 42px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.block-flat
{
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1.25rem;
    text-align: center;
}

.block-meta
{
    font-weight: 800;
    font-size: var(--shell);
    color: inherit;
    text-align: center;
}

.block-plain
{
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--edge);
    margin: 0;
}

.block-large
{
    font-size: var(--core);
    font-weight: 800;
    line-height: 1.15;
    color: var(--head);
    margin: 0;
    text-wrap: balance;
}

.block-stub
{
    font-size: 0.8rem;
    color: var(--edge);
    margin: 0;
}

.pane
{
    padding-block: 1.5rem;
}

.node
{
    border: 1px solid var(--lift);
    border-radius: var(--soft);
    background: var(--base);
    padding: 0.5rem 1.1rem;
}

.node-image
{
    cursor: pointer;
    font-weight: 700;
    color: var(--head);
    padding-block: 0.6rem;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.node-image::-webkit-details-marker
{
    display: none;
}

.node-image::before
{
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    border-inline-end: 2px solid var(--deep);
    border-bottom: 2px solid var(--deep);
    transform: rotate(45deg);
    transition: transform 0.15s ease;
}

.node[open] .node-image::before
{
    transform: rotate(-135deg);
}

.node-open
{
    columns: 2;
    gap: 2rem;
    margin: 0 0 0.75rem;
    padding-inline-start: 1.2rem;
    font-size: 0.95rem;
}

.node-open li
{
    break-inside: avoid;
    margin-bottom: 0.3rem;
}

.node-open a
{
    color: var(--edge);
    text-underline-offset: 3px;
}

.node-open a:hover
{
    color: var(--head);
}

.gate
{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.segment
{
    display: flex;
    flex-direction: column;
    background: var(--base);
    border: 1px solid var(--lift);
    border-radius: var(--soft);
    overflow: hidden;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.segment:hover
{
    border-color: var(--deep);
    transform: translateY(-2px);
}

.segment-foot
{
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--depth);
}

.segment-foot img
{
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.segment-flat
{
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding: 0.85rem;
    margin-top: auto;
}

.segment-copy
{
    font-weight: 600;
    color: var(--head);
    line-height: 1.3;
    margin: 0;
}

.segment .rail
{
    width: 100%;
    padding-block: 0.5rem;
    font-size: 0.95rem;
}

.root-side
{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.shell
{
    background: var(--body);
    border: 1px solid var(--lift);
    border-radius: var(--soft);
    padding: 1.1rem 1.2rem;
}

.shell-top
{
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.shell-thumb
{
    font-weight: 700;
    color: var(--head);
}

.shell-info
{
    color: var(--deep);
    font-weight: 700;
    white-space: nowrap;
}

.shell-copy
{
    margin: 0;
    color: var(--edge);
}

.entry-wide
{
    display: grid;
    gap: 0.5rem;
    max-width: var(--plain);
}

.entry-stub
{
    border: 1px solid var(--lift);
    border-radius: var(--flow);
    background: var(--base);
    padding: 0 1.1rem;
}

.entry-first
{
    cursor: pointer;
    font-weight: 600;
    color: var(--head);
    padding-block: 0.9rem;
    list-style: none;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.entry-first::-webkit-details-marker
{
    display: none;
}

.entry-first::before
{
    content: "+";
    color: var(--deep);
    font-weight: 700;
    line-height: 1.4;
    flex-shrink: 0;
}

.entry-stub[open] .entry-first::before
{
    content: "−";
}

.entry-bold
{
    color: var(--edge);
    padding-bottom: 1rem;
}

.entry-bold > :first-child
{
    margin-top: 0;
}

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

.strip
{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
    padding: 1.5rem;
    border-radius: var(--soft);
    background: color-mix(in srgb, var(--deep) 12%, var(--depth));
    border: 1px solid color-mix(in srgb, var(--deep) 35%, var(--lift));
}

.strip-top
{
    margin: 0;
    font-size: var(--shell);
    font-weight: 800;
    color: var(--head);
    text-wrap: balance;
}

.strip-dark
{
    margin: 0.25rem 0 0;
    font-size: 0.82rem;
    color: var(--edge);
}

.case
{
    border-top: 1px solid var(--lift);
    background: var(--body);
    color: var(--band);
    padding-block: 2rem 6rem;
}

.case-soft
{
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    align-items: center;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--lift);
}

.case-narrow
{
    margin-inline-end: auto;
    font-weight: 700;
    color: var(--head);
}

.case-narrow img
{
    height: 32px;
    width: auto;
    object-fit: contain;
}

.case-link
{
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
}

.case-link:empty
{
    display: none;
}

.case-link a
{
    text-decoration: none;
}

.case-link a:hover
{
    text-decoration: underline;
}

.case-thumb
{
    width: min(100% - 2rem, var(--paper));
    margin-inline: auto;
    padding-top: 1.25rem;
    font-size: 0.85rem;
    display: grid;
    gap: 0.5rem;
}

.case-thumb p
{
    margin: 0;
}

.case-large
{
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.loop
{
    display: inline-grid;
    place-items: center;
    min-width: 2.1rem;
    height: 2.1rem;
    border: 2px solid currentColor;
    border-radius: 50%;
    font-weight: 800;
    font-size: 0.78rem;
}

.tile
{
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom));
    background: var(--thin);
    color: var(--foot);
    border-top: 1px solid color-mix(in srgb, var(--deep) 45%, transparent);
}

.tile-sub
{
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.25;
}

.tile-first
{
    font-weight: 800;
    color: var(--foot);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tile-flat
{
    font-size: 0.75rem;
    opacity: 0.7;
}

.tile .rail
{
    margin-inline-start: auto;
    flex-shrink: 0;
}

@media (max-width: 960px) {
    .margin-flat
    {
        grid-template-columns: 1fr;
        grid-template-areas: "title" "offer" "text";
        gap: 1.25rem;
    }

    .unit
    {
        grid-template-columns: 1fr;
    }

    .unit-figure
    {
        max-width: 260px;
        margin-inline: auto;
    }

}
@media (max-width: 700px) {
    .node-open
    {
        columns: 1;
    }

    .gate
    {
        grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
        gap: 0.75rem;
    }

}
@media (max-width: 640px) {
    .marker
    {
        position: static;
    }

    .marker-sub
    {
        flex-wrap: wrap;
        gap: 0.5rem 0.75rem;
        padding-block: 0.6rem;
    }

    .marker-sub
    {
        flex-wrap: nowrap;
    }

    .board, .marker-off .rail-icon, .plate
    {
        display: none;
    }

    .board + .marker-off
    {
        margin-inline-start: auto;
    }

    .peak
    {
        display: block;
        order: 3;
    }

    .marker-off
    {
        margin-inline-start: auto;
    }

    .marker-off .rail
    {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
    }

    .circuit
    {
        padding-block: 1.75rem;
    }

    .block-flat, .strip
    {
        padding: 1.15rem;
    }

    .strip .rail-foot, .margin-wide .rail-foot
    {
        width: 100%;
    }

    .tile-flat
    {
        display: none;
    }

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

}
