/* L8MS free-trial signup. Palette follows the BRS entry screens (auth.css):
   brand green #198754, IBM Plex Sans. */
:root {
    --green: #198754;
    --green-deep: #146c43;
    --green-edge: #115c3a;
    --green-tint: #d8ece2;
    --surface: #f1f3f2;
    --card: #ffffff;
    --ink: #1f2a25;
    --ink-soft: #566058;
    --ink-faint: #7c857e;
    --rule: #dce1de;
    --danger: #b02a37;
    --danger-bg: #fbeaec;
    --panel-ink: #f3f7f4;
    --panel-soft: rgba(243, 247, 244, 0.75);
    --panel-rule: rgba(243, 247, 244, 0.2);
    --radius: 8px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    min-height: 100vh;
    background: var(--surface);
    color: var(--ink);
    font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.5;
}
a { color: var(--green-deep); }
a:hover { color: var(--green-edge); }

.page { display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 24px 16px; }
.frame {
    width: 100%; max-width: 980px;
    display: grid; grid-template-columns: 38% 1fr;
    background: var(--card);
    border: 1px solid var(--rule); border-radius: 16px; overflow: hidden;
    box-shadow: 0 16px 44px rgba(20, 30, 22, 0.10), 0 2px 6px rgba(20, 30, 22, 0.05);
}

