.ctf {
  --f-ink:#102e32; --f-accent:#115e54; --f-border:#cad8cf; --f-light:#f1f5ec;
  color:var(--f-ink); max-width:1220px; margin:clamp(46px,8vw,108px) auto; text-align:start;
}
.ctf *, .ctf *::before, .ctf *::after {box-sizing:border-box}
.ctf [hidden] {display:none!important}
.ctf-heading {max-width:770px; margin-block-end:26px}
.ctf .ctf-heading h2 {font:inherit; font-family:'Instrument Serif',Georgia,serif; line-height:1.05; font-size:clamp(38px,5vw,68px); letter-spacing:-.035em; margin:0 0 .22em; color:var(--f-ink)}
.ctf p {line-height:1.58; margin:.3rem 0 .8rem; font-size:1rem}
.ctf .ctf-heading p {font-size:clamp(1rem,1.65vw,1.18rem)}
.ctf-work {border:1px solid var(--f-border); display:grid; grid-template-columns:minmax(0,.9fr) minmax(0,1.4fr); border-radius:20px; overflow:hidden; background:#fff}
.ctf-input, .ctf-result {padding:clamp(20px,3.1vw,42px); min-width:0}
.ctf-input {background:var(--f-light); margin:0}
.ctf-input fieldset {border:0; padding:0; margin:0 0 1.25rem; min-width:0}
.ctf-input legend, .ctf-input label {font-weight:650; font-size:1rem; line-height:1.3; color:var(--f-ink); padding:0}
.ctf-presets {display:flex; gap:.4rem; flex-wrap:wrap; margin-top:.6rem}
.ctf-presets button, .ctf .ctf-submit {font:inherit; font-size:.87rem; letter-spacing:normal; text-transform:none; font-weight:600; cursor:pointer; border:1px solid var(--f-border); border-radius:99px; padding:.52rem .85rem; color:var(--f-accent); background:white; line-height:1.3; min-height:36px}
.ctf-presets button[aria-pressed="true"] {background:var(--f-ink); border-color:var(--f-ink); color:white}
.ctf-input p {font-size:.85rem; color:#405751}
.ctf-input textarea {font:inherit; font-size:1rem; line-height:1.6; letter-spacing:.04em; color:var(--f-ink); resize:vertical; border:1px solid #90a69a; background:#fff; border-radius:8px; width:100%; min-height:95px; padding:.7rem .85rem; display:block}
.ctf-input textarea[aria-invalid="true"] {border-color:#a43721}
.ctf .ctf-error {font-weight:600;color:#8a2f1d}
.ctf .ctf-submit {display:inline-flex; align-items:center; gap:.9rem; margin-block-start:.9rem; color:white; background:var(--f-accent); padding:.7rem 1.15rem}
.ctf button:focus-visible, .ctf summary:focus-visible, .ctf textarea:focus-visible, .ctf .ctf-table-scroll:focus-visible {outline:3px solid #2e7c71; outline-offset:3px}
.ctf .ctf-privacy {font-size:.77rem; margin:.65rem 0 0}
.ctf-result h3 {margin:0; font-size:clamp(1.35rem,2.3vw,2rem); line-height:1.12; letter-spacing:-.025em; color:var(--f-ink)}
.ctf-result p {font-size:.9rem}
.ctf-plot {margin-top:1.3rem; direction:ltr}
.ctf-plot svg {display:block; width:100%; height:auto; overflow:visible}
.ctf-gridline {stroke:#d2dad5;stroke-width:.85}
.ctf-divider {stroke:#788d7c; stroke-dasharray:2 5}
.ctf-line {fill:none;stroke:var(--f-accent); stroke-width:2.5; stroke-linejoin:round;stroke-linecap:round}
.ctf-dashed {stroke:#526928; stroke-dasharray:4 5}
.ctf-dot {fill:white; stroke:#526928; stroke-width:1.8}
.ctf-axis {fill:#3c5147; font:10px sans-serif}
.ctf-legend {display:flex; justify-content:flex-end; gap:1rem; font-size:.75rem; margin-block:.25rem .75rem; color:#40564b}
.ctf-legend span {display:inline-flex;gap:.35rem;align-items:center}
.ctf-legend span::before {content:'';width:18px;border-block-start:2px solid var(--f-accent)}
.ctf-legend span+span::before {border-block-start:2px dashed #526928}
.ctf-predictions {display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); margin:.5rem 0 1rem; gap:.25rem}
.ctf-predictions div {min-width:0; padding:.4rem .2rem .4rem 0; border-block-start:1px solid var(--f-border)}
.ctf-predictions dt {font-size:.74rem; font-weight:500; color:#465b51}
.ctf-predictions dd {font-size:clamp(1rem,1.9vw,1.45rem); font-weight:650; line-height:1.2; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; margin:.2rem 0 0}
.ctf-model {border-inline-start:3px solid #a6bd76; padding-inline-start:.7rem}
.ctf-model span {display:block; font-size:.71rem; color:#465b51}
.ctf-model b {font-size:.95rem; color:var(--f-accent)}
.ctf-model p {margin:.25rem 0 0; font-size:.84rem}
.ctf-audit {grid-column:1/-1; padding:16px clamp(20px,3.1vw,42px); border-block-start:1px solid var(--f-border)}
.ctf summary {cursor:pointer; font-size:.94rem; font-weight:650; color:var(--f-ink)}
.ctf-method {display:grid; grid-template-columns:1fr 1fr; gap:clamp(14px,3vw,48px); align-items:start; margin-block:1rem}
.ctf-method p {margin:.4rem 0; font-size:.88rem}
.ctf table {width:100%; border-collapse:collapse; color:var(--f-ink); font-size:.85rem; margin:0; background:transparent}
.ctf caption {font-weight:650; text-align:start; padding-block:.2rem .3rem}
.ctf th,.ctf td {text-align:start; padding:.36rem .15rem; border:0; border-block-end:1px solid var(--f-border); background:transparent; color:var(--f-ink);font-weight:400}
.ctf thead th {font-weight:650}
.ctf th+th,.ctf td {text-align:end; font-variant-numeric:tabular-nums}
.ctf-table-scroll {max-height:230px; overflow:auto; margin-block:.6rem}
.ctf-status {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@media (max-width:760px) {.ctf-work,.ctf-method {grid-template-columns:minmax(0,1fr)} .ctf-result {border-block-start:1px solid var(--f-border)} .ctf-work {border-radius:14px}}
@media (max-width:390px) {.ctf-predictions {grid-template-columns:repeat(2,minmax(0,1fr))}}

/* The surrounding tool container supplies the final inset. */
.ct-tool-page .ctf{margin-block:clamp(30px,3.1vw,50px) 0}
@media (min-width:761px){
  .ctf-input,.ctf-result{padding:clamp(22px,2.05vw,32px)}
  .ctf .ctf-heading{margin-block-end:18px}
}
@media (min-width:761px){
  .ctf-input{display:flex;flex-direction:column;justify-content:center}
  .ctf-input .ctf-submit{align-self:flex-start}
}
