/* Enterpriser — see style-doctrine.md. All rules scoped under .ent so the app can be embedded. */

:root {
    /* Doctrine palette */
    --paper: #F1E8D3;
    --paper-2: #E7DBC0;
    --card: #F8F1E1;
    --ink: #1E2023;
    --ink-2: #4B4840;
    --ink-3: #7F786A;
    --line: #CDBE9C;
    --teal: #1E6A5E;
    --midnight: #252660;
    --blue: #2E7DB5;
    --bulb: #F7E58A;
    --mustard: #DDA22C;
    --red: #B5392A;
    --green: #2F6A3E;
    --steel: #A7B3B8;
    --charcoal: #2B2B29;

    --headline-blue: var(--blue);
    --greenbar: rgba(47, 106, 62, 0.07);
    --panel-a: #1E6A5E;
    --panel-b: #252660;

    --acc-green: #3B8A4E;
    --acc-blue: #2E7DB5;
    --acc-yellow: #DDA22C;
    --acc-red: #B5392A;

    --font-display: 'Archivo', 'Arial Black', Helvetica, sans-serif;
    --font-serif: 'Libre Caslon Text', Georgia, 'Times New Roman', serif;
    --font-type: 'Courier Prime', 'Courier New', monospace;

    --stipple: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1.4 -0.45'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Lights off */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --paper: #0F1E21;
        --paper-2: #14282B;
        --card: #172D30;
        --ink: #EFE6CF;
        --ink-2: #BDB39C;
        --ink-3: #82806F;
        --line: #2C4245;
        --headline-blue: #6FB3E3;
        --greenbar: rgba(247, 229, 138, 0.035);
        --panel-a: #12403A;
        --panel-b: #17173F;
        --charcoal: #0A1517;
    }
}

:root[data-theme="dark"] {
    --paper: #0F1E21;
    --paper-2: #14282B;
    --card: #172D30;
    --ink: #EFE6CF;
    --ink-2: #BDB39C;
    --ink-3: #82806F;
    --line: #2C4245;
    --headline-blue: #6FB3E3;
    --greenbar: rgba(247, 229, 138, 0.035);
    --panel-a: #12403A;
    --panel-b: #17173F;
    --charcoal: #0A1517;
}

html,
body {
    margin: 0;
    background: var(--paper);
}

.ent,
.ent * {
    box-sizing: border-box;
}

.ent {
    min-height: 100vh;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-serif);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
}

.ent a {
    color: inherit;
}

.ent button,
.ent input,
.ent select {
    font: inherit;
    color: inherit;
}

.ent .wrap {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 28px;
}

.ent .type {
    font-family: var(--font-type);
}

.ent .label {
    font-family: var(--font-display);
    font-stretch: 75%;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-3);
}

.ent .ticks {
    color: var(--red);
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.2em;
    font-style: italic;
    padding: 0 0.4em;
}

/* ---------- Bulbs (shared) ---------- */

.ent .bulb-on {
    fill: url(#ent-bulb-on);
}

.ent .bulb-off {
    fill: url(#ent-bulb-off);
}

.ent .glow {
    filter: drop-shadow(0 0 3px rgba(247, 229, 138, 0.9)) drop-shadow(0 0 9px rgba(221, 162, 44, 0.55));
}

/* ---------- Masthead ---------- */

.ent .masthead {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--paper);
    border-bottom: 3px double var(--ink);
}

.ent .masthead .wrap {
    display: flex;
    align-items: center;
    gap: 28px;
    height: 72px;
}

.ent .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.ent .brand svg {
    width: 30px;
    height: 38px;
    flex: none;
}

.ent .brand-name {
    font-family: var(--font-display);
    font-stretch: 125%;
    font-weight: 900;
    font-size: 22px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.ent .nav {
    display: flex;
    gap: 6px;
    flex: 1;
}

.ent .nav a {
    font-family: var(--font-display);
    font-stretch: 75%;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 8px 12px;
    color: var(--ink-2);
}

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

.ent .nav a.active {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: 8px;
    text-decoration-color: var(--red);
}

.ent .lamp {
    background: none;
    border: 0;
    padding: 4px;
    cursor: pointer;
    display: grid;
    place-items: center;
    border-radius: 50%;
}

.ent .lamp svg {
    width: 30px;
    height: 30px;
}

.ent .lamp:focus-visible {
    outline: 2px solid var(--red);
}

.ent .back-link {
    font-family: var(--font-type);
    font-size: 13px;
    color: var(--ink-3);
    text-decoration: none;
    white-space: nowrap;
}

.ent .back-link:hover {
    color: var(--ink);
}

.ent main {
    flex: 1;
}

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

.ent .footer {
    border-top: 3px double var(--ink);
    padding: 18px 0 22px;
}

.ent .footer .wrap {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: center;
}

.ent .footer .small {
    font-family: var(--font-display);
    font-stretch: 100%;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-2);
}

.ent .footer .sig {
    font-family: var(--font-display);
    font-stretch: 125%;
    font-weight: 900;
    font-size: 22px;
    text-transform: uppercase;
    color: var(--headline-blue);
    line-height: 1;
}

.ent .footer .small a {
    text-decoration: none;
}

.ent .footer .small a:hover {
    color: var(--red);
}

.ent .footer .small:last-child {
    text-align: right;
}

/* ---------- Illustrated panel (Univac backdrop) ---------- */

.ent .panel {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(37, 38, 96, 0.95), transparent 60%),
        radial-gradient(ellipse at 80% 70%, rgba(37, 38, 96, 0.75), transparent 55%),
        linear-gradient(160deg, var(--panel-b), var(--panel-a) 70%);
    color: #EFE6CF;
}

