/* DET-OS Copilot Shell — light enterprise theme (CTO DIRECTIVE 012) */

:root {
  --bg: #f5f7fa;
  --panel: #ffffff;
  --border: #e2e8f0;
  --text: #1f2937;
  --muted: #5b6b7c;
  --accent: #1d4ed8;
  --accent-soft: #eaf1ff;
  --status-ok: #15803d;
  --status-attention: #b45309;
  --status-overdue: #b91c1c;
  --status-declared: #475569;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.06);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: var(--f-body, system-ui), system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
}

a { color: var(--accent); }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Unobtrusive synthetic-data labeling */
.demo-badge {
  position: fixed;
  bottom: 10px;
  left: 12px;
  z-index: 40;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.demo-inline {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 8px;
}

.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 264px;
  flex: 0 0 264px;
  background: var(--panel);
  border-right: 1px solid var(--border);
  padding: 18px 16px;
  overflow-y: auto;
}

.brand { font-weight: 700; font-size: 1.1rem; margin-bottom: 14px; }
.brand span { color: var(--accent); }

.sidebar h2 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin: 18px 0 8px;
}

.sidebar ul { list-style: none; margin: 0; padding: 0; }

.sidebar a {
  display: block;
  color: var(--text);
  text-decoration: none;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 0.92rem;
}

.sidebar a:hover { background: var(--accent-soft); text-decoration: none; }
/* módulos que aún no existen: visibles pero no se abren (decisión 10) */
.sidebar li.nav-soon { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 6px; padding: 7px 10px; font-size: 0.92rem; }
.sidebar li.nav-soon .soon-tag { margin-left: 0; font-size: .6rem; letter-spacing: 0; text-transform: none; }

.project-selector { display: flex; flex-direction: column; gap: 4px; }

.project-option {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
}

.project-option.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}

.workspace { flex: 1 1 auto; padding: 26px 30px; min-width: 0; }

.page-header h1, .page-header h2 { margin: 0 0 4px; font-size: 1.45rem; }
.page-description { margin: 0 0 8px; color: var(--muted); }

.section { margin-top: 22px; }
.section h2 { font-size: 1.02rem; margin: 0 0 10px; }

.card-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
  padding: 0;
  margin: 0;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  box-shadow: var(--shadow);
}

.card a { text-decoration: none; font-weight: 600; }
.card a:hover { text-decoration: underline; }

.chip {
  display: inline-block;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  color: var(--accent);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.78rem;
  margin: 2px;
}

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.76rem;
  font-weight: 600;
  border: 1px solid var(--border);
}

.status { color: var(--muted); font-size: 0.85rem; margin-top: 6px; }
.status-declared { color: var(--status-declared); }

.status-on-track { color: var(--status-ok); border-color: var(--status-ok); }
.status-attention { color: var(--status-attention); border-color: var(--status-attention); }
.status-overdue { color: var(--status-overdue); border-color: var(--status-overdue); }

.muted { color: var(--muted); }

.meta-details {
  margin-top: 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
}

.meta-details summary { cursor: pointer; color: var(--muted); font-size: 0.88rem; }
.meta-list { margin: 10px 0 0; padding-left: 18px; color: var(--muted); font-size: 0.88rem; }

/* Artifact canvas — large interactive display area */
.canvas {
  margin-top: 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  min-height: 420px;
  box-shadow: var(--shadow);
}

.canvas-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.canvas-toolbar .demo-inline { margin-left: auto; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--border); }

.timeline-item { position: relative; padding: 0 0 18px 22px; }

.timeline-marker {
  position: absolute;
  left: -7px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--status-declared);
  border: 2px solid var(--panel);
}

.timeline-marker.status-on-track { background: var(--status-ok); }
.timeline-marker.status-attention { background: var(--status-attention); }
.timeline-marker.status-overdue { background: var(--status-overdue); }

.commitment-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}

.commitment-card h3 { margin: 0 0 8px; font-size: 1rem; }

.commitment-meta { display: flex; gap: 22px; margin: 0 0 10px; flex-wrap: wrap; }
.commitment-meta dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.commitment-meta dd { margin: 2px 0 0; font-size: 0.92rem; }

/* Floating Copilot chat */
.chat-launcher {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  background: var(--accent);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 12px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(29, 78, 216, 0.35);
  cursor: pointer;
}

.chat-window {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 520px;
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
}

