@font-face {
  font-family: "DM Sans";
  src: url("dm-sans.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f7f8f8;
  --ink: #252d31;
  --muted: #536169;
  --line: #d5dcde;
  --border: #aab5ba;
  --accent: #3454a0;
  --accent-bg: #edf1fa;
  font: 100%/1.55 "DM Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); text-underline-offset: .2em; }
button, input, textarea, select { font: inherit; }
h1, h2, h3, p, ol, dl { margin: 0; }
h1, h2, h3 { line-height: 1.14; letter-spacing: -.035em; font-weight: 650; overflow-wrap: anywhere; }
h1 { font-size: clamp(2.2rem, 6vw, 3.25rem); letter-spacing: -.052em; }
h2 { font-size: 1.33rem; }
h3 { font-size: 1.04rem; }
p { margin-block: .4rem .8rem; }
:focus-visible { outline: 3px solid #648ce1; outline-offset: 3px; }
header { border-bottom: 1px solid var(--line); background: white; }
.shell { max-width: 1180px; margin-inline: auto; padding-inline: clamp(1rem, 4vw, 3.25rem); }
.header { min-height: 67px; display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.brand, nav a { text-decoration: none; color: var(--ink); }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-size: 1.25rem; font-weight: 720; letter-spacing: -.045em; white-space: nowrap; }
.brand-mark { display: inline-grid; place-items: center; width: 32px; height: 30px; background: var(--paper); border: 1px solid var(--ink); border-radius: 6px; box-shadow: -2px 2px #c3cfd2; }
nav { display: flex; flex-wrap: wrap; gap: .2rem; align-items: center; }
nav a, .link { padding: .42rem .64rem; color: var(--muted); font-size: .92rem; font-weight: 600; border-radius: 5px; }
nav a:hover, nav [aria-current="page"] { color: var(--accent); background: var(--accent-bg); }
.link { border: 0; background: transparent; }
main { padding-block: 2rem 1.4rem; min-height: 62vh; }
footer { color: var(--muted); font-size: .85rem; padding-block: .65rem 1.25rem; }
.workspace { color: var(--muted); font-size: .88rem; font-weight: 620; margin-bottom: .42rem; overflow-wrap: anywhere; }
.lede { color: var(--muted); margin-block: .5rem 1.1rem; }
.heading, .actions, .search, .rule, .pagination { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.heading { margin-bottom: 1.1rem; }
.heading .lede, .heading p:last-child { margin-bottom: 0; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.detail { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.panel, .table-panel { border: 1px solid var(--line); border-radius: 8px; background: white; }
.panel { padding: clamp(1rem, 2vw, 1.4rem); }
.narrow { max-width: 630px; margin-inline: auto; }
.narrow > form { margin-top: 1rem; }
.stack { display: grid; gap: .95rem; }
.history, .rules { margin-top: 1rem; }
.notice { margin: 0 0 .95rem; padding: .65rem .85rem; border-left: 3px solid var(--accent); background: var(--accent-bg); }
.button, button { cursor: pointer; display: inline-flex; justify-content: center; align-items: center; width: fit-content; padding: .52rem .85rem; border-radius: 6px; border: 1px solid var(--border); background: white; text-decoration: none; font-weight: 630; font-size: .93rem; line-height: 1.4; color: var(--ink); }
.button:hover, button:hover { background: #eef2f4; }
.primary { color: white; background: var(--accent); border-color: var(--accent); }
.primary:hover { background: #294683; }
label { display: grid; gap: .25rem; font-weight: 620; font-size: .94rem; min-width: 0; }
input, textarea, select { width: 100%; min-width: 0; border: 1px solid var(--border); border-radius: 5px; padding: .48rem .6rem; background: white; color: var(--ink); font-weight: 440; }
textarea { resize: vertical; }
.check { display: flex; align-items: center; gap: .45rem; }
.check input { width: 1rem; height: 1rem; accent-color: var(--accent); }
small { color: var(--muted); font-size: .85rem; font-weight: 440; }
code, .address input, time { font-family: ui-monospace, Consolas, monospace; font-size: .86em; overflow-wrap: anywhere; }
.address { margin-block: .8rem; }
.address input, .route { background: #eff2f3; }
.route { display: flex; gap: 1.2rem; flex-wrap: wrap; border: 1px solid var(--line); padding: .75rem 1rem; border-radius: 6px; margin-bottom: 1rem; color: var(--muted); font-size: .9rem; }
.route code { color: var(--ink); }
ol { padding-left: 1.4rem; }
li { margin-block: .38rem; }
.after, .back { margin-top: .9rem; margin-bottom: .45rem; }
.search { padding: .85rem 1rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.search h2 { margin-right: auto; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; }
td, th { padding: .72rem 1rem; border-bottom: 1px solid var(--line); font-size: .92rem; }
th { background: #f1f4f4; color: var(--muted); font-size: .84rem; }
tr:last-child td { border-bottom: 0; }
.row-title { color: var(--ink); font-weight: 640; }
td small { display: block; }
.pill { display: inline-block; width: fit-content; border: 1px solid var(--line); background: #f1f4f5; padding: .15rem .55rem; border-radius: 5px; font-size: .82rem; font-weight: 620; white-space: nowrap; }
.pill.forwarded { color: #355b47; background: #eef4f1; border-color: #cadcd2; }
.pill.review { color: #735722; background: #f8f3e9; border-color: #e6d9bc; }
.pill.awaiting, .pill.queued { color: #4d5877; background: #f0f2f8; border-color: #d4d9e7; }
.pill.spam, .pill.failed { color: #774b4c; background: #f5eeee; border-color: #e2d0d0; }
.heading .pill { margin-bottom: .35rem; }
.empty { text-align: center; color: var(--muted); padding: 2.3rem 1rem; }
.empty h3 { color: var(--ink); }
.pagination { justify-content: flex-end; padding: .8rem 1rem; border-top: 1px solid var(--line); }
.rules .rule { border-top: 1px solid var(--line); padding-block: .65rem; }
.rules .rule p { margin-bottom: 0; color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.settings { max-width: 660px; }
.message { white-space: pre-wrap; overflow-wrap: anywhere; background: #f8f9f9; border: 1px solid var(--line); border-radius: 5px; padding: .9rem; margin-block: .65rem; }
dl { display: grid; grid-template-columns: minmax(82px, .7fr) minmax(0, 1.8fr); gap: .2rem .6rem; margin-block: .7rem; font-size: .9rem; }
dt, time { color: var(--muted); }
dd { margin: 0; overflow-wrap: anywhere; }
time { margin-right: .6rem; }
.actions { justify-content: flex-start; flex-wrap: wrap; }
.confirm { margin-top: 2rem; }
.confirm p { margin-block: .7rem 1rem; }
.skip, .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { clip-path: none; top: 5px; left: 5px; width: auto; height: auto; padding: .6rem; background: white; z-index: 1; }
@media (max-width: 700px) {
  .header { flex-wrap: wrap; padding-block: .65rem; gap: .45rem; }
  nav a, .link { padding: .3rem .48rem; }
  .grid, .detail { grid-template-columns: 1fr; }
  .heading { align-items: flex-start; flex-wrap: wrap; }
  .search h2 { width: 100%; }
  .search input { max-width: 10rem; }
  .route { display: grid; gap: .35rem; }
}
