/* botmail: the "post office" look shared by public and owner pages. Mobile first,
   system fonts only. Palette, header, footer, buttons and form cards live here;
   page-specific rules stay in src/site/assets/site.css. Scoped under `.site`, the
   class both the public and the dashboard layouts put on <body>. */

.site {
  --cream: #f3ead8;
  --paper: #fbf6ea;
  --navy: #1d2b4a;
  --red: #c0392b;
  --red-d: #8e2a1f;
  --blue: #2b4c9b;
  --green: #2e7d4f;
  --mustard: #d6a249;
  --sand: #d9c9a8;
  --serif:
    "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Charter, "Bitstream Charter",
    Georgia, serif;
  --stripes: repeating-linear-gradient(
    -45deg,
    var(--red) 0 16px,
    var(--paper) 16px 26px,
    var(--blue) 26px 42px,
    var(--paper) 42px 52px
  );
  /* the shared stylesheet's names, so forms and notices follow along */
  --ink: var(--navy);
  --muted: #5d6478;
  --line: var(--sand);
  --bg: var(--cream);
  --soft: var(--paper);
  --accent: var(--red);
  --accent-ink: #fff;
  --radius: 6px;
  background: var(--cream);
  color: var(--ink);
  font-size: 17px;
}
.site h1,
.site h2,
.site h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.site h1 {
  font-size: clamp(34px, 5.2vw, 60px);
  line-height: 1.06;
  margin: 0 0 20px;
}
.site h2 {
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.1;
  margin: 0 0 14px;
}
.site .wrap {
  max-width: 1140px;
  padding-inline: 24px;
}
.site a {
  color: var(--navy);
}
.site .skip {
  position: absolute;
  left: -9999px;
}
.site .skip:focus {
  left: 12px;
  top: 12px;
  z-index: 50;
  background: #fff;
  padding: 8px 12px;
  border-radius: 4px;
}

/* shared pieces */
.site .kicker {
  font: 700 12px / 1.4 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 16px;
}
.site .lead {
  font-size: 19px;
  color: #3d4660;
  max-width: 34em;
  margin: 0 0 28px;
}
.site .section-lead {
  color: var(--muted);
  font-size: 18px;
  max-width: 36em;
  margin: 0 0 40px;
}
.site .small {
  font-size: 15.5px;
  color: var(--muted);
  max-width: 34em;
}
.site .text-link {
  font-weight: 500;
  text-underline-offset: 4px;
  text-decoration-color: var(--red);
}
.site .btn,
.site button.btn {
  display: inline-block;
  padding: 14px 22px;
  background: var(--red);
  border: 1px solid var(--red);
  border-radius: 4px;
  color: #fff;
  font-weight: 650;
  text-decoration: none;
  box-shadow: 0 3px 0 var(--red-d);
  transition:
    transform 0.1s,
    box-shadow 0.1s;
}
.site .btn:hover {
  transform: translateY(1px);
  box-shadow: 0 2px 0 var(--red-d);
}
.site .btn.secondary {
  background: var(--paper);
  border-color: var(--sand);
  color: var(--navy);
  box-shadow: 0 3px 0 var(--sand);
}
.site .more {
  margin: 28px 0 0;
}

/* header */
.site .s-top {
  background: var(--cream);
  border-bottom: 1px solid var(--sand);
}
.site .s-top::before,
.site .s-foot::before {
  content: "";
  display: block;
  height: 6px;
  background: var(--stripes);
}
.site .s-top-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 26px;
  padding-block: 14px;
}
.site .s-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 700 21px / 1 var(--serif);
  color: var(--navy);
  text-decoration: none;
  margin-right: auto;
}
.site .s-brand {
  color: var(--navy);
  text-decoration: none;
}
.site .s-seal {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  box-shadow:
    0 0 0 3px var(--cream),
    0 0 0 4px var(--red);
}
.site .s-nav {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  white-space: nowrap;
  gap: 6px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 15px;
  order: 3;
  width: 100%;
}
.site .s-nav a {
  color: var(--muted);
  text-decoration: none;
}
.site .s-nav a:hover,
.site .s-nav a[aria-current="page"] {
  color: var(--navy);
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-underline-offset: 5px;
}
.site .s-cta {
  padding: 9px 15px;
  border-radius: 4px;
  background: var(--red);
  color: #fff;
  font-weight: 650;
  font-size: 15px;
  text-decoration: none;
  box-shadow: 0 2px 0 var(--red-d);
}

