.toolhead { background: radial-gradient(60% 140% at 80% 0, #0b6e50, transparent 70%), var(--night); color: #fff; padding: 128px 0 60px; }
.toolhead h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
.toolhead p { color: #bfdccf; margin: 12px 0 0; font-size: 1.15rem; }
.tool { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; align-items: start; padding-top: 32px; padding-bottom: 50px; max-width: 1320px; }
fieldset { border: 1px solid var(--line); background: #fff; border-radius: 22px; padding: 8px 20px 22px; margin: 0 0 18px; min-width: 0; }
legend { font-weight: 800; font-size: 1.25rem; padding: 8px 8px 0; float: left; width: 100%; margin-left: -8px; margin-bottom: 10px; }
legend + * { clear: both; }
.g { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.full { grid-column: 1 / -1; }
.f { display: block; min-width: 0; }
.f > span { display: block; font-size: .92rem; font-weight: 600; color: var(--soft); margin-bottom: 2px; }
.f input, .f select, .f textarea { width: 100%; font: inherit; font-size: 1.05rem; color: var(--ink); background: #fbfdfc; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px 8px; min-height: 48px; }
.f textarea { resize: vertical; }
.f input:focus, .f select:focus, .f textarea:focus { outline: 0; border-color: var(--green); box-shadow: 0 0 0 4px rgba(6, 122, 86, .14); }
.up2 { text-transform: uppercase; }
.joined { display: flex; gap: 6px; } .joined select { width: 88px; }
.irow { position: relative; display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 10px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.irow .n { grid-column: 1 / -1; padding-right: 92px; }
.irow output { position: absolute; right: 0; top: 14px; font-weight: 700; color: var(--green); font-size: 1rem; }
.del { position: absolute; right: -4px; top: 40px; width: 44px; height: 44px; border: 0; background: none; font-size: 1.7rem; line-height: 1; color: #b3261e; border-radius: 12px; }
.del:hover { background: #fdecea; }
.mini-btn { display: inline-block; border: 1.5px solid var(--green); color: var(--green); background: none; font-weight: 700; border-radius: 12px; padding: 10px 18px 8px; cursor: pointer; margin-top: 14px; min-height: 46px; }
.mini-btn:hover { background: var(--tint); }
.logo { display: flex; align-items: center; gap: 14px; } .logo .mini-btn { margin: 0; } .logo input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; padding: 0; } .mini-btn:focus-within { outline: 3px solid #12b981; outline-offset: 3px; }
.check { display: flex; align-items: center; gap: 10px; margin-top: 16px; } .check input { width: 22px; height: 22px; accent-color: var(--green); }
.looks { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; } .looks label { position: relative; cursor: pointer; } .looks input[type=radio] { position: absolute; opacity: 0; }
.looks label:not(.col) span { display: block; border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 18px 9px; font-weight: 600; }
.looks :checked + span { background: var(--deep); color: var(--mint); border-color: var(--deep); } .looks :focus-visible + span { outline: 3px solid #12b981; outline-offset: 2px; }
.col { display: flex; align-items: center; gap: 8px; margin-left: auto; font-weight: 600; } .col input { width: 48px; height: 46px; border: 0; background: none; padding: 0; cursor: pointer; }
.plain { border: 0; background: none; color: var(--green); font-weight: 700; text-decoration: underline; padding: 12px 4px; } .red { color: #b3261e; }
.foot { display: flex; gap: 20px; margin-top: 10px; }
.view { position: sticky; top: 92px; } .view h2 { font-size: 1.25rem; margin-bottom: 10px; }
#pages { max-height: calc(100vh - 230px); overflow: auto; border-radius: 14px; }
#pages canvas { width: 100%; height: auto; display: block; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 14px; background: #fff; box-shadow: 0 16px 40px rgba(6, 60, 42, .1); }
.hints p { background: #fff4d6; color: #6b4a00; border-radius: 12px; padding: 10px 14px 8px; margin: 0 0 8px; font-size: .98rem; }
.bar { position: fixed; inset: auto 0 0; z-index: 9; background: rgba(3, 19, 14, .95); color: #fff; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); }
.bar .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; max-width: 1320px; } .bt { margin-right: auto; line-height: 1.15; } .bt small { display: block; color: #9fc3b3; } .bt b { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.bar .btn { padding: 13px 22px 11px; min-height: 48px; } .ghost2 { background: rgba(255, 255, 255, .12); color: #fff; }
.errs { width: 100%; background: #fdecea; color: #7d1710; border-radius: 12px; padding: 10px 14px 6px; } .errs[hidden] { display: none; } .errs p { margin: 0 0 4px; }
dialog { border: 0; border-radius: 26px; padding: 34px; max-width: 440px; width: calc(100% - 36px); text-align: center; color: var(--ink); } dialog::backdrop { background: rgba(3, 19, 14, .6); } dialog h2 { font-size: 1.8rem; margin: 0 auto 10px; } dialog .plain { display: block; margin: 8px auto 0; }
.f[hidden] { display: none; }
footer { padding-bottom: 120px; }
@media (max-width: 900px) { .tool { grid-template-columns: minmax(0, 1fr); } .view { position: static; } #pages { max-height: none; } }
@media (max-width: 520px) { .toolhead { padding: 104px 0 40px; } fieldset { padding: 6px 14px 18px; } .g { grid-template-columns: minmax(0, 1fr); } .irow { grid-template-columns: 1fr 1fr; } .bar .btn { padding: 12px 14px 10px; } .bt { width: 100%; display: flex; justify-content: space-between; align-items: baseline; } .bar .btn { flex: 1; white-space: nowrap; } .col { margin-left: 0; } }
@page { size: A4; margin: 0; }
@media print { body * { visibility: hidden; } .view, #pages, #pages * { visibility: visible; } body, .tool { background: #fff; padding: 0; margin: 0; max-width: none; } .top, .toolhead, .form, .bar, footer, .view h2, .hints, dialog, .skip { display: none !important; } .tool { display: block; } .view { position: static; } #pages { max-height: none; overflow: visible; border-radius: 0; } #pages canvas { width: 210mm; height: 296.5mm; border: 0; border-radius: 0; margin: 0; box-shadow: none; break-after: page; } #pages canvas:last-child { break-after: auto; } }

.see { display: none; } #preview { scroll-margin-top: 92px; }
@media (max-width: 900px) { .see { display: inline-block; } }
@media (max-width: 520px) { .toolhead { padding: 92px 0 22px; } .toolhead h1 { font-size: 1.7rem; } .toolhead p { font-size: 1rem; margin-top: 6px; } .bar .btn { padding: 12px 8px 10px; font-size: .95rem; } .bar .wrap { gap: 8px; } }

/* Roomier page: the header scrolls away, optional fields stay folded. */
.top { position: absolute; }
.toolhead { padding: 108px 0 30px; } .toolhead h1 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); } .toolhead p { margin-top: 6px; }
.tool { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 48px; padding-top: 34px; }
fieldset { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; padding: 0 0 30px; margin: 0 0 24px; }
legend { padding: 0; margin: 0 0 14px; }
.g { gap: 18px 20px; } .f input, .f select, .f textarea { background: #fff; } .f textarea { display: block; }
.where .looks { gap: 8px; } .blang { max-width: 240px; margin-top: 18px; }
.more { margin-top: 16px; } .more summary { cursor: pointer; color: var(--green); font-weight: 700; padding: 10px 0; list-style: none; display: inline-block; } .more summary::-webkit-details-marker { display: none; } .more summary::before { content: '+'; display: inline-block; width: 1.1em; } .more[open] summary::before { content: '−'; } .more .g { padding-top: 8px; } .more summary:focus-visible { outline: 3px solid #12b981; outline-offset: 3px; border-radius: 6px; }
.more .logo { align-self: end; }
.irow { grid-template-columns: minmax(0, 2.4fr) minmax(0, .8fr) minmax(0, 1.1fr) minmax(0, .8fr) 156px; gap: 14px; align-items: end; padding: 16px 0; } .code .irow { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, .8fr) minmax(0, 1.1fr) minmax(0, .8fr) 156px; }
.irow .n { grid-column: auto; padding: 0; } .end { display: flex; align-items: center; justify-content: flex-end; min-height: 48px; gap: 2px; } .irow output, .del { position: static; } .del { margin-right: -10px; flex: none; }
.checks { display: flex; flex-wrap: wrap; gap: 4px 28px; }
.view { top: 24px; } #pages { max-height: calc(100vh - 170px); scrollbar-width: thin; }
.bar { padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); } .bt { display: flex; align-items: baseline; gap: 10px; } .bar .btn { padding: 11px 20px 9px; min-height: 46px; }
@media (max-width: 1150px) { .irow, .code .irow { grid-template-columns: repeat(3, minmax(0, 1fr)); } .code .irow { grid-template-columns: repeat(4, minmax(0, 1fr)); } .irow .n, .end { grid-column: 1 / -1; } .end { min-height: 44px; justify-content: space-between; } }
@media (max-width: 900px) { .tool { grid-template-columns: minmax(0, 1fr); } #pages { max-height: none; } }
@media (max-width: 520px) { .toolhead { padding: 92px 0 20px; } .tool { padding-top: 26px; } .code .irow { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bt { justify-content: space-between; } .bar .btn { padding: 11px 8px 9px; } .looks label:not(.col) span { padding: 10px 14px 8px; } }

.more summary::after { content: none !important; }
.more summary { padding-right: 0; }

.poster canvas { max-width: 460px; } .warnbox { background: #fff4d6; color: #6b4a00; border-radius: 14px; padding: 14px 18px 12px; }
.pickb { border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 9px 18px 7px; font-weight: 600; min-height: 46px; } .pickb[aria-pressed=true] { background: var(--deep); color: var(--mint); } #rates:not(:empty) { margin-top: 14px; }
.answer h2 { font-size: 1.3rem; margin: 30px 0 10px; } .answer ul { padding-left: 20px; } #result { background: var(--night); color: #eafaf2; border-radius: 24px; padding: 22px 26px; } #result div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; } #result .big { border-top: 1px solid #ffffff33; margin-top: 8px; padding-top: 14px; font-size: 1.6rem; color: var(--mint); }
#result[hidden], #copy[hidden], #inter[hidden] { display: none; } .foot { flex-wrap: wrap; align-items: center; } .foot .mini-btn { margin: 0; } .bar .wrap:not(:has(.bt)) { justify-content: flex-end; }
#calc fieldset:last-child { border: 0; }
@media print { .others { display: none !important; } #pages.poster canvas { max-width: none; } }
