:root {
    --paper: #f1eee3;
    --paper-deep: #d9d3c3;
    --white: #fffdf5;
    --ink: #11110f;
    --muted: #67635b;
    --orange: #ff5a1f;
    --yellow: #f5df38;
    --green: #b6f24a;
    --line: #11110f;
    --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    background: var(--paper);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    border-top: 7px solid var(--orange);
}

::selection { background: var(--yellow); color: var(--ink); }
button, input { font: inherit; }
button { color: inherit; }
.shell { width: min(calc(100% - 48px), var(--max)); margin-inline: auto; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--ink);
    color: var(--white);
    border-bottom: 2px solid var(--ink);
}

.nav-wrap {
    min-height: 78px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 34px;
}

.brand {
    display: inline-flex;
    align-items: stretch;
    min-height: 48px;
    color: var(--white);
    text-decoration: none;
    border: 2px solid var(--white);
}

.brand-mark {
    display: grid;
    place-items: center;
    min-width: 56px;
    padding: 0 10px;
    background: var(--orange);
    color: var(--ink);
    font-family: "Courier New", monospace;
    font-weight: 900;
    font-size: 1.05rem;
    border-right: 2px solid var(--white);
}

.brand-name {
    display: grid;
    align-content: center;
    padding: 5px 13px 4px;
    font-family: "Arial Narrow", Arial, sans-serif;
    font-size: .73rem;
    letter-spacing: .13em;
    line-height: 1.15;
}

.nav-wrap nav {
    justify-self: center;
    display: flex;
    gap: 34px;
}

.nav-wrap nav a {
    color: var(--white);
    text-decoration: none;
    font-family: "Courier New", monospace;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .04em;
    padding: 9px 0 7px;
    border-bottom: 2px solid transparent;
}

.nav-wrap nav a span { color: var(--orange); margin-right: 6px; }
.nav-wrap nav a:hover { border-bottom-color: var(--orange); }

.header-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: "Courier New", monospace;
    font-weight: 700;
    font-size: .72rem;
    letter-spacing: .06em;
}

.header-status i {
    width: 9px;
    height: 9px;
    background: var(--green);
    border: 1px solid var(--white);
}

.workbench-hero {
    padding: 76px 0 66px;
    border-bottom: 3px solid var(--ink);
    background: var(--paper);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(330px, .65fr);
    gap: 72px;
    align-items: end;
}

.serial-line {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    max-width: 760px;
    padding: 9px 0;
    border-top: 2px solid var(--ink);
    border-bottom: 2px solid var(--ink);
    font-family: "Courier New", monospace;
    font-size: .73rem;
    font-weight: 700;
    letter-spacing: .08em;
}

.hero-copy h1 {
    margin: 25px 0 18px;
    font-family: "Arial Black", Impact, sans-serif;
    font-size: clamp(4rem, 8.5vw, 8.5rem);
    line-height: .77;
    letter-spacing: -.075em;
    text-transform: uppercase;
}

.hero-copy h1 span { display: block; }
.hero-copy .accent-word {
    color: var(--orange);
    -webkit-text-stroke: 2px var(--ink);
    text-shadow: 5px 5px 0 var(--ink);
}

.hero-lede {
    max-width: 660px;
    margin: 34px 0 30px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.25rem, 2vw, 1.7rem);
    line-height: 1.35;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    max-width: 760px;
    border: 2px solid var(--ink);
}

