/* Base styles for AlgoDesk. Component-specific rules live in *.razor.css (CSS isolation). */

@font-face {
    font-family: "Jost";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/jost-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "IBM Plex Mono";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/ibm-plex-mono-latin-400.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "IBM Plex Mono";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/ibm-plex-mono-latin-500.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

html {
    background: var(--ground);
    /* Anchor jumps (/#blocks, /#offers) land below the sticky header instead of under it. */
    scroll-padding-top: var(--header-height);
}

body {
    margin: 0;
    min-width: 320px;
    background: var(--ground);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 15.5px;
    /* The reference sets no line-height on <body>; every text style carries its own.
       Inheriting a ratio here made eyebrows, stat numbers, nav and footer taller than the render. */
    line-height: normal;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p {
    margin: 0;
}

a {
    /* Links inherit the dimmer colour of their container (nav text-lead, footer text-muted, etc.)
       so that a:hover below has somewhere to go. Elements that must always read bright — the
       wordmark, buttons, SimplePage body links — set their own colour explicitly and win on
       specificity regardless of this rule. */
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: var(--text);
}

a:focus-visible {
    outline: 1px solid var(--text);
    outline-offset: 3px;
}

.wrap {
    width: 100%;
    max-width: calc(var(--wrap-max) + 2 * var(--gutter));
    margin: 0 auto;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}

.mono {
    font-family: var(--font-mono);
}

.eyebrow {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.lead {
    font-size: 19px;
    line-height: 1.5;
    color: var(--text-lead);
}

.body {
    font-size: 15.5px;
    line-height: 1.55;
    color: var(--text-body);
}

.body strong {
    color: var(--text);
    font-weight: 600;
}

.h2 {
    font-size: 44px;
    line-height: 1.05;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 0 26px;
    font-size: 14px;
    letter-spacing: 0.02em;
    white-space: nowrap;
    color: var(--text);
}

.btn-primary {
    background: var(--brand-red);
    font-weight: 600;
}

.btn-primary:hover {
    background: var(--brand-red-hover);
    color: var(--text);
}

.btn-secondary {
    border: 1px solid var(--hairline-35);
    font-weight: 500;
}

.btn-secondary:hover {
    border-color: var(--text);
    color: var(--text);
}

.btn-header {
    height: 38px;
    padding: 0 16px;
    font-size: 13px;
}

.btn-header.btn-primary {
    padding: 0 18px;
}

.btn-card {
    height: 44px;
    padding: 0 20px;
    font-size: 13px;
}

/* ---- Brand shapes (Components/Shared/Shape.razor) ----
   The square, the circle and the triangle from the mark, plus the two blue-square variants that
   stand for White Label and Partner. Red circle: verify. Blue squares: own. Yellow triangle: extend.
   Sized by --shape-size; the triangle is always 14 wide. */
.shape {
    display: inline-block;
    flex: none;
    width: var(--shape-size, 12px);
    height: var(--shape-size, 12px);
    vertical-align: middle;
}

.shape-circle {
    border-radius: 50%;
    background: var(--brand-red);
}

.shape-square {
    background: var(--brand-blue);
}

.shape-square-outline {
    border: 2px solid var(--brand-blue);
}

/* The half square is a hard-edged fill, not a visual gradient. */
.shape-square-half {
    border: 2px solid var(--brand-blue);
    background: linear-gradient(90deg, var(--brand-blue) 50%, transparent 50%);
}

.shape-triangle {
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: var(--shape-size, 12px) solid var(--brand-yellow);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 1023px) {
    .h2 {
        font-size: clamp(32px, 4.5vw, 44px);
    }
}

@media (max-width: 767px) {
    :root {
        --gutter: 24px;
    }
}

/* ---- Forms (both contact forms; see docs/design/README.md "The form") ---- */

.form-panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--hairline-18);
}

.form-panel-wide {
    gap: 22px;
    padding: 32px;
}

.form {
    display: flex;
    flex-direction: column;
    gap: inherit;
}

.form-panel-wide .form {
    gap: 22px;
}

.form-panel:not(.form-panel-wide) .form {
    gap: 18px;
}

.form-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--hairline);
}

.form-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text);
}

.form-head .eyebrow {
    white-space: nowrap;
}

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

