/*
 * ANJOLA briefing card — transparent, phone-less, looping component.
 *
 * Every declaration under "CARD" is copied from the real app (apps/web/src/design/home.css) with the
 * selector renamed; the source line is noted. Tokens are copied from design/identity/{primitives,semantic}.css.
 * Anything marked PRESENTATION is not part of the app (touch dot, arena).
 *
 * Class map (this file -> app):
 *   .bc-card            .anjola-home__briefing[data-widget]
 *   .bc-title           .anjola-home__briefing-title
 *   .bc-summary-*       .anjola-home__summary-*
 *   .bc-date(-label/-day) .anjola-home__calendar(-label/-day)
 *   .bc-list / .bc-row* .anjola-home__widget-list / .anjola-home__widget-row*
 *   .bc-handle          .anjola-home__briefing-handle
 */

@font-face { font-family: "Inter Variable"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("../_shared/vendor/inter-latin-wght-normal.woff2") format("woff2-variations"); } /* @fontsource-variable/inter 5.3.0, SIL OFL 1.1 */

/* ---- TOKENS (primitives.css:4-25, semantic.css:63-100) ---- */
.bc-root, .bc-root[data-theme="light"] {
  --porcelain: #F5EFE8; --mineral-ink: #393937;
  --ui-text-primary: #393937; --ui-text-secondary: #65605F;
  --ui-surface: #FFFCF8;       --ui-surface-opacity: 57%;
  --ui-surface-stroke: #FFFFFF; --ui-surface-stroke-opacity: 48%;
  --ui-depth-ink: #393937;
}
.bc-root[data-theme="dark"] {
  --ui-text-primary: #F5EFE8; --ui-text-secondary: #D1C7C5;
  --ui-surface: #302B30;       --ui-surface-opacity: 78%;
  --ui-surface-stroke: #9C878B; --ui-surface-stroke-opacity: 23%;
  --ui-depth-ink: #2A252A;
}
.bc-root {
  /* semantic.css:12,22,24,54 */
  --ui-surface-glass: color-mix(in srgb, var(--ui-surface) var(--ui-surface-opacity), transparent);
  --ui-border-subtle: color-mix(in srgb, var(--ui-surface-stroke) var(--ui-surface-stroke-opacity), transparent);
  --ui-divider: color-mix(in srgb, var(--ui-text-secondary) 23%, transparent);
  --ui-shadow-elevated: 0 14px 38px color-mix(in srgb, var(--ui-depth-ink) 18%, transparent);
  /* semantic.css:58 — native system rendering (SF on Apple devices). Override --bc-font to force bundled Inter everywhere. */
  --bc-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter Variable", Inter, "Segoe UI", sans-serif;
  /* home.css:123-126 pins the title and compact rows to this shorter stack */
  --bc-font-card: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, sans-serif;
}

/* ---- ARENA (PRESENTATION) — an invisible stand-in for the Home surface; sized from JS options ---- */
.bc-root { position: relative; display: block; margin: 0; padding: 0; background: transparent; color: var(--ui-text-primary);
  font-family: var(--bc-font); color-scheme: light dark; overflow: hidden; contain: layout paint; }
.bc-root[data-theme="light"] { color-scheme: light; } .bc-root[data-theme="dark"] { color-scheme: dark; }
.bc-root * { box-sizing: border-box; }

/* ---- CARD ---- */
/* home.css:68 (+ home.css:165 for [data-widget]: top/left 0, no translate, touch-action none, overflow hidden, transition on shadow) */
.bc-card { position: absolute; z-index: 3; top: 0; left: 0; translate: none; margin: 0; max-width: none; min-height: 0; max-height: none;
  box-sizing: border-box; width: 380px; height: 137px; padding: 20px 18px 19px;
  border: 1px solid var(--ui-border-subtle); border-radius: 17.5px; background: var(--ui-surface-glass);
  overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
  cursor: grab; transition: box-shadow 120ms ease-out; }
.bc-card[data-dragging] { cursor: grabbing; box-shadow: var(--ui-shadow-elevated); }          /* home.css:166 */
.bc-card[data-widget="hidden"] { cursor: default; }                                          /* home.css:167 */
.bc-card[data-widget="expanded"] { cursor: default; box-shadow: var(--ui-shadow-elevated); } /* home.css:168 */
.bc-content { min-width: 0; }                                                                /* home.css:69 */
.bc-title { max-width: calc(100% - 65px); margin: 0 0 11px; font-size: 19px; font-weight: 600; line-height: 1.2; letter-spacing: -.025em;
  font-family: var(--bc-font-card); }                                                        /* home.css:70,123 */
