/* App layout. Top tabs on wide screens, a bottom tab bar on phones (thumb reach, installed-app feel). */
.appwrap { max-width: 1180px; margin: 0 auto; padding-inline: 16px; padding-block: 10px 96px; display: grid; gap: 14px; }
.meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--muted-soft); color: var(--ink-2); white-space: nowrap; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.chip.live .dot { background: var(--ok); }
.chip.demo .dot { background: var(--warn); }
.banner { background: var(--warn-soft); color: var(--ink); border: 1px solid var(--rule); border-left: 4px solid var(--warn); padding: 10px 14px; border-radius: var(--r); font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; }
.banner.info { background: var(--accent-soft); border-left-color: var(--accent); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--rule); }
.tabs button { position: relative; background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 12px 9px; font-family: var(--f-display); font-weight: 600; font-size: 16px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.tabs svg { width: 20px; height: 20px; display: none; }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--crit); color: var(--sheet); font-family: var(--f-body); font-size: 12px; font-weight: 700; letter-spacing: 0; }
.count.warn { background: var(--warn); }
@media (max-width: 719px) {
  .tabs { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; border: 0; border-top: 1px solid var(--rule); background: var(--sheet); padding: 4px 6px calc(4px + env(safe-area-inset-bottom, 0px)); justify-content: space-around; box-shadow: 0 -4px 16px rgba(10, 20, 30, 0.08); }
  .tabs button { flex-direction: column; gap: 2px; border-bottom: 0; padding: 6px 4px; font-size: 12px; letter-spacing: 0.06em; flex: 1; }
  .tabs button[aria-selected="true"] { color: var(--accent); }
  .tabs svg { display: block; }
  .tabs .count { position: absolute; top: 0; right: calc(50% - 26px); min-width: 18px; height: 18px; font-size: 11px; }
}

/* Today */
.today { display: grid; gap: 16px; }
.hello h2 { font-family: var(--f-display); font-weight: 700; font-size: 30px; letter-spacing: 0.02em; text-transform: uppercase; line-height: 1.05; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 560px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--r); background: var(--sheet); border: 1px solid var(--rule); border-top: 4px solid var(--rule); text-align: left; cursor: pointer; }
.stat b { font-family: var(--f-display); font-weight: 700; font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.stat.s-crit { border-top-color: var(--crit); } .stat.s-crit b { color: var(--crit); }
.stat.s-warn { border-top-color: var(--warn); } .stat.s-warn b { color: var(--warn); }
.stat.s-city { border-top-color: var(--accent); } .stat.s-city b { color: var(--accent); }
.stat.s-info { border-top-color: var(--ink-3); }
.stat.zero b { color: var(--ink-3); }
.allclear { display: grid; gap: 6px; padding: 18px; border-radius: var(--r); background: var(--ok-soft); border: 1px solid var(--rule); }
.allclear h3 { font-family: var(--f-display); font-weight: 700; font-size: 22px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--ok); }
.feed { display: grid; gap: 8px; }
.feeditem { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 10px 12px; border-radius: var(--r); background: var(--sheet); border: 1px solid var(--rule); cursor: pointer; text-align: left; width: 100%; }
.feeditem:hover { border-color: var(--ink-3); }
@media (max-width: 560px) { .feeditem.haspill { grid-template-columns: minmax(0, 1fr) auto; } .feeditem.haspill > .pill { grid-column: 1 / -1; justify-self: start; } }
.feeditem .when { font-size: 12px; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.feeditem .what { min-width: 0; }
.feeditem .what b { font-weight: 600; }
.feeditem .what span { display: block; font-size: 13px; color: var(--ink-2); }
.datebox { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 6px; border: 1px solid var(--rule); background: var(--paper); line-height: 1; }
.datebox .m { font-family: var(--f-display); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--crit); }
.datebox .d { font-family: var(--f-display); font-weight: 700; font-size: 20px; }
.days { font-weight: 700; font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.days.crit { color: var(--crit); } .days.warn { color: var(--warn); } .days.ok { color: var(--ink-2); }

/* Projects tab */
.split { display: grid; gap: 16px; }
@media (min-width: 960px) { .split { grid-template-columns: minmax(300px, 370px) minmax(0, 1fr); align-items: start; } .split .listcol { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 12px); max-height: calc(100vh - 24px); overflow: auto; padding-right: 2px; } }
.listcol, .detailcol { display: grid; gap: 10px; min-width: 0; align-content: start; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filters button { border: 1px solid var(--rule); background: var(--sheet); border-radius: 999px; padding: 4px 11px; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--sheet); }
.searchbox { width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--sheet); }
.pcard { display: grid; gap: 7px; padding: 12px 14px; text-align: left; width: 100%; cursor: pointer; border-left: 5px solid var(--rule); color: inherit; }
.pcard:hover { border-color: var(--ink-3); }
.pcard.sel { outline: 2px solid var(--accent); outline-offset: -1px; }
.pcard.s-crit { border-left-color: var(--crit); }
.pcard.s-warn { border-left-color: var(--warn); }
.pcard.s-info { border-left-color: var(--accent); }
.pcard .ptitle { font-family: var(--f-display); font-weight: 600; font-size: 20px; letter-spacing: 0.02em; line-height: 1.15; }
.pcard .cp { font-size: 13px; color: var(--ink-2); }
.pcard .cp b { color: var(--ink); font-weight: 600; }
.dots { display: flex; gap: 4px; align-items: center; }
.dots i { display: block; width: 18px; height: 6px; border-radius: 3px; background: var(--rule); }
.dots i.st-done, .dots i.st-active { background: var(--ok); }
.dots i.st-open { background: var(--accent); }
.dots i.st-blocked { background: var(--warn); }
.dots i.st-dead { background: var(--crit); }
.archived { opacity: 0.7; }