/* footer, and the cookie-settings link the consent slot renders right after it */
.site .s-foot {
  background: var(--navy);
  color: #c9cfdf;
  font-size: 15px;
}
.site .s-foot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 24px;
  padding-block: 48px 36px;
}
.site .s-foot-brand {
  grid-column: 1 / -1;
}
.site .s-foot .s-brand {
  color: #fff;
  margin-bottom: 14px;
}
.site .s-foot .s-seal {
  box-shadow:
    0 0 0 3px var(--navy),
    0 0 0 4px var(--red);
}
.site .s-foot-brand p {
  margin: 0;
  max-width: 22em;
}
.site .s-foot h2 {
  font: 700 12px / 1.4 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mustard);
  margin: 0 0 12px;
}
.site .s-foot nav,
.site .s-foot-grid > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}
.site .s-foot a {
  color: #e8ebf3;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.site .s-foot a:hover {
  text-decoration: underline;
}
.site .s-foot-base {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  padding-block: 18px 22px;
  border-top: 1px solid #34436a;
  font-size: 13.5px;
  color: #9aa3bb;
}
.site .cc-prefs {
  background: var(--navy);
  border: 0;
  margin: 0;
}
.site .cc-prefs .wrap {
  padding-block: 0 28px;
}
.site .cc-prefs .linkbtn {
  color: #9aa3bb;
  font-size: 13.5px;
}

/* main area: owner pages keep a centred column; band pages lay out their own */
.site main {
  padding: 48px 0 88px;
}
.site main.bleed {
  padding: 0;
}
.site .band {
  padding-block: clamp(64px, 9vw, 112px);
}
.site .band.paper {
  background: var(--paper);
  border-block: 1px solid var(--sand);
}

/* signup, sign-in and the other forms: a card on the counter */
.site .narrow {
  max-width: 560px;
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid var(--sand);
  border-radius: 6px;
  padding: 32px 28px 36px;
  box-shadow: 0 24px 50px -32px rgba(29, 43, 74, 0.45);
  position: relative;
  overflow: hidden;
}
.site .narrow::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: var(--stripes);
}
.site .narrow h1 {
  font-size: clamp(30px, 4vw, 40px);
}
.site .narrow .lead {
  font-size: 17px;
}
.site input[type="text"],
.site input[type="email"],
.site input[type="number"],
.site input[type="search"],
.site select,
.site textarea {
  background: #fff;
  border-color: var(--sand);
}

@media (min-width: 720px) {
  .site .s-nav {
    order: 0;
    width: auto;
  }
  .site .s-foot-grid {
    grid-template-columns: 1.4fr repeat(4, 1fr);
  }
  .site .s-foot-brand {
    grid-column: auto;
  }
}

/* owner pages: the dashboard, on the same counter as the public site */
/* every rule below is scoped to owner pages, so the public pages keep their own */
.site.owner main {
  padding: 40px 0 72px;
}
.site.owner .s-out {
  margin: 0;
}
.site.owner .s-out button {
  padding: 8px 14px;
  border: 1px solid var(--sand);
  border-radius: 4px;
  background: var(--paper);
  color: var(--navy);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 0 var(--sand);
}
.site.owner .s-out button:hover {
  border-color: var(--navy);
}
.site.owner .dash {
  display: grid;
  gap: 18px;
  max-width: 960px;
  margin: 0 auto;
}
.site.owner .dash > * {
  margin-block: 0;
}
.site.owner .dash h1 {
  font-size: clamp(30px, 4vw, 42px);
  margin: 0;
}
.site.owner .dash h2 {
  font-size: 22px;
  line-height: 1.2;
  margin: 8px 0 10px;
}
.site.owner .dash :is(.card, section:not(.notice)) h2 {
  margin-top: 0;
}
/* notices: a slip of paper with a coloured edge */
.site.owner .notice {
  background: var(--paper);
  border: 1px solid var(--sand);
  border-left: 5px solid var(--blue);
  border-radius: 4px;
  padding: 14px 18px;
  margin: 0;
  color: var(--navy);
}
.site.owner .notice p {
  margin: 0 0 10px;
}
.site.owner .notice > :last-child,
.site.owner .notice p:last-child {
  margin-bottom: 0;
}
.site.owner .notice.ok {
  border-left-color: var(--green);
  background: #eef4ec;
}
.site.owner .notice.warn {
  border-left-color: var(--mustard);
  background: #fbf1dc;
}
.site.owner .notice.error {
  border-left-color: var(--red);
  background: #f9e6e1;
  color: var(--red-d);
}

