/* ──────────────────────────────────────────────────────────────────────────
   Policy Cutlass by OCCWARE — licensing portal styles. Plain CSS, no framework.

   Brand: colours come from the Policy Cutlass logo, a mirrored cloud with a
   cyan → teal → green → yellow gradient. The gradient is used only where the
   brand should show (top of plan cards, seat meters, hero wash); text and
   buttons use a deeper teal that is readable on white.
   To re-brand, change the tokens in :root. Everything else reads from them.
   ────────────────────────────────────────────────────────────────────────── */

:root {
    --sky-wash: #F3F8F7;   /* page background, faint teal */
    --cloud: #FFFFFF;      /* surfaces */
    --ink: #10303A;        /* text: deep teal-navy */
    --contour: #52707A;    /* muted text */
    --horizon: #A4DCE5;    /* contour lines, emphasis borders */
    --line: #D6E9EB;       /* hairlines */
    --sky: #0A7A93;        /* accent: logo cyan, deepened for contrast (5:1 on white) */
    --sky-deep: #086478;   /* accent hover */
    --sky-soft: #DDF1F4;   /* accent tint */
    --ok: #1E7F55;
    --ok-soft: #E2F3EA;
    --warn: #B8670A;
    --warn-soft: #FBEEDD;
    --danger: #C2364A;

    /* The logo gradient, sampled from the artwork */
    --brand-cyan: #13B6DA;
    --brand-teal: #44C0B3;
    --brand-green: #8CCB8F;
    --brand-lime: #C6D26B;
    --brand-yellow: #F0D74F;
    --brand-gradient: linear-gradient(90deg, var(--brand-cyan), var(--brand-teal) 30%, var(--brand-green) 55%, var(--brand-lime) 78%, var(--brand-yellow));

    --hero-wash: linear-gradient(115deg, #D9F1F6 0%, #F3F8F7 55%, #F8F3D6 100%);

    --font: "Sora", "Segoe UI", system-ui, -apple-system, sans-serif;
    --radius-s: 6px;
    --radius-m: 12px;
    --radius-l: 20px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --sky-wash: #0C1E24;
        --cloud: #13292F;
        --ink: #E5F2F4;
        --contour: #93B5BC;
        --horizon: #2C6672;
        --line: #1F3A41;
        --sky: #4FCBE3;
        --sky-deep: #8ADDEE;
        --sky-soft: #17414B;
        --ok: #5CC793;
        --ok-soft: #173326;
        --warn: #F0A85A;
        --warn-soft: #33281A;
        --danger: #F07A8A;

        --hero-wash: linear-gradient(115deg, #10323C 0%, #0C1E24 55%, #22261A 100%);
    }
}

/* ── Base ─────────────────────────────────────────────────────────────── */

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--sky-wash);
    color: var(--ink);
    font: 15px/1.6 var(--font);
    overflow-x: clip;               /* the full-width sky band must not cause sideways scroll */
    -webkit-font-smoothing: antialiased;
}

a { color: var(--sky); text-decoration: none; }
a:hover { color: var(--sky-deep); text-decoration: underline; text-underline-offset: 3px; }

:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { color: var(--ink); line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: 28px; font-weight: 600; margin: 0 0 8px; }
h2 { font-size: 19px; font-weight: 600; margin: 0 0 12px; }
h3 { font-size: 16px; font-weight: 600; margin: 0; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.page { padding-top: 32px; padding-bottom: 64px; min-height: 60vh; }
.muted { color: var(--contour); }
.hint { color: var(--contour); font-size: 13px; margin: 8px 0 0; }
.warn { color: var(--warn); }
.right { text-align: right; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ── Top bar ─────────────────────────────────────────────────────────── */

.topbar { background: var(--cloud); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; min-height: 62px; gap: 16px; }

.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; color: var(--ink); }
.brand-logo { width: 34px; height: 34px; }

/* The wordmark is the one all-caps element, echoing OCCWARE.COM. */
.wordmark { font-weight: 700; font-size: 16px; letter-spacing: .14em; }
.maker { font-size: 12px; color: var(--contour); align-self: flex-end; padding-bottom: 2px; }

.nav { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.nav a { color: var(--ink); }
.nav a:hover { color: var(--sky); }
.who { color: var(--contour); font-size: 13px; }

button.link {
    background: none; border: none; padding: 0;
    color: var(--ink); font: inherit; cursor: pointer;
}
button.link:hover { color: var(--sky); text-decoration: underline; text-underline-offset: 3px; }

/* ── Footer ──────────────────────────────────────────────────────────── */

.footer { border-top: 1px solid var(--line); background: var(--cloud); }
.footer-inner { display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; padding-top: 20px; padding-bottom: 28px; }
.footer p { margin: 0; color: var(--contour); font-size: 13px; }

/* ── Plans page hero (the one bold moment) ───────────────────────────── */

.sky {
    position: relative;
    /* Break out of the page container to full width, and up to meet the top bar. */
    margin: -32px calc(50% - 50vw) 8px;
    padding: 64px 0;
    background: var(--hero-wash);
    overflow: hidden;
}
/* A thin strip of the logo gradient where the hero meets the page. */
.sky::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
    background: var(--brand-gradient);
}

.sky-art { position: absolute; inset: 0; pointer-events: none; }

/*
   A faint example of the product's own graph: top-level groups (no parent) in the top row,
   nested groups below, policies as dots. One group is "added" and one link "removed",
   like a snapshot diff. Kept faint so the headline stays readable.
*/
.graph {
    position: absolute; inset: 0; width: 100%; height: 100%; opacity: .65;
    /* Fade out under the headline on the left, full strength towards the logo. */
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .15) 40%, #000 75%);
            mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .15) 40%, #000 75%);
}
.graph .edges path { fill: none; stroke: var(--horizon); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.graph .edges .removed { stroke: var(--contour); stroke-dasharray: 4 5; opacity: .7; }
.graph .groups rect { fill: var(--cloud); stroke: var(--horizon); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.graph .groups .added { fill: var(--brand-lime); stroke: var(--brand-green); }
.graph .policies circle { fill: var(--horizon); }

.sky-content {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 32px;
}

.hero-logo {
    width: clamp(200px, 26vw, 320px);
    height: auto;
    filter: drop-shadow(0 18px 30px rgba(16, 48, 58, .14));
}

.display {
    font-size: clamp(32px, 5vw, 54px);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.025em;
    max-width: 17ch;
    margin: 0 0 18px;
}

.lead { font-size: 17px; color: var(--contour); max-width: 52ch; margin: 0; }

.eyebrow {
    margin: 0 0 10px;
    font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
    color: var(--sky);
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }

/* ── Sales sections: who it's for, what it does, privacy ─────────────── */

html { scroll-behavior: smooth; }
#plans, #privacy { scroll-margin-top: 16px; }

.pitch-grid, .feature-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.pitch, .feature {
    background: var(--cloud);
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    padding: 20px 22px;
}
.pitch p, .feature p { margin: 8px 0 0; color: var(--contour); }
.pitch { border-top: 3px solid var(--horizon); }
.feature h3::before {
    content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 10px;
    border-radius: 50%; background: var(--brand-gradient); vertical-align: middle;
}

.trust {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 24px 40px;
    background: var(--cloud);
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    padding: 28px;
    position: relative; overflow: hidden;
}
.trust::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
    background: var(--brand-gradient);
}
.trust h2 { font-size: 22px; }
.trust .muted { margin: 0; }
.trust-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.trust-list li { position: relative; padding-left: 26px; color: var(--contour); }
.trust-list li strong { color: var(--ink); }
.trust-list li::before { content: "✓"; position: absolute; left: 0; top: 0; font-weight: 700; color: var(--sky); }

/* ── Product screenshots: framed, fading down into the page ────────────── */

.showcase { position: relative; margin-top: -40px; } /* rides up over the hero's bottom edge */

.shot { margin: 0; }
.shot-frame {
    border: 1px solid var(--line);
    border-bottom: none;
    border-radius: var(--radius-l) var(--radius-l) 0 0;
    background: var(--cloud);
    overflow: hidden;
    box-shadow: 0 24px 60px -24px rgba(16, 48, 58, .35);
    /* the fade-down: solid at the top, gone by the bottom edge */
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 52%, transparent 100%);
            mask-image: linear-gradient(to bottom, #000 0%, #000 52%, transparent 100%);
}
.shot-frame img { display: block; width: 100%; height: auto; }
.shot figcaption { margin-top: -18px; font-size: 13px; color: var(--contour); text-align: center; position: relative; }

.shot-hero .shot-frame { border-top: 3px solid var(--sky); }
.shot-hero figcaption { margin-top: -28px; }

/* Two screenshots a row on a laptop, one on a phone. */
.grid.shot-gallery { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); margin-top: 28px; gap: 28px 24px; }
.shot-gallery .shot-frame {
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 60%, transparent 100%);
            mask-image: linear-gradient(to bottom, #000 0%, #000 60%, transparent 100%);
}

