/* DigitMailer portal — brand: red / black / white.
   Modern-professional: Swiss precision, white ground, near-black ink, one
   decisive red. Schibsted Grotesk for display, Instrument Sans for UI,
   JetBrains Mono for technical artefacts (keys, DNS records). */

:root {
  --white: #ffffff;
  --bg: #ffffff;
  --surface: #f7f7f7;
  --surface-2: #efefef;
  --ink: #0d0d0f;
  --ink-soft: #4a4a52;
  --ink-faint: #8e8e96;
  --red: #e01722;
  --red-deep: #b31018;
  --red-tint: #fdeced;
  --line: #e4e4e7;
  --line-strong: #0d0d0f;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", monospace;
  --display: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --body: "Instrument Sans", "Segoe UI", sans-serif;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(13,13,15,.05), 0 8px 24px rgba(13,13,15,.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--red); }

::selection { background: var(--red); color: var(--white); }

/* Brand rule under the nav — a single confident red line */
.stripe {
  height: 3px;
  background: linear-gradient(90deg, var(--red) 0 240px, var(--ink) 240px 100%);
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 28px; }

/* ---------- Nav ---------- */
nav.top {
  display: flex; align-items: center; gap: 28px;
  padding: 20px 0;
}
nav.top .brand {
  font-family: var(--display);
  font-weight: 800; font-size: 1.3rem; letter-spacing: -.03em;
  color: var(--ink);
}
nav.top .brand:hover { color: var(--ink); }
nav.top .brand .tld { color: var(--red); }
nav.top .links { display: flex; gap: 26px; margin-left: auto; align-items: center; }
nav.top .links a {
  color: var(--ink-soft); font-size: .93rem; font-weight: 500;
  letter-spacing: .01em;
}
nav.top .links a:hover { color: var(--ink); }
nav.top .links a.btn, nav.top .links a.btn:hover { color: var(--white); }

.btn {
  display: inline-block;
  font-family: var(--display); font-weight: 700; font-size: .93rem;
  letter-spacing: .01em;
  padding: 11px 24px;
  background: var(--ink); color: var(--white);
  border: 1px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.btn:hover { background: #26262b; border-color: #26262b; color: var(--white); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.red { background: var(--red); border-color: var(--red); }
.btn.red:hover { background: var(--red-deep); border-color: var(--red-deep); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink); background: transparent; color: var(--ink); }
.btn.small { padding: 7px 16px; font-size: .84rem; }

/* ---------- Landing hero ---------- */
.hero { padding: 96px 0 84px; position: relative; }
.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.8rem, 6.4vw, 5rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.045em;
  max-width: 16ch;
}
.hero h1 em {
  font-style: normal; color: var(--red); position: relative; white-space: nowrap;
}
.hero h1 em::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .04em;
  height: .08em; background: var(--red); opacity: .25;
}
.hero .sub {
  margin-top: 28px; max-width: 54ch;
  font-size: 1.16rem; color: var(--ink-soft);
}
.hero .cta { margin-top: 40px; display: flex; gap: 20px; align-items: center; }
.hero .cta a:not(.btn) { font-weight: 600; color: var(--ink); border-bottom: 2px solid var(--red); padding-bottom: 2px; }
.hero .cta a:not(.btn):hover { color: var(--red); }
/* decorative mark, restyled from the old postmark: a precise red target ring */
.hero .postmark {
  position: absolute; right: 24px; top: 90px;
  width: 190px; height: 190px;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: .68rem; font-weight: 600;
  text-transform: uppercase; line-height: 2.1;
  letter-spacing: .3em; text-indent: .3em; color: var(--ink-soft);
  text-align: center;
  pointer-events: none;
}
.hero .postmark::before {
  content: ""; position: absolute; inset: 22px;
  border: 1.5px solid var(--red); border-radius: 50%;
}
@media (max-width: 960px) { .hero .postmark { display: none; } }

/* ---------- Sections ---------- */
section.band { padding: 84px 0; }
section.band.deep { background: var(--ink); color: var(--white); }
section.band.deep h2.sect { color: var(--white); }
section.band.deep p.sect-sub { color: #b9b9c2; }
h2.sect {
  font-family: var(--display); font-weight: 800;
  font-size: 2.2rem; letter-spacing: -.035em; margin-bottom: 10px;
}
h2.sect::before {
  content: ""; display: block; width: 44px; height: 4px;
  background: var(--red); margin-bottom: 22px; border-radius: 2px;
}
p.sect-sub { color: var(--ink-soft); max-width: 62ch; margin-bottom: 44px; font-size: 1.05rem; }

.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 820px) { .grid3 { grid-template-columns: 1fr; } }

