:root {
  color-scheme: light;
  --navy: #003263;
  --red: #b80036;
  --lime: #c2e31c;
  --paper: #f8f8f2;
  --ink: #132b40;
  --muted: #506071;
  --rule: #ccd3d9;
  --display: "Avenir Next Condensed", "Arial Narrow", "Avenir Next", sans-serif;
  font: 100% / 1.5 "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.masthead {
  background: white;
  border-bottom: 1px solid var(--rule);
}
.masthead-inner, main {
  max-width: 71rem;
  margin: 0 auto;
  padding-inline: clamp(1rem, 4vw, 3.5rem);
}
.masthead-inner { min-height: 4.5rem; display: flex; align-items: center; gap: 1.2rem; }
.masthead img { width: 7.35rem; height: auto; }
.section-name { font-weight: 650; color: var(--navy); border-left: 1px solid var(--rule); padding-left: 1.1rem; }
#logout { margin-left: auto; }
main { padding-block: clamp(1.5rem, 4vw, 3.75rem) 4rem; }
h1, h2, summary { color: var(--navy); margin: 0; font-family: var(--display); font-weight: 850; line-height: 1.08; }
h1 { font-size: clamp(2.7rem, 6vw, 4.2rem); letter-spacing: -.045em; }
h2, summary { font-size: 1.55rem; letter-spacing: -.025em; }
p { margin: 0; }
.lede { margin-top: .55rem; color: var(--muted); }
.loading { text-align: center; }
.login-card, .panel {
  background: white;
  border: 1px solid var(--rule);
  border-radius: 1rem;
  padding: clamp(1.2rem, 3vw, 2rem);
}
.login-card { max-width: 28rem; margin: min(6vh, 4rem) auto; border-top: .35rem solid var(--navy); }
.login-card h1 { font-size: 2.75rem; }
form { display: grid; }
label { font-weight: 700; color: var(--ink); margin-top: 1.25rem; margin-bottom: .36rem; }
input, textarea {
  font: inherit; color: var(--ink);
  border: 1px solid #8898a6; border-radius: .5rem;
  padding: .65rem .8rem; width: 100%;
  background: #fff; min-width: 0; min-height: 2.8rem;
}
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: #627181; opacity: 1; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; font-weight: 700; cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
a { color: var(--navy); }
:focus-visible { outline: 3px solid #0872b1; outline-offset: 3px; }
.primary, .secondary {
  border: 1px solid transparent;
  border-radius: .55rem; padding: .65rem 1.1rem; min-height: 2.8rem;
}
.primary { color: white; background: var(--navy); }
.primary:hover:not(:disabled) { background: #074a82; }
.secondary { background: white; border-color: var(--navy); color: var(--navy); }
.secondary:hover:not(:disabled) { background: #eff5f7; }
.text-button, .history-link {
  border: 0; background: none; padding: .6rem .2rem; min-height: 2.75rem;
  font: inherit; font-weight: 700; color: var(--navy); text-decoration: none;
}
.text-button:hover, .history-link:hover { text-decoration: underline; }
#login-form .primary { margin-top: 1.5rem; }
.passkey-login { display: grid; gap: .4rem; }
.divider { margin: 1rem 0 .7rem; display: flex; align-items: center; gap: .8rem; color: var(--muted); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.status { font-size: .95rem; color: var(--navy); }
.status:not(:empty) { margin: .85rem 0 0; }
.status[data-error="true"] { color: #a8142c; }
.page-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 1.6rem; gap: 1rem; }
.history-link { white-space: nowrap; }
.compose-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 1rem; align-items: stretch; }
.compose-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; }
#characters { color: var(--muted); font-size: .9rem; }
.preview { display: flex; flex-direction: column; }
.preview-canvas {
  flex: 1; display: grid; align-content: center;
  background: repeating-linear-gradient(145deg, transparent 0 34px, rgb(255 255 255 / .07) 35px 36px, transparent 37px 44px), var(--navy);
  border-radius: .7rem; padding: clamp(.85rem, 2vw, 1.5rem); margin-top: 1.25rem;
}
.notification { width: 100%; background: #f2f4ef; color: #17212a; border-radius: 1rem; padding: .9rem 1rem; overflow-wrap: anywhere; }
.notification strong { display: block; margin-top: .5rem; line-height: 1.3; }
.notification p { white-space: pre-line; line-height: 1.35; margin-top: .14rem; }
.notify-app { color: var(--muted); display: flex; align-items: center; gap: .45rem; font-size: .8rem; font-weight: 650; }
.notify-app img { background: white; object-fit: contain; padding: 3px; border-radius: 5px; }
.now { margin-left: auto; font-weight: 400; }
.history, .account { margin-top: 1rem; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
#history-empty { margin-top: 1rem; color: var(--muted); }
#messages { list-style: none; margin: 0; padding: 0; }
.message { border-top: 1px solid var(--rule); padding: 1rem 0 .2rem; margin-top: 1rem; }
.message-heading { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; }
.message h3 { margin: 0; color: var(--navy); font-size: 1.07rem; line-height: 1.3; overflow-wrap: anywhere; }
.message time { font-size: .8rem; color: var(--muted); }
.message p { margin-top: .3rem; white-space: pre-line; overflow-wrap: anywhere; }
.delivery { display: flex; flex-wrap: wrap; gap: .3rem 1rem; color: var(--muted); font-size: .82rem; margin-top: .55rem; }
.delivery b { color: var(--navy); }
.delivery .failed b { color: var(--red); }
.account { padding-block: 1.3rem; }
.account summary { cursor: pointer; }
.account-body { margin-top: 1rem; }
#key-summary { color: var(--muted); }
#keys { margin: .4rem 0 0; padding-left: 1.1rem; }
.key-fields { display: flex; align-items: center; gap: .65rem; max-width: 31rem; }
.key-fields button { white-space: nowrap; }
@media (max-width: 47rem) {
  .compose-grid { grid-template-columns: 1fr; }
  .preview-canvas { min-height: 9rem; }
  .page-heading { align-items: center; }
  .message-heading { align-items: start; flex-direction: column; gap: .15rem; }
}
@media (max-width: 28rem) {
  .masthead-inner { gap: .7rem; }
  .section-name { padding-left: .7rem; }
  .masthead img { width: 6.2rem; }
  .compose-footer, .key-fields { align-items: stretch; flex-direction: column; }
}