.ent .panel::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--stipple);
    opacity: 0.35;
    mix-blend-mode: overlay;
    pointer-events: none;
}

.ent .numeral {
    position: absolute;
    font-family: var(--font-display);
    font-weight: 800;
    line-height: 1;
    pointer-events: none;
    opacity: 0.9;
    animation: ent-drift 9s ease-in-out infinite alternate;
}

@keyframes ent-drift {
    from { transform: translateY(0); }
    to { transform: translateY(-10px); }
}

/* ---------- Articles: hero ad ---------- */

.ent .hero-panel {
    margin-top: 28px;
    border: 1px solid var(--ink);
}

.ent .hero-panel .stage {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    padding: 64px 24px 56px;
    min-height: 380px;
}

.ent .marquee {
    width: min(760px, 100%);
    height: auto;
    overflow: visible;
}

.ent .marquee .b {
    transition: opacity 0.4s;
}

.ent .marquee .lit {
    opacity: 0;
    animation: ent-switch-on 0.25s forwards;
}

@keyframes ent-switch-on {
    0% { opacity: 0; }
    60% { opacity: 1; }
    75% { opacity: 0.5; }
    100% { opacity: 1; }
}

.ent .stage-caption {
    margin-top: 22px;
    font-family: var(--font-type);
    font-size: 13px;
    letter-spacing: 0.08em;
    color: rgba(239, 230, 207, 0.75);
}

.ent .ad-headline {
    font-family: var(--font-display);
    font-stretch: 125%;
    font-weight: 900;
    text-transform: uppercase;
    font-size: clamp(30px, 5.4vw, 64px);
    line-height: 1;
    letter-spacing: -0.01em;
    text-align: center;
    margin: 44px 0 36px;
}

.ent .ad-headline .hl {
    color: var(--headline-blue);
}

.ent .ad-headline u {
    text-decoration-thickness: 0.07em;
    text-underline-offset: 0.12em;
}

.ent .ad-copy {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 36px;
    padding-bottom: 56px;
    border-bottom: 1px solid var(--line);
}

.ent .ad-copy .lead {
    font-family: var(--font-display);
    font-weight: 800;
    font-stretch: 100%;
    font-size: 19px;
    line-height: 1.35;
    text-align: center;
    margin: 0 0 12px;
}

.ent .ad-copy p {
    margin: 0 0 12px;
    text-align: justify;
    hyphens: auto;
}

.ent .ad-copy .definition {
    font-family: var(--font-type);
    font-size: 14px;
    text-align: left;
    border-left: 3px solid var(--red);
    padding-left: 12px;
    color: var(--ink-2);
}

/* ---------- Articles: cutaway building ---------- */

.ent .section-head {
    padding: 64px 0 24px;
    text-align: center;
}

.ent .section-head h2 {
    font-family: var(--font-display);
    font-stretch: 62%;
    font-weight: 800;
    font-size: clamp(36px, 6vw, 60px);
    line-height: 0.95;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    margin: 6px 0 10px;
}

.ent .section-head p {
    margin: 0 auto;
    max-width: 56ch;
    color: var(--ink-2);
}

.ent .building {
    position: relative;
    background: var(--charcoal);
    padding: 28px;
    display: grid;
    gap: 22px;
    border: 1px solid var(--ink);
}

.ent .building::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--stipple);
    opacity: 0.25;
    mix-blend-mode: overlay;
    pointer-events: none;
}

