/* mailhub-mcp site. Airmail palette: navy ink on blue-grey paper, red and blue
   envelope stripes as the one decorative device. Three pages share this file:
   index.html (landing), security.html and install.html (detail pages). */

:root {
  --paper: #eef1f5;
  --sheet: #fbfcfd;
  --ink: #13203a;
  --muted: #4f5a70;
  --rule: #c9d0db;
  --red: #b3122c;
  --blue: #1c4a96;
  --link: #1c4a96;
  --code-bg: #e2e7ee;
  --ok: #1d6b3a;
  --warn: #8a5a00;
  --focus: #b3122c;
  --frame: #13203a;
  --frame-shadow: #c9d0db;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1729;
    --sheet: #16203a;
    --ink: #e4e9f2;
    --muted: #a6b0c4;
    --rule: #2c3a58;
    --red: #ff7a85;
    --blue: #8fb1ff;
    --link: #9dbcff;
    --code-bg: #0b1222;
    --ok: #6fd498;
    --warn: #f0c060;
    --focus: #ff9aa2;
    --frame: #4a5b80;
    --frame-shadow: #070c18;
    color-scheme: dark;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  font-variation-settings: "wdth" 100;
}

/* The airmail edge: a band of slanted red and blue bars. */
.airmail {
  height: 10px;
  background: repeating-linear-gradient(
    -45deg,
    var(--red) 0 14px,
    transparent 14px 22px,
    var(--blue) 22px 36px,
    transparent 36px 44px
  );
}

a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

code, pre, kbd { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 0.9em; }
code { background: var(--code-bg); padding: 0.08em 0.32em; border-radius: 3px; overflow-wrap: anywhere; }

.skip {
  position: absolute; left: 1rem; top: -3rem;
  background: var(--ink); color: var(--paper); padding: 0.5rem 0.9rem; z-index: 10;
}
.skip:focus { top: 1rem; }

.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 48rem) { .wrap { padding: 0 2rem; } }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Header */
.site-head { border-bottom: 1px solid var(--rule); }
.site-head .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.5rem 1.5rem; padding-top: 0.9rem; padding-bottom: 0.9rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-weight: 700; color: var(--ink); text-decoration: none; font-size: 1.05rem;
  font-variation-settings: "wdth" 115;
}
.brand svg { width: 28px; height: 28px; flex: none; }
.site-head nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.site-head nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; padding: 0.2rem 0; }
.site-head nav a:hover { color: var(--ink); text-decoration: underline; }
.site-head nav a[aria-current="page"] {
  color: var(--ink); font-weight: 600;
  box-shadow: inset 0 -3px 0 var(--red);
}

/* Shared type */
h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.3rem, 5vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  font-weight: 800;
  font-variation-settings: "wdth" 125;
  text-wrap: balance;
}
h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  line-height: 1.1;
  font-weight: 800;
  font-variation-settings: "wdth" 120;
  text-wrap: balance;
  max-width: 40rem;
}
/* A short airmail stripe marks the start of every section. */
.stripe::before {
  content: ""; display: block; width: 3.5rem; height: 6px; margin-bottom: 1.1rem;
  background: repeating-linear-gradient(-45deg, var(--red) 0 7px, transparent 7px 11px, var(--blue) 11px 18px, transparent 18px 22px);
}
h3 { font-size: 1.15rem; line-height: 1.3; margin: 0 0 0.4rem; font-variation-settings: "wdth" 110; }
.intro { max-width: 42rem; margin: 0 0 2rem; font-size: 1.1rem; }
.prose { max-width: 42rem; }
.prose p { margin: 0 0 1rem; }
.note { font-size: 0.95rem; color: var(--muted); max-width: 46rem; margin: 1.25rem 0 0; }

