/* Glow Bureau portal: additive styles on top of the shared glow.v1.css.
   Never redefine colours here; always use the --variables from glow.v1.css. */

.portal-identity { font-family: var(--mono); font-size: 13px; color: var(--margin-grey); margin-right: 8px; }
.portal-identity-email { color: var(--amber); }

/* Text wordmark: the app is Signalism. (Interim until there's a drawn
   logo; swap the markup in lib/layout.js when one exists.) */
.wordmark-text { font-family: var(--display); font-weight: 800; font-size: 24px; letter-spacing: -0.02em; text-decoration: none; color: var(--ink); }

/* Season header */
.season-progress { height: 6px; background: var(--rule); border-radius: 3px; margin-top: 18px; overflow: hidden; max-width: 420px; }
.season-progress-fill { height: 100%; background: var(--amber); }
.season-day { font-family: var(--mono); font-size: 13px; color: var(--muted); margin-top: 10px; }

/* Left doc-style side nav for the plan page */
.plan-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 56px; align-items: start; padding-top: 8px; padding-bottom: 60px; }
.plan-sidenav { position: sticky; top: 32px; display: flex; flex-direction: column; gap: 4px; border-left: 1px solid var(--rule); padding-left: 20px; }
.plan-sidenav a { font-family: var(--mono); font-size: 13px; letter-spacing: .04em; text-decoration: none; color: var(--muted); padding: 6px 0; }
.plan-sidenav a:hover { color: var(--ink); }
.plan-content { min-width: 0; }
.plan-section { padding-top: 44px; padding-bottom: 44px; border-top: 1px solid var(--rule); }
.plan-section:first-child { padding-top: 0; border-top: none; }
.plan-section:last-child { padding-bottom: 0; }

/* Moves */
.move { padding: 28px 0; border-top: 1px solid var(--rule); display: flex; gap: 24px; align-items: flex-start; }
.move:last-child { border-bottom: 1px solid var(--rule); }
.move-check { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--rule); background: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 14px; color: transparent; }
.move-check[data-done="true"] { background: var(--amber); border-color: var(--amber); color: var(--paper); }
.move-body h3 { font-family: var(--display); font-weight: 800; font-size: 21px; margin-bottom: 8px; }
.move-body p { color: var(--muted); }
.move.is-done .move-body h3, .move.is-done .move-body p { color: var(--margin-grey); text-decoration: line-through; text-decoration-color: var(--rule); }

/* Locked moves (Flyby preview) */
.move-locked { padding: 28px 0; border-top: 1px solid var(--rule); display: flex; gap: 24px; align-items: flex-start; opacity: .55; }
.move-locked:last-child { border-bottom: 1px solid var(--rule); }
.move-locked .move-check { border-style: dashed; }
.move-locked .move-body h3 { font-family: var(--display); font-weight: 800; font-size: 21px; margin-bottom: 8px; color: var(--muted); }
.move-locked .move-body p { color: var(--margin-grey); font-family: var(--mono); font-size: 14px; font-style: italic; }

/* Locked state: shared across the Plan preview, the Planner and Signals,
   for anything gated behind an entitlement the workspace doesn't hold yet.
   Grey it out and switch off interaction, but leave it legible: the whole
   point is to show the shape of what's coming, not hide it. */