/* Detail extras */
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sharebox { display: grid; gap: 8px; padding: 12px 14px; border: 1px dashed var(--accent); border-radius: var(--r); background: var(--sheet); }
.copyrow { display: flex; gap: 8px; }
.copyrow input { flex: 1; min-width: 0; min-height: 40px; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 6px; background: var(--paper); font-family: var(--f-mono); font-size: 13px; }
.copybox textarea { width: 100%; min-height: 220px; font-family: var(--f-mono); font-size: 12.5px; padding: 10px; border-radius: 6px; border: 1px solid var(--rule); background: var(--paper); }
.notes textarea { width: 100%; min-height: 80px; padding: 10px; border: 1px solid var(--rule); border-radius: 6px; background: var(--sheet); resize: vertical; }
.target { font-size: 13px; color: var(--ink-2); }
.target b { color: var(--ink); }
.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; display: grid; min-width: 200px; padding: 6px; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); box-shadow: var(--shadow); }
.menu-pop button { text-align: left; background: none; border: 0; padding: 9px 10px; border-radius: 6px; cursor: pointer; font-weight: 500; }
.menu-pop button:hover { background: var(--paper); }
.menu-pop .danger { color: var(--crit); }

/* Panels and search */
.panel { display: grid; gap: 14px; padding: 18px; }
.panel h2 { font-family: var(--f-display); font-weight: 700; font-size: 24px; letter-spacing: 0.03em; text-transform: uppercase; }
.fields { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.searchrow { display: flex; gap: 8px; align-items: stretch; }
.searchrow textarea { flex: 1; min-width: 0; min-height: 46px; max-height: 180px; padding: 11px 12px; border: 1.5px solid var(--ink-3); border-radius: var(--r); background: var(--sheet); font-size: 16px; resize: vertical; line-height: 1.35; }
.examples { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--ink-2); align-items: center; }
.examples button { border: 1px dashed var(--ink-3); background: transparent; border-radius: 999px; padding: 3px 10px; font-size: 13px; cursor: pointer; }
.results { display: grid; gap: 12px; }
.res { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; padding: 10px 12px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--sheet); cursor: pointer; }
.res input { width: 18px; height: 18px; margin-top: 3px; grid-row: span 3; accent-color: var(--accent); }
.res.dim { opacity: 0.7; }
.res .l1 { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.stickybar { position: sticky; bottom: calc(env(safe-area-inset-bottom, 0px) + 8px); z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding: 10px 12px; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); box-shadow: var(--shadow); }
@media (max-width: 719px) { .stickybar { bottom: calc(env(safe-area-inset-bottom, 0px) + 72px); } }
.note { font-size: 13px; color: var(--ink-2); }
.err { color: var(--crit); font-size: 14px; font-weight: 600; }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 4px; color: var(--ink-2); }

