/* JPA Design free tools (website/tools.py): the calculator card, its fields, results, next step, bar diagrams. Site tokens only
   (style.css :root), so light and dark mode come for free. */
.tl-app [hidden] { display: none !important; }        /* the fields' own display rules would otherwise beat the hidden attribute */
.tl-app { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(18px, 3vw, 40px); background: var(--paper2); border-radius: 22px;
          padding: clamp(18px, 2.6vw, 34px); align-items: start; }
.tl-in { display: grid; gap: 14px; min-width: 0; }
.tl-in .row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: end; }   /* hidden fields take no cell */
.tl-in label, .tl-in .lbl { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink2); }
.tl-in label small, .tl-in .hint { font-weight: 400; font-size: 13px; color: var(--ink2); }
.tl-in input[type="text"], .tl-in select, .tl-in textarea { font: 400 16px/1.4 var(--sans); color: var(--ink); background: var(--paper);
          border: 1.5px solid var(--rule2); border-radius: 12px; padding: 11px 13px; width: 100%; min-width: 0; }
.tl-in textarea { resize: vertical; min-height: 150px; font-family: ui-monospace, Consolas, "SF Mono", monospace; font-size: 15px; }
.tl-in input:focus, .tl-in select:focus, .tl-in textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(200,16,46,.18); }
.tl-in fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.tl-in legend { font-size: 14px; font-weight: 600; color: var(--ink2); margin-bottom: 6px; padding: 0; }
.tl-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.tl-seg label { display: inline-flex; position: relative; margin: 0; }
.tl-seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tl-seg span { display: inline-block; padding: 8px 14px; border-radius: 999px; background: var(--card); color: var(--ink); font: 600 14px/1.2 var(--sans);
               border: 1.5px solid var(--rule2); }
