/* ============================================================
   scope.css — Resumo executivo público (Portal do Cliente)
   Token names mirror src/styles.css so the static hub reads
   from the same design system as the React app.
   ============================================================ */

@font-face {
  font-family: "IGCMono";
  src: url("/fonts/IGCMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IGCMono";
  src: url("/fonts/IGCMono-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IGCMono";
  src: url("/fonts/IGCMono-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* Surfaces */
  --bg: #ffffff;
  --bg-2: #fafafa;
  --surface: #ffffff;

  /* Text */
  --text: #171717;
  --text-2: #404040;
  --text-3: #737373;
  --text-inv: #ffffff;

  /* Brand / success */
  --primary: #16a34a;
  --primary-50: #f0fdf4;
  --primary-100: #dcfce7;
  --primary-700: #14532d;
  --success: #16a34a;
  --success-bg: #dcfce7;
  --success-fg: #15803d;

  /* Warning / attention */
  --warning: #d97706;
  --warning-bg: #fef3c7;
  --warning-fg: #b45309;

  /* Info / meet */
  --info: #2563eb;
  --info-bg: #dbeafe;
  --info-fg: #1d4ed8;

  /* Danger */
  --danger: #dc2626;
  --danger-bg: #fee2e2;
  --danger-fg: #b91c1c;

  /* Neutral / borders */
  --neutral-bg: #f5f5f5;
  --neutral-fg: #525252;
  --border: #e5e5e5;
  --border-strong: #d4d4d4;
  --divider: #f5f5f5;

  /* Focus ring */
  --focus: #14532d;

  /* Type */
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "DM Sans", "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "IGCMono", ui-monospace, "IBM Plex Mono", SFMono-Regular, Menlo, monospace;

  /* Radii */
  --radius: 8px;
  --radius-sm: 6px;
  --radius-card: 8px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(23, 23, 23, 0.05);
  --shadow-sm: 0 1px 2px rgba(23, 23, 23, 0.04), 0 1px 3px rgba(23, 23, 23, 0.06);
  --shadow-md: 0 2px 4px rgba(23, 23, 23, 0.04), 0 8px 16px rgba(23, 23, 23, 0.06);
  --shadow-lg: 0 4px 8px rgba(23, 23, 23, 0.05), 0 16px 32px rgba(23, 23, 23, 0.08);

  --pcv-page-max: 760px;
  --pcv-gutter: 14px;
}

/* ---------- Reset ---------- */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg-2);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 50;
  transform: translateY(-150%);
  background: var(--text);
  color: var(--text-inv);
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius);
  font-weight: 600;
}
.skip-link:focus {
  transform: translateY(0);
}

/* ---------- Page shell ---------- */

.pc-shell,
.pc-main,
.ch-footer {
  width: 100%;
  max-width: var(--pcv-page-max);
  margin-inline: auto;
}

.pc-main {
  padding: 0 0 80px;
  background: var(--bg);
}

/* ---------- Header ---------- */

.pc-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.pc-header .pc-shell {
  padding: 12px var(--pcv-gutter) 14px;
}

.pc-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.pc-brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.pc-brand-wordmark {
  width: 130px;
  height: auto;
}

.pc-maker {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.pc-maker .by {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
}

.vl-rail-svg-xs {
  height: 14px;
  width: auto;
  color: var(--text);
}

.pc-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--divider);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pc-meta-row .ctx {
  color: var(--text-3);
}
.pc-meta-row .ctx strong {
  color: var(--text);
  font-weight: 500;
}

/* ---------- Hero ---------- */

.ch-hero {
  padding: 20px var(--pcv-gutter) 12px;
}

.ch-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-3);
  margin-bottom: 8px;
}

.ch-hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.18;
  margin: 0 0 10px;
  color: var(--text);
  letter-spacing: -0.015em;
}

.ch-hero h1 em {
  font-style: normal;
  color: var(--success-fg);
}

.ch-hero .sub {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-2);
  margin: 0;
}

/* ---------- KPI strip ---------- */

.kpi-strip {
  margin: 12px var(--pcv-gutter) 0;
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 8px;
}

.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 11px 9px;
  position: relative;
  overflow: hidden;
  min-width: 0;
}

.kpi .accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--primary);
}

.kpi.warning .accent {
  background: var(--warning);
}
.kpi.info .accent {
  background: var(--info);
}
.kpi.success .accent {
  background: var(--success);
}

.kpi .label {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin-bottom: 5px;
  padding-left: 5px;
}

