/* Niteporter — visual language.
   One stylesheet, no build step and no external requests: this runs on hotel networks that are
   often locked down, so a CDN font is a page that renders wrong at 2am.

   Hospitality, not developer tooling. Warm neutrals rather than blue-greys, brass for the accent
   — the colour of a bell, a key fob and a lift surround — and a serif for display type, which is
   how hotels have set their names for a century. The portal keeps a sans for its working text;
   a dense operational screen is not the place for an editorial face. */

:root {
    /* One theme, and it is night. The product is named after the person on the late shift, and a
       portal that flipped to parchment at 9am would not look like the same product as the page
       that sold it. Dropping the light variant also removes a whole second palette to keep
       honest. */
    color-scheme: dark;

    --bg: #0a0c12;
    --surface: #12151e;
    --surface-2: #191d28;
    --border: rgba(226, 232, 245, 0.09);
    --border-strong: rgba(226, 232, 245, 0.18);

    --text: #ece9e2;
    --muted: #9aa0ad;
    --faint: #6d7482;

    /* Lamplight. */
    --accent: #e0b171;
    --accent-text: #14100a;
    --accent-soft: rgba(224, 177, 113, 0.13);

    --good: #7fb573;
    --good-soft: rgba(127, 181, 115, 0.13);
    --warn: #e0b04a;
    --warn-soft: rgba(224, 176, 74, 0.13);
    --bad: #e58174;
    --bad-soft: rgba(229, 129, 116, 0.13);

    --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lift: 0 2px 6px rgba(0, 0, 0, 0.55), 0 18px 40px rgba(0, 0, 0, 0.5);

    --radius: 12px;
    --radius-sm: 8px;

    --font: "Segoe UI Variable Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Inter,
            system-ui, Roboto, "Helvetica Neue", sans-serif;
    --font-display: "Segoe UI Variable Display", -apple-system, BlinkMacSystemFont, "Segoe UI",
            Inter, system-ui, sans-serif;
    /* Present on Windows, macOS and most Linux desktops, so no web font to fetch. */
    --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia,
            "Times New Roman", ui-serif, serif;
    --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 14.5px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Shell and header -------------------------------------------------------- */

.shell { max-width: 76rem; margin: 0 auto; padding: 0 1.5rem 5rem; }

.shell.plain {
    max-width: 23rem;
    padding-top: 14vh;
}

header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: .85rem 0;
    margin-bottom: .5rem;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
    /* The page scrolls under the bar, so it needs its own backing. */
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
}

.brand {
    font-family: var(--font-serif);
    font-weight: 600;
    letter-spacing: .01em;
    font-size: 1.1rem;
    color: var(--text);
    white-space: nowrap;
}

.brand:hover { text-decoration: none; }

nav { display: flex; gap: .15rem; flex-wrap: wrap; }

nav a {
    color: var(--muted);
    text-decoration: none;
    padding: .32rem .68rem;
    border-radius: 999px;
    font-size: .9rem;
    font-weight: 500;
    transition: background-color .12s ease, color .12s ease;
}

nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
nav a.active { color: var(--text); background: var(--surface-2); font-weight: 600; }

.who {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: .5rem;
    color: var(--muted);
    font-size: .88rem;
    white-space: nowrap;
}

.role {
    padding: .12rem .55rem;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 500;
    color: var(--muted);
}

/* Headings ---------------------------------------------------------------- */

h1 {
    font-family: var(--font-serif);
    font-size: 1.7rem;
    font-weight: 600;
    letter-spacing: -0.005em;
    margin: 1.75rem 0 .3rem;
}

h2 {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.004em;
    margin: 2.25rem 0 .75rem;
}

h3 {
    font-family: var(--font-display);
    font-size: .95rem;
    font-weight: 620;
    letter-spacing: -0.008em;
    margin: 1.9rem 0 .7rem;
}

.lede { color: var(--muted); margin: 0 0 1.75rem; max-width: 62ch; }

.notice { color: var(--muted); }
.error { color: var(--bad); }
.ok { color: var(--good); }

p { max-width: 78ch; }