.hero-stats > div {
    min-height: 78px;
    padding: 13px 16px;
    border-right: 2px solid var(--ink);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-stats > div:last-child { border-right: 0; }
.hero-stats strong { font-family: "Arial Black", Arial, sans-serif; font-size: 1.15rem; }
.hero-stats span { margin-top: 4px; font: 700 .65rem/1.2 "Courier New", monospace; letter-spacing: .08em; }

.quick-find {
    background: var(--yellow);
    border: 3px solid var(--ink);
    box-shadow: 10px 10px 0 var(--ink);
    padding: 0 24px 24px;
}

.panel-label {
    margin: 0 -24px 24px;
    padding: 10px 13px;
    background: var(--ink);
    color: var(--white);
    display: flex;
    justify-content: space-between;
    font: 700 .7rem/1 "Courier New", monospace;
    letter-spacing: .07em;
}

.quick-find > label {
    display: block;
    margin-bottom: 11px;
    font-family: "Arial Black", Arial, sans-serif;
    font-size: 1.2rem;
    text-transform: uppercase;
}

.search-shell {
    display: flex;
    align-items: center;
    background: var(--ink);
    border: 3px solid var(--ink);
    min-height: 58px;
}

.search-prefix {
    color: var(--green);
    padding-left: 14px;
    font: 700 1rem "Courier New", monospace;
}

.search-shell input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--white);
    padding: 16px 14px;
    font-family: "Courier New", monospace;
    font-size: .92rem;
}

.search-shell input::placeholder { color: #aaa79e; }

.finder-hint {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 15px;
    font: 700 .64rem "Courier New", monospace;
}

.finder-hint button {
    border: 1px solid var(--ink);
    background: transparent;
    padding: 5px 7px;
    cursor: pointer;
    font: inherit;
}

.finder-hint button:hover { background: var(--ink); color: var(--yellow); }

.finder-note {
    border-top: 2px solid var(--ink);
    margin-top: 26px;
    padding-top: 12px;
    font: 700 .67rem/1.4 "Courier New", monospace;
    letter-spacing: .04em;
}

.tool-index {
    padding: 64px 0 82px;
    background: var(--white);
    border-bottom: 3px solid var(--ink);
}

.index-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 25px;
}

.index-header > div { display: flex; align-items: end; gap: 18px; }
.index-number {
    font: 900 3.4rem/.8 "Arial Black", Arial, sans-serif;
    color: var(--orange);
}

.kicker {
    display: block;
    font: 700 .68rem/1.2 "Courier New", monospace;
    letter-spacing: .12em;
    margin-bottom: 5px;
}

.index-header h2, .rules-title h2 {
    margin: 0;
    font-family: "Arial Black", Impact, sans-serif;
    text-transform: uppercase;
    letter-spacing: -.04em;
}

.index-header h2 { font-size: clamp(2rem, 4vw, 3.6rem); line-height: .95; }
.item-count {
    border: 2px solid var(--ink);
    padding: 7px 10px;
    font: 700 .68rem "Courier New", monospace;
}

.tool-list { border-top: 3px solid var(--ink); }
.tool-drawer {
    display: grid;
    grid-template-columns: 90px 62px minmax(0, 1fr) 170px 90px;
    align-items: center;
    gap: 18px;
    min-height: 104px;
    padding: 14px 16px 14px 0;
    border-bottom: 2px solid var(--ink);
    color: var(--ink);
    text-decoration: none;
    transition: transform .12s ease, background-color .12s ease, box-shadow .12s ease;
}

.tool-drawer:hover {
    background: var(--yellow);
    transform: translate(-4px, -4px);
    box-shadow: 6px 6px 0 var(--ink);
}

