/* svikarr.com/tools/: the free tools (pages built by site/src/tools/server.ts, made live by src/tools/client.ts).
   Same tokens as styles.css: porcelain ground, white surfaces, navy ink, royal blue for actions only. */

.tool-banner { min-height: clamp(380px, 52vh, 520px); background:
  radial-gradient(1200px 500px at 85% 0%, rgb(36 89 201 / 0.35), transparent 60%),
  linear-gradient(180deg, var(--navy), #0f1d3d); }
.tool-banner::after { display: none; }
.tool-banner.short { min-height: 220px; }
.tool-banner h1 { max-width: 20ch; font-size: clamp(2.3rem, 5.2vw, 4.2rem); line-height: 1.04; }
.tool-banner .lead { max-width: 62ch; }
.tool-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1.4rem; }
.tool-meta span { font-size: 0.8125rem; padding: 6px 12px; border: 1px solid rgb(255 255 255 / 0.28); border-radius: 999px; color: rgb(255 255 255 / 0.9); }
.tool-meta span.shared-by { border-style: dashed; }

.tool-section { padding-block: clamp(28px, 5vw, 56px) clamp(40px, 6vw, 72px); }
.tool-layout { display: grid; grid-template-columns: minmax(290px, 380px) minmax(0, 1fr); gap: clamp(20px, 3vw, 36px); align-items: start; }
@media (max-width: 960px) { .tool-layout { grid-template-columns: minmax(0, 1fr); } }
.tool-form { background: var(--white); border: 1px solid var(--fog); border-radius: var(--r-sheet); padding: clamp(18px, 2.4vw, 26px); box-shadow: var(--shadow-1); }
.tool-example { font-size: 0.875rem; color: var(--graphite-2); margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--fog); }