/* A standalone warning is a thing to notice, not a sentence that happens to be red. */
p.error, p.ok {
    padding: .7rem .9rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
}

p.error { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 25%, transparent); }
p.ok { background: var(--good-soft); border-color: color-mix(in srgb, var(--good) 25%, transparent); }

/* Inside a card or a table the panel treatment is too heavy — the surrounding surface already
   does that job. */
.card p.error, .card p.ok, td p.error, .actions p.error, .actions p.ok {
    padding: 0;
    background: none;
    border: 0;
}

/* Status ------------------------------------------------------------------ */

.pill {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .18rem .6rem .18rem .5rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 550;
    white-space: nowrap;
    border: 1px solid transparent;
}

/* A dot as well as a colour: status should not be carried by hue alone. */
.pill::before {
    content: "";
    width: .42rem;
    height: .42rem;
    border-radius: 50%;
    background: currentColor;
    flex: none;
}

.pill.healthy { color: var(--good); background: var(--good-soft); }
.pill.watch { color: var(--warn); background: var(--warn-soft); }
.pill.attention { color: var(--bad); background: var(--bad-soft); }
.pill.plain { color: var(--muted); background: var(--surface-2); }

/* Cards ------------------------------------------------------------------- */

.cards {
    display: grid;
    gap: 1rem;
    /* Capped rather than 1fr: a single property should not stretch to a metre wide. */
    grid-template-columns: repeat(auto-fit, minmax(21rem, 30rem));
    justify-content: start;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.15rem 1.25rem 1.25rem;
    box-shadow: var(--shadow);
    transition: box-shadow .16s ease, border-color .16s ease, transform .16s ease;
}

.cards .card:hover {
    box-shadow: var(--shadow-lift);
    border-color: var(--border-strong);
}

.card h2 { margin: 0; font-size: 1.02rem; }
.card h2 a { color: inherit; }
.card h2 a:hover { color: var(--accent); text-decoration: none; }

.card .head { display: flex; align-items: center; gap: .8rem; }
.card .head .pill { margin-left: auto; align-self: start; }
.card .head .titles { display: grid; gap: 0; min-width: 0; }
.card .head .titles .sub { color: var(--faint); font-size: .8rem; }

.thumb {
    width: 2.9rem;
    height: 2.9rem;
    border-radius: 9px;
    flex: none;
    object-fit: cover;
    border: 1px solid var(--border);
}

.thumb.placeholder {
    position: relative;
    display: grid;
    place-items: center;
    background: var(--accent-soft);
    color: var(--accent);
    font-family: var(--font-display);
    font-weight: 650;
    font-size: .92rem;
    letter-spacing: .01em;
    border-color: transparent;
    overflow: hidden;
}

/* Sits over the initials, so a photograph that will not load simply uncovers them. */
.thumb.placeholder img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contact {
    display: flex;
    flex-wrap: wrap;
    gap: .2rem .9rem;
    margin: .85rem 0 0;
    color: var(--muted);
    font-size: .85rem;
}

.card > p:last-child { margin-bottom: 0; }

.figures {
    display: flex;
    gap: 1.75rem;
    margin: 1.15rem 0 .35rem;
    flex-wrap: wrap;
}

.figure { display: grid; gap: .1rem; }

