/* ==========================================================================
   Dashi v2 look (on by default). Neutral greys, flat solid fills, one accent
   (system blue), bigger type, rounder cards, a floating tab bar on phones.
   No gradients, glows or coloured edge lights.
   ========================================================================== */
:root:not([data-theme="light"]) {
  --bg: #111111; --bg-2: #161616;
  --surface: #1c1c1e; --surface-2: #2c2c2e; --surface-3: #3a3a3c;
  --border: #2c2c2e; --border-2: #3a3a3c;
  --text: #f5f5f7; --text-2: #aeaeb2; --muted: #8e8e93;
  --accent: #0A84FF; --accent-2: #409CFF; --accent-soft: rgba(10, 132, 255, .14); --accent-ring: rgba(10, 132, 255, .42);
  --ui-bg: #111111; --ui-s1: #1c1c1e; --ui-s2: #2c2c2e; --ui-s3: #3a3a3c;
  --ui-line: #2c2c2e; --ui-line-2: #3a3a3c;
  --ui-text: #f5f5f7; --ui-text-2: #aeaeb2; --ui-text-3: #8e8e93;
  --ui-violet: #0A84FF; --ui-violet-2: #409CFF; --ui-violet-soft: rgba(10, 132, 255, .14);
  --tabbar-bg: rgba(28, 28, 30, .94);
}
:root { --radius: 22px; --radius-sm: 14px; --ui-r: 14px; --ui-r-lg: 22px; }

body { font-size: 15px; }

/* page titles: bigger, wider, quieter subline */
.page-head { margin: 18px 0 26px; }
.page-head h1, .page-title-block h1 { font-size: clamp(34px, 6vw, 48px); font-weight: 700; letter-spacing: -.03em; }
.page-head p { font-size: 16px; line-height: 1.5; color: var(--text-2); margin-top: 10px; }
.content h2, .panel-head h2 { font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -.015em; }

/* cards */
.panel, .kpis { border-radius: var(--radius); background: var(--surface); border-color: var(--border); box-shadow: none; }
.panel { padding: 22px 22px; margin-bottom: 16px; }
.panel-head { margin-bottom: 16px; }
.kpi { padding: 20px 22px; }
.kpi .stat-value, .stat-value { font-size: clamp(32px, 5vw, 40px); font-weight: 700; letter-spacing: -.03em; }
.stat-label { font-size: 13.5px; color: var(--text-2); }
.stat-sub, .tiny, .small { font-size: 13px; }

/* buttons */
.btn { min-height: 44px; padding: 0 18px; border-radius: 999px; font-size: 15px; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: none; }
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { border-color: var(--border-2); }
.pill, .chip { border-radius: 999px; }

/* inputs */
input:not([type=checkbox]):not([type=radio]):not([type=range]), textarea, select { border-radius: 14px !important; }

/* desktop sidebar */
.sidebar { background: var(--bg-2); border-right-color: var(--border); }
.sidebar a.active, .side-link.active, .nav a.active { background: var(--accent-soft); color: var(--text); }

/* phones: floating tab bar */
@media (max-width: 860px) {
  .content { padding-left: 18px; padding-right: 18px; padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 44px); }
  .page-head h1, .page-title-block h1 { font-size: 36px; }
  .panel { padding: 18px; border-radius: 20px; }
  .kpi { padding: 16px 18px; }
  .tabbar { left: 12px; right: 12px; bottom: calc(env(safe-area-inset-bottom, 0px) + 10px); padding: 6px; border: 1px solid var(--border-2); border-radius: 26px; background: var(--tabbar-bg); box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
  html.standalone .tabbar { bottom: auto; --tb-gap: calc(env(safe-area-inset-bottom, 0px) + 10px); }
  /* iPhone: a blurred fixed bar is one known cause of it being drawn mid-screen, so the bar is solid instead. */
  .tabbar { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--surface); }
  /* The tab bar always stays on screen. */
  .tab { min-height: 52px; border-radius: 20px; }
  .tab-ico { width: 46px; height: 30px; font-size: 23px; }
  .tab-label { font-size: 11px; }
  .tab.active .tab-ico { color: var(--accent); }
  .tabbar { --ink-whole: 1; }
  .tab-ink { border-radius: 20px; background: var(--accent-soft); box-shadow: none; }
  .toast-host { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 28px); }
}