.kpi .value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--text);
  line-height: 1;
  padding-left: 5px;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.kpi .value.you-need {
  color: var(--warning-fg);
}

.kpi .value.healthy {
  color: var(--success-fg);
  font-size: 16px;
}

.kpi .unit {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 500;
}

.kpi .foot {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-left: 5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.kpi .foot.urgent {
  color: var(--warning-fg);
}
.kpi .foot.healthy {
  color: var(--success-fg);
}

/* ---------- Badge ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: var(--neutral-bg);
  color: var(--neutral-fg);
  text-transform: uppercase;
  white-space: nowrap;
}

.badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}

.badge.success {
  background: var(--success-bg);
  color: var(--success-fg);
}
.badge.warning {
  background: var(--warning-bg);
  color: var(--warning-fg);
}
.badge.info {
  background: var(--info-bg);
  color: var(--info-fg);
}
.badge.danger {
  background: var(--danger-bg);
  color: var(--danger-fg);
}

/* ---------- Card ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 10px var(--pcv-gutter) 0;
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.card-h {
  padding: 11px 14px 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid var(--divider);
}

.card-h h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  margin: 0;
  color: var(--text);
  letter-spacing: -0.005em;
  line-height: 1.3;
}

.card-h .lbl-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--warning-fg);
  font-weight: 600;
}

.card-h .lbl-row .pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warning);
  animation: pcv-pulse 2s ease-in-out infinite;
}

@keyframes pcv-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.5);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(217, 119, 6, 0);
  }
}

.card-b {
  padding: 12px 14px 14px;
}

/* ---------- Options inside a decision ---------- */

.opt {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  text-align: left;
  font: inherit;
  color: inherit;
  transition:
    border-color 160ms ease,
    background 160ms ease;
}

.opt:hover {
  border-color: var(--border-strong);
}

.opt.recom {
  border-color: var(--primary);
  background: var(--primary-50);
}

.opt strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--warning-fg);
  font-weight: 600;
  margin-bottom: 3px;
}

.opt.recom strong {
  color: var(--success-fg);
}

.opt.recom strong::after {
  content: " · sugestão";
  color: var(--success);
  font-weight: 500;
}

.opt .body {
  flex: 1;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-2);
}

.opt .pick {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: var(--text-inv);
  border: 0;
  font-weight: 600;
  flex-shrink: 0;
  align-self: center;
}

.opt:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.opt.picked {
  border-color: var(--primary);
  background: var(--primary-50);
}

.opt.picked .pick::before {
  content: "✓ ";
}

.opt-context {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--text-3);
  font-style: italic;
}

/* ---------- Quick action row ---------- */

.qa-row {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.qa-btn {
  flex: 1;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-weight: 500;
  transition: border-color 160ms ease;
}

.qa-btn:hover {
  border-color: var(--border-strong);
}

.qa-btn.meet {
  color: var(--info-fg);
  border-color: var(--info-bg);
}

.qa-btn.meet:hover {
  border-color: var(--info);
}

/* ---------- Decided state ---------- */

[data-decision-card][data-state="decided"] .card-h .lbl-row,
[data-decision-card][data-state="decided"] .oq-h .lbl-row {
  color: var(--success-fg);
}

[data-decision-card][data-state="decided"] .card-h .lbl-row .pulse,
[data-decision-card][data-state="decided"] .oq-h .lbl-row .pulse {
  background: var(--success);
  animation: none;
}

[data-decision-card][data-state="decided"] [data-decision-status] {
  background: var(--success-bg);
  color: var(--success-fg);
}

.decided-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--primary-50);
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-2);
}

.decided-line .label {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--success-fg);
  font-weight: 600;
  margin-bottom: 3px;
}

.decided-line .text {
  color: var(--text);
  font-weight: 500;
}

.decided-line .undo {
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--info-fg);
  background: transparent;
  border: 0;
  padding: 4px 6px;
}

/* ---------- Requested-meet state ---------- */

[data-decision-card][data-state="requested-meet"] .card-h .lbl-row,
[data-decision-card][data-state="requested-meet"] .oq-h .lbl-row {
  color: var(--info-fg);
}

[data-decision-card][data-state="requested-meet"] .card-h .lbl-row .pulse,
[data-decision-card][data-state="requested-meet"] .oq-h .lbl-row .pulse {
  background: var(--info);
  animation: none;
}

[data-decision-card][data-state="requested-meet"] [data-decision-status] {
  background: var(--info-bg);
  color: var(--info-fg);
}

