@charset "UTF-8";

:root {
    --ink: #111318;
    --muted: #626a73;
    --paper: #ffffff;
    --ground: #f5f4ef;
    --panel: #fbfaf7;
    --line: #dedbd2;
    --line-strong: #a9a59a;
    --accent: #22665d;
    --accent-2: #8a5f16;
    --danger: #8a2d24;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.62;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}

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

.hidden {
    display: none !important;
}

.site-shell {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
}

.header-inner {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.brand-link,
.main-nav,
.main-nav a,
.main-nav button,
.mobile-menu a,
.mobile-menu button,
.menu-button,
.primary-link,
.secondary-link,
.detail-button,
.download-flag,
.download-link,
.contact-mail,
.site-footer a,
.modal-close,
.modal-action {
    display: inline-flex;
    align-items: center;
}

.brand-link {
    gap: 10px;
    font-weight: 700;
}

.brand-mark {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--ink);
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}

.main-nav {
    gap: 26px;
    color: var(--muted);
    font-size: 14px;
}

.main-nav a,
.main-nav button {
    gap: 7px;
    border: 0;
    background: transparent;
    padding: 0;
    color: inherit;
    cursor: pointer;
    white-space: nowrap;
}

.main-nav a:hover,
.main-nav button:hover,
.mobile-menu a:hover,
.mobile-menu button:hover {
    color: var(--ink);
}

.menu-button {
    display: none;
    width: 40px;
    height: 40px;
    justify-content: center;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--ink);
    cursor: pointer;
}

.mobile-menu {
    border-top: 1px solid var(--line);
    background: var(--paper);
}

.mobile-menu-inner {
    display: grid;
    gap: 2px;
    padding-top: 10px;
    padding-bottom: 12px;
}

.mobile-menu a,
.mobile-menu button {
    min-height: 44px;
    justify-content: flex-start;
    gap: 8px;
    border: 0;
    background: transparent;
    color: var(--muted);
    text-align: left;
    cursor: pointer;
}

.masthead {
    border-bottom: 1px solid var(--line);
    background: var(--ground);
}

.masthead-layout {
    min-height: 650px;
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(420px, 1fr);
    gap: 58px;
    align-items: center;
    padding-top: 62px;
    padding-bottom: 64px;
}

.masthead-copy {
    max-width: 720px;
}

.eyebrow,
.section-code {
    display: inline-flex;
    color: var(--accent);
    font-size: 13px;
    font-weight: 750;
}

.masthead h1 {
    margin: 18px 0 24px;
    max-width: 760px;
    font-size: clamp(44px, 5.8vw, 82px);
    line-height: 1.02;
    font-weight: 380;
}

.masthead p {
    max-width: 660px;
    margin: 0;
    color: var(--muted);
    font-size: 18px;
}

.masthead-actions {
    margin-top: 34px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-proofline {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 38px 0 0;
    border-top: 1px solid var(--line-strong);
    border-bottom: 1px solid var(--line);
}

.hero-proofline div {
    padding: 15px 18px 16px 0;
}

.hero-proofline div + div {
    border-left: 1px solid var(--line);
    padding-left: 18px;
}

.hero-proofline dt,
.hero-proofline dd {
    margin: 0;
}

.hero-proofline dt {
    color: var(--muted);
    font-size: 12px;
}

.hero-proofline dd {
    margin-top: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 28px;
    line-height: 1;
}

.primary-link,
.secondary-link,
.detail-button,
.modal-action,
.download-link,
.contact-mail {
    min-height: 42px;
    justify-content: center;
    border: 1px solid var(--ink);
    padding: 8px 14px;
    transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.primary-link {
    gap: 8px;
    background: var(--ink);
    color: var(--paper);
}

.primary-link:hover,
.modal-action:hover,
.download-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
}

.secondary-link {
    color: var(--ink);
    background: transparent;
}

.secondary-link:hover,
.contact-mail:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.hero-visual {
    position: relative;
    min-height: 430px;
    border: 1px solid var(--line-strong);
    background: var(--paper);
    overflow: hidden;
}

.hero-visual img {
    width: 100%;
    height: 100%;
    min-height: 430px;
    display: block;
    object-fit: cover;
}

.visual-ledger {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: rgba(13, 17, 18, 0.84);
    color: #eef4ec;
    padding: 18px;
}

.visual-ledger-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    color: #b6c6bc;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
}