.stampcard {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  position: relative;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.stampcard:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #d4d4d9; }
section.band.deep .stampcard { background: #17171b; border-color: #2b2b31; }
section.band.deep .stampcard h3 { color: var(--white); }
section.band.deep .stampcard p { color: #a8a8b2; }
.stampcard::before { content: none; }
.stampcard h3 {
  font-family: var(--display); font-weight: 700; font-size: 1.18rem;
  letter-spacing: -.02em; margin-bottom: 10px;
}
.stampcard p { color: var(--ink-soft); font-size: .97rem; }
.stampcard .no {
  font-family: var(--mono); color: var(--red); font-size: .72rem;
  letter-spacing: .22em; display: block; margin-bottom: 16px; font-weight: 600;
}

/* ---------- Pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 820px) { .plans { grid-template-columns: 1fr; } }
.plan {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px 30px; display: flex; flex-direction: column; gap: 6px;
  color: var(--ink); /* cards stay ink-on-white even inside the black band */
  transition: transform .18s ease, box-shadow .18s ease;
}
.plan:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.plan.featured { border: 2px solid var(--ink); box-shadow: var(--shadow); position: relative; }
.plan.featured::before {
  content: "MOST POPULAR";
  position: absolute; top: -11px; left: 28px;
  font-family: var(--mono); font-size: .62rem; font-weight: 600; letter-spacing: .2em;
  background: var(--red); color: var(--white);
  padding: 4px 12px; border-radius: 999px;
}
.plan .name { font-family: var(--display); font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; }
.plan .price { font-family: var(--display); font-size: 2.6rem; font-weight: 800; letter-spacing: -.04em; margin-top: 2px; }
.plan .price small { font-size: .95rem; color: var(--ink-faint); font-family: var(--body); font-weight: 500; }
.plan .vol { font-family: var(--mono); font-size: .8rem; color: var(--red); font-weight: 600; }
.plan ul { list-style: none; margin: 18px 0 24px; }
.plan li { padding: 8px 0; border-top: 1px solid var(--line); font-size: .93rem; color: var(--ink-soft); }
.plan li::before { content: "— "; color: var(--red); font-weight: 700; }
.plan .btn { margin-top: auto; text-align: center; }

/* ---------- Footer ---------- */
footer { padding: 44px 0 64px; color: var(--ink-faint); font-size: .88rem; border-top: 1px solid var(--line); margin-top: 40px; }
footer .wrap { display: flex; gap: 26px; flex-wrap: wrap; align-items: center; }
footer a { color: var(--ink-soft); }

/* ---------- Forms / auth cards ---------- */
.authcard {
  max-width: 440px; margin: 72px auto;
  background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  padding: 40px 38px;
  box-shadow: var(--shadow);
}
.authcard h1 {
  font-family: var(--display); font-size: 1.6rem; font-weight: 800;
  margin-bottom: 24px; letter-spacing: -.03em;
}
label { display: block; font-size: .82rem; font-weight: 600; color: var(--ink-soft); margin: 16px 0 6px; letter-spacing: .01em; }
input[type=text], input[type=email], input[type=password], select {
  width: 100%; padding: 11px 14px;
  font-family: var(--body); font-size: .97rem;
  background: var(--white); color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px;
  transition: border-color .12s ease, box-shadow .12s ease;
}
input:focus, select:focus {
  outline: none; border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(13,13,15,.08);
}
.check { display: flex; gap: 10px; align-items: flex-start; margin: 20px 0; font-size: .89rem; color: var(--ink-soft); }
.check input { margin-top: 3px; accent-color: var(--red); }
.check a { color: var(--red); font-weight: 600; }
.formfoot { margin-top: 24px; }
.error {
  background: var(--red-tint); border: 1px solid var(--red); color: var(--red-deep);
  border-radius: 8px; padding: 11px 14px; font-size: .91rem; margin-bottom: 16px;
}
.notice {
  background: var(--surface); border: 1px solid var(--ink); color: var(--ink);
  border-radius: 8px; padding: 11px 14px; font-size: .91rem; margin-bottom: 16px;
}

/* ---------- Dashboard ---------- */
.dash { padding: 34px 0 90px; }
.dash h1 { font-family: var(--display); font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; }
.dash .crumb {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--ink-faint); margin-bottom: 8px; font-weight: 500;
}
.dash .crumb a { color: var(--ink-faint); }
.dash .crumb a:hover { color: var(--red); }

.statrow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 30px 0 8px; }
@media (max-width: 820px) { .statrow { grid-template-columns: repeat(2, 1fr); } }
.stat {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px;
}
.stat .k {
  font-family: var(--mono); font-size: .66rem; text-transform: uppercase;
  letter-spacing: .18em; color: var(--ink-faint); font-weight: 500;
}
.stat .v { font-family: var(--display); font-size: 2rem; font-weight: 800; letter-spacing: -.03em; margin-top: 6px; }
.stat .v.red { color: var(--red); }
.stat .v.teal { color: var(--ink); }

