@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/static/fonts/BricolageGrotesque-Variable.ttf") format("truetype");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/static/fonts/Inter-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --paper: #f4f0e6;
  --surface: #fffdf7;
  --ink: #171715;
  --muted: #68645b;
  --line: #d8d1c3;
  --accent: #e64a2f;
  --accent-dark: #a72e1b;
  --green: #256b4b;
  --green-soft: #e2efe7;
  --red-soft: #f8e4df;
  --amber: #9c6300;
  --amber-soft: #f7ebcf;
  --radius: 16px;
  --shadow: 0 18px 48px rgba(34, 28, 21, 0.08);
  font-family: "Inter", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body { margin: 0; min-height: 100vh; background: var(--paper); }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
h1, h2, h3, h4, .display { font-family: "Bricolage Grotesque", "Inter", sans-serif; letter-spacing: -0.035em; }

.shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar {
  background: var(--ink);
  color: #fffaf0;
  padding: 30px 22px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand-lockup { text-decoration: none; display: block; line-height: 0.91; }
.brand-mark {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 27px;
  font-weight: 780;
  letter-spacing: -0.065em;
  text-transform: uppercase;
}
.brand-mark span { color: var(--accent); }
.brand-sub { margin-top: 12px; color: #b7b0a5; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.nav { display: grid; gap: 5px; }
.nav a {
  text-decoration: none;
  color: #cabfb1;
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 14px;
  font-weight: 560;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav a:hover { background: rgba(255,255,255,.07); color: white; }
.nav a.active { background: #fffaf0; color: var(--ink); }
.nav .count { background: var(--accent); color: white; border-radius: 999px; padding: 1px 7px; font-size: 11px; }
.sidebar-foot { margin-top: auto; color: #8f887d; font-size: 12px; line-height: 1.55; border-top: 1px solid rgba(255,255,255,.12); padding-top: 18px; }
.sidebar-foot strong { display: block; color: #fffaf0; font-size: 13px; }
.logout-form { margin: 0; }
.logout-form button { border: 0; background: none; color: inherit; cursor: pointer; padding: 0; text-decoration: underline; }
.main { padding: 38px clamp(24px, 4.2vw, 64px) 64px; min-width: 0; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 34px; }
.eyebrow { margin: 0 0 8px; text-transform: uppercase; letter-spacing: .13em; font-size: 11px; font-weight: 700; color: var(--muted); }
h1 { margin: 0; font-size: clamp(34px, 5vw, 54px); line-height: 0.98; font-weight: 750; }
.subtitle { margin: 13px 0 0; max-width: 670px; line-height: 1.55; color: var(--muted); font-size: 14px; }
.topbar-meta { font-size: 12px; color: var(--muted); text-align: right; white-space: nowrap; padding-top: 6px; }
.grid { display: grid; gap: 18px; }
.grid > *, .card, .section-head, .main { min-width: 0; }
.table-wrap { max-width: 100%; }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 1px 0 rgba(23,23,21,.03);
}
.card.flush { padding: 0; overflow: hidden; }
.card-title { margin: 0 0 16px; font-size: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.metric { font-family: "Bricolage Grotesque", sans-serif; font-size: 44px; line-height: 1; font-weight: 760; letter-spacing: -.05em; }
.metric-label { color: var(--muted); font-size: 12px; margin-top: 9px; }
.section { margin-top: 30px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.section-head h2 { font-size: 25px; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease;
}
.btn:hover { transform: translateY(-1px); background: #36342f; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(230,74,47,.42);
  outline-offset: 2px;
}
.btn.accent { background: var(--accent); border-color: var(--accent); }
.btn.accent:hover { background: var(--accent-dark); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: #f7f2e8; }
.btn.danger { background: #fff; color: var(--accent-dark); border-color: var(--accent); }
.btn.small { padding: 6px 11px; font-size: 11px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }

.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 4px 9px; font-size: 10px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; }
.badge.candidate { background: var(--amber-soft); color: var(--amber); }
.badge.approved, .badge.published, .badge.active, .badge.completed { background: var(--green-soft); color: var(--green); }
.badge.rejected, .badge.blocked, .badge.error { background: var(--red-soft); color: var(--accent-dark); }
.badge.draft, .badge.review_required, .badge.warning { background: var(--amber-soft); color: var(--amber); }
.badge.archived, .badge.expired { background: #e9e4da; color: #6a655b; }

.notice { padding: 13px 16px; border-radius: 12px; margin-bottom: 20px; font-size: 13px; line-height: 1.45; border: 1px solid; }
.notice.success { background: var(--green-soft); border-color: #bad8c8; color: #174d35; }
.notice.error { background: var(--red-soft); border-color: #e9bcb2; color: #7b2416; }
.alert { border-left: 3px solid var(--accent); padding: 12px 16px; background: var(--red-soft); border-radius: 0 10px 10px 0; margin-bottom: 10px; }
.alert strong { display: block; font-size: 13px; }
.alert p { margin: 4px 0 0; font-size: 12px; color: #6e3329; }
.alert.warning { border-left-color: var(--amber); background: var(--amber-soft); }
.alert.warning p { color: #62430c; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 11px 16px; border-bottom: 1px solid var(--line); }
td { padding: 14px 16px; border-bottom: 1px solid #e9e3d8; vertical-align: middle; font-size: 13px; }
tr:last-child td { border-bottom: 0; }
tr:hover td { background: #fbf8f1; }
.table-wrap { overflow-x: auto; }
.table-title { font-weight: 600; max-width: 520px; line-height: 1.4; }
.table-title a { text-decoration: none; }
.table-title a:hover { color: var(--accent-dark); }

.form-grid { display: grid; gap: 16px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
.field { display: grid; gap: 6px; }
.field > span, .label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .075em; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=url], select, textarea {
  width: 100%;
  border: 1px solid #cfc7b8;
  background: #fffefa;
  color: var(--ink);
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 14px;
}
textarea { resize: vertical; min-height: 92px; line-height: 1.55; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; }
.check-row { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; line-height: 1.4; padding: 9px 0; }
.check-row input { margin-top: 1px; flex: 0 0 auto; }
option { padding: 4px; }
.hint { color: var(--muted); font-size: 11px; line-height: 1.45; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.filters .field { min-width: 140px; }
.filters .grow { flex: 1 1 220px; }
.pager { display: flex; gap: 8px; justify-content: center; padding: 17px; align-items: center; color: var(--muted); font-size: 12px; }
.empty { padding: 44px 24px; text-align: center; color: var(--muted); }
.empty h3 { color: var(--ink); margin: 0 0 6px; font-size: 20px; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; gap: 12px; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #e9e3d8; font-size: 13px; }
.list li:last-child { border-bottom: 0; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 9px 18px; font-size: 13px; }
.kv dt { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 650; padding-top: 1px; }
.kv dd { margin: 0; line-height: 1.5; overflow-wrap: anywhere; }
.source-block { background: #f8f4eb; border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.source-block + .source-block { margin-top: 10px; }
.source-block h4 { margin: 0 0 8px; font-size: 15px; }
.option-row { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: center; margin: 9px 0; }
.option-index { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.option-row.correct .option-index { background: var(--green); color: white; border-color: var(--green); }
.checks { display: grid; gap: 4px; }
.check { display: grid; grid-template-columns: 80px 1fr; gap: 12px; padding: 7px 0; border-bottom: 1px solid #eee9df; font-size: 12px; }
.check:last-child { border-bottom: 0; }
.check-status { font-weight: 700; text-transform: uppercase; font-size: 10px; letter-spacing: .05em; }
.check-status.ok { color: var(--green); }
.check-status.fail { color: var(--accent-dark); }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day-chip { border: 1px solid var(--line); border-radius: 8px; min-height: 48px; padding: 7px; font-size: 10px; color: var(--muted); }
.day-chip strong { display: block; color: var(--ink); font-size: 11px; margin-bottom: 3px; }
.day-chip.published { background: var(--green-soft); border-color: #b9d8c7; color: var(--green); }
.day-chip.draft { background: var(--amber-soft); border-color: #ead49f; color: var(--amber); }
.preview-question { padding: 20px 0; border-bottom: 1px solid var(--line); }
.preview-question:last-child { border-bottom: 0; }
.preview-question h3 { margin: 0 0 10px; font-size: 19px; }
.preview-option { padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; margin: 6px 0; font-size: 13px; }
.preview-option.correct { border-color: var(--green); background: var(--green-soft); }
.q-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; align-items: center; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }

.login-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr); }
.login-art { background: var(--ink); color: #fffaf0; padding: clamp(32px, 6vw, 80px); display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-art:after { content: "?"; font-family: "Bricolage Grotesque", sans-serif; font-size: min(56vw, 720px); font-weight: 800; color: var(--accent); line-height: .65; position: absolute; right: -3vw; bottom: -8vw; opacity: .18; pointer-events: none; }
.login-art .wordmark { font-family: "Bricolage Grotesque", sans-serif; font-size: clamp(38px, 5vw, 74px); font-weight: 800; line-height: .9; text-transform: uppercase; letter-spacing: -.06em; position: relative; z-index: 1; }
.login-art .wordmark span { color: var(--accent); }
.login-art .slogan { font-size: clamp(15px, 1.6vw, 19px); color: #bdb5a8; max-width: 360px; line-height: 1.5; position: relative; z-index: 1; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 32px; background: var(--paper); }
.login-box { width: min(100%, 390px); }
.login-box h1 { font-size: 40px; margin-bottom: 8px; }
.login-box form { margin-top: 28px; display: grid; gap: 15px; }
.login-box .btn { margin-top: 8px; width: 100%; }
.login-foot { margin-top: 22px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.mfa-secret-box { background: #f8f4eb; border: 1px solid var(--line); border-radius: 11px; padding: 14px; margin: 16px 0 10px; }
.mfa-secret { display: block; font-family: ui-monospace, Menlo, monospace; font-size: 17px; letter-spacing: .12em; overflow-wrap: anywhere; margin: 7px 0; }
.code-block { white-space: pre-wrap; overflow-wrap: anywhere; font-family: ui-monospace, Menlo, monospace; font-size: 11px; background: #f4efe4; padding: 13px; border-radius: 9px; max-height: 280px; overflow: auto; }
details { border-top: 1px solid var(--line); padding: 13px 0; }
details:first-of-type { border-top: 0; }
summary { cursor: pointer; font-weight: 600; font-size: 13px; }
details > div { padding-top: 10px; }
.pagination a { color: var(--ink); text-decoration: none; font-weight: 600; }
.warning-list { margin: 10px 0 0; padding-left: 18px; color: var(--amber); font-size: 12px; line-height: 1.55; }
.error-list { margin: 10px 0 0; padding-left: 18px; color: var(--accent-dark); font-size: 12px; line-height: 1.55; }



.ordered-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.ordered-list li { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; background: #fffefa; }
.order-number { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: white; font-size: 11px; flex: 0 0 auto; }
.order-copy { display: grid; gap: 2px; font-size: 12px; flex: 1; }
.order-copy small { color: var(--muted); font-size: 10px; }
.order-actions { display: flex; gap: 4px; }
.order-actions form { margin: 0; }
/* Phase 3: editorial operations */
.nav-label { margin: 10px 13px 2px; color: #777066; font-size: 9px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; }
.nav .count.subtle { background: rgba(255,255,255,.15); color: #fffaf0; }
.status-hero { background: linear-gradient(145deg, #fffdf7 0%, #f8efe0 100%); }
.status-date { margin: 4px 0 14px; font-size: clamp(28px, 3.5vw, 44px); line-height: 1; }
.status-line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.status-value { font-weight: 650; font-size: 14px; }
.system-line { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.system-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-left: 8px; }
.system-dot:first-child { margin-left: 0; }
.system-dot.ok { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.system-dot.fail { background: var(--accent); box-shadow: 0 0 0 3px var(--red-soft); }
.task-list { display: grid; gap: 2px; }
.task-row { display: flex; align-items: center; gap: 13px; text-decoration: none; padding: 12px 4px; border-bottom: 1px solid #e9e3d8; }
.task-row:last-child { border-bottom: 0; }
.task-row:hover .task-copy strong { color: var(--accent-dark); }
.task-row.critical .task-count { background: var(--red-soft); color: var(--accent-dark); }
.task-count { min-width: 42px; height: 42px; border-radius: 12px; background: var(--amber-soft); color: var(--amber); display: grid; place-items: center; font-family: "Bricolage Grotesque", sans-serif; font-weight: 750; font-size: 18px; }
.task-copy { display: grid; gap: 2px; flex: 1; }
.task-copy strong { font-size: 13px; }
.task-copy small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.task-arrow { color: var(--muted); font-size: 18px; }
.task-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.task-card { text-decoration: none; color: inherit; display: grid; gap: 10px; }
.task-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.task-card .task-count { min-width: 34px; height: 34px; font-size: 15px; justify-self: end; }
.task-card h3 { margin: 0; font-size: 18px; }
.task-card .task-arrow { font-size: 12px; font-weight: 650; color: var(--accent-dark); }
.task-card.critical { border-color: #e5b4a9; }
.compact-metrics .card { padding: 18px; }
.compact-metrics .metric { font-size: 34px; }
.metric-unit { font-family: "Inter", sans-serif; font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.mini-bars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0 10px; }
.mini-bars div { background: #f8f4eb; border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: grid; gap: 2px; }
.mini-bars span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.mini-bars strong { font-family: "Bricolage Grotesque", sans-serif; font-size: 21px; }
.metric-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px 18px; }
.metric-row div { display: grid; gap: 2px; }
.metric-row strong { font-family: "Bricolage Grotesque", sans-serif; font-size: 26px; }
.metric-row span { color: var(--muted); font-size: 10px; line-height: 1.3; }
.alert-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.alert-head strong { margin-right: auto; }
.section-history { margin-top: 16px; }
.card-head-padded { padding: 20px 22px 0; }
.preset-bar { padding: 16px 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.preset-links { display: flex; gap: 7px; flex-wrap: wrap; }
.preset-links a { border: 1px solid var(--line); border-radius: 999px; padding: 6px 11px; text-decoration: none; color: var(--muted); font-size: 11px; }
.preset-links a:hover, .preset-links a.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.active-filters { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--line); }
.filter-chip { background: var(--amber-soft); border: 1px solid #ead49f; border-radius: 999px; padding: 4px 9px; font-size: 11px; color: #62430c; }
.filter-chip a { text-decoration: none; margin-left: 4px; font-weight: 700; }
.question-table { table-layout: fixed; }
.question-table th, .question-table td { padding-left: 10px; padding-right: 10px; }
.question-table th:nth-child(1), .question-table td:nth-child(1) { width: 42px; }
.question-table th:nth-child(2), .question-table td:nth-child(2) { width: 27%; }
.question-table th:nth-child(3), .question-table td:nth-child(3) { width: 10%; }
.question-table th:nth-child(4), .question-table td:nth-child(4) { width: 6%; }
.question-table th:nth-child(5), .question-table td:nth-child(5) { width: 9%; }
.question-table th:nth-child(6), .question-table td:nth-child(6) { width: 10%; }
.question-table th:nth-child(7), .question-table td:nth-child(7) { width: 10%; }
.question-table th:nth-child(8), .question-table td:nth-child(8) { width: 9%; }
.question-table th:nth-child(9), .question-table td:nth-child(9) { width: 8%; }
.question-table th:nth-child(10), .question-table td:nth-child(10) { width: 74px; }
.question-table td:nth-child(4) { white-space: nowrap; }
.question-table td:last-child .btn { white-space: nowrap; padding-left: 8px; padding-right: 8px; }
.question-table .table-title { max-width: 100%; }
.question-table td { vertical-align: top; overflow-wrap: anywhere; }
.bulk-bar { padding: 16px 20px; background: #f8f4eb; border-top: 1px solid var(--line); display: flex; gap: 14px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.bulk-copy { display: grid; gap: 3px; max-width: 420px; }
.bulk-actions { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.inline-field { display: flex; align-items: center; gap: 5px; font-size: 10px; color: var(--muted); }
.inline-field input, .inline-field select { width: auto; padding: 6px 8px; font-size: 11px; }
.step-nav { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 18px; }
.step { display: flex; align-items: center; gap: 6px; text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 11px; font-size: 11px; color: var(--muted); background: var(--surface); }
.step span { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: #eee8dc; font-size: 10px; color: var(--ink); }
.step.done { border-color: #bad8c8; color: var(--green); background: var(--green-soft); }
.step.done span { background: var(--green); color: white; }
.step.open { border-color: #ead49f; background: var(--amber-soft); color: var(--amber); }
.step.blocked { border-color: #e9bcb2; background: var(--red-soft); color: var(--accent-dark); }
.review-toolbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 13px; background: #f8f4eb; }
.app-preview-details { margin: 16px 0 0; }
.app-preview { width: min(100%, 310px); border-radius: 26px; border: 7px solid var(--ink); background: var(--paper); padding: 16px; margin: 12px auto; box-shadow: var(--shadow); }
.app-preview-top { display: flex; justify-content: space-between; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 18px; }
.app-preview-kicker { font-size: 9px; color: var(--accent-dark); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 7px; }
.app-preview h4 { font-size: 17px; line-height: 1.25; margin: 0 0 14px; }
.app-preview-option { border: 1px solid var(--line); background: var(--surface); border-radius: 9px; padding: 8px 10px; margin: 6px 0; font-size: 11px; display: flex; gap: 7px; }
.app-preview-option span { color: var(--muted); font-weight: 700; }
.app-preview-hint { margin: 13px 0 0; font-size: 9px; color: var(--muted); line-height: 1.4; }
.diff-legend { font-size: 9px; color: var(--muted); text-transform: none; letter-spacing: 0; font-weight: 400; }
del { background: #f8d9d2; color: #7b2416; text-decoration-thickness: 1px; border-radius: 3px; padding: 0 2px; }
ins { background: #dff0e5; color: #174d35; text-decoration: none; border-radius: 3px; padding: 0 2px; }
.defer-row { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 15px; }
.defer-row .field { max-width: 220px; }
.calendar-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.calendar-head h2 { margin: 0; font-size: 25px; text-transform: capitalize; }
.calendar { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 5px; }
.calendar-weekday { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); text-align: center; padding: 4px 0; }
.calendar-cell { min-height: 105px; border: 1px solid var(--line); border-radius: 9px; padding: 8px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 4px; background: #fffefa; }
.calendar-cell:hover { border-color: var(--accent); }
.calendar-cell.out-month { opacity: .42; }
.calendar-cell.today { outline: 2px solid var(--accent); outline-offset: 1px; }
.calendar-cell.published, .calendar-cell.completed { background: var(--green-soft); border-color: #bad8c8; }
.calendar-cell.draft { background: var(--amber-soft); border-color: #ead49f; }
.calendar-cell.incomplete { background: #f7e5d8; border-color: #e1b89e; }
.calendar-date { font-family: "Bricolage Grotesque", sans-serif; font-weight: 750; font-size: 17px; }
.calendar-status { font-size: 9px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.calendar-count { font-size: 9px; color: var(--muted); line-height: 1.3; }
.calendar-empty { color: var(--line); font-size: 18px; margin-top: auto; }
.legend { display: grid; gap: 7px; font-size: 11px; color: var(--muted); }
.legend span { display: flex; gap: 7px; align-items: center; }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; background: #fffefa; border: 1px solid var(--line); display: inline-block; flex: 0 0 10px; }
.legend-dot.draft { background: var(--amber-soft); border-color: #ead49f; }
.legend-dot.incomplete { background: #f7e5d8; border-color: #e1b89e; }
.legend-dot.published { background: var(--green-soft); border-color: #bad8c8; }
.legend-dot.completed { background: #d7e9df; border-color: #a9cdb9; }
.bar-list { display: grid; gap: 5px; }
.bar-row { display: grid; grid-template-columns: 52px 1fr 62px; gap: 8px; align-items: center; font-size: 11px; }
.bar-label { color: var(--muted); }
.bar-track { height: 9px; background: #eee8dc; border-radius: 99px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--green); border-radius: 99px; }
.bar-fill.accent { background: var(--accent); }
.bar-value { text-align: right; color: var(--muted); }
.status-small { margin: 10px 0 4px; font-size: 19px; }
.plain-list { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.65; }
@media (max-width: 1200px) {
  .task-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .metric-row { grid-template-columns: repeat(4, 1fr); }
  .question-table .table-title { max-width: 280px; }
}
@media (max-width: 880px) {
  .task-grid { grid-template-columns: 1fr; }
  .metric-row { grid-template-columns: repeat(2, 1fr); }
  .calendar { grid-template-columns: repeat(7, minmax(68px,1fr)); overflow-x: auto; padding-bottom: 8px; }
  .calendar-cell { min-height: 88px; }
  .step-nav { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .step { flex: 0 0 auto; }
  .bulk-bar { align-items: flex-start; }
  .bulk-actions { justify-content: flex-start; }
}
@media (max-width: 520px) {
  .calendar { grid-template-columns: repeat(7, 64px); }
  .metric-row { grid-template-columns: 1fr 1fr; }
  .compact-metrics .metric { font-size: 28px; }
}

@media (max-width: 1100px) {
  .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 880px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 18px; gap: 16px; }
  .nav { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .nav a { padding: 9px; justify-content: center; }
  .brand-mark { font-size: 22px; }
  .sidebar-foot { display: none; }
  .main { padding: 24px 18px 48px; }
  .topbar { flex-direction: column; }
  .topbar-meta { text-align: left; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4, .form-grid.two { grid-template-columns: 1fr; }
  .login-layout { grid-template-columns: 1fr; }
  .login-art { min-height: 220px; padding: 28px; }
  .login-art .wordmark { font-size: 44px; }
  .login-panel { padding: 28px 20px; }
  .week { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 520px) {
  .nav { grid-template-columns: repeat(2, 1fr); }
  h1 { font-size: 34px; }
  .card { padding: 17px; }
  .kv { grid-template-columns: 1fr; gap: 3px; }
  .kv dd { margin-bottom: 10px; }
  .filters { display: grid; grid-template-columns: 1fr 1fr; }
  .filters .grow { grid-column: 1 / -1; }
  .week { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
