/* Quiet retro console: paper, ink, one accent, hairlines. No shadows, no gradients. */
/* Dark is the default and only theme: charcoal, warm ink, amber accent, whatever the device prefers. */
:root {
  color-scheme: dark;
  --paper: #1a1916; --card: #22201c; --side: #151412; --ink: #e5decd; --muted: #9a9384; --line: #3b3831;
  --accent: #d2a24a; --accent-ink: #1a1916; --ok: #86b98f; --warn: #d9b25a; --fail: #dd8a82; --run: #8fb3d6;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
  --r: 10px; --side-w: 236px;
}
* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; color: var(--ink); background: var(--paper); font: 14px/1.55 var(--mono); -webkit-text-size-adjust: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2 { margin: 0; font-weight: 600; letter-spacing: .02em; }
h1 { font-size: 20px; display: flex; align-items: center; gap: 10px; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 12px; }
p { margin: 10px 0; max-width: 72ch; }
small { color: var(--muted); }
.muted { color: var(--muted); }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---- shell: sidebar + content */
body.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 22px; padding: 20px 14px 16px;
  background: var(--side); border-right: 3px double var(--line); }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; color: var(--ink); text-decoration: none; }
.mark { display: inline-block; padding: 2px 8px; border: 1px solid var(--ink); border-radius: 7px; font-weight: 600; letter-spacing: .08em; }
.brand .name { display: flex; flex-direction: column; line-height: 1.25; text-transform: uppercase; letter-spacing: .07em; font-size: 13px; }
.brand small { text-transform: none; letter-spacing: 0; font-size: 12px; }
.side nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.side nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: var(--r); border: 1px solid transparent;
  color: var(--ink); text-decoration: none; letter-spacing: .03em; }
.side nav a:hover { border-color: var(--line); }
.side nav a.on { background: var(--card); border-color: var(--ink); }
.side nav a.on .ic { color: var(--accent); }
.who { display: flex; flex-direction: column; gap: 9px; margin: 0; padding-top: 14px; border-top: 1px dashed var(--line); }
.who .mail { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 4px; }
.who .btn { justify-content: center; }