.chat-window.fullscreen {
  inset: 16px;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.chat-context { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.chat-context-chips { font-size: 0.72rem; }

.chat-controls { display: flex; gap: 6px; }
.chat-controls button {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  border-radius: 8px;
  width: 30px;
  height: 30px;
  cursor: pointer;
}

.chat-log { flex: 1 1 auto; overflow-y: auto; padding: 14px; }
.chat-system { color: var(--muted); font-style: italic; margin: 0; }

.chat-plus-area { position: relative; padding: 0 14px; }

#chat-plus {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--accent);
  font-size: 1.2rem;
  cursor: pointer;
}

.plus-menu {
  position: absolute;
  bottom: 44px;
  left: 0;
  z-index: 60;
  width: 230px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.plus-menu button {
  text-align: left;
  border: none;
  background: none;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 6px;
  cursor: not-allowed;
  font-size: 0.88rem;
}

.plus-note { margin: 6px 8px 4px; font-size: 0.72rem; color: var(--muted); }

.chat-input-row { padding: 10px 14px 14px; border-top: 1px solid var(--border); }

#chat-input {
  width: 100%;
  resize: vertical;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  font-family: inherit;
}

/* Responsive: sidebar stacks above content on narrow screens */
@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .sidebar {
    width: 100%;
    flex: 1 1 auto;
    max-height: 38vh;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .workspace { padding: 16px; }
  .card-list { grid-template-columns: 1fr; }
  .chat-window { right: 12px; left: 12px; width: auto; bottom: 78px; }
  .chat-window.fullscreen { inset: 8px; }
}

/* ==== Contract inside the shell — three columns (DIRECTIVE 037) ====
   LEFT 220px persistent navigation | CENTER flexible artifact | RIGHT ~380px Copilot */
.chat-system { font-style: normal; }
.sidebar .brand-link { color: inherit; text-decoration: none; }
.sidebar a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.sidebar .nav-main { margin-bottom: 4px; }
.auth-chip { margin: 12px 0 0; }

body.contract-shell { overflow: hidden; }
body.contract-shell .demo-badge { display: none; }
body.contract-shell .shell { height: 100vh; min-height: 0; }
body.contract-shell .sidebar {
  width: 220px; flex: 0 0 220px; overflow-y: auto;
  display: flex; flex-direction: column; padding: 16px 12px;
}
body.contract-shell .sidebar nav { flex: 1 1 auto; }
body.contract-shell .workspace {
  padding: 0; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden;
}
.cs-head {
  display: flex; align-items: center; gap: 10px; padding: 8px 16px;
  border-bottom: 1px solid var(--border); background: var(--panel); flex: 0 0 auto;
}
.cs-title { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; margin-right: auto; }
.cs-title .cs-h1 { margin: 0; font-size: 1rem; font-weight: 700; line-height: 1.2; }
.cs-sub { color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-btn {
  font: 500 .85rem inherit; font-family: inherit; border: 1px solid var(--border); background: var(--panel);
  color: var(--text); border-radius: 6px; padding: 5px 12px; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.cs-btn:hover { background: var(--accent-soft); text-decoration: none; }
.cs-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.cs-primary:hover { background: #1e40af; }
.cs-only-narrow { display: none; }
.artifact-frame { flex: 1 1 auto; width: 100%; min-height: 0; border: 0; background: #f2f5f8; }

/* ONE Copilot pattern (decision 24): a side panel, CLOSED by default, opened from the «Copilot» button of the header.
   Wide screens: an ordinary column that takes its width from the content while open and gives it back when closed.
   <= 1100 px: a drawer over the page; <= 560 px: full screen. */
.copilot-col {
  width: 380px; flex: 0 0 380px; display: none; flex-direction: column; min-height: 0;
  background: var(--panel); border-left: 1px solid var(--border);
}
.copilot-col.open { display: flex; }
.cc-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.cc-id { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; margin-right: auto; }
.cc-ctx { color: var(--muted); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-log {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 12px;
}
.msg { font-size: .9rem; line-height: 1.5; font-style: normal; overflow-wrap: anywhere; }
.msg-who { font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.msg-sys { color: var(--muted); background: #f8fafc; border: 1px dashed var(--border); border-radius: 8px; padding: 9px 11px; font-size: .84rem; }
.msg-wait { color: var(--muted); }
.msg-err { color: #b91c1c; background: #fef2f2; border-color: #fecaca; border-style: solid; }
.msg-user { align-self: flex-end; max-width: 92%; background: var(--accent-soft); border: 1px solid #c7d8fb; border-radius: 10px 10px 2px 10px; padding: 8px 11px; }
.msg-user .msg-text { color: var(--text); white-space: pre-wrap; }
.msg-ai { align-self: stretch; background: #fff; border: 1px solid var(--border); border-radius: 10px 10px 10px 2px; padding: 10px 12px; box-shadow: var(--shadow); }
.a-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.badge-t { font: 700 .68rem ui-monospace, monospace; letter-spacing: .06em; padding: 2px 8px; border-radius: 999px; border: 1px solid; }
.t-fact { background: #e6fcf5; color: #087f5b; border-color: #96f2d7; }
.t-prop { background: #fff4e6; color: #b45309; border-color: #ffd8a8; }
.t-assume { background: #fff9db; color: #8a6d00; border-color: #ffe066; }
.t-unk { background: #f1f5f9; color: #475569; border-color: #cbd5e1; }
.a-lead { margin: 0 0 6px; font-weight: 600; color: var(--text); }
.a-text { margin: 0 0 6px; color: var(--text); white-space: pre-line; }
.a-sum { font-size: .84rem; color: var(--text); background: #f8fafc; border-radius: 6px; padding: 6px 9px; margin-bottom: 8px; }
.a-recs { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 7px; }
.rec { display: flex; gap: 8px; align-items: flex-start; }
.rtag { flex: 0 0 auto; font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 6px; border-radius: 4px; margin-top: 2px; }
.rt-fact { background: #e6fcf5; color: #087f5b; }
.rt-prop { background: #fff4e6; color: #b45309; }
.rec-body { min-width: 0; }
.rec-title { font-size: .86rem; color: var(--text); }
.rec-meta { font-size: .76rem; color: var(--muted); }
.a-more, .a-src { margin-top: 8px; }
.a-more > summary, .a-src > summary { cursor: pointer; color: var(--accent); font-size: .8rem; font-weight: 600; }
.a-more .a-recs { margin-top: 7px; }
.src-list { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-direction: column; gap: 7px; font-size: .78rem; }
.src-head { color: var(--muted); font-weight: 600; }
.src-ex { color: var(--text); }
.a-actions { margin-top: 8px; display: flex; gap: 6px; }
.a-status { margin-top: 9px; padding: 6px 9px; border-radius: 6px; font-size: .76rem; border-left: 3px solid #94a3b8; background: #f8fafc; color: var(--text); }
.a-status.a-executed { border-left-color: #15803d; }
.a-status.a-proposed { border-left-color: #b45309; }
.a-status.a-blocked { border-left-color: #b91c1c; background: #fef2f2; }
.cc-suggest { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 14px; border-top: 1px solid var(--border); }
.cc-chip { font: 500 .78rem inherit; font-family: inherit; border: 1px solid var(--border); background: #fff; color: var(--text); border-radius: 999px; padding: 3px 10px; cursor: pointer; }
.cc-chip:hover { background: var(--accent-soft); }
.cc-compose { display: flex; gap: 6px; align-items: flex-end; padding: 8px 14px 12px; border-top: 1px solid var(--border); }
.cc-compose textarea {
  flex: 1 1 auto; min-width: 0; resize: none; font: inherit; font-size: .9rem; padding: 7px 9px;
  border: 1px solid var(--border); border-radius: 8px; max-height: 120px;
}
.cc-plus { position: relative; }
.cc-menu {
  position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 5; min-width: 230px; background: #fff;
  border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(15, 23, 42, .15); padding: 4px;
}
.cc-menu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 7px 10px; border-radius: 6px; cursor: pointer; font: inherit; font-size: .85rem; }
.cc-menu button:hover { background: var(--accent-soft); }
.cs-scrim { position: fixed; inset: 0; background: rgba(15, 23, 42, .4); z-index: 70; }

/* laptop: shrink the chat column slightly; narrow: chat becomes a drawer */
@media (max-width: 1280px) { .copilot-col { width: 360px; flex-basis: 360px; } }
@media (max-width: 1100px) {
  .cs-only-narrow { display: inline-block; }
  .copilot-col.open {
    position: fixed; top: 0; right: 0; bottom: 0; left: auto; width: min(400px, 100vw); z-index: 80;
    box-shadow: -8px 0 24px rgba(15, 23, 42, .18);
  }
  body.contract-shell .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 80; width: min(280px, 85vw); flex: none;
    transform: translateX(-105%); visibility: hidden;
    transition: transform .18s ease-out, visibility 0s linear .18s; box-shadow: 8px 0 24px rgba(15, 23, 42, .18);
    max-height: none; border-bottom: 0; border-right: 1px solid var(--border);
  }
  body.contract-shell .sidebar.open { transform: none; visibility: visible; transition-delay: 0s; }
}
.cs-sm { display: none; }
@media (max-width: 560px) {
  .copilot-col.open, aside.chat-window.copilot-col.open { width: 100vw; }
  .cs-head { padding: 8px 10px; gap: 6px; flex-wrap: nowrap; }
  .cs-head .demo-inline { display: none; }
  .cs-lg { display: none; }
  .cs-sm { display: inline; }
  .cs-title { flex: 1 1 auto; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) { .copilot-col, body.contract-shell .sidebar { transition: none; } }

/* D-2: touch targets >= 44x44 px for phones and coarse pointers */
@media (max-width: 560px), (pointer: coarse) {
  .cs-btn, .cc-chip, .cc-menu button, .logout-btn,
  .sidebar a, .project-option, .a-more > summary, .a-src > summary {
    min-height: 44px;
  }
  .cs-btn, .cc-chip, .logout-btn { min-width: 44px; }
  .sidebar a:not(.brand-link), .project-option, .a-more > summary, .a-src > summary, .cc-menu button {
    display: flex; align-items: center;
  }
  .sidebar .brand-link { display: inline-flex; align-items: center; gap: .3em; min-height: 44px; }
  .cs-head .cs-btn { padding-inline: 14px; }
  .cc-suggest { gap: 8px; }
  .cc-compose { align-items: stretch; }
  .cc-compose .cs-btn { min-height: 44px; }
  .cc-compose textarea { min-height: 44px; font-size: 16px; }
}

/* artifact frame: loading / failure presentation (centered over the workspace body) */
.frame-wrap { position: relative; flex: 1 1 auto; min-height: 0; display: flex; }
.frame-wrap .artifact-frame { flex: 1 1 auto; }
.frame-status {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: #f2f5f8; color: var(--text); text-align: center; padding: 24px;
}
.frame-status p { margin: 0; max-width: 34rem; }
.frame-status.is-error p { color: #b91c1c; font-weight: 600; }
.frame-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* ---- decision 24: every view shares the Contract layout (header + body + side panel) ---- */
.cs-actions { display: flex; align-items: center; gap: 10px; }
#more-toggle { display: none; }
@media (max-width: 600px) {
  /* phones: the module's own buttons move into «Más»; Ampliar vista and Pantalla completa do not exist on a phone; Copilot stays */
  .cs-head { position: relative; gap: 6px; }
  .cs-hide-narrow { display: none !important; }
  #more-toggle:not([hidden]) { display: inline-block; }
  .cs-actions { display: none; position: absolute; top: calc(100% + 4px); right: 10px; z-index: 75; flex-direction: column; align-items: stretch;
                gap: 6px; min-width: 200px; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 8px;
                box-shadow: 0 8px 24px rgba(15, 23, 42, .18); }
  .cs-actions.open { display: flex; }
  .cs-actions .cs-btn { text-align: left; }
  .cs-actions .cs-lg { display: inline; }
  .cs-actions .cs-sm { display: none; }
  .cs-head .cs-btn { padding-inline: 10px; }
  .cs-head .cs-title { flex: 1 1 0; min-width: 0; }
}
.page-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 22px 28px; }
@media (max-width: 860px) { .page-scroll { padding: 14px; } }
.cs-head .cs-title { margin-right: auto; }
.cs-head { min-height: 52px; }
/* the base chat (overview, Mis pendientes, module placeholders) is the same panel, not a floating window */
aside.chat-window.copilot-col {
  position: static; right: auto; left: auto; bottom: auto; top: auto; width: 380px; height: auto; max-height: none;
  border-radius: 0; box-shadow: none; flex: 0 0 380px; z-index: auto; max-width: none;
}
@media (max-width: 1280px) { aside.chat-window.copilot-col { width: 360px; flex-basis: 360px; } }
@media (max-width: 1100px) {
  aside.chat-window.copilot-col.open {
    position: fixed; top: 0; right: 0; bottom: 0; left: auto; width: min(400px, 100vw); z-index: 80;
    box-shadow: -8px 0 24px rgba(15, 23, 42, .18);
  }
}
aside.chat-window.copilot-col.fullscreen { position: fixed; inset: 0; width: auto; z-index: 90; flex: none; }
.chat-window .chat-log { min-height: 0; }

/* el nombre del proyecto es el selector de proyecto (Lote 1, PR A) */
.project-name { font: 600 1.05rem var(--f-body, inherit); padding: 6px 2px 10px; color: var(--text); overflow-wrap: anywhere; }
.project-select { width: 100%; font: 600 .98rem var(--f-body, inherit); padding: 7px 9px; margin: 2px 0 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--panel); color: var(--text); }

/* #30: on a phone the «demostración» label is part of the flow, never a fixed layer over a card */
@media (max-width: 560px) {
  .demo-badge { position: static; display: block; width: max-content; max-width: calc(100% - 24px); margin: 12px auto; }
}