/* ==========================================================================
   v2, part 2 — the whole app: flat cards with a hairline border, plain
   numbers, big shot-list cards, pill tabs, and one entrance per screen.
   ========================================================================== */
:root:not([data-theme="light"]) { --g-edge: var(--border); }

/* every card and panel: one flat surface, hairline border, no shadow */
:root:not([data-theme="light"]) :is(.panel, .card, .kpi, .film-next, .idea, .vf-mini, .acct-row, .opp, .ready-row, .stage-block, .brief, .num-tile) {
  background: var(--surface); border-color: var(--g-edge); box-shadow: none;
}

/* numbers: separate tiles, plain figures */
.kpis { background: none !important; border: 0 !important; box-shadow: none !important; gap: 12px; overflow: visible; }
.kpi + .kpi { border-left: 1px solid var(--g-edge) !important; }
.kpi { border: 1px solid var(--g-edge); border-radius: 20px; }
.stat-value, .kpi .stat-value { background: none; color: var(--text); }
.stat-label { text-transform: none; letter-spacing: 0; }
@media (max-width: 860px) { .kpis { grid-template-columns: 1fr 1fr !important; } }

/* Home: "Film next" becomes the hero card */
.film-next { padding: 22px; border-radius: 24px; background: var(--surface) !important; border-color: var(--border) !important; }
.film-next::before { display: none; }
.film-next h2, .film-next .fn-title { font-size: clamp(22px, 5.5vw, 28px) !important; line-height: 1.12; }
.fn-label { font-size: 13.5px; }

/* Ideas: big, clear shot-list cards */
.idea { border-radius: 22px !important; margin-bottom: 12px; }
.idea-toggle > summary { padding: 18px !important; gap: 16px !important; }
.idea .step-num.shot-n, .shot-n { width: 40px; height: 40px; border-radius: 13px; font-size: 18px; color: var(--text) !important; background: var(--surface-2) !important; box-shadow: none; }
.idea-summary h3 { font-size: 20px !important; line-height: 1.2 !important; }
.idea-meta { gap: 6px !important; }
.idea-meta span { padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 0; }
.idea-meta .meta-status.filmed { background: var(--bad-soft); }
.idea-meta .meta-status.posted { background: var(--good-soft); }
.idea-chevron { border-radius: 12px !important; }

