/* DELTA-01: bounded contrast repair; accepted geometry and hierarchy retained. */
:root {
  /* 星奇天 rebrand (CURRENT §26): vermilion is reserved for the singular point, so primary actions use champagne. */
  --construction-cta: #e9d2ae;
  --construction-cta-hover: #f3e3c6;
  --construction-cta-text: #1a1511;
  --construction-muted-dark: #92969f;
  --construction-muted-light: #4c473f;
}
.btn.primary, .button-primary, .admin-btn.primary {
  background: var(--construction-cta);
  border-color: var(--construction-cta);
  color: var(--construction-cta-text);
}
.btn.primary:hover, .button-primary:hover, .admin-btn.primary:hover,
.button-primary:focus-visible {
  filter: none;
  background: var(--construction-cta-hover);
  border-color: var(--construction-cta-hover);
}
.editorial-grid .num, .metric span, .metric small {
  color: var(--construction-muted-dark);
}
.inner-mineral .editorial-grid .num,
.inner-mineral .editorial-grid p,
.mineral .content-card p,
.reading-toc a, .reading-index-line,
.choice-lanes span, .choice-lanes p,
.inner-mineral .source-mark,
.mineral .source-mark,
.reading-surface .source-mark {
  color: var(--construction-muted-light) !important;
}
.field-error { color: #ffb3a5; font-size: 14px; line-height: 1.6; margin: 8px 0 0; }
.field [aria-invalid="true"] { border-color: #ffb3a5; }
.error-summary { border-left: 2px solid #ffb3a5; padding: 16px; margin: 0 0 20px; }
.error-summary p { color: #ffb3a5; }
.error-summary a { color: #efebe3; text-underline-offset: 3px; }
.form-status { margin-top: 18px; font-size: 14px; line-height: 1.6; }
[hidden] { display: none !important; }
.error-summary:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
input, textarea, select, .error-summary, [id] { scroll-margin-top: calc(var(--header-h, 76px) + 24px); }
button.btn { display: inline-flex; align-items: center; justify-content: center; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.construction-chart { opacity: 1; transform: none; }
.construction-chart .palace { flex-direction: column; justify-content: flex-end; align-items: flex-start; }
.construction-chart .palace.is-dimmed { opacity: .65; }
.construction-chart .palace[aria-pressed="true"] { outline: 2px solid #4c473f; outline-offset: -3px; }
.chart-star { font-size: 12px; line-height: 1.5; }
.chart-star-primary { font-weight: 600; }
.chart-star-annotation { font-size: 11px; }
.chart-alternative { overflow-wrap: anywhere; margin-top: 24px; }
.chart-alternative table { width: 100%; border-collapse: collapse; text-align: left; }
.chart-alternative th, .chart-alternative td { padding: 8px; border-bottom: 1px solid currentColor; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

.chart-alternative {overflow-wrap:anywhere;max-width:100%;overflow-x:auto;}
.chart-alternative table {width:100%;border-collapse:collapse;}
.chart-alternative th,.chart-alternative td {padding:.6rem;text-align:left;border-bottom:1px solid currentColor;}
.chart-alternative .is-related {outline:2px solid var(--accent,#c83b25);outline-offset:-2px;}
.construction-chart [role=button] {min-width:44px;min-height:44px;}
.runtime-operation label {display:block;margin-top:1rem;}
.runtime-operation input,.runtime-operation select,.runtime-operation textarea {width:100%;max-width:100%;padding:.7rem;color:inherit;background:transparent;border:1px solid currentColor;}
.runtime-operation {overflow-wrap:anywhere;}
@media(max-width:480px){.construction-chart .chart-star-secondary{font-size:.7rem}.chart-alternative th,.chart-alternative td{padding:.3rem;font-size:.8rem}}
.chart-alternative pre {white-space:pre-wrap;overflow-wrap:anywhere;}

.ziwei-rule .num,.ziwei-rule p {color:var(--construction-muted-light)!important;}

.runtime-operation option {color:#141414;background:#fff;}
.runtime-operation :is(input,select,textarea,button):focus-visible {outline:2px solid #fff;outline-offset:3px;}
.runtime-operation button {min-height:44px;}

.inner-dark .section-kicker,.admin-nav-group,.decision-box label {color:var(--construction-muted-dark)!important;}
.ziwei-layer-map p {color:var(--construction-muted-light)!important;}
.construction-chart {grid-template-columns:repeat(4,minmax(0,1fr));}
.chart-alternative {min-width:0;}
@media(max-width:480px){.construction-chart .palace{padding:6px;min-width:0;font-size:14px;overflow-wrap:anywhere}.construction-chart .chart-star{font-size:11px}}

.reading-surface [data-runtime-chart] .btn {color:#27231e;border-color:#4c473f;background:transparent;}
.reading-surface [data-runtime-chart] .btn:focus-visible {outline-color:#27231e;}
.reading-surface,.reading-body,.reading-body>* {min-width:0;}
.reading-content {min-width:0;overflow-wrap:anywhere;}
.reading-content p,.reading-content section {max-width:100%;overflow-wrap:anywhere;}
.inner-dark .knowledge-architecture span,.inner-dark .source-mark,.admin-body .detail-grid dt {color:var(--construction-muted-dark)!important;}
.inner-mineral .card-index,.mineral .card-index,.reading-surface .status-label.neutral,.light>p {color:var(--construction-muted-light)!important;}
.private-panel article>span {color:var(--construction-muted-dark)!important;}
.knowledge-architecture span,.public-section.dark .source-mark {color:var(--construction-muted-dark)!important;}
.evidence-card.light .status-label.neutral {color:var(--construction-muted-light)!important;}

/* Bounded operations delta: existing private-header utility control. */
.private-topbar [data-runtime-action="logout"] {appearance:none;background:transparent;font-family:inherit;min-height:44px;min-width:56px;cursor:pointer;flex-shrink:0;}
.private-topbar [data-runtime-action="logout"]:focus-visible {outline:2px solid #efebe3;outline-offset:3px;}
.private-topbar [data-runtime-action="logout"]:disabled {cursor:wait;}

/* 星奇天 brand lockup in private and admin bars */
.xqt-brand{display:inline-flex;align-items:center;gap:10px;text-decoration:none}
.private-topbar .xqt-brand img,.admin-brand .xqt-brand img{height:auto}
