/*
 * Handpost mock demo — restyled with the Handpost tokens (copied from src/renderer/styles/tokens.css;
 * scripts/verify-website.mjs checks they match). Self-hosted fonts only.
 */
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/instrument-serif-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/instrument-sans-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/instrument-sans-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/instrument-sans-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2');
}

:root,
[data-theme='light'] {
  --hp-bg-canvas: #f4efe6;
  --hp-bg-surface: #fffcf6;
  --hp-bg-sunken: #ebe4d6;
  --hp-bg-sidebar: #ece5d7;
  --hp-bg-inverse: #1d1a15;
  --hp-line-default: #ddd3c1;
  --hp-line-strong: #c3b7a1;
  --hp-text-primary: #1d1a15;
  --hp-text-secondary: #5a5246;
  --hp-text-muted: #6b6355;
  --hp-text-inverse: #fffcf6;
  --hp-accent-ink: #2340a0;
  --hp-accent-ink-soft: #e2e7f7;
  --hp-accent-on-ink: #ffffff;
  --hp-brand-red: #b8351f;
  --hp-brand-red-soft: #f8e0d8;
  --hp-brand-blue: #2340a0;
  --hp-status-ok: #276b43;
  --hp-status-ok-soft: #dceee2;
  --hp-status-warn: #865410;
  --hp-status-warn-soft: #f5e6c8;
  --hp-status-danger: #b42318;
  --hp-status-danger-soft: #f7dcd7;
  --hp-shadow-color: 29 26 21;
  color-scheme: light;
}
[data-theme='dark'] {
  --hp-bg-canvas: #15130f;
  --hp-bg-surface: #1e1b16;
  --hp-bg-sunken: #100e0b;
  --hp-bg-sidebar: #1a1713;
  --hp-bg-inverse: #f2ece1;
  --hp-line-default: #332e26;
  --hp-line-strong: #4a4337;
  --hp-text-primary: #f2ece1;
  --hp-text-secondary: #b9af9f;
  --hp-text-muted: #9a907f;
  --hp-text-inverse: #1d1a15;
  --hp-accent-ink: #8ea6ff;
  --hp-accent-ink-soft: #1e2645;
  --hp-accent-on-ink: #0f1530;
  --hp-brand-red: #f0674f;
  --hp-brand-red-soft: #3a1d17;
  --hp-brand-blue: #8ea6ff;
  --hp-status-ok: #5bc489;
  --hp-status-ok-soft: #16301f;
  --hp-status-warn: #e6a945;
  --hp-status-warn-soft: #33270f;
  --hp-status-danger: #f2786d;
  --hp-status-danger-soft: #3a1714;
  --hp-shadow-color: 0 0 0;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --hp-bg-canvas: #15130f;
    --hp-bg-surface: #1e1b16;
    --hp-bg-sunken: #100e0b;
    --hp-bg-sidebar: #1a1713;
    --hp-bg-inverse: #f2ece1;
    --hp-line-default: #332e26;
    --hp-line-strong: #4a4337;
    --hp-text-primary: #f2ece1;
    --hp-text-secondary: #b9af9f;
    --hp-text-muted: #9a907f;
    --hp-text-inverse: #1d1a15;
    --hp-accent-ink: #8ea6ff;
    --hp-accent-ink-soft: #1e2645;
    --hp-accent-on-ink: #0f1530;
    --hp-brand-red: #f0674f;
    --hp-brand-red-soft: #3a1d17;
    --hp-brand-blue: #8ea6ff;
    --hp-status-ok: #5bc489;
    --hp-status-ok-soft: #16301f;
    --hp-status-warn: #e6a945;
    --hp-status-warn-soft: #33270f;
    --hp-status-danger: #f2786d;
    --hp-status-danger-soft: #3a1714;
    --hp-shadow-color: 0 0 0;
    color-scheme: dark;
  }
}
:root {
  --hp-font-display: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --hp-font-ui: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif;
  --hp-font-mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', monospace;
  --hp-radius-sm: 6px;
  --hp-radius-md: 8px;
  --hp-radius-lg: 12px;
  --hp-radius-pill: 999px;
  --hp-shadow-raise: 0 1px 2px rgb(var(--hp-shadow-color) / 0.06);
  --hp-shadow-float: 0 12px 40px rgb(var(--hp-shadow-color) / 0.12);
  --hp-airmail: repeating-linear-gradient(
    -55deg,
    var(--hp-brand-red) 0 11px,
    transparent 11px 22px,
    var(--hp-brand-blue) 22px 33px,
    transparent 33px 44px
  );
  --hp-platform-on: #ffffff;
  --hp-platform-x: #14171a;
  --hp-platform-linkedin: #0a5fb4;
  --hp-platform-bluesky: #0756c4;
  --hp-platform-instagram: #a82a78;
  --banner: 40px;
}