.ent .floor {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 120px 1fr 120px;
    gap: 24px;
    align-items: center;
    background: var(--card);
    color: var(--ink);
    padding: 26px 28px 30px;
    border: 4px solid #F1E8D3;
    border-radius: 34px 10px 46px 14px / 18px 40px 12px 30px;
    box-shadow: inset 0 -14px 0 var(--floor, var(--red));
}

.ent .floor:nth-child(even) {
    border-radius: 12px 44px 16px 38px / 36px 14px 30px 12px;
}

.ent .floor .num {
    font-family: var(--font-type);
    font-size: 13px;
    color: var(--ink-3);
}

.ent .floor .num b {
    display: block;
    font-family: var(--font-display);
    font-stretch: 62%;
    font-weight: 800;
    font-size: 44px;
    line-height: 1;
    color: var(--floor);
}

.ent .floor h3 {
    font-family: var(--font-display);
    font-stretch: 75%;
    font-weight: 800;
    font-size: 26px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin: 0 0 4px;
}

.ent .floor p {
    margin: 0;
    color: var(--ink-2);
}

.ent .floor svg {
    width: 96px;
    height: 72px;
    justify-self: end;
}

.ent .not-here {
    text-align: center;
    padding: 28px 0 0;
    color: var(--ink-2);
    font-size: 16px;
}

.ent .not-here s {
    color: var(--ink-3);
}

/* ---------- Articles: notice box ---------- */

.ent .notice {
    margin: 64px 0;
    border: 3px double var(--ink);
    padding: 36px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 36px;
    align-items: center;
    background: var(--card);
}

.ent .notice h2 {
    font-family: var(--font-display);
    font-stretch: 75%;
    font-weight: 800;
    font-size: 32px;
    line-height: 1.05;
    text-transform: uppercase;
    margin: 6px 0 10px;
}

.ent .notice p {
    margin: 0;
    color: var(--ink-2);
    max-width: 56ch;
}

.ent .btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--red);
    color: #F8F1E1;
    text-decoration: none;
    font-family: var(--font-display);
    font-stretch: 75%;
    font-weight: 800;
    font-size: 17px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 16px 24px;
    border-radius: 3px;
    box-shadow: 0 4px 0 #7A2318;
    white-space: nowrap;
}

.ent .btn:hover {
    filter: brightness(1.06);
}

.ent .btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #7A2318;
}

/* ---------- Index ---------- */

.ent .index-head {
    padding: 52px 0 12px;
    text-align: center;
}

.ent .index-head h1 {
    font-family: var(--font-display);
    font-stretch: 62%;
    font-weight: 800;
    font-size: clamp(44px, 8vw, 92px);
    line-height: 0.92;
    text-transform: uppercase;
    margin: 8px 0 14px;
}

.ent .index-head h1 .hl {
    color: var(--headline-blue);
}

.ent .index-head p {
    color: var(--ink-2);
    margin: 0 auto;
    max-width: 62ch;
}

.ent .counters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 28px;
    margin: 32px 0 8px;
}

.ent .counter .label {
    display: block;
    text-align: center;
    margin-bottom: 6px;
}

.ent .digits {
    display: flex;
    gap: 3px;
    justify-content: center;
}

.ent .digits span {
    font-family: var(--font-type);
    font-weight: 700;
    font-size: 26px;
    line-height: 1;
    background: var(--charcoal);
    color: #F1E8D3;
    padding: 8px 6px;
    border-radius: 3px;
    min-width: 26px;
    text-align: center;
    box-shadow: inset 0 -12px 0 rgba(255, 255, 255, 0.05);
}

.ent .console {
    margin: 32px 0 0;
    background: var(--steel);
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(0, 0, 0, 0.08));
    border: 1px solid #6D787C;
    border-radius: 6px;
    padding: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    color: #1E2023;
}

.ent .search {
    flex: 1 1 260px;
    background: #F8F1E1;
    border: 2px inset #8D989C;
    padding: 9px 12px;
    font-family: var(--font-type);
    font-size: 15px;
    color: #1E2023;
    outline: none;
}

.ent .search:focus {
    border-color: var(--red);
}

.ent .keys {
    display: inline-flex;
    gap: 4px;
}

.ent .key {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #ECE6D6;
    border: 1px solid #6D787C;
    border-radius: 4px;
    box-shadow: 0 3px 0 #6D787C;
    padding: 7px 12px;
    font-family: var(--font-display);
    font-stretch: 75%;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    color: #1E2023;
}