.tool-code {
    align-self: stretch;
    display: grid;
    place-items: center;
    background: var(--ink);
    color: var(--white);
    font: 700 .74rem "Courier New", monospace;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

.tool-glyph {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    background: var(--orange);
    border: 2px solid var(--ink);
    font: 900 1.05rem "Courier New", monospace;
}

.tool-copy { min-width: 0; }
.tool-copy strong {
    display: block;
    margin-bottom: 7px;
    font-family: "Arial Black", Arial, sans-serif;
    font-size: 1.18rem;
    text-transform: uppercase;
}
.tool-copy small { display: block; color: var(--muted); font-family: Georgia, serif; font-size: .93rem; line-height: 1.4; }
.tool-meta { display: flex; flex-direction: column; gap: 4px; border-left: 2px solid var(--ink); padding-left: 15px; }
.tool-meta b, .tool-meta small, .launch-label { font: 700 .67rem/1.3 "Courier New", monospace; letter-spacing: .05em; }
.tool-meta small { color: var(--muted); }
.launch-label { justify-self: end; border: 2px solid var(--ink); padding: 9px 10px; background: var(--white); }
.launch-label b { color: var(--orange); font-size: 1rem; }
.tool-drawer[hidden] { display: none; }

.empty-search {
    padding: 44px 20px;
    border-bottom: 2px solid var(--ink);
    background: var(--paper);
    text-align: center;
}
.empty-search strong { display: block; margin-bottom: 8px; font-family: "Arial Black", Arial, sans-serif; }
.empty-search span { font-family: Georgia, serif; }

.bench-rules {
    background: var(--yellow);
    border-bottom: 3px solid var(--ink);
}

.rules-grid {
    display: grid;
    grid-template-columns: 1.3fr repeat(3, 1fr);
    min-height: 245px;
    border-left: 2px solid var(--ink);
}

.rules-title, .rule { padding: 34px 28px; border-right: 2px solid var(--ink); }
.rules-title { background: var(--orange); }
.rules-title h2 { font-size: clamp(1.65rem, 3vw, 2.8rem); line-height: .95; margin-top: 14px; }
.rule { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-content: start; }
.rule > span { font: 900 1.8rem/1 "Arial Black", Arial, sans-serif; }
.rule strong { font: 900 .82rem "Arial Black", Arial, sans-serif; letter-spacing: .02em; }
.rule p { margin: 10px 0 0; font-family: Georgia, serif; line-height: 1.45; font-size: .9rem; }

.site-footer { background: var(--ink); color: var(--white); }
.footer-grid {
    min-height: 145px;
    display: grid;
    grid-template-columns: 1.3fr 1fr .6fr 1fr;
    gap: 28px;
    align-items: center;
}
.footer-grid > div { display: flex; flex-direction: column; gap: 5px; }
.footer-grid small { color: #aaa79e; font: 700 .62rem "Courier New", monospace; letter-spacing: .08em; }
.footer-grid span { font: 700 .76rem "Courier New", monospace; }
.footer-brand { flex-direction: row !important; align-items: center; gap: 12px !important; }
.footer-brand > span { background: var(--orange); color: var(--ink); padding: 10px; font-weight: 900; }
.footer-brand strong { font: 900 .86rem "Arial Black", Arial, sans-serif; letter-spacing: .05em; }
.footer-end { text-align: right; font: 700 .7rem/1.45 "Courier New", monospace; letter-spacing: .06em; }

/* Tool pages */
.tool-page { padding: 42px 0 86px; }
.tool-crumbs { display: flex; gap: 10px; align-items: center; margin-bottom: 28px; font: 700 .7rem "Courier New", monospace; letter-spacing: .05em; }
.tool-crumbs a { color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--orange); }
.tool-crumbs a:hover { background: var(--yellow); }

.tool-header {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr) 135px;
    gap: 30px;
    align-items: stretch;
    padding: 0 0 34px;
    border-bottom: 3px solid var(--ink);
}

.tool-id-block { border: 3px solid var(--ink); display: grid; grid-template-rows: auto 1fr; min-height: 132px; background: var(--orange); }
.tool-id-block span { background: var(--ink); color: var(--white); padding: 7px 8px; font: 700 .68rem "Courier New", monospace; }
.tool-id-block strong { display: grid; place-items: center; font: 900 2rem "Courier New", monospace; }
.tool-title-block h1 {
    margin: 5px 0 10px;
    font-family: "Arial Black", Impact, sans-serif;
    font-size: clamp(2.8rem, 6vw, 5.5rem);
    line-height: .9;
    letter-spacing: -.06em;
    text-transform: uppercase;
}
.tool-title-block p { max-width: 760px; margin: 0; color: var(--muted); font: 1.05rem/1.55 Georgia, serif; }
.local-stamp { align-self: center; border: 3px solid var(--ink); padding: 13px 8px 10px; text-align: center; transform: rotate(2deg); background: var(--green); }
.local-stamp b { display: block; font: 900 1.15rem "Arial Black", Arial, sans-serif; }
.local-stamp span { display: block; margin-top: 3px; font: 700 .58rem "Courier New", monospace; }

