/* Postline customer area: light and dark, phone to desktop, no external resources. */
:root {
  --bg: #f6f7f9; --surface: #ffffff; --text: #1b1f24; --muted: #5d6673; --line: #dde1e6;
  --accent: #2456d6; --accent-text: #ffffff; --ok: #1b7f4b; --warn: #b26a00; --danger: #c62d2d;
  --ok-bg: #e7f5ee; --warn-bg: #fff4e0; --danger-bg: #fdecec; --code: #eef1f5;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111418; --surface: #1a1f25; --text: #e7eaee; --muted: #9aa4b1; --line: #2c333c;
    --accent: #6f95ff; --accent-text: #0b1020; --ok: #4cc38a; --warn: #f0a640; --danger: #ff6b6b;
    --ok-bg: #12291e; --warn-bg: #2d2412; --danger-bg: #2f1617; --code: #232a32;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
code, pre { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.92em; }
code { background: var(--code); padding: 0.05em 0.35em; border-radius: 4px; overflow-wrap: anywhere; }
pre { background: var(--code); padding: 12px; border-radius: 8px; overflow-x: auto; }
pre code { background: none; padding: 0; }
code.phrase { font-size: 1.05em; padding: 0.2em 0.5em; }
h1 { font-size: 1.6rem; margin: 0 0 16px; }
h2 { font-size: 1.15rem; margin: 0 0 12px; }

.top { display: flex; align-items: center; gap: 16px; padding: 12px 16px; background: var(--surface);
  border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; text-decoration: none; color: var(--text); font-size: 1.1rem; }
.who, .top .right { margin-left: auto; }
.who { color: var(--muted); }
.wrap { max-width: 1100px; margin: 0 auto; padding: 24px 16px; }
.wrap.with-nav { display: grid; grid-template-columns: 200px 1fr; gap: 24px; }
.side { display: flex; flex-direction: column; gap: 2px; }
.side a { padding: 8px 12px; border-radius: 6px; text-decoration: none; color: var(--text); }
.side a:hover { background: var(--surface); }
.side a[aria-current="page"] { background: var(--surface); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
main { min-width: 0; }
.foot { text-align: center; color: var(--muted); padding: 24px 16px; font-size: 0.9em; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 20px; margin-bottom: 16px; }
.card.narrow { max-width: 480px; margin-left: auto; margin-right: auto; }
.card.highlight { border-color: var(--accent); }
.muted { color: var(--muted); }
.tag { font-size: 0.8em; padding: 0.1em 0.5em; border-radius: 99px; background: var(--code); color: var(--muted); }
.alert { padding: 10px 14px; border-radius: 8px; background: var(--warn-bg); border: 1px solid var(--warn); }
.alert.error { background: var(--danger-bg); border-color: var(--danger); }
.alert.ok { background: var(--ok-bg); border-color: var(--ok); }

form label { display: block; margin-bottom: 12px; font-weight: 500; }
form label small { display: block; font-weight: 400; color: var(--muted); }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
input, select { display: block; width: 100%; margin-top: 4px; padding: 8px 10px; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 6px; }
input[type="checkbox"] { width: auto; margin: 0; display: inline; }
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
button, a.button { display: inline-block; padding: 8px 16px; font: inherit; font-weight: 600; border-radius: 6px;
  border: 1px solid var(--accent); background: var(--accent); color: var(--accent-text); cursor: pointer; text-decoration: none; }
button.secondary { background: transparent; color: var(--accent); }
button.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
button.link { background: none; border: none; color: var(--accent); padding: 0; font-weight: 400; }
form.inline { display: inline; }
form.inline select { display: inline-block; width: auto; margin: 0 4px 0 0; }
form.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
form.row label { flex: 1 1 200px; margin: 0; }
form.row label.check { flex: 0 1 auto; }
.prefix { color: var(--muted); font-weight: 400; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.85em; color: var(--muted); font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.actions { white-space: nowrap; text-align: right; }
td.actions form { margin-left: 4px; }
td.actions button { padding: 4px 10px; font-size: 0.9em; }

dl.pairs { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 12px; }
dl.pairs dt { color: var(--muted); }
dl.pairs dd { margin: 0; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.facts div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.facts span { display: block; color: var(--muted); font-size: 0.85em; }
.status-suspended { color: var(--danger); }

.bars { display: grid; gap: 16px; }
.bar-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.bar-head span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; }
.meter { height: 10px; background: var(--code); border-radius: 99px; overflow: hidden; }
.fill { height: 100%; background: var(--accent); }
.bar.high .fill { background: var(--warn); }
.bar.full .fill { background: var(--danger); }
.bar small { color: var(--muted); }
.w0 { width: 0 } .w5 { width: 5% } .w10 { width: 10% } .w15 { width: 15% } .w20 { width: 20% } .w25 { width: 25% }
.w30 { width: 30% } .w35 { width: 35% } .w40 { width: 40% } .w45 { width: 45% } .w50 { width: 50% } .w55 { width: 55% }
.w60 { width: 60% } .w65 { width: 65% } .w70 { width: 70% } .w75 { width: 75% } .w80 { width: 80% } .w85 { width: 85% }
.w90 { width: 90% } .w95 { width: 95% } .w100 { width: 100% }

@media (max-width: 760px) {
  .wrap.with-nav { grid-template-columns: 1fr; }
  .side { flex-direction: row; overflow-x: auto; gap: 4px; }
  .side a { white-space: nowrap; }
  .who { display: none; }
  table { display: block; overflow-x: auto; }
  td.actions { white-space: normal; }
}

/* home and legal pages */
.hero { max-width: 720px; margin: 24px 0 32px; }
.hero h1 { font-size: 2.1rem; line-height: 1.2; text-wrap: balance; }
.hero > p { font-size: 1.1rem; }
.hero .button { margin: 0 8px 8px 0; font-size: 1rem; }
.plans.features { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.features .card { margin: 0; }
.legal { max-width: 800px; margin-left: auto; margin-right: auto; }
.legal h2 { margin-top: 28px; }
.legal mark { background: var(--warn-bg); color: inherit; }

/* pricing */
.switch a[aria-current="page"] { font-weight: 700; text-decoration: none; color: var(--text); }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 16px; }
.plan .price { font-size: 1.8rem; font-weight: 700; margin: 4px 0 12px; }
.plan .price small { font-size: 0.9rem; font-weight: 400; color: var(--muted); }
.plan ul { padding-left: 18px; margin: 0 0 16px; }
.plan li { margin-bottom: 4px; }
a.secondary-link { background: transparent; color: var(--accent); }
dl.faq dt { font-weight: 600; margin-top: 10px; }
dl.faq dd { margin: 2px 0 0; color: var(--muted); }

/* scope settings */
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px 4px; margin: 0 0 14px; min-width: 0; }
legend { font-weight: 600; padding: 0 6px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 16px; align-items: start; }
.fields label.check { margin-top: 28px; }
.scope .summary { margin-top: -6px; }
details.actions { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
details.actions summary { cursor: pointer; font-weight: 600; color: var(--accent); }
details.actions form { margin-top: 12px; }
.small-note { font-size: 0.9em; }
.help h3 { font-size: 1rem; margin: 20px 0 8px; }
.help table { margin-bottom: 8px; }
.help ul { padding-left: 18px; }
.help li { margin-bottom: 4px; }
@media (max-width: 760px) { .fields label.check { margin-top: 0; margin-bottom: 12px; } }