.figure b {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 620;
    line-height: 1.05;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.figure span {
    color: var(--faint);
    font-size: .76rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .045em;
}

/* Tables ------------------------------------------------------------------ */

.scroll {
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

table { border-collapse: collapse; width: 100%; font-size: .89rem; }

th, td {
    text-align: left;
    padding: .65rem .9rem;
    vertical-align: top;
    border-bottom: 1px solid var(--border);
}

thead th {
    font-weight: 600;
    color: var(--faint);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    background: var(--surface-2);
    white-space: nowrap;
}

thead th:first-child { border-top-left-radius: var(--radius); }
thead th:last-child { border-top-right-radius: var(--radius); }

tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background-color .1s ease; }
tbody tr:hover { background: var(--surface-2); }

td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

td .sub {
    display: block;
    color: var(--faint);
    font-size: .8rem;
    margin-top: .1rem;
}

/* Forms ------------------------------------------------------------------- */

form { display: grid; gap: 1rem; }
label { display: grid; gap: .35rem; font-size: .88rem; font-weight: 550; }

label .hint {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 400;
    line-height: 1.45;
    max-width: 52ch;
}

.fields {
    display: grid;
    gap: 1.25rem 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    /* Stretch, not start: combined with the label rule below this is what makes every control in
       a row sit on the same line regardless of how long its explanation is. */
    align-items: stretch;
    margin-bottom: .5rem;
}

.fields.wide { grid-template-columns: 1fr; }

/* A settings section reads as a panel. Scoped to a page's own fields so the grids nested inside
   cards and repeating rows are not drawn as panels within panels. */
main > .fields {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.35rem;
    margin-bottom: 1.75rem;
    box-shadow: var(--shadow);
}

.fields > label {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    height: 100%;
}

/* The explanation absorbs the spare height so the control drops to the bottom of the cell. */
.fields > label .hint { flex: 1 0 auto; }

input, select, textarea {
    padding: .5rem .65rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: inherit;
    font: inherit;
    font-size: .9rem;
    width: 100%;
    transition: border-color .12s ease, box-shadow .12s ease;
}

input:hover:not(:disabled), select:hover:not(:disabled), textarea:hover:not(:disabled) {
    border-color: var(--muted);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

input:disabled, select:disabled, textarea:disabled {
    background: var(--surface-2);
    color: var(--muted);
    cursor: not-allowed;
}

input::placeholder { color: var(--faint); }

/* A field holding "60" does not need to be half the page wide — the width of a control is a hint
   about what belongs in it. */
input[type="number"] { max-width: 11rem; }
select { max-width: 22rem; }
.row input[type="number"], .row select { max-width: none; }

textarea {
    min-height: 7rem;
    font-family: var(--mono);
    font-size: .82rem;
    line-height: 1.5;
    resize: vertical;
}

label.check {
    display: flex;
    /* Stated explicitly: the `.fields > label` rule above sets column, and these two selectors
       have the same specificity, so an omitted direction would be inherited from it. */
    flex-direction: row;
    align-items: flex-start;
    gap: .55rem;
    font-weight: 500;
    line-height: 1.4;
}

label.check input {
    width: auto;
    flex: none;
    margin-top: .16rem;
    accent-color: var(--accent);
    /* Native checkboxes ignore most of the input styling above. */
    height: 1rem;
}

/* A sentence-length label squeezed into one auto-fit column wraps to three lines beside a tiny
   box. Give it the whole row instead, and opt out of the stretch that aligns text controls. */
.fields > label.check {
    grid-column: 1 / -1;
    align-self: start;
    height: auto;
}

/* Buttons ----------------------------------------------------------------- */

button {
    padding: .48rem .95rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: inherit;
    font: inherit;
    font-size: .88rem;
    font-weight: 550;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color .12s ease, border-color .12s ease, opacity .12s ease;
}

button:hover:not(:disabled) { background: var(--surface-2); border-color: var(--muted); }
button:active:not(:disabled) { transform: translateY(0.5px); }
button:disabled { opacity: .45; cursor: not-allowed; }

button.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-text);
    font-weight: 600;
}

button.primary:hover:not(:disabled) {
    background: color-mix(in srgb, var(--accent) 88%, var(--text));
    border-color: transparent;
}

button.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
button.danger:hover:not(:disabled) { background: var(--bad-soft); border-color: var(--bad); }

button.link {
    border: 0;
    padding: 0;
    background: none;
    color: var(--muted);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}

button.link:hover:not(:disabled) { color: var(--text); background: none; }

button.small { padding: .25rem .6rem; font-size: .8rem; }

a > button { width: 100%; }

.actions {
    display: flex;
    gap: .6rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.actions .notice, .actions .error, .actions .ok { margin: 0; font-size: .87rem; }

/* Property sub-navigation ------------------------------------------------- */

.tabs {
    display: flex;
    gap: .1rem;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border);
    margin: 1.25rem 0 1.75rem;
}

