/* LlamaPlan: Llamassist house style (warm paper, Archivo / Public Sans / IBM Plex Mono, orange accent). Phone first. */
:root {
  --paper: #FAF7F2; --shell: #EDE7DD; --card: #FFFFFF; --ink: #1C1B19; --ink-2: #57534E; --muted: #8C857C;
  --rule: #E3DDD3; --rule-2: #D6CEC1; --orange: #FF7300; --burnt: #C24A00; --orange-wash: #FFF1E4;
  --done: #2F7D53; --done-wash: #E8F3EC; --doing: #B7791F; --doing-wash: #FDF2E2; --gap: #C0392B; --gap-wash: #FBEDEB;
  --na: #A8A29E; --na-wash: #F1EFEC;
  --p-idea: #A78BFA; --p-build: #60A5FA; --p-alpha: #F59E0B; --p-beta: #FF7300; --p-launch: #10B981; --p-grow: #2F7D53;
  --f-head: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--shell); color: var(--ink); font: 15px/1.5 var(--f-body); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--f-head); letter-spacing: -0.02em; margin: 0; line-height: 1.15; }
p { margin: 0; }
a { color: var(--burnt); }
button { font: inherit; color: inherit; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(12px, 4vw, 32px) 64px; }

/* top bar */
.top { position: sticky; top: 0; z-index: 20; background: var(--ink); color: #fff; padding-top: env(safe-area-inset-top); }
.top .in { max-width: 1180px; margin: 0 auto; padding: 10px clamp(12px, 4vw, 32px); display: flex; align-items: center; gap: 12px; }
.brand { font-family: var(--f-head); font-weight: 800; font-size: 19px; color: #fff; text-decoration: none; letter-spacing: -0.02em; }
.brand b { color: var(--orange); }
.top .sp { flex: 1; }
.top .me { font-size: 12px; color: #D6D1C9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40vw; }
.mode { font-family: var(--f-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; background: var(--orange); color: #fff; padding: 2px 7px; border-radius: 4px; }

.btn { cursor: pointer; border: 1px solid var(--rule-2); background: var(--card); border-radius: 6px; padding: 7px 12px; font-size: 13px; font-weight: 600; }
.btn:hover { border-color: var(--ink-2); }
.btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.go { background: var(--orange); color: #fff; border-color: var(--orange); }
.btn.ghost { background: transparent; color: inherit; border-color: rgba(255,255,255,.3); }
.btn.small { padding: 4px 9px; font-size: 12px; }
.btn:focus-visible, .tab:focus-visible, .row:focus-visible, .kcard:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.kick { font-family: var(--f-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--burnt); font-weight: 600; }
.muted { color: var(--muted); }
.note { font-size: 13px; color: var(--ink-2); }
.err { background: var(--gap-wash); color: #7A2A21; border: 1px solid #E8C9C4; padding: 10px 14px; border-radius: 8px; margin: 16px 0; }

/* sign-in */
.gate { min-height: 80vh; display: grid; place-items: center; text-align: center; padding: 24px; }
.gate h1 { font-size: clamp(32px, 8vw, 52px); }
.gate h1 b { color: var(--orange); }
.gate p { margin: 10px 0 22px; color: var(--ink-2); }

/* section heads */
.head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 24px 0 12px; flex-wrap: wrap; }
.head h1 { font-size: clamp(24px, 5vw, 34px); }
.head h2 { font-size: 20px; }

/* chips + dots */
.chip { display: inline-flex; align-items: center; gap: 5px; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--paper); border: 1px solid var(--rule-2); white-space: nowrap; }
.chip.phase { color: #fff; border: 0; }
.ph-idea { background: var(--p-idea); } .ph-build { background: var(--p-build); } .ph-alpha { background: var(--p-alpha); }
.ph-beta { background: var(--p-beta); } .ph-launch { background: var(--p-launch); } .ph-grow { background: var(--p-grow); }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: none; display: inline-block; }
.s-done { background: var(--done); } .s-doing { background: var(--doing); } .s-gap { background: var(--gap); } .s-na { background: var(--na); }
.s-todo { background: var(--rule-2); }
.fresh-fresh { color: var(--done); } .fresh-aging { color: var(--doing); } .fresh-stale { color: var(--gap); }

/* portfolio */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 14px; }
.pcard { background: var(--card); border: 1px solid var(--rule-2); border-radius: 12px; padding: 16px; display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 6px 14px; text-decoration: none; color: inherit; }
.pcard:hover { border-color: var(--orange); }

.pcard h2 { font-size: 19px; }
.pcard .meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.pcard dl { grid-column: 1 / -1; margin: 8px 0 0; display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 5px 10px; font-size: 13.5px; }
.pcard dt { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.pcard dd { margin: 0; }
.pcard .late { color: var(--gap); font-weight: 600; }
.pcard .foot { grid-column: 1 / -1; display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--rule); padding-top: 8px; margin-top: 6px; }
.ring text { font-family: var(--f-head); font-weight: 800; }
.ringlab { font-family: var(--f-mono); font-size: 8.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: center; margin-top: 2px; }

/* timeline (portfolio + project) */
.tl { background: var(--card); border: 1px solid var(--rule-2); border-radius: 12px; padding: 14px; overflow-x: auto; }
.tl-in { min-width: 640px; position: relative; }
.tl-row { display: grid; grid-template-columns: 130px minmax(0, 1fr); align-items: center; min-height: 34px; border-top: 1px solid var(--rule); }
.tl-row:first-child { border-top: 0; }
.tl-row .nm { font-weight: 600; font-size: 13px; padding-right: 8px; }
.tl-track { position: relative; height: 26px; }
.tl-bar { position: absolute; top: 4px; height: 18px; border-radius: 4px; color: #fff; font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .05em; text-transform: uppercase; padding: 2px 5px; overflow: hidden; white-space: nowrap; }
.tl-bar.planned { opacity: .55; background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.25) 0 4px, transparent 4px 8px); }
.tl-axis { display: grid; grid-template-columns: 130px minmax(0, 1fr); font-family: var(--f-mono); font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.tl-axis .ticks { position: relative; height: 18px; }
.tl-axis .ticks span { position: absolute; transform: translateX(-50%); }
.tl-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--ink); opacity: .55; }
.tl-none { font-size: 12px; color: var(--muted); }

/* project header + tabs */
.phead { background: var(--card); border-bottom: 1px solid var(--rule-2); }
.phead .in { max-width: 1180px; margin: 0 auto; padding: 14px clamp(12px, 4vw, 32px) 0; }
.phead .row1 { display: flex; align-items: center; gap: 12px; }
.phead h1 { font-size: clamp(22px, 5vw, 30px); }
.back { text-decoration: none; font-size: 13px; color: var(--ink-2); }
.tabs { display: flex; gap: 2px; overflow-x: auto; margin-top: 10px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { text-decoration: none; color: var(--ink-2); padding: 9px 12px; font-weight: 600; font-size: 14px; border-bottom: 3px solid transparent; white-space: nowrap; }
.tab[aria-current="page"] { color: var(--ink); border-bottom-color: var(--orange); }

/* overview */
.ov { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; margin-top: 18px; }
.panel { background: var(--card); border: 1px solid var(--rule-2); border-radius: 12px; padding: 16px; }
.panel + .panel { margin-top: 14px; }
.bet { font-family: var(--f-head); font-size: clamp(19px, 3.6vw, 24px); font-weight: 700; line-height: 1.3; margin-top: 6px; }
.kv { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px 12px; font-size: 14px; margin-top: 12px; }
.kv dt { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.kv dd { margin: 0; }
.metric { font-family: var(--f-head); font-weight: 800; font-size: 26px; }
.strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.strip .pl { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.strip .dots { display: flex; gap: 5px; flex-wrap: wrap; }
.strip .dot { width: 16px; height: 16px; }
.links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.links a { font-size: 13px; padding: 5px 10px; border: 1px solid var(--rule-2); border-radius: 6px; text-decoration: none; background: var(--paper); }

/* checklist */
.pillar { margin-top: 18px; }
.pillar h2 { font-size: 15px; font-family: var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 8px; }
.rows { background: var(--card); border: 1px solid var(--rule-2); border-radius: 12px; overflow: hidden; }
.row { display: grid; grid-template-columns: 14px 128px minmax(0, 1fr) 18px; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 11px 14px; background: none; border: 0; border-top: 1px solid var(--rule); cursor: pointer; }
.rows > div:first-child .row { border-top: 0; }
.row:hover { background: var(--paper); }
.row .bn { font-weight: 700; font-size: 14px; }
.row .bl { font-size: 14px; color: var(--ink-2); }
.row .chev { color: var(--muted); transition: transform .15s; }
.row[aria-expanded="true"] .chev { transform: rotate(90deg); }
.row.st-gap { box-shadow: inset 4px 0 0 var(--gap); } .row.st-doing { box-shadow: inset 4px 0 0 var(--doing); }
.row.st-done { box-shadow: inset 4px 0 0 var(--done); } .row.st-na { box-shadow: inset 4px 0 0 var(--na); }
.nosrc { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--gap); border: 1px dashed var(--gap); border-radius: 4px; padding: 0 4px; margin-left: 6px; white-space: nowrap; }
.more { padding: 4px 14px 14px 52px; font-size: 14px; background: var(--paper); border-top: 1px dashed var(--rule); }
.more p { margin-top: 8px; }
.more .src { font-size: 12px; color: var(--muted); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.seg button { cursor: pointer; border: 1px solid var(--rule-2); background: var(--card); border-radius: 999px; padding: 5px 11px; font-size: 12.5px; display: inline-flex; gap: 6px; align-items: center; }
.seg button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }

/* phase grid (timeline) + board */
.pgrid { display: grid; grid-template-columns: 96px repeat(6, minmax(150px, 1fr)); gap: 0; background: var(--card); border: 1px solid var(--rule-2); border-radius: 12px; overflow: auto; }
.pgrid > div { border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 8px; min-width: 0; }
.pgrid .ch { position: sticky; top: 0; background: var(--paper); font-weight: 700; font-size: 13px; }
.pgrid .ch small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }
.pgrid .now { background: var(--orange-wash); }
.pgrid .lane { font-family: var(--f-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); font-weight: 600; background: var(--paper); }
.box { font-size: 12px; padding: 5px 7px; border-radius: 5px; border: 1px solid var(--rule-2); background: var(--card); margin-bottom: 5px; display: flex; gap: 6px; align-items: baseline; line-height: 1.3; cursor: pointer; }
.box .dot { width: 8px; height: 8px; }
.box.st-done { background: var(--done-wash); border-color: #BFDCCB; } .box.st-doing { background: var(--doing-wash); border-color: #F1D7AE; }

.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; }
.col { background: var(--paper); border: 1px solid var(--rule-2); border-radius: 12px; padding: 8px; min-height: 160px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 6px; }
.col.now { border-color: var(--orange); }
.col.over { background: var(--orange-wash); outline: 2px dashed var(--orange); }
.col h3 { font-size: 14px; display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 4px; }
.col h3 small { font-family: var(--f-mono); font-size: 10px; color: var(--muted); font-weight: 600; }
.kcard { background: var(--card); border: 1px solid var(--rule-2); border-radius: 8px; padding: 9px 10px; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.kcard .t { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.kcard .m { display: flex; gap: 6px; align-items: center; margin-top: 6px; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }
.kcard .tag { font-family: var(--f-mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em; border: 1px solid var(--rule-2); border-radius: 4px; padding: 0 4px; }
.kcard.dragging { opacity: .35; }
.dragghost { position: fixed; z-index: 100; pointer-events: none; width: 230px; box-shadow: 0 12px 30px rgba(0,0,0,.2); transform: rotate(2deg); cursor: grabbing; }
.addcard { cursor: pointer; border: 1px dashed var(--rule-2); background: transparent; border-radius: 8px; padding: 7px; font-size: 12.5px; color: var(--ink-2); margin-top: auto; }

/* decisions */
.dform { display: grid; grid-template-columns: 130px minmax(0, 1fr) 120px auto; gap: 8px; }
.dlist { margin-top: 14px; }
.dec { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--rule); }
.dec .dd { font-family: var(--f-mono); font-size: 11px; color: var(--burnt); font-weight: 600; padding-top: 2px; }
.dec .src { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* forms + dialog */
input[type=text], input[type=date], textarea, select { width: 100%; font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--rule-2); border-radius: 6px; background: var(--paper); color: var(--ink); }
textarea { min-height: 70px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--orange); outline-offset: 0; border-color: var(--orange); background: #fff; }
label.f { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 4px; }
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fgrid .full { grid-column: 1 / -1; }
dialog { border: 0; border-radius: 14px; padding: 0; width: min(560px, 94vw); max-height: 90vh; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(28,27,25,.45); }
dialog form { padding: 18px; }
dialog h2 { font-size: 19px; margin-bottom: 12px; }
dialog .acts { display: flex; gap: 8px; justify-content: space-between; margin-top: 16px; flex-wrap: wrap; }
dialog .acts .r { display: flex; gap: 8px; }

/* meetings (cockpit) */
.mlist .m { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; background: var(--card); border: 1px solid var(--rule-2); border-radius: 10px; margin-bottom: 8px; text-decoration: none; color: inherit; }
.ck { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 16px; margin-top: 18px; align-items: start; }
.ck-rail { position: sticky; top: 70px; display: flex; flex-direction: column; gap: 6px; }
.ck-clock { background: var(--ink); color: #fff; border-radius: 8px; padding: 10px 12px; }
.ck-clock .now { font-family: var(--f-head); font-weight: 700; font-size: 20px; }
.ck-clock .lab { font-family: var(--f-mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: #B5AFA6; }
.ck-mod { cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) 12px; gap: 8px; align-items: center; padding: 9px 10px; border-radius: 6px; border: 1px solid var(--rule); background: var(--card); text-align: left; }
.ck-mod[aria-current="true"] { border-color: var(--orange); background: var(--orange-wash); }
.ck-mod .nm { font-size: 13px; font-weight: 600; line-height: 1.3; }
.ck-mod .nm small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }
.ck-mod .dot { width: 10px; height: 10px; border: 1.5px solid var(--rule-2); background: none; }
.ck-mod.done .dot { background: var(--done); border-color: var(--done); }
.ck-main { background: var(--card); border: 1px solid var(--rule-2); border-radius: 12px; overflow: hidden; min-width: 0; }
.ck-head { padding: 16px 18px; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; background: var(--paper); }
.ck-head h2 { font-size: 21px; margin: 3px 0 2px; }
.ck-head .goal { font-size: 14px; color: var(--ink-2); }
.timer { text-align: right; }
.timer .tv { font-family: var(--f-head); font-weight: 800; font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
.timer .tv.warn { color: var(--doing); } .timer .tv.over { color: var(--gap); }
.timer .tb { display: flex; gap: 6px; justify-content: flex-end; margin-top: 8px; }
.ck-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 16px; }
.bh { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.say { padding: 10px 12px; border-left: 3px solid var(--orange); background: var(--orange-wash); border-radius: 0 6px 6px 0; }
.say + .say { margin-top: 6px; }
.ask { margin: 0; padding-left: 20px; }
.choices { display: flex; flex-wrap: wrap; gap: 6px; }
.choices label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; border: 1px solid var(--rule-2); border-radius: 999px; padding: 6px 11px; cursor: pointer; background: var(--paper); }
.choices input { accent-color: var(--orange); margin: 0; }
.choices label:has(input:checked) { border-color: var(--orange); background: var(--orange-wash); }
.rec { font-size: 12.5px; color: var(--ink-2); margin-top: 5px; }
.ck-foot { display: flex; justify-content: space-between; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--rule); background: var(--paper); flex-wrap: wrap; align-items: center; }
.saved { font-family: var(--f-mono); font-size: 10px; color: var(--muted); }
.recap { width: 100%; min-height: 300px; font-family: var(--f-mono); font-size: 12.5px; line-height: 1.55; white-space: pre-wrap; }

@media (max-width: 860px) {
  .ov { grid-template-columns: minmax(0, 1fr); }
  .ck { grid-template-columns: minmax(0, 1fr); }
  .ck-rail { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ck-clock { grid-column: 1 / -1; }
  .ck-head { grid-template-columns: minmax(0, 1fr); }
  .timer { text-align: left; } .timer .tb { justify-content: flex-start; }
}
@media (max-width: 600px) {
  .row { grid-template-columns: 12px minmax(0, 1fr) 14px; }
  .row .bl { grid-column: 2; }
  .row .chev { grid-row: 1; grid-column: 3; }
  .more { padding-left: 14px; }
  .fgrid, .dform { grid-template-columns: minmax(0, 1fr); }
  .strip { grid-template-columns: minmax(0, 1fr); }
  .board { grid-auto-columns: 82%; }
  .pcard { grid-template-columns: 64px minmax(0, 1fr); }
}