/* ── Brand panel ─────────────────────────────────────────────── */
.panel { background: var(--green); color: var(--panel-ink); padding: 32px 30px; display: flex; flex-direction: column; gap: 28px; }
.logo-plate { background: #fff; border-radius: 12px; padding: 10px 16px; align-self: flex-start; }
.logo-plate img { display: block; width: 150px; height: auto; }
.panel h1 { margin: 0; font-size: 28px; font-weight: 600; line-height: 1.2; color: #fff; }
.panel .lead { margin: 8px 0 0; color: var(--panel-soft); }
.benefits { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.benefits li { display: flex; gap: 10px; align-items: flex-start; }
.benefits i { flex: none; margin-top: 4px; width: 16px; }
.steps { list-style: none; margin: auto 0 0; padding: 20px 0 0; border-top: 1px solid var(--panel-rule); display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.steps li { display: flex; gap: 10px; align-items: center; color: var(--panel-soft); }
.steps .num { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--panel-rule); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; }
.steps li.done .num { background: rgba(255, 255, 255, 0.2); border-color: transparent; }
.steps li.current { color: #fff; font-weight: 600; }
.steps li.current .num { background: #fff; color: var(--green); border-color: #fff; }

/* ── Form side ───────────────────────────────────────────────── */
.main { padding: 32px 36px; display: flex; flex-direction: column; }
.main h2 { margin: 0 0 4px; font-size: 20px; font-weight: 600; }
.hint { margin: 0 0 14px; color: var(--ink-soft); font-size: 14px; }
.section { margin-bottom: 22px; }

.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tile { position: relative; display: block; cursor: pointer; }
.tile input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tile-body {
    display: block; position: relative;
    height: 100%; border: 1px solid var(--rule); border-radius: 12px; padding: 14px 14px 12px;
    transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.tile:hover .tile-body { border-color: #b9c3bd; }
.tile input:focus-visible + .tile-body { box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.25); }
.tile input:checked + .tile-body { border: 2px solid var(--green); padding: 13px 13px 11px; background: var(--green-tint); }
.tile-icon { display: block; color: var(--ink-soft); font-size: 22px; }
.tile input:checked + .tile-body .tile-icon { color: var(--green-deep); }
.tile-check { position: absolute; top: 10px; right: 10px; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--rule); background: #fff; display: flex; align-items: center; justify-content: center; }
.tile-check i { opacity: 0; color: #fff; font-size: 11px; }
.tile input:checked + .tile-body .tile-check { background: var(--green); border-color: var(--green); }
.tile input:checked + .tile-body .tile-check i { opacity: 1; }
.tile-name { display: block; margin-top: 6px; font-weight: 600; font-size: 15px; }
.tile-desc { display: block; font-size: 13px; color: var(--ink-soft); }
.tile-inc { display: block; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--rule); font-size: 12.5px; color: var(--ink-faint); }
.tile input:checked + .tile-body .tile-inc { color: var(--green-edge); border-top-color: rgba(17, 92, 58, 0.25); }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.field.full { grid-column: 1 / -1; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.field input, .field select {
    width: 100%; height: 42px; padding: 0 12px;
    font: inherit; color: var(--ink);
    background: #fff; border: 1px solid var(--rule); border-radius: var(--radius);
    transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder { color: #a3aba5; }
.field input:focus, .field select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.18); }
.field.invalid input, .field.invalid select { border-color: var(--danger); }
.field .err { display: none; margin-top: 4px; font-size: 13px; color: var(--danger); }
.field.invalid .err { display: block; }
.field .help { margin-top: 4px; font-size: 13px; color: var(--ink-faint); }
.err-group { display: none; margin-top: 8px; font-size: 13px; color: var(--danger); }
.err-group.show { display: block; }

.alert { margin-bottom: 18px; padding: 10px 14px; border-radius: var(--radius); background: var(--danger-bg); color: var(--danger); font-size: 14px; }
.alert:empty { display: none; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; height: 48px; padding: 0 20px;
    font: inherit; font-weight: 600; font-size: 16px;
    color: #fff; background: var(--green); border: 0; border-radius: var(--radius); cursor: pointer;
    text-decoration: none; transition: background-color .15s;
}
.btn:hover { background: var(--green-deep); color: #fff; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.35); }
.btn[aria-busy="true"] { opacity: .75; cursor: progress; }
.btn-link { display: inline-block; margin-top: 14px; font-size: 14px; }

.fineprint { margin: 12px 0 0; font-size: 12px; color: var(--ink-faint); text-align: center; }
.grecaptcha-badge { visibility: hidden; }

/* Result screens (email sent, confirmed, link expired) */
.result { text-align: center; padding: 20px 0; }
.result-icon { font-size: 26px; width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; background: var(--green-tint); color: var(--green-deep); display: flex; align-items: center; justify-content: center; }
.result-icon.warn { background: var(--danger-bg); color: var(--danger); }
.result h2 { margin-bottom: 8px; }
.result p { color: var(--ink-soft); margin: 0 auto 10px; max-width: 440px; }
.result .email { color: var(--ink); font-weight: 600; word-break: break-all; }
.summary { margin: 0 0 20px; padding: 14px 16px; border: 1px solid var(--rule); border-radius: 12px; }
.summary dt { font-size: 13px; color: var(--ink-faint); }
.summary dd { margin: 0 0 10px; font-weight: 600; word-break: break-word; }
.summary dd:last-child { margin-bottom: 0; }
.summary ul { margin: 2px 0 0; padding-left: 18px; font-weight: 600; }
.help-box { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--rule); font-size: 13.5px; color: var(--ink-soft); text-align: center; }

.foot { margin-top: auto; padding-top: 22px; font-size: 12px; color: var(--ink-faint); text-align: center; }

/* ── Phones ──────────────────────────────────────────────────── */
@media (max-width: 760px) {
    .page { padding: 0; align-items: stretch; }
    .frame { grid-template-columns: 1fr; border-radius: 0; border: 0; box-shadow: none; }
    .panel { padding: 20px 16px; gap: 14px; }
    .panel h1 { font-size: 22px; }
    .logo-plate img { width: 110px; }
    .benefits, .panel .lead { display: none; }
    .steps { flex-direction: row; justify-content: space-between; gap: 6px; padding-top: 14px; font-size: 12px; }
    .steps li { flex-direction: column; text-align: center; gap: 4px; flex: 1; }
    .main { padding: 22px 16px; }
    .tiles { grid-template-columns: 1fr; }
    .tile-check { top: 50%; transform: translateY(-50%); }
    .tile-body { padding-right: 44px; }
    .tile input:checked + .tile-body { padding-right: 43px; }
    .fields { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
