/* Thin rules, Inter (Apple-like), green and orange accents, section-hatch separators. */
/* Light by default; the dark theme is chosen in the footer (cookie, see app.py). */
:root {
  --bg: #F5F5F7;
  --paper: #FFFFFF;
  --ink: #1D1D1F;
  --text2: #3A3A3C;
  --soft: #6E6E73;
  --muted: #AEAEB2;
  --rule: #1D1D1F;
  --line-soft: #D2D2D7;
  --fill: #F2F2F4;
  --hover: #F5F5F7;
  --track: #E5E5EA;
  --acc: #237A49;
  --on-acc: #FFFFFF;
  --warn: #B35C00;
  --radius: 14px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #141416;
  --paper: #1C1C1E;
  --ink: #F5F5F7;
  --text2: #D1D1D6;
  --soft: #98989D;
  --muted: #636366;
  --rule: rgba(245, 245, 247, .9);
  --line-soft: #48484A;
  --fill: #2C2C2E;
  --hover: #242426;
  --track: #3A3A3C;
  --acc: #5DBB7E;
  --on-acc: #0B0B0C;
  --warn: #F0A43A;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01";
}
a { color: inherit; }
.page { max-width: 1280px; margin: 0 auto; padding: 24px; }
.frame { border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.row { display: flex; flex-wrap: wrap; gap: 1px; background: var(--rule); }
.stack { display: flex; flex-direction: column; gap: 1px; background: var(--rule); }
.cell { background: var(--paper); padding: 28px; min-width: 0; }
.rule { border-top: 1px solid var(--rule); }
/* Separators drawn like section hatches on a construction detail; the SVG is a mask, so the
   hatch takes the text colour in both themes. */
.hatch {
  position: relative; height: 18px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  background: var(--paper); --hatch: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='16' fill='none' stroke='black' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'><path d='M5 4l4 1.5-3 3z M22 11l3-4 2 4.5z M32 3l4.5 2-4 2.5z'/><g fill='black' stroke='none'><circle cx='14' cy='12' r='.9'/><circle cx='28.5' cy='4.5' r='.9'/><circle cx='37' cy='12.5' r='.9'/><circle cx='2' cy='11' r='.9'/><circle cx='17.5' cy='4' r='.7'/></g></svg>");
}
.hatch::before {
  content: ""; position: absolute; inset: 0; background: var(--ink);
  -webkit-mask: var(--hatch) 0 50% / auto repeat-x; mask: var(--hatch) 0 50% / auto repeat-x;
}
.hatch.isolant { --hatch: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='black' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'><path d='M0 8C0 1.5 8 1.5 8 8S16 14.5 16 8'/></svg>"); }
.hatch.terre { --hatch: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='16' fill='none' stroke='black' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'><path d='M3 13L8 3M7 13L12 3M11 13L16 3'/></svg>"); }
.hatch.gazon { --hatch: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='16' fill='none' stroke='black' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'><path d='M0 14.5H32M7 14.5L4.5 8M7 14.5V6.5M7 14.5L9.5 8M22 14.5L20 9.5M22 14.5L24 9.5'/></svg>"); }
.logo {
  font-weight: 700; font-size: 30px; line-height: 1; letter-spacing: -.035em; color: var(--ink);
  margin: 0; text-decoration: none;
}
.logo::after { content: "."; color: var(--acc); }
.logo.big { font-size: clamp(56px, 9vw, 112px); letter-spacing: -.05em; }
.kicker { font-weight: 500; font-size: 13px; letter-spacing: .02em; color: var(--soft); margin: 0; }
.h { font-weight: 700; letter-spacing: -.035em; line-height: 1.02; margin: 0; }
.p { font-weight: 400; font-size: 19px; line-height: 1.55; margin: 0; color: var(--text2); }
.soft { color: var(--soft); }
.small { font-size: 13px; line-height: 1.5; font-weight: 400; color: var(--soft); }

.nav {
  flex: 1 1 150px; display: flex; align-items: center; justify-content: center; min-height: 60px;
  padding: 0 12px; background: var(--paper); font-weight: 500; font-size: 15px;
  text-decoration: none; color: var(--text2);
}
.nav:hover { background: var(--hover); color: var(--ink); }
.nav.on { color: var(--acc); box-shadow: inset 0 -2px 0 var(--acc); }

.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 8px 0 22px;
  border: 0; border-radius: 999px; background: var(--acc); font: 600 16px Inter, sans-serif;
  text-decoration: none; color: var(--on-acc); cursor: pointer;
}
.btn i { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(0, 0, 0, .16); }
.btn:hover { filter: brightness(1.08); }

/* Phase bar */
.ph {
  flex: 1 1 80px; min-height: 68px; display: flex; align-items: center; justify-content: center;
  background: var(--paper); font: 600 17px Inter, sans-serif; text-decoration: none; color: var(--text2);
}
.ph:hover { background: var(--hover); color: var(--ink); }
.ph.on { color: var(--acc); box-shadow: inset 0 -2px 0 var(--acc); }
.ph.so { color: var(--muted); text-decoration: line-through; }
.ph.so.on { color: var(--acc); }

/* Questionnaire */
.q { border: 0; margin: 0; padding: 0; min-width: 0; }
.q legend { padding: 0; margin: 0 0 8px; font-size: 14px; font-weight: 500; }
.q .cond { display: block; font-size: 12px; font-weight: 500; color: var(--warn); margin-bottom: 2px; }
.q .help { margin: -2px 0 8px; font-size: 12px; line-height: 1.45; color: var(--soft); }
.q.child { border-left: 1px solid var(--rule); padding-left: 14px; }
.opts { display: flex; flex-wrap: wrap; gap: 6px; }
.ans {
  position: relative; font-size: 13px; font-weight: 500; padding: 6px 12px; border: 1px solid var(--line-soft);
  border-radius: 999px; cursor: pointer;
}
.ans:hover { border-color: var(--ink); }
.ans input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ans:has(input:checked) { background: var(--ink); border-color: var(--ink); color: var(--on-acc); }
.ans:has(input:focus-visible) { outline: 2px solid var(--acc); outline-offset: 2px; }
.ans.nsp { border-style: dashed; }

/* Role filter */
.pill {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--line-soft);
  border-radius: 999px; background: transparent; font: 500 14px Inter, sans-serif; text-decoration: none;
}
.pill:hover { border-color: var(--ink); }
.pill.on { background: var(--ink); border-color: var(--ink); color: var(--on-acc); }

/* Lines */
.line { padding: 18px 28px; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px 20px; }
.line .what { flex: 1 1 300px; min-width: 0; }
.line .name { margin: 0; font-size: 17px; font-weight: 500; line-height: 1.4; }
.line .who { flex: 0 0 auto; font-size: 13px; font-weight: 500; color: var(--soft); padding-top: 4px; }
.b {
  flex: 0 0 124px; text-align: center; font-weight: 600; font-size: 12px; letter-spacing: .02em;
  padding: 5px 8px; border: 1px solid var(--line-soft); border-radius: 999px;
}
.b-OBL { background: var(--ink); border-color: var(--ink); color: var(--on-acc); }
.b-REC { border-color: var(--acc); color: var(--acc); }
.b-VER, .b-PEND { border-style: dashed; border-color: var(--warn); color: var(--warn); }
.b-SO { color: var(--muted); }
.refs { margin: 4px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--soft); }
.refs li { display: inline; }
.refs li + li::before { content: " · "; }
.refs .unverified { font-style: italic; }
.recheck { font-weight: 600; color: var(--warn); padding: 0 4px; margin-left: 4px; }
.panel {
  display: inline-block; background: var(--fill); padding: 16px 20px; border-radius: 12px;
  font-size: 17px; line-height: 1.5; margin: 0;
}
.so-band { background: var(--paper); color: var(--muted); }
.acc-band { background: var(--paper); color: var(--acc); box-shadow: inset 3px 0 0 var(--acc); }

.foot { display: flex; align-items: stretch; gap: 1px; background: var(--rule); border-top: 1px solid var(--rule); }
.foot span { flex: 1; background: var(--paper); padding: 14px 20px; font-weight: 600; font-size: 15px; }
.icon { width: 96px; height: 96px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (max-width: 600px) {
  .page { padding: 16px; }
  .cell { padding: 20px 16px; }
  .line { padding: 16px; }
  .b { flex-basis: auto; }
}

/* Accounts and projects */
button.nav { width: 100%; border: 0; font-family: Inter, sans-serif; cursor: pointer; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--text2); min-width: 0; }
.field input, .field select, .field textarea {
  font: 400 16px Inter, sans-serif; color: var(--ink); background: var(--fill);
  border: 1px solid var(--line-soft); border-radius: 10px; padding: 10px 12px; min-height: 46px; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--acc); outline: none; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible,
.tick:focus-visible, .pill:focus-visible, .btn:focus-visible, .nav:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.bar { height: 6px; border-radius: 999px; background: var(--track); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--acc); border-radius: 999px; }
.ph small { display: block; font-size: 11px; font-weight: 500; color: var(--soft); margin-top: 2px; }
.ph { flex-direction: column; }
.tickf { margin: 0; }
.tick {
  width: 28px; height: 28px; border: 1.5px solid var(--muted); border-radius: 50%; background: transparent; color: transparent;
  font: 700 15px Inter, sans-serif; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0;
}
.tick[aria-pressed="true"] { background: var(--acc); border-color: var(--acc); color: var(--on-acc); }
.tick:hover { border-color: var(--acc); }
.line.done .name { text-decoration: line-through; text-decoration-thickness: 1px; color: var(--soft); }
a.line:hover { background: var(--hover); }
details > summary { list-style: none; }
details > summary::before { content: "+ "; color: var(--acc); }
details[open] > summary::before { content: "− "; }
/* The last cell of a column fills it, so no rule colour shows below a short column. */
.stack > :last-child { flex: 1 1 auto; }
details.questions > summary { list-style: none; cursor: pointer; }
details.questions > summary::-webkit-details-marker, details > summary::-webkit-details-marker { display: none; }
details.questions > summary::before { content: none; }
.legal h2 { font-weight: 700; letter-spacing: -.02em; font-size: 20px; margin: 28px 0 8px; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li { font-size: 16px; line-height: 1.6; font-weight: 400; color: var(--text2); }

/* Theme switch in the footer */
.themef { margin: 0; }
.themeb {
  font: 500 13px Inter, sans-serif; color: var(--ink); background: transparent; cursor: pointer;
  border: 1px solid var(--line-soft); border-radius: 999px; padding: 4px 12px;
}
.themeb:hover { border-color: var(--ink); }
.themeb:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
