:root {
    --ink: #10203a;
    --muted: #4a5b70;
    --faint: #64748b;
    --bg: #f4f7fb;
    --bg-soft: #ffffff;
    --surface: #ffffff;
    --surface-raised: #eef3fa;
    --line: rgba(19, 47, 96, 0.13);
    --line-strong: rgba(19, 47, 96, 0.24);
    --blue: #1f6feb;
    --blue-soft: #e3edfd;
    --amber: #b45309;
    --red: #b91c1c;
    --ok: #15803d;
    --shadow: 0 24px 60px rgba(19, 47, 96, 0.14);
    --radius-lg: 24px;
    --radius-md: 16px;
    --max-width: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(circle at 15% 0%, rgba(31, 111, 235, 0.1), transparent 30rem),
        linear-gradient(180deg, #ffffff 0%, var(--bg) 45%, #e9eff8 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
}

button,
input,
select,
textarea {
    font: inherit;
}

a {
    color: inherit;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.skip-link {
    position: fixed;
    z-index: 100;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.65rem 1rem;
    color: #ffffff;
    background: var(--blue);
    border-radius: 999px;
    transform: translateY(-180%);
    transition: transform 160ms ease;
}

.skip-link:focus {
    transform: translateY(0);
}

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

.nav-shell {
    width: min(calc(100% - 2rem), var(--max-width));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(31, 111, 235, 0.42);
    border-radius: 50%;
    color: var(--blue);
    background: linear-gradient(145deg, rgba(31, 111, 235, 0.16), rgba(31, 111, 235, 0.02));
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.15rem;
}

.brand strong,
.brand small {
    display: block;
    line-height: 1.05;
}

.brand strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.12rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.brand small {
    margin-top: 0.2rem;
    color: var(--faint);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.17em;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.nav-links > a,
.tools-menu > summary {
    padding: 0.55rem 0.78rem;
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.86rem;
    text-decoration: none;
    cursor: pointer;
    list-style: none;
}

.nav-links > a:hover,
.nav-links > a:focus-visible,
.tools-menu > summary:hover,
.tools-menu > summary:focus-visible {
    color: var(--ink);
    background: rgba(19, 47, 96, 0.06);
    outline: none;
}

.tools-menu {
    position: relative;
}

.tools-menu > summary::-webkit-details-marker {
    display: none;
}

.tools-menu > summary::after {
    content: "⌄";
    margin-left: 0.35rem;
    color: var(--blue);
}

.tools-menu-panel {
    position: absolute;
    top: calc(100% + 0.8rem);
    right: 0;
    width: min(620px, calc(100vw - 2rem));
    max-height: min(72vh, 620px);
    padding: 0.65rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.25rem;
    overflow: auto;
    border: 1px solid var(--line-strong);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.tools-menu-panel a {
    min-width: 0;
    padding: 0.72rem 0.8rem;
    border-radius: 11px;
    text-decoration: none;
}

.tools-menu-panel a:hover,
.tools-menu-panel a:focus-visible {
    background: rgba(31, 111, 235, 0.08);
    outline: none;
}

.tools-menu-panel span,
.tools-menu-panel small {
    display: block;
}

.tools-menu-panel span {
    font-size: 0.86rem;
    font-weight: 650;
}

.tools-menu-panel small {
    margin-top: 0.1rem;
    color: var(--faint);
    font-size: 0.7rem;
}

.landing-hero,
.catalog-section,
.tool-hero,
.workbench,
.status-section,
.docs-section,
.site-footer {
    width: min(calc(100% - 2rem), var(--max-width));
    margin-inline: auto;
}

.landing-hero {
    padding: 1.25rem 0 0;
    position: relative;
    display: flex;
    align-items: center;
    gap: 4rem;
}

.eyebrow,
.panel-kicker {
    color: var(--blue);
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.17em;
    text-transform: uppercase;
}

.landing-hero h1,
.tool-hero h1 {
    max-width: 830px;
    margin: 1rem 0 1.2rem;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.7rem, 7vw, 5.5rem);
    font-weight: 500;
    letter-spacing: -0.045em;
    line-height: 0.98;
}

.tool-hero h1 {
    margin-top: 0.7rem;
    font-size: clamp(2.6rem, 7vw, 5rem);
}

.landing-hero h1 {
    flex: 0 0 auto;
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.landing-hero > p,
.tool-hero > p {
    max-width: 700px;
    color: var(--muted);
    font-size: clamp(1rem, 2vw, 1.18rem);
}

.landing-hero > p {
    margin-bottom: 0;
}

.hero-actions {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.button {
    min-height: 44px;
    padding: 0.68rem 1.05rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 12px;
    font-weight: 720;
    font-size: 0.86rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

.button:hover:not(:disabled) {
    transform: translateY(-1px);
}

.button:focus-visible,
.copy-button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

.button:disabled {
    cursor: wait;
    opacity: 0.55;
}

.button-primary {
    color: #ffffff;
    background: var(--blue);
}

.button-primary:hover:not(:disabled) {
    background: #1a5fd6;
}

.button-secondary,
.button-quiet {
    color: var(--ink);
    border-color: var(--line-strong);
    background: rgba(19, 47, 96, 0.035);
}

.button-secondary:hover:not(:disabled),
.button-quiet:hover:not(:disabled) {
    background: rgba(19, 47, 96, 0.08);
}

.hero-note {
    margin-top: 2rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--faint);
    font-size: 0.8rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--ok);
    box-shadow: 0 0 0 5px rgba(21, 128, 61, 0.16);
}

.catalog-filters {
    width: min(calc(100% - 2rem), var(--max-width));
    margin-inline: auto;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
}

.tool-search-input {
    max-width: 360px;
}

.category-filter-pills {
    margin-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.category-filter-pill {
    padding: 0.32rem 0.65rem;
    color: var(--blue);
    transition: none;
    font-size: 0.68rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid rgba(31, 111, 235, 0.25);
    border-radius: 999px;
    background: rgba(31, 111, 235, 0.07);
    cursor: pointer;
}

.category-filter-pill-active {
    color: #fff;
    background: var(--blue);
    border-color: var(--blue);
}

.tool-empty-state {
    padding: 2rem 0;
    color: var(--faint);
    font-size: 0.9rem;
    text-align: center;
}

.catalog-section {
    padding: 1rem 0 6rem;
}

.section-heading {
    margin-bottom: 1.5rem;
    padding-top: 2rem;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
    border-top: 1px solid var(--line);
}

.section-heading h2,
.panel-heading h2 {
    margin: 0.35rem 0 0;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 500;
    letter-spacing: -0.02em;
}

.section-heading h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.section-heading > p {
    max-width: 330px;
    margin: 0;
    color: var(--faint);
    font-size: 0.84rem;
    text-align: right;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
}

.tool-card[hidden] {
    display: none;
}

.tool-card {
    min-height: 250px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background:
        linear-gradient(145deg, rgba(31, 111, 235, 0.045), transparent 55%),
        var(--bg-soft);
    text-decoration: none;
    transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.tool-card:hover {
    border-color: rgba(31, 111, 235, 0.45);
    background-color: #f8fbff;
}

.card-topline,
.card-footer,
.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.category-pill,
.method-badge {
    color: var(--blue);
    font-size: 0.65rem;
    font-weight: 750;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.category-pill {
    padding: 0.28rem 0.5rem;
    border: 1px solid rgba(31, 111, 235, 0.25);
    border-radius: 999px;
    background: rgba(31, 111, 235, 0.07);
}

/* A tool can hold several categories, so the pills wrap rather than pushing
   the card index off the end of the topline. */
.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    min-width: 0;
}

.card-index {
    color: #94a3b8;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.75rem;
}

.tool-card h3 {
    margin: 1.5rem 0 0.55rem;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.55rem;
    font-weight: 500;
}

.tool-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.card-footer {
    margin-top: auto;
    padding-top: 1.25rem;
    align-items: end;
}

.card-footer > span {
    color: var(--blue);
    font-size: 0.78rem;
    font-weight: 700;
}

.card-footer code {
    max-width: 52%;
    overflow: hidden;
    color: var(--faint);
    font-size: 0.65rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tool-hero {
    padding: 4rem 0 2.5rem;
    border-bottom: 1px solid var(--line);
}

.hero-links {
    margin-top: 1.1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.4rem;
}

.hero-docs-link {
    display: inline-block;
    color: var(--blue);
    font-size: 0.86rem;
    font-weight: 650;
    text-decoration: none;
}

.hero-docs-link:hover {
    text-decoration: underline;
}

.back-link {
    margin-bottom: 2.2rem;
    display: inline-block;
    color: var(--faint);
    font-size: 0.78rem;
    text-decoration: none;
}

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

.status-section {
    padding: 1rem 0 6rem;
}

.status-controls {
    margin: 0 0 0.85rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.status-search {
    flex: 1 1 18rem;
    max-width: 26rem;
}

.status-search input {
    padding: 0.55rem 0.85rem;
    width: 100%;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg-soft);
    font: inherit;
    font-size: 0.85rem;
}

.status-search input:focus-visible {
    border-color: rgba(31, 111, 235, 0.45);
    outline: none;
}

.status-filter {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--muted);
    font-size: 0.78rem;
    cursor: pointer;
    user-select: none;
}

.status-filter:hover {
    color: var(--ink);
}

.status-filter input {
    width: 0.95rem;
    height: 0.95rem;
    accent-color: var(--blue);
    cursor: pointer;
}

.status-filter input:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

.status-count {
    margin: 0;
    color: var(--faint);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
}

.full-status-button {
    padding: 0.5rem 0.75rem;
    color: var(--blue);
    border: 1px solid rgba(31, 111, 235, 0.32);
    border-radius: 8px;
    background: rgba(31, 111, 235, 0.06);
    font: inherit;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
}

.full-status-button:hover:not(:disabled) {
    background: rgba(31, 111, 235, 0.12);
}

.full-status-button:disabled {
    color: var(--faint);
    border-color: var(--line);
    background: transparent;
    cursor: progress;
}

.full-status-progress {
    margin: 0;
    flex-basis: 100%;
    min-height: 1.1em;
    color: var(--faint);
    font-size: 0.74rem;
    text-align: right;
}

.status-table {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--bg-soft);
}

.status-row {
    display: grid;
    grid-template-columns: 1fr 0.85fr 0.5fr 0.9fr 0.8fr 0.85fr 0.75fr 0.55fr 1.25fr 0.95fr;
    gap: 1rem;
    align-items: start;
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid var(--line);
}

.status-table.has-full-status .status-row {
    grid-template-columns: 1fr 0.85fr 0.5fr 0.9fr 0.8fr 0.85fr 0.75fr 0.55fr 1.25fr 1.35fr 0.95fr;
}

.full-status-column[hidden] {
    display: none !important;
}

/* Beats `display: grid` above, which the plain [hidden] rule cannot. */
.status-row[hidden] {
    display: none;
}

.status-row:last-child {
    border-bottom: none;
}

.status-row-head {
    color: var(--faint);
    font-size: 0.68rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.status-row-empty {
    display: block;
    color: var(--muted);
    font-size: 0.85rem;
}

.status-sort {
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: inherit;
    border: 0;
    background: none;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    cursor: pointer;
}

.status-sort:hover {
    color: var(--blue);
}

.status-sort:focus-visible {
    border-radius: 4px;
    outline: 2px solid var(--blue);
    outline-offset: 3px;
}

/* The indicator doubles as the affordance: an idle column shows a dim glyph,
   so a sortable header is distinguishable from Device and Detail. */
.status-sort::after {
    content: "↕";
    opacity: 0.4;
    font-size: 0.85em;
}

[aria-sort="ascending"] .status-sort,
[aria-sort="descending"] .status-sort {
    color: var(--blue);
}

[aria-sort="ascending"] .status-sort::after {
    content: "↑";
    opacity: 1;
}

[aria-sort="descending"] .status-sort::after {
    content: "↓";
    opacity: 1;
}

.expense-chip {
    padding: 0.2rem 0.5rem;
    display: inline-block;
    width: fit-content;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 7px;
    font-size: 0.7rem;
}

.expense-chip[data-level="2"] {
    color: var(--amber);
    border-color: rgba(180, 83, 9, 0.28);
}

.expense-chip[data-level="3"] {
    color: var(--red);
    border-color: rgba(185, 28, 28, 0.28);
}

.status-tool a {
    color: var(--ink);
    font-weight: 650;
    text-decoration: none;
}

.status-tool a:hover {
    color: var(--blue);
}

.status-category {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    color: var(--muted);
    font-size: 0.8rem;
}

.category-chip {
    padding: 0.2rem 0.5rem;
    display: inline-block;
    width: fit-content;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 7px;
    font-size: 0.7rem;
}

.status-badge {
    padding: 0.28rem 0.55rem;
    display: inline-block;
    width: fit-content;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 750;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.status-badge[data-state="pass"] {
    color: var(--ok);
    border-color: rgba(21, 128, 61, 0.32);
    background: rgba(21, 128, 61, 0.08);
}

.status-badge[data-state="cant_find"] {
    color: var(--amber);
    border-color: rgba(180, 83, 9, 0.3);
    background: rgba(180, 83, 9, 0.08);
}

.status-badge[data-state="error"] {
    color: var(--red);
    border-color: rgba(185, 28, 28, 0.3);
    background: rgba(185, 28, 28, 0.08);
}

/* Nothing was probed -- on a split deployment, the compute node is stopped.
   Deliberately the quietest of the four: it is not a finding about the tool. */
.status-badge[data-state="not_checked"] {
    color: var(--muted);
    border-color: var(--line);
    background: transparent;
}

.launch-chip {
    padding: 0.2rem 0.5rem;
    display: inline-block;
    width: fit-content;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 7px;
    font-size: 0.7rem;
}

/* Levels follow LicenseCategory's declaration order, so the colour tracks how
   restrictive the terms are: 1 permissive, 2 copyleft, 3 non-commercial,
   4 proprietary. */
.license-chip {
    padding: 0.2rem 0.5rem;
    display: inline-block;
    width: fit-content;
    color: var(--ok);
    border: 1px solid rgba(21, 128, 61, 0.32);
    border-radius: 7px;
    font-size: 0.7rem;
    cursor: help;
}

.license-chip[data-level="2"] {
    color: var(--muted);
    border-color: var(--line);
}

.license-chip[data-level="3"] {
    color: var(--amber);
    border-color: rgba(180, 83, 9, 0.28);
}

.license-chip[data-level="4"] {
    color: var(--red);
    border-color: rgba(185, 28, 28, 0.28);
}

.top-chip {
    padding: 0.2rem 0.5rem;
    display: inline-block;
    width: fit-content;
    color: var(--blue);
    border: 1px solid rgba(31, 111, 235, 0.28);
    border-radius: 7px;
    font-size: 0.7rem;
    white-space: nowrap;
}

.device-chip {
    padding: 0.2rem 0.5rem;
    display: inline-block;
    width: fit-content;
    color: var(--faint);
    border: 1px solid var(--line);
    border-radius: 7px;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.68rem;
}

.status-empty {
    color: var(--faint);
}

.status-detail {
    min-width: 0;
    color: var(--faint);
    font-size: 0.74rem;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.full-status-cell {
    min-width: 0;
    color: var(--faint);
    font-size: 0.74rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.full-status-result {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.35rem;
}

.full-status-detail {
    display: block;
    white-space: pre-wrap;
}

.status-install {
    min-width: 0;
}

.install-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.install-button {
    padding: 0.28rem 0.45rem;
    color: var(--blue);
    border: 1px solid rgba(31, 111, 235, 0.32);
    border-radius: 7px;
    background: transparent;
    font: inherit;
    font-size: 0.72rem;
    cursor: pointer;
}

.install-button:hover:not(:disabled) {
    background: rgba(31, 111, 235, 0.08);
}

.install-button:disabled {
    color: var(--faint);
    border-color: var(--line);
    cursor: progress;
}

.install-button[data-install-action="uninstall"] {
    color: var(--red);
    border-color: rgba(185, 28, 28, 0.28);
}

.install-button[data-install-action="uninstall"]:hover:not(:disabled) {
    background: rgba(185, 28, 28, 0.07);
}

/* A recipe runs for minutes or hours, so the row says whether something is
   happening; the step-by-step detail lives in .install-banner instead, which
   has room for it. */
.install-note:empty {
    display: none;
}

/* Clamped rather than wrapped: a failure's detail can run to any length, and
   one tall row would push the rest of the table off the screen. The full
   text is the element's tooltip. */
.install-note {
    margin: 0.4rem 0 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    color: var(--faint);
    font-size: 0.7rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.install-note[data-state="busy"] {
    color: var(--amber);
    font-weight: 700;
}

.install-note[data-state="ok"] {
    color: var(--ok);
}

.install-note[data-state="failed"] {
    color: var(--red);
}

/* Directly above the table, fixed height so a recipe starting or finishing
   never shifts the table below it. Idle and active share the box; only its
   contents and emphasis change. */
.install-banner {
    margin: 0 0 1rem;
    padding: 0.85rem 1.1rem;
    min-height: 5.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.35rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface-raised);
}

.install-banner:not(.is-active) {
    border-style: dashed;
}

.install-banner-title {
    margin: 0;
    color: var(--faint);
    font-size: 0.85rem;
    font-weight: 600;
}

.install-banner.is-active .install-banner-title {
    color: var(--amber);
    font-weight: 700;
}

.install-banner-detail {
    margin: 0;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
}

.install-manual {
    color: var(--faint);
    font-size: 0.72rem;
    cursor: help;
}

.workbench {
    padding: 2rem 0 6rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 1rem;
    align-items: start;
}

.form-panel,
.result-panel,
.sidebar-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.92);
}

.form-panel {
    min-width: 0;
    padding: clamp(1rem, 3vw, 1.6rem);
}

.panel-heading {
    margin-bottom: 1.35rem;
}

.panel-heading h2 {
    font-size: 1.45rem;
}

.method-badge {
    padding: 0.32rem 0.5rem;
    border-radius: 7px;
    background: var(--blue-soft);
}

.task-toggle {
    margin-bottom: 1.2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.task-button {
    min-height: 38px;
    padding: 0.5rem 0.9rem;
    color: var(--muted);
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: rgba(19, 47, 96, 0.035);
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.task-button:hover {
    background: rgba(19, 47, 96, 0.08);
}

.task-button-active {
    color: #ffffff;
    border-color: var(--blue);
    background: var(--blue);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.field-group {
    min-width: 0;
}

.field-group-inactive {
    display: none;
}

.field-wide,
.field-checkbox {
    grid-column: 1 / -1;
}

.field-group > label:not(.checkbox-label) {
    margin-bottom: 0.4rem;
    display: block;
    color: #24384f;
    font-size: 0.76rem;
    font-weight: 700;
}

input:not([type="checkbox"]),
select,
textarea {
    width: 100%;
    color: var(--ink);
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: #ffffff;
}

input:not([type="checkbox"]),
select {
    min-height: 44px;
    padding: 0.64rem 0.72rem;
}

textarea {
    min-height: 118px;
    padding: 0.78rem;
    resize: vertical;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.78rem;
    line-height: 1.5;
    tab-size: 4;
}

select {
    color-scheme: light;
}

.field-help,
.checkbox-label small {
    margin-top: 0.35rem;
    display: block;
    color: var(--faint);
    font-size: 0.69rem;
    font-weight: 450;
}

.checkbox-label {
    min-height: 58px;
    padding: 0.78rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: rgba(19, 47, 96, 0.028);
    cursor: pointer;
}

.checkbox-label input {
    width: 17px;
    height: 17px;
    margin: 0.15rem 0 0;
    accent-color: var(--blue);
}

.checkbox-label strong {
    display: block;
    color: #24384f;
    font-size: 0.78rem;
}

.molecule-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 0.85rem;
}

.molecule-box {
    padding: 0.9rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    background: rgba(19, 47, 96, 0.028);
}

.molecule-box-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.7rem;
}

.molecule-type-select {
    flex: 0 0 auto;
    width: auto;
    min-width: 130px;
}

.molecule-delete {
    margin-left: auto;
}

.molecule-box-body label {
    margin-bottom: 0.4rem;
    display: block;
    color: #24384f;
    font-size: 0.76rem;
    font-weight: 700;
}

.molecule-box-body textarea {
    min-height: 90px;
}

.molecule-box-footer {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.molecule-box-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.molecule-cyclic-label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--muted);
    font-size: 0.82rem;
    cursor: pointer;
}

.molecule-cyclic-label input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--blue);
}

.molecule-modifications {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.molecule-modification-row {
    display: grid;
    grid-template-columns: 110px 1fr auto;
    gap: 0.5rem;
    align-items: center;
}

.molecule-add-button {
    width: 100%;
}

.form-actions {
    margin-top: 1.3rem;
    padding-top: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border-top: 1px solid var(--line);
}

.request-status {
    min-width: 0;
    margin-left: auto;
    overflow: hidden;
    color: var(--faint);
    font-size: 0.72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.request-status[data-state="pending"] {
    color: var(--amber);
}

.request-status[data-state="success"] {
    color: var(--ok);
}

.request-status[data-state="error"] {
    color: var(--red);
}

.tool-sidebar {
    display: grid;
    gap: 1rem;
}

.sidebar-card {
    padding: 1rem;
}

.sidebar-card p {
    margin: 0.65rem 0;
    color: var(--muted);
    font-size: 0.78rem;
}

.sidebar-card a {
    color: var(--blue);
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
}

.endpoint-code {
    margin-top: 0.55rem;
    padding: 0.65rem;
    display: block;
    overflow-x: auto;
    border-radius: 8px;
    color: #14498f;
    background: var(--surface-raised);
    font-size: 0.68rem;
    white-space: nowrap;
}

.result-panel {
    min-width: 0;
    grid-column: 1 / -1;
    padding: clamp(1rem, 3vw, 1.35rem);
}

.copy-button {
    padding: 0.38rem 0.62rem;
    color: var(--muted);
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: transparent;
    font-size: 0.7rem;
    cursor: pointer;
}

.copy-button:disabled {
    opacity: 0.4;
    cursor: default;
}

.result-panel pre {
    max-height: 600px;
    margin: 0;
    padding: 1rem;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 11px;
    color: #1b2c44;
    background: #f5f8fd;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.74rem;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

.docs-section {
    padding: 2.6rem 0 0;
}

.docs-section:last-of-type {
    padding-bottom: 5rem;
}

.docs-subheading {
    margin: 2.2rem 0 0.75rem;
    font-size: 1.05rem;
}

.docs-note {
    max-width: 720px;
    margin: 0 0 0.9rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.docs-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.9rem;
}

.docs-cards .sidebar-card code {
    color: #14498f;
}

.docs-steps {
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1.4rem;
    list-style: none;
    counter-reset: docs-step;
}

.docs-steps > li {
    padding-left: 2.6rem;
    position: relative;
    counter-increment: docs-step;
}

.docs-steps > li::before {
    content: counter(docs-step);
    position: absolute;
    top: 0.1rem;
    left: 0;
    width: 1.8rem;
    height: 1.8rem;
    display: grid;
    place-items: center;
    color: var(--blue);
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    font-size: 0.78rem;
    font-weight: 750;
}

.docs-steps h3 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
}

.docs-steps p {
    max-width: 720px;
    margin: 0 0 0.7rem;
    color: var(--muted);
    font-size: 0.88rem;
}

.docs-code {
    max-height: 30rem;
    margin: 0 0 0.8rem;
    padding: 0.9rem 1rem;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 11px;
    color: #1b2c44;
    background: #f5f8fd;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.74rem;
    line-height: 1.55;
    white-space: pre;
}

.docs-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.docs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.docs-table th,
.docs-table td {
    padding: 0.7rem 0.9rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--line);
}

.docs-table thead th {
    color: var(--faint);
    background: var(--surface-raised);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
}

.docs-table tbody tr:last-child td {
    border-bottom: none;
}

.docs-table td {
    color: var(--muted);
}

.docs-table code {
    color: #14498f;
    font-size: 0.78rem;
    word-break: break-word;
}

.docs-table a {
    color: var(--blue);
    text-decoration: none;
}

.docs-table a:hover {
    text-decoration: underline;
}

.docs-table-fields td:first-child,
.docs-table-endpoints td:nth-child(2) {
    min-width: 11rem;
}

.docs-table-fields td:nth-child(5) {
    min-width: 20rem;
}

.docs-default {
    display: inline-block;
    max-width: 16rem;
    overflow-wrap: anywhere;
}

.docs-help {
    margin-top: 0.25rem;
    display: block;
    color: var(--faint);
    font-size: 0.78rem;
}

.docs-muted {
    margin-top: 0.15rem;
    display: block;
    color: var(--faint);
    font-size: 0.68rem;
}

.docs-tag {
    padding: 0.05rem 0.42rem;
    display: inline-block;
    color: var(--blue);
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    font-size: 0.64rem;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.site-footer {
    padding: 2rem 0 3rem;
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    border-top: 1px solid var(--line);
    color: var(--faint);
    font-size: 0.75rem;
}

.site-footer strong {
    color: var(--muted);
}

.site-footer p {
    max-width: 580px;
    margin: 0.3rem 0 0;
}

.site-footer a {
    color: var(--blue);
    text-decoration: none;
}

/* Bookmarks page, and the sign-in form that guards it. */

.nav-signout {
    margin: 0;
}

.nav-signout button {
    padding: 0.55rem 0.78rem;
    border: 0;
    border-radius: 999px;
    color: var(--muted);
    background: transparent;
    font-size: 0.86rem;
    cursor: pointer;
}

.nav-signout button:hover,
.nav-signout button:focus-visible {
    color: var(--ink);
    background: rgba(19, 47, 96, 0.06);
    outline: none;
}

.bookmark-messages {
    margin: 1.2rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.5rem;
    list-style: none;
}

.bookmark-message {
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--line);
    border-left-width: 3px;
    border-radius: 11px;
    background: var(--surface);
    font-size: 0.82rem;
}

.bookmark-message-success {
    border-left-color: var(--ok);
}

.bookmark-message-info {
    border-left-color: var(--blue);
}

.bookmark-message-error {
    border-left-color: var(--red);
    color: var(--red);
}

.bookmark-list {
    margin-bottom: 1.4rem;
    display: grid;
    gap: 0.9rem;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.bookmark-card p {
    margin: 0.35rem 0 0.6rem;
}

.bookmark-form {
    margin-bottom: 1rem;
    padding: clamp(1rem, 3vw, 1.35rem);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.bookmark-signin {
    max-width: 420px;
    display: grid;
    gap: 0.9rem;
}

.bookmark-tool-grid {
    margin-top: 0.9rem;
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.bookmark-row {
    display: flex;
    align-items: flex-end;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.bookmark-field {
    min-width: 0;
    display: grid;
    gap: 0.3rem;
    font-size: 0.78rem;
}

.bookmark-field-wide {
    flex: 1 1 320px;
}

.bookmark-field > span {
    color: var(--faint);
    font-size: 0.7rem;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.bookmark-field > span small {
    font-weight: 450;
    letter-spacing: 0;
    text-transform: none;
}

.bookmark-field input,
.bookmark-field select,
.bookmark-field textarea {
    padding: 0.55rem 0.68rem;
    border: 1px solid var(--line-strong);
    border-radius: 11px;
    color: var(--ink);
    background: var(--bg-soft);
    font-size: 0.82rem;
}

.bookmark-field textarea {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.74rem;
    resize: vertical;
    word-break: break-all;
}

.bookmark-field a {
    color: var(--blue);
    font-size: 0.8rem;
    text-decoration: none;
}

.bookmark-actions {
    display: flex;
    gap: 0.45rem;
}

.bookmark-meta {
    margin: 0.7rem 0 0;
    font-size: 0.72rem;
}

@media (max-width: 900px) {
    .tool-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

@media (max-width: 680px) {
    .landing-hero {
        flex-direction: column;
        gap: 0.5rem;
    }

    .nav-shell {
        min-height: 64px;
    }

    .nav-links > a:not(:first-child) {
        display: none;
    }

    .tools-menu-panel {
        position: fixed;
        top: 70px;
        right: 1rem;
        left: 1rem;
        width: auto;
        grid-template-columns: 1fr;
    }

    .landing-hero {
        min-height: auto;
        padding: 1.25rem 0 1.5rem;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .section-heading > p {
        text-align: left;
    }

    .tool-grid,
    .form-grid,
    .tool-sidebar {
        grid-template-columns: 1fr;
    }

    .tool-card {
        min-height: 220px;
    }

    .form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .request-status {
        margin: 0.2rem 0 0;
        text-align: center;
    }

    .status-row {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }

    .status-table.has-full-status .status-row {
        grid-template-columns: 1fr;
    }

    /* Each row becomes its own card, so the head row stops being column
       labels -- but it still holds the only sort controls, so it turns into a
       toolbar of them rather than disappearing. */
    .status-row-head {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem 1.1rem;
    }

    .status-head-plain {
        display: none;
    }

    .status-row > [role="cell"] {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
    }

    .status-row > [role="cell"]::before {
        content: attr(data-label);
        flex: 0 0 auto;
        color: var(--faint);
        font-size: 0.68rem;
        font-weight: 750;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

    .status-detail {
        text-align: right;
    }

    /* The buttons stay beside their label, but a progress line two sentences
       long would crowd them, so it drops to its own line. */
    .status-install {
        flex-wrap: wrap;
    }

    .install-note {
        width: 100%;
        text-align: right;
    }

    .site-footer {
        flex-direction: column;
    }
}

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

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }
}