[data-decision-card][data-state="requested-meet"] .qa-btn.meet {
  background: var(--info-bg);
  color: var(--info-fg);
  border-color: var(--info);
}

/* ---------- Commented marker ---------- */

.comment-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  padding: 6px 9px;
  background: var(--neutral-bg);
  border-left: 2px solid var(--info);
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--text-2);
  font-style: italic;
}

.comment-tag .undo {
  margin-left: 6px;
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--info-fg);
  background: transparent;
  border: 0;
  padding: 2px 4px;
}

/* ---------- Banner ---------- */

.banner {
  margin: 12px var(--pcv-gutter) 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid;
}

.banner-warning {
  background: var(--warning-bg);
  border-color: var(--warning);
  color: var(--warning-fg);
}

.banner .ico {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.banner .body {
  flex: 1;
}

.banner .ttl {
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 2px;
}

.banner .msg {
  font-size: 11px;
  line-height: 1.45;
}

/* ---------- Accordions ---------- */

.acc-card {
  padding: 0;
}

.acc-row {
  border-bottom: 1px solid var(--divider);
}

.acc-row:last-child {
  border-bottom: 0;
}

.acc-row summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  gap: 10px;
}

.acc-row summary::-webkit-details-marker {
  display: none;
}

.acc-row summary .l {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.acc-row summary .n {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  min-width: 18px;
}

.acc-row summary .t {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}

.acc-row summary .meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.acc-row .chev {
  color: var(--text-3);
  transition: transform 200ms ease;
}

.acc-row[open] > summary .chev {
  transform: rotate(90deg);
}

.acc-row[open] > summary {
  border-bottom: 1px solid var(--divider);
}

.acc-body {
  padding: 12px 14px 16px;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.55;
}

.acc-body p {
  margin: 0 0 10px;
}

.acc-body p:last-child {
  margin-bottom: 0;
}

/* ---------- Before / after inside accordion 02 ---------- */

.before-after {
  display: grid;
  gap: 10px;
}

.state-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: var(--surface);
}

.state-card.before-card {
  background: #fff9f2;
  border-color: #efd1ad;
}

.state-card.after-card {
  background: var(--primary-50);
  border-color: var(--primary);
}

.state-card .state-label {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin: 0 0 6px;
}

.state-card h4 {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--text);
  line-height: 1.3;
}

.state-card ul {
  margin: 0;
  padding-left: 1rem;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.55;
}

/* ---------- First version list (accordion 03) ---------- */

.first-version-list,
.plan-list,
.open-questions {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.first-version-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.first-version-list .num {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--success-fg);
  background: var(--primary-50);
  padding: 4px 7px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.08em;
  font-weight: 600;
}

.first-version-list h4,
.plan-list h4 {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--text);
}

.first-version-list p,
.plan-list p {
  margin: 0;
  font-size: 12px;
  color: var(--text-2);
}

/* ---------- Plan list (accordion 04) ---------- */

.plan-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.plan-list .step {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--neutral-bg);
  color: var(--text-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.plan-list li.done .step {
  background: var(--success-bg);
  color: var(--success-fg);
}

.plan-list li.current .step {
  background: var(--warning-bg);
  color: var(--warning-fg);
}

.plan-list li.current h4 {
  color: var(--warning-fg);
}

/* ---------- Open questions (accordion 05) ---------- */

.open-question {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.oq-h {
  padding: 11px 12px 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  border-bottom: 1px solid var(--divider);
}

.oq-h h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  margin: 0;
  color: var(--text);
  line-height: 1.3;
}

.lbl-row.sm {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--warning-fg);
  font-weight: 600;
}

.lbl-row.sm .pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warning);
  animation: pcv-pulse 2s ease-in-out infinite;
}

.oq-body {
  padding: 10px 12px 12px;
}

/* ---------- Footer ---------- */

.ch-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 18px var(--pcv-gutter) 22px;
  margin-top: 14px;
}

.ch-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.ch-footer .for,
.ch-footer .by {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ch-footer .by {
  align-items: flex-end;
}

.ch-footer .lbl {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
}

.ch-footer .for-logo {
  width: 100px;
  height: auto;
}

.vslash-svg-sm {
  width: 26px;
  height: 26px;
}

.made-by-link {
  align-items: flex-end;
}

.ch-footer .sig-row {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--divider);
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-3);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------- Floating chip ---------- */

