/* VAA Consortium: the platform skeleton (vaa.css) in the Hub's forest green and
   cream, Figtree, and the signature view "The Year". Rule colors (fit / warn /
   blocked) are used only for rule results. */
:root {
  --cx-ink: #203c36;
  --cx-green: #174a43;
  --cx-green-dark: #0f332e;
  --cx-soft: #edf3e6;
  --cx-mid: #a8c98f;
  --cx-light: #dcebc0;
  --cx-full: #eceae2;
  --cx-cream: #f5f5ef;
  --cx-line: #dde2d8;
  --cx-muted: #586b61;
  --cx-faint: #8a968d;
  --cx-gold: #d9a441;
  --cx-gold-soft: #f6ebd6;
  --cx-gold-ink: #8a6420;
  --cx-warn-ink: #8a5a00;
  --cx-fit: #2e6b3a;
  --cx-danger: #9b3030;
  --cx-danger-soft: #f7e6e4;
}
body.cx {
  font-family: "Figtree", "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--cx-cream);
  color: var(--cx-ink);
}
.cx h1, .cx h2, .cx h3 { font-family: "Figtree", "Manrope", sans-serif; letter-spacing: -0.01em; }
.cx button, .cx .button { border-radius: 12px; font-weight: 700; }
.cx button.primary, .cx .button.primary { background: var(--cx-green); border-color: var(--cx-green); }
.cx button.primary:hover:not(:disabled) { background: var(--cx-green-dark); }
.cx button.link { border: 0; background: none; color: var(--cx-green); padding: 4px 0; min-height: 32px; text-decoration: underline; font-weight: 600; }
.cx button.danger-link { border: 0; background: none; color: var(--cx-danger); padding: 4px 0; min-height: 32px; text-decoration: underline; font-weight: 600; }
.cx button.small { min-height: 36px; padding: 6px 12px; font-size: 13px; }
.cx a { color: var(--cx-green); }

