/* Panel Calculator — hand-written, no framework, to match the repo's
   no-dependency rule. Form left, live output right, one screen. */

:root {
  --ink: #14181d;
  --ink-2: #4a545f;
  --ink-3: #7c8794;
  --line: #e2e6eb;
  --line-2: #cfd5dd;
  --bg: #eef1f4;
  --card: #ffffff;
  --rail: #171c22;
  --rail-2: #232a32;
  --accent: #0f6dd3;
  --ok: #1f9254;
  --bad: #d13438;
  --dev: #b7791f;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --sans: "Segoe UI", system-ui, -apple-system, sans-serif;
  --top-h: 62px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
}

/* ---------- top bar ---------- */

.top {
  height: var(--top-h);
  background: var(--rail);
  color: #dfe4ea;
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 0 18px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand { display: flex; gap: 11px; align-items: center; flex: none; }
.brand-mark {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #16b0a8);
  font-weight: 700; font-size: 13px; color: #fff;
}
.brand strong { display: block; font-size: 14px; }
.brand small { color: #8d99a6; font-size: 11px; }

.job-fields { display: flex; gap: 14px; align-items: center; }
.job-fields label { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #98a3b0; }
.job-fields input {
  width: 116px; background: var(--rail-2); border: 1px solid #38424e;
  color: #fff; border-radius: 7px; padding: 6px 9px; font: inherit; font-size: 13px;
}
.job-fields .unit-tag { color: #6f7b88; font-size: 10px; font-style: normal; }

.top-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.top-actions select,
.top-actions input[type="search"] {
  background: var(--rail-2); border: 1px solid #38424e; color: #cfd6de;
  border-radius: 7px; padding: 7px 10px; font: inherit; font-size: 12.5px; cursor: pointer;
}
.top-actions input[type="search"] { width: 168px; cursor: text; }
.top-actions input[type="search"]::placeholder { color: #6f7b88; }
/* "No job HI-9999" — said next to the box that was typed into, not in an alert */
.top-msg { font-size: 11.5px; color: #e0a44a; white-space: nowrap; }

/* ---------- shell ---------- */

.app {
  display: grid;
  grid-template-columns: 350px 1fr;
  align-items: start;
}

/* ---------- form ---------- */

.form {
  position: sticky;
  top: var(--top-h);
  height: calc(100vh - var(--top-h));
  overflow-y: auto;
  background: var(--card);
  border-right: 1px solid var(--line);
  padding: 16px 16px 60px;
}

.room-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.room-tab {
  font: inherit; font-size: 12px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--card); color: var(--ink-2);
  border-radius: 999px; padding: 6px 13px;
}
.room-tab.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.room-tab.add { border-style: dashed; color: var(--accent); border-color: var(--accent); }

.group { border-top: 1px solid var(--line); padding: 14px 0 4px; }
.group:first-of-type { border-top: none; }
.group h3 {
  margin: 0 0 10px; font-size: 11px; text-transform: uppercase;
  letter-spacing: .8px; color: var(--ink-3);
}

.f { display: block; margin-bottom: 10px; position: relative; }
.f > span { display: block; font-size: 11px; color: var(--ink-2); margin-bottom: 4px; }
.f .unit-tag {
  position: absolute; right: 9px; bottom: 9px;
  font-size: 10px; font-style: normal; color: var(--ink-3); pointer-events: none;
}
.f input, .f select {
  width: 100%; font: inherit; font-size: 13px;
  border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px;
  background: #fff; color: var(--ink);
}
.f input:focus, .f select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.row3 .f > span { font-size: 10.5px; }

.hint { margin: 2px 0 10px; font-size: 10.5px; color: var(--ink-3); line-height: 1.5; }

/* a figure the form worked out rather than asked for — reads like a disabled
   input so it is plainly not somewhere to type */
.derived {
  font-size: 13px; border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 10px; background: var(--bg-2, #f6f7f9); color: var(--ink-2);
}

.build-up { margin-top: 12px; }
.build-up h4 {
  margin: 0 0 6px; font-size: 10.5px; text-transform: uppercase;
  letter-spacing: .6px; color: var(--ink-3);
}

/* the wall chain's closure readout, and anything else the form has to warn
   about mid-edit. Amber, not red: the form passes through invalid states on
   the way to a valid job, so these report rather than stop anything. */
.chain-ok { margin: 6px 0 10px; font-size: 11px; color: var(--ok); }
.chain-gap, .bad-note {
  margin: 6px 0 10px; font-size: 11px; line-height: 1.5; color: var(--dev);
  background: #fff8ea; border: 1px solid #f0d29a; border-radius: 8px; padding: 8px 10px;
}
.derived.is-bad { color: var(--bad); border-color: var(--bad); }

/* the drawing sheet: one canvas carrying every view, so it is given the room
   to breathe and its own scroll rather than being squeezed into the column */
.draw.sheet .draw-svg {
  overflow: auto; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; padding: 8px;
}
.draw.sheet .draw-svg svg { display: block; min-width: 100%; }

.dl-row {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line);
}
.dl-label { font-size: 10.5px; color: var(--ink-3); margin-right: 2px; }
.chip-dl {
  font: inherit; font-size: 10.5px; cursor: pointer; color: var(--ink-2);
  background: var(--card); border: 1px solid var(--line-2);
  border-radius: 999px; padding: 3px 9px;
}
.chip-dl:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- 3D view ---------- */

.draw-tools { display: flex; align-items: center; gap: 8px; }

.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
.seg-btn {
  font: inherit; font-size: 11.5px; cursor: pointer; padding: 5px 13px;
  background: var(--card); color: var(--ink-2); border: none;
}
.seg-btn + .seg-btn { border-left: 1px solid var(--line-2); }
.seg-btn.is-on { background: var(--accent); color: #fff; }

.wrap3d { margin-top: 4px; }
canvas.view3d {
  display: block; width: 100%; height: 560px;
  background: linear-gradient(#fbfcfd, #eef1f4);
  border: 1px solid var(--line); border-radius: 10px;
  cursor: grab; touch-action: none;
}
canvas.view3d:active { cursor: grabbing; }

.tools3d { display: flex; align-items: center; gap: 14px; margin: 10px 0 0; flex-wrap: wrap; }
.views3d .seg-btn { min-width: 38px; padding: 5px 9px; }

/* the sheet is a set of views, so it says so under the pointer */
.draw-svg.is-clickable svg { cursor: zoom-in; }

/* what a wall gives up at each of its ends */
.end-note { margin: -4px 0 10px; padding-left: 2px; }

/* ---------- flashing ---------- */

.flash-block h3 {
  margin: 0 0 4px; font-size: 12px; text-transform: uppercase;
  letter-spacing: .8px; color: var(--ink-3);
}
table.flash { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 8px; }
table.flash th {
  text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--ink-3); font-weight: 600; padding: 6px 10px; border-bottom: 1px solid var(--line-2);
}
table.flash td { padding: 7px 10px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
table.flash .num { text-align: right; font-family: var(--mono); color: var(--ink); }
table.flash .mono { font-family: var(--mono); }
table.flash .fl-room td {
  background: var(--bg); font-weight: 600; color: var(--ink); font-size: 11.5px;
}
table.flash tfoot td {
  border-top: 2px solid var(--line-2); border-bottom: none;
  font-weight: 600; color: var(--ink);
}
.fl-note { display: block; font-size: 10px; font-style: normal; color: var(--ink-3); margin-top: 2px; }

/* a flashing the estimator typed in, not one the engine worked out */
table.flash .fl-typed td:first-child { border-left: 2px solid var(--dev); padding-left: 8px; }
.fl-tag {
  margin-left: 6px; font-style: normal; font-size: 9.5px; text-transform: uppercase;
  letter-spacing: .4px; color: var(--dev); border: 1px solid #f0d29a;
  background: #fff8ea; border-radius: 999px; padding: 1px 6px;
}

.extra-flash {
  border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 10px 2px; margin-bottom: 8px; background: var(--card);
}
.extra-flash-head { display: flex; align-items: flex-start; gap: 8px; }
.extra-flash-head .f { flex: 1; }
.hint3d { font-size: 10.5px; color: var(--ink-3); }
.btn.ghost { background: var(--card); color: var(--ink-2); }

/* ---------- the sign-in gate ---------- */

/* Signed out, the tool is not there to be used — so the parts of the header
   that act on a job are gone too, rather than sitting there doing nothing. */
body.signed-out .app,
body.signed-out .job-fields,
body.signed-out #fileMenu,
body.signed-out #jobSearch,
body.signed-out #jobSearchMsg,
body.signed-out #printBtn,
body.signed-out #accountMenu { display: none; }

/* Shown by the body class, not by the `hidden` attribute alone.
   `.gate { display: grid }` outranks the browser's own `[hidden] {
   display: none }`, so the card stayed on screen — empty, because the form is
   only built when the page is actually locked. Both are set here so neither
   can win by accident. */
.gate { display: none; }
.gate[hidden] { display: none; }
body.signed-out .gate {
  display: grid; place-items: center;
  min-height: calc(100vh - var(--top-h)); padding: 40px 20px;
}
.gate-card {
  width: 100%; max-width: 380px; text-align: center;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 34px 30px 28px;
  box-shadow: 0 12px 40px rgb(0 0 0 / 8%);
}
.gate-card .brand-mark { width: 46px; height: 46px; font-size: 16px; margin: 0 auto 14px; }
.gate-card h1 { margin: 0 0 6px; font-size: 21px; letter-spacing: -.2px; }
.gate-sub { margin: 0 0 22px; font-size: 13px; color: var(--ink-3); }

.auth-form { display: flex; flex-direction: column; gap: 9px; text-align: left; }
.auth-form input {
  font: inherit; font-size: 13.5px; padding: 10px 12px;
  border: 1px solid var(--line-2); border-radius: 9px;
  background: var(--card); color: var(--ink);
}
.auth-form input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.auth-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.auth-form .row2 .btn { padding: 9px 13px; }
.auth-form .hint { margin: 0; }

/* said, not hidden: a server with no Supabase runs unlocked, and should say so */
.gate-reason:empty { display: none; }
.gate-reason {
  grid-column: 1 / -1; margin: 0; padding: 10px 16px;
  background: #fff8ea; border-bottom: 1px solid #f0d29a;
  font-size: 12.5px; color: var(--dev);
}

/* ---------- the administrator's screen ---------- */

.admin[hidden] { display: none; }
.admin {
  max-width: 900px; margin: 0 auto; padding: 26px 20px 60px;
}
.admin-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.admin-head h2 { margin: 0; font-size: 20px; flex: 1; }
.admin .scroller { border: 1px solid var(--line); border-radius: 11px; background: var(--card); }
.admin td, .admin th { text-align: left; white-space: nowrap; }
.admin td:last-child { display: flex; gap: 6px; flex-wrap: wrap; }
.admin .btn { padding: 4px 10px; font-size: 12px; }
.ok-tag, .dev-tag {
  font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
}
.ok-tag { background: #e7f6ed; color: var(--ok); }
.dev-tag { background: #fff8ea; color: var(--dev); }

/* ---------- header menus (File, account) ---------- */

/* details/summary, so a menu opens and closes itself with no script */
.menu { position: relative; }
.menu > summary { list-style: none; user-select: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-items {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 40;
  min-width: 190px; padding: 6px;
  background: var(--card); border: 1px solid var(--line-2);
  border-radius: 10px; box-shadow: 0 10px 28px rgb(0 0 0 / 18%);
  display: flex; flex-direction: column; gap: 2px;
}
.menu-items > button {
  text-align: left; font: inherit; font-size: 13px; color: var(--ink);
  background: none; border: 0; border-radius: 7px; padding: 8px 10px; cursor: pointer;
}
.menu-items > button:hover { background: var(--bg); }

.menu-items.account { min-width: 250px; gap: 8px; padding: 12px; }
.menu-items.account input {
  font: inherit; font-size: 13px; padding: 8px 10px;
  border: 1px solid var(--line-2); border-radius: 8px; background: var(--card); color: var(--ink);
}
.menu-items.account .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.menu-items.account .hint { margin: 0; }

/* the picked panel's own figures, read straight off the model */
.pick3d {
  display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline;
  margin-top: 10px; padding: 10px 12px; min-height: 42px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
}
.pick3d b { font-size: 12.5px; color: var(--ink); }
.pick3d span { font-size: 12px; color: var(--ink-2); font-family: var(--mono); }
.pick3d .muted { color: var(--ink-3); font-family: var(--sans); }

.link-del {
  background: none; border: none; color: var(--bad); font: inherit; font-size: 11.5px;
  cursor: pointer; padding: 0; text-decoration: underline;
}

/* walls */

.wall {
  border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; margin-bottom: 10px; background: #fcfdfe;
}
.wall.is-shared { background: #f6f8fa; border-style: dashed; }
.wall.is-shared .skins { opacity: .55; }
.shared-note {
  margin: 6px 0 0; padding: 6px 8px; border-radius: 6px;
  background: #fff; border: 1px solid var(--line);
}

.partition {
  margin: 8px 0 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 10.5px; color: var(--accent);
}
.partition > span::before { content: '⇄ '; }
.link-go {
  background: none; border: none; color: var(--accent); font: inherit;
  font-size: 10.5px; cursor: pointer; padding: 0; text-decoration: underline;
}
.wall-head { display: flex; justify-content: space-between; align-items: baseline; }
.wall-head b { font-size: 12.5px; }
.wall-len { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.wall-toggles { display: flex; gap: 14px; margin-top: 7px; flex-wrap: wrap; }

.chk { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-2); cursor: pointer; }
.chk input { accent-color: var(--accent); }
.chk.door input { accent-color: #c2185b; }
/* decided by the room on the other side, so shown but not changeable here */
.chk.is-locked { cursor: not-allowed; color: var(--ink-3); opacity: .65; }
.chk.is-locked input { cursor: not-allowed; }

.override {
  margin: 8px 0 0; font-size: 10.5px; color: var(--dev);
  background: #fff8ea; border: 1px solid #f0d29a; border-radius: 6px; padding: 5px 8px;
}

.door-box {
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line-2);
}

.add-room {
  margin-top: 8px; width: 100%;
  background: none; border: 1px dashed var(--line-2); color: var(--accent);
  border-radius: 7px; padding: 5px; font: inherit; font-size: 11px; cursor: pointer;
}
.add-room:hover { border-color: var(--accent); background: #f2f7fd; }

.corners {
  margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line);
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
}
.chk.corner input { accent-color: #b4651a; }
.chk.chq { margin: 8px 0 6px; font-weight: 600; color: var(--ink-2); }
.chk.chq input { accent-color: #e3a008; }
.chk.corner { font-size: 10.5px; }

.skins { margin-top: 9px; display: grid; gap: 6px; }
.skin { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.skin > span { font-size: 10.5px; color: var(--ink-2); white-space: nowrap; }
.skin-pair { display: flex; gap: 5px; }
.skin-pair select {
  font: inherit; font-size: 11px; padding: 4px 6px;
  border: 1px solid var(--line-2); border-radius: 6px; background: #fff; color: var(--ink);
}

.skin-cell { color: var(--ink-3); font-size: 11.5px; }

/* ---------- output ---------- */

.out { padding: 22px 26px 70px; min-width: 0; }
.muted { color: var(--ink-3); font-size: 13px; }

.summary { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 11px; padding: 12px 16px; min-width: 128px;
}
.card small {
  display: block; color: var(--ink-3); font-size: 10.5px;
  text-transform: uppercase; letter-spacing: .6px;
}
.card b { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.card b em { font-style: normal; font-size: 12px; color: var(--ink-3); margin-left: 3px; }

/* each room is its own labelled section — drawings then its BOQ */
.room-head {
  font-size: 14px; letter-spacing: .3px; font-weight: 600;
  color: var(--ink); margin: 34px 0 14px;
  padding: 10px 16px; background: var(--rail); color: #fff;
  border-radius: 10px;
}
.room-head:first-of-type { margin-top: 0; }
/* every room's sheet lives under this one heading */
.boq-head { background: var(--accent); }

.grand { border-color: var(--accent); }
.grand td.desc { font-weight: 600; }
.grand td.num { font-size: 15px; }

.block {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden; margin-bottom: 18px;
}
.block-head { padding: 13px 18px; border-bottom: 1px solid var(--line); }
.block-head h3 { margin: 0; font-size: 13px; letter-spacing: .4px; }
.block-head p { margin: 3px 0 0; font-size: 11.5px; color: var(--ink-3); font-family: var(--mono); }

.draw { padding: 0; }
.layout { border-color: var(--accent); margin-bottom: 26px; }
.layout .draw-head { background: #f2f7fd; }
.draw-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; padding: 12px 18px; border-bottom: 1px solid var(--line);
}
.draw-head h3 { margin: 0; font-size: 13.5px; }
.draw-head p { margin: 3px 0 0; font-size: 11px; color: var(--ink-3); font-family: var(--mono); }
.draw-svg { padding: 16px; overflow-x: auto; text-align: center; }
.draw-svg svg { max-width: 100%; height: auto; }

.btn {
  font: inherit; font-size: 12.5px; cursor: pointer; flex: none;
  border: 1px solid var(--line-2); background: var(--card); color: var(--ink-2);
  border-radius: 8px; padding: 6px 13px;
}
.btn:hover { border-color: var(--ink-3); }
/* the Guide and Back buttons are links, so they need the plain look too */
a.btn { text-decoration: none; display: inline-block; line-height: 1.5; }

/* ---------- BOQ table ---------- */

.scroller { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
th, td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
th {
  background: #fafbfc; color: var(--ink-3);
  font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px;
}
td.desc, th.desc { text-align: left; white-space: normal; min-width: 220px; }
td.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
tbody tr:hover { background: #f7f9fb; }
tr.total td {
  border-top: 2px solid var(--line-2); border-bottom: none;
  font-weight: 700; background: #fafbfc;
}
tr.total td.desc { text-transform: uppercase; letter-spacing: .5px; font-size: 11px; }

.error {
  background: #fdecec; border: 1px solid #f5b7b7; color: #97231f;
  border-radius: 9px; padding: 11px 14px; font-size: 13px; margin: 0 0 12px;
}

/* A finding, not a failure: the job still builds, but a wall is missing from
   it. Amber, the same colour the verifier's ! rows use. */
.problems {
  background: #fff8ea; border: 1px solid #f0d29a;
  border-radius: 11px; padding: 13px 16px; margin: 0 0 22px;
}
.problems h3 {
  margin: 0 0 8px; font-size: 12px; text-transform: uppercase;
  letter-spacing: .8px; color: var(--dev);
}
.problems ul { margin: 0; padding-left: 18px; }
.problems li { font-size: 12.5px; line-height: 1.6; color: var(--ink-2); margin-bottom: 4px; }
.problems .hint { margin: 8px 0 0; }

/* ---------- the guide page ---------- */

/* /guide renders GUIDE.md itself — see web/guide.js. There is no second copy
   of the instructions, so everything below is styling for that one file. */
.guide {
  max-width: 860px;
  margin: 0 auto;
  padding: 30px 24px 90px;
  background: var(--card);
  min-height: calc(100vh - var(--top-h));
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.75;
}
.guide h1 { font-size: 26px; margin: 0 0 18px; letter-spacing: -.2px; }
.guide h2 {
  font-size: 20px; margin: 44px 0 14px; padding-top: 22px;
  border-top: 1px solid var(--line);
}
.guide h3 { font-size: 16px; margin: 32px 0 10px; }
.guide h4 { font-size: 14px; margin: 24px 0 8px; color: var(--ink-2); }
.guide p { margin: 0 0 14px; }
.guide ul, .guide ol { margin: 0 0 16px; padding-left: 22px; }
.guide li { margin-bottom: 6px; }
.guide a { color: var(--accent); }
.guide code {
  font-family: var(--mono); font-size: 12.5px;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 5px; padding: 1px 5px;
}
.guide pre {
  background: var(--rail); color: #dfe4ea; border-radius: 10px;
  padding: 14px 16px; overflow-x: auto; margin: 0 0 18px;
}
.guide pre code { background: none; border: none; padding: 0; color: inherit; font-size: 12.5px; }
.guide blockquote {
  margin: 0 0 18px; padding: 12px 16px;
  background: #fff8ea; border: 1px solid #f0d29a; border-radius: 10px;
}
.guide blockquote :last-child { margin-bottom: 0; }
.guide hr { border: none; border-top: 1px solid var(--line); margin: 34px 0; }
.guide .scroller { margin: 0 0 20px; border: 1px solid var(--line); border-radius: 10px; }
/* the BOQ tables are all figures and right-align; the guide's are prose */
.guide th, .guide td { text-align: left; white-space: normal; }
.guide td:first-child { font-weight: 600; }

/* ---------- print ---------- */

@media print {
  .top, .form { display: none; }
  .app { display: block; }
  .out { padding: 0; }
  .block { border: none; page-break-inside: avoid; }
  .summary { gap: 8px; }
}

@media (max-width: 1000px) {
  .app { grid-template-columns: 1fr; }
  .form { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--line); }
  .top { height: auto; padding: 10px 14px; flex-wrap: wrap; gap: 12px; }
}