.tabs a {
    color: var(--muted);
    text-decoration: none;
    padding: .45rem .75rem;
    margin-bottom: -1px;
    border-bottom: 2px solid transparent;
    font-size: .88rem;
    font-weight: 500;
    transition: color .12s ease, border-color .12s ease;
}

.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }

/* Commissioning steps ----------------------------------------------------- */

/* The answer to "what do I do now", stated once and prominently. */
.next-up {
    display: flex;
    align-items: flex-start;
    gap: .9rem;
    background: var(--surface);
    border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem;
    margin: 1.25rem 0 2rem;
}

.next-up.done { border-color: color-mix(in srgb, var(--good) 35%, transparent); border-left-color: var(--good); }
.next-up p { margin: 0; }
.next-up .pill { flex: none; margin-top: .1rem; }

.steps { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .5rem; }

.step {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .9rem;
    padding: .9rem 1.1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    align-items: start;
}

.step.current { border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.step.done { opacity: .62; }

.step-mark {
    display: grid;
    place-items: center;
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 50%;
    font-size: .82rem;
    font-weight: 650;
    background: var(--surface-2);
    color: var(--muted);
    flex: none;
}

.step.done .step-mark { background: var(--good-soft); color: var(--good); }
.step.current .step-mark { background: var(--accent); color: var(--accent-text); }
.step.blocked .step-mark { background: var(--bad-soft); color: var(--bad); }

.step-body { display: grid; gap: .2rem; min-width: 0; }
.step-body b { font-size: .95rem; }
.step-body .detail { color: var(--muted); font-size: .89rem; }

/* The values that get typed into LG's form, each one lifted out to be copied. */
.copyables { display: grid; gap: .35rem; margin: .8rem 0 .4rem; }

.copyable {
    display: grid;
    grid-template-columns: 9rem 1fr auto;
    gap: .75rem;
    align-items: center;
    padding: .4rem .6rem;
    background: var(--surface-2);
    border-radius: 6px;
    font-size: .88rem;
}

.copyable .field-name { color: var(--muted); }
.copyable code { background: none; padding: 0; word-break: break-all; }
.copyable code.masked { letter-spacing: .12em; color: var(--muted); }
.copyable-actions { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: flex-end; }

@media (max-width: 40rem) {
    .copyable { grid-template-columns: 1fr auto; }
    .copyable .field-name { grid-column: 1 / -1; }
}

/* Commissioning checks ---------------------------------------------------- */

.checks { display: grid; gap: .6rem; margin: 1.1rem 0; }

/* Scoped to .checks: a checkbox label is also class "check", and would otherwise be drawn as a
   panel wherever one appears. */
.checks .check {
    display: grid;
    grid-template-columns: 6.5rem 1fr;
    gap: .9rem;
    padding: .8rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    align-items: start;
}

.checks .check > .pill { justify-self: start; }
.checks .check b { display: block; font-size: .89rem; font-weight: 600; }
.checks .check .detail { color: var(--muted); font-size: .86rem; }

/* Repeating item editors -------------------------------------------------- */

.rows { display: grid; gap: .7rem; }

.row {
    display: grid;
    gap: .8rem;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    align-items: end;
    padding: .9rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.row .remove { justify-self: start; }
.row .rows .row { background: var(--surface-2); }

.empty {
    background: var(--surface);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
    padding: 2rem 1.25rem;
    color: var(--muted);
    text-align: center;
}

.empty p { margin: 0 auto .75rem; }

code {
    font-family: var(--mono);
    font-size: .85em;
    background: var(--surface-2);
    padding: .08rem .35rem;
    border-radius: 4px;
}

/* Sign-in and the other unauthenticated screens ---------------------------- */

.auth {
    max-width: 25rem;
    margin: 0 auto;
    padding: 0 1.25rem 3rem;
    position: relative;
    z-index: 1;
}

/* The same lamp as the public page, so arriving at the sign-in screen from the product page does
   not feel like landing on a different site. */
.auth::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(46rem 32rem at 50% -12%, rgba(224, 177, 113, 0.15), transparent 62%),
        radial-gradient(38rem 30rem at 12% 108%, rgba(120, 150, 210, 0.07), transparent 64%);
}

.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    margin: 0 0 1.6rem;
    color: var(--text);
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: .01em;
    text-decoration: none;
}

