/* Fonts served by Relevé itself (SIL Open Font License, see static/fonts): no call to Google from users' browsers */
@font-face { font-family: "Bricolage Grotesque"; src: url("/static/fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2");
             font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: Geist; src: url("/static/fonts/Geist-Variable.woff2") format("woff2");
             font-weight: 100 900; font-style: normal; font-display: swap; }
/* Relevé — tokens from the approved design (Construction Back Office App, V2) */
:root {
  --bg: #F7F7F4; --card: #FFFFFF; --ink: #0E1116; --ink2: #4B515A; --muted: #6B717A;
  --line: #E6E6E0; --line2: #EFEFEA; --hover: #F0F0EB; --seg: #EDEDE8; --soft: #FAFAF8;
  --teal: #0F766E; --teal-ink: #0B5A54; --teal-bg: #E3F1EF; --mint: #2DD4BF;
  --amber: #B45309; --amber-ink: #8A4108; --amber-deep: #7C3A06; --amber-bg: #FDF1E3; --amber-track: #F2E3D0;
  --display: "Bricolage Grotesque", system-ui, sans-serif; --body: Geist, system-ui, sans-serif;
  --r-card: 24px; --r-row: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
a { color: var(--ink); } a:hover { color: var(--teal); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 2px; border-radius: 6px; }
.num, .money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted { color: var(--muted); } .ink2 { color: var(--ink2); } .small { font-size: 13px; } .tiny { font-size: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* shell */
.shell { display: flex; min-height: 100vh; }
.side { width: 248px; flex: none; background: var(--card); border-right: 1px solid var(--line); padding: 24px 16px;
        display: flex; flex-direction: column; gap: 28px; position: sticky; top: 0; height: 100vh; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 0 10px; }
.logo .bars { display: flex; flex-direction: column; gap: 3px; }
.logo .bars i { display: block; height: 4px; border-radius: 2px; background: var(--teal); width: 18px; }
.logo .bars i + i { width: 12px; opacity: .55; }
.logo b { font: 700 20px/1 var(--display); letter-spacing: -.03em; }
.nav { display: flex; flex-direction: column; gap: 2px; font-size: 14px; font-weight: 500; }
.nav a { text-decoration: none; color: var(--ink2); border-radius: 10px; padding: 0 12px; min-height: 42px;
         display: flex; align-items: center; gap: 12px; }
.nav a:hover { background: var(--hover); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--hover); color: var(--ink); }
.nav a .grow { flex: 1; }
.badge { font-size: 12px; font-weight: 600; color: var(--teal-ink); background: var(--teal-bg); border-radius: 999px; padding: 1px 8px; }
.badge.amber { color: var(--amber-ink); background: var(--amber-bg); }
.me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 10px 0; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.3; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--teal); color: #fff; font-size: 13px; font-weight: 600;
          display: flex; align-items: center; justify-content: center; flex: none; }
.me a { color: var(--muted); font-size: 12px; }
.main { flex: 1; min-width: 0; padding: 40px 48px 64px; max-width: 1280px; }
.crumbs { font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }
h1 { margin: 4px 0 0; font: 700 40px/1.05 var(--display); letter-spacing: -.035em; }
h2 { margin: 0; font: 600 22px/1.2 var(--display); letter-spacing: -.02em; }
h3 { margin: 0; font-size: 15px; font-weight: 600; }
.lede { margin: 8px 0 0; color: var(--ink2); }

/* blocks */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); }
.pad { padding: 24px; } .padx { padding: 8px 24px 16px; }
.cols { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; margin-top: 20px; }
.col-main { flex: 2 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.col-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 16px 0 8px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 12px; align-items: center; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }

.flash { margin-top: 20px; border-radius: var(--r-row); padding: 14px 18px; font-weight: 500; background: var(--teal-bg); color: var(--teal-ink); }
.flash.amber { background: var(--amber-bg); color: var(--amber-ink); }