/* Settings */
.settings { display: grid; gap: 14px; }
.setcard { display: grid; gap: 12px; padding: 16px 18px; }
.setcard h3 { font-family: var(--f-display); font-weight: 600; font-size: 18px; letter-spacing: 0.05em; text-transform: uppercase; }
.meter { display: grid; gap: 4px; }
.meter .bar { height: 8px; border-radius: 4px; background: var(--rule-2); overflow: hidden; }
.meter .bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.meter .bar i.full { background: var(--warn); }
.plans { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.plan { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--sheet); align-content: start; }
.plan.cur { outline: 2px solid var(--ok); outline-offset: -1px; }
.plan.pop { outline: 2px solid var(--accent); outline-offset: -1px; }
.plan h4 { margin: 0; font-family: var(--f-display); font-weight: 700; font-size: 20px; text-transform: uppercase; letter-spacing: 0.04em; }
.plan .price { font-family: var(--f-display); font-weight: 700; font-size: 30px; line-height: 1; }
.plan .price span { font-family: var(--f-body); font-weight: 500; font-size: 13px; color: var(--ink-2); }
.plan ul { margin: 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); display: grid; gap: 3px; }
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { width: 20px; height: 20px; accent-color: var(--accent); }
.people { display: grid; gap: 6px; }
.person { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding: 8px 10px; border: 1px solid var(--rule-2); border-radius: 6px; }

/* Benchmarks */
.bench { display: grid; gap: 12px; padding: 18px; }
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
th { text-align: left; font-family: var(--f-display); font-weight: 600; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); padding: 6px 8px; border-bottom: 1.5px solid var(--ink-3); white-space: nowrap; }
td { padding: 8px; border-bottom: 1px solid var(--rule-2); vertical-align: middle; }
td.n, th.n { text-align: right; white-space: nowrap; }
.range { position: relative; height: 12px; min-width: 120px; background: var(--rule-2); border-radius: 6px; }
.range .iqr { position: absolute; top: 2px; height: 8px; border-radius: 4px; background: var(--accent-soft); border: 1px solid var(--accent); }
.range .m { position: absolute; top: -1px; width: 2px; height: 14px; background: var(--ink); }

/* Sign in */
.signin { min-height: calc(100vh - 140px); display: grid; place-items: center; }
.signin .card { width: 100%; max-width: 440px; padding: 26px; display: grid; gap: 14px; }
.signin h2 { font-family: var(--f-display); font-weight: 700; font-size: 28px; text-transform: uppercase; letter-spacing: 0.03em; line-height: 1.05; }
.codeinput { font-family: var(--f-mono); font-size: 28px !important; letter-spacing: 0.4em; text-align: center; }