/* ---- Top bar ---- */
.cx-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 14px; padding: 12px 28px; background: #fff; border-bottom: 1px solid var(--cx-line); flex-wrap: wrap; }
.cx-apps { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--cx-line); display: inline-flex; align-items: center; justify-content: center; color: var(--cx-ink); }
.cx-name { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--cx-ink); }
.cx-name svg { color: var(--cx-green); }
.cx-name span { font-weight: 800; font-size: 18px; }
.cx-name small { font-size: 14px; color: var(--cx-muted); }
.cx-tabs { display: flex; gap: 4px; flex: 1 1 auto; justify-content: flex-start; flex-wrap: wrap; }
.cx-tabs a { padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--cx-muted); font-weight: 700; font-size: 14px; }
.cx-tabs a:hover { background: var(--cx-soft); color: var(--cx-green); }
.cx-tabs a.active { background: var(--cx-soft); color: var(--cx-green); }
.cx-tabs a.desk.active { background: var(--cx-ink); color: #fff; }
.cx-tabs .count { display: inline-block; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--cx-green); color: #fff; font-size: 12px; margin-left: 4px; text-align: center; }
.cx-status { font-size: 13px; font-weight: 600; color: var(--cx-green); background: var(--cx-soft); padding: 6px 10px; border-radius: 999px; }
.cx-account details { position: relative; }
.cx-account summary { list-style: none; width: 36px; height: 36px; border-radius: 50%; background: var(--cx-soft); color: var(--cx-green); font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.cx-account summary::-webkit-details-marker { display: none; }
.cx-account details > div { position: absolute; right: 0; top: 44px; background: #fff; border: 1px solid var(--cx-line); border-radius: 14px; padding: 14px; min-width: 240px; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 10px 30px rgba(32, 60, 54, 0.12); }
.cx-account small { color: var(--cx-muted); }
.cx-account a { font-weight: 600; }

/* ---- Page ---- */
.cx-main { max-width: 1440px; margin: 0 auto; padding: 20px 28px 64px; }
.dev-banner { font-size: 13px; color: var(--cx-warn-ink); background: var(--cx-gold-soft); border-radius: 10px; padding: 8px 12px; margin-bottom: 14px; }
.cx-card { background: #fff; border: 1px solid var(--cx-line); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.cx-card h2 { font-size: 16px; font-weight: 800; margin: 0; }
.cx-card .muted, .cx .muted { color: var(--cx-muted); }
.cx-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; }
.cx-row b { font-weight: 800; white-space: nowrap; }
.cx-bar { height: 6px; border-radius: 3px; background: var(--cx-soft); overflow: hidden; }
.cx-bar > span { display: block; height: 6px; border-radius: 3px; background: var(--cx-green); }
.cx-bar.gold { background: var(--cx-gold-soft); }
.cx-bar.gold > span { background: var(--cx-gold); }
.cx-pill { font-size: 12px; font-weight: 700; color: var(--cx-green); background: var(--cx-soft); padding: 4px 8px; border-radius: 999px; white-space: nowrap; }
.cx-pill.gold { color: var(--cx-gold-ink); background: var(--cx-gold-soft); }
.cx-pill.dark { color: #fff; background: var(--cx-ink); }
.cx-note { font-size: 13px; color: var(--cx-muted); line-height: 1.45; margin: 0; }
.cx-problems { margin: 0; padding: 10px 12px 10px 30px; border-radius: 12px; background: var(--cx-danger-soft); color: var(--cx-danger); font-size: 13px; font-weight: 600; }
.cx-fine { font-size: 13px; color: var(--cx-fit); font-weight: 700; }
.cx-empty { text-align: center; padding: 36px 18px; }
.cx-empty h2 { font-size: 22px; }

/* ---- The Year ---- */
.cx-year { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.cx-months-wrap { flex: 999 1 720px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.cx-side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 14px; position: sticky; top: 76px; }
.cx-legend { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; font-size: 12px; color: #4a5c53; }
.cx-legend strong { font-weight: 800; font-size: 13px; color: var(--cx-ink); }
.cx-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cx-legend i { display: inline-block; width: 16px; height: 12px; border-radius: 3px; }
.cx-months { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cx-month { background: #fff; border: 1px solid var(--cx-line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 3px; }
.cx-month h3 { font-weight: 800; font-size: 14px; margin: 0 0 4px; }
.cx-dow, .cx-week { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; }
.cx-dow { font-size: 10px; font-weight: 700; color: var(--cx-faint); text-align: center; }
.cx-day { height: 24px; min-height: 0; padding: 0; border: 0; border-radius: 4px; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; background: var(--cx-full); color: #a8a79c; box-sizing: border-box; cursor: pointer; }
.cx-day.blank { background: transparent; cursor: default; }
.cx-day.s4 { background: var(--cx-green); color: #fff; }
.cx-day.s2 { background: var(--cx-mid); color: var(--cx-ink); }
.cx-day.s1 { background: var(--cx-light); color: var(--cx-ink); }
.cx-day.hol { background: transparent; color: #c5c3b8; }
.cx-day.sum { border-top: 3px solid var(--cx-gold); }
.cx-day.mine { outline: 2px solid var(--cx-ink); outline-offset: -2px; }
.cx-day.req::after { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; margin-left: 2px; }
.cx-day.out { opacity: 0.35; }
.cx-day.sel { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--cx-gold); }
.cx-day:focus-visible { outline: 3px solid #34775b; outline-offset: 1px; }
.cx-selected { background: var(--cx-ink); color: #fff; border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.cx-selected .eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.8; margin: 0; }
.cx-selected h2 { font-size: 18px; font-weight: 800; margin: 0; }
.cx-selected p { font-size: 13px; opacity: 0.88; line-height: 1.4; margin: 0; }
.cx-selected button.primary { background: #fff; color: var(--cx-ink); border-color: #fff; height: 44px; }
.cx-selected button.primary:hover:not(:disabled) { background: var(--cx-soft); }
.cx-selected .cx-types { display: flex; flex-wrap: wrap; gap: 6px; }
.cx-selected .cx-types label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.35); font-size: 13px; font-weight: 600; cursor: pointer; }
.cx-selected .cx-types label:has(input:checked) { background: #fff; color: var(--cx-ink); }
.cx-selected .cx-types input { width: 14px; height: 14px; accent-color: var(--cx-green); }
.cx-selected .warn { color: #ffd8a0; font-weight: 700; }
.cx-wish-mini { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.cx-wish-mini .taken { color: var(--cx-faint); text-decoration: line-through; }
.cx-wish-mini .note { color: var(--cx-gold-ink); font-weight: 600; }

/* ---- Turn ---- */
.cx-turn-page { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.cx-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cx-tile { background: #fff; border: 1px solid var(--cx-line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.cx-tile small { font-size: 11px; font-weight: 700; color: var(--cx-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.cx-tile b { font-size: 20px; font-weight: 800; }
.cx-tile b span { font-size: 13px; color: var(--cx-muted); font-weight: 600; }
.cx-tile .calls { font-size: 13px; font-weight: 700; line-height: 1.35; }
.cx-banner { padding: 16px; border-radius: 16px; background: var(--cx-green); color: #fff; display: flex; flex-direction: column; gap: 8px; }
.cx-banner.waiting { background: #fff; color: var(--cx-ink); border: 1px solid var(--cx-line); }
.cx-banner.late { background: #5b4a1a; }
.cx-banner .top { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.85; }
.cx-banner .big { font-size: 21px; font-weight: 800; }
.cx-banner p { font-size: 13px; opacity: 0.92; line-height: 1.4; margin: 0; }
.cx-slots { display: flex; flex-direction: column; gap: 8px; }
.cx-slot { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: #fff; border: 2px solid var(--cx-green); }
.cx-slot .date { width: 52px; text-align: center; }
.cx-slot .date small { display: block; font-size: 11px; font-weight: 700; color: var(--cx-muted); }
.cx-slot .date b { font-size: 16px; font-weight: 800; }
.cx-slot .what { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.cx-slot .what small { font-size: 12px; color: var(--cx-muted); }
.cx-slot button { width: 36px; height: 36px; min-height: 36px; border-radius: 50%; padding: 0; font-size: 16px; }
.cx-add { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 64px; border-radius: 14px; border: 2px dashed #c9d6be; background: transparent; color: var(--cx-green); font-weight: 700; font-size: 14px; text-decoration: none; }
.cx-quick { display: flex; flex-direction: column; gap: 6px; }
.cx-quick button, .cx-quick .gone { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--cx-line); text-align: left; color: var(--cx-ink); font-size: 14px; font-weight: 600; justify-content: flex-start; min-height: 44px; }
.cx-quick .n { font-weight: 800; color: var(--cx-muted); width: 18px; }
.cx-quick .grow { flex: 1; }
.cx-quick .act { font-size: 12px; font-weight: 700; color: var(--cx-green); }
.cx-quick .gone { background: #efefe8; color: var(--cx-muted); }
.cx-quick .gone .grow { text-decoration: line-through; }
.cx-confirm { position: sticky; bottom: 0; padding: 12px 0 16px; background: linear-gradient(to top, var(--cx-cream) 80%, rgba(245, 245, 239, 0)); display: flex; flex-direction: column; gap: 6px; }
.cx-confirm button.primary { height: 52px; font-size: 16px; font-weight: 800; border-radius: 14px; }
.cx-confirm .cx-note { text-align: center; }
.cx-other { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; }
.cx-other label { font-size: 12px; font-weight: 700; color: var(--cx-muted); display: flex; flex-direction: column; gap: 4px; }

/* ---- Wishlist ---- */
.cx-wish { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cx-wish li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--cx-line); }
.cx-wish li.dragging { opacity: 0.5; }
.cx-wish li.blocked { background: #efefe8; color: var(--cx-muted); }
.cx-wish li.blocked .t { text-decoration: line-through; }
.cx-wish li.triple { flex-wrap: wrap; background: var(--cx-soft); border-color: #c9d6be; }
.cx-wish .grip { color: #a3ada5; cursor: grab; font-size: 16px; user-select: none; }
.cx-wish .n { font-weight: 800; width: 18px; color: var(--cx-muted); }
.cx-wish .body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cx-wish .t { font-weight: 700; }
.cx-wish small { font-size: 12px; color: var(--cx-muted); }
.cx-wish small.gold { color: var(--cx-gold-ink); font-weight: 600; }
.cx-wish .tools { display: flex; gap: 4px; }
.cx-wish .tools button { min-height: 32px; width: 32px; padding: 0; border-radius: 8px; font-size: 13px; }
.cx-wish input[type="checkbox"] { width: 20px; height: 20px; }
.cx-toggle { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.cx-toggle input { width: 24px; height: 24px; flex-shrink: 0; }

/* ---- Desk ---- */
.cx-desk { display: flex; flex-direction: column; gap: 20px; }
.cx-steps { display: flex; gap: 6px; flex-wrap: wrap; font-size: 13px; font-weight: 700; }
.cx-steps span { padding: 8px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--cx-line); color: var(--cx-muted); }
.cx-steps span.done { background: var(--cx-green); border-color: var(--cx-green); color: #fff; }
.cx-steps span.now { background: var(--cx-soft); color: var(--cx-green); outline: 2px solid var(--cx-green); border-color: transparent; }
.cx-steps span.next { background: #fff; color: var(--cx-green); outline: 2px dashed var(--cx-green); border-color: transparent; }
.cx-cols { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.cx-cols > * { flex: 1 1 380px; min-width: 0; }
.cx-order { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.cx-order li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 10px; }
.cx-order li.up { background: var(--cx-soft); font-weight: 700; }
.cx-order .ok { color: var(--cx-fit); font-weight: 600; }
.cx-order .warn { color: var(--cx-warn-ink); font-weight: 600; }
.cx-order .quiet { color: var(--cx-muted); }
.cx-order li[draggable="true"] { cursor: grab; border: 1px solid var(--cx-line); background: #fff; }
.cx-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cx-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cx-table th { text-align: left; color: var(--cx-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; padding: 6px 8px; }
.cx-table td { padding: 8px; border-top: 1px solid #ecede6; vertical-align: top; }
.cx-table td.num { font-variant-numeric: tabular-nums; }
.cx-table .strong { font-weight: 800; }
.cx-next { background: var(--cx-ink); color: #fff; border-radius: 16px; padding: 18px 20px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.cx-next h2 { margin: 0; font-size: 18px; font-weight: 800; }
.cx-next p { margin: 4px 0 0; font-size: 13px; opacity: 0.85; }
.cx-next button.primary { background: #fff; color: var(--cx-ink); border-color: #fff; }
.cx-next input { width: auto; }
.cx-preview { border: 1px solid var(--cx-line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.cx-preview.live { border-color: var(--cx-danger); }
.cx-scroll { overflow-x: auto; }
.cx-activity { list-style: none; margin: 0; padding: 0; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.cx-activity li { display: flex; gap: 8px; justify-content: space-between; border-top: 1px solid #ecede6; padding-top: 4px; }

#toast { display: none; position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--cx-ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; z-index: 20; max-width: min(560px, calc(100vw - 32px)); }
.cx dialog { border: 1px solid var(--cx-line); border-radius: 16px; max-width: min(520px, calc(100vw - 32px)); }
.cx dialog h2 { font-size: 18px; margin-top: 0; }

@media (max-width: 1200px) { .cx-months { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .cx-side { position: static; }
  .cx-months { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cx-name small { display: none; }
}
@media (max-width: 640px) {
  .cx-top { padding: 10px 16px; gap: 10px; }
  .cx-main { padding: 14px 16px 48px; }
  .cx-tabs { order: 5; flex-basis: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .cx-status { display: none; }
  .cx-months { grid-template-columns: minmax(0, 1fr); }
  .cx-day { height: 30px; font-size: 11px; }
  .cx-other { grid-template-columns: 1fr; }
}