.visual-ledger-head strong {
    color: #b8d8c7;
}

.visual-ledger p {
    max-width: 520px;
    margin: 12px 0 16px;
    color: #dfe7df;
    font-size: 14px;
}

.visual-ledger dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.visual-ledger div {
    padding-top: 12px;
}

.visual-ledger div + div {
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    padding-left: 16px;
}

.visual-ledger dt,
.visual-ledger dd {
    margin: 0;
}

.visual-ledger dt {
    color: #aeb9af;
    font-size: 12px;
}

.visual-ledger dd {
    margin-top: 5px;
    overflow-wrap: anywhere;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
}

.showcase-strip {
    border-bottom: 1px solid var(--line);
    background: var(--paper);
}

.showcase-grid {
    display: grid;
    grid-template-columns: minmax(190px, 0.72fr) repeat(4, minmax(0, 1fr));
    border-left: 1px solid var(--line);
}

.showcase-grid > div {
    min-height: 168px;
    border-right: 1px solid var(--line);
    padding: 24px 22px;
}

.showcase-title {
    background: var(--panel);
}

.showcase-title h2 {
    margin: 12px 0 0;
    font-size: 30px;
    line-height: 1.1;
    font-weight: 430;
}

.showcase-grid span {
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
}

.showcase-grid strong {
    display: block;
    margin-top: 14px;
    font-size: 17px;
}

.showcase-grid p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.workflow-band {
    border-bottom: 1px solid var(--line);
    background: var(--paper);
}

.workflow-layout {
    display: grid;
    grid-template-columns: minmax(260px, 0.45fr) minmax(0, 1fr);
    gap: 46px;
    align-items: center;
    padding-top: 48px;
    padding-bottom: 50px;
}

.workflow-layout h2,
.section-heading h2,
.contact-layout h2 {
    margin: 9px 0 12px;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.12;
    font-weight: 420;
}

.workflow-layout p,
.section-heading p,
.contact-layout p,
.principle-list p,
.tool-description {
    color: var(--muted);
}

.workflow-chain {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border: 1px solid var(--line);
}

.workflow-chain li {
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    text-align: center;
    font-weight: 650;
}

.workflow-chain li + li {
    border-left: 1px solid var(--line);
}

.tools-section {
    background: var(--ground);
    border-bottom: 1px solid var(--line);
}

.license-section {
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}

.license-layout {
    display: grid;
    grid-template-columns: minmax(260px, 0.42fr) minmax(0, 1fr);
    gap: 54px;
    align-items: start;
}

.license-console {
    border-top: 2px solid var(--ink);
}

.console-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid var(--line);
    padding: 14px 0;
}

.console-head span,
.license-defaults dt,
.endpoint-list span {
    color: var(--muted);
    font-size: 13px;
}

.console-head strong {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
}

.console-head strong[data-state="ok"] {
    color: var(--accent);
}

.console-head strong[data-state="bad"] {
    color: var(--danger);
}

.license-defaults {
    margin: 0;
    border-bottom: 1px solid var(--line);
}

.license-defaults > div {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 18px;
    border-top: 1px solid var(--line);
    padding: 14px 0;
}

.license-defaults dt,
.license-defaults dd {
    margin: 0;
}

.license-defaults dd {
    overflow-wrap: anywhere;
}

.endpoint-list {
    display: grid;
}

.endpoint-list > div {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    border-bottom: 1px solid var(--line);
    padding: 13px 0;
}