.auth-brand:hover { text-decoration: none; }

.auth-brand .mark {
    display: grid;
    place-items: center;
    width: 1.95rem;
    height: 1.95rem;
    border-radius: 50%;
    background: var(--accent);
    color: var(--accent-text);
    font-family: var(--font-serif);
    font-size: .95rem;
    font-weight: 600;
    padding-bottom: .05em;
}

.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.85rem 1.75rem;
    box-shadow: var(--shadow-lift);
}

.auth-card h1 {
    margin: 0 0 .3rem;
    font-size: 1.4rem;
    letter-spacing: -0.008em;
}

.auth-sub { color: var(--muted); font-size: .89rem; margin: 0 0 1.5rem; max-width: none; }
.auth-card form { gap: 1.15rem; }
.auth-card button.primary { width: 100%; padding: .6rem 1rem; margin-top: .2rem; }

.auth-error, .auth-ok {
    margin: 0 0 1.25rem;
    padding: .7rem .85rem;
    border-radius: var(--radius-sm);
    font-size: .88rem;
    max-width: none;
}

.auth-error {
    color: var(--bad);
    background: var(--bad-soft);
    border: 1px solid color-mix(in srgb, var(--bad) 25%, transparent);
}

.auth-ok {
    color: var(--good);
    background: var(--good-soft);
    border: 1px solid color-mix(in srgb, var(--good) 25%, transparent);
}

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: .87rem;
}

.auth-row .check { font-weight: 400; font-size: .87rem; }

.auth-aside { margin: 1.35rem 0 0; text-align: center; font-size: .87rem; max-width: none; }
.auth-foot { margin: 1.5rem 0 0; text-align: center; color: var(--faint); font-size: .8rem; }

/* Reveal-password control. The button sits inside the field rather than beside it, so the layout
   does not shift when it appears. */
.reveal { position: relative; display: block; }
.reveal input { padding-right: 2.7rem; }

.eye {
    position: absolute;
    right: .3rem;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 2.1rem;
    height: 2.1rem;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: none;
    color: var(--faint);
}

.eye:hover:not(:disabled) { background: var(--surface-2); color: var(--text); border-color: transparent; }
.eye.on { color: var(--accent); }
.eye .icon { width: 1.05rem; height: 1.05rem; }

/* A six-digit code is easier to check when it is spaced out and monospaced. */
.code-input {
    font-family: var(--mono);
    font-size: 1.35rem;
    letter-spacing: .35em;
    text-align: center;
    padding: .6rem .5rem;
}

/* Two-factor enrolment */

.enrol {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.75rem;
    align-items: start;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.35rem;
    margin-bottom: 1rem;
}

.enrol .qr {
    width: 11rem;
    height: 11rem;
    padding: .55rem;
    background: #fff;
    border-radius: 10px;
}

.enrol .qr svg { width: 100%; height: 100%; display: block; }

code.secret {
    font-size: 1rem;
    letter-spacing: .12em;
    padding: .35rem .6rem;
}

.codes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: .4rem;
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.codes code { display: block; text-align: center; padding: .4rem; font-size: .92rem; }

@media (max-width: 34rem) {
    .enrol { grid-template-columns: 1fr; }
    .enrol .qr { width: 100%; max-width: 12rem; height: auto; aspect-ratio: 1; }
}

/* Public product page ------------------------------------------------------
   Scoped under .marketing so none of it can reach the portal, which has different priorities:
   the portal is a tool people use every day, this is a page people read once. */

/* The product is named after the person who is awake at three in the morning, so the page is
   nocturnal whatever the viewer's system theme says — deep ink rather than the warm brown the
   portal uses, with one warm light in it. A brand page is allowed to choose its own hour; the
   portal still follows the operating system, because that is a tool and somebody uses it at
   nine in the morning. */