.ent .key::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #6E6A5E;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
}

.ent .key.on {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #6D787C;
}

.ent .key.on::before {
    background: var(--bulb);
    box-shadow: 0 0 6px var(--mustard), 0 0 2px var(--bulb);
}

.ent .console select {
    background: #ECE6D6;
    border: 1px solid #6D787C;
    border-radius: 4px;
    padding: 8px 10px;
    font-family: var(--font-display);
    font-stretch: 75%;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #1E2023;
}

.ent .result-count {
    font-family: var(--font-type);
    font-size: 14px;
    color: var(--ink-2);
    padding: 18px 0 8px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

/* Green-bar printout */
.ent .table {
    width: 100%;
    border-collapse: collapse;
    border-top: 2px solid var(--ink);
    border-bottom: 2px solid var(--ink);
}

.ent .table th {
    text-align: left;
    font-family: var(--font-display);
    font-stretch: 75%;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-3);
    padding: 10px 12px 10px 0;
    border-bottom: 1px solid var(--ink);
}

.ent .table th:first-child,
.ent .table td:first-child {
    padding-left: 10px;
}

.ent .table td {
    padding: 11px 12px 11px 0;
    vertical-align: middle;
}

.ent .table tbody tr:nth-child(6n+1),
.ent .table tbody tr:nth-child(6n+2),
.ent .table tbody tr:nth-child(6n+3) {
    background: var(--greenbar);
}

.ent .table tbody tr {
    cursor: pointer;
}

.ent .table tbody tr:hover {
    background: rgba(221, 162, 44, 0.16);
}

.ent .rank {
    font-family: var(--font-type);
    color: var(--ink-3);
    width: 56px;
}

.ent .name {
    font-family: var(--font-display);
    font-stretch: 100%;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.25;
}

.ent .sub {
    font-family: var(--font-serif);
    font-size: 13px;
    color: var(--ink-3);
}

.ent .num-col {
    font-family: var(--font-type);
    font-size: 15px;
    white-space: nowrap;
}

.ent .centuries {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-top: 4px;
    height: 12px;
}

.ent .centuries svg {
    width: 11px;
    height: 11px;
    flex: none;
}

.ent .status {
    display: inline-block;
    font-family: var(--font-display);
    font-stretch: 75%;
    font-weight: 800;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 2px 8px;
    border: 2px solid currentColor;
    border-radius: 2px;
    transform: rotate(-2deg);
}

.ent .status.alive { color: var(--acc-green); }
.ent .status.absorbed { color: var(--ink-3); }
.ent .status.defunct { color: var(--red); }

.ent .dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 6px;
    flex: none;
    box-shadow: inset 0 -2px 2px rgba(0, 0, 0, 0.25);
}

.ent .dot.green { background: var(--acc-green); }
.ent .dot.blue { background: var(--acc-blue); }
.ent .dot.yellow { background: var(--acc-yellow); }
.ent .dot.red { background: var(--acc-red); }

.ent .site-link {
    font-family: var(--font-type);
    font-size: 13px;
    color: var(--ink-2);
    text-decoration: none;
    border-bottom: 1px dotted var(--ink-3);
}

.ent .site-link:hover {
    color: var(--red);
}

.ent .more {
    display: flex;
    justify-content: center;
    padding: 28px 0 8px;
}

.ent .legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 22px;
    padding: 24px 0 64px;
    font-size: 14px;
    color: var(--ink-2);
}