/* fields */
.f-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
.f-grid > .wide, .f-grid > .f-rows, .f-grid > .f-head { grid-column: 1 / -1; }
.f-grid > [hidden] { display: none; }
@media (max-width: 520px) { .f-grid { grid-template-columns: minmax(0, 1fr); } }
.f { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.f-label { font-size: 0.8125rem; font-weight: 600; color: var(--graphite); }
.f small { font-size: 0.78rem; color: var(--graphite-2); line-height: 1.4; }
.f-in { display: flex; align-items: center; gap: 6px; background: var(--plaster); border: 1px solid #d9dee8; border-radius: var(--r-ctl); padding: 0 12px; min-height: 44px; transition: border-color .15s, box-shadow .15s; }
.f-in:focus-within { border-color: var(--container); box-shadow: 0 0 0 3px rgb(36 89 201 / 0.14); background: var(--white); }
.f-in em { font-style: normal; font-size: 0.875rem; color: var(--graphite-2); white-space: nowrap; }
.f-in input, .f-in select, .f-in textarea { flex: 1; min-width: 0; width: 100%; border: 0; background: transparent; font: 500 1rem/1.3 var(--text); color: var(--graphite); padding: 10px 0; outline: none; }
.f-in textarea { resize: vertical; }
.f-select select { appearance: none; padding-right: 24px; text-overflow: ellipsis; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234a5570' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") right center / 11px no-repeat; }
.f-head { font: 600 0.95rem var(--text); padding-top: 6px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label, .chips label { position: relative; cursor: pointer; }
.seg input, .chips input { position: absolute; opacity: 0; pointer-events: none; }
.seg span, .chips span { display: inline-flex; align-items: center; min-height: 38px; padding: 7px 13px; border: 1px solid #d9dee8; border-radius: 999px; font-size: 0.875rem; font-weight: 500; background: var(--white); transition: background .15s, border-color .15s, color .15s; }
.seg input:checked + span { background: var(--graphite); border-color: var(--graphite); color: var(--white); }
.chips input:checked + span { background: var(--royal-wash); border-color: var(--container); color: var(--container-deep); }
.chips input:checked + span::before { content: "✓"; margin-right: 6px; font-weight: 700; }
.seg input:focus-visible + span, .chips input:focus-visible + span { outline: 2px solid var(--container); outline-offset: 2px; }
.f-toggle { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; cursor: pointer; }
.f-toggle input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--container); flex: none; }
.f-toggle small { display: block; }
.f-action .t-btn { width: 100%; }

/* editable lists */
.r-grid { display: grid; gap: 6px; }
.r-head, .r-row { display: grid; grid-template-columns: minmax(0, 2.2fr) repeat(calc(var(--cols) - 1), minmax(0, 1fr)) 32px; gap: 6px; align-items: center; }
.r-head span { font-size: 0.75rem; color: var(--graphite-2); font-weight: 600; }
.r-row .f { gap: 0; }
/* row labels stay for screen readers; the header row shows them on screen */
.r-row .f-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.r-row .f-in { min-height: 38px; padding: 0 8px; }
.r-row .f-in input, .r-row .f-in select { font-size: 0.9rem; padding: 7px 0; }
@media (max-width: 760px) { .r-row .f-in input, .r-row .f-in select, .f-in input, .f-in select, .f-in textarea { font-size: 16px; } }
.r-del { width: 32px; height: 32px; border-radius: 50%; border: 1px solid #d9dee8; background: var(--white); color: var(--graphite-2); font-size: 1.1rem; cursor: pointer; }
.r-del:hover { border-color: #c0392b; color: #c0392b; }
.r-add { margin-top: 8px; background: none; border: 1px dashed #b9c2d3; border-radius: var(--r-ctl); padding: 9px 12px; font: 600 0.875rem var(--text); color: var(--container); cursor: pointer; width: 100%; }
.r-add:hover { border-color: var(--container); background: var(--royal-wash); }

/* buttons */
.t-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 0.95rem/1 var(--text); padding: 0.9rem 1.3rem; border-radius: var(--r-ctl); border: 1px solid var(--container); background: var(--container); color: var(--white); cursor: pointer; text-decoration: none; }
.t-btn:hover { background: var(--container-deep); border-color: var(--container-deep); }
.t-btn.line { background: transparent; color: var(--container); }
.t-btn.line:hover { background: var(--royal-wash); }
.t-btn.small { padding: 0.6rem 0.9rem; font-size: 0.85rem; }
.t-btn:disabled { opacity: 0.6; cursor: wait; }

/* results */
.tool-out-col { min-width: 0; display: grid; gap: 16px; align-content: start; }
.tool-out { min-width: 0; }
/* the next step, right under the answer */
.t-next { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px; padding: 16px 18px; border-radius: var(--r-card); background: var(--navy); color: var(--white); }
.t-next p { margin: 0; font-size: 0.95rem; color: rgb(255 255 255 / 0.86); max-width: 46ch; }
.t-next p b { color: var(--white); }
.t-next-act { display: flex; flex-wrap: wrap; gap: 8px; }
.t-next .t-btn { background: var(--white); color: var(--navy); border-color: var(--white); }
.t-next .t-btn:hover { background: var(--royal-wash); }
.t-next .t-btn.line { background: transparent; color: var(--white); border-color: rgb(255 255 255 / 0.5); }
.t-next .t-btn.line:hover { background: rgb(255 255 255 / 0.1); }
@media (max-width: 560px) { .t-next-act, .t-next-act .t-btn { width: 100%; } }
/* pointer from a tool to the matching guide */
.t-guide { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 6px 18px; margin-top: 18px; padding: 14px 18px; border: 1px solid var(--fog); border-radius: var(--r-card); background: var(--white); color: var(--graphite); text-decoration: none; }
.t-guide:hover { border-color: var(--container); }
.t-guide-k { font-weight: 600; color: var(--navy); white-space: nowrap; }
.t-guide-t { color: var(--graphite-2); font-size: 0.95rem; }
.t-guide-go { color: var(--container); font-weight: 600; white-space: nowrap; }
@media (max-width: 720px) { .t-guide { grid-template-columns: minmax(0, 1fr); } }
.guide .t-h3 { margin-top: 1.4rem; }
.guide .t-table td.small { font-size: 0.9rem; color: var(--graphite-2); }
.guide .t-table.freight th, .guide .t-table.freight td { padding: 10px; }
.guide .t-table.freight td.n, .guide .t-table.freight th.n { white-space: nowrap; }
/* phones: the port stays in view while the figures scroll */
.guide .t-table.freight th:first-child, .guide .t-table.freight td:first-child { position: sticky; left: 0; background: var(--white); min-width: 7.5em; }
.guide .t-table.freight thead th:first-child { background: var(--plaster); }
.guide-asks { margin-top: 0; }
.hub-start { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 1.6rem; }
.hub-start .t-btn { background: var(--white); color: var(--navy); border-color: var(--white); }
.hub-start .t-btn:hover { background: var(--royal-wash); }
.hub-start-alt { color: rgb(255 255 255 / 0.86); font-weight: 500; text-underline-offset: 4px; }
.t-result { display: grid; gap: 18px; }
.t-headline { font-family: var(--display); font-weight: 400; font-size: clamp(1.35rem, 2.2vw, 1.75rem); line-height: 1.25; letter-spacing: -0.01em; max-width: 46ch; }
.t-headline b { font-weight: 700; color: var(--container-deep); }
.t-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.t-stat.long strong { font-size: clamp(1.02rem, 1.4vw, 1.15rem); line-height: 1.3; }
.t-stat { background: var(--white); border: 1px solid var(--fog); border-radius: var(--r-card); padding: 14px 16px; display: grid; gap: 4px; align-content: start; }
.t-stat-label { font-size: 0.78rem; color: var(--graphite-2); font-weight: 600; }
.t-stat strong { font-family: var(--display); font-size: clamp(1.25rem, 2vw, 1.6rem); font-weight: 600; line-height: 1.15; overflow-wrap: anywhere; }
.t-stat-sub { font-size: 0.8rem; color: var(--graphite-2); }
.t-stat.good { border-color: #b6dcc6; background: #f2faf5; }
.t-stat.warn { border-color: #ecd59b; background: #fffaf0; }
.t-stat.bad { border-color: #f0b9b2; background: #fff5f4; }
.t-h3 { font: 600 1.05rem var(--text); margin-top: 6px; }
.t-table { overflow-x: auto; border: 1px solid var(--fog); border-radius: var(--r-card); background: var(--white); }
.t-table table { width: 100%; border-collapse: collapse; font-size: 0.92rem; line-height: 1.45; }
.t-table th, .t-table td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--fog); }
.t-table thead th { background: var(--plaster); font-size: 0.8rem; font-weight: 600; color: var(--graphite-2); }
.t-table .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.t-table tfoot td { font-weight: 700; border-bottom: 0; background: var(--plaster); }
.t-table tbody tr:last-child td { border-bottom: 0; }
.t-table small { color: var(--graphite-2); }
.t-table a, .t-result a, .tool-prose a { color: var(--container); }
.t-table td a { color: var(--graphite); text-decoration: underline; text-decoration-color: #b9c2d3; text-underline-offset: 3px; }
.t-table td a:hover { color: var(--container); text-decoration-color: currentColor; }
.t-good { color: #1d6b40; font-weight: 600; }
.t-bad { color: #9b2b1e; font-weight: 600; }
.t-warn { color: #8a5a00; font-weight: 600; }
.t-note { border-radius: var(--r-card); padding: 12px 16px; font-size: 0.92rem; line-height: 1.5; border: 1px solid var(--fog); background: var(--white); }
.t-note.info { background: var(--royal-wash); border-color: #cddcf6; }
.t-note.good { background: #f2faf5; border-color: #b6dcc6; }
.t-note.warn { background: #fffaf0; border-color: #ecd59b; }
.t-note.bad { background: #fff5f4; border-color: #f0b9b2; }
.t-badge { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; vertical-align: middle; }
.t-badge.good { background: #dff2e7; color: #1d6b40; }
.t-badge.warn { background: #fbefd0; color: #7a5a00; }
.t-badge.bad { background: #fde3df; color: #9b2b1e; }
.t-badge.info { background: var(--royal-wash); color: var(--container-deep); }
.t-list { padding-left: 1.2em; display: grid; gap: 6px; font-size: 0.95rem; }
.t-list li::marker { color: var(--container); }
.t-more { font-weight: 600; font-size: 0.95rem; }
.t-more a { text-decoration: none; }
.t-small { font-size: 0.82rem; color: var(--graphite-2); }

/* charts */
.t-stack { display: flex; height: 16px; border-radius: 999px; overflow: hidden; background: var(--fog); }
.t-stack .seg { height: 100%; }
.t-legend { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.82rem; color: var(--graphite-2); }
.t-legend li { display: inline-flex; align-items: center; gap: 6px; }
.t-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.t-legend b { color: var(--graphite); font-weight: 600; }
.s0 { background: var(--container); } .s1 { background: var(--navy); } .s2 { background: var(--celadon); } .s3 { background: #6b7a99; }
.s4 { background: #c9a24a; } .s5 { background: #4f8a6e; } .s6 { background: #c7cedb; } .s7 { background: #a25b6a; } .s8 { background: #3f8fb5; } .s9 { background: #8a7b5e; }
.t-gauges { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.t-gauge { background: var(--white); border: 1px solid var(--fog); border-radius: var(--r-card); padding: 12px 14px; display: grid; gap: 8px; }
.t-gauge-top { display: flex; justify-content: space-between; font-size: 0.9rem; font-weight: 600; }
.t-gauge-bar { height: 12px; border-radius: 999px; background: var(--fog); overflow: hidden; }
.t-gauge-bar span { display: block; height: 100%; background: var(--container); border-radius: 999px; }
.t-gauge-bar span.full { background: #c9a24a; }
.t-gauge-sub { font-size: 0.8rem; color: var(--graphite-2); }
.t-gantt { background: var(--white); border: 1px solid var(--fog); border-radius: var(--r-card); padding: 14px; display: grid; gap: 8px; }
.g-row { display: grid; grid-template-columns: minmax(110px, 180px) minmax(0, 1fr); gap: 10px; align-items: center; }
.g-name { font-size: 0.82rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-track { position: relative; height: 16px; background: var(--plaster); border-radius: 4px; }
.g-bar { position: absolute; top: 2px; bottom: 2px; border-radius: 3px; }
.g-today { position: absolute; top: -4px; bottom: -4px; width: 2px; background: #c0392b; }
.g-scale { position: relative; height: 18px; }
.g-scale i { position: absolute; top: 0; transform: translateX(-50%); font-style: normal; font-size: 0.7rem; color: var(--graphite-2); white-space: nowrap; }
.g-scale i::before { content: ""; position: absolute; left: 50%; top: -6px; height: 5px; border-left: 1px solid #c7cedb; }
@media (max-width: 560px) { .g-row { grid-template-columns: minmax(0, 1fr); gap: 4px; } .g-scale-row .g-name { display: none; } }
.t-svg { width: 100%; height: auto; background: var(--white); border: 1px solid var(--fog); border-radius: var(--r-card); }
.t-svg .ln { stroke: var(--graphite); stroke-width: 1.5; }
.t-svg .ln.thin { stroke-width: 1; stroke: #9aa4b8; }
.t-svg .fx { fill: var(--celadon); stroke: var(--container-deep); stroke-width: 1.2; }
.t-svg .tb { fill: #d8c4a4; stroke: #8a6f45; stroke-width: 1; }
.t-svg .person { fill: #c7cedb; }
.t-svg .lb { font: 12px var(--text); fill: var(--graphite-2); }
.t-svg .room { fill: var(--plaster); stroke: var(--graphite); stroke-width: 2; }
.t-svg .zone { fill: none; stroke: var(--container); stroke-dasharray: 5 4; stroke-width: 1; opacity: 0.6; }
.t-svg .rug { fill: #e8e1d6; stroke: #cbbfa9; }
.t-svg .ch { fill: var(--white); stroke: var(--graphite-2); stroke-width: 1; }

/* verdicts, visa, itinerary, map */
.t-verdict { background: var(--white); border: 1px solid var(--fog); border-left: 4px solid var(--fog); border-radius: var(--r-card); padding: 16px 18px; display: grid; gap: 12px; }
.t-verdict.good { border-left-color: #2e8b57; } .t-verdict.warn { border-left-color: #c9a24a; } .t-verdict.bad { border-left-color: #c0392b; }
.t-verdict header { display: grid; gap: 6px; }
.t-verdict h3 { font: 600 1.15rem var(--text); }
.t-verdicts td:first-child a { font-weight: 600; text-decoration: none; color: var(--graphite); }
.t-visa { background: var(--white); border: 1px solid var(--fog); border-radius: var(--r-card); padding: 16px 18px; display: grid; gap: 10px; }
.t-visa h3 { font: 600 1.1rem var(--text); }
.t-days { list-style: none; padding: 0; display: grid; gap: 10px; }
.t-days > li { background: var(--white); border: 1px solid var(--fog); border-radius: var(--r-card); padding: 14px 16px; display: grid; gap: 8px; }
.t-days header span { font-size: 0.78rem; font-weight: 700; color: var(--container); text-transform: none; }
.t-days h3 { font: 600 1.05rem var(--text); }
.t-days small { color: var(--graphite-2); font-size: 0.82rem; }
.t-days ul { list-style: none; padding: 0; display: grid; gap: 4px; font-size: 0.92rem; }
.t-days ul b { display: inline-block; min-width: 4.6rem; color: var(--graphite-2); font-weight: 600; font-size: 0.82rem; }
.t-mapwrap { background: var(--white); border: 1px solid var(--fog); border-radius: var(--r-card); padding: 10px; }
.t-map { width: 100%; height: auto; max-height: 520px; display: block; }
.t-map .river { fill: none; stroke: #cfe0fb; stroke-width: 2.2; }
.t-map .dist circle { fill: var(--royal-wash); stroke: #b9cdf3; stroke-width: 0.4; }
.t-map .dist text { font: 600 2.6px var(--text); fill: var(--graphite); paint-order: stroke; stroke: var(--white); stroke-width: 0.9px; stroke-linejoin: round; }
.t-map .mk text { font: 700 2.3px var(--text); fill: var(--white); pointer-events: none; }
.t-map .mk circle { fill: #b9c2d3; }
.t-map .mk.on circle { fill: var(--container); stroke: var(--white); stroke-width: 0.5; }
.t-district { display: grid; gap: 10px; }
.t-district h3 { font: 600 1.15rem var(--text); }
.t-district h3 span { color: var(--graphite-2); font-weight: 500; margin-left: 6px; }
.t-markets { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.t-market { background: var(--white); border: 1px solid var(--fog); border-radius: var(--r-card); padding: 14px 16px; display: grid; gap: 6px; align-content: start; }
.t-market h4 { font: 600 0.98rem var(--text); }
.t-market p { font-size: 0.9rem; }
.t-zh { font-size: 1.35rem !important; font-weight: 600; letter-spacing: 0.02em; color: var(--navy); display: flex; align-items: center; gap: 10px; }
.t-num { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--container); color: var(--white); font: 700 0.75rem var(--text); letter-spacing: 0; }

/* asks */
.tool-asks { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; margin-top: clamp(24px, 4vw, 40px); }
@media (max-width: 860px) { .tool-asks { grid-template-columns: minmax(0, 1fr); } }
.ask-card { background: var(--white); border: 1px solid var(--fog); border-radius: var(--r-sheet); padding: clamp(20px, 3vw, 30px); display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.ask-card > :last-child { margin-top: auto; }
.ask-card .actions { gap: 8px; width: 100%; }
.ask-card .actions .t-btn { flex: 1 1 auto; }
@media (max-width: 560px) { .ask-card .t-btn { width: 100%; } }
.ask-card h2 { font-family: var(--display); font-weight: 400; font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.15; }
.ask-card p { color: var(--graphite-2); }
.ask-card.main { background: var(--navy); color: var(--white); border-color: var(--navy); }
.ask-card.main p { color: rgb(255 255 255 / 0.82); }
.ask-card.main .t-btn { background: var(--white); color: var(--navy); border-color: var(--white); }
.ask-card.main .t-btn:hover { background: var(--royal-wash); }

/* explanation, related, hub */
.tool-explain { background: var(--white); padding-block: clamp(48px, 7vw, 88px); }
.tool-prose { max-width: 74ch; display: grid; gap: 14px; }
.tool-prose h2 { font-family: var(--display); font-weight: 400; font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.15; margin-top: 16px; }
.tool-prose ol, .tool-prose ul { padding-left: 1.2em; display: grid; gap: 6px; }
.tool-prose p, .tool-prose li { color: var(--graphite); }
.t-sources { font-size: 0.9rem; }
.t-checked { font-size: 0.85rem; color: var(--graphite-2); }
.tool-cat { padding-block: clamp(40px, 6vw, 72px); }
.tool-related { padding-block: clamp(48px, 7vw, 88px); }
.tool-related h2, .hub-stage h2 { font-family: var(--display); font-weight: 400; font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: 18px; }
.tool-cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.tool-card a { display: grid; gap: 8px; height: 100%; align-content: start; background: var(--white); border: 1px solid var(--fog); border-radius: var(--r-card); padding: 18px 20px; text-decoration: none; transition: border-color .2s, transform .2s var(--ease); }
.tool-card a:hover { border-color: var(--container); transform: translateY(-2px); }
.tool-card h3 { font: 600 1.1rem/1.25 var(--text); }
.tool-card p { font-size: 0.92rem; color: var(--graphite-2); }
.tool-stage { font-size: 0.75rem; font-weight: 700; color: var(--container); }
.tool-go { font-size: 0.875rem; font-weight: 600; color: var(--container); margin-top: 4px; }
.tool-all { margin-top: 18px; font-weight: 600; }
.tool-all a { color: var(--container); text-decoration: none; }
.tool-hub { padding-top: clamp(36px, 5vw, 64px); }
.hub-stage { margin-bottom: clamp(40px, 6vw, 72px); scroll-margin-top: calc(var(--header) + 96px); }
.hub-stage header { margin-bottom: 18px; }
.hub-stage header h2 { margin-bottom: 4px; }
.hub-stage header p { color: var(--graphite-2); }
.hub-cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 760px) { .hub-cats { grid-template-columns: minmax(0, 1fr); } }
.hub-cats h3 { font: 600 1.1rem var(--text); margin-bottom: 10px; }
.hub-cats ul { list-style: none; padding: 0; display: grid; gap: 8px; }
.hub-cats li { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 14px; background: var(--white); border: 1px solid var(--fog); border-radius: var(--r-ctl); }
.hub-cats a { color: var(--graphite); text-decoration: none; font-weight: 500; }
.hub-cats a:hover { color: var(--container); }

/* my project */
.tool-project { padding-top: clamp(32px, 5vw, 56px); }
.pj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.pj-card { background: var(--white); border: 1px solid var(--fog); border-radius: var(--r-card); padding: 18px 20px; display: grid; gap: 10px; align-content: start; }
.pj-card h3 { font: 600 1.05rem var(--text); }
.pj-card h3 a { color: var(--graphite); text-decoration: none; }
.pj-card dl { display: grid; gap: 6px; }
.pj-card dt { font-size: 0.78rem; color: var(--graphite-2); font-weight: 600; }
.pj-card dd { margin: 0; font-weight: 500; }
.pj-actions { margin-top: 24px; }
.pj-next { font-family: var(--display); font-weight: 400; font-size: 1.6rem; margin: 40px 0 12px; }
.pj-more { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pj-more a { display: inline-block; padding: 8px 14px; border: 1px solid var(--fog); border-radius: 999px; background: var(--white); text-decoration: none; color: var(--graphite); font-size: 0.92rem; }
.pj-more a:hover { border-color: var(--container); color: var(--container); }

/* project bar */
.project-bar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 40; width: min(980px, calc(100% - 24px)); background: var(--navy); color: var(--white); border: 1px solid rgb(255 255 255 / 0.16); border-radius: 14px; box-shadow: 0 10px 30px rgb(13 23 48 / 0.28); }
.pb-in { display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 18px; }
.pb-title { font-size: 0.85rem; white-space: nowrap; }
.pb-title b { color: var(--celadon); margin-left: 4px; }
.pb-chips { display: flex; gap: 14px; overflow: hidden; flex: 1; min-width: 0; font-size: 0.82rem; }
.pb-chips span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-chips i { font-style: normal; color: rgb(255 255 255 / 0.6); margin-right: 4px; }
.pb-act { display: flex; gap: 10px; align-items: center; }
.pb-act a { color: var(--white); font-size: 0.85rem; font-weight: 600; }
.pb-act .t-btn { background: var(--white); color: var(--navy); border-color: var(--white); }
@media (max-width: 700px) { .pb-chips { display: none; } .pb-in { justify-content: space-between; } }
body:has(.project-bar:not([hidden])) .site-footer { padding-bottom: 96px; }

/* dialog */
.ask-dialog { border: 0; margin: auto; border-radius: var(--r-sheet); padding: 0; width: min(620px, calc(100% - 24px)); max-height: calc(100vh - 32px); color: var(--graphite); background: var(--white); box-shadow: 0 24px 60px rgb(13 23 48 / 0.35); }
.ask-dialog::backdrop { background: rgb(13 23 48 / 0.55); }
.ask-form, .ask-done { padding: clamp(22px, 3vw, 32px); display: grid; gap: 14px; position: relative; }
.ask-form h2, .ask-done h2 { font-family: var(--display); font-weight: 400; font-size: 1.8rem; line-height: 1.1; padding-right: 36px; }
.ask-text { color: var(--graphite-2); }
.ask-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ask-grid .wide { grid-column: 1 / -1; }
@media (max-width: 560px) { .ask-grid { grid-template-columns: minmax(0, 1fr); } }
.ask-close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--fog); background: var(--white); font-size: 1.3rem; cursor: pointer; color: var(--graphite-2); }
.ask-error { color: #9b2b1e; font-size: 0.9rem; }
.ask-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.plain-h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; }

/* print: the answer only, with the brand */
@media print {
  .site-header, .site-footer, .tool-form, .tool-asks, .tool-related, .project-bar, .ask-dialog, .faq, .tool-meta, .t-more, .t-next, .hub-start, .pj-actions, .pj-next, .pj-more { display: none !important; }
  .tool-banner { min-height: 0; background: none; color: #000; }
  .tool-banner .wrap { padding: 0 var(--gutter) 12px; }
  .tool-banner .wrap::before { content: "SVIKARR · Free tools · svikarr.com/tools"; display: block; margin-bottom: 10px; font: 700 11px var(--text); letter-spacing: 0.08em; text-transform: uppercase; color: #101b33; }
  .tool-banner h1 { font-size: 26pt; max-width: none; }
  .t-stat, .t-table, .t-note, .t-gauge, .t-gantt, .t-days > li, .t-market { break-inside: avoid; }
  .tool-banner .lead, .crumbs { color: #333; }
  .tool-layout { grid-template-columns: 1fr; }
  .tool-explain { padding-block: 16px; }
  body { background: #fff; }
}

/* polish: chips, hub journey, project summary, compact phone header */
.t-chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.t-chips li { font-size: 0.82rem; font-weight: 500; padding: 6px 12px; border-radius: 999px; background: var(--royal-wash); color: var(--container-deep); }
.hub-journey { background: var(--white); border-bottom: 1px solid var(--fog); position: sticky; top: var(--header); z-index: 20; }
.hub-journey ol { list-style: none; padding: 0; margin: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.hub-journey a { display: grid; grid-template-columns: auto auto; column-gap: 8px; align-items: center; padding: 12px 14px; text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; font-weight: 600; font-size: 0.92rem; }
.hub-journey a:hover { border-bottom-color: var(--container); color: var(--container); }
.hub-journey b { grid-row: span 2; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--royal-wash); color: var(--container-deep); font-size: 0.8rem; }
.hub-journey span { font-size: 0.75rem; font-weight: 500; color: var(--graphite-2); }
.pj-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 22px; padding: 18px; background: var(--navy); color: var(--white); border-radius: var(--r-sheet); }
.pj-summary div { display: grid; gap: 4px; }
.pj-summary span { font-size: 0.78rem; color: rgb(255 255 255 / 0.7); }
.pj-summary strong { font-family: var(--display); font-weight: 500; font-size: 1.15rem; }
@media (max-width: 760px) {
  .tool-banner { min-height: 0; }
  .tool-banner .wrap { padding-top: calc(var(--header) + 1.25rem); padding-bottom: 1.5rem; }
  .tool-banner h1 { font-size: clamp(1.9rem, 8vw, 2.4rem); margin-bottom: 0.8rem; }
  .tool-banner .lead { font-size: 0.98rem; line-height: 1.5; }
  .tool-meta { margin-top: 0.9rem; gap: 6px; }
  .tool-meta span { font-size: 0.75rem; padding: 4px 10px; }
  .tool-section { padding-top: 16px; }
  .t-headline { font-size: 1.25rem; }
}