.marketing {
    max-width: 68rem;
    margin: 0 auto;
    padding: 0 1.5rem 4rem;
    position: relative;
}

/* A single warm source, high and to the right, where the desk lamp would be. It is the whole
   reason the page reads as night rather than as a dark theme. */
.marketing::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(60rem 40rem at 72% -6%, rgba(224, 177, 113, 0.13), transparent 60%),
        radial-gradient(45rem 34rem at 8% 12%, rgba(120, 150, 210, 0.07), transparent 62%);
}

.marketing > * { position: relative; z-index: 1; }

.marketing-bar {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1.1rem 0;
    position: sticky;
    top: 0;
    z-index: 10;
    background: color-mix(in srgb, var(--bg) 85%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
}

.marketing-bar .brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    color: var(--text);
    text-decoration: none;
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: .01em;
}

/* A monogram on a brass disc, the way a hotel would set its initial on a key fob. */
.marketing-bar .mark {
    display: grid;
    place-items: center;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 50%;
    background: var(--accent);
    color: var(--accent-text);
    font-family: var(--font-serif);
    font-size: .92rem;
    font-weight: 600;
    letter-spacing: 0;
    padding-bottom: .05em;
}

.marketing-bar nav a {
    color: var(--muted);
    font-size: .9rem;
    font-weight: 500;
    padding: .3rem .5rem;
    border-radius: 6px;
}

.marketing-bar nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.marketing-bar .bar-actions { margin-left: auto; }

.cta {
    display: inline-block;
    padding: .5rem 1.05rem;
    border-radius: 999px;
    font-size: .89rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--border-strong);
    color: var(--text);
    transition: background-color .14s ease, border-color .14s ease;
}

.cta:hover { text-decoration: none; background: var(--surface-2); }

.cta.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-text);
}

.cta.primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--text)); }
.cta.ghost { background: transparent; }

/* Icons */

.icon { width: 1.25rem; height: 1.25rem; flex: none; }

.card-icon {
    display: inline-grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
    margin-bottom: .9rem;
}

.price-label .icon { width: 1rem; height: 1rem; vertical-align: -.15em; margin-right: .2rem; }

/* Hero */

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: center;
    padding: 4rem 0 3.5rem;
}

.hero-words { max-width: 34rem; }

/* The television, drawn. Its own palette rather than the page tokens: a TV screen is dark in
   both themes, and washing it out in light mode would make the mock unreadable. */

.hero-visual { display: grid; gap: 1.5rem; justify-items: center; }

.tv { width: 100%; max-width: 27rem; }

