:root {
  color-scheme: dark;
  --page: #171818;
  --surface: #222424;
  --input: #191b1b;
  --line: #404242;
  --ink: #f4f1e9;
  --muted: #b8bab4;
  --lime: #c6d7ff;
  --blue: #a7b9fa;
  font: 400 15px/1.5 "DM Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--page);
}
* { box-sizing: border-box; }
body, h1, h2, h3, p, dl, dd { margin: 0; }
[hidden] { display: none !important; }
.wrap { width: min(100% - 48px, 1240px); margin-inline: auto; }
.masthead { border-bottom: 1px solid var(--line); }
.masthead-inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 650; }
.intro { padding-block: 46px 28px; }
h1 { font-size: clamp(38px, 6vw, 58px); line-height: 1.03; letter-spacing: -.065em; font-weight: 650; }
.intro p { margin-top: 12px; color: var(--muted); }
h2, h3 { font-size: 20px; line-height: 1.25; letter-spacing: -.025em; font-weight: 650; }
.workspace { display: grid; grid-template-columns: minmax(0, 390px) minmax(0, 1fr); align-items: start; gap: 18px; padding-bottom: 40px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; min-width: 0; }
.compose h2 { margin-bottom: 18px; }
.muted, dt { color: var(--muted); }
.hint { line-height: 1.45; }
a { color: var(--blue); text-underline-offset: .18em; }
button, input, textarea { font: inherit; color: inherit; }
button { background: transparent; border: 1px solid var(--line); border-radius: 8px; min-height: 40px; padding: 7px 13px; font-weight: 650; cursor: pointer; }
button:hover:not(:disabled) { border-color: var(--muted); }
.primary { background: var(--lime); border-color: var(--lime); color: #1d220e; padding-inline: 17px; }
.primary:hover:not(:disabled) { background: #e6ff9f; border-color: #e6ff9f; }
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
form { display: grid; gap: 12px; }
form > button { justify-self: start; }
label { display: grid; gap: 5px; }
input, textarea {
  display: block; width: 100%; padding: 9px 10px; background: var(--input);
  border: 1px solid var(--line); border-radius: 8px;
}
textarea { min-height: 125px; resize: vertical; }
.banner { padding: 12px 16px; margin-bottom: 16px; border-radius: 8px; background: #27304a; color: #e6eaff; }
.status:not(:empty) { margin-top: 14px; }
.error { color: #ffb8a4; }
#review { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 18px; }
#review dl { display: grid; gap: 4px; margin-block: 12px; }
#review dl div { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 8px; }
#review dd, .review-body { overflow-wrap: anywhere; }
.review-body { background: var(--input); border-radius: 8px; padding: 12px; white-space: pre-wrap; max-height: 250px; overflow: auto; }
#review-tracking { margin-block: 10px 14px; }
#gmail { display: block; margin-top: 10px; width: fit-content; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
#activity-status:not(:empty) { margin-bottom: 12px; }
details { border-top: 1px solid var(--line); }
details:last-child { border-bottom: 1px solid var(--line); }
summary { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; padding: 13px 0; gap: 16px; cursor: pointer; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--lime); grid-column: 4; font-weight: 700; }
details[open] summary::after { content: "−"; }
.message-label { display: grid; overflow-wrap: anywhere; }
.metric { white-space: nowrap; color: var(--lime); font-variant-numeric: tabular-nums; }
.metric.none { color: var(--muted); }
.message-detail { padding-bottom: 14px; overflow-wrap: anywhere; }
.message-detail ul { list-style-type: none; padding: 0; margin-bottom: 0; }
.message-detail li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding-block: 7px; border-top: 1px solid var(--line); }
.message-detail time { display: block; }
.message-detail li > span:last-child { text-align: right; }
.pager { display: flex; justify-content: space-between; gap: 10px; }
.pager:has(button:not([hidden])) { margin-top: 14px; }
#older { margin-left: auto; }
.activity-note { margin-top: 20px; }
.interest-panel { margin-bottom: 24px; }
.interest-panel .section-head p { margin-top: 6px; }
.live-label { color: var(--muted); white-space: nowrap; }
.analytics-totals { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line); margin-block: 20px; }
.analytics-totals > div { padding: 18px 16px 18px 0; display: grid; gap: 4px; }
.analytics-totals strong { font-size: 30px; line-height: 1.2; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.analytics-totals span { color: var(--muted); }
.recipient-summary { grid-template-columns: minmax(0, 1fr) auto auto; }
.recipient-summary .message-label { gap: 3px; }
.signal-label { color: var(--blue); font-weight: 500; }
.signal-label[data-rank="3"] { color: var(--lime); }
.recipient-body { padding: 6px 0 20px; }
.recipient-body h3 { margin-block: 20px 10px; }
.recipient-body ul, .recipient-body ol { padding: 0; margin: 0; list-style: none; }
.recipient-body li { border-top: 1px solid var(--line); padding-block: 10px; overflow-wrap: anywhere; }
.recipient-body li strong, .recipient-body li span, .recipient-body li time { display: block; }
.recipient-body li time { color: var(--muted); }
.recipient-body ol { border-left: 2px solid var(--blue); padding-left: 16px; }
.recipient-body ol li { border-top: 0; position: relative; padding-top: 0; margin-bottom: 8px; }
.recipient-body ol li::before { content: ""; position: absolute; left: -21px; top: 7px; width: 8px; height: 8px; background: var(--blue); border-radius: 50%; }
.pin-page { min-height: 100svh; display: grid; place-items: center; padding: 24px; }
.pin-card { width: min(100%, 420px); padding: 32px; }
.pin-card h1 { font-size: 38px; margin-top: 36px; }
.pin-card > p { margin-top: 14px; }
.pin-card form { margin-top: 28px; gap: 10px; }
.pin-card input { text-align: center; font-size: 30px; letter-spacing: .35em; padding-left: .7em; }
.pin-card button { justify-self: stretch; margin-top: 8px; }
.masthead-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
@media (max-width: 860px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .interest-panel .section-head { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 480px) {
  .analytics-totals { grid-template-columns: repeat(2, 1fr); }
  .recipient-summary { grid-template-columns: repeat(2, minmax(0, 1fr)) auto; }
  .wrap { width: calc(100% - 28px); }
  .masthead-inner { align-items: flex-start; justify-content: center; flex-direction: column; padding-block: 12px; gap: 3px; }
  .intro { padding-block: 30px 20px; }
  .panel { padding: 16px; }
  summary { grid-template-columns: repeat(2, minmax(0, 1fr)) auto; gap: 4px 9px; }
  .message-label { grid-area: 1 / 1 / 2 / 3; }
  summary::after { grid-row: 1; grid-column: 3; align-self: start; }
  .message-detail li { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .message-detail li > span:last-child { text-align: left; }
}