/* a plain section on an owner page is a card too */
.site.owner .card,
.site.owner .dash > section:where(:not(.notice)) {
  background: var(--paper);
  border: 1px solid var(--sand);
  border-radius: 6px;
  padding: 22px 24px;
  margin: 0;
  box-shadow: 0 18px 40px -34px rgba(29, 43, 74, 0.5);
}
.site.owner .card > :last-child,
.site.owner .dash > section:where(:not(.notice)) > :last-child {
  margin-bottom: 0;
}
.site.owner .dash form.stack {
  max-width: 520px;
}
.site.owner .dash form.stack > button {
  justify-self: start;
}
.site.owner .hint,
.site.owner .muted {
  color: var(--muted);
}
.site.owner .mono {
  font-family: var(--mono);
}
.site.owner label {
  font-weight: 600;
}
.site.owner label.check {
  font-weight: 400;
}
.site.owner input:focus,
.site.owner select:focus,
.site.owner textarea:focus,
.site.owner button:focus-visible,
.site.owner a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.site.owner button.btn {
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.site.owner .btn.danger {
  background: var(--red-d);
  border-color: var(--red-d);
  box-shadow: 0 3px 0 #5e1a13;
}
.site.owner .btn.small {
  padding: 8px 14px;
  font-size: 15px;
  box-shadow: 0 2px 0 var(--red-d);
}
.site.owner .btn.small.secondary {
  box-shadow: 0 2px 0 var(--sand);
}
.site.owner .btn.danger.small {
  box-shadow: 0 2px 0 #5e1a13;
}
.site.owner .row {
  gap: 10px;
}

/* tables: a ledger on paper */
.site.owner .table-scroll {
  background: var(--paper);
  border: 1px solid var(--sand);
  border-radius: 6px;
  overflow-x: auto;
}
.site.owner table {
  font-size: 15.5px;
}
.site.owner th,
.site.owner td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--sand);
}
.site.owner th {
  font: 700 11.5px / 1.4 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--cream);
}
.site.owner tr.unread td {
  background: #fffaf0;
}
.site.owner tr.unread td:first-child {
  box-shadow: inset 4px 0 0 var(--red);
}
.site.owner tbody tr:last-child td {
  border-bottom: 0;
}

/* badges: little rubber stamps */
.site.owner .badge {
  font: 700 11px / 1.5 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 3px;
  background: transparent;
  border: 1.5px solid var(--muted);
  color: var(--muted);
}
.site.owner .badge.ok {
  border-color: var(--green);
  color: var(--green);
  background: transparent;
}
.site.owner .badge.warn {
  border-color: var(--red);
  color: var(--red);
  background: transparent;
}
.site.owner .badge.danger {
  border-color: var(--red-d);
  color: #fff;
  background: var(--red-d);
}

/* message details */
.site.owner .dash dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 18px;
  margin: 0;
  background: var(--paper);
  border: 1px solid var(--sand);
  border-radius: 6px;
  padding: 16px 20px;
}
.site.owner .dash dt {
  font: 700 11.5px / 1.9 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.site.owner .dash dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.site.owner .dash ul {
  margin: 0;
  padding-left: 20px;
}

/* storage and daily meters */
.site.owner .meter {
  height: 10px;
  background: var(--cream);
  border: 1px solid var(--sand);
  border-radius: 999px;
}
.site.owner .meter > span {
  background: var(--blue);
}

/* the setup prompt and other copyable text */
.site.owner .dash pre.mono {
  word-break: normal;
  overflow-wrap: anywhere;
}
.site.owner .dash pre {
  background: #fff;
  border: 1px solid var(--sand);
  border-radius: 4px;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 14px;
}