/* Modal and toast */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(10, 16, 22, 0.55); display: grid; place-items: center; padding: 16px; }
.modal { width: 100%; max-width: 760px; max-height: calc(100vh - 32px); overflow: auto; padding: 20px; display: grid; gap: 14px; box-shadow: var(--shadow); }
.modal h2 { font-family: var(--f-display); font-weight: 700; font-size: 26px; text-transform: uppercase; letter-spacing: 0.03em; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); max-width: min(560px, calc(100% - 32px)); background: var(--ink); color: var(--sheet); padding: 10px 16px; border-radius: var(--r); font-size: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); z-index: 50; }
@media (max-width: 719px) { .toast { bottom: calc(env(safe-area-inset-bottom, 0px) + 80px); } }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--rule); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { height: 76px; border-radius: var(--r); background: linear-gradient(90deg, var(--rule-2), var(--sheet), var(--rule-2)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (max-width: 520px) {
  .panel, .bench, .setcard { padding: 14px 12px; }
  .hello h2 { font-size: 25px; }
}

/* Onboarding choices */
.ways { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.way-card { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid var(--rule); border-left: 5px solid var(--accent); border-radius: var(--r); background: var(--sheet); color: inherit; text-decoration: none; }
.way-card:hover { border-color: var(--ink-3); border-left-color: var(--accent); }
.way-card b { font-family: var(--f-display); font-weight: 700; font-size: 20px; letter-spacing: 0.03em; text-transform: uppercase; color: var(--accent); }
.way-card span { font-size: 14px; color: var(--ink-2); }

/* Connect AB+C */
.connect .way { display: grid; gap: 8px; padding: 14px 0 4px; border-top: 1px solid var(--rule-2); }
.connect .way .eyebrow { color: var(--ink-2); }
.connect .searchrow .input { min-height: 46px; font-size: 16px; }
.bookmarklet { cursor: grab; border: 2px dashed var(--accent); color: var(--accent); background: var(--accent-soft); margin-left: 4px; }
.bookmarklet:active { cursor: grabbing; }
.abc-contacts { display: grid; gap: 8px; padding: 12px 14px; border-left: 4px solid var(--ok); }

/* Site plan details */
.spblock { display: grid; gap: 10px; padding: 10px 12px; border-radius: 6px; background: var(--paper); border: 1px solid var(--rule-2); }
.phases { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; counter-reset: ph; }
.phases li { counter-increment: ph; display: grid; gap: 2px; align-content: start; padding: 6px 8px 7px; border-top: 4px solid var(--rule); background: var(--sheet); border-radius: 0 0 4px 4px; min-width: 0; }
.phases .ph-name { font-family: var(--f-display); font-weight: 600; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1.15; }
.phases .ph-name::before { content: counter(ph) ". "; color: var(--ink-3); }
.phases .ph-note { font-size: 11.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.phases .ph-done { border-top-color: var(--ok); }
.phases .ph-current { border-top-color: var(--accent); background: var(--accent-soft); }
.phases .ph-stopped { border-top-color: var(--crit); }
.phases .ph-todo .ph-name { color: var(--ink-3); }
@media (max-width: 600px) { .phases { grid-template-columns: 1fr; } .phases li { border-top: 0; border-left: 4px solid var(--rule); border-radius: 0 4px 4px 0; } .phases .ph-done { border-left-color: var(--ok); } .phases .ph-current { border-left-color: var(--accent); } .phases .ph-stopped { border-left-color: var(--crit); } }
.deadline { display: grid; gap: 8px; padding: 10px 12px; border-radius: 6px; background: var(--sheet); border: 1px solid var(--rule); border-left: 4px solid var(--accent); font-size: 14px; }
.deadline.warn { border-left-color: var(--warn); }
.deadline.crit { border-left-color: var(--crit); }
.deadline form { gap: 6px 8px; }
.deadline input[type="date"] { min-height: 38px; padding: 6px 8px; border: 1px solid var(--rule); border-radius: 6px; background: var(--sheet); }
.cycles { font-size: 13px; }
.cycles summary, .peoplebox summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.cycles table { margin-top: 6px; font-size: 13px; }
.cycles tr.cy-city td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.cycles tr.cy-you td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.cycles tr.cy-unknown td { color: var(--ink-3); }
.checklist { display: grid; gap: 6px; }
.checklist .switch { font-size: 14px; }

/* Reviewers and follow-ups */
.peoplebox { display: grid; gap: 8px; font-size: 14px; border-top: 1px dashed var(--rule); padding-top: 8px; }
.peoplebox[open] { padding-bottom: 4px; }
.peoplebox > * + * { margin-top: 8px; }
.peoplebox .sumt { color: var(--accent); }
.contact .who { display: grid; gap: 2px; min-width: 0; }
.contact .who a { overflow-wrap: anywhere; }
.contactform { padding: 10px 12px; border: 1px solid var(--rule); border-radius: 6px; background: var(--paper); }
.pastebox { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 6px; background: var(--paper); }
.pastebox textarea { width: 100%; min-height: 110px; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 6px; background: var(--sheet); font-family: var(--f-mono); font-size: 12.5px; resize: vertical; }
.person.pick { justify-content: flex-start; cursor: pointer; }
.person.pick input { width: 18px; height: 18px; accent-color: var(--accent); }
.fulog { display: grid; gap: 6px; }
.furow { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; padding: 8px 10px; border-left: 3px solid var(--rule); background: var(--paper); border-radius: 0 6px 6px 0; }
.furow > span:first-child { display: grid; gap: 1px; min-width: 0; }
.fusub { overflow-wrap: anywhere; }
.warn-t { color: var(--warn); }

/* Follow-up composer */
.composer textarea { font-family: var(--f-body); font-size: 14px; line-height: 1.5; min-height: 220px; }
.composer .daysin { width: 64px; min-height: 32px; padding: 2px 6px; margin: 0 4px; border: 1px solid var(--rule); border-radius: 6px; background: var(--sheet); text-align: center; }

/* Review times */
.rt { display: grid; gap: 6px; padding-top: 14px; border-top: 1px solid var(--rule-2); scroll-margin-top: 12px; }
.rt h3 { font-family: var(--f-display); font-weight: 700; font-size: 20px; letter-spacing: 0.03em; text-transform: uppercase; }
.rt-table th { font-family: var(--f-body); font-weight: 600; font-size: 14px; letter-spacing: 0; text-transform: none; color: var(--ink); border-bottom: 1px solid var(--rule-2); white-space: normal; width: 42%; vertical-align: top; }
.rt-table td { vertical-align: top; }
@media (max-width: 560px) { .rt-table th { width: 50%; } }
