/* standalone page base (the claude.ai wrapper used to supply these) */
html, body { margin: 0; }
[hidden] { display: none !important; }
img { max-width: 100%; }

/* signed-in user in the top bar */
.who { display: flex; align-items: center; gap: 8px; color: #FFFFFF; position: relative; }
.who-btn { display: flex; align-items: center; gap: 8px; border: 1px solid #3A3833; background: none; color: #FFFFFF; border-radius: 999px; padding: 3px 12px 3px 3px; cursor: pointer; font-weight: 700; font-size: 13px; max-width: 220px; }
.who-btn:hover { border-color: #CFC8BE; }
.who-btn .av { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #000; display: grid; place-items: center; font-weight: 800; font-size: 12px; flex: none; }
.who-btn .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); min-width: 220px; padding: 6px; display: grid; z-index: 40; }
.menu .mh { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; display: grid; gap: 2px; }
.menu .mh b { font-size: 14px; }
.menu .mh span { font-size: 12px; color: var(--muted); }
.menu button { border: 0; background: none; text-align: left; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-weight: 600; }
.menu button:hover { background: var(--surface-2); }

/* login */
.login-wrap { min-height: calc(100vh - 140px); display: grid; place-items: center; padding-block: 24px; }
.login { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); }
.login .band { position: relative; overflow: hidden; background: var(--brand); color: #000; padding: 26px 24px 22px; display: grid; justify-items: center; gap: 4px; text-align: center; }
.login .band b { font-family: var(--f-display); font-weight: 400; font-size: 38px; line-height: 1; }
.login .band span { font-weight: 700; font-size: 9px; letter-spacing: .32em; padding-left: .32em; }
.login form { padding: 20px 24px 24px; display: grid; gap: 12px; }
.login h1 { font-family: var(--f-display); font-weight: 900; font-synthesis: none; font-size: 22px; }
:root[lang="ka"] .login h1 { text-transform: uppercase; }
.login .err { background: var(--bad-soft); color: var(--bad); border-radius: 10px; padding: 8px 12px; font-weight: 600; font-size: 13px; }
.login .langs { display: flex; justify-content: center; gap: 6px; padding-bottom: 18px; }

/* team */
.team-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.team-table th { text-align: left; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding: 10px 8px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.team-table td { padding: 10px 8px; border-top: 1px solid var(--line); vertical-align: middle; }
.team-table tr.off td { color: var(--muted); }
.team-table .actions-cell { text-align: right; white-space: nowrap; }
.role-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 10px; }
.role-cards div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 2px; }
.role-cards b { font-size: 13.5px; }
.role-cards span { font-size: 12.5px; color: var(--muted); }
.pwbox { display: flex; gap: 8px; }
.pwbox input { font-family: ui-monospace, Consolas, monospace; }
.by { font-size: 12px; color: var(--muted); }

/* Food Good brandbook 2026: golden yellow #FFC416 + black + warm taupe (primary), sage / muted olive / warm white (secondary).
   Wordmark and display in Bowlby One SC, text in Helvetica, tagline as tracked bold caps, wave pattern on the yellow band.
   Layout: black brand bar, yellow portfolio band, one working column; detail as two columns (checklist | budget + site log). */
:root {
  --brand: #FFC416;        /* golden yellow */
  --brand-ink: #000000;
  --black: #000000;
  --taupe: #908478;        /* warm taupe */
  --sage: #D0D3C1;         /* sage green */
  --olive: #B9B89E;        /* muted olive */
  --bg: #F2F0EB;
  --surface: #FFFFFF;
  --surface-2: #ECE9E2;
  --line: #DDD8CE;
  --ink: #111111;
  --muted: #6B6259;
  --focus: #111111;
  --open: #6B4E00;  --open-fill: #FFC416; --open-soft: #FFF0C2;   /* new branch openings */
  --reno: #55553F;  --reno-fill: #A9A88B; --reno-soft: #E5E7DA;   /* renovations */
  --ok: #3E7A4C;   --ok-soft: #E1EEDF;
  --warn: #A9480B; --warn-soft: #FBE6D4;
  --bad: #BE3226;  --bad-soft: #F8DDD8;
  --hold: #6B6259; --hold-soft: #ECE9E2;
  --shadow: 0 1px 2px rgba(17,17,17,.06), 0 8px 24px rgba(17,17,17,.06);
  --f-display: "Bowlby One SC", "Noto Sans Georgian", "Arial Black", Impact, sans-serif;
  --f-body: "Helvetica Neue", Helvetica, Arial, "Noto Sans Georgian", "Sylfaen", sans-serif;
  --r: 14px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0E0D0B; --surface: #191815; --surface-2: #24221E; --line: #34312B; --ink: #F3F0E8; --muted: #B3A99D; --focus: #FFC416;
  --open: #FFC416; --open-fill: #FFC416; --open-soft: #3A2F0A;
  --reno: #CFCEB4; --reno-fill: #9C9B80; --reno-soft: #2A2B23;
  --ok: #7CC48C; --ok-soft: #1C2E20; --warn: #F0995A; --warn-soft: #3A2414; --bad: #F07B6E; --bad-soft: #3D1C18;
  --hold: #B3A99D; --hold-soft: #2A2824;
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 8px 24px rgba(0,0,0,.3);
  color-scheme: dark;
} }
:root[data-theme="dark"] {
  --bg: #0E0D0B; --surface: #191815; --surface-2: #24221E; --line: #34312B; --ink: #F3F0E8; --muted: #B3A99D; --focus: #FFC416;
  --open: #FFC416; --open-fill: #FFC416; --open-soft: #3A2F0A;
  --reno: #CFCEB4; --reno-fill: #9C9B80; --reno-soft: #2A2B23;
  --ok: #7CC48C; --ok-soft: #1C2E20; --warn: #F0995A; --warn-soft: #3A2414; --bad: #F07B6E; --bad-soft: #3D1C18;
  --hold: #B3A99D; --hold-soft: #2A2824;
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 8px 24px rgba(0,0,0,.3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 14px; line-height: 1.45; }
button, input, select, textarea { font: inherit; color: inherit; }
.num, .mono { font-variant-numeric: tabular-nums; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.wrap { max-width: 1240px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* brand bar — black, as in the brandbook's dark logo lockup */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--black); color: #FFFFFF; }
.top .wrap { display: flex; align-items: center; gap: 12px 20px; padding-block: 10px; flex-wrap: wrap; }
.brand { display: grid; justify-items: center; line-height: 1; margin-right: auto; text-decoration: none; color: inherit; }
.brand b { font-family: var(--f-display); font-weight: 400; font-size: 24px; letter-spacing: .01em; color: var(--brand); }
.brand span { font-weight: 700; font-size: 7.5px; letter-spacing: .32em; margin-top: 3px; padding-left: .32em; color: #FFFFFF; }
.brand-sub { font-weight: 700; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: #CFC8BE; border-left: 1px solid #3A3833; padding-left: 14px; margin-left: -6px; margin-right: auto; }
.brand-wrap { display: flex; align-items: center; gap: 20px; margin-right: auto; }
.nav { display: flex; gap: 2px; background: #1E1D1A; border-radius: 999px; padding: 3px; }
.nav button { border: 0; background: none; padding: 6px 14px; border-radius: 999px; cursor: pointer; font-weight: 700; color: #CFC8BE; }
.nav button:hover { color: #FFFFFF; }
.nav button[aria-current="page"] { background: var(--brand); color: var(--brand-ink); }
.top :focus-visible { outline-color: var(--brand); }
.brand.linkish:hover { text-decoration: none; }
body.in-app .brand-sub { display: none; }  /* signed in: the menu says where you are, and the header stays on one line */
.lang { display: flex; border: 1px solid #3A3833; border-radius: 999px; padding: 2px; }
.lang button { border: 0; background: none; color: #CFC8BE; font-weight: 700; font-size: 12px; letter-spacing: .06em; padding: 4px 9px; border-radius: 999px; cursor: pointer; }
.lang button:hover { color: #FFFFFF; }
.lang button[aria-pressed="true"] { background: #FFFFFF; color: #000000; }
@media (max-width: 1100px) { .brand-sub { display: none; } }

.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); padding: 7px 14px; border-radius: 999px; cursor: pointer; font-weight: 700; white-space: nowrap; }
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { filter: brightness(1.05); border-color: var(--brand); }
.btn.danger { color: var(--bad); }
.btn.ghost { border-color: transparent; background: none; }
.btn.small { padding: 4px 11px; font-size: 13px; }
.linkish { border: 0; background: none; padding: 0; cursor: pointer; color: inherit; text-align: left; font: inherit; }
.linkish:hover { text-decoration: underline; text-underline-offset: 3px; }

.banner { margin-top: 14px; padding: 10px 14px; border-radius: var(--r); background: var(--warn-soft); color: var(--ink); border: 1px solid var(--line); }
main { padding-block: 22px 60px; display: grid; gap: 22px; }

/* section heads */
.head { display: flex; align-items: end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.head h1 { font-family: var(--f-display); font-weight: 400; font-size: clamp(24px, 3.4vw, 32px); letter-spacing: .005em; line-height: 1.05; }
.eyebrow { font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 12px; cursor: pointer; font-weight: 700; font-size: 13px; color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* yellow brand band with the brandbook's wave pattern */
.hero { position: relative; overflow: hidden; background: var(--brand); color: var(--brand-ink); border-radius: 22px; padding: 22px 24px; display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.hero::after { content: ""; position: absolute; right: -10px; top: -10px; bottom: -10px; width: min(46%, 420px); pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='24' viewBox='0 0 48 24'%3E%3Cg fill='none' stroke='%23000' stroke-opacity='.13' stroke-width='1.6'%3E%3Cpath d='M0 24a24 24 0 0 1 48 0M6 24a18 18 0 0 1 36 0M12 24a12 12 0 0 1 24 0M18 24a6 6 0 0 1 12 0'/%3E%3Cpath d='M-24 12a24 24 0 0 1 48 0M-18 12a18 18 0 0 1 36 0M-12 12a12 12 0 0 1 24 0M24 12a24 24 0 0 1 48 0M30 12a18 18 0 0 1 36 0M36 12a12 12 0 0 1 24 0'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-image: linear-gradient(to left, #000 35%, transparent); mask-image: linear-gradient(to left, #000 35%, transparent); }
.hero > * { position: relative; z-index: 1; min-width: 0; }
.hero h1 { font-family: var(--f-display); font-weight: 400; font-size: clamp(28px, 4.4vw, 44px); line-height: 1; letter-spacing: .005em; }
.hero .eyebrow { color: rgba(0,0,0,.66); }
.hero .tag { font-weight: 700; font-size: 10px; letter-spacing: .3em; margin-top: 6px; }
.hero .chip { background: rgba(255,255,255,.55); border-color: transparent; color: #000; }
.hero .chip[aria-pressed="true"] { background: #000; color: var(--brand); }
.hero .chips { max-width: 100%; }

/* summary tiles */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 4px; min-width: 0; }
.tile .v { font-family: var(--f-display); font-weight: 400; font-size: 26px; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tile .s { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.tile .v.bad { color: var(--bad); }
.tile .v .cur { font-family: var(--f-body); font-weight: 700; margin-right: 2px; }
@media (max-width: 860px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* project list */
.plist { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.prow { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.6fr) minmax(0, 1.2fr) minmax(0, 1.4fr) 110px; gap: 16px; align-items: center; padding: 14px 16px 14px 22px; border-top: 1px solid var(--line); position: relative; cursor: pointer; }
.prow:first-child { border-top: 0; }
.prow:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.prow::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--open-fill); }
.prow.renovation::before { background: var(--reno-fill); }
.prow.hdr { cursor: default; padding-block: 9px; background: var(--surface-2); }
.prow.hdr::before { display: none; }
.prow.hdr:hover { background: var(--surface-2); }
.prow.hdr div { font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.pname { font-weight: 700; font-size: 15px; overflow-wrap: anywhere; }
.psub { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.cell { display: grid; gap: 5px; min-width: 0; }
.cell .lbl { display: none; }
@media (max-width: 900px) {
  .prow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 16px; }
  .prow > :first-child { grid-column: 1 / -1; }
  .prow.hdr { display: none; }
  .cell .lbl { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-weight: 700; }
}

.type { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--open-soft); color: var(--open); white-space: nowrap; }
.type.renovation { background: var(--reno-soft); color: var(--reno); }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; width: fit-content; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.hold, .pill.done { background: var(--hold-soft); color: var(--hold); }

.bar { height: 7px; border-radius: 99px; background: var(--surface-2); overflow: hidden; position: relative; }
.bar i { position: absolute; inset: 0 auto 0 0; background: var(--reno-fill); border-radius: 99px; }
.bar.opening i { background: var(--open-fill); }
.bar.renovation i { background: var(--reno-fill); }
.bar i.over { background: var(--bad); }
.bar i.paid { background: var(--ink); }
.meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); }
.meta b { color: var(--ink); font-weight: 700; }
.late { color: var(--bad) !important; font-weight: 700; }

/* stage stepper */
.steps { display: flex; gap: 3px; }
.steps i { flex: 1; height: 7px; border-radius: 3px; background: var(--surface-2); }
.steps i.on { background: var(--ink); }
.steps i.cur { background: var(--open-fill); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 25%, transparent); }
.renovation .steps i.cur { background: var(--reno-fill); }

.stepper { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.stepper button { border: 0; border-top: 5px solid var(--surface-2); background: none; padding: 8px 2px 0; text-align: left; cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
.stepper button.on { border-top-color: var(--ink); color: var(--ink); }
.stepper button.cur { border-top-color: var(--open-fill); color: var(--ink); }
.renovation .stepper button.cur { border-top-color: var(--reno-fill); }
.stepper button:disabled { cursor: default; }
.stepper small { display: block; font-weight: 700; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 640px) { .stepper { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 10px; } }

/* empty */
.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r); padding: 36px 20px; text-align: center; display: grid; gap: 10px; justify-items: center; color: var(--muted); }
.empty h2 { color: var(--ink); font-family: var(--f-display); font-weight: 400; font-size: 20px; }
.empty p { max-width: 52ch; margin: 0; }

/* detail */
.dhead { display: grid; gap: 14px; }
.dtitle { display: flex; justify-content: space-between; gap: 12px; align-items: start; flex-wrap: wrap; }
.dtitle h1 { font-family: var(--f-display); font-weight: 400; font-size: clamp(24px, 3.6vw, 36px); line-height: 1.05; overflow-wrap: anywhere; }
.facts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.facts > div { padding: 12px 14px; border-left: 1px solid var(--line); display: grid; gap: 3px; min-width: 0; }
.facts > div:first-child { border-left: 0; }
.facts .k { font-weight: 700; font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.facts .v { font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
@media (max-width: 860px) { .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); } .facts > div:nth-child(4) { border-left: 0; } .facts > div:nth-child(n+4) { border-top: 1px solid var(--line); } }
@media (max-width: 480px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .facts > div { border-left: 0 !important; border-top: 1px solid var(--line); } .facts > div:nth-child(-n+2) { border-top: 0; } .facts > div:nth-child(even) { border-left: 1px solid var(--line) !important; } }

.cols { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 960px) { .cols { grid-template-columns: minmax(0, 1fr); } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); min-width: 0; }
.panel > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel > header h2 { font-family: var(--f-display); font-weight: 400; font-size: 16px; letter-spacing: .01em; }
.panel .body { padding: 6px 16px 14px; }
.stack { display: grid; gap: 20px; min-width: 0; }

.phase { padding-top: 12px; }
.phase h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.phase h3 .num { font-size: 12px; letter-spacing: 0; }
.task { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 8px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.task:last-child { border-bottom: 0; }
.task input[type="checkbox"] { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--brand); cursor: pointer; }
.task .t { min-width: 0; display: grid; gap: 2px; }
.task .t .linkish { font-weight: 500; overflow-wrap: anywhere; }
.task.done .t .linkish { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.task .sub { font-size: 12.5px; color: var(--muted); display: flex; gap: 4px 10px; flex-wrap: wrap; }
.task .right { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: end; }
.due { font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.st { font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.st.doing { background: var(--open-soft); color: var(--open); }
.st.blocked { background: var(--bad-soft); color: var(--bad); }

/* budget */
.money-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 12px 0; }
.money-sum div { display: grid; gap: 2px; min-width: 0; }
.money-sum .k { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.money-sum .v { font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cat { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 7px 0; font-size: 13px; }
.cat .bar { grid-column: 1 / -1; height: 5px; }
.cat .bar i { background: var(--reno-fill); }
.costs { width: 100%; border-collapse: collapse; font-size: 13px; }
.costs td { padding: 7px 4px; border-top: 1px solid var(--line); vertical-align: top; }
.costs td:last-child { text-align: right; white-space: nowrap; }
.costs .cs { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.cs.quoted { color: var(--muted); } .cs.committed { color: var(--warn); } .cs.paid { color: var(--ok); }
.tbl-scroll { overflow-x: auto; }

/* site log */
.log { display: grid; gap: 0; }
.log article { padding: 10px 0; border-top: 1px solid var(--line); display: grid; gap: 3px; }
.log article:first-child { border-top: 0; }
.log time { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.log p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.log .x { justify-self: end; }
.note-form { display: grid; gap: 8px; padding: 12px 0 6px; }
textarea, input[type="text"], input[type="number"], input[type="date"], select { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 10px; min-width: 0; }
textarea { resize: vertical; min-height: 64px; }

/* tasks view */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toolbar select { width: auto; max-width: 100%; }
.group h2 { font-family: var(--f-display); font-weight: 400; font-size: 16px; display: flex; gap: 8px; align-items: baseline; margin-bottom: 6px; }
.group h2 .num { font-family: var(--f-body); font-size: 12px; color: var(--muted); font-weight: 700; }
.group.overdue h2 { color: var(--bad); }
.group .panel .body { padding-top: 2px; }
.projtag { font-weight: 700; color: var(--ink); }

/* timeline */
.gantt-scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.gantt { min-width: 760px; position: relative; }
.gantt { --gname: 220px; }
.g-head, .g-row { display: grid; grid-template-columns: var(--gname) minmax(0, 1fr); }
.g-head { border-bottom: 1px solid var(--line); }
.g-head .lane { position: relative; height: 34px; }
.g-month { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--line); padding: 10px 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; }
.g-row { border-top: 1px solid var(--line); cursor: pointer; }
.g-row:first-of-type { border-top: 0; }
.g-row:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.g-name { padding: 10px 14px; display: grid; gap: 1px; min-width: 0; border-right: 1px solid var(--line); }
.g-name b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-name span { font-size: 12px; color: var(--muted); }
.g-row .lane { position: relative; min-height: 50px; }
.g-grid { position: absolute; top: 0; bottom: 0; border-left: 1px solid color-mix(in srgb, var(--line) 55%, transparent); }
.g-bar { position: absolute; top: 14px; height: 22px; border-radius: 999px; background: var(--open-soft); border: 1.5px solid var(--open-fill); overflow: hidden; min-width: 4px; }
.g-bar.renovation { background: var(--reno-soft); border-color: var(--reno-fill); }
.g-bar i { position: absolute; inset: 0 auto 0 0; background: var(--open-fill); }
.g-bar.renovation i { background: var(--reno-fill); }
.g-bar span { position: relative; font-size: 11px; font-weight: 700; padding: 0 8px; line-height: 19px; color: var(--ink); white-space: nowrap; }
.g-bar:not(.renovation) span { color: #000; }
.g-today { position: absolute; top: 0; bottom: 0; width: 0; left: calc(var(--gname) + (100% - var(--gname)) * var(--today, 0)); border-left: 2px dashed var(--bad); z-index: 2; pointer-events: none; }
.g-today span { position: absolute; top: 2px; left: 4px; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--bad); background: var(--surface); padding: 0 3px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.legend i { display: inline-block; width: 14px; height: 10px; border-radius: 99px; margin-right: 5px; vertical-align: -1px; }

/* modal */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.5); display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.modal { background: var(--surface); border-radius: 20px; box-shadow: var(--shadow); width: min(560px, 100%); max-height: 100%; overflow: auto; }
.modal header { padding: 18px 18px 6px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.modal header h2 { font-family: var(--f-display); font-weight: 400; font-size: 20px; }
.modal form { padding: 8px 18px 18px; display: grid; gap: 12px; }
.field { display: grid; gap: 4px; min-width: 0; }
.field > span { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
@media (max-width: 480px) { .row2 { grid-template-columns: minmax(0, 1fr); } }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg label { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; display: grid; gap: 2px; position: relative; }
.seg label:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.seg label:first-child:has(input:checked) { background: var(--open-soft); }
.seg label:last-child:has(input:checked) { background: var(--reno-soft); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg b { font-size: 14px; }
.seg small { color: var(--muted); font-size: 12px; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 700; }
.check input { accent-color: var(--brand); }
.actions { display: flex; gap: 8px; justify-content: space-between; flex-wrap: wrap; padding-top: 4px; }
.actions .r { display: flex; gap: 8px; margin-left: auto; }
.hint { font-size: 12.5px; color: var(--muted); margin: 0; }

.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--black); color: var(--brand); padding: 9px 18px; border-radius: 999px; font-weight: 700; z-index: 60; max-width: calc(100% - 32px); box-shadow: var(--shadow); }
.ro-note { font-size: 12.5px; color: var(--muted); }

/* project tabs */
.ptabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; margin-top: -4px; }
.ptabs button { border: 0; background: none; padding: 10px 14px; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; cursor: pointer; }
.ptabs button:hover { color: var(--ink); }
.ptabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--brand); }
.ptabs .n { font-weight: 500; font-size: 12px; margin-left: 6px; color: var(--muted); font-variant-numeric: tabular-nums; }
.panel > header .hint { margin-top: 2px; max-width: 60ch; }

/* forecast + comparison tables */
.ftable { width: 100%; border-collapse: collapse; font-size: 13px; }
.ftable th { text-align: left; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding: 10px 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ftable td { padding: 8px 6px; border-top: 1px solid var(--line); vertical-align: top; }
.ftable .r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ftable tr.grp td { background: var(--surface-2); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding-block: 6px; }
.ftable tfoot td { font-weight: 700; border-top: 1px solid var(--line); }
.ftable tfoot tr.tot td { font-size: 15px; border-top: 2px solid var(--ink); }
.ftable.cmp td:first-child { min-width: 150px; }
.zero { color: var(--warn); font-size: 12px; font-weight: 700; }
.row3 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 12px; }
@media (max-width: 480px) { .row3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .row3 > :last-child { grid-column: 1 / -1; } }
.linetotal { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 12px; border-radius: 10px; background: var(--open-soft); }
.linetotal b { font-size: 18px; font-variant-numeric: tabular-nums; }

/* files */
.drop { border: 2px dashed var(--line); border-radius: var(--r); padding: 20px 16px; display: grid; gap: 6px; justify-items: center; text-align: center; color: var(--ink); background: var(--bg); cursor: pointer; }
.drop:hover, .drop.over { border-color: var(--brand); background: var(--open-soft); }
.drop .hint { max-width: 70ch; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(170px, 100%), 1fr)); gap: 12px; }
.fcard { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; cursor: pointer; display: grid; text-align: left; padding: 0; min-width: 0; }
.fcard:hover { border-color: var(--ink); }
.fcard .thumb { aspect-ratio: 4 / 3; max-width: 100%; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; position: relative; }
.fcard .thumb img, .fcard .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.fcard .meta2 { padding: 8px 10px 10px; display: grid; gap: 2px; min-width: 0; }
.fcard .nm { font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fcard .sm { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ext { font-family: var(--f-display); font-weight: 900; font-synthesis: none; font-size: 20px; padding: 10px 14px; border-radius: 10px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.ext.dwg, .ext.dxf { background: var(--reno-fill); color: #000; border-color: transparent; }
.ext.pdf { background: var(--bad); color: #fff; border-color: transparent; }
.ext.xlsx, .ext.xls, .ext.csv { background: var(--ok); color: #fff; border-color: transparent; }
.ext.docx, .ext.doc { background: #2B5797; color: #fff; border-color: transparent; }
.ext.link { background: var(--brand); color: #000; border-color: transparent; }
.badge { position: absolute; top: 8px; left: 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: #000; color: #fff; padding: 2px 7px; border-radius: 999px; }
.play { position: absolute; width: 38px; height: 38px; border-radius: 50%; background: rgba(0,0,0,.65); color: #fff; display: grid; place-items: center; font-size: 14px; }
.modal.wide { width: min(980px, 100%); }
.lb-media { background: #000; display: grid; place-items: center; margin: 4px 18px 0; border-radius: 12px; overflow: hidden; }
.lb-media img, .lb-media video { max-width: 100%; max-height: 66vh; display: block; }
.lb-icon { display: grid; justify-items: center; gap: 12px; padding: 28px 18px; margin: 4px 18px 0; border-radius: 12px; background: var(--surface-2); text-align: center; }
.lb-icon .ext { font-size: 28px; padding: 14px 20px; }

/* Display type: Bowlby One SC for Latin; Georgian glyphs fall back to heavy Noto Sans Georgian.
   font-synthesis: none keeps Bowlby from being faux-bolded while Georgian gets the 900 weight. */
.head h1, .hero h1, .tile .v, .empty h2, .dtitle h1, .panel > header h2, .group h2, .modal header h2 { font-weight: 900; font-synthesis: none; }
/* Georgian headings in Mtavruli capitals, as in the brandbook */
:root[lang="ka"] .hero h1, :root[lang="ka"] .head h1, :root[lang="ka"] .panel > header h2, :root[lang="ka"] .group h2, :root[lang="ka"] .modal header h2, :root[lang="ka"] .empty h2 { text-transform: uppercase; letter-spacing: .01em; }
:root[lang="ka"] .eyebrow, :root[lang="ka"] .facts .k, :root[lang="ka"] .prow.hdr div, :root[lang="ka"] .phase h3, :root[lang="ka"] .cell .lbl { letter-spacing: .06em; }
:root[lang="ka"] .hero .tag { letter-spacing: .12em; text-transform: uppercase; }

@media (prefers-reduced-motion: no-preference) {
  .bar i, .g-bar i { transition: width .3s ease; }
}

/* project works timeline */
.plan .gantt { min-width: 820px; }
.plan .g-row { min-height: 42px; }
.plan .g-row .lane { min-height: 42px; }
.g-task { cursor: pointer; }
.g-task:hover, .g-task:focus-visible { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.g-task .g-name { padding: 7px 12px; }
.g-task .g-name b { font-size: 13px; font-weight: 600; }
.g-task .g-name span { font-size: 11.5px; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-phase { background: var(--surface-2); cursor: default; }
.g-phase:hover { background: var(--surface-2); }
.g-phase .g-name { padding: 6px 12px; grid-auto-flow: column; justify-content: space-between; align-items: center; }
.g-phase .g-name b { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.g-phase .g-row .lane, .plan .g-phase .lane { min-height: 30px; }
.plan .g-phase { min-height: 30px; }
.g-span { position: absolute; top: 12px; height: 6px; border-radius: 99px; background: color-mix(in srgb, var(--muted) 35%, transparent); }
.g-bar2 { position: absolute; top: 12px; height: 18px; border-radius: 999px; border: 1.5px solid color-mix(in srgb, var(--muted) 70%, transparent); background: var(--surface); overflow: hidden; min-width: 6px; }
.g-bar2 i { position: absolute; inset: 0 auto 0 0; }
.g-bar2.st-todo i { background: color-mix(in srgb, var(--muted) 45%, transparent); }
.g-bar2.st-doing { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 18%, var(--surface)); }
.g-bar2.st-doing i { background: var(--brand); }
.g-bar2.st-done { border-color: var(--ok); background: var(--ok); }
.g-bar2.st-done i { background: var(--ok); }
.g-bar2.st-blocked { border-color: var(--bad); background: var(--bad-soft); }
.g-bar2.st-blocked i { background: var(--bad); }
.g-bar2.behind { border-color: var(--warn); box-shadow: 0 0 0 2px var(--warn-soft); }
.g-bar2.late { border-color: var(--bad); box-shadow: 0 0 0 2px var(--bad-soft); }
.g-ms { position: absolute; top: 14px; width: 13px; height: 13px; transform: translateX(-50%) rotate(45deg); border-radius: 2px; background: var(--surface); border: 2px solid color-mix(in srgb, var(--muted) 80%, transparent); }
.g-ms.st-doing { border-color: var(--brand); background: var(--brand); }
.g-ms.st-done { border-color: var(--ok); background: var(--ok); }
.g-ms.st-blocked, .g-ms.late { border-color: var(--bad); background: var(--bad-soft); }
.g-mark { position: absolute; top: 4px; bottom: 4px; width: 0; border-left: 2px solid color-mix(in srgb, var(--ink) 45%, transparent); }
.g-mark.target { border-left-color: var(--ink); }
.plan-kpis .pill { flex: none; }
.legend i.lg { width: 18px; height: 10px; border-radius: 99px; border: 1.5px solid color-mix(in srgb, var(--muted) 70%, transparent); background: var(--surface); }
.legend i.lg.st-done { background: var(--ok); border-color: var(--ok); }
.legend i.lg.st-doing { background: linear-gradient(90deg, var(--brand) 55%, color-mix(in srgb, var(--brand) 18%, var(--surface)) 55%); border-color: var(--brand); }
.legend i.lg.late { border-color: var(--bad); box-shadow: 0 0 0 2px var(--bad-soft); }
.legend i.lg.behind { border-color: var(--warn); box-shadow: 0 0 0 2px var(--warn-soft); }
.legend i.lg.ms { width: 10px; height: 10px; border-radius: 2px; transform: rotate(45deg); }
.legend i.lg.mk { width: 0; height: 12px; border-radius: 0; border: 0; border-left: 2px solid var(--ink); }
/* progress in the checklist row */
.tprog { display: inline-block; width: 44px; height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; position: relative; vertical-align: middle; }
.tprog i { position: absolute; inset: 0 auto 0 0; background: var(--brand); }
.plan .g-today span { top: 40px; }
/* keep the name column in view while the chart scrolls sideways (both timelines) */
.g-name { position: sticky; left: 0; z-index: 3; background: var(--surface); }
.g-phase .g-name { background: var(--surface-2); }
.g-row:hover .g-name, .g-task:focus-visible .g-name { background: color-mix(in srgb, var(--surface-2) 70%, var(--surface)); }
.g-phase:hover .g-name { background: var(--surface-2); }
input[type="range"] { width: 100%; accent-color: var(--brand); padding: 0; border: 0; background: none; min-height: 32px; }

/* guided tour */
.tour { position: fixed; inset: 0; z-index: 80; }
.tour-hole { position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .64); outline: 2px solid var(--brand); outline-offset: 0; pointer-events: none; }
.tour-hole.none { outline: 0; }
.tour-card { position: fixed; width: min(360px, calc(100vw - 24px)); background: var(--surface); color: var(--ink); border-radius: 18px; padding: 14px 16px 16px; box-shadow: 0 12px 40px rgba(0, 0, 0, .35); display: grid; gap: 8px; }
.tour-card h3 { font-family: var(--f-display); font-weight: 900; font-synthesis: none; font-size: 19px; line-height: 1.15; }
:root[lang="ka"] .tour-card h3 { text-transform: uppercase; letter-spacing: .01em; }
.tour-card p { margin: 0; color: var(--muted); line-height: 1.5; }
.tour-top { display: flex; justify-content: space-between; align-items: center; }
.tour-count { font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--muted); font-variant-numeric: tabular-nums; }
.tour-skip { font-size: 13px; color: var(--muted); }
.tour-dots { display: flex; gap: 4px; }
.tour-dots i { flex: 1; height: 4px; border-radius: 4px; background: var(--surface-2); }
.tour-dots i.on { background: var(--brand); }
.tour-actions { display: flex; justify-content: space-between; gap: 8px; padding-top: 4px; }
.tour-actions .btn { min-width: 96px; justify-content: center; }
@media (prefers-reduced-motion: reduce) { .tour-hole, .tour-card { transition: none; } }

/* ─────────────────────────────────────────────────────────────
   Phones and small tablets. Most employees use the app on a phone:
   bottom tab bar, compact header, full-screen sheets, bigger tap targets.
   ───────────────────────────────────────────────────────────── */
.tabbar, .fab, .m-only { display: none; }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.upl-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.upl-btns .btn { cursor: pointer; }
.drop { cursor: default; }

@media (max-width: 820px) {
  :root { --tabbar-h: 62px; }
  body.in-app { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); }

  /* compact header: logo, language, avatar */
  .top .wrap { flex-wrap: nowrap; gap: 10px; padding-block: 8px; }
  .top .nav, #newProjectBtn { display: none !important; }
  .brand b { font-size: 20px; }
  .brand span { font-size: 6.5px; }
  .who-btn { padding: 3px; }
  .who-btn .nm { display: none; }
  .who-btn .av { width: 30px; height: 30px; font-size: 12.5px; }
  .lang button { padding: 5px 9px; }

  /* bottom tab bar */
  .tabbar:not([hidden]) { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--black); border-top: 1px solid #2A2824; padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)); }
  .tabbar button { border: 0; background: none; color: #A39A8F; display: grid; justify-items: center; gap: 3px; padding: 4px 2px; min-height: 50px; font-weight: 700; font-size: 11px; cursor: pointer; border-radius: 12px; -webkit-tap-highlight-color: transparent; }
  .tabbar button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar button[aria-current="page"] { color: var(--brand); }
  .tabbar button[aria-current="page"] svg { stroke-width: 2.2; }

  /* floating "new project" button */
  .fab:not([hidden]) { display: grid; place-items: center; position: fixed; z-index: 31; width: 56px; height: 56px; border-radius: 18px; border: 0; cursor: pointer;
    right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom, 0px));
    background: var(--brand); color: #000; box-shadow: 0 6px 18px rgba(0,0,0,.28); }
  .fab svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }

  .toast { bottom: calc(var(--tabbar-h) + 14px + env(safe-area-inset-bottom, 0px)); }

  main { padding-block: 14px 28px; gap: 16px; }
  .hero { padding: 18px 16px; border-radius: 18px; }
  .hero::after { width: 60%; opacity: .6; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -2px; padding: 2px; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; padding: 7px 13px; }
  .tiles { gap: 10px; }
  .tile { padding: 12px; }
  .tile .v { font-size: 22px; }
  .tile .s { font-size: 12px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .hero h1 { font-size: 26px; }
  .hero .tag { display: none; }

  /* project list: one tidy card per project */
  .prow { padding: 14px 14px 14px 18px; }
  .prow .cell .meta { font-size: 12px; }

  /* project page */
  .dhead { gap: 12px; }
  .dtitle { flex-direction: column; align-items: stretch; }
  .dtitle .btn { align-self: flex-start; }
  .ptabs { position: sticky; top: calc(52px + env(safe-area-inset-top, 0px)); z-index: 15; background: var(--bg); margin-inline: -16px; padding-inline: 10px; scrollbar-width: none; }
  .ptabs::-webkit-scrollbar { display: none; }
  .ptabs button { padding: 12px 12px; flex: 1 0 auto; }
  .panel > header { padding: 12px 14px; }
  .panel .body { padding: 4px 14px 12px; }

  /* checklist: bigger tap targets */
  .task { grid-template-columns: 28px minmax(0, 1fr); gap: 4px 10px; padding: 11px 0; }
  .task input[type="checkbox"] { width: 22px; height: 22px; margin-top: 0; }
  .task .t .linkish { font-size: 15px; line-height: 1.35; }
  .task .right { grid-column: 2; justify-content: flex-start; }
  .phase .btn.ghost.small { padding: 8px 0; }

  /* budget */
  .d-only { display: none; }
  .m-only { display: block; }
  .ftable { font-size: 13.5px; }
  .ftable td { padding: 9px 4px; }
  .ftable.cmp th:nth-child(4), .ftable.cmp td:nth-child(4) { display: none; }  /* "paid" column: shown in the tiles above */
  /* forecast lines as a simple two-column list: item on the left, total on the right */
  .ftable:not(.cmp), .ftable:not(.cmp) tbody, .ftable:not(.cmp) tfoot { display: block; }
  .ftable:not(.cmp) thead { display: none; }
  .ftable:not(.cmp) tr { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); }
  .ftable:not(.cmp) td { border-top: 0; }
  .ftable:not(.cmp) td:first-child { flex: 1; min-width: 0; }
  .ftable:not(.cmp) tr.grp { padding-inline: 6px; background: var(--surface-2); }
  .ftable:not(.cmp) tr.grp td { background: none; }
  .ftable:not(.cmp) tfoot tr.tot { border-top: 2px solid var(--ink); }
  .ftable:not(.cmp) tfoot tr.tot td { border-top: 0; }
  /* category comparison: tighter columns */
  .ftable.cmp th, .ftable.cmp td { padding-inline: 4px; }
  .ftable.cmp td:first-child { min-width: 110px; }

  /* files */
  .fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .desk-only { display: none; }
  .drop { padding: 16px 12px; }
  .upl-btns { width: 100%; }
  .upl-btns .btn { flex: 1 1 140px; justify-content: center; padding-block: 12px; }

  /* tasks view filters */
  .toolbar { width: 100%; }
  .toolbar select { flex: 1 1 140px; }

  /* timeline: narrower name column */
  .gantt { --gname: 130px; }
  .plan .gantt { min-width: 720px; --gname: 150px; }
  .g-task .g-name { padding: 6px 8px; }
  .g-name { padding: 10px; }
  .gantt { min-width: 640px; }

  /* team: one card per person */
  .team-table thead { display: none; }
  .team-table, .team-table tbody, .team-table tr, .team-table td { display: block; }
  .team-table tr { padding: 12px 0; border-top: 1px solid var(--line); position: relative; }
  .team-table tr:first-child { border-top: 0; }
  .team-table td { border: 0; padding: 2px 0; }
  .team-table td[data-label]::before { content: attr(data-label) " · "; color: var(--muted); font-size: 12px; }
  .team-table .t-name { font-size: 15px; padding-right: 110px; }
  .team-table .actions-cell { position: absolute; right: 0; top: 12px; }
  .head { align-items: stretch; }
  .head > .btn { align-self: flex-start; }

  /* site log */
  .note-form textarea { min-height: 90px; }

  /* every text field at 16px so iPhones don't zoom in while typing */
  input, select, textarea { font-size: 16px; }
  .btn { min-height: 40px; }
  .btn.small { min-height: 36px; }
}

/* forms open as full-height sheets on phones */
@media (max-width: 640px) {
  .overlay { padding: 0; align-items: end; place-items: end stretch; }
  .modal, .modal.wide { width: 100%; max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px)); border-radius: 20px 20px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .modal header { position: sticky; top: 0; z-index: 2; background: var(--surface); padding: 14px 16px 8px; border-bottom: 1px solid var(--line); }
  .modal header::before { content: ""; position: absolute; left: 50%; top: 6px; width: 38px; height: 4px; border-radius: 4px; background: var(--line); transform: translateX(-50%); }
  .modal form { padding: 12px 16px 16px; }
  .modal .actions { position: sticky; bottom: 0; background: var(--surface); padding: 10px 0 calc(4px + env(safe-area-inset-bottom, 0px)); margin-bottom: -16px; border-top: 1px solid var(--line); }
  .modal .actions .r { flex: 1; }
  .modal .actions .r .btn { flex: 1; justify-content: center; }
  .lb-media, .lb-icon { margin: 8px 12px 0; }
  .lb-media img, .lb-media video { max-height: 52vh; }
  .seg { grid-template-columns: 1fr 1fr; }
  .login .band b { font-size: 32px; }
}