.ent .legend .century {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ent .legend svg {
    width: 12px;
    height: 12px;
}

.ent .empty {
    padding: 40px 0;
    text-align: center;
    color: var(--ink-3);
}

/* ---------- Entry ---------- */

.ent .crumb {
    display: inline-block;
    margin: 30px 0 0;
    font-family: var(--font-type);
    font-size: 14px;
    color: var(--ink-2);
    text-decoration: none;
}

.ent .crumb:hover {
    color: var(--red);
}

/* Punched card */
.ent .card {
    position: relative;
    margin-top: 18px;
    background: #F4E9CB;
    color: #1E2023;
    padding: 36px 40px 34px;
    clip-path: polygon(36px 0, 100% 0, 100% 100%, 0 100%, 0 36px);
    overflow: hidden;
}

.ent .card::before {
    content: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9";
    position: absolute;
    inset: 10px 16px;
    font-family: var(--font-type);
    font-size: 10px;
    line-height: 2.1;
    letter-spacing: 0.32em;
    color: rgba(30, 32, 35, 0.11);
    word-break: break-all;
    overflow: hidden;
    pointer-events: none;
}

.ent .card>* {
    position: relative;
}

.ent .card .holes {
    position: absolute;
    right: 40px;
    top: 30px;
    display: grid;
    grid-template-columns: repeat(6, 7px);
    gap: 9px 6px;
}

.ent .card .holes i {
    width: 7px;
    height: 13px;
    background: var(--charcoal);
    border-radius: 1px;
}

.ent .card .label {
    color: #7F786A;
}

.ent .card h1 {
    font-family: var(--font-display);
    font-stretch: 125%;
    font-weight: 900;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1;
    text-transform: uppercase;
    margin: 10px 0 14px;
    max-width: 18ch;
}

.ent .card .summary {
    font-size: 19px;
    max-width: 58ch;
    margin: 0 0 18px;
    color: #4B4840;
}

/* Spec plate */
.ent .plate {
    position: relative;
    margin: 28px 0 0;
    background: linear-gradient(180deg, #C9D1D4, #9DA9AE);
    color: #1E2023;
    border: 1px solid #6D787C;
    border-radius: 6px;
    padding: 22px 28px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 18px 24px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.ent .plate::before,
.ent .plate::after {
    content: "";
    position: absolute;
    top: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #EEF2F3, #6D787C);
}

.ent .plate::before { left: 8px; }
.ent .plate::after { right: 8px; }

.ent .plate .label {
    color: #3E4649;
}

.ent .fact .v {
    font-family: var(--font-display);
    font-stretch: 100%;
    font-weight: 700;
    font-size: 18px;
    margin-top: 2px;
    line-height: 1.25;
    word-break: break-word;
}

.ent .fact .note {
    font-family: var(--font-type);
    font-size: 12px;
    color: #3E4649;
    margin-top: 2px;
}

.ent .fact a {
    text-decoration: none;
    border-bottom: 1px dotted #3E4649;
}

.ent .entry-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 56px;
    padding: 44px 0 72px;
}

.ent .block {
    margin-bottom: 40px;
}

.ent .block h2 {
    font-family: var(--font-display);
    font-stretch: 75%;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 14px;
    padding-bottom: 6px;
    border-bottom: 3px double var(--ink);
}

.ent .block p {
    margin: 0;
}

.ent .timeline {
    list-style: none;
    margin: 0;
    padding: 0 0 0 4px;
    position: relative;
}

.ent .timeline::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 14px;
    bottom: 14px;
    width: 2px;
    background: var(--line);
}

.ent .timeline li {
    position: relative;
    display: grid;
    grid-template-columns: 14px 64px 1fr;
    gap: 14px;
    padding: 9px 0;
    align-items: start;
}

.ent .timeline svg {
    width: 14px;
    height: 14px;
    margin-top: 5px;
}

.ent .timeline .yr {
    font-family: var(--font-type);
    font-weight: 700;
}

.ent .timeline .type {
    font-family: var(--font-display);
    font-stretch: 75%;
    font-weight: 800;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--red);
    margin-right: 8px;
}

.ent .metric {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--line);
}

.ent .metric .k {
    color: var(--ink-2);
    font-size: 15px;
}

.ent .metric .val {
    text-align: right;
    font-family: var(--font-type);
    font-size: 15px;
}

.ent .metric .meta {
    display: block;
    font-size: 12px;
    color: var(--ink-3);
}

.ent .chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ent .chip {
    font-family: var(--font-display);
    font-stretch: 87%;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid var(--ink);
    padding: 3px 10px;
    border-radius: 999px;
}

.ent .sources {
    margin: 0;
    padding-left: 22px;
    font-size: 15px;
}

.ent .sources li {
    margin-bottom: 6px;
}

.ent .placeholder {
    border: 2px dashed var(--line);
    padding: 16px 18px;
    font-size: 15px;
    color: var(--ink-2);
    font-style: italic;
}

/* ---------- Engine Room ---------- */

.ent .floor.basement {
    text-decoration: none;
    background: var(--paper-2);
    border-style: dashed;
    transition: transform 0.15s;
}

.ent .floor.basement:hover {
    transform: translateY(-2px);
}

.ent .basement-icon {
    justify-self: end;
    color: var(--ink);
}

.ent .basement-icon svg {
    width: 104px;
    height: 52px;
}

.ent .term {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: help;
    text-decoration: underline dotted;
    text-decoration-color: var(--red);
    text-underline-offset: 3px;
}

.ent .term:hover,
.ent .term:focus-visible {
    color: var(--red);
    outline: none;
}