.tl-seg input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tl-seg input:focus-visible + span { outline: 3px solid var(--red); outline-offset: 2px; }
.tl-checks { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 15px; color: var(--ink); }
.tl-checks label { display: inline-flex; gap: 8px; align-items: center; font-weight: 500; color: var(--ink); }
.tl-checks input { accent-color: var(--red); width: 18px; height: 18px; margin: 0; }
.tl-in .btn { justify-self: start; }
.tl-msg { font-size: 14px; color: var(--red); min-height: 1.2em; margin: 0; }
.tl-pick { background: var(--card); border-radius: 14px; padding: 14px 16px; }
.tl-pick p { margin: 0 0 .5em; font-size: 15px; }
.tl-pick p:last-child { margin-bottom: 0; }
.tl-per b { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.tl-per span { display: block; color: var(--ink2); font-size: 14px; }
.tl-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.tl-out:empty { display: none; }
.tl-res { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.tl-res > div { background: var(--card); border-radius: 14px; padding: 14px 16px; min-width: 0; }
.tl-res span { display: block; font-size: 13px; color: var(--ink2); }
.tl-res b { display: block; font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.15; margin: 2px 0 4px;
            overflow-wrap: anywhere; }
.tl-res small { display: block; font-size: 13px; color: var(--ink2); line-height: 1.35; }
.tl-call { background: var(--card); border-left: 4px solid var(--red); border-radius: 4px 12px 12px 4px; padding: 12px 14px; font-size: 15px;
           margin: 0 0 12px; max-width: none; }
.tl-out .small { margin: 0 0 10px; max-width: none; }
.tl-table, .tl-list { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 14px; overflow: hidden; font-size: 14.5px; margin: 0 0 12px; }
.tl-table caption { text-align: left; font-size: 13px; color: var(--ink2); padding: 0 0 6px; }
.tl-table th, .tl-table td, .tl-list th, .tl-list td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.tl-table th, .tl-list th { font-size: 12.5px; font-weight: 600; color: var(--ink2); }
.tl-table .num, .tl-list .num { text-align: right; white-space: nowrap; }
.tl-wrap { overflow-x: auto; min-width: 0; max-width: 100%; position: relative; }   /* holds the table's .vh header inside the scroll box */
.tl-x { font: 600 12.5px var(--sans); color: var(--ink2); background: none; border: 0; padding: 2px 0; cursor: pointer; text-decoration: underline; }
.tl-x:hover, .tl-x:focus-visible { color: var(--red); }
.tl-tools { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.tl-bars { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 10px; counter-reset: none; }
.tl-bars li p { margin: 0 0 4px; font-size: 13.5px; color: var(--ink2); max-width: none; }
.tl-bar { display: flex; height: 30px; border-radius: 6px; overflow: hidden; background: var(--rule); }
.tl-seg-p { background: var(--ink); color: var(--paper); border-right: 2px solid var(--red); display: flex; align-items: center; justify-content: center;
            min-width: 0; overflow: hidden; }
.tl-seg-p i, .tl-seg-o i { font: 600 11.5px/1 var(--sans); font-style: normal; white-space: nowrap; padding: 0 3px; overflow: hidden; text-overflow: clip; }
.tl-seg-o { background: repeating-linear-gradient(135deg, var(--rule) 0 6px, var(--rule2) 6px 8px); color: var(--ink2); display: flex; align-items: center;
            justify-content: center; min-width: 0; overflow: hidden; }
.tl-elev { width: 100%; height: auto; display: block; margin: 4px 0 10px; background: var(--card); border-radius: 12px; }
.tl-elev .p { fill: var(--ink2); }
.tl-elev .r { fill: var(--ink); }
.tl-elev .b { fill: var(--red); }
.tl-setout { background: var(--card); }
.tl-setout ol { margin: 10px 0 0; padding-left: 1.3em; columns: 2; font-size: 14.5px; color: var(--ink2); }
.tl-next { background: var(--okbg); border-radius: 16px; padding: 16px 18px; }
.tl-next h2 { font-size: 1.15rem; letter-spacing: -.02em; margin: 0 0 .5em; max-width: none; }
.tl-next ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.tl-next li { display: grid; gap: 4px; }
.tl-next li b { font-size: 15.5px; }
.tl-next li span { font-size: 14.5px; color: var(--ink2); }
.tl-next li a { font-weight: 700; font-size: 15px; color: var(--red); }
.tl-geo { font-size: 14.5px; color: var(--ink2); margin: 14px 0 0; max-width: 80ch; }
.tl-nojs { background: var(--card); border-radius: 12px; padding: 12px 14px; font-size: 14.5px; }
.tl-live .tl-nojs { display: none; }
.tl-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 1.8vw, 20px); }
.tl-cards a { display: flex; flex-direction: column; gap: 6px; text-decoration: none; background: var(--paper2); border-radius: var(--r); padding: 20px 22px; }
section.alt .tl-cards a { background: var(--card); }
.tl-cards a:hover { color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.tl-cards h3 { margin: 0; }
.tl-cards p { color: var(--ink2); font-size: 15px; margin: 0; }
.tl-cards .tl-k { font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--red); }
.tl-cards .tl-f { color: var(--ink); font-weight: 600; font-size: 14.5px; margin-top: auto; padding-top: 8px; }
.tl-more { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 28px; }
.tl-more li { padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 15px; }
.tl-more a { font-weight: 700; }
.tl-more span { display: block; color: var(--ink2); font-size: 14px; }
/* the tools added 5 Nov 2026: form headings, five-up results, charts with a marked row, the flat pattern and the weld section */
.tl-in .tl-h, .tl-out .tl-h { font-size: 1.05rem; letter-spacing: -.01em; margin: 6px 0 -4px; max-width: none; }
.tl-out .tl-h { margin: 6px 0 10px; }
.tl-res5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tl-res5 b { font-size: clamp(1.15rem, 1.8vw, 1.45rem); }
.tl-chart td small { display: block; font-size: 11.5px; color: var(--ink2); }
.tl-chart th[scope="row"] { font-weight: 700; color: var(--ink); }
.tl-table tr.on td, .tl-table tr.on th { background: var(--okbg); }
.tl-flat, .tl-weld { width: 100%; height: auto; display: block; margin: 4px 0 12px; background: var(--card); border-radius: 12px; }
.tl-weld { max-width: 360px; }
.tl-flat .pl { fill: var(--paper2); stroke: var(--ink); stroke-width: 1.5; }
.tl-flat .bz { fill: var(--rule2); }
.tl-flat .bl { stroke: var(--red); stroke-width: 1.5; stroke-dasharray: 5 3; }
.tl-flat text, .tl-weld text { font: 600 11.5px var(--sans); fill: var(--ink2); }
.tl-weld .pt { fill: var(--rule2); }
.tl-weld .wd { fill: var(--red); opacity: .85; }
.tl-weld .th { stroke: var(--ink); stroke-width: 2; }
.tl-weld .lg { fill: var(--ink); }
.tl-facts { margin: .2em 0 1em; padding-left: 1.2em; }
.tl-facts li { margin: .35em 0; }
/* the tools added 6 Nov 2026: check lists, the stair / ramp / spiral drawings, two charts side by side */
.tl-ck { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.tl-ck li { display: grid; grid-template-columns: 4.6em minmax(0, 1fr); gap: 10px; align-items: baseline; background: var(--card); border-radius: 10px;
            padding: 9px 12px; font-size: 14.5px; }
.tl-ck b { font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.tl-ck li.ok b { color: var(--ink2); }
.tl-ck li.no { box-shadow: inset 4px 0 0 var(--red); }
.tl-ck li.no b { color: var(--red); }
.tl-ck li.do b { color: var(--ink2); font-weight: 600; }
.tl-ck small { display: inline-block; color: var(--ink2); font-size: 12.5px; margin-left: 4px; }
.tl-stairsvg .st { fill: none; stroke: var(--ink2); stroke-width: 3; stroke-linejoin: round; }
.tl-stairsvg .pl { stroke: var(--ink); stroke-width: 1.2; stroke-dasharray: 6 4; }
.tl-stairsvg .hr { stroke: var(--red); stroke-width: 2.5; }
.tl-elev .rp { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.tl-planrow { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: 14px; align-items: center; margin: 0 0 12px; }
.tl-plan { width: 100%; height: auto; display: block; background: var(--card); border-radius: 12px; }
.tl-plan .o { fill: var(--paper2); stroke: var(--ink); stroke-width: 1.5; }
.tl-plan .t { stroke: var(--ink2); stroke-width: 1; }
.tl-plan .m { fill: none; stroke: var(--red); stroke-width: 1.6; stroke-dasharray: 5 3; }
.tl-plan .c { fill: var(--ink); }
.tl-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tl-chart tr.fine th, .tl-chart tr.fine td { color: var(--ink2); }
.tl-chart td i { color: var(--ink2); }
.tl-in .tl-checks { font-size: 14.5px; }
.tl-set { display: grid; gap: 14px; border-top: 1px solid var(--rule); padding-top: 12px; }
@media (max-width: 1000px) {
  .tl-app { grid-template-columns: minmax(0, 1fr); }
  .tl-cards, .tl-more { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .tl-res, .tl-res5 { grid-template-columns: 1fr 1fr; }
  .tl-cards, .tl-more { grid-template-columns: 1fr; }
  .tl-setout ol { columns: 1; }
  .tl-two { grid-template-columns: minmax(0, 1fr); }
  .tl-planrow { grid-template-columns: minmax(0, 1fr); }
  .tl-planrow .tl-plan { max-width: 260px; }
}
/* a phone: each line of a list stacks, the name across the top, its figures labelled underneath */
@media (max-width: 560px) {
  .tl-list thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tl-list, .tl-list tbody { display: block; width: 100%; }
  .tl-list tr { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px 10px; padding: 10px 12px; border-bottom: 1px solid var(--rule); }
  .tl-list td { border: 0; padding: 0; text-align: left; white-space: normal; min-width: 0; }
  .tl-list .num { text-align: left; }
  .tl-list td:first-child { grid-column: 1 / 4; font-weight: 600; }
  .tl-list td[colspan] { grid-column: 1 / -1; }
  .tl-list td.tl-rm { grid-column: 4; grid-row: 1; justify-self: end; }
  .tl-list td[data-l]::before { content: attr(data-l); display: block; font-size: 11.5px; font-weight: 400; color: var(--ink2); }
  .tl-table th, .tl-table td { padding: 8px 6px; }
  .tl-table { font-size: 13.5px; }
}
@media (max-width: 420px) {
  .tl-res { grid-template-columns: 1fr; }
  .tl-res.tl-res5 { grid-template-columns: 1fr 1fr; }
  .tl-res5 > div { padding: 12px; }
  .tl-in .row { grid-template-columns: minmax(0, 1fr); }
}
