:root {
  --brand-50: #eef4ff; --brand-100: #dbe6ff; --brand-200: #bfd3ff; --brand-500: #3b66f5;
  --brand-600: #2549e0; --brand-700: #1d3bbf; --brand-900: #1e3279;
  --ok: #059669; --ok-bg: #ecfdf5; --warn: #d97706; --warn-bg: #fffbeb;
  --bad: #dc2626; --bad-bg: #fef2f2; --idle: #64748b; --idle-bg: #f1f5f9;
  --text: #111827; --muted: #6b7280; --line: #e3e8f2; --page: #f3f5fa; --card: #ffffff;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  font-family: var(--font-sans);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--text); font-size: 14px; line-height: 1.45; }
a { color: var(--brand-600); }
h1 { font-size: 22px; margin: 0 0 12px; color: var(--brand-900); }
h2 { font-size: 17px; margin: 0 0 10px; color: var(--brand-900); }
h3 { font-size: 14px; margin: 16px 0 8px; color: var(--brand-900); }
code { background: var(--brand-50); padding: 2px 6px; border-radius: 4px; font-size: 13px; word-break: break-all; }
small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.muted { color: var(--muted); }

.topbar { background: linear-gradient(90deg, var(--brand-700), var(--brand-600)); color: #fff; }
.topbar__inner { max-width: 1240px; margin: 0 auto; padding: 10px 16px; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 17px; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.nav a { color: #e0e7ff; text-decoration: none; padding: 6px 10px; border-radius: 6px; font-weight: 500; }
.nav a:hover { background: rgba(255,255,255,.12); color: #fff; }
.nav a.is-active { background: rgba(255,255,255,.2); color: #fff; }
.signout { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.signout__who { font-size: 12px; color: #c7d2fe; }
.devbar { background: #fef3c7; color: #92400e; text-align: center; padding: 6px 16px; font-size: 13px; border-bottom: 1px solid #fde68a; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 20px 16px 40px; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 0 16px 24px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; margin-bottom: 16px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.card--narrow { max-width: 460px; margin: 40px auto; }
.pagehead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.pagehead p { margin: 4px 0; }

.hero { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-radius: 12px; padding: 18px 22px; margin-bottom: 16px; color: #fff; }
.hero--ok { background: linear-gradient(90deg, #047857, #10b981); }
.hero--warn { background: linear-gradient(90deg, #b45309, #f59e0b); }
.hero--bad { background: linear-gradient(90deg, #b91c1c, #ef4444); }
.hero--idle { background: linear-gradient(90deg, #475569, #94a3b8); }
.hero__label { font-size: 13px; font-weight: 600; opacity: .9; }
.hero__value { font-size: 28px; font-weight: 700; }
.hero__meta { font-size: 13px; opacity: .95; text-align: right; }

.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 16px; }
.check { background: var(--card); border: 1px solid var(--line); border-top: 5px solid var(--idle); border-radius: 10px; padding: 14px 16px; }
.check--ok { border-top-color: var(--ok); }
.check--warn { border-top-color: var(--warn); background: var(--warn-bg); }
.check--bad { border-top-color: var(--bad); background: var(--bad-bg); }
.check__name { font-size: 13px; color: var(--muted); font-weight: 600; }
.check__value { font-size: 22px; font-weight: 700; margin: 4px 0; }
.check--ok .check__value { color: var(--ok); }
.check--warn .check__value { color: var(--warn); }
.check--bad .check__value { color: var(--bad); }
.check--idle .check__value { color: var(--idle); }
.check__note { font-size: 12px; color: #4b5563; word-break: break-word; }

.stats { display: flex; gap: 12px; flex-wrap: wrap; margin: 10px 0; }
.stat { background: var(--brand-50); border-radius: 8px; padding: 10px 14px; min-width: 120px; color: var(--muted); font-size: 12px; }
.stat span { display: block; font-size: 22px; font-weight: 700; color: var(--brand-700); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; background: var(--brand-50); color: var(--brand-900); font-weight: 600; font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--brand-100); white-space: nowrap; }
.table td { padding: 8px 10px; border-bottom: 1px solid #eef0f4; vertical-align: top; }
.table--compact td, .table--compact th { padding: 5px 8px; font-size: 13px; }
.row--bad td { background: var(--bad-bg); }
.person { margin: 12px 0 16px; }
.person__head { margin-bottom: 6px; }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 6px 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--idle-bg); color: var(--idle); }
.pill--ok { background: var(--ok-bg); color: var(--ok); }
.pill--warn { background: var(--warn-bg); color: var(--warn); }
.pill--bad { background: var(--bad-bg); color: var(--bad); }

.alert { border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; border: 1px solid; }
.alert ul { margin: 0; padding-left: 18px; }
.alert--ok { background: var(--ok-bg); border-color: #a7f3d0; color: #065f46; }
.alert--warn { background: var(--warn-bg); border-color: #fde68a; color: #92400e; }
.alert--bad { background: var(--bad-bg); border-color: #fecaca; color: #991b1b; }

.form { display: flex; flex-direction: column; gap: 12px; }
.form--row { flex-direction: row; align-items: flex-end; flex-wrap: wrap; }
.form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 13px; color: #374151; }
.form input[type=text], .form input[type=email], .form input[type=password], .form input[type=url], .form input[type=number], .form textarea {
  font: inherit; font-weight: 400; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; width: 100%;
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--brand-200); border-color: var(--brand-500); }
.form .radio { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.radios { border: 0; padding: 0; margin: 0; display: flex; gap: 18px; flex-wrap: wrap; }
.radios legend { font-weight: 600; font-size: 13px; color: #374151; margin-bottom: 4px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px 16px; }
.inline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.inline small { margin: 0; }
.secret code { font-size: 15px; padding: 8px 10px; display: block; }

.btn { display: inline-block; font: inherit; font-weight: 600; padding: 8px 14px; border-radius: 6px; border: 1px solid #cbd5e1; background: #fff; color: var(--brand-700); cursor: pointer; text-decoration: none; min-height: 36px; }
.btn:hover { background: var(--brand-50); }
.btn--primary { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.btn--primary:hover { background: var(--brand-700); }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn--ghost:hover { background: rgba(255,255,255,.15); }
.btn--danger { color: var(--bad); border-color: #fecaca; }
.btn--small { padding: 4px 10px; min-height: 30px; font-size: 13px; }

.timeline { display: flex; align-items: flex-end; gap: 2px; height: 70px; margin: 16px 0 4px; }
.bar { display: inline-block; flex: 1; min-width: 3px; border-radius: 2px; height: 100%; }
.bar--ok { background: #10b981; }
.bar--part { background: #f59e0b; }
.bar--down { background: #ef4444; }
.bar--none { background: #e2e8f0; height: 30%; }
.timeline__axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.legend { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend .bar { flex: none; width: 12px; height: 12px; }

@media (max-width: 640px) {
  .hero__meta { text-align: left; }
  .kv { grid-template-columns: 1fr; }
  .signout__who { display: none; }
  .topbar__inner { gap: 8px; }
  .nav { order: 3; flex: 1 0 100%; flex-wrap: nowrap; overflow-x: auto; }
  .nav a { white-space: nowrap; }
}

/* ---- home page: process view ---- */
.small { font-size: 12px; font-weight: 400; }
.banner { border-radius: 12px; padding: 20px 24px; margin-bottom: 16px; color: #fff; box-shadow: 0 2px 6px rgba(16,24,40,.08); }
.banner__title { font-size: 26px; font-weight: 700; line-height: 1.25; }
.banner__sub { font-size: 14px; margin-top: 6px; opacity: .95; }
.banner--green { background: linear-gradient(90deg, #047857, #10b981); }
.banner--red { background: linear-gradient(90deg, #b91c1c, #ef4444); }
.banner--amber { background: linear-gradient(90deg, #b45309, #f59e0b); }
.banner--blue { background: linear-gradient(90deg, var(--brand-700), var(--brand-500)); }
.banner--grey { background: linear-gradient(90deg, #475569, #94a3b8); }

.stepper { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; counter-reset: s; }
.step { position: relative; padding: 0 8px; text-align: center; }
.step::before { content: ""; position: absolute; top: 17px; left: -50%; width: 100%; height: 3px; background: #e2e8f0; z-index: 0; }
.step:first-child::before { display: none; }
.step--done::before, .step--now::before { background: var(--ok); }
.step__dot { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; font-weight: 700; background: #e2e8f0; color: #64748b; border: 3px solid #fff; }
.step--done .step__dot { background: var(--ok); color: #fff; }
.step--now .step__dot { background: var(--warn); color: #fff; box-shadow: 0 0 0 4px #fde68a; }
.step__title { font-weight: 600; margin-top: 6px; font-size: 13px; }
.step__state { font-size: 12px; color: var(--muted); margin-top: 2px; }
.step--now .step__state { color: #b45309; font-weight: 600; }
.step__note { font-size: 12px; color: #4b5563; margin-top: 2px; }
.calm { margin: 0; color: var(--ok); font-weight: 600; }

.card--start { border: 2px solid var(--bad); background: #fffafa; }
.cutoff { font-size: 22px; line-height: 1.3; margin: 4px 0 12px; color: #111827; }
.cutoff strong { color: var(--bad); }
.todo { margin: 12px 0; padding-left: 20px; }
.todo li { margin: 4px 0; }

.twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.twocol > .card:only-child { grid-column: 1 / -1; }
.minis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mailcard { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: #fbfcff; }
.mailcard--key { border: 2px solid var(--brand-500); background: var(--brand-50); max-width: 640px; }
.mailcard__label { font-size: 12px; color: var(--muted); font-weight: 600; }
.mailcard__ref { font-size: 20px; font-weight: 700; color: var(--brand-700); margin: 2px 0 6px; }
.mailcard__line { font-size: 13px; margin: 2px 0; word-break: break-word; }
.mailcard__line span { display: inline-block; min-width: 70px; color: var(--muted); }

.srv { list-style: none; margin: 0; padding: 0; }
.srv__row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid #eef0f4; }
.srv__row:last-child { border-bottom: 0; }
.srv__icon { flex: none; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; background: var(--idle-bg); color: var(--idle); }
.srv__row--ok .srv__icon { background: var(--ok-bg); color: var(--ok); }
.srv__row--warn .srv__icon { background: var(--warn-bg); color: var(--warn); }
.srv__row--bad .srv__icon { background: var(--bad-bg); color: var(--bad); }
.srv__row--ok .srv__value { color: var(--ok); font-weight: 600; }
.srv__row--warn .srv__value { color: var(--warn); font-weight: 600; }
.srv__row--bad .srv__value { color: var(--bad); font-weight: 600; }
.srv__note { font-size: 12px; color: #4b5563; }

.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.pcard { border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.pcard__head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.fold summary { cursor: pointer; font-weight: 700; color: var(--brand-900); font-size: 16px; list-style-position: inside; }
.fold[open] summary { margin-bottom: 10px; }
.count { display: inline-block; min-width: 26px; text-align: center; background: var(--brand-50); color: var(--brand-700); border-radius: 999px; padding: 0 8px; font-size: 13px; margin-left: 6px; }

@media (max-width: 900px) {
  .twocol { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .banner__title { font-size: 21px; }
  .cutoff { font-size: 18px; }
  .minis { grid-template-columns: 1fr; }
  .stepper { grid-template-columns: 1fr; }
  .step { text-align: left; display: flex; gap: 12px; padding: 0 0 14px; }
  .step::before { top: -14px; left: 17px; width: 3px; height: 14px; }
  .step__title { margin-top: 0; }
}

/* ---- start here ---- */
.card--starthere { border: 2px solid var(--brand-500); }
.card--starthere-down { border-color: var(--bad); background: #fffafa; }
.starthere__title { font-size: 22px; margin-bottom: 4px; }
.block { padding: 14px 0 6px; border-top: 1px solid #eef0f4; }
.block:first-of-type { border-top: 0; }
.block__head { display: flex; align-items: center; gap: 10px; }
.block__head h3 { margin: 0; font-size: 18px; }
.block__num { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--brand-600); color: #fff; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.card--starthere-down .block__num { background: var(--bad); }
.block__hint { color: #4b5563; font-size: 13px; margin: 6px 0 8px; }
.cutoff--calm { font-size: 17px; }
.cutoff--calm strong { color: var(--ok); }
.nowrap { white-space: nowrap; }
.pill--review { background: #f5f3ff; color: #6d28d9; }

/* ---- dashboard ---- */
.banner { padding: 14px 22px; }
.banner__title { font-size: 22px; }
.banner__sub { font-size: 13px; margin-top: 3px; }
.dash { display: grid; grid-template-columns: 3fr 2fr; gap: 16px; margin-bottom: 16px; }
.hero2 { border-radius: 12px; padding: 18px 22px; background: #fff; border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.hero2--down { border: 2px solid var(--bad); background: linear-gradient(180deg, #fff5f5, #ffffff 60%); }
.hero2--calm { border: 2px solid var(--brand-200); background: linear-gradient(180deg, var(--brand-50), #ffffff 60%); }
.hero2__kicker { font-size: 13px; font-weight: 700; color: var(--bad); }
.hero2--calm .hero2__kicker { color: var(--brand-600); }
.hero2__big { font-size: 26px; font-weight: 700; line-height: 1.25; margin: 4px 0 12px; color: #111827; }
.hero2--calm .hero2__big { font-size: 21px; }
.hero2__accent { color: var(--bad); white-space: nowrap; }
.hero2__calmline { color: var(--ok); font-weight: 600; margin: -6px 0 12px; }
.facts { display: grid; grid-template-columns: 190px 1fr; gap: 4px 12px; margin: 0 0 12px; font-size: 14px; background: rgba(255,255,255,.8); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; word-break: break-word; }
.hint { display: flex; gap: 10px; align-items: flex-start; background: var(--warn-bg); border: 1px solid #fde68a; color: #78350f; border-radius: 8px; padding: 10px 14px; font-size: 14px; }
.hint__step { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--warn); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: 12px; }
.tile { border-radius: 12px; padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-left: 6px solid var(--idle); display: flex; flex-direction: column; justify-content: center; }
.tile__value { font-size: 34px; font-weight: 800; line-height: 1.1; color: var(--idle); }
.tile__label { font-size: 13px; color: #4b5563; margin-top: 4px; font-weight: 600; }
.tile--amber { border-left-color: var(--warn); } .tile--amber .tile__value { color: var(--warn); }
.tile--green { border-left-color: var(--ok); } .tile--green .tile__value { color: var(--ok); }
.tile--red { border-left-color: var(--bad); background: var(--bad-bg); } .tile--red .tile__value { color: var(--bad); font-size: 28px; }
.tile--grey .tile__value { font-size: 24px; }

.tabs__radio { position: absolute; opacity: 0; pointer-events: none; }
.tabs__bar { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; border-bottom: 2px solid var(--brand-100); margin: -4px 0 12px; }
.tabs__tab { cursor: pointer; padding: 9px 14px; font-weight: 600; color: #4b5563; border-radius: 8px 8px 0 0; margin-bottom: -2px; border-bottom: 3px solid transparent; }
.tabs__tab:hover { background: var(--brand-50); }
.tabs__actions { margin-left: auto; display: flex; gap: 8px; padding-bottom: 6px; flex-wrap: wrap; }
.tabs__panel { display: none; }
.tabs__heading { font-size: 15px; margin: 0 0 8px; }
#tab-pending:checked ~ .tabs__bar .tabs__tab--pending,
#tab-replied:checked ~ .tabs__bar .tabs__tab--replied,
#tab-mails:checked ~ .tabs__bar .tabs__tab--mails { color: var(--brand-700); border-bottom-color: var(--brand-600); background: var(--brand-50); }
#tab-pending:checked ~ .tabs__panel--pending,
#tab-replied:checked ~ .tabs__panel--replied,
#tab-mails:checked ~ .tabs__panel--mails { display: block; }
#tab-pending:focus-visible ~ .tabs__bar .tabs__tab--pending,
#tab-replied:focus-visible ~ .tabs__bar .tabs__tab--replied,
#tab-mails:focus-visible ~ .tabs__bar .tabs__tab--mails { outline: 2px solid var(--brand-500); }

.twocol--even { grid-template-columns: 1fr 1fr; margin-bottom: 16px; }
.card--small h2 { font-size: 15px; }
.stepper--vertical { grid-template-columns: 1fr; }
.stepper--vertical .step { text-align: left; display: flex; gap: 12px; padding: 0 0 10px; }
.stepper--vertical .step::before { top: -10px; left: 17px; width: 3px; height: 10px; }
.stepper--vertical .step__title { margin-top: 0; }
.stepper--vertical .step__dot { width: 32px; height: 32px; }

@media (max-width: 900px) {
  .dash { grid-template-columns: 1fr; }
  .twocol--even { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .hero2__big { font-size: 21px; }
  .facts { grid-template-columns: 1fr; }
  .facts dt { margin-top: 4px; }
  .tile__value { font-size: 26px; }
  .tabs__actions { margin-left: 0; width: 100%; }
}

/* ===================== colourful polish (visual only) ===================== */
:root { --page: #f1f5f9; --line: #e2e8f0; --violet: #7c3aed; }
body { background: var(--page); }
.card { border-radius: 16px; border: 1px solid var(--line); box-shadow: 0 1px 3px rgba(15,23,42,.06); padding: 16px 20px; }
.ico { width: 20px; height: 20px; flex: none; }
.ico--sm { width: 16px; height: 16px; vertical-align: -3px; margin-right: 6px; }
.ico--strip { width: 18px; height: 18px; margin-right: 8px; }
.mono { font-family: "Cascadia Code", Consolas, ui-monospace, monospace; font-size: 12.5px; }
.so { font-family: "Cascadia Code", Consolas, ui-monospace, monospace; font-weight: 700; letter-spacing: .02em; }

/* section headers with a small coloured accent icon */
.sechead { display: flex; align-items: center; gap: 10px; }
.sechead__ico { width: 30px; height: 30px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; }
.sechead__ico .ico { width: 17px; height: 17px; }
.sechead__ico--amber { background: #fef3c7; color: #b45309; }
.sechead__ico--blue { background: var(--brand-100); color: var(--brand-700); }

.banner { border-radius: 16px; }

/* hero card */
.hero2 { padding: 0; overflow: hidden; border-radius: 16px; background: #fff; box-shadow: 0 4px 14px rgba(15,23,42,.08); }
.hero2--down { border: 1px solid #fecaca; background: #fff; }
.hero2--calm { border: 1px solid var(--brand-200); background: #fff; }
.hero2__strip { display: flex; align-items: center; padding: 10px 20px; color: #fff; font-weight: 700; font-size: 14px; }
.hero2--down .hero2__strip { background: linear-gradient(90deg, #dc2626, #f43f5e); }
.hero2--calm .hero2__strip { background: linear-gradient(90deg, var(--brand-700), var(--brand-500)); }
.hero2__inner { padding: 16px 20px 18px; }
.hero2__big { font-size: 25px; margin: 0 0 14px; }
.hero2--calm .hero2__big { font-size: 21px; }
.hero2__calmline { display: flex; align-items: center; margin: -6px 0 14px; }
.badge { display: inline-block; padding: 2px 12px; border-radius: 999px; font-weight: 800; white-space: nowrap; vertical-align: 2px; }
.badge--red { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.badge--blue { background: var(--brand-100); color: var(--brand-700); border: 1px solid var(--brand-200); }
.facts2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.fact { display: flex; gap: 10px; align-items: flex-start; background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.fact__ico { flex: none; width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.fact__ico .ico { width: 17px; height: 17px; }
.fact__ico--blue { background: var(--brand-100); color: var(--brand-700); }
.fact__ico--amber { background: #fef3c7; color: #b45309; }
.fact__ico--violet { background: #ede9fe; color: var(--violet); }
.fact__ico--green { background: #d1fae5; color: #047857; }
.fact__label { font-size: 12px; color: var(--muted); }
.fact__value { font-size: 14px; word-break: break-word; }
.mini { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mini li { display: flex; gap: 8px; align-items: flex-start; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 12px; padding: 8px 10px; font-size: 13px; color: #7c2d12; }
.mini__n { flex: none; width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, #f97316, #f59e0b); color: #fff; font-weight: 700; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }

/* KPI tiles: soft gradient fills, icon in a white circle */
.tiles { gap: 12px; }
.tile { position: relative; border: 0; border-radius: 16px; padding: 16px 18px; color: #fff; box-shadow: 0 4px 14px rgba(15,23,42,.10); justify-content: flex-end; min-height: 128px; }
.tile__ico { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; background: #fff; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(15,23,42,.12); }
.tile__label { color: rgba(255,255,255,.95); }
.tile--amber { background: linear-gradient(135deg, #f97316, #f59e0b); } .tile--amber .tile__ico { color: #ea580c; }
.tile--green { background: linear-gradient(135deg, #059669, #34d399); } .tile--green .tile__ico { color: #047857; }
.tile--violet { background: linear-gradient(135deg, #7c3aed, #a78bfa); } .tile--violet .tile__ico { color: #6d28d9; }
.tile--red { background: linear-gradient(135deg, #e11d48, #fb7185); } .tile--red .tile__ico { color: #be123c; }
.tile--grey { background: linear-gradient(135deg, #475569, #94a3b8); } .tile--grey .tile__ico { color: #334155; }
.tile .tile__value { color: #fff; font-size: 36px; }
.tile--red .tile__value { font-size: 30px; }
.tile--grey .tile__value { font-size: 24px; }

/* pill tabs */
.tabs__bar { border-bottom: 0; gap: 8px; margin: 0 0 14px; }
.tabs__tab { display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid var(--line); background: #fff; padding: 7px 14px; margin: 0; color: #334155; }
.tabs__tab .count { background: #f1f5f9; color: #334155; }
#tab-pending:checked ~ .tabs__bar .tabs__tab--pending { background: linear-gradient(135deg, #f97316, #f59e0b); color: #fff; border-color: transparent; }
#tab-replied:checked ~ .tabs__bar .tabs__tab--replied { background: linear-gradient(135deg, #059669, #34d399); color: #fff; border-color: transparent; }
#tab-mails:checked ~ .tabs__bar .tabs__tab--mails { background: linear-gradient(135deg, var(--brand-700), var(--brand-500)); color: #fff; border-color: transparent; }
#tab-pending:checked ~ .tabs__bar .tabs__tab--pending .count,
#tab-replied:checked ~ .tabs__bar .tabs__tab--replied .count,
#tab-mails:checked ~ .tabs__bar .tabs__tab--mails .count { background: rgba(255,255,255,.25); color: #fff; }
.tabs__actions .btn { display: inline-flex; align-items: center; }
.tabs__panel .table-wrap { max-height: 430px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.tabs__panel--pending .table th { background: #fff7ed; color: #9a3412; }
.tabs__panel--replied .table th { background: #ecfdf5; color: #065f46; }
.tabs__panel--mails .table th { background: var(--brand-50); color: var(--brand-900); }

/* tables: zebra + sticky header */
.table th { position: sticky; top: 0; z-index: 1; }
.table tbody tr:nth-child(even) td { background: #f8fafc; }
.table tbody tr:hover td { background: #eef4ff; }

/* status chips */
.pill { padding: 2px 10px; }
.pill--ok { background: #d1fae5; color: #047857; }
.pill--warn { background: #ffedd5; color: #c2410c; }
.pill--bad { background: #ffe4e6; color: #be123c; }
.pill--idle { background: #e2e8f0; color: #475569; }
.pill--review, .pill--violet { background: #ede9fe; color: #6d28d9; }

/* progress + server status */
.step__dot { border: 0; box-shadow: none; }
.step--done .step__dot { background: linear-gradient(135deg, #059669, #34d399); }
.step--now .step__dot { background: #fff; color: #d97706; box-shadow: inset 0 0 0 3px #f59e0b; }
.step--next .step__dot { background: #e2e8f0; color: #64748b; }
.srv__icon { width: 30px; height: 30px; }
.srv__row--ok .srv__icon { background: linear-gradient(135deg, #059669, #34d399); color: #fff; }
.srv__row--warn .srv__icon { background: linear-gradient(135deg, #f97316, #f59e0b); color: #fff; }
.srv__row--bad .srv__icon { background: linear-gradient(135deg, #e11d48, #fb7185); color: #fff; }
.srv__row--idle .srv__icon { background: #e2e8f0; color: #475569; }

.fold summary { display: flex; align-items: center; gap: 2px; }
.btn { border-radius: 10px; }

@media (max-width: 900px) {
  .mini { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .facts2 { grid-template-columns: 1fr; }
  .hero2__big { font-size: 20px; }
  .tile { min-height: 110px; }
  .tile .tile__value { font-size: 28px; }
  .tabs__panel .table-wrap { max-height: none; }
}

/* ---- how to use ---- */
.hero2__help { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: #fff; text-decoration: none; font-size: 12px; font-weight: 600; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35); padding: 3px 10px 3px 4px; border-radius: 999px; }
.hero2__help:hover { background: rgba(255,255,255,.3); }
.hero2__q, .infostrip__q { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: #fff; color: var(--brand-700); font-weight: 800; font-size: 12px; }
.infostrip { display: flex; align-items: center; gap: 8px; background: var(--brand-50); border: 1px solid var(--brand-200); color: var(--brand-900); border-radius: 12px; padding: 8px 14px; margin: -6px 0 14px; font-size: 13px; }
.infostrip__q { background: var(--brand-600); color: #fff; }
.infostrip a { font-weight: 700; }

.help__lead { font-size: 16px; margin: 0; }
.help p { margin: 6px 0 10px; }
.samples { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.sample p { margin: 6px 2px 0; font-size: 13px; color: #334155; }
.sample__bar { color: #fff; font-weight: 700; border-radius: 12px; padding: 12px 14px; font-size: 14px; min-height: 64px; display: flex; align-items: center; }
.help-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mini--stack { grid-template-columns: 1fr; }
.sechead__ico--red { background: #ffe4e6; color: #be123c; }
.sechead__ico--violet { background: #ede9fe; color: #6d28d9; }
.sechead__ico--green { background: #d1fae5; color: #047857; }
.legend2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lg { display: flex; gap: 10px; align-items: flex-start; border-radius: 14px; padding: 12px; color: #fff; font-size: 13px; }
.lg strong { font-size: 14px; }
.lg__dot { flex: none; width: 34px; height: 34px; border-radius: 50%; background: #fff; display: inline-flex; align-items: center; justify-content: center; }
.lg__dot .ico { width: 17px; height: 17px; }
.lg--amber { background: linear-gradient(135deg, #f97316, #f59e0b); } .lg--amber .lg__dot { color: #ea580c; }
.lg--green { background: linear-gradient(135deg, #059669, #34d399); } .lg--green .lg__dot { color: #047857; }
.lg--violet { background: linear-gradient(135deg, #7c3aed, #a78bfa); } .lg--violet .lg__dot { color: #6d28d9; }
.lg--red { background: linear-gradient(135deg, #e11d48, #fb7185); } .lg--red .lg__dot { color: #be123c; }
.help__list { list-style: none; margin: 0; padding: 0; }
.help__list li { padding: 8px 0; border-bottom: 1px solid #eef0f4; }
.help__list li:last-child { border-bottom: 0; }
.help__list .pill { margin-right: 8px; }
.help__steps { margin: 0; padding-left: 0; list-style: none; counter-reset: hs; }
.help__steps li { counter-increment: hs; position: relative; padding: 6px 0 6px 36px; }
.help__steps li::before { content: counter(hs); position: absolute; left: 0; top: 5px; width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, #059669, #34d399); color: #fff; font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.remember { border-radius: 16px; padding: 16px 20px; margin-bottom: 16px; background: linear-gradient(135deg, #fff7ed, #fffbeb); border: 2px solid #f59e0b; color: #78350f; }
.remember__head { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 17px; color: #b45309; }
.remember ul { margin: 8px 0 0; padding-left: 22px; font-size: 15px; }
.remember li { margin: 4px 0; }

@media (max-width: 900px) {
  .samples { grid-template-columns: 1fr 1fr; }
  .help-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .samples, .legend2 { grid-template-columns: 1fr; }
  .hero2__help { font-size: 0; padding: 3px; }
  .hero2__help .hero2__q { font-size: 12px; }
}

/* ---- Mail Desk fonts: Inter for text, JetBrains Mono for numbers, refs and SO numbers ---- */
body, button, input, select, textarea { font-family: var(--font-sans); }
code, .mono, .so, .mailcard__ref, .count { font-family: var(--font-mono); }
.mono { font-size: 12.5px; }
.so { font-weight: 700; letter-spacing: 0; }

/* ---- hero: last mail received / last reply sent ---- */
.points { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 8px; }
.point { border-radius: 12px; padding: 10px 14px; background: #f8fafc; border: 1px solid var(--line); border-left: 5px solid var(--idle); min-width: 0; }
.point--in { border-left-color: #dc2626; background: #fff5f5; }
.point--out { border-left-color: #059669; background: #f0fdf4; }
.hero2--calm .point--in { border-left-color: var(--brand-600); background: var(--brand-50); }
.point__label { font-size: 12px; font-weight: 600; color: #475569; display: flex; align-items: center; }
.point--in .point__label { color: #b91c1c; }
.point--out .point__label { color: #047857; }
.hero2--calm .point--in .point__label { color: var(--brand-700); }
.point__ref { font-family: var(--font-mono); font-weight: 700; font-size: 20px; color: #111827; margin: 2px 0 2px; }
.point__line { font-size: 13px; color: #334155; word-break: break-word; }
.point__subject { color: #111827; font-weight: 500; }
.point__none { font-size: 13px; color: var(--muted); margin-top: 4px; }
.points__note { font-size: 13px; color: #475569; margin: 0 0 10px; }
.hero2__big { margin-bottom: 10px; font-size: 23px; }
.mini li { padding: 6px 10px; }
.help__diff { background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 13px; }
@media (max-width: 640px) {
  .points { grid-template-columns: 1fr; }
}

/* ===================== read a mail ===================== */
.mailview { max-width: 900px; margin: 0 auto; }
.mailview__nav { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.mailview__pager { display: flex; gap: 8px; }
.btn--disabled { opacity: .45; pointer-events: none; }
.mailcard2 { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: 0 4px 14px rgba(15,23,42,.08); margin-bottom: 12px; }
.mailcard2__strip { display: flex; align-items: center; gap: 4px; padding: 12px 20px; color: #fff; font-weight: 700; }
.mailcard2--received .mailcard2__strip { background: linear-gradient(90deg, var(--brand-700), var(--brand-500)); }
.mailcard2--sent .mailcard2__strip { background: linear-gradient(90deg, #047857, #34d399); }
.mailcard2__ref { margin-left: 8px; font-family: var(--font-mono); background: rgba(255,255,255,.2); border-radius: 999px; padding: 1px 10px; font-size: 13px; }
.mailcard2__pos { margin-left: auto; font-weight: 500; font-size: 12px; opacity: .9; }
.mailcard2__head { display: grid; grid-template-columns: 110px 1fr; gap: 6px 14px; margin: 0; padding: 16px 20px; border-bottom: 1px solid var(--line); font-size: 14px; }
.mailcard2__head dt { color: var(--muted); }
.mailcard2__head dd { margin: 0; word-break: break-word; }
.mailcard2__subject { font-weight: 700; font-size: 16px; color: #111827; }
.mailcard2__body { white-space: pre-wrap; word-break: break-word; font-family: var(--font-sans); font-size: 15px; line-height: 1.6; color: #1f2937; padding: 18px 20px 22px; margin: 0; background: #fcfdff; }
.mailcard2__none { padding: 18px 20px; color: #92400e; background: #fffbeb; }

.point__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
a.point__ref { text-decoration: none; color: #111827; }
a.point__ref:hover { text-decoration: underline; }
.btn--read { display: inline-flex; align-items: center; padding: 3px 10px; min-height: 28px; font-size: 12px; }
.reflink { font-weight: 700; color: var(--brand-700); text-decoration: none; border-bottom: 1px dashed var(--brand-300); }
.reflink:hover { color: var(--brand-900); border-bottom-style: solid; }

/* small count next to "Status" in the top bar while Mail Desk is down */
.nav__badge { display: inline-block; min-width: 18px; margin-left: 6px; padding: 0 5px; border-radius: 999px; background: #f43f5e; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; vertical-align: 1px; }
