/* Free tools: shared styles. Builds on /bb.css tokens. */
.tool-hero { padding: 76px 20px 18px; text-align: center; }
.tool-hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(38px,5.4vw,62px); line-height: 1.04; margin-top: 18px; }
.tool-hero p.lede { font-size: 18.5px; color: var(--ink-2); max-width: 58ch; margin: 20px auto 0; line-height: 1.65; }
.tool-crumbs { font-size: 13px; color: var(--ink-3); margin-bottom: 4px; }
.tool-crumbs a { color: var(--rouge-deep); font-weight: 700; }

.tool-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 28px; align-items: start; padding-top: 34px; padding-bottom: 60px; }
@media (max-width: 920px) { .tool-grid { grid-template-columns: 1fr; } }

.t-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 26px 24px; box-shadow: var(--shadow); }
.t-card h2 { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.1; margin: 0 0 6px; }
.t-card .sub { color: var(--ink-2); font-size: 14.5px; margin: 0 0 18px; line-height: 1.55; }
.t-sec { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 8px; }
.t-sec > h3 { font-size: 12.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--rouge-deep); margin: 0 0 14px; }
.t-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.t-row.three { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 560px) { .t-row.three { grid-template-columns: 1fr 1fr; } }
@media (max-width: 370px) { .t-row, .t-row.three { grid-template-columns: 1fr; } }
.bb-field .hint { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 6px; line-height: 1.45; font-weight: 500; }
.t-money { position: relative; }
.t-money::before { content: '£'; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-weight: 600; pointer-events: none; }
.t-money .bb-input { padding-left: 28px; }
.t-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--ink-2); line-height: 1.5; margin: 4px 0 16px; cursor: pointer; }
.t-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--rouge-solid); flex: none; }
select.bb-input { appearance: auto; }
textarea.bb-input { resize: vertical; min-height: 90px; line-height: 1.5; }
.t-seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; gap: 2px; margin-bottom: 14px; flex-wrap: wrap; }
.t-seg label { padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.t-seg input { position: absolute; opacity: 0; pointer-events: none; }
.t-seg label:has(input:checked) { background: var(--rouge-soft); color: var(--rouge-deep); }
.hidden { display: none !important; }

/* Result */
.t-result { position: static; }
@media (max-width: 920px) { .t-result { position: static; } }
.t-doc { background: #fff; color: #17150F; border: 1px solid var(--line); border-radius: var(--r); padding: 30px 28px; box-shadow: var(--shadow); }
.t-doc h2 { font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 1.1; margin: 0; }
.t-doc .muted { color: #5C554A; font-size: 14px; }
.q-table { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 14.5px; }
.q-table th { text-align: left; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: #767063; padding: 8px 6px; border-bottom: 1px solid #E7DFD2; }
.q-table td { padding: 10px 6px; border-bottom: 1px solid #F0EADF; vertical-align: top; }
.q-table td.n, .q-table th.n { text-align: right; white-space: nowrap; }
.q-table tr.tot td { border-bottom: 0; font-weight: 800; font-size: 17px; padding-top: 14px; }
.q-table tr.subt td { border-bottom: 0; color: #5C554A; }
.q-pay { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.q-pay > div { background: var(--rouge-soft); border-radius: 14px; padding: 14px 16px; }
.q-pay b { display: block; font-size: 22px; margin-top: 2px; color: #17150F; }
.q-pay span { font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--rouge-deep); }
.q-notes { font-size: 13.5px; color: #5C554A; line-height: 1.6; margin-top: 16px; }

/* Lock / gate */
.t-lockwrap { position: relative; }
.t-lockwrap.locked .t-gated { filter: blur(6px); user-select: none; pointer-events: none; max-height: 260px; overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 0%, rgba(0,0,0,.25) 100%); mask-image: linear-gradient(#000 0%, rgba(0,0,0,.25) 100%); }
.t-lockwrap:not(.locked) .t-gate { display: none; }
.t-lockwrap:not(.locked) .t-lockedhint { display: none; }
.t-lockwrap.locked .t-actions { display: none; }
.t-gate { background: var(--surface); border: 1px solid var(--rouge); border-radius: var(--r); padding: 24px 22px; margin-top: 18px; box-shadow: var(--shadow-rouge); }
.t-gate h3 { font-family: var(--serif); font-weight: 400; font-size: 27px; line-height: 1.12; margin: 0 0 6px; }
.t-gate p.sub { color: var(--ink-2); font-size: 14.5px; margin: 0 0 16px; line-height: 1.55; }
.t-gate .small { font-size: 12.5px; color: var(--ink-3); line-height: 1.55; margin: 12px 0 0; }
.t-gate .small a { color: var(--rouge-deep); font-weight: 700; }
.t-gate .err { color: #B3261E; font-size: 14px; font-weight: 600; min-height: 1em; margin: 8px 0 0; }
.t-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.t-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.t-actions .bb-btn { cursor: pointer; }
.t-toast { font-size: 13.5px; color: var(--rouge-deep); font-weight: 700; align-self: center; }
.t-soft { margin-top: 18px; background: var(--paper-2); border-radius: var(--r); padding: 18px 20px; font-size: 14.5px; color: var(--ink-2); line-height: 1.6; }
.t-soft a { color: var(--rouge-deep); font-weight: 700; }
.t-warn { background: #FFF6E5; border: 1px solid #F0D9A8; color: #6B4E16; border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.5; margin-top: 14px; }

/* Timeline */
.tl { list-style: none; padding: 0; margin: 18px 0 0; }
.tl li { display: grid; grid-template-columns: 74px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid #F0EADF; font-size: 14.5px; }
.tl li:last-child { border-bottom: 0; }
.tl .tm { font-weight: 800; font-variant-numeric: tabular-nums; }
.tl .who { font-weight: 700; }
.tl .meta { color: #5C554A; font-size: 13px; }
.tl li.key { background: var(--rouge-soft); border-radius: 10px; padding: 10px 10px; border-bottom: 0; margin: 4px 0; }
.tl li.key .tm { color: var(--rouge-deep); }
.tl-lanes { font-size: 13px; color: #5C554A; margin-top: 14px; line-height: 1.6; }

/* Contract document */
.ct { font-family: Georgia, 'Times New Roman', serif; font-size: 15px; line-height: 1.62; color: #17150F; }
.ct h2 { font-family: var(--serif); font-size: 30px; margin: 0 0 4px; }
.ct h3 { font-family: var(--sans); font-size: 15px; font-weight: 800; margin: 22px 0 6px; }
.ct p { margin: 0 0 9px; }
.ct .cl { padding-left: 34px; text-indent: -34px; }
.ct .blank { display: inline-block; min-width: 140px; border-bottom: 1px solid #999; }
.ct .sig { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 18px; }
.ct .sig div { border-top: 1px solid #999; padding-top: 6px; font-size: 13px; color: #5C554A; }
.ct-disclaimer { background: #FFF6E5; border: 1px solid #F0D9A8; color: #6B4E16; border-radius: 12px; padding: 12px 14px; font-family: var(--sans); font-size: 13.5px; line-height: 1.5; margin-bottom: 18px; }

/* Index cards */
.tool-cards { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; padding-top: 30px; padding-bottom: 50px; }
@media (max-width: 900px) { .tool-cards { grid-template-columns: 1fr; } }
.tool-cards a.card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 26px 24px; color: inherit; text-decoration: none; box-shadow: var(--shadow); transition: transform .2s var(--ease), border-color .2s; }
.tool-cards a.card:hover { transform: translateY(-3px); border-color: var(--rouge); }
.tool-cards .ic { width: 46px; height: 46px; border-radius: 14px; background: var(--rouge-soft); color: var(--rouge-deep); display: grid; place-items: center; font-size: 22px; }
.tool-cards h2 { font-family: var(--serif); font-weight: 400; font-size: 29px; line-height: 1.12; margin: 18px 0 8px; }
.tool-cards p { color: var(--ink-2); line-height: 1.6; margin: 0 0 18px; font-size: 15.5px; }
.tool-cards .go { margin-top: auto; color: var(--rouge-deep); font-weight: 800; font-size: 15px; }
.tool-faq { max-width: 760px; }
.tool-faq h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px,3.6vw,38px); margin: 0 0 14px; }
.tool-faq h3 { font-size: 17.5px; margin: 24px 0 6px; }
.tool-faq p { color: var(--ink-2); line-height: 1.7; margin: 0; font-size: 16.5px; }
.tool-faq a { color: var(--rouge-deep); font-weight: 700; }

/* Print: only the document */
@media print {
  @page { margin: 16mm 14mm; }
  html, body, body > div { background: #fff !important; overflow: visible !important; }
  .bb-nav, .tool-hero, .t-card, .tool-faq, .cta-section, .bb-footer, .t-noprint, .bb-narrow > .t-warn { display: none !important; }
  .tool-grid { display: block !important; padding: 0 !important; margin: 0 !important; max-width: none !important; }
  .t-result, .t-lockwrap { position: static !important; }
  .t-print { border: 0 !important; box-shadow: none !important; padding: 0 !important; }
  .t-lockwrap.locked .t-gated, .t-lockwrap.locked .t-gate { display: none !important; }
  .tl li { break-inside: avoid; }
  .tl li.key { background: #f3f0fa !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .ct h3 { break-after: avoid; }
  .ct-disclaimer { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Mobile: a jump link to the result, since the form comes first */
.t-jump { display: none; }
@media (max-width: 920px) {
  .t-jump { display: flex; position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 40; justify-content: center; align-items: center; gap: 8px;
    padding: 14px 18px; border-radius: 999px; background: var(--rouge-solid); color: #fff; font-weight: 800; font-size: 15px; box-shadow: var(--shadow-rouge); text-decoration: none; transition: opacity .2s, transform .2s; }
  .t-jump.away { opacity: 0; transform: translateY(20px); pointer-events: none; }
}