.ent .er-head {
    text-align: center;
    padding: 52px 0 28px;
}

.ent .er-emblem svg {
    width: 120px;
    height: 60px;
    color: var(--ink);
}

.ent .er-head h1,
.ent .er-title h1 {
    font-family: var(--font-display);
    font-stretch: 62%;
    font-weight: 800;
    font-size: clamp(44px, 8vw, 92px);
    line-height: 0.92;
    text-transform: uppercase;
    margin: 8px 0 14px;
}

.ent .er-head p,
.ent .er-title p {
    color: var(--ink-2);
    margin: 0 auto;
    max-width: 60ch;
}

.ent .exhibits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.ent .exhibit {
    position: relative;
    display: block;
    text-decoration: none;
    background: var(--card);
    border: 1px solid var(--ink);
    padding: 22px 22px 26px;
    clip-path: polygon(22px 0, 100% 0, 100% 100%, 0 100%, 0 22px);
}

.ent .exhibit.open:hover {
    background: var(--paper-2);
}

.ent .exhibit.soon {
    opacity: 0.62;
}

.ent .exhibit-lamp svg {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 18px;
    height: 18px;
}

.ent .exhibit h2 {
    font-family: var(--font-display);
    font-stretch: 75%;
    font-weight: 800;
    font-size: 26px;
    text-transform: uppercase;
    line-height: 1.05;
    margin: 6px 0 8px;
}

.ent .exhibit p {
    margin: 0;
    color: var(--ink-2);
    font-size: 15px;
}

.ent .exhibit-go {
    display: inline-block;
    margin-top: 14px;
    font-family: var(--font-display);
    font-stretch: 75%;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--red);
}

.ent .er-credit {
    text-align: center;
    font-size: 13px;
    color: var(--ink-3);
    margin: 36px auto 64px;
    max-width: 70ch;
}

.ent .er-title {
    text-align: center;
    padding: 24px 0 28px;
}

.ent .er-title h1 {
    font-stretch: 125%;
    font-weight: 900;
    font-size: clamp(30px, 5vw, 58px);
    line-height: 1;
}

.ent .er-title h1 u {
    text-decoration-thickness: 0.07em;
    text-underline-offset: 0.12em;
    color: var(--headline-blue);
}

/* Diagram stage: a drawing board with a blueprint grid */
.ent .er-stage {
    background-color: var(--card);
    background-image:
        linear-gradient(rgba(46, 125, 181, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(46, 125, 181, 0.08) 1px, transparent 1px);
    background-size: 20px 20px;
    border: 1px solid var(--ink);
    padding: 18px 18px 0;
}

.ent .er-diagram {
    display: block;
    width: 100%;
    max-width: 860px;
    height: auto;
    margin: 0 auto;
}

.ent .er-diagram [data-term] {
    cursor: pointer;
}

.ent .er-diagram .pipe {
    stroke: var(--steel);
    stroke-width: 16;
}

.ent .er-diagram .liquid {
    stroke-linecap: butt;
    transition: stroke-width 0.1s;
}

.ent .er-diagram .tank {
    fill: var(--paper);
}

.ent .er-diagram .tank-frame {
    fill: none;
    stroke: var(--ink);
    stroke-width: 2.5;
}

.ent .er-diagram .cloud {
    fill: var(--paper);
    stroke: var(--ink-2);
    stroke-width: 1.5;
}

.ent .er-diagram .conv circle {
    fill: var(--paper);
    stroke: var(--ink);
    stroke-width: 1.6;
}

.ent .er-diagram .conv text,
.ent .er-diagram .er-label {
    font-family: var(--font-display);
    font-stretch: 75%;
    font-weight: 700;
    font-size: 14px;
    fill: var(--ink);
}

.ent .er-diagram .er-value {
    font-family: var(--font-type);
    font-weight: 700;
    font-size: 18px;
    fill: var(--ink);
    paint-order: stroke;
    stroke: var(--paper);
    stroke-width: 4px;
}

.ent .er-diagram .er-small {
    font-family: var(--font-type);
    font-size: 10px;
    letter-spacing: 0.1em;
    fill: var(--ink-3);
}

.ent .er-diagram .link {
    fill: none;
    stroke: var(--ink-2);
    stroke-width: 1.5;
}

.ent .er-diagram .loop text {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 17px;
    fill: #F8F1E1;
}

.ent .er-diagram .hl {
    filter: drop-shadow(0 0 4px var(--mustard)) drop-shadow(0 0 8px rgba(221, 162, 44, 0.7));
}

.ent .er-diagram .link.hl {
    stroke: var(--red);
    stroke-width: 2.5;
}

.ent .er-def {
    border-top: 1px solid var(--ink);
    margin: 10px -18px 0;
    padding: 14px 18px 16px;
    background: var(--paper);
    min-height: 78px;
}

.ent .er-def p {
    margin: 4px 0 0;
    max-width: 70ch;
}

.ent .er-console {
    margin-top: 0;
    border-radius: 0 0 6px 6px;
    border-top: 0;
}

.ent .er-console #er-year {
    flex: 1 1 200px;
    accent-color: var(--red);
}