.endpoint-list code {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
}

.endpoint-list a,
.endpoint-list button {
    border: 1px solid var(--line-strong);
    background: transparent;
    color: var(--ink);
    padding: 7px 10px;
    white-space: nowrap;
    cursor: pointer;
}

.endpoint-list a:hover,
.endpoint-list button:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.section-heading {
    max-width: 760px;
    margin-bottom: 42px;
}

.section-heading p {
    margin: 0;
    font-size: 16px;
}

.module-notes {
    list-style: none;
    margin: 22px 0 0;
    padding: 0;
    border-top: 1px solid var(--line);
}

.module-notes li {
    position: relative;
    border-bottom: 1px solid var(--line);
    padding: 12px 0 12px 24px;
    color: var(--muted);
    font-size: 14px;
}

.module-notes li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 21px;
    width: 9px;
    height: 9px;
    border: 1px solid var(--accent);
    background: var(--paper);
}

.tool-group {
    margin-top: 42px;
}

.tool-group:first-of-type {
    margin-top: 0;
}

.tool-controls {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 18px;
    align-items: end;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 16px 0;
    margin-bottom: 28px;
}

.tool-controls label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
}

.tool-controls input {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line-strong);
    background: var(--paper);
    color: var(--ink);
    padding: 8px 10px;
    font: inherit;
}

.tool-filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.tool-filter-group button {
    min-height: 42px;
    border: 1px solid var(--line-strong);
    background: transparent;
    color: var(--ink);
    padding: 8px 11px;
    cursor: pointer;
}

.tool-filter-group button:hover,
.tool-filter-group button.active {
    border-color: var(--accent);
    color: var(--accent);
}

.empty-state {
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--muted);
    padding: 18px;
}

.is-hidden {
    display: none !important;
}

.group-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-top: 2px solid var(--ink);
    border-bottom: 1px solid var(--line);
    padding: 13px 0;
}

.group-heading h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 520;
}

.group-heading span {
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.tool-list {
    border-bottom: 1px solid var(--line);
}

.tool-row {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) 190px 178px;
    gap: 22px;
    align-items: stretch;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.58);
}

.tool-row:hover {
    background: var(--paper);
}

.tool-number {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    border-right: 1px solid var(--line);
    padding-top: 22px;
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
}

.tool-main {
    padding: 22px 0;
    min-width: 0;
}

.tool-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.tool-name-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.tool-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    color: var(--accent);
    background: var(--panel);
}

.tool-icon img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.tool-heading h3 {
    margin: 0;
    min-width: 0;
    font-size: 20px;
    line-height: 1.25;
    font-weight: 640;
    overflow-wrap: anywhere;
}

.status-label,
.download-flag,
.muted-flag {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    font-size: 12px;
    line-height: 1;
}

.status-label {
    border: 1px solid var(--line);
    padding: 6px 8px;
}

.status-release {
    border-color: var(--accent);
    color: var(--accent);
}

.status-draft {
    border-color: var(--accent-2);
    color: var(--accent-2);
}

.tool-description {
    margin: 13px 0 0;
    max-width: 780px;
    font-size: 15px;
}

.tool-facts {
    display: grid;
    align-content: center;
    gap: 6px;
    border-left: 1px solid var(--line);
    padding: 20px 0 20px 20px;
    color: var(--muted);
    font-size: 13px;
}

.tool-action {
    display: grid;
    align-content: center;
    gap: 10px;
    border-left: 1px solid var(--line);
    padding: 20px 0 20px 20px;
}

.download-flag {
    gap: 6px;
    color: var(--accent);
}

.muted-flag {
    color: var(--muted);
}

.detail-button {
    gap: 8px;
    border-color: var(--line-strong);
    background: transparent;
    color: var(--ink);
    cursor: pointer;
}

.detail-button:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.position-section {
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}

