/*
  MT-Uptime hosted - portal stylesheet.

  Every style in the portal lives here. There are no <style> blocks and no style="" attributes, because
  the host sends a Content-Security-Policy with no 'unsafe-inline' (see Program.cs). One inline style
  would force 'unsafe-inline' back into style-src, which re-enables every injected style at once - so
  the constraint is deliberate, and the utility classes at the bottom exist to satisfy it.

  Palette is the engine's own (SelfHost.MT-Uptime/wwwroot/app.css), not a separate marketing identity:
  the hosted product runs the exact code you can download, and it should look like it.
*/

:root {
    --bg: #ffffff;
    --bg-soft: #f6f7f9;
    --panel: #ffffff;
    --ink: #1f2430;
    --body: #3d4451;
    --muted: #6b7280;
    --border: #e3e6ea;
    --border-strong: #cfd4da;

    --brand: #2f6fed;
    --brand-hover: #2559c9;
    --brand-tint: rgba(47, 111, 237, .10);

    --up: #22a06b;
    --down: #e5484d;
    --degraded: #e8830c;

    --radius: 12px;
    --radius-lg: 16px;
    --shell: 1060px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--body);
    background: var(--bg);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); }

/* Keyboard focus must stay visible everywhere. Removing outlines is the most common accessibility
   regression in a hand-written stylesheet, so the ring is defined once, globally. */
:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Skip link: present for keyboard and screen-reader users, off-screen until focused. */
.skip {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--brand);
    color: #fff;
    padding: 10px 16px;
    z-index: 100;
    text-decoration: none;
    border-radius: 0 0 var(--radius) 0;
}
.skip:focus { left: 0; }

/* -- shell ------------------------------------------------------------------------------------- */

.container {
    max-width: var(--shell);
    margin: 0 auto;
    padding: 24px;
}

.narrow { max-width: 760px; }

.section { padding: 16px 0 8px; }

/* -- nav --------------------------------------------------------------------------------------- */

.nav {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 18px 24px;
    max-width: var(--shell);
    margin: 0 auto;
    flex-wrap: wrap;
}

.nav .brand {
    font-weight: 750;
    font-size: 17px;
    color: var(--ink);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 9px;
    letter-spacing: -.2px;
}

/* The mark is a "live" dot in the engine's up-green - the product's own vocabulary, and it reads as
   a status light rather than as a generic logo shape. */
.nav .brand::before {
    content: "";
    width: 11px;
    height: 11px;
    border-radius: 50%;
    flex: none;
    background: var(--up);
    box-shadow: 0 0 0 4px rgba(34, 160, 107, .18);
}

.nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 15px;
    font-weight: 550;
}
.nav a:hover { color: var(--ink); }
.nav .brand:hover { color: var(--ink); }
.nav .spacer { flex: 1; }

/* -- buttons ----------------------------------------------------------------------------------- */

.btn {
    display: inline-block;
    padding: 11px 20px;
    border-radius: 9px;
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--ink);
    text-decoration: none;
    font-weight: 650;
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
    transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--bg-soft); border-color: var(--border-strong); }

.btn-primary {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    box-shadow: 0 2px 8px rgba(47, 111, 237, .28);
}
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }

.btn-block { display: block; width: 100%; text-align: center; }

.btn-danger { color: var(--down); border-color: #f0c4c5; }
.btn-danger:hover { background: #fdf3f3; border-color: var(--down); }

/* -- hero -------------------------------------------------------------------------------------- */

.hero {
    text-align: center;
    padding: 72px 24px 40px;
    background:
        radial-gradient(760px 400px at 20% -10%, rgba(47, 111, 237, .11), transparent 60%),
        radial-gradient(640px 360px at 85% -5%, rgba(34, 160, 107, .09), transparent 55%);
}

.hero h1 {
    font-size: 44px;
    margin: 0 0 14px;
    letter-spacing: -1.2px;
    line-height: 1.12;
    color: var(--ink);
    font-weight: 800;
}

.hero .lead {
    font-size: 20px;
    color: var(--muted);
    max-width: 640px;
    margin: 0 auto 28px;
}

.cta-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.cta-note { color: var(--muted); font-size: 14px; margin-top: 12px; }

/* -- headings and prose ------------------------------------------------------------------------ */

h1, h2, h3 { color: var(--ink); }

h2 { font-size: 26px; margin: 40px 0 6px; letter-spacing: -.4px; }

h3 { font-size: 17px; margin: 0 0 7px; letter-spacing: -.1px; }

.subhead { color: var(--muted); margin: 0 0 8px; }

.lede { font-size: 17px; }

/* -- cards ------------------------------------------------------------------------------------- */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
    margin: 28px 0;
}

.card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    background: var(--panel);
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.card:hover {
    border-color: #bcd0f8;
    box-shadow: 0 8px 24px rgba(47, 111, 237, .08);
    transform: translateY(-1px);
}
.card p { margin: 0; color: var(--muted); font-size: 15px; }

/* -- the cadence argument ---------------------------------------------------------------------- */

.claim {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-soft);
    padding: 28px 30px;
    margin: 32px 0;
}
.claim h2 { margin-top: 0; }
.claim ul { margin: 14px 0 0; padding-left: 20px; }
.claim li { margin-bottom: 9px; }
.claim li strong { color: var(--ink); }