.btn {
  display: inline-block; padding: 0.7rem 1.15rem; border-radius: 4px; font-weight: 600;
  text-decoration: none; border: 2px solid var(--ink);
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--blue); border-color: var(--blue); color: var(--paper); }
.btn-ghost { color: var(--ink); }
.btn-ghost:hover { background: var(--sheet); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ---------- Landing page ---------- */

.hero { padding: 2.5rem 0 3rem; }
.hero .wrap { display: grid; gap: 2.5rem; }
@media (min-width: 62rem) {
  .hero .wrap { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; gap: 3.5rem; }
  .hero { padding: 3.5rem 0 4rem; }
}
.status {
  display: inline-block; margin: 0 0 1.25rem; font-size: 0.9rem; color: var(--muted);
  border: 1px solid var(--rule); border-radius: 999px; padding: 0.15rem 0.75rem;
}
.status strong { color: var(--red); font-weight: 600; }
.lede { font-size: 1.2rem; max-width: 36rem; margin: 0 0 1.75rem; color: var(--ink); }

/* The envelope: the hero's example report, framed by the airmail border. */
.envelope {
  margin: 0;
  padding: 10px;
  border-radius: 6px;
  background: repeating-linear-gradient(
    -45deg,
    var(--red) 0 14px,
    var(--sheet) 14px 22px,
    var(--blue) 22px 36px,
    var(--sheet) 36px 44px
  );
}
.envelope-inner { background: var(--sheet); border-radius: 2px; padding: 1.25rem 1.25rem 1rem; }
@media (min-width: 30rem) { .envelope-inner { padding: 1.5rem 1.6rem 1.25rem; } }
.ask {
  margin: 0 0 1rem; padding: 0.7rem 0.9rem; border-left: 3px solid var(--blue);
  background: var(--paper); font-size: 0.98rem;
}
.ask span { display: block; font-size: 0.8rem; color: var(--muted); }
.report .rh { font-size: 0.98rem; margin: 1rem 0 0.35rem; font-weight: 700; line-height: 1.3; font-variation-settings: "wdth" 112; }
.report .rh:first-child { margin-top: 0; }
.report ul { margin: 0; padding: 0; list-style: none; font-size: 0.93rem; }
.report li { padding: 0.3rem 0; border-top: 1px dashed var(--rule); display: grid; grid-template-columns: auto 1fr; gap: 0 0.6rem; }
.report li:first-child { border-top: 0; }
.alias {
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 0.78rem;
  color: var(--blue); padding-top: 0.15rem; white-space: nowrap;
}
.flag { color: var(--red); }
.report p { margin: 0; font-size: 0.93rem; }
.envelope figcaption { background: var(--sheet); margin-top: 0; padding: 0.25rem 1.25rem 0.75rem; font-size: 0.8rem; color: var(--muted); }
@media (min-width: 30rem) { .envelope figcaption { padding: 0.25rem 1.6rem 0.9rem; } }

/* Three pillars, styled like postage labels: ink border, a coloured top edge. */
.pillars-band { padding: 0 0 3.5rem; }
.pillars { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
@media (min-width: 56rem) { .pillars { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; } }
.pillars > li {
  display: flex; flex-direction: column;
  background: var(--sheet); border: 2px solid var(--ink); border-top-width: 6px;
  padding: 1.1rem 1.2rem 1.15rem;
}
.pillars > li:nth-child(1) { border-top-color: var(--blue); }
.pillars > li:nth-child(3) { border-top-color: var(--red); }
.pillars h2 { font-size: 1.3rem; line-height: 1.15; margin: 0 0 0.5rem; font-variation-settings: "wdth" 118; }
.pillars p { margin: 0 0 0.9rem; color: var(--muted); font-size: 0.98rem; }
.pillars .more { margin-top: auto; font-weight: 600; font-size: 0.95rem; }

/* Admin page showcase: one desktop shot with the phone shot over its corner. */
.showcase { padding: 3.5rem 0; border-top: 1px solid var(--rule); }
@media (min-width: 48rem) { .showcase { padding: 4.5rem 0; } }
.showcase .wrap { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 56rem) { .showcase .wrap { grid-template-columns: minmax(0, 40rem) minmax(0, 1fr); gap: 3rem; } }
.showcase .intro { margin-bottom: 1.25rem; }
.showcase .more { font-weight: 600; margin: 1.25rem 0 0; }

.compose { position: relative; margin: 0; min-width: 0; padding: 0 15% 12% 0; }
.compose picture { display: block; }
.compose img { display: block; width: 100%; height: auto; }
.compose .phone {
  position: absolute; right: 0; bottom: 0; width: 27%; max-width: none; margin: 0;
}
@media (max-width: 40rem) {
  .compose { padding-bottom: 20%; }
  .compose .phone { width: 33%; }
}
.compose figcaption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.checks { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.checks li { position: relative; padding: 0.7rem 0 0.7rem 1.6rem; border-bottom: 1px solid var(--rule); }
.checks li::before {
  content: ""; position: absolute; left: 0.1rem; top: 1.12rem; width: 0.75rem; height: 0.4rem;
  border-left: 2px solid var(--blue); border-bottom: 2px solid var(--blue); transform: rotate(-45deg);
}

/* Clients: one line between the showcase and the footer. */
.clients-line { border-top: 1px solid var(--rule); padding: 1.75rem 0; }
.clients-line p { margin: 0; max-width: 52rem; font-size: 1.05rem; }
.clients-line strong { font-variation-settings: "wdth" 112; }

/* ---------- Screenshot frames (shared) ---------- */

.shot { margin: 0; min-width: 0; }
.shot picture { display: block; }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { margin-top: 0.75rem; font-size: 0.9rem; color: var(--muted); }

/* A plain browser window drawn in CSS: a title bar holding the address.
   Every desktop screenshot is 1040x780 and sits in this frame at one width (34rem). */
.browser {
  width: 100%; max-width: 34rem;
  border: 2px solid var(--frame); border-radius: 8px; overflow: hidden; background: var(--sheet);
  box-shadow: 6px 6px 0 var(--frame-shadow);
}
.browser-bar {
  display: flex; align-items: center; gap: 0.6rem; padding: 0.45rem 0.6rem;
  border-bottom: 2px solid var(--frame); background: var(--paper);
}
.browser-bar::before {
  content: ""; flex: none; width: 2.5rem; height: 0.6rem; opacity: 0.55;
  background: radial-gradient(circle, var(--muted) 0 0.2rem, transparent 0.23rem) 0 50% / 0.85rem 0.6rem repeat-x;
}
.url {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 0.78rem; color: var(--muted);
  background: var(--sheet); border: 1px solid var(--rule); border-radius: 999px; padding: 0.1rem 0.75rem;
}
@media (max-width: 30rem) {
  .browser-bar { padding: 0.3rem 0.45rem; }
  .url { font-size: 0.68rem; padding: 0 0.5rem; }
}

/* A phone drawn in CSS: a thick rounded bezel. Only used over a browser frame. */
.phone {
  padding: 6px; border-radius: 22px; background: var(--frame);
  box-shadow: 6px 6px 0 var(--frame-shadow);
}
.phone picture { border-radius: 16px; overflow: hidden; }
@media (min-width: 40rem) {
  .phone { padding: 8px; border-radius: 28px; }
  .phone picture { border-radius: 20px; }
}

/* ---------- Footer with the call to action (shared) ---------- */

.site-foot { border-top: 1px solid var(--rule); background: var(--sheet); }
.cta { padding: 3rem 0 2.5rem; }
.cta .wrap { display: grid; gap: 1.25rem 3rem; align-items: center; }
@media (min-width: 56rem) { .cta .wrap { grid-template-columns: minmax(0, 1fr) auto; } }
.cta h2 { margin-bottom: 0.4rem; }
.cta p { margin: 0; color: var(--muted); max-width: 40rem; }
.foot-meta { border-top: 1px solid var(--rule); padding: 1.5rem 0 2rem; font-size: 0.93rem; color: var(--muted); }
.foot-meta .wrap { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; justify-content: space-between; }
.foot-meta p { margin: 0; }
.foot-meta ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.foot-meta .indep { flex-basis: 100%; }

/* ---------- Detail pages: header, side table of contents, sections ---------- */

.page-head { padding: 2.5rem 0 2rem; border-bottom: 1px solid var(--rule); }
@media (min-width: 48rem) { .page-head { padding: 3.5rem 0 2.5rem; } }
.page-head h1 { font-size: clamp(2.1rem, 4.5vw, 3.1rem); max-width: 50rem; }
.page-head .intro { margin-bottom: 0; }

.doc { display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 62rem) {
  .doc { grid-template-columns: 13rem minmax(0, 1fr); gap: 3.5rem; align-items: start; }
}
.toc { display: none; }
@media (min-width: 62rem) {
  .toc { display: block; position: sticky; top: 1.5rem; padding: 2.5rem 0 1rem; font-size: 0.93rem; }
  .toc h2 { font-size: 0.95rem; font-weight: 700; margin: 0 0 0.6rem; color: var(--muted); font-variation-settings: "wdth" 110; }
  .toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--rule); }
  .toc li a { display: block; padding: 0.3rem 0 0.3rem 0.9rem; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; }
  .toc li a:hover { color: var(--ink); border-left-color: var(--blue); }
  .toc .sub a { padding-left: 1.7rem; font-size: 0.88rem; }
}

.doc-body > section { padding: 2.75rem 0; border-top: 1px solid var(--rule); scroll-margin-top: 1rem; }
.doc-body > section:first-child { border-top: 0; }
@media (min-width: 48rem) { .doc-body > section { padding: 3.25rem 0; } }
.doc-body h3 { scroll-margin-top: 1rem; }

.split { display: grid; gap: 2rem; }
@media (min-width: 70rem) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; align-items: start; } }