/* Whole-window screenshots (1920 x 1080, title bar to status bar): wider than the text column, up to
   the image's own width, shown whole. The window frame is part of the picture, so there's no fade. */
.shot-full {
    --shot-w: min(calc(100vw - 48px), 1920px);
    width: var(--shot-w);
    margin-left: calc(50% - var(--shot-w) / 2);
}
.shot-full img {
    display: block; width: 100%; height: auto;
    border-radius: 8px;                                   /* a Windows 11 window's corners */
    border: 1px solid rgba(16, 48, 58, .18);
    box-shadow: 0 2px 6px rgba(16, 48, 58, .10), 0 30px 80px -30px rgba(16, 48, 58, .45);
    background: var(--cloud);
}
.shot-full figcaption { margin-top: 12px; font-size: 13px; color: var(--contour); text-align: center; }
.shot-full.shot-hero figcaption { margin-top: 12px; }
.tour { display: grid; gap: 56px; }
.tour-step .group-head { max-width: 760px; }

@media (prefers-reduced-motion: no-preference) {
    .shot-full.shot-hero img { animation: shot-rise .8s cubic-bezier(.2, .8, .2, 1) both; }
}

/* Text beside a tall screenshot (the theme gallery). */
.split {
    display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px 40px; align-items: center;
    background: var(--cloud);
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    padding: 28px 28px 0;
    overflow: hidden;
}
.split h2 { font-size: 22px; }
.split .muted { margin: 0 0 16px; }
.split .trust-list { padding-bottom: 28px; }
.shot-tall { align-self: end; }
.shot-tall .shot-frame {
    max-width: 420px; margin-left: auto;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 70%, transparent 100%);
            mask-image: linear-gradient(to bottom, #000 0%, #000 70%, transparent 100%);
}
.shot-tall figcaption { display: none; } /* the text beside it says it */

.hero-note { margin: 16px 0 0; font-size: 13px; color: var(--contour); }

@media (prefers-reduced-motion: no-preference) {
    .shot-hero .shot-frame { animation: shot-rise .8s cubic-bezier(.2, .8, .2, 1) both; }
    @keyframes shot-rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
}

/* Roadmap items and plans not on sale yet: shown, never sold as present. */
.planned-tag {
    display: inline-block; margin-left: 8px; padding: 0 7px;
    border-radius: 999px; font-size: 11px; font-weight: 600; vertical-align: 1px;
    background: var(--warn-soft); color: var(--warn);
}
.preview-tag { background: var(--sky-soft); color: var(--sky); } /* shipped, but on a preview Microsoft API */
.plan-soon::before { opacity: .45; }
.plan-soon .plan-code { color: var(--contour); }

/* ── Plans ───────────────────────────────────────────────────────────── */

.plan-group { margin-top: 40px; }
.group-head { display: flex; align-items: baseline; gap: 4px 16px; flex-wrap: wrap; margin-bottom: 16px; }
.group-head h2 { margin: 0; font-size: 22px; }
.group-head p { margin: 0; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }

.plan {
    position: relative;
    display: flex; flex-direction: column; gap: 10px;
    background: var(--cloud);
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    padding: 28px 24px 24px;
    overflow: hidden;
}
/* Each plan card carries the logo gradient along its top edge. */
.plan::before {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
    background: var(--brand-gradient);
}
.plan .muted { margin: 0; }

/* The product code is what customers buy, so it is set large. */
.plan-code {
    margin: 0 0 2px;
    font-size: 44px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--sky);
}

.delivery { margin: -6px 0 0; font-size: 13px; color: var(--contour); }

/* The plan's limits: snapshots, storage, coverage. */
.facts { margin: 4px 0 0; padding: 0; list-style: none; }
.facts li { position: relative; padding-left: 20px; margin: 4px 0; }
.facts li::before {
    content: ""; position: absolute; left: 2px; top: .62em;
    width: 8px; height: 8px; border-radius: 50%;
    border: 2px solid var(--horizon);
}

/* Four plans fit side by side on a laptop. */
.plans-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

.prices {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
    margin: auto 0 0; padding-top: 14px;
    border-top: 1px solid var(--line);
}
.prices dt { font-size: 12px; color: var(--contour); }
.prices dd { margin: 0; font-weight: 600; font-size: 14px; white-space: nowrap; }
.plans-grid .prices { gap: 8px; }

.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions form { margin: 0; }
.right-actions { justify-content: flex-end; }

/* ── Comparison table ────────────────────────────────────────────────── */

.compare th, .compare td { text-align: center; }
.compare thead th { vertical-align: bottom; padding-top: 16px; }
.compare th[scope=row] { text-align: left; font-size: 14px; color: var(--ink); font-weight: 500; min-width: 220px; }
/* Keep the feature names in view when the table scrolls sideways on a phone. */
.compare tbody th[scope=row] { position: sticky; left: 0; z-index: 1; background: var(--cloud); }
.compare .plan-col { min-width: 92px; }
.compare .plan-col-name { display: block; margin-top: 6px; font-size: 13px; color: var(--ink); font-weight: 600; }
.compare .endpoint { display: block; font-size: 12px; font-weight: 400; color: var(--contour); overflow-wrap: anywhere; }
.compare-section th {
    text-align: left !important;
    padding-top: 22px;
    font-size: 15px; font-weight: 600; color: var(--ink);
    background: var(--sky-wash);
}
.compare td { font-variant-numeric: tabular-nums; }
.mark { font-weight: 700; }
.mark.yes { color: var(--sky); }
.mark.no { color: var(--line); }
.mark.planned { color: var(--warn); font-weight: 400; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ── Signed-in pages ─────────────────────────────────────────────────── */

.section-title { margin-top: 36px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }

.card {
    background: var(--cloud);
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    padding: 22px;
    margin-bottom: 16px;
}
.grid .card { margin-bottom: 0; }
.card.narrow { max-width: 540px; }
.card.empty { padding: 28px; }
.card.empty p { margin: 0 0 8px; }
.table-card { padding: 4px 0; overflow-x: auto; }

.app { display: flex; flex-direction: column; gap: 10px; }
.app .muted, .app .hint { margin: 0; }

.plan-head { display: flex; align-items: center; gap: 10px; }
.plan-head h1 { margin: 0; }

/* Small product code chip used in tables and headings. */
.sku {
    display: inline-block;
    min-width: 34px;
    padding: 1px 8px;
    border-radius: var(--radius-s);
    background: var(--sky-soft);
    color: var(--sky);
    font-weight: 700;
    font-size: 13px;
    text-align: center;
}

/* ── Buttons ─────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 9px 18px;
    border: 1px solid var(--sky);
    border-radius: 999px;
    background: var(--sky);
    color: #fff;
    font: 600 14px var(--font);
    cursor: pointer;
}
.btn:hover { background: var(--sky-deep); border-color: var(--sky-deep); color: #fff; text-decoration: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-secondary { background: transparent; color: var(--sky); }
.btn-secondary:hover { background: var(--sky-soft); color: var(--sky-deep); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-small { padding: 5px 13px; font-size: 13px; }

@media (prefers-color-scheme: dark) {
    .btn { color: #0D1B2A; }
    .btn:hover { color: #0D1B2A; }
    .btn-secondary, .btn-danger { color: var(--sky); }
    .btn-danger { color: var(--danger); }
}

/* ── Forms ───────────────────────────────────────────────────────────── */

.form { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.form label { font-weight: 600; }
.form .btn { margin-top: 10px; align-self: flex-start; }

fieldset { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 10px 16px; margin: 0 0 8px; }
legend { font-weight: 600; padding: 0 4px; }
.radio { display: flex; gap: 10px; align-items: center; font-weight: 400 !important; padding: 5px 0; }

input[type=number], input[type=text], input[type=search] {
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-s);
    background: var(--cloud);
    color: var(--ink);
    font: 14px var(--font);
}
input:focus-visible { outline: 2px solid var(--sky); outline-offset: 0; border-color: var(--sky); }
input[type=radio] { accent-color: var(--sky); }

.form input[type=number] { max-width: 160px; }
.inline-form { display: flex; gap: 8px; align-items: center; margin: 0; }
.inline-form input[type=number] { width: 90px; }
.inline-form input[type=text], .inline-form input[type=search] { flex: 1; min-width: 0; }
.search { margin-bottom: 12px; }

/* ── Tables ──────────────────────────────────────────────────────────── */

table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 13px; color: var(--contour); font-weight: 500; }
tr:last-child td { border-bottom: none; }
th.num, td.num { text-align: right; }
td .muted { font-size: 13px; }