.fld {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.fld-label {
    display: block;
    padding: 0;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.fld-label i {
    font-style: normal;
    color: var(--brand-red);
}

.in {
    display: block;
    width: 100%;
    height: 46px;
    padding: 0 14px;
    background: var(--ground);
    border: 1px solid var(--hairline);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: normal;
}

.in::placeholder {
    color: var(--hairline-38);
    opacity: 1;
}

.in:focus {
    outline: none;
    border-color: var(--text);
}

.in-ta {
    height: 128px;
    padding: 12px 14px;
    line-height: 1.45;
    resize: vertical;
}

.in-ta-short {
    height: 104px;
}

.lanes {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 1px solid var(--hairline);
    background: var(--ground);
}

.lane {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    padding: 0 6px;
    border-right: 1px solid var(--hairline);
    font-family: var(--font-mono);
    font-size: 12.5px;
    text-align: center;
    color: var(--text-muted);
    cursor: pointer;
}

.lane:last-child {
    border-right: 0;
}

.lane:hover {
    color: var(--text);
}

/* The selected lane: bright text and a 1px bone frame drawn inside the cell (the reference's
   inset box-shadow, as an outline so the no-shadow rule holds). */
.lane:has(input:checked) {
    z-index: 1;
    color: var(--text);
    outline: 1px solid var(--text);
    outline-offset: -1px;
}

.lane:has(input:focus-visible) {
    z-index: 1;
    outline: 1px solid var(--text);
    outline-offset: -1px;
}

.lane-help {
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-muted);
}

.checks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 24px;
    padding-top: 2px;
}

.chk {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14.5px;
    color: var(--text-body);
    cursor: pointer;
}

.chk .bx {
    flex: none;
    width: 14px;
    height: 14px;
    border: 1px solid var(--hairline-45);
}

.chk:has(input:checked) .bx {
    background: var(--text);
    border-color: var(--text);
}

.chk:has(input:focus-visible) .bx {
    outline: 1px solid var(--text);
    outline-offset: 3px;
}

.captcha-stage {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: var(--ground);
    border: 1px solid var(--hairline);
}

.captcha-bg {
    display: block;
    width: 100%;
    height: auto;
}

.captcha-piece {
    position: absolute;
    left: 0;
    height: auto;
    touch-action: none;
    user-select: none;
    cursor: grab;
}

.captcha-piece:active {
    cursor: grabbing;
}

.captcha-slider {
    display: block;
    width: 100%;
    height: 14px;
    margin: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.captcha-slider::-webkit-slider-runnable-track {
    height: 2px;
    background: var(--hairline);
}

.captcha-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    margin-top: -6px;
    background: var(--text);
    border: 0;
    border-radius: 0;
}

.captcha-slider::-moz-range-track {
    height: 2px;
    background: var(--hairline);
}

.captcha-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: var(--text);
    border: 0;
    border-radius: 0;
}

.captcha-slider:focus-visible {
    outline: 1px solid var(--text);
    outline-offset: 3px;
}

.captcha-noscript {
    font-size: 12px;
    color: var(--text-muted);
}

.validation-message {
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-muted);
}

/* Honeypot: off-screen for people, present for bots. */
.hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.form-note {
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-muted);
}

/* A <button> carries the user agent's own buttonface background and border; both have to go, or a
   button styled as a link-button shows a grey box. btn-primary and btn-send paint their own
   background over this. */
button.btn {
    flex: none;
    border: 0;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
}

/* Restores the outline the reset above takes off: button.btn (0,1,1) would otherwise beat
   .btn-secondary (0,1,0). .btn-secondary:hover (0,2,0) still wins over this for the hover colour.
   background: transparent lives here (not on button.btn) so it only clears the buttonface for
   secondary buttons; .btn-primary and .btn-send paint their own background and must keep it. */
button.btn-secondary {
    border: 1px solid var(--hairline-35);
    background: transparent;
}

.btn-send {
    height: 46px;
    padding: 0 28px;
}

.form-panel-wide .btn-send {
    height: 48px;
    padding: 0 26px;
}

.form-sent {
    color: var(--text);
}

/* Sending state, set by js/forms.js between Send and the redirect. The spinner is the one moving
   thing on the site; it is feedback, not decoration, and stops under reduced motion. */
.btn-send:disabled {
    cursor: progress;
}

.spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 10px;
    vertical-align: -1px;
    border: 2px solid var(--hairline-35);
    border-top-color: var(--text);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    /* The spinner is feedback, not decoration: stopping it altogether reads as a stuck page, so it keeps
       turning here, slowly enough not to draw the eye. */
    .spinner {
        animation-duration: 2.4s;
    }
}

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

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

    .lane:nth-child(2) {
        border-right: 0;
    }

    .lane:nth-child(-n+2) {
        border-bottom: 1px solid var(--hairline);
    }

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

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

    .form-panel,
    .form-panel-wide {
        padding: 24px;
    }
}

/* Three pointers under a hero (Talk to us and the account pages). */
.pointers-sec {
    padding: 88px 0;
    border-top: 1px solid var(--hairline);
}

.pointers {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
}

.pointer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--hairline);
}

.pointer-link {
    font-size: 12.5px;
    color: var(--text-lead);
}

.pointer-link:hover {
    color: var(--text);
}

/* Account panel: the 520px card on the account pages; forms inside it stack at 22px. */
.account-panel {
    width: 520px;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 32px;
    background: var(--surface);
    border: 1px solid var(--hairline-18);
}
.account-panel .form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid var(--hairline);
}
.tab {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
}
.tab + .tab {
    border-left: 1px solid var(--hairline);
}
.tab:hover {
    color: var(--text);
}
.tab-on {
    font-weight: 600;
    color: var(--text);
    background: var(--ground);
    box-shadow: inset 0 0 0 1px var(--text);
}
.account-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.account-link {
    font-size: 12px;
    color: var(--text-muted);
}
.account-link:hover {
    color: var(--text);
}
.account-note {
    font-size: 12px;
    line-height: 1.7;
    color: var(--text-muted);
}
.btn-block {
    width: 100%;
    justify-content: center;
}
.in-wrap {
    position: relative;
}
.in-wrap .in {
    padding-right: 64px;
}
.pw-toggle {
    position: absolute;
    right: 14px;
    top: 0;
    height: 46px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--text-lead);
    cursor: pointer;
}
.in-static {
    display: flex;
    align-items: center;
    height: 46px;
    padding: 0 14px;
    background: var(--ground);
    border: 1px solid var(--hairline);
    color: var(--text-muted);
    font-size: 15px;
}
.chk-top {
    align-items: flex-start;
}
.chk-top .bx {
    margin-top: 3px;
}
.chk a {
    color: var(--text);
    text-decoration: underline;
}
.sent-rows {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--hairline);
}
.sent-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--hairline);
}
.sent-row .mono {
    font-size: 13px;
    color: var(--text-lead);
}
.sent-row .eyebrow {
    color: var(--text);
}
.sent-row button.eyebrow {
    border: 0;
    background: none;
    padding: 0;
    cursor: pointer;
}
.sent-row button.eyebrow:hover,
.sent-row a.eyebrow:hover {
    color: var(--text-lead);
}
.sent-status {
    color: var(--text);
}
@media (max-width: 767px) {
    .account-panel {
        padding: 24px;
    }
}
/* Member area (member.html) */
.notice {
    background: var(--surface);
    border-bottom: 1px solid var(--hairline);
}
.notice-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-top: 14px;
    padding-bottom: 14px;
}
.notice-text {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.notice-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--brand-red);
    flex: none;
}
.notice-main {
    color: var(--text);
}
.notice-again {
    font-size: 12px;
    color: var(--text-muted);
}
.notice-again a {
    color: var(--text);
    text-decoration: underline;
}
.notice-dismiss {
    color: var(--text-lead);
    white-space: nowrap;
}
.member {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 64px;
    align-items: start;
    padding-top: 64px;
    padding-bottom: 96px;
}
.member-nav {
    display: flex;
    flex-direction: column;
    position: sticky;
    /* Clears the sticky site header, then the reference's 24px. */
    top: calc(var(--header-height) + 24px);
}
.member-nav-title {
    padding-bottom: 14px;
    border-bottom: 1px solid var(--hairline);
}
.member-nav-link {
    padding: 12px 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-lead);
    border-bottom: 1px solid var(--hairline-14);
}
.member-nav-link:hover,
.member-nav-on {
    color: var(--text);
}
.member-nav-on {
    font-weight: 600;
}
.member-signed {
    padding-top: 18px;
    font-size: 12px;
    line-height: 1.7;
    color: var(--text-muted);
}
.member-signed span {
    color: var(--text-lead);
}
.member-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.member-head {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.member-title {
    font-size: 40px;
    line-height: 1.05;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--text);
}
.member-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 28px 32px;
    background: var(--surface);
    border: 1px solid var(--hairline-18);
}
.card-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-bottom: 14px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--hairline);
}
.card-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text);
}
.row {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--hairline-14);
}
.row-val {
    color: var(--text);
}
.row-muted {
    color: var(--text-muted);
}
.row-mono {
    font-size: 12px;
}
.plan-value {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.row-act {
    font-size: 12px;
    color: var(--text-lead);
    white-space: nowrap;
}
.row-act:hover {
    color: var(--text);
}
.row-act-button {
    border: 0;
    background: none;
    padding: 0;
    font-family: var(--font-mono);
    cursor: pointer;
}
.row-form {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--hairline-14);
}
.row-form .in {
    flex: 1;
}
.row-form-stack {
    padding: 16px 0 0;
    border-bottom: 1px solid var(--hairline-14);
}
.card-note {
    padding-top: 12px;
    font-size: 12px;
    line-height: 1.7;
    color: var(--text-muted);
}
@media (max-width: 1023px) {
    .member {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
        padding-top: 40px;
        padding-bottom: 64px;
    }
    .member-nav {
        position: static;
    }
}
@media (max-width: 767px) {
    .row {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }
    .member-card {
        padding: 24px;
    }
    .row-form {
        flex-wrap: wrap;
    }
}
.plan-cancel {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 8px 0 4px;
}
.plan-cancel-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
}
.plan-cancel-form {
    display: flex;
    gap: 12px;
}
.plan-error {
    color: var(--text);
}
.tag-test {
    margin-left: 10px;
    padding: 1px 6px;
    font-size: 11px;
    color: var(--text-muted);
    border: 1px solid var(--hairline-28);
}