.tv-screen {
    background: linear-gradient(160deg, #2b2318, #16120c 62%);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 14px;
    padding: 1.1rem 1.2rem 1.2rem;
    aspect-ratio: 16 / 10;
    display: grid;
    align-content: start;
    gap: .55rem;
    color: #f4ede0;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .06);
    overflow: hidden;
}

.tv-top {
    display: flex;
    justify-content: space-between;
    font-size: .68rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: rgba(244, 237, 224, .5);
}

.tv-greet {
    margin: .35rem 0 0;
    font-family: var(--font-serif);
    font-size: 1.3rem;
    line-height: 1.25;
    letter-spacing: 0;
    color: rgba(244, 237, 224, .7);
}

.tv-greet b { display: block; color: #fff; font-weight: 600; }

.tv-bill {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .75rem;
    margin-top: .35rem;
    padding: .6rem .75rem;
    border-radius: 9px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .07);
    font-size: .74rem;
    color: rgba(244, 237, 224, .6);
}

.tv-bill b {
    font-family: var(--font-display);
    font-size: 1.05rem;
    color: #fff;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.tv-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; margin-top: .2rem; }

.tv-tiles span {
    padding: .45rem .3rem;
    border-radius: 7px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .06);
    text-align: center;
    font-size: .66rem;
    color: rgba(244, 237, 224, .68);
}

.tv-tiles span.on {
    background: var(--accent);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
}

.tv-stand {
    display: block;
    width: 5.5rem;
    height: .4rem;
    margin: .55rem auto 0;
    border-radius: 0 0 6px 6px;
    background: var(--border-strong);
}

/* The three parties, and which one is new. */

.flow { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; justify-content: center; }

.flow .node {
    padding: .3rem .7rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: .78rem;
    color: var(--muted);
    white-space: nowrap;
}

.flow .node.accent {
    border-color: transparent;
    background: var(--accent);
    color: var(--accent-text);
    font-weight: 600;
}

.flow .wire { width: 1.4rem; height: 1px; background: var(--border-strong); }

.eyebrow {
    color: var(--accent);
    font-size: .78rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: .09em;
    margin: 0 0 1rem;
}

.hero h1 {
    font-family: var(--font-serif);
    font-size: clamp(2.05rem, 4.9vw, 3.15rem);
    line-height: 1.12;
    letter-spacing: -0.012em;
    font-weight: 600;
    margin: 0 0 1.25rem;
}

.hero-copy { font-size: 1.12rem; line-height: 1.6; color: var(--muted); margin: 0 0 2rem; }
.hero-actions { display: flex; gap: .7rem; flex-wrap: wrap; }
.hero-note { margin-top: 1.5rem; color: var(--faint); font-size: .88rem; }

/* Sections */

.band { padding: 3.25rem 0; border-top: 1px solid var(--border); }

.band > h2 {
    font-family: var(--font-serif);
    font-size: 1.7rem;
    font-weight: 600;
    letter-spacing: -0.008em;
    margin: 0 0 .6rem;
}

.band > h2 ~ h2 { margin-top: 3.25rem; }

.section-lede {
    color: var(--muted);
    font-size: 1.02rem;
    max-width: 52ch;
    margin: 0 0 2rem;
}

.problems, .features {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
}

/* Four items in a three-column grid leaves one stranded on its own row. These lay out two by two
   instead, which also gives the longer headings room to sit on one line. */
.problems, .features.pair { grid-template-columns: repeat(auto-fit, minmax(24rem, 1fr)); }

.problem, .feature {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.35rem;
}

.problem h3, .feature h3 {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.005em;
    margin: 0 0 .5rem;
    text-transform: none;
}

.problem p, .feature p { margin: 0; color: var(--muted); font-size: .92rem; }

/* What the product does about the problem stated above it — the reason the section exists. */
.problem .resolve {
    margin-top: .85rem;
    padding-top: .85rem;
    border-top: 1px solid var(--border);
    color: var(--text);
}

.problem .resolve::before {
    content: "With Niteporter";
    display: block;
    color: var(--accent);
    font-size: .72rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: .3rem;
}

/* Partners */

.partners {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(24rem, 1fr));
}

.partner {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.1rem;
    align-items: start;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.35rem;
}

/* A slot the licensed asset drops into. Until there is one, the vendor's name is set in type
   rather than approximated — a wrong logo is worse than none. */
.partner-mark {
    display: grid;
    place-items: center;
    width: 4.1rem;
    height: 4.1rem;
    border-radius: 10px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--muted);
}

/* A real logo goes on a light plate. Brand guidelines almost always require it on a dark
   background, and it means the standard full-colour asset works without hunting for a reversed
   variant — LG's red on near-black would be unreadable otherwise. */
.partner-mark.has-logo {
    background: #ffffff;
    border-color: transparent;
    padding: .55rem;
}

.partner-mark img { max-width: 100%; max-height: 100%; object-fit: contain; }

.partner h3 {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: -0.005em;
    margin: 0 0 .45rem;
}

.partner p { margin: 0; color: var(--muted); font-size: .92rem; }

/* Contact */

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: start;
}

.contact-form { gap: 1.25rem; }
.contact-form .fields { gap: 1.1rem; }
.contact-form textarea { min-height: 8rem; font-family: var(--font); font-size: .92rem; }
.contact-form .cta { border: 0; cursor: pointer; }

/* Off-screen rather than display:none — some bots skip hidden fields but not positioned ones. */
.trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.contact-aside {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.4rem;
}