/* pill tabs (Up next / Later / Posted, filters) */
.segmented, .seg { border-radius: 999px !important; padding: 4px !important; background: var(--surface) !important; border-color: var(--g-edge) !important; }
.segmented a, .seg a { border-radius: 999px !important; padding: 8px 16px !important; }
.segmented a.on, .seg a.on { background: var(--surface-3) !important; color: var(--text) !important; box-shadow: none; }
.segmented.has-thumb a.on, .seg.has-thumb a.on { background: transparent !important; box-shadow: none; }
.seg-thumb { border-radius: 999px !important; background: var(--surface-3) !important; box-shadow: none; }
.segmented.has-thumb a.on, .seg.has-thumb a.on { color: var(--text) !important; }
:root[data-theme="light"] .segmented a.on, :root[data-theme="light"] .seg a.on, :root[data-theme="light"] .seg-thumb { background: var(--surface) !important; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
:root[data-theme="light"] .segmented, :root[data-theme="light"] .seg { background: var(--surface-3) !important; border-color: transparent !important; }
:root[data-theme="light"] .segmented.has-thumb a.on, :root[data-theme="light"] .seg.has-thumb a.on { background: transparent !important; box-shadow: none; }

/* icon buttons */
.icon-btn { border-radius: 12px !important; background: var(--surface-2) !important; border: 1px solid transparent !important; }
.icon-btn:hover { background: var(--surface-3) !important; }

/* section icons in panel heads sit on a neutral tile */
.panel-head h2 { display: flex; align-items: center; gap: 10px; }
.panel-head h2 > .ti:first-child, .sec-ic { width: 32px; height: 32px; border-radius: 10px; display: inline-grid; place-items: center; font-size: 18px; background: var(--surface-2); color: var(--text-2); flex: none; }

/* one entrance per screen: the cards rise in after the title */
@keyframes v2-rise { from { opacity: 0; transform: translateY(14px); } }
.content > :is(.panel, .card, .kpis, .film-next, .grid, .dash-grid, .ideas, section, .vf-mini) { animation: v2-rise .6s cubic-bezier(.22, 1, .36, 1) backwards; }
.content > :nth-child(2) { animation-delay: .05s; } .content > :nth-child(3) { animation-delay: .1s; } .content > :nth-child(4) { animation-delay: .15s; } .content > :nth-child(5) { animation-delay: .2s; } .content > :nth-child(n+6) { animation-delay: .25s; }
@media (prefers-reduced-motion: reduce) { .content > * { animation: none !important; } }

/* Tapping or scrolling over an idea flashed a square block behind it: keep the
   press state inside the card's rounded shape and drop the grey tap highlight. */
.idea, .idea-toggle, .idea-toggle > summary { -webkit-tap-highlight-color: transparent; }
.idea-toggle, .idea-toggle > summary { border-radius: 22px !important; }
.idea-toggle > summary:active { background: transparent !important; }
.idea { overflow: hidden; }

/* Idea cards: tighter meta pills so the details sit on one or two lines on a phone */
.idea-meta { gap: 5px !important; font-size: 12px; }
.idea-meta span { padding: 2px 9px; }
.idea-meta .ti { font-size: 13px; }
@media (max-width: 860px) { .idea-summary h3 { font-size: 18px !important; } }

/* Light theme: the edge colour the v2 cards use (it was only set for dark, so pill tabs got a black outline) */
:root[data-theme="light"] { --g-edge: var(--border); }
:root[data-theme="light"] .kpi { background: var(--surface); border: 1px solid var(--g-edge); box-shadow: none; }
:root[data-theme="light"] .kpi + .kpi { border-left: 1px solid var(--g-edge) !important; }

/* Ready to post: each filmed idea is its own tile with breathing room */
.ready-to-post .ready-list { gap: 8px; }
.ready-to-post .ready-row { padding: 12px 12px 12px 14px; border-radius: 14px; border: 1px solid var(--g-edge, var(--border)); }
.ready-to-post { padding-bottom: 14px; }

/* A posted idea that did below its usual: say so plainly, without the green */
.idea-meta .meta-status.posted.below, .idea-meta .meta-status.posted.below .ti { color: var(--text-2); }
.idea-meta .meta-status.posted.below { background: var(--surface-2); }
[data-theme="light"] .idea-meta .meta-status.posted.below { background: rgba(0, 0, 0, .03); }

/* Phones: tighter tabs so a row of platforms fits without running off the screen. */
@media (max-width: 440px) {
  .seg a { padding: 8px 11px !important; gap: 5px; font-size: 13.5px; }
  .seg a .ti { font-size: 15px; }
}
@media (max-width: 360px) {
  .seg a { padding: 7px 9px !important; font-size: 13px; }
}

/* Light theme: Dashi is a white cloud, so give him a thin neutral outline to stand out from a white page. */
[data-theme="light"] svg.dashi { filter: drop-shadow(0 0 1px rgba(0, 0, 0, .35)); }

/* A page title with a button beside it: the button keeps its size, the title side wraps. */
.page-head > :first-child:not(:last-child) { flex: 1 1 220px; min-width: 0; }
.page-head > :last-child:not(:first-child):not(span):not(p):not(.tiny) { flex: 0 0 auto; }