/* ── Seat usage ──────────────────────────────────────────────────────── */

.meter { width: 120px; height: 8px; border-radius: 4px; background: var(--sky-soft); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--brand-gradient); background-size: 120px 100%; border-radius: 4px; }
.meter-over span { background: var(--warn); }

.stats { display: flex; gap: 16px; margin: 14px 0 22px; flex-wrap: wrap; }
.stat {
    flex: 1; min-width: 120px;
    background: var(--cloud); border: 1px solid var(--line); border-radius: var(--radius-m);
    padding: 14px 18px; display: flex; flex-direction: column;
}
.stat strong { font-size: 30px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat span { color: var(--contour); font-size: 13px; }

/* ── Status pills and notices ────────────────────────────────────────── */

.status { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--sky-soft); color: var(--contour); }
.status-active, .status-trialing { background: var(--ok-soft); color: var(--ok); }
.status-past_due, .status-unpaid, .status-incomplete { background: var(--warn-soft); color: var(--warn); }

.admin-badge { display: inline-block; margin-left: 8px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--sky-soft); color: var(--sky); }

.notice {
    background: var(--sky-soft);
    border-left: 3px solid var(--sky);
    color: var(--ink);
    border-radius: var(--radius-s);
    padding: 10px 14px;
    margin-bottom: 20px;
}

/* Shown by Blazor if the page hits an unhandled error. */
#blazor-error-ui {
    display: none;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
    padding: 12px 16px;
    background: var(--warn-soft); color: var(--ink);
    border-top: 1px solid var(--warn);
}
#blazor-error-ui .reload { margin-left: 8px; }

/* ── Small screens ───────────────────────────────────────────────────── */

@media (max-width: 640px) {
    .topbar-inner { padding-top: 10px; padding-bottom: 10px; flex-direction: column; align-items: flex-start; gap: 8px; }
    .who, .maker { display: none; }
    .sky { padding: 36px 0 44px; }
    .sky-content { grid-template-columns: 1fr; gap: 16px; }
    .hero-logo { order: -1; width: 120px; }
    .graph { opacity: .35; }
    .trust { grid-template-columns: 1fr; padding: 22px; }
    .split { grid-template-columns: 1fr; padding: 22px 22px 0; }
    .shot-tall .shot-frame { margin: 0 auto; }
    .showcase { margin-top: -20px; }
    .shot-frame { border-radius: var(--radius-m) var(--radius-m) 0 0; }
    .shot figcaption, .shot-hero figcaption { margin-top: -8px; }
    .compare th[scope=row] { min-width: 160px; }
    .compare .endpoint { display: none; }
    th, td { padding: 9px 12px; }
}