.position-layout {
    display: grid;
    grid-template-columns: minmax(250px, 0.35fr) minmax(0, 1fr);
    gap: 58px;
}

.principle-list {
    border-top: 1px solid var(--line);
}

.principle-list section {
    display: grid;
    grid-template-columns: 52px minmax(160px, 0.32fr) minmax(0, 1fr);
    gap: 24px;
    border-bottom: 1px solid var(--line);
    padding: 22px 0;
}

.principle-list span {
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.principle-list h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 640;
}

.principle-list p {
    margin: 0;
}

.contact-section {
    background: var(--ground);
}

.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 40px;
    align-items: center;
}

.contact-layout p {
    max-width: 620px;
}

.contact-mail {
    justify-content: flex-start;
    gap: 10px;
    min-height: 54px;
    overflow-wrap: anywhere;
    background: var(--paper);
}

.site-footer {
    border-top: 1px solid var(--line);
    background: var(--paper);
}

.footer-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: var(--muted);
}

.site-footer a {
    width: 40px;
    height: 40px;
    justify-content: center;
    border: 1px solid var(--line);
    font-size: 19px;
}

.site-footer a:hover {
    color: var(--ink);
    border-color: var(--line-strong);
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(8, 9, 12, 0.66);
}

.modal-panel {
    width: min(900px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--line-strong);
    background: var(--paper);
}

.modal-head,
.modal-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 26px;
}

.modal-head {
    border-bottom: 1px solid var(--line);
}

.modal-foot {
    justify-content: flex-end;
    border-top: 1px solid var(--line);
}

.modal-head h3 {
    margin: 0;
    font-size: 26px;
    line-height: 1.2;
    font-weight: 520;
}

.modal-close {
    width: 40px;
    height: 40px;
    justify-content: center;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.modal-close:hover {
    color: var(--ink);
    border-color: var(--line-strong);
}

.modal-content {
    display: grid;
    gap: 30px;
    padding: 26px;
}

.modal-section-title {
    margin: 0 0 14px;
    font-size: 17px;
    font-weight: 680;
}

.modal-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 11px;
}

.modal-list li {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 10px;
    color: var(--muted);
}

.modal-list i {
    margin-top: 5px;
    color: var(--accent);
}

.spec-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
}

.spec-grid div {
    display: grid;
    gap: 4px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 12px;
}

.spec-grid span,
.sha-block span {
    color: var(--muted);
    font-size: 12px;
}

.spec-grid strong {
    font-weight: 520;
}

.download-list {
    display: grid;
    gap: 12px;
}

.download-row {
    display: grid;
    grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    border: 1px solid var(--line);
    padding: 14px;
}

.download-link {
    gap: 8px;
    background: var(--ink);
    color: var(--paper);
}