/* Mailbox list */
.boxes { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.boxes li {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem;
  padding: 0.85rem 0; border-bottom: 1px solid var(--rule);
}
.boxes code { background: none; padding: 0; font-weight: 500; color: var(--blue); }
.boxes span { color: var(--muted); font-size: 0.95rem; }

/* Path diagram: where your mail goes */
.path { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 0; }
.path li { position: relative; padding: 0.85rem 1rem; background: var(--sheet); border: 1px solid var(--rule); }
.path li + li { margin-top: 1.75rem; }
.path li + li::before {
  content: ""; position: absolute; left: 1.6rem; top: calc(-1.75rem - 1px); height: 1.75rem; width: 0;
  border-left: 2px dashed var(--muted);
}
.path li.yours { border: 2px solid var(--blue); }
.path strong { display: block; }
.path span { color: var(--muted); font-size: 0.93rem; }
.path .via { position: absolute; left: 2.3rem; top: -1.45rem; font-size: 0.8rem; color: var(--muted); }

.facts { margin: 0; display: grid; gap: 1rem; }
.facts div { border-left: 3px solid var(--rule); padding-left: 0.9rem; }
.facts dt { font-weight: 700; }
.facts dd { margin: 0.15rem 0 0; color: var(--muted); }

/* Client table */
.table-wrap { overflow-x: auto; border: 1px solid var(--rule); background: var(--sheet); border-radius: 4px; }
table { border-collapse: collapse; width: 100%; font-size: 0.97rem; }
th, td { text-align: left; vertical-align: top; padding: 0.85rem 1rem; border-bottom: 1px solid var(--rule); }
tr:last-child > * { border-bottom: 0; }
thead th { font-size: 0.9rem; color: var(--muted); font-weight: 600; background: var(--paper); }
tbody th { font-weight: 600; min-width: 9rem; }
.tag { display: inline-block; font-size: 0.85rem; font-weight: 600; white-space: nowrap; }
.tag-ok { color: var(--ok); }
.tag-untested { color: var(--warn); }
@media (max-width: 40rem) {
  .table-wrap { overflow: visible; }
  .clients thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .clients, .clients tbody, .clients tr, .clients th, .clients td { display: block; }
  .clients tr { padding: 0.9rem 1rem; border-bottom: 1px solid var(--rule); }
  .clients tr:last-child { border-bottom: 0; }
  .clients th, .clients td { padding: 0; border: 0; min-width: 0; }
  .clients td { margin-top: 0.3rem; }
}

.req, .needs { margin: 0 0 2rem; padding: 1rem 1.25rem; border: 2px solid var(--ink); max-width: 46rem; background: var(--sheet); }
.req p { margin: 0 0 0.5rem; }
.req ul, .needs ul { margin: 0; padding-left: 1.2rem; }
.needs li { margin-bottom: 0.25rem; }
.needs { margin-bottom: 0; }
.needs p { margin: 0.75rem 0 0; font-size: 0.95rem; color: var(--muted); }

/* Safety: three headline guarantees, then the other guards */
.guarantees { margin: 0; display: grid; gap: 1rem; }
@media (min-width: 70rem) { .guarantees { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; } }
.guarantees div { background: var(--sheet); border: 2px solid var(--ink); border-top-width: 6px; padding: 1.1rem 1.2rem 1.25rem; }
.guarantees div:nth-child(1) { border-top-color: var(--red); }
.guarantees div:nth-child(3) { border-top-color: var(--blue); }
.guarantees dt { font-size: 1.25rem; line-height: 1.15; font-weight: 800; font-variation-settings: "wdth" 118; }
.guarantees dd { margin: 0.55rem 0 0; color: var(--muted); font-size: 0.98rem; }
.guarantees dd code { color: var(--ink); }

.guards { display: grid; gap: 0; border-top: 2px solid var(--ink); margin: 0; }
@media (min-width: 48rem) { .guards { grid-template-columns: 1fr 1fr; column-gap: 3rem; } }
.guards div { padding: 1.1rem 0; border-bottom: 1px solid var(--rule); }
.guards dt { font-weight: 700; font-size: 1.05rem; font-variation-settings: "wdth" 110; }
.guards dd { margin: 0.3rem 0 0; color: var(--muted); font-size: 0.97rem; }
.guards dd code { color: var(--ink); }

.trifecta { padding: 1.5rem 1.25rem; background: var(--sheet); border-left: 6px solid var(--red); max-width: 52rem; }
@media (min-width: 48rem) { .trifecta { padding: 1.75rem 2rem; } }
.trifecta ol { padding-left: 1.3rem; margin: 0.5rem 0 1rem; }
.trifecta p { margin-top: 0; }
.trifecta p:last-child { margin-bottom: 0; }
@media (min-width: 56rem) {
  .trifecta { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: 2.5rem; }
  .trifecta ol { margin-bottom: 0; }
}

.limits { margin: 0; padding: 0; list-style: none; max-width: 46rem; border-top: 2px solid var(--ink); }
.limits li { padding: 0.9rem 0; border-bottom: 1px solid var(--rule); }

/* Use cases */
.cases { display: grid; gap: 1.5rem 3rem; margin: 0; padding: 0; list-style: none; }
@media (min-width: 48rem) { .cases { grid-template-columns: 1fr 1fr; } }
.cases li { padding-top: 1rem; border-top: 2px solid var(--blue); }
.cases p { margin: 0 0 0.5rem; }
.cases .uses { font-size: 0.9rem; color: var(--muted); }

/* Install steps */
.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; max-width: 46rem; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 1.75rem 3rem; scroll-margin-top: 1rem; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: -0.1rem;
  width: 2rem; height: 2rem; border-radius: 50%; border: 2px solid var(--ink);
  display: grid; place-items: center; font-weight: 700; font-size: 0.95rem;
}
.steps > li:not(:last-child)::after {
  content: ""; position: absolute; left: calc(1rem - 1px); top: 2.1rem; bottom: 0.2rem; border-left: 2px solid var(--rule);
}
.steps h3 { margin-bottom: 0.25rem; }
.steps p { margin: 0 0 0.5rem; }
.steps .shot { margin: 1.25rem 0 1.5rem; }
.steps .checks { margin-top: 0.5rem; }
.steps h4 { margin: 1rem 0 0; font-size: 1rem; }
@media (max-width: 30rem) { .steps > li { padding-left: 2.6rem; } }

.code {
  position: relative; margin: 0.5rem 0 0.75rem; background: var(--code-bg);
  border-radius: 4px; border: 1px solid var(--rule);
}
.code pre { margin: 0; padding: 0.9rem 1rem; overflow-x: auto; line-height: 1.5; font-size: 0.88rem; }
.code pre code { background: none; padding: 0; overflow-wrap: normal; }
.copy {
  position: absolute; top: 0.4rem; right: 0.4rem; font: inherit; font-size: 0.8rem;
  padding: 0.2rem 0.6rem; border-radius: 3px; border: 1px solid var(--rule);
  background: var(--sheet); color: var(--ink); cursor: pointer;
}
.copy:hover { border-color: var(--ink); }
.code.has-copy pre { padding-right: 4.5rem; }
/* On a phone the button gets its own row so it never covers a long line. */
@media (max-width: 30rem) { .code.has-copy pre { padding: 2.3rem 1rem 0.9rem; } }

/* Contribute */
.contrib { display: grid; gap: 2rem; }
@media (min-width: 56rem) { .contrib { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.25rem 3rem; } }
.contrib p { margin: 0 0 0.6rem; }
.steps .note { margin-top: 0.75rem; }