.ent .er-play {
    min-width: 108px;
    justify-content: center;
}

.ent .er-year-readout {
    font-weight: 700;
    min-width: 72px;
}

.ent .er-control {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ent .er-ctl-label {
    font-family: var(--font-display);
    font-stretch: 75%;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ent .er-charts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 28px;
}

.ent .er-chart {
    margin: 0;
    border-top: 3px double var(--ink);
    padding-top: 8px;
}

.ent .er-chart figcaption {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.ent .er-chart-val {
    font-weight: 700;
    font-size: 18px;
}

.ent .er-chart svg {
    width: 100%;
    height: auto;
    display: block;
}

.ent .er-chart .grid {
    stroke: var(--line);
    stroke-width: 1;
}

.ent .er-chart .tick {
    font-family: var(--font-type);
    font-size: 10px;
    fill: var(--ink-3);
}

.ent .er-chart .ghost {
    fill: none;
    stroke: var(--ink-3);
    stroke-width: 1.5;
    stroke-dasharray: 4 4;
}

.ent .er-chart .cursor {
    stroke: var(--red);
    stroke-width: 1;
    stroke-dasharray: 2 3;
}

.ent .er-findings {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 22px;
    min-height: 56px;
}

.ent .er-findings div {
    background: var(--charcoal);
    color: #F1E8D3;
    padding: 10px 14px;
    border-radius: 3px;
}

.ent .er-findings .label {
    color: #A7B3B8;
    display: block;
}

.ent .er-findings b {
    font-size: 18px;
}

.ent .er-findings .sub {
    grid-column: 1 / -1;
    margin: 0;
    text-align: center;
}

.ent .er-lessons {
    margin-top: 44px;
}

.ent .er-lessons h2 {
    font-family: var(--font-display);
    font-stretch: 75%;
    font-weight: 800;
    font-size: 28px;
    text-transform: uppercase;
    margin: 0 0 12px;
    padding-bottom: 6px;
    border-bottom: 3px double var(--ink);
}

.ent .er-lessons ol {
    margin: 0;
    padding-left: 26px;
    columns: 2;
    column-gap: 44px;
}

.ent .er-lessons li {
    margin-bottom: 10px;
    break-inside: avoid;
}

.ent .er-lessons li::marker {
    font-family: var(--font-type);
    font-weight: 700;
    color: var(--red);
}

/* Hall sections */
.ent .er-section {
    margin-top: 28px;
}

.ent .er-section-head {
    display: flex;
    align-items: baseline;
    gap: 18px;
    flex-wrap: wrap;
    border-bottom: 3px double var(--ink);
    padding-bottom: 8px;
    margin-bottom: 18px;
}

.ent .er-section-head h2 {
    font-family: var(--font-display);
    font-stretch: 75%;
    font-weight: 800;
    font-size: 30px;
    text-transform: uppercase;
    margin: 0;
}

.ent .er-section-head p {
    margin: 0;
    color: var(--ink-2);
    font-size: 15px;
}

/* Learning curve: cards joined by a wire with lamps */
.ent .exhibits.track {
    position: relative;
}

.ent .exhibits.track::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 27px;
    border-top: 2px dashed var(--ink-3);
    z-index: 0;
}

.ent .exhibits.track .exhibit {
    z-index: 1;
}

/* Delay marks, legends, steps */
.ent .er-diagram .delay line {
    stroke: var(--red);
    stroke-width: 2.5;
}

.ent .er-diagram .delay text {
    fill: var(--red);
}

.ent .er-diagram .delay.hl line {
    stroke-width: 4;
}

.ent .er-legend {
    font-family: var(--font-type);
    font-size: 11px;
    color: var(--ink-3);
}

.ent .er-legend i {
    display: inline-block;
    width: 14px;
    height: 0;
    border-top: 3px solid var(--c);
    vertical-align: middle;
    margin: 0 4px 0 8px;
}

.ent .er-legend i.dash {
    border-top-style: dashed;
}

.ent .er-try {
    padding: 3px 10px;
    font-size: 12px;
    margin-left: 6px;
    vertical-align: 1px;
}

.ent .er-next {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 36px;
}

.ent .er-next .btn {
    margin-left: auto;
}

.ent .er-prev {
    font-family: var(--font-display);
    font-stretch: 75%;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--red);
}

