:root {
    --desk: #dde3e0;
    --paper: #fbf7ea;
    --ink: #1d2b3a;
    --ink-soft: #4a5a6a;
    --carbon: #1b7f79;
    --stamp: #c8372d;
    --rule: #c9d3dc;
}

@media (prefers-color-scheme: dark) {
    :root {
        --desk: #15202b;
        --paper: #f3eedc;
        --ink: #e8edf2;
        --ink-soft: #a9b8c6;
        --rule: #2c3b4a;
    }
    .slip { --ink: #1d2b3a; --ink-soft: #4a5a6a; --rule: #c9d3dc; }
}

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

html, body {
    margin: 0;
    background: var(--desk);
    color: var(--ink);
    font-family: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 1.0625rem;
    line-height: 1.55;
}

.loading { padding: 2rem; color: var(--ink-soft); }

.page {
    max-width: 68rem;
    margin: 0 auto;
    padding: 2rem 1.25rem 3rem;
}

/* Hero */
.hero { display: grid; gap: 2.5rem; align-items: center; }

.brand {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: .7rem;
}

.brand-mark { width: 2.75rem; height: 2.75rem; flex: none; }

.brand-name {
    font-family: "Nunito", "Segoe UI", system-ui, sans-serif;
    font-weight: 800;
    font-size: 1.9rem;
    line-height: 1;
    letter-spacing: -0.01em;
}

.brand-accent { color: var(--carbon); }

@media (prefers-color-scheme: dark) {
    .brand-accent { color: #5fd0c8; }
}

h1 {
    margin: 0 0 1.25rem;
    font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
    font-weight: 700;
    font-size: clamp(2.6rem, 9vw, 4.75rem);
    line-height: 0.98;
    letter-spacing: -0.01em;
}

.lead { margin: 0; max-width: 34rem; color: var(--ink-soft); font-size: 1.15rem; }

/* Job slip */
.slip {
    position: relative;
    max-width: 26rem;
    padding: 2.25rem 1.5rem 1.5rem 2.5rem;
    background: var(--paper);
    color: var(--ink);
    border-radius: 2px;
    box-shadow: 0 1px 0 rgba(0,0,0,.08), 0 14px 30px -18px rgba(0,0,0,.45);
    transform: rotate(-1.2deg);
    /* perforated top edge */
    background-image: radial-gradient(circle at 8px 0, var(--desk) 4px, transparent 4.5px);
    background-size: 16px 16px;
    background-repeat: repeat-x;
    background-color: var(--paper);
}

.slip::before {
    content: "";
    position: absolute;
    top: 0; bottom: 0; left: 1.6rem;
    width: 2px;
    background: var(--stamp);
    opacity: .55;
}

.slip-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }

.slip-title {
    font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
    font-weight: 700;
    font-size: 1.6rem;
    color: var(--carbon);
}

.stamp {
    padding: .15rem .6rem;
    border: 3px solid var(--stamp);
    border-radius: 4px;
    color: var(--stamp);
    font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    transform: rotate(6deg);
    animation: thud .35s cubic-bezier(.2, 1.4, .4, 1) .5s both;
}

@keyframes thud {
    from { transform: rotate(6deg) scale(1.9); opacity: 0; }
    to   { transform: rotate(6deg) scale(1);   opacity: 1; }
}

.slip-lines { margin: 0; }
.slip-lines > div {
    display: flex;
    gap: 1rem;
    padding: .55rem 0;
    border-bottom: 1px solid var(--rule);
}
.slip-lines dt { flex: 0 0 5.5rem; font-weight: 600; color: var(--ink-soft); }
.slip-lines dd { margin: 0; flex: 1; display: flex; justify-content: space-between; gap: .75rem; }

.tick, .due { font-weight: 600; }
.tick { color: var(--carbon); }
.due  { color: var(--stamp); }

/* Trades */
.trades { margin-top: 4rem; max-width: 44rem; }

h2 {
    margin: 0 0 1.25rem;
    font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
    font-weight: 700;
    font-size: clamp(1.9rem, 5vw, 2.6rem);
    line-height: 1.05;
}

.trade { padding: 1.1rem 0; border-top: 2px solid var(--ink); }
.trade:last-child { border-bottom: 2px solid var(--ink); }
.trade h3 { margin: 0 0 .3rem; font-size: 1.15rem; font-weight: 600; }
.trade p  { margin: 0; color: var(--ink-soft); max-width: 36rem; }

.foot { max-width: 68rem; margin: 0 auto; padding: 0 1.25rem 2.5rem; color: var(--ink-soft); font-size: .95rem; }
.foot p { margin: 0; max-width: 36rem; }
.foot a { color: var(--carbon); font-weight: 600; }
.foot a:focus-visible { outline: 3px solid var(--carbon); outline-offset: 2px; }

@media (prefers-color-scheme: dark) {
    .foot a { color: #5fd0c8; }
}

@media (min-width: 52rem) {
    .page { padding-top: 3rem; }
    .hero { grid-template-columns: 1.15fr .85fr; gap: 4rem; }
    .slip { justify-self: end; }
}

@media (prefers-reduced-motion: reduce) {
    .stamp { animation: none; }
}

#blazor-error-ui {
    display: none;
    position: fixed; left: 0; right: 0; bottom: 0;
    padding: .75rem 1.25rem;
    background: var(--stamp);
    color: #fff;
    z-index: 1000;
}
#blazor-error-ui a { color: #fff; text-decoration: underline; margin-left: .5rem; }

/* Header */
.bar {
    max-width: 68rem;
    margin: 0 auto;
    padding: 1.25rem 1.25rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.brand:focus-visible { outline: 3px solid var(--carbon); outline-offset: 4px; border-radius: 6px; }

.nav { display: flex; align-items: center; gap: .35rem 1.1rem; flex-wrap: wrap; }
.nav-link {
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
    padding: .35rem 0;
    border-bottom: 2px solid transparent;
}
.nav-link:hover, .nav-link.active { border-bottom-color: var(--carbon); }
.nav-link:focus-visible { outline: 3px solid var(--carbon); outline-offset: 2px; }

/* Buttons */
.btn {
    display: inline-block;
    padding: .5rem 1rem;
    border: 2px solid var(--ink);
    border-radius: 6px;
    background: #FFB703;
    color: #1d2b3a;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 3px 0 var(--ink);
    transition: transform .08s ease, box-shadow .08s ease;
}
.btn:hover { transform: translateY(1px); box-shadow: 0 2px 0 var(--ink); }
.btn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--ink); }
.btn:focus-visible { outline: 3px solid var(--carbon); outline-offset: 3px; }
.btn-quiet { background: transparent; color: var(--ink); }
.btn-big { padding: .75rem 1.4rem; font-size: 1.1rem; }