/* Admin area (admin-users.html, admin-orders.html) */
.admin-switch {
    display: inline-flex;
    margin-right: 14px;
    border: 1px solid var(--hairline-22);
}
.admin-switch-side {
    display: inline-flex;
    align-items: center;
    height: 30px;
    padding: 0 12px;
    font-size: 12px;
    color: var(--text-muted);
}
.admin-switch-side:hover {
    color: var(--text);
}
/* The current side: the reference's inset bone frame, drawn as an outline so the no-shadow rule holds. */
.admin-switch-on {
    color: var(--text);
    background: var(--surface);
    outline: 1px solid var(--text);
    outline-offset: -1px;
}
.nav-area {
    display: none;
}
/* An admin's header carries the switch; between 768 and 1279 px it leaves the email out, so it is no wider than a
   member's. Below 768 px the member header already overflows (the separate 375 px task), so the email stays there
   and only the switch itself hides (below). */
@media (min-width: 768px) and (max-width: 1279px) {
    .site-actions:has(.admin-switch) .header-email {
        display: none;
    }
}
/* At 767 px and below the header switch moves into the burger menu as two links (the admin-shell's own Stripe mode
   switch, which shares the .admin-switch class, is unrelated and stays visible: scoped to the header's container). */
@media (max-width: 767px) {
    .site-actions .admin-switch {
        display: none;
    }
    .site-nav .nav-area {
        display: block;
    }
}
.admin {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding-top: 48px;
    padding-bottom: 96px;
}
.admin-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
}
.admin-title-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.admin-title {
    font-size: 40px;
    line-height: 1.05;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--text);
}
.admin-tabs {
    display: flex;
    border: 1px solid var(--hairline-22);
    font-size: 13px;
}
.admin-tab {
    display: inline-flex;
    align-items: center;
    height: 38px;
    padding: 0 16px;
    color: var(--text-muted);
}
.admin-tab:hover {
    color: var(--text);
}
.admin-tab-on {
    color: var(--text);
    background: var(--surface);
    outline: 1px solid var(--text);
    outline-offset: -1px;
}
.admin-hint,
.admin-note,
.admin-count {
    font-size: 12px;
    line-height: 1.7;
    color: var(--text-muted);
}
.admin-note {
    max-width: 900px;
}
.admin-table-wrap {
    overflow-x: auto;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
.admin-table th {
    padding: 10px 12px 10px 0;
    font-weight: 400;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid var(--hairline);
}
.admin-table td {
    padding: 12px 12px 12px 0;
    color: var(--text-body);
    vertical-align: top;
    border-bottom: 1px solid var(--hairline-14);
}
.admin-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 520px;
    gap: 24px;
    align-items: start;
}
.admin-master {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.admin-search-in {
    height: 40px;
    font-size: 14px;
    background: var(--surface);
}
.admin-users-head,
.admin-user {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
}
.admin-users-head .eyebrow {
    padding: 10px 0;
    border-bottom: 1px solid var(--hairline);
}
.admin-users {
    margin: 0;
    padding: 0;
    list-style: none;
}
.admin-user {
    position: relative;
    font-size: 13.5px;
    color: var(--text-body);
    border-bottom: 1px solid var(--hairline-14);
}
.admin-user > span {
    min-width: 0;
    padding: 12px 12px 12px 0;
    overflow-wrap: anywhere;
}
.admin-user:hover {
    color: var(--text);
}
/* The selected row: the surface colour and the design's 2 px red edge, drawn as a bar rather than a shadow. */
.admin-user-on {
    color: var(--text);
    background: var(--surface);
}
.admin-user-on::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 2px;
    background: var(--brand-red);
}
.admin-panel {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--hairline-18);
}
.admin-panel-head {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 24px 28px 0;
}
.admin-panel-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    overflow-wrap: anywhere;
}
.admin-panel-meta {
    font-size: 12px;
    color: var(--text-muted);
}
.admin-panel-tabs {
    margin: 20px 28px 0;
}
.admin-panel-tabs .tab {
    height: 40px;
    font-size: 13.5px;
}
.admin-panel-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 8px 28px 24px;
}
@media (max-width: 1100px) {
    .admin-split {
        grid-template-columns: minmax(0, 1fr);
    }
}
@media (max-width: 767px) {
    .admin-panel-head,
    .admin-panel-body {
        padding-left: 20px;
        padding-right: 20px;
    }
    .admin-panel-tabs {
        margin: 20px 20px 0;
    }
}
.admin-panel .row {
    grid-template-columns: 140px minmax(0, 1fr) auto;
    gap: 16px;
    padding: 13px 0;
}
.admin-panel .row-val {
    font-size: 14px;
}
.admin-machine {
    font-size: 13px;
    overflow-wrap: anywhere;
}
.admin-note-text {
    white-space: pre-line;
}
@media (max-width: 767px) {
    .admin-panel .row {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }
}
.admin-licence-acts {
    text-align: right;
    white-space: nowrap;
    font-family: var(--font-mono);
    font-size: 12px;
}
.admin-licence-acts a {
    color: var(--text-lead);
}
.admin-licence-acts a + a {
    margin-left: 12px;
}
.admin-licence-acts .admin-delete {
    color: var(--text-muted);
}
.admin-licence-acts a:hover {
    color: var(--text);
}
.admin-table .admin-licence-note td {
    padding-top: 0;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
}
.admin-btn {
    align-self: flex-start;
    height: 38px;
    padding: 0 14px;
    font-size: 12.5px;
}
.admin-licence-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    border: 1px solid var(--hairline-35);
}
.admin-form-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}
.admin-form {
    gap: 14px;
}
.admin-form .form-grid-2 {
    gap: 14px;
}
/* The native date picker and select list follow the dark ground. */
.admin-form .in {
    height: 40px;
    font-size: 14px;
    color-scheme: dark;
}
.fld-hint {
    font-size: 12px;
    color: var(--text-muted);
}
/* Lifetime has no end: the End field dims (the server ignores it anyway). */
.admin-form:has(#licence-plan option[value="Lifetime"]:checked) .admin-end {
    opacity: 0.4;
}
.admin-form .row-form,
.admin-confirm .row-form {
    padding: 0;
    border-bottom: 0;
}
.admin-form .btn-card,
.admin-confirm .btn-card {
    height: 38px;
    padding: 0 16px;
    font-size: 12.5px;
}
.admin-confirm {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.admin-confirm p {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
}
.admin-head-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}
.admin-stripe-mode {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}
.admin-stripe-mode .admin-switch {
    margin-right: 0;
}
.admin-switch-lead {
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    font-size: 12px;
    color: var(--text-muted);
}
.admin-stripe-mode button.admin-switch-side {
    border: 0;
    background: none;
    font-family: var(--font-mono);
    cursor: pointer;
}
.admin-stripe-note {
    font-size: 11px;
    color: var(--text-muted);
}
.admin-error {
    font-size: 12px;
    color: var(--text);
}
.admin-order {
    position: relative;
}
.admin-order:hover td {
    color: var(--text);
}
.admin-order-link::after {
    content: "";
    position: absolute;
    inset: 0;
}
@media (max-width: 767px) {
    .admin-head-side,
    .admin-stripe-mode {
        align-items: flex-start;
    }
}