/* ---------- Base ---------- */
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  margin: 0;
}
body {
  background: var(--hp-bg-canvas);
  color: var(--hp-text-primary);
  font: 14px/1.5 var(--hp-font-ui);
  -webkit-font-smoothing: antialiased;
}
button {
  font: inherit;
  color: inherit;
}
a {
  color: var(--hp-accent-ink);
}
:focus-visible {
  outline: 2px solid var(--hp-accent-ink);
  outline-offset: 2px;
}
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.icon {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.eyebrow {
  margin: 0;
  font: 500 11px/1.3 var(--hp-font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hp-brand-red);
}
.airmail {
  height: 6px;
  background: var(--hp-airmail);
}

/* ---------- Banner ---------- */
.simulation-banner {
  height: var(--banner);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 20px;
  background: var(--hp-status-warn-soft);
  border-bottom: 1px solid var(--hp-line-default);
  color: var(--hp-status-warn);
  font: 500 12px var(--hp-font-mono);
  letter-spacing: 0.03em;
}
.simulation-banner > div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.simulation-banner i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.simulation-banner span {
  color: var(--hp-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.simulation-banner a {
  flex: none;
  color: var(--hp-accent-ink);
  font-family: var(--hp-font-ui);
  font-weight: 500;
  text-decoration: none;
}

/* ---------- Shell & sidebar (app sidebar, 232 px) ---------- */
.demo-shell {
  height: calc(100% - var(--banner));
  min-height: 620px;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
}
.sidebar {
  display: flex;
  flex-direction: column;
  padding: 20px 14px 16px;
  background: var(--hp-bg-sidebar);
  border-right: 1px solid var(--hp-line-default);
  z-index: 10;
}
.demo-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 26px;
  color: var(--hp-text-primary);
  text-decoration: none;
}
.demo-brand span {
  font: 26px/1 var(--hp-font-display);
  letter-spacing: -0.01em;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar nav button {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--hp-radius-md);
  background: transparent;
  color: var(--hp-text-secondary);
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
.sidebar nav button:hover {
  background: color-mix(in srgb, var(--hp-bg-surface) 55%, transparent);
  color: var(--hp-text-primary);
}
.sidebar nav button.active {
  background: var(--hp-bg-surface);
  border-color: var(--hp-line-default);
  box-shadow: var(--hp-shadow-raise);
  color: var(--hp-text-primary);
}
.sidebar nav button.active .icon {
  color: var(--hp-accent-ink);
}
.sidebar nav button small {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0 6px;
  border-radius: var(--hp-radius-pill);
  background: var(--hp-bg-sunken);
  color: var(--hp-text-secondary);
  font: 500 11px var(--hp-font-mono);
}
.sidebar footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.watcher {
  display: flex;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--hp-line-default);
  border-radius: var(--hp-radius-lg);
  background: var(--hp-bg-surface);
  font-size: 13px;
  font-weight: 600;
}
.watcher i {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--hp-status-warn);
  flex: none;
}
.watcher span {
  display: flex;
  flex-direction: column;
}
.watcher small {
  font-weight: 400;
  color: var(--hp-text-muted);
}
#explain-risk {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  border: 0;
  background: none;
  color: var(--hp-brand-red);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

/* ---------- Main ---------- */
main {
  min-width: 0;
  overflow: auto;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 32px;
  border-bottom: 1px solid var(--hp-line-default);
  background: color-mix(in srgb, var(--hp-bg-canvas) 92%, transparent);
  backdrop-filter: blur(10px);
}
.breadcrumb {
  display: flex;
  flex-direction: column;
}
.breadcrumb span {
  font: 500 10px var(--hp-font-mono);
  letter-spacing: 0.08em;
  color: var(--hp-text-muted);
}
.breadcrumb b {
  font-size: 15px;
  font-weight: 600;
}
.top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.clock {
  font: 12px var(--hp-font-mono);
  color: var(--hp-text-muted);
}
.clock b {
  color: var(--hp-text-primary);
  font-weight: 500;
}
.top-actions > button,
.mobile-menu {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--hp-line-strong);
  border-radius: var(--hp-radius-md);
  background: var(--hp-bg-surface);
  cursor: pointer;
}
.scheduler {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--hp-radius-pill);
  background: var(--hp-status-ok-soft);
  color: var(--hp-status-ok);
  font-size: 12px;
  font-weight: 500;
}
.scheduler i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.mobile-menu {
  display: none;
  margin-right: 12px;
}