.sha-block {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.sha-code {
    display: block;
    overflow-wrap: anywhere;
    word-break: break-all;
    border: 1px solid var(--line);
    background: var(--ground);
    padding: 8px;
    color: var(--ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    line-height: 1.5;
}

.modal-action {
    background: var(--ink);
    color: var(--paper);
    cursor: pointer;
}

@media (max-width: 980px) {
    .main-nav {
        display: none;
    }

    .menu-button {
        display: inline-flex;
    }

    .masthead-layout,
    .workflow-layout,
    .license-layout,
    .position-layout,
    .contact-layout {
        grid-template-columns: 1fr;
    }

    .masthead-layout {
        min-height: 0;
        gap: 34px;
        padding-top: 46px;
        padding-bottom: 46px;
    }

    .showcase-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .showcase-title {
        grid-column: 1 / -1;
    }

    .workflow-chain {
        grid-template-columns: 1fr;
    }

    .workflow-chain li + li {
        border-left: 0;
        border-top: 1px solid var(--line);
    }

    .tool-controls {
        grid-template-columns: 1fr;
    }

    .tool-filter-group {
        justify-content: flex-start;
    }

    .tool-row {
        grid-template-columns: 46px minmax(0, 1fr);
        gap: 16px;
    }

    .tool-facts,
    .tool-action {
        grid-column: 2;
        border-left: 0;
        padding: 0 0 18px;
    }

    .tool-facts {
        display: flex;
        flex-wrap: wrap;
        gap: 10px 18px;
    }

    .tool-action {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .principle-list section {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .principle-list p {
        grid-column: 2;
    }

    .endpoint-list > div {
        grid-template-columns: 1fr;
        gap: 7px;
    }
}

@media (max-width: 640px) {
    .site-shell {
        width: min(100% - 28px, 1180px);
    }

    .header-inner {
        min-height: 62px;
    }

    .masthead h1 {
        font-size: 38px;
    }

    .masthead p {
        font-size: 16px;
    }

    .hero-proofline {
        grid-template-columns: 1fr;
    }

    .hero-proofline div + div {
        border-left: 0;
        border-top: 1px solid var(--line);
        padding-left: 0;
    }

    .hero-visual {
        min-height: 0;
        overflow: visible;
    }

    .hero-visual img {
        min-height: 260px;
    }

    .visual-ledger {
        position: static;
        border-color: var(--line-strong);
    }

    .visual-ledger dl {
        grid-template-columns: 1fr;
    }

    .visual-ledger div + div {
        border-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        padding-left: 0;
    }

    .showcase-grid {
        grid-template-columns: 1fr;
        border-left: 0;
    }

    .showcase-grid > div {
        min-height: 0;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        padding: 22px 0;
    }

    .masthead-actions,
    .tool-action,
    .contact-mail {
        align-items: stretch;
        flex-direction: column;
    }

    .primary-link,
    .secondary-link,
    .detail-button,
    .contact-mail {
        width: 100%;
    }

    .license-defaults > div {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .tool-filter-group button {
        flex: 1 1 calc(50% - 8px);
    }

    .tool-heading {
        flex-direction: column;
        gap: 12px;
    }

    .spec-grid,
    .download-row {
        grid-template-columns: 1fr;
    }

    .modal-backdrop {
        align-items: flex-end;
        padding: 10px;
    }

    .modal-panel {
        max-height: 88vh;
    }

    .modal-head,
    .modal-foot,
    .modal-content {
        padding-left: 18px;
        padding-right: 18px;
    }
}

html.dark {
    --ink: #eef1e8;
    --muted: #a6ad9f;
    --paper: #111411;
    --ground: #181b16;
    --panel: #151913;
    --line: #31382f;
    --line-strong: #535d4f;
    --accent: #85c7b8;
    --accent-2: #d1a95b;
}

html.dark body,
html.dark .site-header,
html.dark .mobile-menu,
html.dark .workflow-band,
html.dark .position-section,
html.dark .site-footer,
html.dark .modal-panel {
    background: var(--paper);
    color: var(--ink);
}

html.dark .masthead,
html.dark .tools-section,
html.dark .showcase-title,
html.dark .contact-section,
html.dark .sha-code {
    background: var(--ground);
}

html.dark .hero-visual,
html.dark .tool-row,
html.dark .contact-mail,
html.dark .tool-controls input,
html.dark .empty-state {
    background: rgba(17, 20, 17, 0.72);
}

html.dark .showcase-strip,
html.dark .license-section {
    background: var(--paper);
}

html.dark .module-notes li::before {
    background: var(--paper);
}

html.dark .tool-row:hover {
    background: #151913;
}

html.dark .primary-link,
html.dark .download-link,
html.dark .modal-action {
    background: var(--ink);
    color: #111411;
    border-color: var(--ink);
}

html.dark .primary-link:hover,
html.dark .download-link:hover,
html.dark .modal-action:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #111411;
}

html.dark .text-secondary {
    color: var(--muted) !important;
}

html.dark .text-primary {
    color: var(--ink) !important;
}