.generator-card {
    margin-top: 35px;
    border: 3px solid var(--ink);
    background: var(--white);
    box-shadow: 8px 8px 0 var(--ink);
    padding: 0 28px 30px;
}
.card-strip {
    margin: 0 -28px 28px;
    min-height: 40px;
    padding: 10px 13px;
    background: var(--ink);
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font: 700 .68rem "Courier New", monospace;
    letter-spacing: .06em;
}
.card-strip span:first-child { color: var(--orange); }

.result-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 12px; }
.password-output {
    width: 100%;
    min-width: 0;
    border: 3px solid var(--ink);
    background: var(--ink);
    color: var(--green);
    padding: 16px;
    font: 700 1.08rem "Courier New", monospace;
    outline: none;
}

.button {
    border: 3px solid var(--ink);
    border-radius: 0;
    padding: 0 18px;
    font: 900 .78rem "Arial Black", Arial, sans-serif;
    letter-spacing: .03em;
    cursor: pointer;
    box-shadow: 3px 3px 0 var(--ink);
    transition: transform .08s ease, box-shadow .08s ease;
}
.button:hover { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.button.secondary { background: var(--paper); }
.button.primary { background: var(--orange); }
.button.wide { width: 100%; min-height: 58px; margin-top: 25px; display: flex; align-items: center; justify-content: center; gap: 12px; }
.button.wide span { font-size: 1.2rem; }

.strength-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; margin: 18px 0 30px; font: 700 .68rem "Courier New", monospace; }
.strength-track { height: 10px; border: 2px solid var(--ink); background: var(--paper-deep); }
.strength-track div { height: 100%; background: var(--orange); }
.strength-row strong { min-width: 70px; text-align: right; }

.control-row { display: grid; gap: 12px; border-top: 2px solid var(--ink); padding-top: 22px; }
.control-row label { display: flex; justify-content: space-between; align-items: center; font: 700 .72rem "Courier New", monospace; letter-spacing: .05em; }
.control-row label strong { font: 900 1.4rem "Arial Black", Arial, sans-serif; }
.control-row input[type="range"] { width: 100%; accent-color: var(--orange); }

.option-grid {
    margin: 28px 0 0;
    padding: 0;
    border: 2px solid var(--ink);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}
.option-grid legend { margin-left: 12px; padding: 0 8px; background: var(--white); font: 700 .66rem "Courier New", monospace; letter-spacing: .07em; }
.option-grid label {
    min-height: 74px;
    padding: 14px;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    align-content: center;
    gap: 3px 9px;
    border-right: 2px solid var(--ink);
    cursor: pointer;
}
.option-grid label:last-child { border-right: 0; }
.option-grid input { grid-row: 1 / span 2; align-self: center; accent-color: var(--orange); width: 17px; height: 17px; }
.option-grid span { font: 900 .7rem "Arial Black", Arial, sans-serif; }
.option-grid small { color: var(--muted); font: 700 .66rem "Courier New", monospace; }

.privacy-note { margin: 24px 0 0; padding-top: 16px; border-top: 2px dashed var(--ink); color: var(--muted); font: .72rem/1.5 "Courier New", monospace; }
.privacy-note b { color: var(--ink); }

.content-card {
    margin-top: 52px;
    padding: 24px 0;
    border-top: 3px solid var(--ink);
    border-bottom: 3px solid var(--ink);
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 30px;
}
.content-index { font: 700 .68rem "Courier New", monospace; letter-spacing: .07em; color: var(--orange); }
.content-card h2 { margin: 0 0 10px; font-family: "Arial Black", Arial, sans-serif; text-transform: uppercase; letter-spacing: -.03em; }
.content-card p { margin: 0; max-width: 760px; color: var(--muted); font: 1rem/1.65 Georgia, serif; }

