/* Nástroje pro projektanty a řemesla – náhled. Vzhled ocelové HUD varianty (akcent #3fb8d4, jako Řemeslo),
 * mobil první. Jedna barevná paleta v :root, aby se dala vyměnit při případném propojení s Řemeslem. */
:root {
  --bg: #e9edef; --card: #ffffff; --dlazdice: var(--card); --ink: #1c2427; --ink2: #3b474c; --muted: #66757b;
  --line: #d2d9dd; --line2: #e3e8eb;
  --steel1: #283033; --steel2: #36414a; --steel3: #4b575e; --steel4: #6a777d;
  --accent: #3fb8d4; --accent-ink: #0b6f84; --accent-soft: #e0f3f8;
  --ok: #1b7d44; --ok-bg: #e2f4e9; --warn: #7d5200; --warn-bg: #fff1cf; --bad: #b0261d; --bad-bg: #fde6e3;
  --radius: 8px; --cut: 14px;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); }
img { max-width: 100%; height: auto; }
a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: #08566a; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 4.6vw, 2.35rem); }
h2 { font-size: clamp(1.2rem, 3vw, 1.5rem); }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .9em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- záhlaví ---- */
.top { background: var(--steel1); color: #eef4f6; border-bottom: 3px solid var(--accent); position: sticky; top: 0; z-index: 20; }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; padding-top: 10px; padding-bottom: 8px; }
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: #fff; }
.brand b { font-family: var(--mono); letter-spacing: .18em; font-size: 1rem; }
.brand b i { color: var(--accent); font-style: normal; }
.brand span { font-size: .9rem; color: #b9c7cc; }
.nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; flex: 1 1 100%; order: 3; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: #d6e1e5; text-decoration: none; padding: 7px 11px; border-radius: 6px; font-size: .9rem; white-space: nowrap; }
.nav a:hover { background: var(--steel2); color: #fff; }
.nav a[aria-current="page"] { background: var(--accent); color: #0b2a33; font-weight: 600; }
.badge-preview { margin-left: auto; font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; color: #0b2a33; background: #ffd466; padding: 3px 8px; border-radius: 4px; font-weight: 700; }
@media (min-width: 860px) {
  .nav { flex: 0 1 auto; order: 0; margin: 0; padding: 0; }
  .badge-preview { order: 4; }
  .top .wrap { flex-wrap: nowrap; }
}
.preview-bar { background: var(--warn-bg); color: var(--warn); border-bottom: 1px solid #f0d58f; font-size: .85rem; }
.preview-bar .wrap { padding-top: 6px; padding-bottom: 6px; }

/* ---- rozvržení ---- */
main { padding: 22px 0 48px; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--muted); }
.lead { font-size: 1.08rem; color: var(--ink2); max-width: 62ch; }
.grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.cols { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .cols.two { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; } }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; min-width: 0; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.cut { border-radius: 0; clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut)); box-shadow: inset 0 0 0 1px var(--line); border: 0; }

/* ---- hlavní stránka ---- */
.hero { background: linear-gradient(135deg, var(--steel1), var(--steel3)); color: #eef4f6; padding: 26px 22px; margin-bottom: 22px; position: relative; }
.hero h1 { color: #fff; margin-bottom: .35em; }
.hero p { color: #cfdce1; max-width: 60ch; }
.hero .eyebrow { font-family: var(--mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 14px 0 0; padding: 0; list-style: none; font-size: .9rem; color: #dce8ec; }
.facts li::before { content: "▸ "; color: var(--accent); }
.tools { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.tool { display: flex; flex-direction: column; gap: 6px; padding: 18px 18px 16px; background: var(--dlazdice); text-decoration: none; color: inherit; border-left: 4px solid var(--accent); transition: background .15s, transform .15s; }
.tool:hover { background: #f5fbfd; transform: translateY(-1px); }
.tool svg { width: 34px; height: 34px; stroke: var(--steel3); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tool h3 { margin: 4px 0 0; font-size: 1.12rem; color: var(--ink); }
.tool p { margin: 0; color: var(--ink2); font-size: .95rem; }
.tool .who { font-size: .8rem; color: var(--muted); margin-top: auto; padding-top: 6px; }
.tool .go { font-family: var(--mono); font-size: .8rem; color: var(--accent-ink); }
.tool.soon { border-left-color: var(--line); opacity: .75; }
.tool.soon:hover { background: var(--card); transform: none; }
.tag { display: inline-block; font-family: var(--mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; padding: 2px 7px; border-radius: 4px; background: var(--accent-soft); color: var(--accent-ink); }
.tag.soon { background: #eceff1; color: var(--muted); }
details.plan { margin-top: 20px; }
details.plan summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.plan-grid { display: grid; gap: 12px 24px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); margin-top: 10px; }
.plan-grid h4 { margin: 0 0 4px; font-size: .9rem; color: var(--steel3); }
.plan-grid ul { margin: 0; padding-left: 18px; font-size: .9rem; color: var(--ink2); }

/* ---- formuláře ---- */
.field { margin-bottom: 14px; }
.field > label, .legend { display: block; font-size: .88rem; font-weight: 600; color: var(--ink2); margin-bottom: 5px; }
.hint { font-size: .8rem; color: var(--muted); }
.field .hint { margin-top: 4px; }
@media (max-width: 559px) { .hide-s { display: none; } .tbl th, .tbl td { padding: 8px 7px; } }
input[type="number"], input[type="text"], select {
  width: 100%; font: inherit; font-size: 16px; padding: 10px 11px; color: var(--ink); background: #fff;
  border: 1px solid #b7c2c8; border-radius: 6px; min-height: 44px;
}
input:focus, select:focus, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.inline { display: flex; align-items: center; gap: 8px; }
.inline input { flex: 1 1 auto; }
.unit { color: var(--muted); font-size: .9rem; min-width: 2.2em; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seg { display: grid; gap: 6px; }
.seg label { display: flex; gap: 10px; align-items: flex-start; padding: 9px 11px; border: 1px solid #b7c2c8; border-radius: 6px; background: #fff; cursor: pointer; font-size: .93rem; }
.seg label:hover { border-color: var(--accent); }
.seg input { margin-top: 3px; accent-color: var(--accent-ink); }
.seg label:has(input:checked) { border-color: var(--accent-ink); background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent-ink); }
.seg .kgroup { font-family: var(--mono); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 10px 0 2px; }
.seg .kgroup:first-child { margin-top: 0; }
.seg label.off { background: #eef1f3; border-color: #d3dadd; color: var(--muted); cursor: default; opacity: .75; }
.seg label small { display: block; color: var(--muted); font-size: .8rem; }
.check { display: flex; gap: 9px; align-items: flex-start; font-size: .92rem; margin-bottom: 12px; }
.check input { margin-top: 4px; accent-color: var(--accent-ink); }
details.adv { border: 1px dashed #b7c2c8; border-radius: 6px; padding: 8px 12px; margin-bottom: 12px; }
details.adv summary { cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--ink2); }
details.adv[open] summary { margin-bottom: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-size: .93rem; font-weight: 600; padding: 9px 14px; min-height: 42px; border-radius: 6px; border: 1px solid var(--steel3); background: #fff; color: var(--steel1); cursor: pointer; text-decoration: none; }
.btn:hover { background: #f0f4f6; }
.btn.primary { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
.btn.primary:hover { background: #08566a; }
.btn.ghost { border-color: var(--line); font-weight: 500; }
.btn.small { min-height: 34px; padding: 5px 10px; font-size: .85rem; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* ---- upozornění ---- */
.note { border-radius: 6px; padding: 10px 13px; font-size: .9rem; margin: 0 0 14px; border-left: 4px solid; }
.note.warn { background: var(--warn-bg); border-color: #e0a400; color: #5d3d00; }
.note.info { background: var(--accent-soft); border-color: var(--accent); color: #0b4a58; }
.note.bad { background: var(--bad-bg); border-color: var(--bad); color: #7d1a14; }
.note.ok { background: var(--ok-bg); border-color: var(--ok); color: #124d29; }
.note b { font-weight: 650; }

/* ---- výsledky ---- */
.result { position: relative; }
.verdict { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 6px; margin-bottom: 14px; font-weight: 650; }
.verdict small { display: block; font-weight: 400; font-size: .85rem; opacity: .9; }
.verdict.ok { background: var(--ok-bg); color: #124d29; }
.verdict.warn { background: var(--warn-bg); color: #5d3d00; }
.verdict.bad { background: var(--bad-bg); color: #7d1a14; }
.verdict .dot { width: 14px; height: 14px; border-radius: 50%; flex: none; background: currentColor; }
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
@media (min-width: 560px) { .metrics.three { grid-template-columns: repeat(3, 1fr); } }
.metric { border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; background: #fafcfd; }
.metric .k { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.metric .v { font-family: var(--mono); font-size: 1.45rem; font-weight: 700; color: var(--steel1); font-variant-numeric: tabular-nums; line-height: 1.25; overflow-wrap: anywhere; }
.metric .v small { font-size: .8rem; font-weight: 500; color: var(--muted); margin-left: 3px; }
.metric .s { font-size: .78rem; color: var(--muted); }
.metric.big { grid-column: 1 / -1; background: var(--steel1); border-color: var(--steel1); }
.metric.big .k { color: #9fb1b8; } .metric.big .v { color: #fff; font-size: 2rem; } .metric.big .v small, .metric.big .s { color: #b9c7cc; }
.metric.ok .v { color: var(--ok); } .metric.warn .v { color: var(--warn); } .metric.bad .v { color: var(--bad); }
.metric.big.ok { background: #14472b; border-color: #14472b; } .metric.big.warn { background: #5b4100; border-color: #5b4100; } .metric.big.bad { background: #7a1e17; border-color: #7a1e17; }
.metric.big.ok .v, .metric.big.warn .v, .metric.big.bad .v { color: #fff; }
.meter { height: 10px; background: #e5eaed; border-radius: 5px; position: relative; overflow: hidden; margin: 6px 0 2px; }
.meter i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ok); border-radius: 5px; }
.meter.warn i { background: #d99a00; } .meter.bad i { background: var(--bad); }
.meter::after { content: ""; position: absolute; left: 100%; top: 0; bottom: 0; width: 2px; background: var(--ink); opacity: .5; display: none; }
.meter-wrap { position: relative; padding-right: 0; }
.meter-label { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); }

/* ---- tabulky ---- */
.tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
table.tbl { border-collapse: collapse; width: 100%; font-size: .9rem; }
.tbl th, .tbl td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line2); vertical-align: top; }
.tbl th { background: #f2f5f6; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink2); position: sticky; top: 0; white-space: nowrap; }
.tbl td.num, .tbl th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tbody tr:hover { background: #f6fafb; }
.tbl th[data-sort] { cursor: pointer; user-select: none; }
.tbl th[data-sort]:hover { background: #e7edf0; }
.tbl th.sorted::after { content: " ▲"; font-size: .65em; } .tbl th.sorted.desc::after { content: " ▼"; }
.tbl td.name { min-width: 16em; }
.tbl td.nw { white-space: nowrap; }
.tbl.kv th { position: static; background: transparent; text-transform: none; letter-spacing: 0; font-size: .9rem; color: var(--ink2); font-weight: 600; width: 46%; white-space: normal; }
.tbl.kv td { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.pill { display: inline-block; font-size: .72rem; padding: 1px 7px; border-radius: 10px; background: #eceff1; color: var(--ink2); white-space: nowrap; }
.pill.bad { background: var(--bad-bg); color: var(--bad); } .pill.ok { background: var(--ok-bg); color: var(--ok); } .pill.warn { background: var(--warn-bg); color: var(--warn); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; align-items: center; }
.chip { font: inherit; font-size: .88rem; padding: 6px 12px; border-radius: 999px; border: 1px solid #b7c2c8; background: #fff; cursor: pointer; min-height: 36px; }
.chip[aria-pressed="true"] { background: var(--steel1); border-color: var(--steel1); color: #fff; }
.filters input[type="search"] { flex: 1 1 200px; font-size: 16px; padding: 8px 11px; border: 1px solid #b7c2c8; border-radius: 6px; min-height: 40px; }

/* ---- přehled šesti případů uložení ---- */
.cases { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .cases { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.case { border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px 12px; background: #fafcfd; display: grid; gap: 3px; align-content: start; }
.case.sel { border-color: var(--accent-ink); background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent-ink); }
.case .ct { font-weight: 600; font-size: .88rem; line-height: 1.3; }
.case .cf { font-family: var(--mono); font-size: .76rem; color: var(--muted); }
.case .cv { font-family: var(--mono); font-size: 1.2rem; font-weight: 700; color: var(--steel1); font-variant-numeric: tabular-nums; margin-top: 2px; }
.case .cv small { font-size: .78rem; font-weight: 500; color: var(--muted); }
.case .cs { font-size: .78rem; color: var(--muted); }
.case.lim .cv { color: var(--muted); }
.case .cv.bad { color: var(--bad); } .case .cv.warn { color: var(--warn); }
.pic { width: 100%; height: 58px; display: block; margin-bottom: 4px; }
.pic .beam { stroke: var(--steel1); stroke-width: 3; fill: none; stroke-linecap: round; }
.pic .ghost { stroke: #9aa7ad; stroke-width: 1.2; fill: none; stroke-dasharray: 3 3; }
.pic .wall { fill: #8a979d; }
.pic .tri { fill: #8a979d; }
.pic .arr { stroke: var(--bad); stroke-width: 1.6; fill: none; }
.pic .arrh { fill: var(--bad); }

/* ---- řezací plán ---- */
.cutrows { width: 100%; border-collapse: collapse; }
.cutrows td { padding: 3px 4px 3px 0; }
.cutrows input { min-height: 40px; padding: 7px 9px; }
.cutrows .del { background: none; border: 0; color: var(--muted); font-size: 1.3rem; cursor: pointer; min-width: 36px; min-height: 40px; }
.cutrows .del:hover { color: var(--bad); }
.barrow { margin: 0 0 14px; }
.barrow .cap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: .82rem; color: var(--ink2); margin-bottom: 3px; }
.bar { display: flex; height: 38px; border: 1px solid var(--steel3); border-radius: 4px; overflow: hidden; background: repeating-linear-gradient(135deg, #f1f4f5 0 6px, #e1e7ea 6px 12px); }
.bar .p { display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: .72rem; color: #0b1f26; overflow: hidden; white-space: nowrap; border-right: 1px solid rgba(0,0,0,.35); }
.bar .k { flex: none; background: #1c2427; }
.bar .w { flex: 1 1 auto; }
.pc0 { background: #9fd8e6; } .pc1 { background: #b8dfa8; } .pc2 { background: #f1cf8b; } .pc3 { background: #d4bdea; }
.pc4 { background: #f0aaa0; } .pc5 { background: #a9c3ef; } .pc6 { background: #e9e08e; } .pc7 { background: #c5ccd0; }

/* ---- datový list ---- */
.sheet-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 14px; }
.sheet-img { background: #fff; display: flex; align-items: center; justify-content: center; padding: 14px; min-height: 220px; }
.sheet-img img { max-height: 340px; width: auto; }
.cap { font-size: .8rem; color: var(--muted); text-align: center; margin-top: 6px; }

/* ---- patička ---- */
footer.site { background: var(--steel1); color: #b9c7cc; padding: 22px 0 30px; font-size: .85rem; }
footer.site a { color: #d6e1e5; }
footer.site .wrap { display: grid; gap: 10px; }

/* ---- tisk ---- */
@media print {
  body { background: #fff; font-size: 11pt; }
  .top, .preview-bar, .actions, .no-print, footer.site .nav, .filters { display: none !important; }
  main { padding: 0; }
  .card { border: 1px solid #999; break-inside: avoid; }
  .cut { clip-path: none; box-shadow: none; border: 1px solid #999; }
  a { color: #000; text-decoration: none; }
  .tbl-scroll { overflow: visible; border: 0; }
  .metric.big, .metric.big.ok, .metric.big.warn, .metric.big.bad { background: #fff !important; border: 1px solid #333; }
  .metric.big .v, .metric.big .k, .metric.big .s, .metric.big .v small { color: #000 !important; }
  .print-only { display: block !important; }
}
.print-only { display: none; }
@media print {
  .crumbs { display: none; }
  main { padding: 0 !important; }
  .cols.two { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 12px; align-items: start; }
  .tbl th { white-space: normal; position: static; }
  .sheet-img { min-height: 0; padding: 8px; }
  .sheet-img img { max-height: 240px; }
  .sheet-head { margin-bottom: 8px; }
  h1 { font-size: 19pt; }
  .lead { font-size: 11pt; }
  .card { padding: 12px; }
  .tbl th, .tbl td { padding: 5px 7px; }
  footer.site { background: none; color: #444; border-top: 1px solid #999; padding: 8px 0 0; font-size: 8.5pt; margin-top: 10px; }
  footer.site a { color: #444; }
  footer.site .wrap { gap: 3px; }
}

/* ---- náhled průřezu (ocel a dřevo) ---- */
.note.info.small { display: flex; gap: 14px; align-items: center; }
.secsvg { width: 120px; height: 80px; flex: none; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.secsvg .s-fill { fill: #8a979d; stroke: var(--steel1); stroke-width: 1.2; }
.secsvg .s-hole { fill: #fff; stroke: var(--steel1); stroke-width: 1; }
.secsvg .s-txt { font: 9px var(--mono); fill: var(--ink2); }

/* ---- přehled případů nahoře vedle zadání ---- */
#topverdict .verdict { margin-bottom: 10px; padding: 9px 12px; }
@media (min-width: 900px) and (min-height: 860px) {
  .cases-card { position: sticky; top: 74px; }          /* zůstane na očích při psaní do formuláře, jen když se vejde na výšku okna */
}
.cases-card .case { padding: 8px 10px 10px; }
.cases-card .pic { height: 48px; }

/* ---- strom nástrojů, úvodní stránka, větve ---- */
.home-search { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 4px; max-width: 760px; }
.home-search input[type="search"] { flex: 1 1 280px; font: inherit; font-size: 16px; padding: 12px 14px; min-height: 48px; border: 1px solid #b7c2c8; border-radius: 6px; color: var(--ink); background: #fff; }
.home-search .btn { min-height: 48px; }
.doors { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.door { display: flex; flex-direction: column; gap: 6px; padding: 18px; background: var(--dlazdice); text-decoration: none; color: inherit; border-left: 4px solid var(--steel3); transition: background .15s, transform .15s; }
.door:hover { background: #f5fbfd; transform: translateY(-1px); border-left-color: var(--accent); }
.door h3 { margin: 0; font-size: 1.12rem; color: var(--ink); }
.door p { margin: 0; color: var(--ink2); font-size: .95rem; }
.door .who { font-size: .8rem; color: var(--muted); margin-top: auto; padding-top: 6px; }
.small-doors { grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); }
.small-doors .door { padding: 12px 14px; }
.small-doors .door h3 { font-size: 1.02rem; }
.door.off, .door.off:hover { background: #eef1f3; border-left-color: #c3ccd1; transform: none; cursor: default; opacity: .7; }
.door.off h3 { color: var(--muted); }
.siblings .chip.off, .siblings .chip.off:hover { color: var(--muted); background: #eef1f3; border-color: #d3dadd; cursor: default; opacity: .7; }
.door .go { font-family: var(--mono); font-size: .8rem; color: var(--accent-ink); }
ul.plain { margin: 0 0 6px; padding-left: 18px; color: var(--ink2); font-size: .95rem; }
ul.plain li { margin-bottom: 4px; }
.siblings { display: flex; flex-wrap: wrap; gap: 8px; }
.siblings .chip { text-decoration: none; color: var(--ink2); }
.siblings .chip:hover { border-color: var(--accent); background: var(--accent-soft); }

.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 14px 0 10px; border-bottom: 2px solid var(--line); }
.tabs button { font: inherit; font-weight: 600; padding: 10px 14px; border: 0; background: none; cursor: pointer; color: var(--ink2); border-bottom: 3px solid transparent; margin-bottom: -2px; min-height: 44px; }
.tabs button:hover { color: var(--accent-ink); }
.tabs button[aria-selected="true"] { color: var(--accent-ink); border-bottom-color: var(--accent-ink); }
.tree-filters { margin-top: 14px; }
.tree-filters .st-filter[aria-pressed="false"] { opacity: .5; text-decoration: line-through; }
.tree-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
details.fam { margin-bottom: 14px; }
details.fam > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; list-style: none; padding: 8px 12px; background: var(--dlazdice); color: var(--ink); border: 1px solid var(--line); border-left: 4px solid var(--steel3); border-radius: 6px; }
details.fam > summary::-webkit-details-marker { display: none; }
details.fam > summary h3 { margin: 0; color: var(--ink); font-size: 1rem; }
details.fam > summary .ncnt { color: var(--muted); }
details.node { background: var(--card); border: 1px solid var(--line); border-radius: 6px; margin: 6px 0 0 0; }
details.node > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; padding: 10px 12px; min-height: 44px; list-style: none; }
details.node > summary::-webkit-details-marker { display: none; }
details.node > summary::before { content: "▸"; color: var(--accent-ink); margin-right: 8px; transition: transform .15s; }
details.node[open] > summary::before { transform: rotate(90deg); }
details.node > summary .nname { flex: 1 1 auto; font-weight: 600; }
.ncnt { font-family: var(--mono); font-size: .78rem; color: var(--muted); white-space: nowrap; }
.nbody { padding: 2px 12px 12px; border-top: 1px solid var(--line2); }
.nlink { display: inline-block; margin: 8px 0 4px; }
.ngrp { margin: 12px 0 2px; font-size: .85rem; color: var(--steel3); text-transform: uppercase; letter-spacing: .05em; }
.nlist { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; }
.nt { padding: 8px 10px; border: 1px solid var(--line2); border-left: 3px solid var(--line); border-radius: 4px; background: #fafcfd; min-width: 0; }
.nt[data-stav="hotovo"] { border-left-color: var(--ok); }
.nt[data-stav="remeslo"] { border-left-color: var(--accent); }
.nt[data-stav="nedoporuceno"] { border-left-color: var(--bad); opacity: .85; }
.nt-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.nt-n { font-weight: 600; }
.nt-c { font-size: .9rem; color: var(--ink2); margin-top: 2px; }
.nt-p { font-size: .8rem; color: var(--muted); margin-top: 2px; }
.nid { font-family: var(--mono); font-size: .72rem; color: var(--muted); }
.st { display: inline-block; font-family: var(--mono); font-size: .66rem; letter-spacing: .05em; text-transform: uppercase; padding: 1px 6px; border-radius: 4px; background: #eceff1; color: var(--ink2); white-space: nowrap; }
.st-hotovo { background: var(--ok-bg); color: var(--ok); }
.st-remeslo { background: var(--accent-soft); color: var(--accent-ink); }
.st-navrh { background: #eceff1; color: var(--muted); }
.st-napad { background: #efe7fb; color: #5a2e9a; }
.st-nedoporuceno { background: var(--bad-bg); color: var(--bad); }
.nt.hide, details.hide { display: none; }

/* ---- související větve pod nástrojem ---- */
.related { margin-top: 30px; padding-top: 14px; border-top: 1px solid var(--line); font-size: .92rem; }
.related h2 { font-size: 1rem; margin-bottom: .4em; }
.related p { margin: 0 0 .4em; }
.popular { margin: 8px 0 0; color: #cfdce1; }
.popular a { color: #fff; text-decoration-color: var(--accent); }

/* ---- formulář „Chybí vám kalkulačka?“ (base.html, js/napad.js) ---- */
.napad { padding: 8px 0 28px; }
.napad details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; max-width: 720px; }
.napad summary { cursor: pointer; font-weight: 650; color: var(--ink2); }
.napad details[open] summary { margin-bottom: 12px; }
.napad textarea, .napad input[type="email"], .napad input[type="tel"] { width: 100%; font: inherit; font-size: 16px; padding: 10px 11px; color: var(--ink); background: #fff; border: 1px solid #b7c2c8; border-radius: 6px; min-height: 44px; }
.napad textarea { resize: vertical; min-height: 96px; }
.napad textarea:focus, .napad input:focus { outline: 3px solid var(--accent); outline-offset: 1px; }
.napad .req { color: var(--bad); }
.napad .np-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.napad .np-q { font-size: 1.1rem; white-space: nowrap; }
.napad .np-cap input { max-width: 110px; }
.napad .field.err input, .napad .field.err textarea { border-color: var(--bad); }
.napad .np-err { color: var(--bad); font-size: .85rem; margin-top: 4px; }
.napad #np-msg:not(:empty) { margin-top: 12px; }

/* ---- technická schémata (js/nakres.js) ---- */
.nk-fig { margin: 0 0 14px; padding: 8px 8px 6px; border: 1px solid var(--line); border-radius: 6px; background: #fafcfd; }
.nk-fig svg { display: block; width: 100%; height: auto; }
.nk-fig figcaption { font-size: .78rem; color: var(--muted); margin-top: 4px; }
.nk-figs { display: grid; gap: 10px; margin-bottom: 14px; }
.nk-figs .nk-fig { margin: 0; }
.nk-fig h3 { margin: 0 0 4px; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink2); }
.nk .ln { stroke: var(--steel1); stroke-width: 1.6; fill: none; stroke-linejoin: round; stroke-linecap: round; }
.nk .thin { stroke: var(--steel1); stroke-width: 1; fill: none; }
.nk .dash { stroke: var(--muted); stroke-width: 1.1; stroke-dasharray: 5 4; fill: none; }
.nk .fill { fill: #cfe7ee; stroke: var(--steel1); stroke-width: 1.4; stroke-linejoin: round; }
.nk .fill2 { fill: #e6eef1; stroke: #7d8d94; stroke-width: 1.2; stroke-dasharray: 4 3; stroke-linejoin: round; }
.nk .fill3 { fill: #f2e3b5; stroke: var(--steel1); stroke-width: 1.3; stroke-linejoin: round; }
.nk .okf { fill: var(--ok); fill-opacity: .12; stroke: var(--ok); stroke-width: 2; stroke-dasharray: 7 4; }
.nk .badf { fill: var(--bad); fill-opacity: .12; stroke: var(--bad); stroke-width: 2; stroke-dasharray: 7 4; }
.nk .slab { fill: #b7c2c8; stroke: #6f7f86; stroke-width: 1; }
.nk .dim { stroke: var(--accent-ink); stroke-width: 1.1; fill: none; }
.nk .ext { stroke: var(--accent-ink); stroke-width: .8; stroke-opacity: .6; }
.nk .arh { fill: var(--accent-ink); }
.nk .arhd { fill: var(--steel1); }
.nk text { font-family: var(--mono); font-size: 12px; fill: var(--ink); paint-order: stroke; stroke: #fafcfd; stroke-width: 3px; stroke-linejoin: round; }
.nk text.dt { fill: var(--accent-ink); font-weight: 600; }
.nk text.sm { font-size: 10.5px; fill: var(--muted); font-weight: 400; }
.nk text.badt { fill: var(--bad); font-weight: 600; }
.nk text.okt { fill: var(--ok); font-weight: 600; }
@media print { .nk-fig { break-inside: avoid; } }

/* ---- zvětšení nákresu (js/zoom.js): původní prvek se přepne na celou obrazovku ---- */
.nk-fig, .sheetfig { position: relative; cursor: zoom-in; }
.nk-fig::after, .sheetfig::after { content: "⤢"; position: absolute; top: 4px; right: 8px; font-size: 16px; line-height: 1; color: var(--muted); opacity: .75; pointer-events: none; }
.nk-fig:focus-visible, .sheetfig:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.nk-zoom { position: fixed; inset: 0; z-index: 200; background: rgba(20, 28, 32, .94); }
.nk-zoom span { position: absolute; left: 14px; top: 0; height: 46px; display: flex; align-items: center; color: #cfdadf; font-size: .85rem; }
.nk-zoom button { position: absolute; right: 10px; top: 3px; font: inherit; font-weight: 600; min-height: 40px; padding: 0 16px; border-radius: 6px; border: 1px solid #6a777d; background: #36414a; color: #fff; cursor: pointer; }
.nk-zoomed.nk-zoomed { position: fixed; z-index: 201; top: 48px; left: 10px; right: 10px; bottom: 12px; margin: 0; overflow: auto; -webkit-overflow-scrolling: touch; cursor: default; }
.nk-zoomed::after { display: none !important; }
.nk-zoomed.nk-zoomed svg { width: clamp(680px, 100%, 900px); max-width: none; margin: 0 auto; }
@media print { .nk-fig::after, .sheetfig::after, .nk-zoom { display: none !important; } }