.ent .er-soon {
    font-family: var(--font-type);
    font-size: 13px;
    color: var(--ink-3);
}

/* 3D view */
.ent .er-viewbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.ent .er-hint {
    font-family: var(--font-type);
    font-size: 13px;
    color: var(--ink-3);
    margin-left: auto;
}

.ent .er-3d {
    display: none;
    position: relative;
    height: clamp(380px, 56vw, 600px);
    margin: 0 -18px;
    background: radial-gradient(ellipse at 50% 35%, rgba(247, 229, 138, 0.18), transparent 65%);
}

.ent .er-stage.is-3d .er-3d {
    display: block;
}

.ent .er-stage.is-3d .er-diagram {
    display: none;
}

.ent .er-3d canvas {
    display: block;
}

.ent .er-3d-msg {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    margin: 0;
    font-family: var(--font-type);
    color: var(--ink-3);
    text-align: center;
    padding: 0 24px;
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
    .ent .numeral { animation: none; }
    .ent .marquee .lit { animation: none; opacity: 1; }
}

/* ---------- Responsive ---------- */

@media (max-width: 820px) {
    .ent .ad-copy {
        grid-template-columns: 1fr;
        gap: 8px;
    }

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

    .ent .notice {
        grid-template-columns: 1fr;
        padding: 26px 20px;
    }

    .ent .floor {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 20px 20px 28px;
    }

    .ent .floor svg {
        display: none;
    }

    .ent .er-charts,
    .ent .er-findings {
        grid-template-columns: 1fr 1fr;
    }

    .ent .er-lessons ol {
        columns: 1;
    }

    .ent .floor .num b {
        display: inline;
        font-size: 30px;
        margin-right: 8px;
    }
}

@media (max-width: 640px) {
    .ent .wrap {
        padding: 0 16px;
    }

    .ent .masthead .wrap {
        gap: 10px;
        height: 64px;
    }

    .ent .brand svg {
        width: 24px;
        height: 30px;
    }

    .ent .brand-name {
        font-size: 16px;
    }

    .ent .back-link {
        display: none;
    }

    .ent .nav {
        justify-content: flex-end;
        gap: 0;
    }

    .ent .nav a {
        padding: 8px 5px;
        font-size: 13px;
        letter-spacing: 0.08em;
    }

    .ent .brand-name {
        display: none;
    }

    .ent .er-charts {
        grid-template-columns: 1fr;
    }

    .ent .er-stage {
        padding: 8px 8px 0;
    }

    .ent .er-def {
        margin: 8px -8px 0;
    }

    .ent .er-3d {
        margin: 0 -8px;
    }

    .ent .hero-panel {
        --num-scale: 0.5;
    }

    .ent .hero-panel .stage {
        min-height: 0;
        padding: 40px 12px 32px;
    }

    .ent .building {
        padding: 14px;
        gap: 14px;
    }

    .ent .footer .wrap {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .ent .footer .small:last-child {
        text-align: center;
    }

    .ent .card {
        padding: 30px 20px 24px;
    }

    .ent .card .holes {
        display: none;
    }

    .ent .plate {
        padding: 20px 18px;
    }

    /* Printout rows become stacked cards */
    .ent .table thead {
        display: none;
    }

    .ent .table,
    .ent .table tbody,
    .ent .table tr,
    .ent .table td {
        display: block;
    }

    .ent .table tr {
        display: grid;
        grid-template-columns: 44px 1fr auto;
        gap: 4px 8px;
        padding: 12px 8px;
    }

    .ent .table td {
        padding: 0;
    }

    .ent .table th:first-child,
    .ent .table td:first-child {
        padding-left: 0;
    }

    .ent .table td.rank { grid-column: 1; grid-row: 1 / 4; }
    .ent .table td.col-name { grid-column: 2; grid-row: 1; }
    .ent .table td.col-status { grid-column: 3; grid-row: 1; }
    .ent .table td.col-country,
    .ent .table td.col-founded { display: none; }
    .ent .table td.col-age { grid-column: 2 / 4; grid-row: 2; }
    .ent .table td.col-data { grid-column: 2 / 4; grid-row: 3; }
}