.view {
  display: none;
  min-height: calc(100% - 60px);
  padding: 28px 36px 64px;
}
.view.active {
  display: block;
}
.screen-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.screen-head h1,
.placeholder-view h1 {
  margin: 4px 0 4px;
  font: 400 34px/1.1 var(--hp-font-display);
  letter-spacing: -0.005em;
}
.screen-head p:not(.eyebrow),
.placeholder-view p:not(.eyebrow) {
  margin: 0;
  color: var(--hp-text-secondary);
}
.screen-head > div:last-child {
  display: flex;
  gap: 8px;
}
.primary,
.secondary {
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: var(--hp-radius-md);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}
.primary {
  border: 1px solid var(--hp-accent-ink);
  background: var(--hp-accent-ink);
  color: var(--hp-accent-on-ink);
  box-shadow: var(--hp-shadow-raise);
}
.primary .icon {
  width: 14px;
  height: 14px;
  fill: currentColor;
}
.secondary {
  border: 1px solid var(--hp-line-strong);
  background: var(--hp-bg-surface);
}

.safety-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
  border: 1px solid var(--hp-line-default);
  border-radius: var(--hp-radius-lg);
  background: var(--hp-bg-surface);
  overflow: hidden;
}
.safety-row article {
  padding: 14px 16px;
  border-right: 1px solid var(--hp-line-default);
}
.safety-row article:last-child {
  border-right: 0;
}
.safety-row span {
  display: block;
  font: 500 10px var(--hp-font-mono);
  letter-spacing: 0.08em;
  color: var(--hp-text-muted);
}
.safety-row b {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 600;
}
.safety-row b i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--hp-status-ok);
}