/* Checkout (checkout.html) */
.checkout {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding-top: 48px;
    padding-bottom: 96px;
}
.checkout-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
}
.checkout-title-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.checkout-title {
    font-size: 40px;
    line-height: 1.05;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--text);
}
.checkout-steps {
    display: flex;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.checkout-steps .step-on {
    color: var(--text);
    font-weight: 500;
}
.checkout-intro {
    max-width: 620px;
}
.checkout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 20px;
    align-items: start;
}
.plan-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    border: 0;
}
.plan-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 22px;
    border: 1px solid var(--hairline);
    cursor: pointer;
}
.plan-card:hover {
    border-color: var(--hairline-45);
}
.plan-card:has(input:checked) {
    background: var(--surface);
    outline: 1px solid var(--text);
    outline-offset: -1px;
}
.plan-card:has(input:focus-visible) {
    outline: 2px solid var(--brand-red);
    outline-offset: 2px;
}
.plan-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.plan-card-name {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
}
.plan-radio {
    width: 16px;
    height: 16px;
    border: 2px solid var(--text);
    border-radius: 50%;
}
.plan-card:has(input:checked) .plan-radio {
    background: radial-gradient(circle, var(--brand-red) 0 3px, transparent 3.5px);
}
.plan-card-price {
    font-size: 30px;
    letter-spacing: -0.02em;
    color: var(--text);
}
.plan-card-per {
    font-size: 14px;
    color: var(--text-muted);
}
.plan-card-small {
    display: flex;
    flex-direction: column;
    font-size: 12px;
    line-height: 1.8;
    color: var(--text-muted);
}
.plan-summary {
    display: none;
}
.plan-choose:has(#plan-monthly:checked) .plan-summary-monthly,
.plan-choose:has(#plan-yearly:checked) .plan-summary-yearly,
.plan-choose:has(#plan-lifetime:checked) .plan-summary-lifetime {
    display: block;
}
.checkout-summary-panel,
.checkout-panel {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--hairline-18);
}
.checkout-panel {
    gap: 18px;
    padding: 28px;
}
.summary-title {
    padding-bottom: 14px;
    border-bottom: 1px solid var(--hairline);
}
.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--hairline-14);
    color: var(--text);
}
.summary-row .mono {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}
.summary-note {
    padding-top: 12px;
    font-size: 12px;
    line-height: 1.7;
    color: var(--text-muted);
}
.checkout-actions {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Starting state, set by js/checkout.js between "Start the plan" and the Done page: the start call and Stripe's
   confirmation take a moment, so the button shows the site's spinner rather than sitting still. */
.checkout-actions .btn-primary:disabled {
    cursor: progress;
}

.checkout-back {
    font-size: 12px;
    color: var(--text-muted);
}
.checkout-back:hover {
    color: var(--text);
}
.done-headline {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
}
.done-pointers {
    margin: 0;
}
.done-pointer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-top: 1px solid var(--hairline-14);
}
.done-pointer:last-child {
    border-bottom: 1px solid var(--hairline-14);
}
.done-pointer dt {
    font-size: 12px;
    color: var(--text);
}
.done-pointer dd {
    margin: 0;
}
.checkout-test {
    padding: 10px 14px;
    font-size: 12px;
    color: var(--text);
    border: 1px solid var(--brand-yellow);
}
.checkout-section {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--hairline);
}
.checkout-code {
    display: flex;
    gap: 12px;
    align-items: center;
}
.checkout-code .in {
    flex: 1;
}
.payment-box {
    min-height: 120px;
}
@media (max-width: 1023px) {
    .checkout-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
@media (max-width: 767px) {
    .plan-cards {
        grid-template-columns: minmax(0, 1fr);
    }
    .checkout-title {
        font-size: 32px;
    }
    .checkout-code {
        flex-wrap: wrap;
    }
}