.contact-aside h3 { margin-top: 0; text-transform: none; }
.contact-aside h3 ~ h3 { margin-top: 1.75rem; }

.contact-line {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin: 0 0 .5rem;
    font-size: .95rem;
}

.contact-line .icon { color: var(--accent); flex: none; }

@media (max-width: 48rem) {
    .contact-grid { grid-template-columns: 1fr; gap: 1.75rem; }
}

/* Pricing */

.price-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
    align-items: start;
}

.price-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.price-label {
    margin: 0;
    color: var(--faint);
    font-size: .76rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.price {
    font-family: var(--font-serif);
    font-size: 2.7rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: .35rem 0 .75rem;
    line-height: 1;
}

.price .currency { font-size: 1.2rem; font-weight: 600; vertical-align: .55em; margin-right: .1rem; }
.price .per { font-size: .95rem; font-weight: 500; color: var(--muted); letter-spacing: -0.01em; }

.price-note { color: var(--muted); font-size: .89rem; margin: .75rem 0 0; }

.tiers { margin-top: 1.1rem; font-size: .89rem; }
.tiers th, .tiers td { padding: .45rem .1rem; }
.tiers thead th { background: none; letter-spacing: .05em; }
.tiers tbody tr:hover { background: none; }

/* Calculator */

.calculator {
    margin-top: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.calculator h3 { margin: 0 0 1rem; text-transform: none; }

.calc-inputs {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    margin-bottom: 1.25rem;
}

.calc-inputs label { gap: .35rem; }
.calc-inputs input { max-width: 9rem; }

.calc-choice {
    border: 0;
    padding: 0;
    margin: 0;
    display: grid;
    gap: .35rem;
}

.calc-choice legend {
    padding: 0;
    font-size: .88rem;
    font-weight: 550;
    margin-bottom: .35rem;
}

.calc-choice label.check { font-weight: 400; }
.calc-choice input { width: auto; max-width: none; accent-color: var(--accent); }

.calc-out { display: grid; gap: .1rem; }

.calc-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: .55rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    font-size: .92rem;
}

.calc-line b { color: var(--text); font-variant-numeric: tabular-nums; font-weight: 600; }

.calc-line.total {
    border-bottom: 0;
    padding-top: .8rem;
    color: var(--text);
    font-weight: 600;
}

.calc-line.total b {
    font-family: var(--font-display);
    font-size: 1.5rem;
    letter-spacing: -0.025em;
}

.fineprint { color: var(--faint); font-size: .84rem; margin-top: 1.5rem; }

/* The last thing on the page, so it gets room and sits on the centre line. Paragraphs carry a
   78ch cap globally, which left the call-to-action centred inside that box rather than inside
   the section — visibly off to the left. */
.closing {
    text-align: center;
    padding: 4.5rem 0 2.5rem;
}

.closing .section-lede {
    max-width: 48ch;
    margin: 0 auto 2rem;
}

.closing p { max-width: none; margin: 0; }
.closing .cta { padding: .65rem 1.6rem; font-size: .95rem; }

.marketing-foot {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    color: var(--faint);
    font-size: .85rem;
}

/* Narrow screens ---------------------------------------------------------- */

@media (max-width: 40rem) {
    .shell { padding: 0 1rem 3rem; }

    header {
        flex-wrap: wrap;
        gap: .6rem .9rem;
        padding: .7rem 0;
    }

    .who { margin-left: auto; font-size: .82rem; }
    .figures { gap: 1.25rem; }
    .figure b { font-size: 1.45rem; }
    .cards { grid-template-columns: 1fr; }
    .checks .check { grid-template-columns: 1fr; gap: .5rem; }

    .marketing { padding: 0 1rem 3rem; }
    .marketing-bar { gap: 1rem; }
    .marketing-bar nav { display: none; }
    .hero { grid-template-columns: 1fr; gap: 2.5rem; padding: 2.5rem 0; }
    .problems, .features.pair { grid-template-columns: 1fr; }
    .band { padding: 2.5rem 0; }
    main > .fields { padding: 1rem; }
}