.your-chip {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  background: var(--text);
  color: var(--text-inv);
  border: 0;
  box-shadow: var(--shadow-md);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.your-chip:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.your-chip[hidden] {
  display: none;
}

/* ---------- Bottom-sheet registry ---------- */

.registry {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  max-height: 70vh;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius) var(--radius) 0 0;
  display: flex;
  flex-direction: column;
  transform: translateY(0);
  transition: transform 220ms ease;
}

.registry[hidden] {
  display: none;
}

.registry-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--divider);
}

.registry-h .lbl {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin: 0;
}

.registry-h .sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-2);
}

.registry-actions {
  display: flex;
  gap: 6px;
}

.btn-send {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: var(--text-inv);
  border: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.btn-send:hover {
  background: var(--success-fg);
}

.btn-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--neutral-bg);
  color: var(--text-2);
  border: 0;
}

.btn-close:hover {
  background: var(--border);
}

.registry-list {
  list-style: none;
  margin: 0;
  padding: 8px 6px 14px;
  overflow-y: auto;
  flex: 1;
}

.registry-list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
}

.registry-list li + li {
  border-top: 1px solid var(--divider);
}

.registry-list .icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--neutral-bg);
  color: var(--text-2);
}

.registry-list .icon.agree {
  background: var(--success-bg);
  color: var(--success-fg);
}

.registry-list .icon.meet {
  background: var(--info-bg);
  color: var(--info-fg);
}

.registry-list .icon.comment {
  background: var(--neutral-bg);
  color: var(--text-2);
}

.registry-list .text {
  font-size: 12px;
  color: var(--text);
  line-height: 1.4;
}

.registry-list .text .when {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

.registry-list .undo {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--info-fg);
  background: transparent;
  border: 0;
  padding: 4px 6px;
}

.registry-empty {
  padding: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
}

/* ---------- Comment dialog (native <dialog>) ---------- */

.pc-dialog {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 0;
  width: min(420px, calc(100vw - 28px));
  box-shadow: var(--shadow-lg);
}

.pc-dialog::backdrop {
  background: rgba(23, 23, 23, 0.42);
  backdrop-filter: blur(2px);
}

.pc-dialog form {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.pc-dialog-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.pc-dialog-h h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--text);
}

.pc-dialog textarea {
  width: 100%;
  min-height: 96px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text);
  background: var(--bg-2);
  resize: vertical;
}

.pc-dialog textarea:focus {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--focus);
}

.pc-dialog-f {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 4px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: var(--text-inv);
  border: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.btn-primary:hover {
  background: var(--success-fg);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--neutral-bg);
  color: var(--text-2);
  border: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.btn-secondary:hover {
  background: var(--border);
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--text);
  color: var(--text-inv);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: var(--shadow-md);
  opacity: 1;
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}

.toast[hidden] {
  display: none;
}

.toast.is-leaving {
  opacity: 0;
  transform: translateX(-50%) translateY(6px);
}

.toast .undo {
  font-family: var(--font-mono);
  color: #fde68a;
  background: transparent;
  border: 0;
  padding: 0 0 0 6px;
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 600;
}

/* ---------- Desktop ---------- */

@media (min-width: 760px) {
  body {
    font-size: 14px;
  }

  .pc-header .pc-shell,
  .pc-main,
  .ch-footer {
    padding-inline: 24px;
  }

  .ch-hero {
    padding-block: 28px 16px;
  }

  .ch-hero h1 {
    font-size: 32px;
    line-height: 1.12;
    max-width: 28ch;
  }

  .ch-hero .sub {
    font-size: 15px;
    max-width: 48ch;
  }

  .kpi-strip {
    margin-inline: 0;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .card,
  .banner {
    margin-inline: 0;
  }

  .kpi .value {
    font-size: 26px;
  }

  .kpi.success .value.healthy {
    font-size: 18px;
  }

  .before-after {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .registry {
    left: auto;
    right: 24px;
    bottom: 24px;
    width: 420px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
  }

  .your-chip {
    top: auto;
    bottom: 24px;
    right: 24px;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .card-h .lbl-row .pulse,
  .lbl-row.sm .pulse {
    animation: none;
  }

  .acc-row .chev {
    transition: none;
  }

  .toast,
  .registry {
    transition: none;
  }
}

/* ---------- Forced colors ---------- */

@media (forced-colors: active) {
  .badge,
  .opt,
  .qa-btn,
  .button,
  .btn-send,
  .btn-primary,
  .btn-secondary {
    border: 1px solid CanvasText;
  }
}