.content { min-width: 0; display: flex; flex-direction: column; }
main { width: 100%; max-width: 1180px; margin: 0 auto; padding: 24px 28px 8px; flex: 1; }
footer { width: 100%; max-width: 1180px; margin: 0 auto; padding: 14px 28px 26px; color: var(--muted); font-size: 12px; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px;
  padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.crumb { color: var(--muted); text-decoration: none; } .crumb:hover { color: var(--ink); }

/* ---- signed-out pages */
.solo { padding: 22px 28px; text-transform: uppercase; letter-spacing: .07em; }
.solo small { text-transform: none; letter-spacing: 0; }
body.bare main { padding-top: 6vh; }

/* ---- blocks */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; margin-bottom: 18px; }
.card.narrow { max-width: 520px; margin-left: auto; margin-right: auto; }
.card.form { max-width: 640px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.row h2 { margin-bottom: 0; }
.row.wrap { justify-content: flex-start; flex-wrap: wrap; margin-bottom: 0; }
.row.end { justify-content: flex-end; margin: 18px 0 0; }
.row form { margin: 0; }

/* six tiles: 3 x 2, never 5 + 1 */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
@media (min-width: 1500px) { .tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 13px 15px; display: flex; flex-direction: column; gap: 3px; }
.tile .k { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.tile .k .ic { width: 16px; height: 16px; }
.tile .v { font-size: 23px; font-variant-numeric: tabular-nums; }
.tile .h { color: var(--muted); font-size: 12px; }
.tile.bad { border-color: var(--fail); } .tile.bad .v, .tile.bad .k { color: var(--fail); }

.btn { display: inline-flex; align-items: center; gap: 8px; font: inherit; cursor: pointer; text-decoration: none; padding: 8px 16px;
  border-radius: var(--r); border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); letter-spacing: .03em; white-space: nowrap; }
.btn:hover { filter: brightness(1.08); }
.btn.quiet { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.quiet:hover { background: var(--line); filter: none; }
.btn.quiet { border-color: var(--muted); }
.btn.small { padding: 3px 10px; font-size: 12px; gap: 6px; border-radius: 8px; }
.btn.small .ic { width: 14px; height: 14px; }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.btn.quiet:disabled:hover { background: transparent; }
.btn:focus-visible, .field:focus-visible, .side nav a:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.field { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 7px 10px; }
.stack { display: grid; gap: 16px; margin-top: 16px; }
fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px 16px; margin: 0; display: grid; gap: 14px; }
legend { display: flex; align-items: center; gap: 8px; padding: 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.stack label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.stack .field { font-size: 14px; text-transform: none; letter-spacing: 0; max-width: 320px; }

.scroll { overflow-x: auto; }
.scroll.tall { max-height: 520px; overflow-y: auto; }
.scroll.tall thead th { position: sticky; top: 0; background: var(--card); }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th { text-align: left; font-weight: 500; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  padding: 6px 10px; border-bottom: 1px solid var(--ink); white-space: nowrap; }
td { padding: 6px 10px; border-bottom: 1px dashed var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
.n { text-align: right; }
td.name { white-space: nowrap; }
td.act { text-align: right; width: 1%; } td.act form { margin: 0; }
td.clip { max-width: 460px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 1px 10px; border-radius: 999px; border: 1px solid var(--line);
  font-size: 12px; color: var(--muted); white-space: nowrap; text-decoration: none; }
.pill .ic { width: 12px; height: 12px; }
.pill.ok { color: var(--ok); border-color: var(--ok); }
.pill.warn { color: var(--warn); border-color: var(--warn); }
.pill.fail, .pill.failed { color: var(--fail); border-color: var(--fail); }
.pill.run, .pill.running, .pill.queued { color: var(--run); border-color: var(--run); }
.head .pill { padding: 4px 12px; }

.note { border: 1px solid var(--line); border-left-width: 4px; border-radius: var(--r); padding: 9px 12px; }
.note.ok { border-color: var(--ok); } .note.warn { border-color: var(--warn); } .note.fail { border-color: var(--fail); }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 18px; margin: 0 0 14px; }
.facts dt { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.facts dd { margin: 0; }
.log { margin: 0; padding: 14px; min-height: 180px; max-height: 62vh; overflow: auto; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--r); font: 12.5px/1.5 var(--mono); white-space: pre-wrap; word-break: break-word; }

dialog { border: 1px solid var(--ink); border-radius: var(--r); background: var(--card); color: var(--ink); padding: 20px 22px;
  max-width: 440px; width: calc(100% - 32px); font: inherit; }
dialog::backdrop { background: rgba(20, 18, 14, .55); }
dialog .q { margin: 0; font-size: 15px; }
dialog .btn { min-width: 84px; justify-content: center; }

/* ---- narrow screens: the sidebar becomes a top strip */
@media (max-width: 820px) {
  body.app { display: block; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 16px;
    border-right: 0; border-bottom: 3px double var(--line); }
  .side nav { flex-direction: row; flex-wrap: wrap; order: 3; flex-basis: 100%; }
  .side nav a { padding: 6px 10px; }
  .who { flex-direction: row; align-items: center; border-top: 0; padding-top: 0; margin-left: auto; }
  .who .mail { display: none; }
  main, footer { padding-left: 16px; padding-right: 16px; }
  .tile .v { font-size: 20px; }
}

/* ---- logo, sidebar job strip, banner */
.logo { flex: none; border-radius: 10px; display: block; }
.brand { gap: 12px; }
.solo { display: flex; align-items: center; gap: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
.side-job { display: flex; flex-direction: column; gap: 7px; padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--card); color: var(--ink); text-decoration: none; font-size: 12px; }
.side-job:hover { border-color: var(--accent); }
.side-job[hidden] { display: none; }
.side-job-top { display: flex; align-items: center; gap: 8px; }
.side-job-top #side-job-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-job-top #side-job-pct { color: var(--accent); font-variant-numeric: tabular-nums; }
.side-job-msg { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.banner { padding: 10px 28px; background: var(--fail); color: #1a1916; font-weight: 600; }
.banner[hidden] { display: none; }

/* ---- progress */
.bar { position: relative; height: 14px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); overflow: hidden; }
.bar.thin { height: 6px; display: block; }
.bar .fill { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--accent); position: relative; overflow: hidden; }
.bar .fill::after { content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(110deg, transparent 0 35%, rgba(255, 244, 214, .38) 50%, transparent 65% 100%);
  background-size: 220px 100%; background-repeat: no-repeat; animation: sweep 1.9s linear infinite; }
@keyframes sweep { from { background-position: -220px 0; } to { background-position: calc(100% + 220px) 0; } }
.prog { border-color: var(--accent); }
.prog.queued .fill::after, .prog.queued .dot { animation-duration: 3.2s; }
.prog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.prog-title { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; min-width: 0; }
.prog-title > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prog-pct { font-size: 22px; color: var(--accent); font-variant-numeric: tabular-nums; }
.prog-sub { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 10px; color: var(--muted); font-size: 13px; }
.prog-time { font-variant-numeric: tabular-nums; }
.more { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 4px 10px; font: inherit; font-size: 12px; cursor: pointer;
  color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 8px; }
.more:hover { border-color: var(--muted); }
.more .ic { width: 14px; height: 14px; transition: transform .2s ease; }
.more[aria-expanded="true"] .ic { transform: rotate(180deg); }
.prog-detail { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); display: grid; gap: 12px; justify-items: start; }
.prog-detail[hidden] { display: none; }
.log.small { min-height: 0; max-height: 190px; width: 100%; font-size: 12px; }
.chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0; width: 100%; }
.chips > div { border: 1px solid var(--line); border-radius: var(--r); padding: 8px 12px; min-width: 0; }
.chips dt { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.chips dd { margin: 2px 0 0; font-size: 15px; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- result dialog */
dialog.done { text-align: center; max-width: 460px; padding: 28px 26px 22px; }
dialog[open] { animation: pop .22s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
.done-icon { display: flex; justify-content: center; margin-bottom: 12px; }
.big { width: 64px; height: 64px; fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; display: none; }
.done.ok .big.ok, .done.warn .big.warn, .done.fail .big.fail { display: block; }
.big.ok { stroke: var(--ok); } .big.warn { stroke: var(--warn); } .big.fail { stroke: var(--fail); }
.big path { stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .5s .15s ease-out forwards; }
.big.warn path:first-child { stroke-dasharray: 130; stroke-dashoffset: 130; }
@keyframes draw { to { stroke-dashoffset: 0; } }
dialog.done h2 { font-size: 17px; text-transform: none; letter-spacing: .02em; margin-bottom: 6px; }
.done-lead { margin: 0 auto 16px; color: var(--muted); }
.done-facts { display: grid; grid-template-columns: 1fr auto; gap: 6px 18px; margin: 0 0 6px; padding: 12px 14px; text-align: left;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); }
.done-facts:empty { display: none; }
.done-facts dt { color: var(--muted); } .done-facts dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
dialog.done .row.end { justify-content: center; }

/* ---- table tools */
.row.between { justify-content: space-between; margin-bottom: 12px; }
.tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.chip { font: inherit; font-size: 12px; padding: 6px 11px; cursor: pointer; background: transparent; color: var(--muted); border: 0; border-right: 1px solid var(--line); }
.chip:last-child { border-right: 0; }
.chip:hover { color: var(--ink); }
.chip.on { background: var(--accent); color: var(--accent-ink); }
.count { display: inline-block; margin-left: 6px; padding: 0 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.sort { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-transform: inherit; letter-spacing: inherit; }
.sort:hover { color: var(--ink); }
.sort.asc::after { content: " \2191"; color: var(--accent); } .sort.desc::after { content: " \2193"; color: var(--accent); }
td.name a { color: var(--ink); text-decoration: none; border-bottom: 1px dotted var(--muted); }
td.name a:hover { color: var(--accent); border-color: var(--accent); }
tr.current td { background: rgba(210, 162, 74, .09); }
tr.current td.name::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.2s ease-in-out infinite; }
tr.flash td { animation: flash 1.6s ease-out; }
@keyframes flash { from { background: rgba(134, 185, 143, .22); } to { background: transparent; } }
tbody tr[data-box]:hover td { background: rgba(229, 222, 205, .035); }

/* ---- restore */
.steps { list-style: none; display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 18px; padding: 0; }
.steps li { display: flex; align-items: center; gap: 9px; padding: 7px 14px 7px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 13px; }
.steps .num { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); font-size: 12px; }
.steps li.on { color: var(--ink); border-color: var(--accent); }
.steps li.on .num { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.steps li.past .num { border-color: var(--ok); color: var(--ok); }
.split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.split > .card.form { max-width: none; }
.side-note .plain { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 8px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stack label .ic { width: 14px; height: 14px; vertical-align: -2px; }
.lead { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 16px; }
.big-num { font-size: 46px; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.big-num.good { color: var(--ok); } .big-num.bad { color: var(--warn); }
.lead-text { font-size: 16px; display: flex; flex-direction: column; gap: 4px; }
.lead-text small { font-size: 13px; }
.review h2 { margin-top: 20px; }
.review .chips { margin-bottom: 4px; }
.approve { margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--line); }
#countdown { color: var(--accent); font-variant-numeric: tabular-nums; } #countdown.soon { color: var(--fail); }
th .ic { width: 13px; height: 13px; vertical-align: -2px; }

/* ---- mailbox page */
.tiles.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tile .v.small { font-size: 18px; }
.lastline { margin: 14px 0 0; max-width: none; font-size: 12.5px; word-break: break-word; }
table.bars td.name { display: flex; align-items: center; gap: 8px; white-space: normal; word-break: break-word; }
table.bars td.meter { width: 38%; }
meter { width: 100%; height: 8px; border: 0; background: var(--paper); border-radius: 999px; }
meter::-webkit-meter-bar { background: var(--paper); border: 1px solid var(--line); border-radius: 999px; height: 8px; }
meter::-webkit-meter-optimum-value { background: var(--accent); border-radius: 999px; }
meter::-moz-meter-bar { background: var(--accent); border-radius: 999px; }

@media (max-width: 980px) { .split { grid-template-columns: 1fr; } .tiles.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) { .side-job { order: 4; flex-basis: 100%; } .banner { padding: 10px 16px; } .big-num { font-size: 36px; } }
@media (prefers-reduced-motion: reduce) { *, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; } }

/* ---- sign-in page: one centred card */
.auth { min-height: calc(100vh - 8px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 24px 16px; }
body.bare main:has(.auth) { max-width: none; padding: 0; }
.auth-card { width: 100%; max-width: 400px; padding: 36px 32px 28px; text-align: center; background: var(--card);
  border: 1px solid var(--line); border-radius: 16px; display: flex; flex-direction: column; align-items: center; }
.auth-logo { border-radius: 18px; margin-bottom: 18px; }
.auth-card h1 { display: block; font-size: 22px; letter-spacing: .08em; text-transform: uppercase; }
.auth-sub { margin: 4px 0 26px; color: var(--muted); }
.auth-btn { width: 100%; justify-content: center; padding: 12px 16px; font-size: 15px; gap: 12px; }
.auth-btn .g { width: 18px; height: 18px; fill: currentColor; flex: none; }
.auth-points { list-style: none; margin: 26px 0 0; padding: 20px 0 0; width: 100%; border-top: 1px dashed var(--line);
  display: grid; gap: 10px; text-align: left; color: var(--muted); font-size: 13px; }
.auth-points li { display: flex; align-items: center; gap: 10px; }
.auth-points .ic { width: 16px; height: 16px; color: var(--accent); }
.auth-card .note { width: 100%; text-align: left; }
.auth-foot { margin: 0; color: var(--muted); font-size: 12px; text-align: center; }

/* ---- why "in backup" and "on mail server" differ */
td.c-gap { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
td.c-gap.todo { color: var(--warn); }

/* =================== polish pass =================== */
:root { --orange: #f0883e; --teal: #7fb3ae; }

/* sign-in: a logo and one button, nothing else */
.auth-card { max-width: 360px; padding: 44px 36px 40px; gap: 30px; border-radius: 20px; }
.auth-logo { margin: 0; border-radius: 22px; }
.auth-btn { padding: 13px 16px; }
.solo { padding: 22px 28px; }

/* encryption strip on the dashboard */
.secure { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; padding: 11px 16px;
  border: 1px solid rgba(134, 185, 143, .45); border-radius: var(--r); background: rgba(134, 185, 143, .07); }
.secure-badge { display: inline-flex; align-items: center; gap: 7px; padding: 3px 12px; border-radius: 999px; background: var(--ok);
  color: #14130f; font-weight: 600; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.secure-badge .ic { width: 14px; height: 14px; stroke-width: 2.2; }
.secure-text { color: var(--ink); font-size: 13px; flex: 1; min-width: 240px; }

/* difference tags: orange = on the server but not in the backup yet */
.tag { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: 12px; white-space: nowrap; border: 1px solid transparent; }
.tag.todo { color: var(--orange); border-color: var(--orange); background: rgba(240, 136, 62, .12); font-weight: 600; }
.tag.kept { color: var(--teal); border-color: rgba(127, 179, 174, .5); }
.tag.same { color: var(--muted); }

/* rhythm: one spacing scale across cards, forms and the restore steps */
main { padding: 28px 32px 12px; }
.head { margin-bottom: 22px; padding-bottom: 14px; }
.card { padding: 22px 24px; margin-bottom: 20px; }
.card > h2 { margin-bottom: 16px; }
.tiles { gap: 14px; margin-bottom: 20px; }
.tile { padding: 15px 17px; gap: 5px; }
.row.wrap { gap: 12px; }
.card > p:last-child, .card > .note:last-child { margin-bottom: 0; }
.note { margin: 0 0 16px; }

.steps { gap: 10px; margin: 0 0 22px; }
.steps li { padding: 8px 16px 8px 9px; }
.split { gap: 20px; }
.split > .card { margin-bottom: 0; }
.split { margin-bottom: 20px; }

.form-wide { display: grid; gap: 22px; }
.fld { display: grid; gap: 8px; }
.cap { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .07em; }
.cap .ic { width: 15px; height: 15px; color: var(--accent); }
.cap em { margin-left: auto; font-style: normal; text-transform: none; letter-spacing: 0; padding: 0 8px; border: 1px solid var(--line); border-radius: 999px; }
.form-wide .field { width: 100%; max-width: none; padding: 10px 12px; font-size: 14px; }
.hint { color: var(--muted); font-size: 12px; }
.pair { gap: 14px; }
.mini { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.actions { padding-top: 6px; border-top: 1px dashed var(--line); margin-top: 2px; padding-top: 20px; }

.how { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 14px; }
.how li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; }
.how .num { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--accent); color: var(--accent); font-size: 12px; }
.facts-list { list-style: none; margin: 0; padding: 18px 0 0; border-top: 1px dashed var(--line); display: grid; gap: 10px; color: var(--muted); font-size: 13px; }
.facts-list li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; }
.facts-list .ic { width: 16px; height: 16px; color: var(--ok); margin-top: 2px; }

.review { display: grid; gap: 22px; }
.review > * { margin: 0; }
.review .lead { margin: 0; gap: 20px; }
.review h2 { margin: 0 0 -8px; }
.review .chips { margin: 0; }
.approve { margin: 0; padding-top: 22px; display: grid; gap: 14px; }
.approve > * { margin: 0; }
.prog { padding: 22px 24px; }
.prog-head { margin-bottom: 14px; }
.prog-sub { margin-top: 12px; }
.more { margin-top: 14px; }

@media (max-width: 820px) { main { padding: 20px 16px 8px; } }

/* "Encrypted" pill, bottom right of every signed-in page; opens a small dialog */
.secure-pill { position: fixed; right: 20px; bottom: 20px; z-index: 5; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px 8px 13px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 12.5px; letter-spacing: .06em;
  color: var(--ok); background: var(--card); border: 1px solid rgba(134, 185, 143, .55); }
.secure-pill:hover { background: rgba(134, 185, 143, .12); border-color: var(--ok); }
.secure-pill:focus-visible { outline: 2px solid var(--ok); outline-offset: 2px; }
.secure-pill .ic { width: 15px; height: 15px; stroke-width: 2; }
.secure-list { list-style: none; margin: 4px 0 6px; padding: 14px 16px; display: grid; gap: 11px; text-align: left;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); font-size: 13.5px; }
.secure-list li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; }
.secure-list .ic { width: 16px; height: 16px; color: var(--ok); margin-top: 3px; }
#secure .big path { stroke-dasharray: 120; stroke-dashoffset: 120; }
footer { padding-right: 150px; }
@media (max-width: 820px) { .secure-pill { right: 12px; bottom: 12px; } footer { padding-right: 16px; padding-bottom: 64px; } }

/* =================== phones =================== */
@media (max-width: 820px) {
  .side { gap: 10px 12px; padding: 10px 14px 0; }
  .brand .name small { display: none; }
  .who .btn span { display: none; }                      /* sign out: icon only */
  .who .btn { padding: 8px 10px; }
  .side nav { order: 5; flex-basis: calc(100% + 28px); margin: 0 -14px; padding: 0 14px 8px; flex-wrap: nowrap; overflow-x: auto;
    scrollbar-width: none; gap: 6px; }
  .side nav::-webkit-scrollbar { display: none; }
  .side nav a { flex: none; padding: 7px 12px; }
  .side-job { order: 4; margin-bottom: 4px; }
  .head { margin-bottom: 16px; }
  h1 { font-size: 18px; flex-wrap: wrap; word-break: break-word; }
  .card { padding: 16px; margin-bottom: 14px; }
  .tiles { gap: 10px; margin-bottom: 14px; }
  .tile { padding: 12px 13px; }
  .steps { gap: 6px; margin-bottom: 16px; }
  .steps li { padding: 6px 12px 6px 7px; font-size: 12px; }
  .steps li:not(.on) span:last-child { display: none; }  /* only the current step keeps its label */
  .steps li:not(.on) { padding-right: 7px; }
  .split { gap: 14px; margin-bottom: 14px; }
  .row.between { align-items: stretch; flex-direction: column; }
  .tools { width: 100%; }
  .tools .seg { width: 100%; }
  .tools .chip { flex: 1; padding: 7px 4px; }
  .tools .field { width: 100%; }
  .row.wrap > form, .row.wrap > a.btn { flex: 1 1 100%; }
  .row.wrap > form .btn, .row.wrap > a.btn { width: 100%; justify-content: center; }
  td.act .btn { width: auto; }
  .lead { gap: 12px; }
  .lead-text { font-size: 15px; }
  .chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts { grid-template-columns: 1fr; gap: 0 0; }
  .facts dd { margin-bottom: 8px; }
  .prog-pct { font-size: 19px; }
  .prog-title { font-size: 14px; }
  dialog { padding: 18px; }
  dialog.done { padding: 22px 18px 18px; }
  dialog .row.end { flex-wrap: wrap; }
  dialog .row.end .btn { flex: 1; justify-content: center; }
  .pair { grid-template-columns: 1fr; }
  .auth-card { padding: 36px 24px 32px; }
}
@media (max-width: 640px) {
  /* mailbox table: name, in backup, difference, status, action */
  #boxes th:nth-child(3), #boxes td:nth-child(3), #boxes th:nth-child(6), #boxes td:nth-child(6) { display: none; }
  #boxes td.act .btn span { display: none; }
  #boxes td.act .btn { padding: 6px 8px; }
  #boxes th, #boxes td { padding: 7px 6px; }
  #boxes td.name { white-space: normal; word-break: break-word; }
  .tag { white-space: normal; text-align: center; }
  table:not(#boxes) th:nth-child(5), table:not(#boxes) td:nth-child(5) { display: none; }   /* job tables: hide "By" */
  td.clip { max-width: 160px; }
  .tiles.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* the pill sits top right, clear of every table and button */
.secure-pill { top: 24px; right: 32px; bottom: auto; padding: 6px 14px 6px 11px; }
.head { padding-right: 150px; min-height: 46px; }
footer { padding-right: 32px; }
@media (max-width: 820px) {
  .secure-pill { top: 13px; right: 62px; bottom: auto; padding: 5px 12px 5px 9px; font-size: 12px; }
  .head { padding-right: 0; min-height: 0; }
  footer { padding-right: 16px; padding-bottom: 26px; }
}
@media (max-width: 370px) { .brand .name { display: none; } }

/* the pill belongs to the page head: it scrolls away with it instead of floating over content */
.secure-pill { position: absolute; }
