:root {
  color-scheme: light;
  --hf-accent: #6447aa;
  --hf-ink: #211a34;
  --cl-ink: #252036;
  --cl-muted: #5d576b;
  --cl-line: #ded8e8;
  --cl-paper: #f5f2fa;
  --cl-violet: #553b96;
  --cl-nav: #231e35;
  --cl-panel: rgba(255,255,255,.82);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
[hidden] { display: none !important; }
.claire-console, .claire-login { color: var(--cl-ink); background: var(--cl-paper); }
.claire-console .layout { display: grid; min-height: 100dvh; grid-template-columns: 248px minmax(0, 1fr); align-items: start; }
.claire-console .sidebar { height: 100dvh; position: sticky; inset-block-start: 0; width: auto; padding: 27px 16px 21px; background: var(--cl-nav); color: #f9f5ff; border: 0; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand img { flex: 0 0 auto; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 24px; font-weight: 760; letter-spacing: -.075em; line-height: 1; }
.brand small { margin-top: 4px; font-size: 11px; font-weight: 600; letter-spacing: .035em; }
.claire-console .sidebar-brand { border-bottom: 1px solid #ffffff25; padding: 0 10px 24px; }
.claire-console .sidebar-nav { display: grid; gap: 5px; margin-top: 20px; padding: 0; overflow: auto; }
.claire-console .sidebar-nav a { color: #ded9e9; min-height: 43px; padding: 11px 12px; border-radius: 9px; font-size: 14px; font-weight: 600; text-decoration: none; }
.claire-console .sidebar-nav a:hover, .claire-console .sidebar-nav a[aria-current] { color: #fff; background: #d7ceff24; }
.claire-console .sidebar-nav a[aria-current] { box-shadow: inset 3px 0 #c6b6ff; }
.claire-console .sidebar-foot { margin-top: auto; gap: 8px; align-items: start; border-color: #ffffff25; color: #e9e3f1; }
.claire-console .sidebar-foot span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.claire-console .sidebar-foot .ghost { color: #fff; background: #ffffff13; border-color: #ffffff40; }
.claire-main { min-width: 0; }
.claire-console .topbar { position: sticky; top: 0; z-index: 4; flex-wrap: wrap; min-height: 75px; padding: 12px clamp(22px,4vw,60px); background: #f5f2fae6; backdrop-filter: blur(18px); border-bottom: 1px solid var(--cl-line); }
.claire-console .topbar .page-title { color: var(--cl-muted); font-size: 14px; font-weight: 680; }
.claire-console .topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-actions label { font-size: 12px; color: var(--cl-muted); font-weight: 650; }
.topbar-actions select { max-width: 275px; min-width: 140px; width: auto; }
.claire-console .content { width: min(1320px,100%); margin: 0 auto; padding: 36px clamp(22px,4vw,60px) 60px; }
.skip-link { position: fixed; top: -100px; left: 10px; z-index: 20; background: white; padding: 9px; }
.skip-link:focus { top: 10px; }
.claire-hero { position: relative; margin-bottom: 23px; padding: clamp(24px,4vw,42px); min-height: 185px; display: flex; align-items: center; justify-content: space-between; gap: 24px; background: #ebe4fb; border: 1px solid #ded2f1; border-radius: 17px; overflow: hidden; }
.claire-hero h1, .view-head h1 { margin: 0; font-size: clamp(31px,4vw,56px); letter-spacing: -.058em; font-weight: 745; line-height: 1.03; overflow-wrap: anywhere; }
.claire-hero p { color: #54476a; margin: 12px 0 0; font-size: 15px; max-width: 490px; }
.claire-hero > * { position: relative; }
.claire-hero::before, .claire-hero::after { content: ""; position: absolute; pointer-events: none; width: 285px; height: 285px; right: 6%; top: -105px; border: 1px solid #a692cf55; border-radius: 50%; }
.claire-hero::after { transform: translate(32px, 30px); }
.claire-console .primary, .claire-login .primary { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; border: 1px solid #533991; background: #583d99; color: #fff; text-decoration: none; font-weight: 680; border-radius: 9px; white-space: nowrap; }
.claire-console .primary:hover, .claire-login .primary:hover { background: #49317f; color: #fff; }
.claire-console .ghost { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; font-weight: 650; color: var(--cl-violet); border-color: #d7cde8; background: #ffffffad; border-radius: 9px; text-decoration: none; }
.claire-console .ghost:hover { background: #eae2f8; color: #392763; }
.claire-console .sidebar-foot .ghost:hover { color: var(--cl-nav); }
.claire-console .ghost.small { min-height: 34px; padding: 6px 10px; font-size: 12px; }
.claire-console select, .claire-console input:not([type=checkbox]), .claire-console textarea, .claire-login input { border: 1px solid #ccc2d7; color: var(--cl-ink); background-color: #fff; border-radius: 8px; min-height: 42px; padding: 8px 11px; }
.claire-console :focus-visible, .claire-login :focus-visible { outline: 3px solid #9577e4; outline-offset: 3px; }
.board-metrics { display: grid; gap: 13px; grid-template-columns: repeat(3,minmax(0,1fr)); margin-bottom: 26px; }
.board-metrics a { display: grid; align-content: space-between; gap: 5px; padding: 18px; min-height: 98px; text-decoration: none; color: inherit; }
.panel, .board-metrics a { border: 1px solid var(--cl-line); background: var(--cl-panel); border-radius: 13px; }
.board-metrics a:hover { border-color: #ad97d8; }
.board-metrics span { font-size: 13px; color: var(--cl-muted); font-weight: 650; }
.board-metrics strong { font-size: clamp(24px,3vw,34px); letter-spacing: -.05em; line-height: 1; }
.view-head, .panel-head { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; }
.view-head { margin: 0 0 22px; }
.view-head h1 { font-size: clamp(30px,3.8vw,48px); }
.view-actions, .row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.panel + .panel { margin-top: 20px; }
.panel-head { padding: 17px 19px; border-bottom: 1px solid var(--cl-line); }
.panel-head h2, .dialog-head h2 { margin: 0; font-size: 19px; letter-spacing: -.025em; }
.dashboard-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 17px; align-items: start; }
.dashboard-grid .panel { margin: 0; }
.entity { padding: 13px 18px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 11px; align-items: center; min-height: 65px; }
.entity + .entity { border-top: 1px solid var(--cl-line); }
.entity strong, .entity small { display: block; overflow-wrap: anywhere; }
.entity small { margin-top: 3px; color: var(--cl-muted); font-size: 12px; }
.entity .row-actions { justify-content: flex-end; }
.entity .summary { grid-column: 2 / -1; margin: 0; font-size: 13px; color: var(--cl-muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.monogram { display: grid; place-items: center; min-width: 35px; height: 35px; padding: 4px; border-radius: 10px; background: #ece5f8; color: #49327e; font-weight: 730; font-size: 12px; }
.cl-pill { display: inline-block; border-radius: 20px; padding: 4px 8px; font-size: 11px; font-weight: 720; white-space: nowrap; background: #efebf5; color: #524266; }
.cl-pill.ok { background: #e3f1ea; color: #205740; }
.cl-pill.warn { background: #faedce; color: #694911; }
.empty { padding: 22px 19px; color: var(--cl-muted); margin: 0; font-size: 14px; }
.environment-info { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); padding: 4px 20px 20px; gap: 10px 18px; }
.environment-info dt { font-weight: 650; color: var(--cl-muted); font-size: 13px; }
.environment-info dd { margin: 4px 0 0; overflow-wrap: anywhere; }
.environment-info a { color: var(--cl-violet); }
.dialog-head, .dialog-actions { display: flex; gap: 10px; justify-content: space-between; align-items: center; }
#editor { position: fixed; inset: 0; max-height: min(90dvh,780px); width: min(100% - 25px,570px); padding: 0; border: 1px solid #d5c9e6; border-radius: 15px; color: var(--cl-ink); background: #fdfaff; box-shadow: 0 25px 70px #211a3460; }
#editor::backdrop { background: #231b39aa; backdrop-filter: blur(3px); }
.dialog-head { padding: 16px 21px; border-bottom: 1px solid var(--cl-line); }
.dialog-head .close { font-size: 23px; min-height: 34px; padding: 1px 9px; }
.dialog-content { padding: 15px 21px 5px; display: grid; gap: 12px; }
.dialog-content .field, #login-form .field { font-size: 13px; font-weight: 680; color: var(--cl-ink); display: grid; gap: 6px; }
.dialog-content input:not([type=checkbox]), .dialog-content select, .dialog-content textarea, #login-form input { width: 100%; }
.dialog-content textarea { min-height: 105px; resize: vertical; font: inherit; font-weight: 400; }
.dialog-content .check { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 14px; }
.dialog-content fieldset { border: 1px solid var(--cl-line); padding: 6px 13px; border-radius: 9px; min-width: 0; }
.dialog-content legend { font-size: 13px; font-weight: 650; }
.dialog-content p { margin: 0; overflow-wrap: anywhere; }
.dialog-actions { justify-content: flex-end; padding: 14px 21px 18px; }
.cl-error { margin: 8px 21px; color: #862c45; font-size: 13px; }
.toast { position: fixed; z-index: 10; inset: auto 16px 16px auto; max-width: min(480px, 100% - 32px); color: white; background: #34284d; padding: 12px 17px; border-radius: 9px; }
.loading-panel { min-height: 160px; display: grid; gap: 12px; justify-items: center; align-content: center; color: var(--cl-muted); }
.loading-panel img { animation: claire-pulse .9s alternate infinite ease-in-out; }
@keyframes claire-pulse { from { opacity: .58; transform: scale(.94); } to { opacity: 1; transform: scale(1.04); } }
@media (prefers-reduced-motion: reduce) { .loading-panel img { animation: none; } }
.claire-login { background: #eee8f9; min-height: 100dvh; }
.claire-login .login-shell { width: min(435px,100%); }
.claire-login .login-brand { justify-content: center; margin-bottom: 22px; }
.claire-login .login-card { border: 1px solid #dcd1e9; background: #ffffffd9; padding: 29px; border-radius: 16px; box-shadow: 0 15px 50px #42317415; }
.claire-login h1 { font-size: 27px; letter-spacing: -.045em; }
#login-form { display: grid; gap: 14px; }
#login-form .cl-error { margin: 0; }
.login-notice { font-size: 13px; color: var(--cl-muted); }
@media (max-width: 960px) {
  .claire-console .layout { display: block; }
  .claire-console .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 60; width: min(248px, 85vw); }
  .claire-console .topbar .menu-toggle { display: inline-flex; align-items: center; gap: 5px; min-height: 37px; width: auto; padding: 7px 10px; color: var(--cl-ink); font-size: 12px; }
}
@media (max-width: 720px) {
  .claire-console .content { padding: 24px 16px 42px; }
  .claire-console .topbar { min-height: 65px; padding: 8px 14px; }
  .dashboard-grid { grid-template-columns: minmax(0,1fr); }
  .board-metrics { gap: 7px; }
  .board-metrics a { padding: 12px 9px; min-height: 78px; }
  .board-metrics span { font-size: 11px; }
  .entity .row-actions .ghost { min-height: 39px; }
}
@media (max-width: 480px) {
  .claire-console .topbar { gap: 8px; }
  .topbar-actions label { display: none; }
  .topbar-actions select { min-width: 90px; max-width: 132px; }
  .claire-hero { align-items: flex-start; flex-direction: column; gap: 17px; }
  .entity { padding: 12px; grid-template-columns: auto minmax(0,1fr); }
  .entity .row-actions, .entity .summary { grid-column: 2; justify-content: flex-start; }
  .environment-info { grid-template-columns: minmax(0,1fr); }
}