.locked-banner { margin-bottom: 24px; padding: 14px 20px; border: 1px solid var(--rule); border-radius: 8px; background: #fff; }
.locked-banner .margin-note { margin: 0; }
.locked-content { opacity: .5; pointer-events: none; user-select: none; }
.locked-content .move-check { border-style: dashed; }

/* End cards (Flyby) */
.end-cards { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 24px; margin-top: 40px; }
.end-card { border: 1px solid var(--rule); border-radius: 8px; padding: 32px; }
.end-card h3 { font-family: var(--display); font-weight: 800; font-size: 22px; margin-bottom: 10px; }
.end-card p { color: var(--muted); margin-bottom: 20px; }
.objection-options { display: flex; flex-direction: column; gap: 10px; }
.objection-options button { text-align: left; background: #fff; border: 1px solid var(--rule); border-radius: 6px; padding: 12px 16px; font-family: var(--body); font-size: 15px; color: var(--ink); cursor: pointer; }
.objection-options button:hover { border-color: var(--amber); }
.objection-options button.chosen { border-color: var(--amber); background: rgba(193,122,64,.08); }

@media (max-width: 760px) {
  .end-cards { grid-template-columns: minmax(0,1fr); }
  .move, .move-locked { gap: 16px; }
}

/* --- Planner --- */
.view-toggle { display: flex; gap: 8px; }
.view-btn { background: #fff; color: var(--ink); border: 1px solid var(--rule); }
.view-btn.active { background: var(--ink); color: var(--paper); }
.save-indicator { font-family: var(--mono); font-size: 12px; color: var(--amber); opacity: 0; transition: opacity .2s; }
.save-indicator.visible { opacity: 1; }

.cal-nav { display: flex; align-items: center; justify-content: center; gap: 20px; margin-bottom: 18px; }
.cal-nav h2 { font-size: 22px; min-width: 200px; text-align: center; }
.cal-grid-head { display: grid; grid-template-columns: repeat(7, 1fr); font-family: var(--mono); font-size: 12px; color: var(--margin-grey); letter-spacing: .06em; margin-bottom: 6px; text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-cell { min-height: 96px; border: 1px solid var(--rule); border-radius: 6px; padding: 6px; cursor: pointer; background: #fff; }
.cal-cell.empty { background: transparent; border-color: transparent; cursor: default; }
.cal-cell.drop-target { border-color: var(--amber); background: rgba(193,122,64,.06); }
.cal-day-num { font-family: var(--mono); font-size: 12px; color: var(--margin-grey); margin-bottom: 4px; }
.ep-chip { font-size: 12px; padding: 4px 6px; border-radius: 4px; margin-bottom: 4px; background: var(--rule); color: var(--ink); cursor: grab; }

.status-idea { background: #E9E4D6; }
.status-invited { background: #F0DFC1; }
.status-booked { background: #F0C173; }
.status-recorded { background: #D7E3D0; }
.status-editing { background: #CFE0E8; }
.status-scheduled { background: #CBD8F0; }
.status-published { background: #C7EAC9; }
.status-paused { background: #E6C9C9; }

.ep-row-status.status-idea, .ep-row-status.status-invited, .ep-row-status.status-booked,
.ep-row-status.status-recorded, .ep-row-status.status-editing, .ep-row-status.status-scheduled,
.ep-row-status.status-published, .ep-row-status.status-paused {
  padding: 3px 8px; border-radius: 4px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
}

.episode-list .ep-row { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid var(--rule); cursor: pointer; }
.episode-list .ep-row:last-child { border-bottom: 1px solid var(--rule); }
.episode-list .ep-row.dragging { opacity: .4; }
.ep-row-title { font-weight: 700; flex: 1 1 auto; }
.ep-row-meta { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.ep-row-published { font-family: var(--mono); font-size: 12px; color: var(--amber); }

.drawer-backdrop { display: none; position: fixed; inset: 0; background: rgba(26,23,20,.4); z-index: 20; }
.drawer { display: none; position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); background: var(--paper); z-index: 21; box-shadow: -8px 0 24px rgba(0,0,0,.15); overflow-y: auto; }
body.drawer-open .drawer-backdrop, body.drawer-open .drawer { display: block; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--rule); }
.drawer-head h3 { font-family: var(--display); font-weight: 800; font-size: 20px; }
.drawer-close { background: none; border: none; font-size: 28px; cursor: pointer; color: var(--muted); line-height: 1; }
.drawer-body { padding: 20px 24px; }
.drawer-actions { display: flex; gap: 10px; margin-top: 20px; }

@media (max-width: 760px) {
  .cal-grid, .cal-grid-head { grid-template-columns: repeat(7, minmax(38px,1fr)); font-size: 11px; }
  .cal-cell { min-height: 64px; padding: 3px; }
  .ep-chip { font-size: 10px; padding: 2px 4px; }
  .drawer { width: 100vw; }
  .plan-layout { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .plan-sidenav { position: sticky; top: 0; z-index: 10; background: var(--paper); flex-direction: row; overflow-x: auto; border-left: none; border-bottom: 1px solid var(--rule); padding: 12px 0; gap: 20px; }
}

/* --- RSS bar + matches --- */
.rss-bar { margin-bottom: 24px; padding: 16px 20px; border: 1px solid var(--rule); border-radius: 8px; background: #fff; }
.rss-connect, .rss-status { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.rss-connect input { flex: 1 1 320px; border: 1px solid var(--rule); border-radius: 6px; padding: 10px 14px; font-family: var(--body); font-size: 15px; }
.rss-feed-label { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.match-row { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--rule); flex-wrap: wrap; }
.match-row:last-child { border-bottom: 1px solid var(--rule); }
.match-confidence { font-family: var(--mono); font-size: 12px; color: var(--amber); }
.match-actions { display: flex; gap: 8px; margin-left: auto; }
.match-actions button { padding: 6px 14px; font-size: 13px; }

/* --- Portal tab nav --- */
.portal-tab { padding: 6px 12px; border-radius: 6px; }
.portal-tab.active { background: var(--ink); color: var(--paper) !important; }
.portal-home-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-top: 32px; }
.portal-home-tile { border: 1px solid var(--rule); border-radius: 8px; padding: 28px; text-decoration: none; color: var(--ink); display: block; }
.portal-home-tile:hover { border-color: var(--amber); }
.portal-home-tile h3 { font-family: var(--display); font-weight: 800; font-size: 20px; margin-bottom: 8px; }
.portal-home-tile p { color: var(--muted); font-size: 15px; }
.portal-home-tile-locked { opacity: .6; }
.portal-home-tile-locked:hover { border-color: var(--rule); }
.lock-icon { font-size: 14px; vertical-align: middle; }

/* --- Kanban board view --- */
.board-grid { display: grid; grid-template-columns: repeat(8, minmax(160px, 1fr)); gap: 14px; overflow-x: auto; align-items: start; }
.board-col { background: #fff; border: 1px solid var(--rule); border-radius: 8px; padding: 12px; min-height: 200px; }
.board-col.drop-target { border-color: var(--amber); background: rgba(193,122,64,.06); }
.board-col-head { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--margin-grey); margin-bottom: 10px; display: flex; justify-content: space-between; }
.board-card { background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; padding: 10px 12px; margin-bottom: 8px; cursor: grab; font-size: 13px; }
.board-card:hover { border-color: var(--amber); }
.board-card .board-card-meta { display: block; font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 4px; }

@media (max-width: 760px) {
  .board-grid { grid-template-columns: repeat(8, minmax(130px, 1fr)); }
}

/* --- Bureau show switcher --- */
.portal-show-list { margin-top: 32px; display: flex; flex-direction: column; gap: 0; }
.portal-show-card { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 20px 0; border-top: 1px solid var(--rule); }
.portal-show-list .portal-show-card:last-child { border-bottom: 1px solid var(--rule); }
.portal-show-role { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--amber); display: block; margin-bottom: 4px; }
.portal-show-card h3 { font-family: var(--display); font-weight: 800; font-size: 19px; }
.portal-show-links { display: flex; gap: 6px; flex-wrap: wrap; }
.portal-show-links .portal-tab { border: 1px solid var(--rule); }
.portal-show-links .portal-tab-locked { opacity: .6; }
.portal-show-admin-links { margin-top: 6px; }
.portal-show-admin-links .navlink { font-size: 13px; padding: 0; }
.portal-show-actions { display: flex; gap: 8px; margin-top: 10px; }

/* --- Notes / comments / observations --- */
.notes-toggle { margin-top: 20px; background: #fff; color: var(--ink); border: 1px solid var(--rule); }
.notes-panel { margin-bottom: 24px; padding: 16px 20px; border: 1px solid var(--rule); border-radius: 8px; background: #fff; }
.note-item { padding: 10px 0; border-top: 1px solid var(--rule); }
.note-item:first-child { border-top: none; }
.note-author { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: var(--margin-grey); text-transform: uppercase; display: block; margin-bottom: 2px; }
.note-author .role-bureau { color: var(--amber); }
.note-body { font-size: 14px; color: var(--ink); }
.notes-form { display: flex; gap: 10px; margin-top: 12px; }
.notes-form input { flex: 1 1 auto; border: 1px solid var(--rule); border-radius: 6px; padding: 8px 12px; font-family: var(--body); font-size: 14px; }
.drawer-notes { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--rule); }

/* ── The document sheet ──────────────────────────────────────────────
   Flyby and Plan artefacts render as working documents: a typed report
   on a white sheet, deliberately OUTSIDE the design system. The brand
   stays in the chrome around the sheet; inside it there is no display
   face, no dot, no amber, no kicker labels. These are the only colours
   in the portal defined outside glow.v1.css, and that is the point:
   if the document looks designed, it reads as marketing. */
.sheet-stage { padding: 40px 16px 96px; }
.sheet {
  max-width: 660px; margin: 0 auto; background: #FFFEFB;
  border: 1px solid #E5DECF;
  box-shadow: 0 1px 2px rgba(26,23,20,.06), 0 12px 32px rgba(26,23,20,.07);
  padding: clamp(32px, 6vw, 72px);
  font-family: Charter, 'Bitstream Charter', Georgia, 'Times New Roman', serif;
  font-size: 16.5px; line-height: 1.65; color: #211D18;
}
.sheet-head { font-family: var(--mono); font-size: 13px; line-height: 1.8; color: #211D18; border-bottom: 1px solid #211D18; padding-bottom: 18px; margin-bottom: 36px; }
.sheet-head .faint { color: #7d7666; }
.sheet p { margin-bottom: 16px; color: inherit; max-width: none; }
.sheet h2 { font-family: inherit; font-size: 16.5px; font-weight: 700; letter-spacing: 0; line-height: 1.4; margin: 40px 0 12px; }
.sheet h2:first-of-type { margin-top: 0; }
.sheet h2 .no { display: inline-block; min-width: 26px; }
.sheet a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.sheet strong { color: inherit; }
/* Pull-quotes (mdToHtml renders "> ..." as p.margin-note): plain italic
   inside the sheet, never amber mono. */
.sheet .margin-note { font-family: inherit; font-style: italic; color: #57503F; border-left: 2px solid #DDD4C2; padding-left: 16px; margin: 22px 0; }
.sheet ul.plain { list-style: none; margin: 12px 0 16px; padding: 0; }
.sheet ul.plain li { padding: 4px 0 4px 24px; text-indent: -24px; color: #211D18; }
.sheet ul.plain li::before { content: "-"; margin-right: 10px; color: #7d7666; }
.sheet .aside-doc { font-size: 15px; color: #57503F; }
.sheet .sig { margin-top: 36px; }
.sheet .sig .name { font-size: 18px; font-weight: 700; margin-bottom: 0; }
.sheet .sig .role { font-family: var(--mono); font-size: 12px; color: #7d7666; }
.sheet .missed { margin-top: 40px; border-top: 1px solid #E5DECF; padding-top: 20px; }
.sheet .missed p { font-size: 15px; color: #57503F; }
.sheet .objection-options button { font-family: inherit; font-size: 15px; background: transparent; border-color: #E5DECF; color: #211D18; }
.sheet .objection-options button:hover { border-color: #211D18; }
.sheet .objection-options button.chosen { border-color: #211D18; background: #F5F1E6; }

/* Plan sub-nav: Intelligence Report / The Plan / To-do. Lives in the
   chrome (on the paper, outside the sheet), so brand styling applies. */
.doc-parts { max-width: 692px; margin: 32px auto 0; padding: 0 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.doc-part { font-family: var(--mono); font-size: 12.5px; letter-spacing: .06em; padding: 8px 14px; border: 1px solid var(--rule); border-radius: 6px; background: transparent; color: var(--muted); text-decoration: none; }
.doc-part:hover { color: var(--ink); border-color: var(--margin-grey); }
.doc-part.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.doc-part-view { display: none; }
.doc-part-view.active { display: block; }

/* To-do list inside the sheet. Reuses .move / .move-check so the live
   done_at toggle in plan.js keeps working, restyled to list grammar. */
.sheet .todo-day { font-family: var(--mono); font-size: 13px; color: #57503F; margin-bottom: 28px; }
.sheet .todo-day b { color: #211D18; font-weight: 500; }
.sheet .todo { margin: 0; }
.sheet .todo .move { display: flex; gap: 16px; align-items: flex-start; padding: 16px 0; border-top: 1px solid #EFE9DB; border-bottom: none; }
.sheet .todo .move:last-child { border-bottom: 1px solid #EFE9DB; }
.sheet .todo .move-check { width: 20px; height: 20px; border-radius: 0; border: 1.5px solid #211D18; background: transparent; margin-top: 5px; font-size: 13px; color: transparent; cursor: pointer; }
.sheet .todo .move-check[data-done="true"] { background: transparent; border-color: #211D18; color: #211D18; }
.sheet .todo .move-body h3 { font-family: inherit; font-size: 16.5px; font-weight: 700; margin-bottom: 2px; }
.sheet .todo .move-body p { font-size: 14.5px; color: #57503F; }
.sheet .todo .move.is-done .move-body h3, .sheet .todo .move.is-done .move-body p { color: #A39A85; text-decoration: line-through; text-decoration-color: #C9C0AC; }
.sheet .todo-foot { margin-top: 28px; font-size: 14.5px; color: #57503F; }

/* Locked plan preview, same sheet, greyed. */
.sheet-stage .locked-content .sheet { opacity: .6; }
