/* Slevin Mail: sign-up/sign-in window and webmail. Brand language of the landing (brands/parent16/brand.css):
   post-blue for us and our actions, yellow only for "protected", system grotesque, capsule buttons, white cards. */
:root {
  --brand: #0f3a90; --brand-ink: #1c50b5; --accent: #f4e736; --on-accent: #0d1a32;
  --ink: #141a26; --ink-2: #4a5263; --ink-3: #6b7383; --bg: #fbfdfe; --bg-2: #eff4fc; --tint: #e3f2ff;
  --line: #dce2e9; --danger: #a4273f; --danger-bg: #fbecef; --card: #fff;
  --radius: 22px; --shadow: 0 1px 2px rgb(15 58 144 / .06), 0 12px 32px rgb(15 58 144 / .08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 16px/1.5 var(--font); color: var(--ink); background: var(--bg-2); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button, input { font: inherit; color: inherit; }
a { color: var(--brand-ink); }
:focus-visible { outline: 3px solid color-mix(in oklab, var(--brand-ink) 55%, transparent); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 9px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px;
  border: 0; border-radius: 999px; font-weight: 650; cursor: pointer; text-decoration: none; transition: background .15s, box-shadow .15s; }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: #0b2f78; }
.btn--line { background: #fff; color: var(--brand); box-shadow: inset 0 0 0 1.5px var(--brand); }
.btn--quiet { background: transparent; color: var(--ink-2); min-height: 40px; padding: 0 14px; }
.btn--quiet:hover { background: var(--bg-2); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: default; }

/* --- Sign-up / sign-in window (account origin, popup) --- */
.auth { min-height: 100vh; display: grid; place-items: start center; padding: 28px 16px 40px; }
.auth__card { width: 100%; max-width: 440px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 28px 24px; }
.auth__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.auth h1 { font-size: 28px; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 6px; }
.auth__lead { color: var(--ink-2); margin: 0 0 20px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--bg-2); border-radius: 999px; margin-bottom: 22px; }
.tabs button { min-height: 40px; border: 0; border-radius: 999px; background: transparent; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgb(15 58 144 / .12); }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { font-weight: 600; font-size: 15px; }
.input { width: 100%; min-height: 50px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; }
.input:focus { border-color: var(--brand-ink); outline: none; box-shadow: 0 0 0 3px rgb(28 80 181 / .15); }
.addr { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; }
.addr:focus-within { border-color: var(--brand-ink); box-shadow: 0 0 0 3px rgb(28 80 181 / .15); }
.addr .input { border: 0; box-shadow: none; min-width: 0; }
.addr__domain { padding: 0 16px 0 4px; color: var(--ink-2); font-family: var(--mono); font-size: 15px; white-space: nowrap; }
.hint { color: var(--ink-3); font-size: 13.5px; margin: -6px 0 14px; }
.error { background: var(--danger-bg); color: var(--danger); border-radius: 14px; padding: 12px 14px; margin: 0 0 14px; font-size: 15px; }
.site-note { display: flex; gap: 10px; align-items: flex-start; background: var(--bg-2); border-radius: 14px; padding: 12px 14px; margin: 4px 0 18px; font-size: 14px; color: var(--ink-2); }
.site-note b { color: var(--ink); font-family: var(--mono); font-weight: 600; }
.lock { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-size: 12px; }
.progress { display: grid; gap: 12px; margin: 8px 0 4px; padding: 0; list-style: none; }
.progress li { display: flex; gap: 10px; align-items: center; color: var(--ink-3); }
.progress li::before { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.progress li[data-state="active"] { color: var(--ink); font-weight: 600; }
.progress li[data-state="active"]::before { border-color: var(--brand-ink); border-right-color: transparent; animation: spin .8s linear infinite; }
.progress li[data-state="done"] { color: var(--ink-2); }
.progress li[data-state="done"]::before { background: var(--accent); border-color: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .progress li[data-state="active"]::before { animation: none; } }
.kit { border: 1.5px dashed var(--brand-ink); border-radius: 16px; padding: 16px; margin: 4px 0 16px; background: #f7faff; }
.kit__name { font-family: var(--mono); font-size: 14px; margin: 0 0 4px; word-break: break-all; }
.kit__note { color: var(--ink-2); font-size: 14px; margin: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 16px; font-size: 15px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
.stack { display: grid; gap: 10px; }
.foot { margin-top: 18px; text-align: center; color: var(--ink-3); font-size: 13px; }

/* --- Webmail (mail origin) --- */
.app { min-height: 100vh; display: grid; grid-template-rows: auto 1fr; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; background: #fff; border-bottom: 1px solid var(--line); }
.bar__right { display: flex; align-items: center; gap: 6px; }
.gate { display: grid; place-items: center; padding: 40px 16px; }
.gate__card { max-width: 460px; width: 100%; text-align: center; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 36px 28px; }
.gate__card h1 { font-size: 30px; letter-spacing: -.02em; line-height: 1.15; margin: 0 0 10px; }
.gate__card p { color: var(--ink-2); margin: 0 0 22px; }
.gate__mascot { width: 120px; height: 120px; margin: -8px auto 6px; display: block; }
.mail { display: grid; grid-template-columns: 220px minmax(280px, 380px) 1fr; min-height: 0; }
.nav { padding: 16px 12px; display: grid; align-content: start; gap: 4px; }
.nav button { display: flex; justify-content: space-between; align-items: center; min-height: 42px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; cursor: pointer; font-weight: 600; color: var(--ink-2); text-align: left; }
.nav button[aria-current="true"] { background: var(--tint); color: var(--brand); }
.nav__count { font-size: 13px; color: var(--brand); }
.list { background: #fff; border-left: 1px solid var(--line); border-right: 1px solid var(--line); overflow: auto; }
.list__empty { padding: 48px 24px; text-align: center; color: var(--ink-3); }
.row { display: grid; gap: 2px; width: 100%; padding: 14px 18px; border: 0; border-bottom: 1px solid var(--line); background: #fff; text-align: left; cursor: pointer; }
.row:hover { background: var(--bg); }
.row[aria-current="true"] { background: var(--tint); }
.row__top { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--ink-2); }
.row__from { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row__subject { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.row--unread .row__from, .row--unread .row__subject { font-weight: 700; color: var(--ink); }
.row--unread .row__top::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-ink); align-self: center; margin-right: -2px; }
.more { margin: 12px auto; display: flex; }
.reader { overflow: auto; padding: 24px 28px; background: var(--bg); }
.reader__empty { color: var(--ink-3); padding-top: 40px; text-align: center; }
.reader h2 { font-size: 22px; line-height: 1.25; margin: 0 0 10px; letter-spacing: -.01em; }
.reader__meta { color: var(--ink-2); font-size: 14px; margin-bottom: 6px; }
.reader__warn { color: var(--ink-3); font-size: 13px; margin-bottom: 14px; }
.reader__actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.reader__body { background: #fff; border-radius: 16px; box-shadow: var(--shadow); padding: 4px; min-height: 240px; }
.reader__body iframe { width: 100%; min-height: 60vh; border: 0; border-radius: 12px; background: #fff; }
.reader__text { white-space: pre-wrap; word-break: break-word; padding: 16px; margin: 0; font: 15px/1.6 var(--font); }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; max-width: calc(100vw - 32px); font-size: 15px; }
.address { font-family: var(--mono); font-size: 14px; color: var(--ink-2); }
@media (max-width: 900px) {
  .mail { grid-template-columns: 1fr; }
  .nav { grid-auto-flow: column; overflow-x: auto; padding: 10px 12px; }
  .list, .reader { border: 0; }
  .mail[data-view="reader"] .list, .mail[data-view="list"] .reader { display: none; }
}