/* -- pricing ----------------------------------------------------------------------------------- */

.price-card {
    max-width: 420px;
    margin: 32px auto;
    border: 2px solid var(--brand);
    border-radius: var(--radius-lg);
    padding: 34px 32px;
    text-align: center;
    background: var(--panel);
    box-shadow: 0 16px 44px rgba(47, 111, 237, .12);
}
.price-card .amount {
    font-size: 50px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -1.5px;
    line-height: 1.1;
}
.price-card .per { color: var(--muted); font-size: 15px; }
.price-card .amount .per { font-size: 18px; }
.price-card ul { text-align: left; padding-left: 20px; color: var(--body); font-size: 15px; margin: 18px 0; }
.price-card ul li { margin-bottom: 7px; }

/* -- comparison table -------------------------------------------------------------------------- */

.table-wrap { overflow-x: auto; margin: 24px 0; }

table.compare {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    min-width: 560px;
}
table.compare th, table.compare td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
table.compare thead th {
    color: var(--ink);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .5px;
    border-bottom: 2px solid var(--border-strong);
}
table.compare tbody th { font-weight: 600; color: var(--ink); }
table.compare td { color: var(--muted); }

.yes { color: var(--up); font-weight: 700; }
.no { color: var(--muted); }

/* -- forms ------------------------------------------------------------------------------------- */

.form-card {
    max-width: 420px;
    margin: 40px auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    background: var(--panel);
    box-shadow: 0 8px 30px rgba(31, 36, 48, .06);
}
.form-card h1 { font-size: 25px; margin: 0 0 6px; letter-spacing: -.4px; }

.field { margin-bottom: 16px; }
.field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 5px;
}
.field input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-strong);
    border-radius: 9px;
    font-size: 15px;
    font-family: inherit;
    color: var(--ink);
    background: var(--panel);
}
.field input:focus { border-color: var(--brand); }
.field .help { font-size: 13px; color: var(--muted); margin: 5px 0 0; }

.alert {
    border-radius: 9px;
    padding: 11px 14px;
    font-size: 14.5px;
    margin-bottom: 18px;
    border: 1px solid;
}
.alert-error { background: #fdf3f3; border-color: #f0c4c5; color: #a32126; }
.alert-ok { background: #f1faf5; border-color: #b9e3cd; color: #12704a; }
.alert-info { background: #f4f7fe; border-color: #c8d8fa; color: #24509f; }

.form-foot { text-align: center; font-size: 14px; color: var(--muted); margin: 18px 0 0; }

/* -- signed-in shell --------------------------------------------------------------------------- */

.panel {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--panel);
    padding: 24px 26px;
    margin-bottom: 18px;
}
.panel h2 { margin: 0 0 4px; font-size: 19px; }

.kv { display: grid; grid-template-columns: 190px 1fr; gap: 10px 18px; margin: 16px 0 0; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); }

.pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .2px;
}
.pill-up { background: rgba(34, 160, 107, .12); color: var(--up); }
.pill-pending { background: rgba(232, 131, 12, .12); color: var(--degraded); }
.pill-off { background: #eef0f3; color: var(--muted); }

/* -- footer ------------------------------------------------------------------------------------ */

footer { border-top: 1px solid var(--border); margin-top: 64px; }
footer .container {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
    align-items: center;
    color: var(--muted);
    font-size: 14px;
    padding: 22px 24px;
}
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--ink); }

/* -- legal pages ------------------------------------------------------------------------------- */

.legal h1 { font-size: 31px; letter-spacing: -.5px; margin-bottom: 4px; }
.legal h2 { font-size: 19px; margin: 28px 0 4px; }
.legal p, .legal li { font-size: 15px; }
.legal code {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    padding: 1px 6px;
    border-radius: 5px;
    font-size: 13px;
}

/* -- utilities (these exist because inline styles are forbidden; see the header) ---------------- */

.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 13px; }
.strong { color: var(--ink); font-weight: 650; }
.stack { margin: 32px 0; }
.stack-lg { margin: 48px 0; }
.tight { margin-top: 0; }
.no-bottom { margin-bottom: 0; }

/* -- responsive -------------------------------------------------------------------------------- */

@media (max-width: 640px) {
    .hero { padding: 48px 20px 32px; }
    .hero h1 { font-size: 32px; letter-spacing: -.8px; }
    .hero .lead { font-size: 17px; }
    h2 { font-size: 22px; }
    .nav { gap: 14px; padding: 14px 16px; }
    .container { padding: 20px 16px; }
    .kv { grid-template-columns: 1fr; gap: 2px 0; }
    .kv dd { margin-bottom: 10px; }
    .form-card, .price-card { padding: 24px 20px; }
}

/* Respect a reduced-motion preference: the only motion here is card hover, but honouring the setting
   costs three lines and is the difference between "accessible" and "nearly accessible". */
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
