/* Content Desk. Colors and fonts are set from the engine's brand (info.theme) at load; these are fallbacks. */
:root {
  --primary: #003385; --primary-deep: #0A2A66; --ink: #0A1B3D; --paper: #FBF7EF; --paper-hi: #FFFDF9; --paper-lo: #EFE6D6;
  --accent: #C0892F; --accent-soft: #E2B354; --negative: #BE6B43; --line: #E6DDC8; --line-strong: #D9CFB8; --muted: #55534E;
  --primary-tint: color-mix(in srgb, var(--primary) 9%, white);
  --accent-tint: color-mix(in srgb, var(--accent) 18%, white);
  --accent-ink: color-mix(in srgb, var(--accent) 45%, black);
  --negative-tint: color-mix(in srgb, var(--negative) 14%, white);
  --negative-ink: color-mix(in srgb, var(--negative) 60%, black);
  --font-display: Fraunces, Georgia, serif; --font-body: Inter, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.45 var(--font-body); }
a { color: var(--primary); } a:hover { color: var(--ink); }
button, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 8px; padding: 8px 12px; background: #fff; z-index: 50; }
.skip:focus { left: 8px; }

/* header */
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 32px; background: var(--ink); color: var(--paper); }
.brand { display: flex; align-items: baseline; gap: 12px; }
.brand-name { font-family: var(--font-display); font-size: 22px; font-weight: 600; }
.brand-tag, .mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.brand-tag { color: var(--accent-soft); }
.nav { display: flex; gap: 6px; }
.nav a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px; color: var(--paper); font-weight: 600; text-decoration: none; }
.nav a[aria-current=page] { background: var(--paper); color: var(--ink); }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--accent-soft); color: var(--ink); font-size: 12px; font-weight: 700; }
.who { display: flex; align-items: center; gap: 10px; }
.who label { font-size: 13px; color: #D5DAE4; }
.who select { min-height: 40px; padding: 0 12px; border-radius: 8px; border: 1px solid #3A4A6B; background: #13264A; color: var(--paper); }
.banner { padding: 10px 32px; background: var(--accent-tint); color: var(--accent-ink); font-weight: 600; }

/* page */
.view { max-width: 1440px; margin: 0 auto; padding: 28px 32px 56px; }
.view:focus { outline: none; }
.eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); }
h1 { margin: 4px 0 0; font-family: var(--font-display); font-size: 40px; font-weight: 600; letter-spacing: -.01em; line-height: 1.1; }
.lede { margin: 6px 0 0; color: var(--muted); max-width: 760px; }
.head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--line-strong); background: #fff; color: var(--ink); font-weight: 600; text-decoration: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.danger { border-color: color-mix(in srgb, var(--negative) 35%, white); color: var(--negative-ink); }
.btn.icon { width: 44px; padding: 0; }
.pills { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.pill { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px; border-radius: 10px; text-decoration: none; }
.pill.warm { background: var(--accent-tint); color: var(--accent-ink); font-weight: 600; }
.pill.cool { background: var(--primary-tint); color: var(--ink); }
.dot { width: 8px; height: 8px; border-radius: 4px; background: var(--accent); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; align-self: flex-start; }
.chip.pending, .chip.queued { background: var(--accent-tint); color: var(--accent-ink); }
.chip.today { background: var(--accent); color: #1F1405; }
.chip.posted { background: var(--primary-tint); color: var(--primary-deep); }
.chip.held, .chip.other { background: #ECEAE4; color: #33322F; }
.chip.rejected { background: var(--negative-tint); color: var(--negative-ink); }
.chip.problem { background: var(--negative-ink); color: #fff; }
.note { margin: 20px 0 0; font-size: 13px; color: var(--muted); }
.empty { padding: 28px; border-radius: 14px; border: 1px dashed var(--line-strong); color: var(--muted); text-align: center; }

/* calendar */
.cal-scroll { margin-top: 24px; }
.cal-grid { display: grid; grid-template-columns: 132px repeat(7, minmax(0, 1fr)); gap: 10px; }
.cal-head { align-items: end; }
.day-h { display: flex; flex-direction: column; gap: 2px; padding: 0 4px 8px; border-bottom: 3px solid var(--line); }
.day-h.today { border-color: var(--primary); }
.day-h .mono { color: var(--muted); }
.day-h .d { font-family: var(--font-display); font-size: 26px; font-weight: 600; }
.day-h.off .d, .day-h.off .mono { color: #6B6862; }
.today-tag { font-size: 12px; font-weight: 700; color: var(--primary); }
.cal-rows { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.net { display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.net-ic { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: var(--ink); color: var(--paper); }
.net strong { font-weight: 700; }
.cell { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tile { display: flex; flex-direction: column; gap: 8px; width: 100%; min-width: 0; padding: 8px 8px 12px; border-radius: 12px; border: 2px solid var(--line); background: #fff; color: var(--ink); text-align: left; }
.tile:hover { border-color: var(--line-strong); }
.tile[aria-pressed=true] { border-color: var(--primary); }
.tile img { width: 100%; height: 150px; object-fit: cover; object-position: top; border-radius: 8px; background: var(--paper-lo); }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile .t { font-weight: 700; font-size: 14px; line-height: 1.3; }
.tile .s { font-size: 13px; color: var(--muted); line-height: 1.35; }
.slot { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 120px; border-radius: 12px; border: 1px dashed var(--line-strong); color: #6B6862; font-size: 13px; text-align: center; padding: 8px; }
.slot.next { border-color: var(--primary); color: var(--primary); font-weight: 600; background: var(--primary-tint); }

/* drawer */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(500px, 100%); overflow-y: auto; display: flex; flex-direction: column; gap: 16px; padding: 24px 28px 40px; background: #fff; border-left: 1px solid var(--line); box-shadow: -24px 0 48px rgba(10, 27, 61, .14); z-index: 20; }
.drawer h2 { margin: 0; font-family: var(--font-display); font-size: 28px; font-weight: 600; line-height: 1.15; }
.drawer-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.meta { font-size: 13px; color: var(--muted); }
.viewer { display: flex; align-items: center; gap: 10px; }
.viewer img { width: 100%; max-width: 440px; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; border-radius: 12px; border: 1px solid var(--line); background: var(--paper-lo); }
.drawer .viewer img { max-width: 340px; }
.round { flex: 0 0 44px; height: 44px; border-radius: 22px; border: 1px solid var(--line-strong); background: #fff; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); }
.counter { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; color: var(--ink); font-weight: 600; }
.tab[aria-selected=true], .tab[aria-checked=true] { background: var(--primary); border-color: var(--primary); color: #fff; }
.caption { padding: 14px 16px; border-radius: 10px; background: var(--paper); border: 1px solid var(--paper-lo); white-space: pre-line; font-size: 14px; overflow-wrap: anywhere; }
.decide { display: flex; flex-direction: column; gap: 10px; }
.row-btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hint { font-size: 13px; color: var(--muted); }
textarea { padding: 12px; border-radius: 10px; border: 1px solid var(--line-strong); resize: vertical; min-height: 96px; width: 100%; }
label.lbl { font-weight: 600; }
.recorded { padding: 12px 14px; border-radius: 10px; background: var(--primary-tint); font-size: 14px; }
.history { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.history li { display: flex; gap: 14px; font-size: 14px; }
.history .when { flex: 0 0 150px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.history .what { min-width: 0; overflow-wrap: anywhere; }

/* review */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.filter { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; color: var(--ink); font-weight: 600; }
.filter[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.filter .n { font-family: var(--font-mono); font-size: 12px; }
.section-h { margin: 32px 0 14px; font-family: var(--font-display); font-size: 24px; font-weight: 600; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(560px, 100%), 1fr)); gap: 18px; }
.card { display: flex; flex-direction: column; gap: 14px; padding: 20px 22px 22px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.card h3 { margin: 0; font-family: var(--font-display); font-size: 23px; font-weight: 600; line-height: 1.2; }
.card h3 a { color: inherit; text-decoration: none; } .card h3 a:hover { text-decoration: underline; }
.card-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.facts strong { color: var(--ink); }
.designs { display: flex; gap: 12px; }
.design { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1 1 0; min-width: 0; padding: 6px 6px 8px; border-radius: 12px; border: 2px solid var(--paper-lo); background: #fff; color: var(--ink); }
.design[aria-checked=true] { border-color: var(--primary); background: var(--primary-tint); }
.design img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; border-radius: 8px; background: var(--paper-lo); }
.design span { font-size: 13px; font-weight: 700; }
.list { display: flex; flex-direction: column; border-radius: 14px; background: #fff; border: 1px solid var(--line); overflow: hidden; }
.lrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 12px 20px; border-top: 1px solid var(--paper-lo); }
.lrow:first-child { border-top: 0; }
.lrow img { width: 44px; height: 55px; object-fit: cover; object-position: top; border-radius: 6px; background: var(--paper-lo); }
.lrow .w { flex: 0 0 120px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.lrow .t { flex: 999 1 300px; min-width: 0; font-weight: 600; }
.lrow .x { flex: 0 1 260px; font-size: 13px; color: var(--muted); }

/* one post */
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; text-decoration: none; }
.post { display: flex; flex-wrap: wrap; gap: 40px; margin-top: 10px; align-items: flex-start; }
.post .slides { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.post .details { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.strip { display: flex; gap: 10px; flex-wrap: wrap; }
.strip button { padding: 3px; width: 84px; border-radius: 10px; border: 2px solid var(--line); background: #fff; }
.strip button[aria-current=true] { border-color: var(--primary); }
.strip img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; border-radius: 7px; }
.facts4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.fact { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.fact span { font-size: 12px; color: var(--muted); }
.panel { display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.panel h2 { margin: 0; font-size: 17px; font-weight: 700; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: min(560px, 92vw); padding: 12px 18px; border-radius: 12px; background: var(--ink); color: var(--paper); box-shadow: 0 12px 30px rgba(10, 27, 61, .25); z-index: 30; }
.toast.err { background: var(--negative-ink); }
.loading { color: var(--muted); }

@media (max-width: 900px) {
  .top, .view, .banner { padding-left: 16px; padding-right: 16px; }
  .cal-scroll { overflow-x: auto; }
  .cal-scroll > div { min-width: 920px; }
  h1 { font-size: 32px; }
}

/* pinned notes in an edit request (like a design tool: tap a spot on the slide) */
.viewer-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pinwrap { position: relative; flex: 1 1 auto; max-width: 440px; line-height: 0; }
.pinwrap img { display: block; width: 100%; max-width: 100%; }
.pinwrap.pinning img { cursor: crosshair; outline: 3px dashed var(--accent); outline-offset: 3px; }
.pin { position: absolute; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 15px 15px 15px 2px; border: 2px solid #fff; background: var(--primary); color: #fff; font: 700 13px/26px var(--font-body); text-align: center; padding: 0; box-shadow: 0 4px 12px rgba(10, 27, 61, .35); z-index: 3; }
.pin.draft { background: #fff; color: var(--primary); border: 2px dashed var(--primary); line-height: 24px; }
.pop { position: absolute; z-index: 4; width: 290px; max-width: 80vw; line-height: 1.45; transform: translate(18px, -12px); display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line-strong); box-shadow: 0 16px 36px rgba(10, 27, 61, .2); }
.pop.left { transform: translate(calc(-100% - 18px), -12px); }
.pop textarea { min-height: 70px; }
.link { background: none; border: 0; padding: 4px 2px; min-height: 32px; color: var(--primary); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.link.danger { color: var(--negative-ink); }
.pins-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.pins-list li { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--paper-hi); border: 1px solid var(--line); font-size: 14px; }
.pins-list li > span:nth-child(2) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pins-list .num { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 24px; height: 24px; border-radius: 12px 12px 12px 2px; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; }

/* images and cost, references, research brief */
.mrow { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: start; padding-top: 4px; }
.mrow img { width: 96px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--paper-lo); }
.mrow details { margin-top: 4px; }
.mrow summary { cursor: pointer; color: var(--primary); font-weight: 600; }
.prompt { margin: 6px 0 0; font-family: var(--font-mono); font-size: 12px; white-space: pre-line; color: var(--muted); }
.total { margin: 4px 0 0; padding-top: 10px; border-top: 1px solid var(--line); }
.refs { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.ref-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.ref-link { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; background: var(--primary-tint); color: var(--primary-deep); font-size: 12px; font-weight: 600; text-decoration: none; }
.ref-link:hover { text-decoration: underline; }
.doc { max-width: 860px; margin-top: 12px; padding: 28px 32px; border-radius: 14px; background: #fff; border: 1px solid var(--line); overflow-wrap: anywhere; }
.doc h2, .doc h3, .doc h4, .doc h5 { font-family: var(--font-display); margin: 20px 0 8px; }
.doc pre.table { font-family: var(--font-mono); font-size: 12px; white-space: pre-wrap; background: var(--paper); padding: 10px; border-radius: 8px; }
.doc code { font-family: var(--font-mono); font-size: 13px; background: var(--paper); padding: 0 4px; border-radius: 4px; }

/* phones: the calendar as a day-by-day list */
.agenda { display: none; }
@media (max-width: 700px) {
  .cal-scroll { display: none; }
  .agenda { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }
  .ag-day { display: flex; flex-direction: column; gap: 8px; }
  .ag-h { display: flex; align-items: baseline; gap: 10px; padding-bottom: 6px; border-bottom: 3px solid var(--line); }
  .ag-h.today { border-color: var(--primary); }
  .ag-h strong { font-family: var(--font-display); font-size: 22px; font-weight: 600; }
  .ag-tile { flex-direction: row; align-items: center; gap: 12px; padding: 8px; }
  .ag-tile img { width: 84px; height: 105px; flex: 0 0 84px; }
  .ag-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
  .slot { min-height: 56px; }
  .drawer { padding: 18px 16px 32px; }
  .viewer { gap: 6px; }
  .round { flex-basis: 36px; height: 36px; }
}

/* sign-in pages (private address) */
body.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-box { width: min(420px, 100%); display: flex; flex-direction: column; gap: 14px; padding: 28px 24px; border-radius: 16px; background: #fff; border: 1px solid var(--line); }
.auth-box h1 { font-size: 32px; }
.auth-form { display: flex; flex-direction: column; gap: 10px; }
.auth-form input { min-height: 46px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-strong); font: inherit; }
.auth-form .btn { margin-top: 6px; }
.auth-msg { margin: 0; min-height: 1.4em; color: var(--negative-ink); font-weight: 600; }
.who .me { color: var(--paper); font-size: 14px; }
.who .link.light { color: var(--accent-soft); }