.queue-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.9fr);
  gap: 16px;
  align-items: start;
}
.queue-list,
.inspector,
.history-table {
  border: 1px solid var(--hp-line-default);
  border-radius: var(--hp-radius-lg);
  background: var(--hp-bg-surface);
  box-shadow: var(--hp-shadow-raise);
  overflow: hidden;
}
.queue-toolbar {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-bottom: 1px solid var(--hp-line-default);
}
.queue-toolbar > span {
  font: 500 11px var(--hp-font-mono);
  letter-spacing: 0.08em;
  color: var(--hp-text-muted);
}
.queue-toolbar > span b {
  margin-left: 4px;
  color: var(--hp-text-primary);
}
.queue-toolbar > div {
  margin-left: auto;
  display: flex;
  gap: 4px;
}
.chip {
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--hp-line-default);
  border-radius: var(--hp-radius-pill);
  background: var(--hp-bg-surface);
  color: var(--hp-text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.chip.active {
  background: var(--hp-text-primary);
  border-color: var(--hp-text-primary);
  color: var(--hp-bg-surface);
}
.queue-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 130px 96px;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--hp-line-default);
  cursor: pointer;
}
.queue-item:last-child {
  border-bottom: 0;
}
.queue-item:hover {
  background: color-mix(in srgb, var(--hp-bg-sunken) 45%, transparent);
}
.queue-item.selected {
  background: var(--hp-accent-ink-soft);
  box-shadow: inset 3px 0 0 var(--hp-accent-ink);
}
.platform {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: var(--hp-radius-sm);
  background: var(--hp-text-secondary);
  color: var(--hp-platform-on);
  font: 500 11px var(--hp-font-mono);
  letter-spacing: -0.02em;
  vertical-align: middle;
}
.queue-item .platform,
.post-card header .platform {
  width: 32px;
  height: 32px;
  border-radius: var(--hp-radius-md);
  font-size: 13px;
}
.platform.x {
  background: var(--hp-platform-x);
}
.platform.in {
  background: var(--hp-platform-linkedin);
}
.platform.ig {
  background: var(--hp-platform-instagram);
}
.platform.bs {
  background: var(--hp-platform-bluesky);
}
.queue-copy h2 {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}
.queue-copy p {
  margin: 0;
  font-size: 13px;
  color: var(--hp-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.queue-time span {
  display: block;
  font-size: 13px;
}
.queue-time small {
  font: 12px var(--hp-font-mono);
  color: var(--hp-text-muted);
}
.status {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 9px 0 8px;
  border-radius: var(--hp-radius-pill);
  background: var(--hp-bg-sunken);
  color: var(--hp-text-secondary);
  font-size: 12px;
  font-weight: 500;
  text-transform: capitalize;
  white-space: nowrap;
}
.status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.status.scheduled {
  background: var(--hp-accent-ink-soft);
  color: var(--hp-accent-ink);
}
.status.publishing {
  background: var(--hp-status-warn-soft);
  color: var(--hp-status-warn);
}
.status.published {
  background: var(--hp-status-ok-soft);
  color: var(--hp-status-ok);
}

.inspector > header {
  height: 46px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid var(--hp-line-default);
  font: 500 11px var(--hp-font-mono);
  letter-spacing: 0.08em;
  color: var(--hp-brand-red);
}
.inspector > header b {
  margin-left: auto;
  color: var(--hp-text-secondary);
  letter-spacing: 0;
}
.inspector-content {
  padding: 16px;
}
.inspector-empty {
  min-height: 340px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 4px;
  padding: 32px;
  text-align: center;
}
.inspector-empty svg {
  transform: rotate(-6deg);
  margin-bottom: 10px;
}
.inspector-empty h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}
.inspector-empty p {
  margin: 0;
  max-width: 280px;
  font-size: 13px;
  color: var(--hp-text-secondary);
}
.post-card {
  padding: 14px;
  border: 1px solid var(--hp-line-default);
  border-radius: var(--hp-radius-md);
  background: var(--hp-bg-canvas);
}
.post-card header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.post-card header span {
  display: flex;
  flex-direction: column;
  font-size: 14px;
}
.post-card header small {
  font: 12px var(--hp-font-mono);
  color: var(--hp-text-muted);
}
.post-card > p {
  margin: 12px 0;
  font-size: 14px;
}
.post-card footer {
  padding-top: 10px;
  border-top: 1px solid var(--hp-line-default);
  font-size: 12px;
  color: var(--hp-text-muted);
}
.timeline {
  margin-top: 18px;
}
.timeline-step {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 48px;
}
.timeline-step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 18px;
  width: 1px;
  height: 30px;
  background: var(--hp-line-strong);
}
.timeline-step > i {
  position: relative;
  z-index: 1;
  width: 17px;
  height: 17px;
  border: 1.5px solid var(--hp-line-strong);
  border-radius: 50%;
  background: var(--hp-bg-surface);
}
.timeline-step.running > i {
  border-color: var(--hp-status-warn);
  box-shadow: 0 0 0 4px var(--hp-status-warn-soft);
}
.timeline-step.done > i {
  border-color: var(--hp-status-ok);
  background: var(--hp-status-ok);
}
.timeline-step.done > i::after {
  content: '✓';
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--hp-bg-surface);
  font-size: 10px;
  font-style: normal;
}
.timeline-step b {
  display: block;
  font-size: 13px;
  font-weight: 600;
}
.timeline-step span,
.timeline-step small {
  font: 11px var(--hp-font-mono);
  color: var(--hp-text-muted);
}
.result-card {
  margin-top: 12px;
  padding: 14px;
  border-radius: var(--hp-radius-md);
  background: var(--hp-status-ok-soft);
  color: var(--hp-status-ok);
}
.result-card > span {
  font-size: 18px;
}
.result-card h3 {
  margin: 4px 0;
  font-size: 15px;
  color: var(--hp-text-primary);
}
.result-card p {
  margin: 0 0 8px;
  font: 12px var(--hp-font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.result-card button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--hp-accent-ink);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

/* ---------- History ---------- */
.history-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
}
.history-filters button {
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--hp-line-default);
  border-radius: var(--hp-radius-pill);
  background: var(--hp-bg-surface);
  color: var(--hp-text-secondary);
  font-size: 13px;
  font-weight: 500;
}
.history-filters button.active {
  background: var(--hp-text-primary);
  border-color: var(--hp-text-primary);
  color: var(--hp-bg-surface);
}
.history-filters span {
  margin-left: auto;
  font: 12px var(--hp-font-mono);
  color: var(--hp-text-muted);
}
.history-head,
.history-table article {
  display: grid;
  grid-template-columns: 120px minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) 110px;
  gap: 16px;
  align-items: center;
}
.history-head {
  height: 42px;
  padding: 0 16px;
  border-bottom: 1px solid var(--hp-line-default);
  background: var(--hp-bg-sidebar);
  font: 500 11px var(--hp-font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hp-text-muted);
}
.history-table article {
  min-height: 60px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--hp-line-default);
  font-size: 14px;
}
.history-table article:last-child {
  border-bottom: 0;
}
.history-table article .platform {
  margin-right: 6px;
}
.outcome {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  height: 22px;
  padding: 0 9px 0 8px;
  border-radius: var(--hp-radius-pill);
  font-size: 12px;
  font-weight: 500;
}
.outcome i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.outcome.ok {
  background: var(--hp-status-ok-soft);
  color: var(--hp-status-ok);
}
.outcome.manual {
  background: var(--hp-status-warn-soft);
  color: var(--hp-status-warn);
}
.proof-button {
  justify-self: start;
  padding: 0;
  border: 0;
  background: none;
  color: var(--hp-accent-ink);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.proof-drawer {
  display: none;
  margin-top: 14px;
  padding: 18px;
  border: 1px solid var(--hp-line-default);
  border-radius: var(--hp-radius-lg);
  background: var(--hp-bg-surface);
}
.proof-drawer.open {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
}
.fake-proof {
  min-height: 140px;
  display: grid;
  place-content: center;
  gap: 6px;
  padding: 16px;
  border: 1px dashed var(--hp-line-strong);
  border-radius: var(--hp-radius-md);
  background: var(--hp-bg-sunken);
  text-align: center;
}
.fake-proof b {
  font: 400 22px/1.1 var(--hp-font-display);
}
.fake-proof span {
  font: 500 11px var(--hp-font-mono);
  letter-spacing: 0.08em;
  color: var(--hp-brand-red);
}
.proof-copy h2 {
  margin: 0 0 6px;
  font-size: 17px;
}
.proof-copy p {
  margin: 0 0 10px;
  color: var(--hp-text-secondary);
}
.proof-copy code {
  display: block;
  padding: 8px 10px;
  border-radius: var(--hp-radius-sm);
  background: var(--hp-bg-sunken);
  color: var(--hp-text-secondary);
  font: 12px var(--hp-font-mono);
}

/* ---------- Placeholder screens ---------- */
.placeholder-view {
  display: none;
  place-content: center;
  text-align: center;
}
.placeholder-view.active {
  display: grid;
}
.placeholder-view > div {
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.placeholder-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 10px;
  fill: none;
  stroke: var(--hp-text-muted);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.placeholder-view p:not(.eyebrow) {
  margin: 0 0 22px;
  font-size: 15px;
}

/* ---------- Toast & dialog ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 50;
  transform: translate(-50%, 15px);
  padding: 10px 14px;
  border-radius: var(--hp-radius-md);
  background: var(--hp-bg-inverse);
  color: var(--hp-text-inverse);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
dialog {
  width: min(480px, calc(100% - 32px));
  padding: 36px 30px 30px;
  border: 1px solid var(--hp-line-default);
  border-radius: var(--hp-radius-lg);
  background: var(--hp-bg-surface);
  color: var(--hp-text-primary);
  box-shadow: var(--hp-shadow-float);
}
dialog::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: var(--hp-airmail);
}
dialog::backdrop {
  background: rgb(29 26 21 / 0.45);
}
.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--hp-radius-md);
  background: none;
  cursor: pointer;
}
.dialog-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--hp-brand-red-soft);
  color: var(--hp-brand-red);
}
dialog h2 {
  margin: 6px 0 8px;
  font: 400 30px/1.1 var(--hp-font-display);
}
dialog > p:not(.eyebrow) {
  margin: 0;
  color: var(--hp-text-secondary);
}
dialog ul {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--hp-text-secondary);
}
dialog > div:last-child {
  display: flex;
  gap: 8px;
  margin-top: 22px;
}
dialog a,
.dialog-secondary {
  flex: 1;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--hp-radius-md);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
dialog a {
  background: var(--hp-accent-ink);
  color: var(--hp-accent-on-ink);
}
.dialog-secondary {
  border: 1px solid var(--hp-line-strong);
  background: var(--hp-bg-surface);
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .demo-shell {
    grid-template-columns: 200px minmax(0, 1fr);
  }
  .queue-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .inspector-empty {
    min-height: 200px;
  }
  .view {
    padding-inline: 24px;
  }
  .safety-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .safety-row article:nth-child(2) {
    border-right: 0;
  }
  .safety-row article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--hp-line-default);
  }
  .clock {
    display: none;
  }
}
@media (max-width: 680px) {
  .simulation-banner {
    padding: 0 14px;
  }
  .simulation-banner span {
    display: none;
  }
  .demo-shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .sidebar {
    position: fixed;
    top: var(--banner);
    bottom: 0;
    left: -250px;
    width: 240px;
    transition: left 0.2s;
    box-shadow: var(--hp-shadow-float);
  }
  .sidebar.open {
    left: 0;
  }
  .mobile-menu {
    display: grid;
  }
  .scheduler {
    display: none;
  }
  .topbar {
    padding: 0 14px;
  }
  .view {
    padding: 24px 14px 56px;
  }
  .screen-head {
    display: block;
  }
  .screen-head > div:last-child {
    margin-top: 16px;
    flex-wrap: wrap;
  }
  .screen-head h1,
  .placeholder-view h1 {
    font-size: 30px;
  }
  .queue-toolbar {
    flex-wrap: wrap;
  }
  .queue-toolbar > div {
    margin-left: 0;
    flex-wrap: wrap;
  }
  .queue-item {
    grid-template-columns: 32px minmax(0, 1fr) auto;
  }
  .queue-time {
    display: none;
  }
  .history-filters {
    flex-wrap: wrap;
  }
  .history-filters span {
    width: 100%;
    margin-left: 0;
  }
  .history-head {
    display: none;
  }
  .history-table article {
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 6px 10px;
  }
  .proof-drawer.open {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
