/* Design Desk (from the approved prototype v2). Layout: sticky top bar + tab strip, one main column; idea page = brief (wide) + side panel (actions, inputs, talk); cards in auto-fill grids; board in its own sideways-scrolling strip */
:root {
  --bg: #F4F6F6; --surface: #FFFFFF; --surface-2: #EDF2F1; --fg: #142120; --muted: #566563; --line: #D9E1E0;
  --accent: #0E5E66; --accent-ink: #FFFFFF; --accent-soft: #DFEEEE;
  --gold: #835C0C; --gold-soft: #F4EAD3; --ok: #2E6A39; --ok-soft: #E2EFE2; --danger: #A23A2B; --danger-soft: #F7E3DF;
  --display: "Tiro Devanagari Hindi", Georgia, serif;
  --body: "Hind Vadodara", "Hind", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --r: 10px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0E1515; --surface: #152020; --surface-2: #1C2827; --fg: #E4EDEC; --muted: #9AABA9; --line: #293735;
  --accent: #6CC6C8; --accent-ink: #062224; --accent-soft: #173739;
  --gold: #E2BC67; --gold-soft: #33291A; --ok: #8FD19C; --ok-soft: #1B3220; --danger: #F09A8C; --danger-soft: #3A1E1A; color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #0E1515; --surface: #152020; --surface-2: #1C2827; --fg: #E4EDEC; --muted: #9AABA9; --line: #293735;
  --accent: #6CC6C8; --accent-ink: #062224; --accent-soft: #173739;
  --gold: #E2BC67; --gold-soft: #33291A; --ok: #8FD19C; --ok-soft: #1B3220; --danger: #F09A8C; --danger-soft: #3A1E1A; color-scheme: dark }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 15px; line-height: 1.55; overflow-x: hidden; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
h1, h2, h3 { margin: 0; line-height: 1.25; text-wrap: balance; font-weight: 600; }
h1 { font-family: var(--display); font-weight: 400; font-size: 1.7rem; }
h2 { font-size: 1.08rem; }
h3 { font-size: 0.95rem; }
p { margin: 0; }
.gut { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.wrap { max-width: 1180px; margin: 0 auto; }

header.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 9; background: var(--surface); border-bottom: 1px solid var(--line); }
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding-block: 10px; }
.brand { display: flex; align-items: baseline; gap: 8px; margin-right: auto; }
.brand b { font-family: var(--display); font-weight: 400; font-size: 1.35rem; }
.tag { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; background: var(--gold-soft); color: var(--gold); }
.ctl { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--muted); }
select, input[type=text], input[type=url], input[type=email], input[type=number], input[type=date], input[type=search], textarea {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; min-width: 0; max-width: 100%; }
textarea { width: 100%; resize: vertical; min-height: 70px; }
input[type=text], input[type=url], input[type=email], input[type=search] { width: 100%; }
nav.tabs { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
nav.tabs button { flex: none; border: 0; background: none; padding: 6px 12px; border-radius: 999px; color: var(--muted); cursor: pointer; white-space: nowrap; }
nav.tabs button[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
nav.tabs .add { margin-left: auto; }

.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 7px 13px; cursor: pointer; font-weight: 500; }
.btn:hover { background: var(--surface-2); }
.btn.pri { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.pri:hover { filter: brightness(1.08); }
.btn.warn { color: var(--danger); }
.btn.sm { padding: 4px 10px; font-size: 0.85rem; }
.btn:disabled { opacity: 0.55; cursor: progress; }
button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible, .card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

main { padding-block: 18px 160px; display: flex; flex-direction: column; gap: 22px; }
.note { font-size: 0.88rem; color: var(--muted); }
.banner { font-size: 0.88rem; padding: 9px 14px; border-radius: var(--r); background: var(--gold-soft); color: var(--fg); }
.banner b { color: var(--gold); }
.sec { display: flex; flex-direction: column; gap: 10px; }
.sec-h { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.count { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.empty { padding: 14px 16px; border: 1px dashed var(--line); border-radius: var(--r); color: var(--muted); font-size: 0.9rem; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; cursor: pointer; text-align: left; padding: 0; min-width: 0; }
.card:hover { border-color: var(--accent); }
.thumb { aspect-ratio: 16 / 9; max-width: 100%; display: flex; background: var(--surface-2); position: relative; }
.thumb.flat { aspect-ratio: 4 / 1; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .sw { flex: 1; }
.thumb .ini { margin: auto; font-family: var(--display); font-size: 1.6rem; color: var(--muted); }
.thumb .num { position: absolute; left: 8px; top: 8px; font-family: var(--mono); font-size: 0.7rem; background: var(--surface); color: var(--fg); padding: 1px 6px; border-radius: 6px; }
.card .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.card .ttl { font-weight: 600; line-height: 1.3; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: 0.8rem; color: var(--muted); }
.chip { display: inline-block; font-size: 0.75rem; font-weight: 500; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.chip.wait { background: var(--gold-soft); color: var(--gold); }
.chip.work { background: var(--accent-soft); color: var(--accent); }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.hi { background: var(--danger-soft); color: var(--danger); }
.chip.q { background: var(--gold-soft); color: var(--gold); }

.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 260px); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.col { background: var(--surface-2); border-radius: var(--r); padding: 10px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.col h3 { display: flex; justify-content: space-between; font-size: 0.85rem; }
.col .card .thumb { aspect-ratio: 3 / 1; }

.idea { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 820px) { .idea { grid-template-columns: minmax(0, 1fr); } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ihead { display: flex; flex-direction: column; gap: 6px; }
.panel.next { border-color: var(--accent); max-width: 760px; }
.msg, .hist, .banner, .card .ttl, .ihead h1, .ritem p, .note { overflow-wrap: anywhere; }
.files .chip { white-space: normal; overflow-wrap: anywhere; }
.back { align-self: flex-start; border: 0; background: none; color: var(--accent); cursor: pointer; padding: 0; font-weight: 500; }
.steps { display: flex; gap: 3px; flex-wrap: wrap; }
.steps span { height: 6px; flex: 1 1 24px; min-width: 18px; border-radius: 3px; background: var(--line); }
.steps span.on { background: var(--accent); }
.bgroup { display: flex; flex-direction: column; gap: 2px; }
.bgroup h3 { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); padding-top: 6px; }
dl.kv { display: grid; grid-template-columns: minmax(0, 9.5rem) minmax(0, 1fr); margin: 0; }
dl.kv dt, dl.kv dd { margin: 0; padding: 6px 0; border-top: 1px solid var(--line); min-width: 0; overflow-wrap: anywhere; }
dl.kv dt { color: var(--muted); font-size: 0.88rem; padding-right: 10px; }
dl.kv dd.blank { color: var(--muted); font-style: italic; }
@media (max-width: 520px) { dl.kv { grid-template-columns: minmax(0, 1fr); } dl.kv dd { border-top: 0; padding-top: 0; } }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg button { border: 0; background: none; padding: 4px 12px; cursor: pointer; font-size: 0.85rem; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > span { font-size: 0.85rem; color: var(--muted); }
.fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.inputs { display: flex; flex-direction: column; gap: 10px; }
.inp { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.inp .k { font-size: 0.8rem; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.inp img, .inp video { max-width: 100%; border-radius: 6px; display: block; }
.tr { font-size: 0.9rem; color: var(--muted); border-left: 3px solid var(--accent-soft); padding-left: 10px; border-radius: 0; }
.talk { display: flex; flex-direction: column; gap: 8px; }
.msg { font-size: 0.9rem; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); }
.msg.q { background: var(--gold-soft); }
.msg .who { font-size: 0.78rem; color: var(--muted); }
.hist { font-size: 0.82rem; color: var(--muted); display: flex; flex-direction: column; gap: 3px; }
.drafts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.draft { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; font-size: 0.85rem; }
.draft .ph { aspect-ratio: 4 / 3; max-width: 100%; display: flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--muted); font-family: var(--mono); font-size: 0.75rem; padding: 6px; text-align: center; }
.draft img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.draft p { padding: 6px 8px; }
.busy { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 500; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
@media (prefers-reduced-motion: no-preference) { .dot { animation: pulse 1s ease-in-out infinite; } @keyframes pulse { 50% { opacity: 0.25; } } }
.err { color: var(--danger); font-size: 0.88rem; }
.files { display: flex; flex-wrap: wrap; gap: 6px; }
.files .chip { background: var(--accent-soft); color: var(--accent); }
.bars { display: flex; flex-direction: column; gap: 8px; }
.barrow { display: grid; grid-template-columns: 7rem minmax(0, 1fr) 3.5rem; gap: 10px; align-items: center; font-size: 0.9rem; }
.meter { height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent); }
.meter i.full { background: var(--gold); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.kpi b { display: block; font-size: 1.6rem; font-variant-numeric: tabular-nums; font-weight: 600; }
.kpi span { font-size: 0.85rem; color: var(--muted); }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 3px 12px; cursor: pointer; font-size: 0.85rem; }
.filters button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.rlist { display: flex; flex-direction: column; gap: 10px; }
.ritem { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.switch { display: flex; align-items: center; gap: 10px; }
/* 72px up: Netlify's free plan puts its own "Powered by Netlify" badge (about 197 x 54) in the bottom-right corner */
.fab { position: fixed; right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(72px + env(safe-area-inset-bottom, 0px)); z-index: 8; border-radius: 999px; box-shadow: 0 4px 14px rgb(0 0 0 / 0.18); }
.fab-add { position: fixed; left: calc(16px + env(safe-area-inset-left, 0px)); bottom: calc(72px + env(safe-area-inset-bottom, 0px)); z-index: 8; border-radius: 999px; box-shadow: 0 4px 14px rgb(0 0 0 / 0.22); display: none; }
.overlay { position: fixed; inset: 0; z-index: 20; background: rgb(0 0 0 / 0.42); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: var(--surface); border-radius: 12px; padding: 18px; width: min(520px, 100%); display: flex; flex-direction: column; gap: 12px; max-height: 90vh; overflow: auto; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(128px + env(safe-area-inset-bottom, 0px)); z-index: 30; background: var(--fg); color: var(--bg); padding: 8px 16px; border-radius: 999px; font-size: 0.9rem; max-width: calc(100% - 32px); }
.ro { font-size: 0.85rem; color: var(--danger); }
/* ---------- real app additions ---------- */
.who { color: var(--fg); }
.vh { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; opacity: 0; }
.signin { width: 100%; max-width: 440px; margin: 6vh auto 0; }
.btn.big { padding: 11px 18px; font-size: 1rem; justify-content: center; }
.cap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 700px) { .cap { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.capbtn { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 76px; min-width: 0; padding: 8px 4px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); color: var(--fg); cursor: pointer; font-weight: 500; font-size: 0.9rem; text-align: center; line-height: 1.2; }
.capbtn .ic { font-size: 1.65rem; line-height: 1; }
.capbtn:hover { border-color: var(--accent); }
.capbtn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.capbtn.rec { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.capbtn:disabled { opacity: 0.55; cursor: progress; }
.citems { display: flex; flex-direction: column; gap: 10px; }
.citem { position: relative; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; overflow-wrap: anywhere; background: var(--surface); }
.citem .k { font-size: 0.85rem; color: var(--muted); display: flex; gap: 6px; align-items: center; padding-right: 40px; min-height: 28px; }
.citem .x { position: absolute; right: 6px; top: 6px; width: 34px; height: 34px; border: 0; border-radius: 999px; background: var(--surface-2); color: var(--fg); cursor: pointer; font-size: 1.15rem; line-height: 1; }
.citem .x:hover { background: var(--danger-soft); color: var(--danger); }
.citem img, .citem video { max-width: 100%; max-height: 260px; border-radius: 6px; display: block; object-fit: contain; }
.inp audio, .citem audio { width: 100%; max-width: 100%; }
.paste { display: flex; gap: 8px; align-items: center; min-width: 0; }
.paste input { flex: 1 1 auto; min-width: 0; }
.paste .btn { flex: none; }
.ph-box { aspect-ratio: 4 / 3; max-width: 100%; display: flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--muted); border-radius: 6px; font-family: var(--mono); font-size: 0.75rem; padding: 6px; text-align: center; }
.progress { font-size: 0.88rem; color: var(--accent); }
.ver { display: flex; flex-direction: column; gap: 6px; }
.kv .sw-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.foot { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
@media (max-width: 640px) {
  header.top { position: static; }
  .bar { gap: 6px 10px; padding-block: 8px; }
  .brand { width: 100%; }
  .brand b { font-size: 1.2rem; }
  .ctl { font-size: 0.78rem; }
  .ctl select { padding: 5px 8px; }
  main { padding-block: 14px 110px; gap: 18px; }
  nav.tabs .add { display: none; }
  .fab-add { display: inline-flex; }
  .fab, .fab-add { font-size: 0.85rem; padding: 8px 12px; }
}
/* link preview pictures and the card label when an idea has no picture */
.lpic { display: block; max-width: 100%; }
.lpic img, img.lpic { max-height: 220px; width: auto; max-width: 100%; object-fit: cover; border-radius: 6px; display: block; }
.thumb .site { position: absolute; right: 8px; bottom: 6px; font-size: 0.72rem; background: var(--surface); color: var(--fg); padding: 1px 6px; border-radius: 6px; }
.thumb .site.solo { position: static; margin: auto; font-family: var(--display); font-size: 1.05rem; background: none; color: var(--muted); }
/* which version this page is (v7 …), next to the name on every page */
.brand .ver { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; margin-left: 8px; vertical-align: middle; }
/* Instagram's own post viewer, for Instagram links (header, picture, footer) */
.igwrap { width: 100%; max-width: 400px; aspect-ratio: 10 / 14; }
.igwrap iframe { width: 100%; height: 100%; border: 0; border-radius: 8px; background: var(--surface-2); display: block; }
.toplinks { margin-top: 10px; }
/* YouTube, Pinterest and Facebook viewers (each site's own) */
.ytwrap { width: 100%; max-width: 560px; aspect-ratio: 16 / 9; }
.ytwrap.tall { max-width: 320px; aspect-ratio: 9 / 16; }
.pinwrap { width: 100%; max-width: 345px; height: 600px; }
.fbwrap { width: 100%; max-width: 500px; height: 620px; }
.fbwrap.video { aspect-ratio: 9 / 16; height: auto; max-width: 320px; }
.ytwrap iframe, .pinwrap iframe, .fbwrap iframe { width: 100%; height: 100%; border: 0; border-radius: 8px; background: var(--surface-2); display: block; }
/* cards: the post's own viewer, scaled and trimmed to the picture; taps go to the card, not the viewer */
.thumb.live { overflow: hidden; }
.thumb.live iframe { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; pointer-events: none; background: var(--surface-2); }
.thumb.live iframe:not([src]) { background: transparent; }   /* waiting its turn: the site's name shows through */
.thumb.live .num { z-index: 1; }
/* confidentiality (same as the supplier app): a name-and-time watermark over everything for everyone; for everyone
   except Lokesh no selecting, copying, saving pictures or printing, and a cover when the app isn't in front */
#wm { position: fixed; inset: 0; pointer-events: none; z-index: 60; background-repeat: repeat; }
#veil { display: none; position: fixed; inset: 0; z-index: 70; background: var(--bg); color: var(--fg); align-items: center; justify-content: center; text-align: center; font-weight: 600; padding: 24px; cursor: pointer; }
body.locked.veil #veil { display: flex; }
body.locked main *:not(input):not(textarea):not(select) { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body.locked img, body.locked video { -webkit-user-drag: none; user-drag: none; -webkit-touch-callout: none; }
img.burning { filter: blur(14px); }
#noprint { display: none; }
@media print {
  body.locked > *:not(#noprint) { display: none !important; }
  body.locked #noprint { display: block; padding: 40px; font-size: 20px; }
}

/* speak into a box (12 Nov 2026): the microphone, and the voice notes waiting to go with it */
.microw { gap: 6px; align-items: center; flex-wrap: wrap; margin: -2px 0 6px; }
.btn.mic.rec { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.microw .chip { display: inline-flex; align-items: center; gap: 6px; white-space: normal; }
.microw .chip .x { border: 0; background: none; color: inherit; cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 2px; }
.msg audio, .draft audio { display: block; width: 100%; max-width: 360px; margin-top: 6px; }
/* alerts: the one-time question on Home */
.banner.ask { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