.bc-summary-list { padding: 0; margin: 0; list-style: none; color: var(--ui-text-secondary); font-size: 15.5px; line-height: 1.45; font-weight: 400;
  font-family: var(--bc-font-card); }                                                        /* home.css:71,124 */
.bc-summary-row { min-width: 0; min-height: 18.5px; overflow: hidden; white-space: nowrap; }  /* home.css:72 */
.bc-summary-row:first-child { padding-right: 60px; }                                         /* home.css:80 */
.bc-summary-resting { display: block; overflow: hidden; white-space: nowrap; opacity: 1; }   /* home.css:74 */

/* date tile — home.css:81-84 */
.bc-date { position: absolute; top: 20px; right: 24px; width: 51px; display: grid; text-align: center; color: var(--ui-text-secondary); }
.bc-date-label { font-size: 9px; line-height: 13px; text-transform: uppercase; }
.bc-date-label:first-child { padding-bottom: 12px; margin-bottom: 3px; border-bottom: 1px solid var(--ui-divider); }
.bc-date-day { font-size: 20px; line-height: 22px; font-weight: 600; color: var(--ui-text-primary); }

/* expanded list — home.css:169-184 */
.bc-list { display: grid; gap: 4px; padding: 0; margin: 0 calc(24px + 51px + 20px - 18px) 0 0; list-style: none; }
.bc-row { min-width: 0; }
.bc-row-static { position: relative; display: grid; gap: 2px; box-sizing: border-box; width: 100%; min-height: 44px; padding: 7px 0;
  border: 0; border-bottom: 1px solid var(--ui-divider); background: transparent; color: var(--ui-text-primary); font: inherit; text-align: left;
  grid-template-columns: 16px minmax(0, 1fr); column-gap: 10px; }
.bc-row:last-child .bc-row-static { border-bottom: 0; }
.bc-row-icon { grid-column: 1; grid-row: 1 / span 2; align-self: start; margin-top: 2px; color: var(--ui-text-secondary); width: 16px; height: 16px; }
.bc-row-text, .bc-row-detail { grid-column: 2; }
.bc-row-text { font-size: 15.5px; line-height: 1.35; font-weight: 500; white-space: normal; overflow-wrap: anywhere; }
.bc-row-detail { color: var(--ui-text-secondary); font-size: 13.5px; line-height: 1.35; white-space: normal; overflow-wrap: anywhere; }

/* restore handle — home.css:185-192 */
.bc-handle { position: absolute; z-index: 4; display: grid; place-items: center; width: 44px; height: 56px; padding: 0; border: 0; background: transparent;
  touch-action: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.bc-handle[hidden] { display: none; }
.bc-handle[data-edge="top"], .bc-handle[data-edge="bottom"] { width: 56px; height: 44px; }
.bc-handle > span { width: 4px; height: 36px; border-radius: 2px; background: var(--ui-text-secondary); opacity: .55; }
.bc-handle[data-edge="left"] { justify-items: start; padding-left: 5px; }
.bc-handle[data-edge="right"] { justify-items: end; padding-right: 5px; }
.bc-handle[data-edge="top"] { align-items: start; padding-top: 5px; }
.bc-handle[data-edge="bottom"] { align-items: end; padding-bottom: 5px; }
.bc-handle[data-edge="top"] > span, .bc-handle[data-edge="bottom"] > span { width: 36px; height: 4px; }

/* ---- TOUCH DOT (PRESENTATION — not in the app) ---- */
.bc-dot { position: absolute; z-index: 6; left: 0; top: 0; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; pointer-events: none;
  opacity: 0; will-change: transform, opacity;
  background: color-mix(in srgb, var(--ui-text-primary) 16%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ui-text-primary) 26%, transparent), 0 2px 10px color-mix(in srgb, var(--ui-depth-ink) 14%, transparent); }
.bc-root[data-pointer="off"] .bc-dot { display: none; }

@media (prefers-reduced-motion: reduce) { .bc-card { transition: none; } }

/* ---- STRUCTURE (PRESENTATION) ---- */
.bc-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.bc-body { display: grid; }                                   /* compact and expanded lists share one cell so they can cross-fade */
.bc-body > * { grid-area: 1 / 1; min-width: 0; }
.bc-body [data-bc-hidden] { display: none; }
