:root {
  color-scheme: light;
  --ink: #15213b;
  --muted: #52617b;
  --brand: #3457e9;
  --brand-dark: #2141c9;
  --canvas: #f5f7fc;
  --line: #dce4f0;
  --tint: #edf1ff;
  --green: #116544;
  --amber: #81510b;
  font: 16px/1.55 system-ui, -apple-system, sans-serif;
  background: var(--canvas);
  color: var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.18; letter-spacing: -.035em; overflow-wrap: anywhere; }
h1 { font-size: clamp(2.25rem, 5vw, 3.25rem); }
h2 { font-size: 1.25rem; }
h3 { margin: 1.4rem 0 .75rem; font-size: 1.05rem; }
a { color: var(--brand-dark); }
code { font-size: .93em; }
.frame { width: min(1200px, calc(100% - 3rem)); margin-inline: auto; }
.top { background: #fff; border-bottom: 1px solid var(--line); }
.top-inner { min-height: 72px; display: flex; justify-content: space-between; align-items: center; gap: .8rem; }
.brand { display: flex; align-items: center; gap: .65rem; font-weight: 780; font-size: 1.2rem; letter-spacing: -.035em; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
.user { color: var(--muted); font-size: .88rem; }
button, .button { min-height: 42px; padding: .55rem .9rem; border: 1px solid transparent; border-radius: 9px; font: inherit; font-size: .88rem; font-weight: 670; display: inline-flex; justify-content: center; align-items: center; text-decoration: none; cursor: pointer; white-space: nowrap; }
button:disabled { opacity: .48; cursor: not-allowed; }
:focus-visible { outline: 3px solid #6c8aff; outline-offset: 3px; }
.primary { background: var(--brand); color: white; }
.primary:hover:not(:disabled) { background: var(--brand-dark); }
.secondary { background: white; color: var(--ink); border-color: var(--line); }
.secondary:hover:not(:disabled), .quiet:hover { background: var(--tint); }
.quiet { color: var(--muted); background: transparent; }
.skip { position: absolute; top: .5rem; left: -100vw; background: white; padding: .8rem; z-index: 10; }
.skip:focus { left: .5rem; }
.page-heading { margin: 3rem 0 1.6rem; display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.page-heading p:last-child { margin-top: .45rem; }
.eyebrow { font-size: .72rem; color: var(--brand-dark); letter-spacing: .14em; font-weight: 750; margin-bottom: .55rem; }
.card { background: white; border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 4px 16px #15213b08; }
.empty { text-align: center; padding: 3.5rem 1.5rem; }
.empty p { color: var(--muted); max-width: 420px; margin: .7rem auto 1rem; }
.tile-icon { display: grid; place-items: center; width: 48px; height: 48px; background: var(--tint); color: var(--brand-dark); border-radius: 13px; font-size: 1.65rem; margin: 0 auto .65rem; }
.workspace { display: grid; grid-template-columns: minmax(170px, 245px) minmax(0, 1fr); align-items: start; gap: 1.1rem; }
.domain-nav { padding: .7rem; }
.domain-nav h2 { padding: .65rem .55rem; display: flex; justify-content: space-between; font-size: .94rem; }
.count { color: var(--muted); }
.domain-nav button { width: 100%; justify-content: flex-start; margin-top: .15rem; background: white; color: var(--ink); white-space: normal; overflow-wrap: anywhere; text-align: left; }
.domain-nav button[aria-current], .domain-nav button:hover { background: var(--tint); color: var(--brand-dark); }
.domain-heading, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.domain-heading, .section { padding: clamp(1rem, 3vw, 1.6rem); }
.domain-heading h2 { font-size: clamp(1.25rem, 4vw, 1.7rem); }
.badges { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .75rem; }
.badge { display: inline-block; color: var(--muted); background: #edf0f6; padding: .18rem .55rem; border-radius: 50px; font-size: .75rem; font-weight: 670; white-space: nowrap; }
.badge.ok { background: #e6f7ef; color: var(--green); }
.badge.pending { background: #fff3dc; color: var(--amber); }
.tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin: .8rem 0; }
.tabs button { background: transparent; color: var(--muted); }
.tabs button[aria-current], .tabs button:hover { background: var(--tint); color: var(--brand-dark); }
.section-heading p { margin-top: .4rem; color: var(--muted); }
.hint { background: #f1f5ff; color: #304165; border-radius: 9px; padding: .7rem .9rem; margin: 1.15rem 0; font-size: .87rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .81rem; }
th, td { padding: .62rem .6rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); background: #f8faff; white-space: nowrap; }
td code { display: block; overflow-wrap: anywhere; min-width: 110px; }
td small { color: var(--muted); }
td button { min-height: 29px; padding: .12rem .5rem; font-size: .74rem; margin-top: .35rem; }
.small { font-size: .83rem; }
.section > p.small, #static-site > p.small { margin-top: .9rem; }
.muted { color: var(--muted); }
.drop { background: #f8faff; border: 2px dashed #b8c8f1; border-radius: 12px; text-align: center; padding: 1.45rem 1rem; margin: 1rem 0; display: grid; gap: .35rem; justify-items: center; }
.drop.active { background: var(--tint); border-color: var(--brand); }
.drop .actions { margin-top: .55rem; justify-content: center; }
.publish-row, .file-list > div { display: flex; justify-content: space-between; gap: .75rem; align-items: center; }
.publish-row { flex-wrap: wrap; }
.file-list > div { border-bottom: 1px solid var(--line); padding: .45rem 0; overflow-wrap: anywhere; }
.file-list > div:first-child { border-top: 1px solid var(--line); }
.file-list > p { font-size: .9rem; }
#open-mail { margin-top: 1rem; }
progress { width: 100%; margin-top: .6rem; accent-color: var(--brand); }
.footer { color: var(--muted); padding: 2rem 0 1rem; display: flex; gap: .8rem; font-size: .8rem; }
.footer span { border-left: 1px solid var(--line); padding-left: .8rem; }
.login { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(1.25rem, 7vw, 6rem); align-items: center; max-width: 890px; margin: clamp(2rem, 10vh, 7rem) auto 1.5rem; }
.login-intro h1 { font-size: clamp(2.3rem, 6vw, 4.4rem); line-height: 1.02; }
.login-intro p:last-child { margin-top: 1rem; max-width: 32ch; color: var(--muted); }
.login-card { padding: 1.6rem; }
.login-card > p { margin: .55rem 0 1.1rem; }
form label { display: grid; gap: .35rem; font-size: .9rem; font-weight: 650; margin: .9rem 0; }
form .check { display: flex; gap: .5rem; align-items: center; }
input:not([type="checkbox"]), select, textarea { width: 100%; min-width: 0; min-height: 42px; padding: .62rem .7rem; font: inherit; border: 1px solid #b8c5d9; border-radius: 8px; background: white; color: var(--ink); }
textarea { font-family: ui-monospace, monospace; resize: vertical; }
dialog { border: 1px solid var(--line); border-radius: 15px; color: var(--ink); padding: 1.4rem; width: min(460px, calc(100% - 2rem)); box-shadow: 0 12px 48px #19234229; }
dialog.editor { width: min(820px, calc(100% - 2rem)); }
dialog::backdrop { background: #101d3a80; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .35rem; }
.dialog-heading .close { font-size: 1.3rem; background: transparent; color: var(--muted); }
.address { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.address input { flex: 1 1 130px; }
.address span { overflow-wrap: anywhere; }
.notice { position: fixed; inset: auto 1rem 1rem auto; z-index: 5; max-width: min(420px, calc(100% - 2rem)); background: var(--ink); color: white; border-radius: 10px; padding: .8rem 1rem; box-shadow: 0 8px 30px #0003; }
.notice.error, .startup-error { background: #8c2830; color: white; }
.startup-error { border-radius: 10px; margin-top: 2rem; padding: 1rem; }
form .form-error { color: #8c2830; font-size: .88rem; margin-top: .75rem; }
@media (max-width: 720px) {
  .frame { width: calc(100% - 1.5rem); }
  .workspace, .login { grid-template-columns: 1fr; }
  .page-heading, .section-heading { align-items: start; flex-direction: column; }
  .page-heading { margin-top: 1.5rem; }
  .login-intro h1 br { display: none; }
  .user { display: none; }
  .tabs button { font-size: .78rem; padding-inline: .48rem; }
}

.contact-tools { margin-top: 1.1rem; padding: 1rem; background: #f1f5ff; border-radius: 9px; display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; }
.contact-tools h3 { margin: 0 0 .35rem; }

#mailboxes > div { flex-wrap: wrap; padding: .8rem 0; }
.mailbox-usage { flex: 0 0 100%; display: grid; gap: .45rem; }
.mailbox-meter { width: 100%; height: .85rem; }
.mailbox-metrics { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; margin: 0; font-size: .82rem; }
.mailbox-metrics dt { color: var(--muted); }
.mailbox-metrics dd { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; }
.mailbox-usage-stale { color: var(--amber); }
.mailbox-info { display: grid; gap: .2rem; }
#quota-address { overflow-wrap: anywhere; }
