
:root { --ink: #0e0e14; --paper: #f4f3ef; --line: #dcdbd5; --mute: #6b6b75; --accent: #ff5a1f; --bad: #b3261e; --ok: #146c43; color-scheme: light; }
* { box-sizing: border-box; }
body { margin: 0; background: #fff; color: var(--ink); font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }
a { color: inherit; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.top { display: flex; justify-content: space-between; align-items: center; padding: 14px 24px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; text-decoration: none; }
.brand i { width: 16px; height: 16px; border: 2px solid var(--ink); position: relative; }
.brand i::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 7px; height: 7px; background: var(--accent); }
.brand span { color: var(--mute); font-weight: 400; }
main { max-width: 1200px; margin: 0 auto; padding: 24px; }
button, .btn, input, select, textarea { font: inherit; }
button, .btn { display: inline-block; padding: 8px 14px; background: #fff; color: var(--ink); border: 1px solid var(--ink); cursor: pointer; text-decoration: none; white-space: nowrap; }
button:hover, .btn:hover { background: var(--paper); }
.btn--p, button.btn--p { background: var(--ink); color: #fff; }
.btn--p:hover { background: #2a2a33; }
button.link { border: 0; padding: 0; background: none; text-decoration: underline; color: var(--mute); }
input, select, textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs a { padding: 8px 14px; text-decoration: none; color: var(--mute); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a span { font-size: 13px; }
.tabs a[aria-current] { color: var(--ink); border-color: var(--ink); font-weight: 600; }
.bar { display: flex; gap: 12px; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }
.search { display: flex; gap: 8px; flex: 1; max-width: 520px; }
.list { width: 100%; border-collapse: collapse; }
.list th { text-align: left; font-weight: 500; font-size: 13px; color: var(--mute); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.list td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.list td span { display: block; color: var(--mute); font-size: 13px; }
.list td a { text-decoration: none; }
.list td a:hover b { text-decoration: underline; }
.list tr.is-new td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.list b { font-weight: 500; }
.list tr.is-new b { font-weight: 700; }
.excerpt { color: var(--mute); max-width: 460px; }
.nowrap { white-space: nowrap; }
.warn { color: var(--bad) !important; }
.pill { display: inline-block; padding: 1px 8px; font-size: 12px; border: 1px solid var(--line); }
.s-new { border-color: var(--accent); color: #a8380d; }
.s-replied { border-color: var(--ok); color: var(--ok); }
.s-spam { border-color: var(--bad); color: var(--bad); }
.empty { padding: 48px 0; color: var(--mute); text-align: center; }
.pager { display: flex; gap: 16px; justify-content: center; color: var(--mute); margin-top: 16px; }
.flash { padding: 10px 14px; background: #e4f3ea; color: var(--ok); margin: 0 0 16px; }
.flash--bad { background: #fce9e7; color: var(--bad); }
.back { margin: 0 0 12px; }
.back a { color: var(--mute); text-decoration: none; }
.msg { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
.msg h1 { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -0.01em; }
.msg header p { margin: 4px 0 20px; color: var(--mute); }
.text { white-space: pre-wrap; padding: 20px; background: var(--paper); line-height: 1.6; overflow-wrap: anywhere; }
.actions { margin-top: 16px; }
aside dl { margin: 0 0 20px; display: grid; gap: 2px; }
aside dt { font-size: 13px; color: var(--mute); margin-top: 8px; }
aside dd { margin: 0; overflow-wrap: anywhere; }
.stack { display: grid; gap: 6px; padding: 16px 0; border-top: 1px solid var(--line); }
.stack label { font-size: 13px; color: var(--mute); }
.row { display: flex; gap: 8px; }
.check { display: flex; gap: 8px; align-items: center; color: var(--ink) !important; font-size: 14px !important; }
.check input { width: auto; }
.danger button { border-color: var(--bad); color: var(--bad); justify-self: start; }
.login { max-width: 360px; margin: 64px auto; display: grid; gap: 10px; }
.login h1 { margin: 0 0 8px; font-weight: 600; }
.login label { font-size: 13px; color: var(--mute); }
@media (max-width: 760px) {
  main { padding: 16px; }
  .msg { grid-template-columns: 1fr; }
  .list thead { display: none; }
  .list tr { display: grid; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .list td { border: 0; padding: 2px 6px; }
}