@media (max-width: 980px) {
    .header-status { display: none; }
    .nav-wrap { grid-template-columns: auto 1fr; }
    .nav-wrap nav { justify-self: end; }
    .hero-grid { grid-template-columns: 1fr; gap: 42px; }
    .quick-find { max-width: 640px; }
    .rules-grid { grid-template-columns: 1fr 1fr; }
    .rules-title { grid-row: span 2; }
    .rule:nth-child(3) { border-top: 2px solid var(--ink); }
    .rule:nth-child(4) { border-top: 2px solid var(--ink); }
    .tool-drawer { grid-template-columns: 72px 58px minmax(0, 1fr) 110px; }
    .tool-meta { display: none; }
    .tool-header { grid-template-columns: 110px minmax(0, 1fr); }
    .local-stamp { display: none; }
    .option-grid { grid-template-columns: 1fr 1fr; }
    .option-grid label:nth-of-type(2) { border-right: 0; }
    .option-grid label:nth-of-type(3), .option-grid label:nth-of-type(4) { border-top: 2px solid var(--ink); }
}

@media (max-width: 680px) {
    body { border-top-width: 5px; }
    .shell { width: min(calc(100% - 24px), var(--max)); }
    .nav-wrap { min-height: 68px; }
    .brand { min-height: 42px; }
    .brand-mark { min-width: 50px; }
    .nav-wrap nav { display: none; }
    .workbench-hero { padding: 48px 0; }
    .serial-line span:last-child { display: none; }
    .hero-copy h1 { font-size: clamp(3.35rem, 19vw, 6rem); }
    .hero-copy .accent-word { text-shadow: 3px 3px 0 var(--ink); -webkit-text-stroke-width: 1px; }
    .hero-lede { margin-top: 28px; font-size: 1.15rem; }
    .hero-stats { grid-template-columns: 1fr; }
    .hero-stats > div { min-height: 62px; border-right: 0; border-bottom: 2px solid var(--ink); }
    .hero-stats > div:last-child { border-bottom: 0; }
    .quick-find { box-shadow: 6px 6px 0 var(--ink); padding-inline: 18px; }
    .panel-label { margin-inline: -18px; }
    .tool-index { padding: 48px 0 60px; }
    .index-number { font-size: 2.6rem; }
    .item-count { display: none; }
    .tool-drawer { grid-template-columns: 48px 50px minmax(0, 1fr); gap: 11px; min-height: 96px; padding-right: 8px; }
    .tool-code { font-size: .6rem; }
    .tool-glyph { width: 46px; height: 46px; }
    .tool-copy strong { font-size: .95rem; }
    .tool-copy small { font-size: .8rem; }
    .launch-label { display: none; }
    .rules-grid { grid-template-columns: 1fr; border-right: 2px solid var(--ink); }
    .rules-title, .rule { border-right: 0; border-bottom: 2px solid var(--ink); }
    .rules-title { grid-row: auto; }
    .rule:last-child { border-bottom: 0; }
    .footer-grid { grid-template-columns: 1fr 1fr; padding: 28px 0; }
    .footer-grid > div:nth-child(3) { display: none; }
    .footer-end { text-align: left; }
    .tool-page { padding-top: 30px; }
    .tool-header { grid-template-columns: 82px 1fr; gap: 15px; }
    .tool-id-block { min-height: 92px; }
    .tool-title-block h1 { font-size: clamp(2.25rem, 12vw, 3.5rem); }
    .tool-title-block p { grid-column: 1 / -1; font-size: .95rem; }
    .generator-card { margin-top: 26px; padding: 0 18px 22px; box-shadow: 5px 5px 0 var(--ink); }
    .card-strip { margin-inline: -18px; padding-inline: 9px; }
    .card-strip span:last-child { display: none; }
    .result-row { grid-template-columns: 1fr; }
    .button.secondary { min-height: 48px; }
    .option-grid { grid-template-columns: 1fr; }
    .option-grid label { border-right: 0; border-top: 2px solid var(--ink); }
    .option-grid label:first-of-type { border-top: 0; }
    .content-card { grid-template-columns: 1fr; gap: 12px; }
}