.panel {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; margin: 26px 0;
}
.panel h2 {
  font-family: var(--display); font-size: 1.15rem; font-weight: 700; letter-spacing: -.02em;
  margin-bottom: 18px;
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
}
.panel h2::before {
  content: ""; width: 8px; height: 8px; background: var(--red);
  border-radius: 2px; align-self: center;
}
.panel h2 .hint { font-family: var(--body); font-weight: 400; font-size: .84rem; color: var(--ink-faint); }

table.ledger { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.ledger th {
  text-align: left; font-family: var(--mono); font-size: .64rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .16em; color: var(--ink-faint);
  padding: 8px 10px; border-bottom: 2px solid var(--ink);
}
table.ledger td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.ledger tr:last-child td { border-bottom: none; }
table.ledger tr:hover td { background: var(--surface); }
.mono { font-family: var(--mono); font-size: .84rem; }

.badge {
  display: inline-block; font-family: var(--mono); font-size: .64rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .12em;
  padding: 4px 10px; border-radius: 999px; border: 1px solid;
}
.badge.active, .badge.accepted, .badge.verified { color: var(--white); border-color: var(--ink); background: var(--ink); }
.badge.pending_dns, .badge.queued, .badge.sending { color: var(--ink-soft); border-color: var(--ink-faint); background: var(--surface); }
.badge.suspended, .badge.failed, .badge.revoked, .badge.closed { color: var(--white); border-color: var(--red); background: var(--red); }

.meter { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin-top: 14px; }
.meter i { display: block; height: 100%; background: var(--red); border-radius: 999px; }

/* DNS record blocks in the wizard */
.dnsrec {
  border: 1px solid var(--line); border-radius: var(--radius); margin: 16px 0;
  background: var(--white); overflow: hidden;
}
.dnsrec .head {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 16px; border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.dnsrec .head .tag {
  font-family: var(--mono); font-weight: 700; font-size: .78rem; letter-spacing: .14em;
}
.dnsrec .body { padding: 16px; }
.dnsrec .row { display: grid; grid-template-columns: 84px 1fr auto; gap: 10px; align-items: start; margin-bottom: 10px; }
.dnsrec .lbl {
  font-family: var(--mono); font-size: .64rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .16em; color: var(--ink-faint); padding-top: 6px;
}
.dnsrec code {
  font-family: var(--mono); font-size: .8rem;
  word-break: break-all; display: block;
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  padding: 8px 10px; color: var(--ink);
}
.dnsrec .note { font-size: .86rem; color: var(--ink-soft); margin-top: 10px; }
.copybtn {
  font-family: var(--mono); font-size: .7rem; font-weight: 600; cursor: pointer;
  border: 1px solid var(--line); background: var(--white); border-radius: 6px;
  padding: 6px 12px; color: var(--ink-soft);
  transition: border-color .12s ease, color .12s ease;
}
.copybtn:hover { border-color: var(--red); color: var(--red); }

.checkline { display: flex; gap: 12px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .94rem; }
.checkline:last-of-type { border-bottom: none; }
.checkline .ok { color: var(--ink); font-weight: 700; }
.checkline .warn { color: var(--ink-faint); font-weight: 700; }
.checkline .bad { color: var(--red); font-weight: 700; }

.keytoken {
  font-family: var(--mono); font-size: .88rem; background: var(--ink); color: var(--white);
  padding: 14px 18px; border-radius: 8px; word-break: break-all;
  margin: 12px 0; border-left: 4px solid var(--red);
}

.inline-form { display: inline; }
.formrow { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.formrow > div { flex: 1; min-width: 180px; }
.formrow .btn { margin-bottom: 1px; }

/* prose (AUP) */
.prose { max-width: 720px; margin: 48px auto 90px; }
.prose h1 { font-family: var(--display); font-size: 2.2rem; font-weight: 800; letter-spacing: -.035em; margin-bottom: 6px; }
.prose .vers { font-family: var(--mono); font-size: .76rem; color: var(--ink-faint); margin-bottom: 34px; letter-spacing: .1em; }
.prose h2 {
  font-family: var(--display); font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em;
  margin: 30px 0 10px;
}
.prose p, .prose li { color: var(--ink-soft); margin-bottom: 10px; }
.prose ul { padding-left: 22px; }
.prose li::marker { color: var(--red); }