/* summary */
.summary { margin-top: 12px; padding: 32px; display: flex; flex-wrap: wrap; gap: 36px; align-items: flex-end; border-radius: 28px; }
.summary .title { flex: 1 1 260px; min-width: 0; }
.summary h1 { font-size: 44px; letter-spacing: -.04em; line-height: 1; }
.kpis { flex: 2 1 460px; min-width: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 20px; }
.kpis dt { font-size: 13px; color: var(--muted); }
.kpis dd { margin: 2px 0 0; font: 600 28px/1.15 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.kpis dd.amber, .amber-text { color: var(--amber); } .teal-text { color: var(--teal-ink); }
.kpis dd small { display: block; font: 500 13px/1.4 var(--body); letter-spacing: 0; }
.stackbars { display: flex; flex-direction: column-reverse; gap: 4px; flex: none; }
.stackbars i { width: 72px; height: 14px; border-radius: 3px; background: var(--line); display: block; }
.stackbars i.on { background: var(--teal); } .stackbars i.over { background: var(--amber); }

/* segmented + search */
.toolbar { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.seg { display: inline-flex; gap: 4px; background: var(--seg); border-radius: 999px; padding: 4px; font-size: 14px; font-weight: 500; }
.seg a { text-decoration: none; color: var(--ink2); border-radius: 999px; padding: 0 18px; min-height: 40px; display: inline-flex; align-items: center; }
.seg a[aria-current="page"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(14,17,22,.08); }
.search { flex: 1 1 260px; display: flex; gap: 8px; }
.search input { flex: 1; min-width: 0; height: 48px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); padding: 0 20px; }

/* budget lines */
.division { margin-top: 8px; }
.division-head { display: flex; justify-content: space-between; gap: 12px; padding: 18px 0 6px; font-size: 13px; color: var(--muted);
                 font-weight: 600; letter-spacing: .02em; text-transform: uppercase; border-bottom: 1px solid var(--line2); }
.lines { list-style: none; margin: 0; padding: 0; font-variant-numeric: tabular-nums; }
.lines li { border-bottom: 1px solid var(--line2); }
.lines li:last-child { border-bottom: 0; }
.line { display: block; padding: 14px 0; text-decoration: none; color: inherit; }
.line:hover { color: inherit; }
.line:hover .lbl { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.line .top { display: flex; justify-content: space-between; gap: 12px; }
.line .code { color: var(--muted); margin-right: 6px; }
.line .of { color: var(--muted); font-weight: 400; }
.bar { margin-top: 8px; height: 6px; background: var(--line2); border-radius: 3px; position: relative; overflow: hidden; display: flex; }
.bar i { display: block; height: 100%; background: var(--ink); }
.bar i.pending { background: repeating-linear-gradient(135deg, #9AA0A8 0 4px, #C9CDD2 4px 8px); }
.line .note { margin-top: 6px; font-size: 13px; color: var(--muted); }
.lines li.over { margin: 4px -12px; padding: 0 12px; background: var(--amber-bg); border-radius: 18px; border-bottom: 0; }
.lines li.over .code { color: var(--amber-ink); }
.lines li.over .bar { background: var(--amber-track); height: 8px; }
.lines li.over .bar i { background: var(--amber); }
.lines li.over .note { color: var(--amber-deep); }
.nobudget { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--hover); border-radius: 999px; padding: 1px 8px; margin-left: 6px; }

/* invoice rows */
.list { list-style: none; margin: 0; padding: 0; }
.inv { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 6px 18px; align-items: center; padding: 14px 16px;
       border-radius: var(--r-row); text-decoration: none; color: inherit; }
a.inv:hover { background: var(--soft); color: inherit; }
.inv .date { font-size: 13px; color: var(--muted); }
.inv .who { font-weight: 600; font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.inv .who span { font-weight: 400; color: var(--muted); }
.inv .meta { font-size: 12px; color: var(--muted); grid-column: 2; overflow-wrap: anywhere; }
.inv .amt { text-align: right; font-weight: 500; }
.inv .amt small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.inv.pending .amt { color: var(--ink2); }
.inv .links { grid-column: 2 / 4; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; }
.inv .links a { color: var(--teal); text-decoration: none; font-weight: 500; }
.crossing { display: flex; align-items: center; gap: 10px; margin: 6px 16px; font-size: 13px; font-weight: 600; color: var(--amber-ink); }
.crossing::before, .crossing::after { content: ""; flex: 1; border-top: 2px dashed var(--amber); }
.running { font-size: 12px; color: var(--muted); }

.chip { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.chip.teal { color: var(--teal-ink); background: var(--teal-bg); }
.chip.amber { color: var(--amber-ink); background: var(--amber-bg); }
.chip.ink { color: var(--ink); background: var(--hover); }
.chip.muted { color: var(--muted); background: var(--hover); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); flex: none; display: inline-block; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 999px;
       border: 1px solid var(--line); background: var(--card); color: var(--ink); font-weight: 500; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--hover); color: var(--ink); }
.btn.primary { background: var(--teal); border-color: var(--teal); color: #fff; font-weight: 600; }
.btn.primary:hover { background: var(--teal-ink); color: #fff; }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.dark:hover { color: #fff; background: #23272E; }
.btn.small { height: 40px; padding: 0 16px; font-size: 14px; }
.btn.block { width: 100%; }
.btn.warn { color: var(--amber-ink); border-color: #EBCFAE; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--teal); font-weight: 500; cursor: pointer; }

/* queue */
.pick { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: var(--r-row); cursor: pointer; }
.pick:hover { background: var(--soft); }
.pick input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--teal); margin: 0; flex: none; }
.pick .txt { flex: 1; min-width: 0; }
.pick .txt b { display: block; font-size: 14px; }
.pick .txt b span { font-weight: 400; color: var(--muted); }
.pick .txt small { display: block; font-size: 12px; color: var(--muted); }
.sendbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 16px 24px;
           border-top: 1px solid var(--line2); background: var(--soft); border-radius: 0 0 var(--r-card) var(--r-card); }
.quote { margin: 14px 0 0; padding: 12px 14px; background: var(--bg); border-radius: 14px; font-size: 14px; }
.quote small { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
.flagbox { background: var(--amber-bg); border-radius: 20px; padding: 16px 18px; }
.flagbox b { color: var(--amber-deep); display: block; }
.flagbox p { margin: 4px 0 0; font-size: 14px; color: var(--ink2); }
.flagbox.info { background: var(--hover); } .flagbox.info b { color: var(--ink); }
.flagbox.ok { background: var(--teal-bg); } .flagbox.ok b { color: var(--teal-ink); }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .lbl-sm { font-size: 13px; color: var(--muted); }
.field input, .field select, .field textarea, .input { height: 46px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; background: var(--card); width: 100%; }
.field textarea { height: auto; min-height: 84px; padding: 12px 14px; resize: vertical; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px 16px; }
.split { display: flex; flex-wrap: wrap; gap: 10px; }
.split label { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 6px 10px 6px 12px; }
.split input[type=number] { width: 84px; height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; text-align: right; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--teal); }
details.more > summary { cursor: pointer; color: var(--teal); font-weight: 500; font-size: 14px; list-style: none; min-height: 44px; display: flex; align-items: center; }
details.more > summary::-webkit-details-marker { display: none; }

/* document viewer */
.viewer { width: 100%; height: 72vh; min-height: 520px; border: 1px solid var(--line); border-radius: 18px; background: var(--soft); }
.dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 14px 18px; font-size: 14px; }
.dl dt { font-size: 12px; color: var(--muted); } .dl dd { margin: 0; font-weight: 500; }
.timeline { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.timeline li { padding: 8px 0; border-bottom: 1px solid var(--line2); display: flex; gap: 12px; }
.timeline li span:first-child { color: var(--muted); white-space: nowrap; width: 112px; flex: none; }

/* dark holdback panel (from the design) */
.darkpanel { border-radius: var(--r-card); padding: 24px; color: #fff; background-color: var(--ink);
             background-image: linear-gradient(rgba(45,212,191,.09) 1px, transparent 1px), linear-gradient(90deg, rgba(45,212,191,.09) 1px, transparent 1px);
             background-size: 24px 24px; }
.darkpanel h2 { font: 500 14px var(--body); color: #A9AEB6; letter-spacing: 0; }
.darkpanel .big { margin-top: 6px; font: 700 36px/1.1 var(--display); letter-spacing: -.04em; color: var(--mint); font-variant-numeric: tabular-nums; }
.darkpanel p { margin: 8px 0 0; font-size: 14px; color: #A9AEB6; }

/* tables (payments) */
.table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 500; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 14px 12px; border-bottom: 1px solid var(--line2); vertical-align: top; }
.table td.r, .table th.r { text-align: right; }
.table tfoot td { font-weight: 600; border-bottom: 0; }
.scroll-x { overflow-x: auto; }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.checks li { display: flex; gap: 12px; align-items: center; }
.tick { width: 24px; height: 24px; border-radius: 50%; background: var(--teal-bg); color: var(--teal-ink); display: flex; align-items: center; justify-content: center; flex: none; font-size: 13px; font-weight: 700; }
.tick.warn { background: var(--amber-bg); color: var(--amber-ink); }

/* approver */
.signwrap { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; margin-top: 20px; align-items: start; }
.signlist a { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; text-decoration: none; color: inherit; }
.signlist a[aria-current="true"] { background: var(--hover); }
.signcard { padding: 28px; border-radius: 28px; display: flex; flex-direction: column; gap: 18px; }
.signcard .amount { font: 600 40px/1.1 var(--display); letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.decide { display: flex; flex-direction: column; gap: 10px; }
.decide .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.progress { height: 4px; background: var(--line); border-radius: 2px; } .progress i { display: block; height: 4px; background: var(--teal); border-radius: 2px; }
.ok { color: var(--teal-ink); }

/* login */
.login { max-width: 520px; margin: 10vh auto; padding: 0 16px; }

/* responsive: tablet — the menu becomes a top bar so content keeps the width */
@media (max-width: 1100px) {
  .shell { flex-direction: column; }
  .side { width: auto; height: auto; position: sticky; top: 0; z-index: 5; flex-direction: row; align-items: center; gap: 12px;
          padding: 10px 20px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .nav { flex-direction: row; gap: 2px; }
  .nav a { min-height: 40px; white-space: nowrap; }
  .me { margin: 0 0 0 auto; padding: 0; border: 0; }
  .me > div { display: none; }
  .main { padding: 28px 28px 56px; max-width: none; }
  .signwrap { grid-template-columns: 300px minmax(0, 1fr); }
}
/* phone */
@media (max-width: 760px) {
  .side { gap: 8px; padding: 10px 12px; }
  .side .logo b { display: none; } .side .logo { padding: 0 6px; }
  .nav a { padding: 0 10px; }
  .nav a svg { display: none; }
  .me { display: none; }
  .main { padding: 20px 16px 48px; }
  h1, .summary h1 { font-size: 32px; }
  .summary { padding: 22px; gap: 22px; border-radius: 24px; }
  .stackbars { display: none; }
  .kpis dd { font-size: 22px; }
  .padx { padding: 6px 16px 12px; } .pad { padding: 18px; }
  .lines li.over { margin: 4px -8px; padding: 0 8px; }
  .inv { grid-template-columns: minmax(0, 1fr) auto; padding: 12px 8px; }
  .inv .date { grid-column: 1 / 3; }
  .inv .meta, .inv .links { grid-column: 1 / 3; }
  .signwrap { grid-template-columns: 1fr; }
  .signwrap .signside { display: none; }
  .signcard { padding: 22px; border-radius: 24px; }
  .viewer { height: 60vh; min-height: 360px; }
  .table th:nth-child(4), .table td:nth-child(4) { display: none; }
}

/* checkboxes and radios never take the text-field style */
.field input[type=checkbox], .field input[type=radio], .split input[type=checkbox] { width: 18px; height: 18px; padding: 0; accent-color: var(--teal); flex: none; }
.split { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.split label { justify-content: space-between; }

/* project setup */
.checklist { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; }
.checklist a { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-row); text-decoration: none; color: inherit; background: var(--bg); }
.checklist a:hover { background: var(--hover); }
.checklist .tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--amber); flex: none; display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; }
.checklist li.done .tick { border-color: var(--teal); background: var(--teal); color: #fff; }
.checklist b { display: block; font-size: 14px; }
.checklist small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.checklist li.done b { color: var(--ink2); font-weight: 500; }
.sample { margin: 0; padding: 10px 12px; background: var(--bg); border-radius: 12px; font-size: 12px; overflow-x: auto; white-space: pre; }
.paths { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.paths code { display: block; font-size: 12px; background: var(--bg); border-radius: 10px; padding: 8px 10px; overflow-wrap: anywhere; margin-top: 2px; }
.table.bands td { padding: 8px 6px; vertical-align: middle; }
.table.bands .input { height: 40px; min-width: 96px; }
.table.bands select.input { min-width: 170px; }
.table.bands td:nth-child(4), .table.budgettable td:nth-child(4), .table.bands th:nth-child(4), .table.budgettable th:nth-child(4) { display: table-cell; }
.table.keep4 td:nth-child(4), .table.keep4 th:nth-child(4) { display: table-cell; }

/* contracts by line, client billing */
.table tr.warn td { background: var(--amber-bg); }
.table.progress td, .table.progress th { padding: 10px 10px; }
.table.billing input { height: 38px; width: 112px; text-align: right; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px;
  background: var(--card); font: inherit; font-variant-numeric: tabular-nums; }
.table.billing input.pct { width: 64px; }
.table.billing td, .table.billing th { vertical-align: middle; padding: 10px 5px; }
.table.billing td.desc { min-width: 160px; }
.table.billing tr.changed td { background: var(--teal-bg); }
.table.keepall td, .table.keepall th { display: table-cell !important; }
.totals { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; font-size: 14px; font-variant-numeric: tabular-nums; }
.totals dt { color: var(--ink2); } .totals dd { margin: 0; text-align: right; }
.totals .grand { font-weight: 700; font-size: 18px; color: var(--ink); border-top: 1px solid var(--line); padding-top: 10px; }
.wipbar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--line2); margin-top: 6px; }
.seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg a { white-space: nowrap; flex: none; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--teal-ink); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font: inherit; }
.linkbtn:hover { color: var(--ink); }
.seg.tabs { display: flex; flex-wrap: wrap; width: auto; max-width: 100%; overflow: visible; border-radius: 22px; }
.seg.tabs a { flex: 0 0 auto; white-space: nowrap; min-height: 36px; padding: 0 14px; }
@media (max-width: 760px) { .seg.tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .seg.tabs::-webkit-scrollbar { display: none; } }
.main { position: relative; }
.lang { position: absolute; top: 14px; right: 16px; display: flex; gap: 2px; background: var(--seg); border-radius: 999px; padding: 3px; font-size: 12px; font-weight: 600; z-index: 5; }
.lang a { text-decoration: none; color: var(--ink2); padding: 4px 10px; border-radius: 999px; }
.lang a[aria-current="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(14,17,22,.08); }
@media (max-width: 760px) { .lang { top: 8px; } }

/* the review form's allocation rows: one card per line (code on its own row, then building, amount, %, remove) */
table.alloc, table.alloc tbody { display: block; width: 100%; }
table.alloc thead { display: none; }
table.alloc tr.alloc-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, .75fr) 34px;
  grid-template-areas: "code code code code" "part amount pct clear"; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--line); }
table.alloc tr.alloc-row td { display: block; padding: 0; min-width: 0; }
table.alloc tr.alloc-row td:nth-child(1) { grid-area: part; }
table.alloc tr.alloc-row td:nth-child(2) { grid-area: code; }
table.alloc tr.alloc-row td:nth-child(3) { grid-area: amount; }
table.alloc tr.alloc-row td:nth-child(4) { grid-area: pct; }
table.alloc tr.alloc-row td:nth-child(5) { grid-area: clear; }
table.alloc select, table.alloc input { width: 100%; min-width: 0; }
table.alloc td.num input { text-align: right; }
.field table.alloc select, .field table.alloc input { height: 38px; padding: 0 8px; border-radius: 10px; font-size: 14px; }
.alloc-clear { width: 34px; min-width: 34px; height: 38px; padding: 0; background: transparent; border: 1px solid var(--line); color: var(--muted); }
/* who changed what: one block per field (when opened, saved now, typed), readable in the side column */
table.conflict, table.conflict tbody { display: block; width: 100%; }
table.conflict thead { display: none; }
table.conflict tr { display: block; padding: 8px 0; border-top: 1px solid rgba(0,0,0,.08); }
table.conflict td { display: block; padding: 2px 0; overflow-wrap: anywhere; }
table.conflict td[data-l]::before { content: attr(data-l) " : "; color: var(--muted); }
table.conflict .check { display: inline-flex; margin: 2px 0 0 8px; }
#alloc-add { white-space: nowrap; flex: none; }