.cta { display: flex; flex-wrap: wrap; gap: .9rem; margin: 1.75rem 0 0; }

/* Pricing */
.pricing-intro { max-width: 40rem; }
.plans {
    display: grid;
    gap: 2rem;
    margin-top: 2.5rem;
    align-items: start;
}
.plan {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 2.25rem 1.5rem 1.5rem 2.5rem;
    color: #1d2b3a;
    border-radius: 2px;
    box-shadow: 0 1px 0 rgba(0,0,0,.08), 0 14px 30px -18px rgba(0,0,0,.45);
    background-image: radial-gradient(circle at 8px 0, var(--desk) 4px, transparent 4.5px);
    background-size: 16px 16px;
    background-repeat: repeat-x;
    background-color: var(--paper);
    --ink-soft: #4a5a6a;
    --rule: #c9d3dc;
}
.plan::before {
    content: "";
    position: absolute;
    top: 0; bottom: 0; left: 1.6rem;
    width: 2px;
    background: var(--stamp);
    opacity: .55;
}
.plan:nth-child(1) { transform: rotate(-.8deg); }
.plan:nth-child(2) { transform: rotate(.8deg); }
.plan-featured { outline: 3px solid var(--carbon); outline-offset: -3px; }

.plan-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; }
.plan-name {
    margin: 0;
    font-size: 1.9rem;
    color: #1b7f79;
}
.stamp-small { font-size: .95rem; border-width: 2px; padding: .1rem .45rem; }
.plan-for { margin: .2rem 0 0; color: var(--ink-soft); }
.plan-price {
    margin: 1rem 0;
    padding-bottom: .9rem;
    border-bottom: 1px solid var(--rule);
    font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
}
.plan-price .amount { font-size: 3rem; font-weight: 700; line-height: 1; }
.plan-price .per { color: var(--ink-soft); font-size: 1.2rem; }
.plan-price .trial { display: block; margin-top: .35rem; font-family: "Barlow", system-ui, sans-serif; color: var(--ink-soft); font-size: .95rem; }
.plan-features { list-style: none; margin: 0 0 1.5rem; padding: 0; flex: 1; }
.plan-features li { padding: .4rem 0 .4rem 1.6rem; border-bottom: 1px solid var(--rule); position: relative; }
.plan-features li::before {
    content: "";
    position: absolute;
    left: .15rem; top: .8rem;
    width: .75rem; height: .4rem;
    border-left: 3px solid #1b7f79;
    border-bottom: 3px solid #1b7f79;
    transform: rotate(-45deg);
}
.plan .btn { --ink: #1d2b3a; }
.plan-cta { text-align: center; }

.faq { margin-top: 4rem; max-width: 44rem; }

.not-found { min-height: 40vh; }
.not-found a { color: var(--carbon); font-weight: 600; }

@media (min-width: 52rem) {
    .plans { grid-template-columns: repeat(2, 1fr); max-width: 52rem; }
    .plan-featured { transform: translateY(-.75rem); }
}

@media (prefers-color-scheme: dark) {
    .btn-quiet { color: var(--ink); }
    .nav-link:hover, .nav-link.active { border-bottom-color: #5fd0c8; }
}

@media (prefers-reduced-motion: reduce) {
    .btn { transition: none; }
}

/* Monthly / yearly switch on the pricing page */
.billing-toggle { display: flex; justify-content: center; gap: .25rem; margin: 0 auto 2rem; padding: .3rem; width: fit-content; border-radius: 999px; background: var(--paper); }
.toggle { border: 0; background: transparent; color: #1d2b3a; font: inherit; font-weight: 600; padding: .5rem 1.1rem; border-radius: 999px; cursor: pointer; }
.toggle-on { background: #1d2b3a; color: #fbf7ea; }
.toggle:focus-visible { outline: 3px solid var(--carbon); outline-offset: 2px; }
.toggle-note { font-size: .8rem; font-weight: 600; margin-left: .35rem; padding: .05rem .45rem; border-radius: 999px; background: #f2c14e; color: #1d2b3a; }
.plan-price .trial { display: block; }

/* Selling points */
.price-hook { margin: 1.1rem 0 0; max-width: 34rem; font-size: 1.1rem; }
.price-hook strong { color: var(--carbon); }
.small-print { margin: .75rem 0 0; color: var(--ink-soft); font-size: .92rem; }

.steps, .features, .closer { margin-top: 4rem; }
.steps ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 1.1rem 1.25rem 1.1rem 4rem; background: var(--paper); color: #1d2b3a; border-radius: 14px; }
.steps li::before {
    content: counter(step); position: absolute; left: 1.1rem; top: 1rem;
    width: 2.1rem; height: 2.1rem; display: grid; place-items: center;
    border-radius: 50%; background: var(--carbon); color: #fff; font-weight: 700;
}
.steps h3, .feature h3 { margin: 0 0 .3rem; font-size: 1.15rem; font-weight: 600; }
.steps p, .feature p { margin: 0; color: #4a5a6a; }

.feature-grid { display: grid; gap: 1rem; }
.feature { padding: 1.1rem 1.25rem; background: var(--paper); color: #1d2b3a; border-radius: 14px; border-top: 4px solid var(--carbon); }

.soon { display: inline-block; margin-left: .4rem; padding: .05rem .5rem; border-radius: 999px; font-size: .75rem; font-weight: 600; vertical-align: middle; background: var(--rule); color: var(--ink); }

.closer { padding: 2rem 1.5rem; border-radius: 18px; background: var(--ink); color: var(--desk); text-align: center; }
.closer h2 { margin-bottom: .5rem; }
.closer p { margin: 0 auto; max-width: 30rem; }
.closer .cta { margin-top: 1.25rem; }

@media (min-width: 52rem) {
    .steps ol { grid-template-columns: repeat(3, 1fr); }
    .feature-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Blazor focuses the heading after navigation (for screen readers); no visible box needed. */
h1:focus { outline: none; }

/* Service status */
.status-intro { max-width: 40rem; }
.status-summary { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; color: var(--ink); }
.status-summary::before { content: ""; width: .8rem; height: .8rem; border-radius: 50%; background: var(--carbon); }
.status-summary.status-down::before { background: var(--stamp); }
.status-list { list-style: none; margin: 2rem 0 1rem; padding: 0; max-width: 40rem; border-top: 1px solid var(--rule); }
.status-item { display: grid; grid-template-columns: auto 1fr auto; gap: .9rem; align-items: center; padding: 1rem .25rem; border-bottom: 1px solid var(--rule); }
.status-name { display: grid; }
.status-desc { color: var(--ink-soft); font-size: .95rem; }
.status-state { font-weight: 600; text-align: right; }
.status-ms { display: block; font-weight: 400; font-size: .85rem; color: var(--ink-soft); }
.status-dot { width: .9rem; height: .9rem; border-radius: 50%; background: var(--rule); }
.status-dot-up { background: var(--carbon); box-shadow: 0 0 0 4px color-mix(in srgb, var(--carbon) 22%, transparent); }
.status-dot-down { background: var(--stamp); box-shadow: 0 0 0 4px color-mix(in srgb, var(--stamp) 22%, transparent); }
.status-dot-checking { animation: status-pulse 1s ease-in-out infinite alternate; }
@keyframes status-pulse { from { opacity: .35; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .status-dot-checking { animation: none; } }
.status-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; max-width: 40rem; color: var(--ink-soft); }
.btn-small { padding: .3rem .8rem; font-size: .95rem; }
.foot-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.foot-links a { color: inherit; }

/* Trade workflow table */
.trades { max-width: 60rem; }
.trades-intro { color: var(--ink-soft); max-width: 40rem; }
.trade-table-wrap { --table-bg: color-mix(in srgb, var(--desk) 70%, #fff 30%); overflow-x: auto; margin-top: 1.5rem; border: 2px solid var(--ink); border-radius: 8px; background: var(--table-bg); }
.trade-table-wrap:focus-visible { outline: 3px solid var(--carbon); outline-offset: 3px; }
.trade-table { width: 100%; min-width: 38rem; border-collapse: collapse; }
.trade-table th, .trade-table td { padding: .7rem .8rem; text-align: center; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.trade-table tbody tr:last-child th, .trade-table tbody tr:last-child td { border-bottom: 0; }
.trade-table thead th { font-size: .95rem; line-height: 1.25; vertical-align: bottom; border-bottom: 2px solid var(--ink); }
.trade-table tbody th { text-align: left; font-weight: 500; position: sticky; left: 0; background: var(--table-bg); }
.trade-state { display: block; margin-top: .3rem; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
.trade-state.live { color: var(--carbon); }
.trade-table .yes, .trades-key .yes { color: var(--carbon); font-weight: 700; }
.trade-table .soon-cell, .trades-key .soon-cell { color: #9a6a00; font-weight: 600; }
@media (prefers-color-scheme: dark) { .trade-table .soon-cell, .trades-key .soon-cell { color: #FFB703; } }
.trade-table .no, .trades-key .no { color: var(--ink-soft); }
.trade-table .text { font-weight: 600; font-size: .95rem; }
.trades-key { margin-top: .75rem; font-size: .9rem; color: var(--ink-soft); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 40rem) {
    .trade-table { min-width: 0; font-size: .85rem; }
    .trade-table th, .trade-table td { padding: .55rem .35rem; }
    .trade-table tbody th { position: static; width: 38%; padding-left: .6rem; }
    .trade-table thead th { font-size: .8rem; }
    .trade-state { font-size: .65rem; letter-spacing: 0; }
    .trade-table .text { font-size: .8rem; }
}
@media (prefers-color-scheme: dark) {
    .trade-table-wrap { --table-bg: color-mix(in srgb, var(--desk) 92%, #fff 8%); }
    .trade-table .yes, .trades-key .yes, .trade-state.live { color: #5cc8bf; }
}
