/* Shared calculator controls keep tool switching and the answer in the same place. */
.ccalc-head { display:block; position:relative; min-width:0; margin:0 0 12px; }
.ccalc-head h1.h1 { max-width:calc(100% - 116px); margin:0; font-size:clamp(26px,3.65vw,40px); line-height:1.25; letter-spacing:-.055em; overflow-wrap:anywhere; }
.ccalc-head .ccalc-picker>summary { display:flex; align-items:center; justify-content:center; gap:8px; position:absolute; inset:0 0 auto auto; min-height:44px; padding:0 12px; border:1px solid var(--line); border-radius:12px; color:var(--text); background:var(--surface); font-size:14px; font-weight:650; cursor:pointer; list-style:none; }
.ccalc-picker>summary::-webkit-details-marker { display:none; }
.ccalc-picker>summary::after { content:""; width:6px; height:6px; margin-top:-3px; border:solid currentColor; border-width:0 1.6px 1.6px 0; transform:rotate(45deg); }
.ccalc-picker[open]>summary::after { margin-top:3px; transform:rotate(225deg); }
.ccalc-picker nav { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:14px 0 0; padding:14px; border:1px solid var(--line); border-radius:14px; background:var(--surface); }
.ccalc-picker nav strong { display:block; color:var(--text-2); padding:2px 9px; font-size:var(--type-caption,.8125rem); }
.ccalc-picker nav a { display:flex; flex-direction:column; justify-content:center; align-items:flex-start; gap:2px; min-height:48px; padding:6px 9px; border-radius:7px; color:var(--text); font-size:14px; line-height:1.35; }
.ccalc-picker nav a span, .ccalc-won-reading { color:var(--text-2); font-size:var(--type-caption,.8125rem); font-weight:500; line-height:1.5; overflow-wrap:anywhere }
.st-page:has(.ccalc-head) :is(.avg-target,.fx-calc) > label { color:var(--text-2); font-size:var(--type-label,.875rem); }
.ccalc-won-reading { font-variant-numeric:tabular-nums; }
.ccalc-won-reading:empty { display:none }
.st-page .avg-target:has(.ccalc-won-reading) > label { align-content:start }
.st-page .fx-calc:has(.ccalc-won-reading) > label { align-self:start }
.st-page .fx-calc:has(.ccalc-won-reading) > .fx-swap { align-self:start; margin-block-start:25px }
.ccalc-picker nav a:is([aria-current=page],:hover,:focus-visible) { color:var(--accent-ink); background:var(--accent-soft); }
.ccalc-picker nav a[aria-current=page] { font-weight:700; }
.ccalc-head :is(a,summary):focus-visible,.ccalc-example:focus-visible,.ccalc-amounts button:focus-visible { outline:2px solid var(--focus); outline-offset:2px; }
.st-card .ccalc-form-head { display:flex; grid-column:1/-1; justify-content:space-between; align-items:center; gap:10px; min-height:44px; margin-bottom:10px; }
.st-card .ccalc-form-head h2 { margin:0; }
.ccalc-example,.ccalc-amounts button { border:1px solid var(--line); border-radius:10px; background:var(--surface); color:var(--accent-ink); min-height:44px; padding:5px 12px; cursor:pointer; font:inherit; font-size:13px; font-weight:640; }
.ccalc-example:hover,.ccalc-amounts button:hover { background:var(--accent-soft); }
.ccalc-amounts { display:flex; flex-wrap:wrap; grid-column:1/-1; gap:6px; }
.ccalc-amounts[hidden],.ccalc-example[hidden] { display:none; }
.ccalc-form-error { margin:0; color:var(--text); font-size:var(--type-label,.875rem); }
.ccalc-form-error:has(span:not(:empty)) { margin-top:10px; }
.ccalc-form-error > span:not(:empty) { display:block; }
.ccalc-fee-range { display:flex; flex-wrap:wrap; align-items:baseline; gap:5px 14px; padding:14px clamp(14px,2vw,24px); background:var(--surface-2); }
.ccalc-fee-range span { color:var(--text-2); font-size:13px; }
.ccalc-fee-range strong { color:var(--text); font-size:clamp(20px,2.5vw,29px); line-height:1.3; font-variant-numeric:tabular-nums; }
.ccalc-futures [aria-invalid=true] { outline:2px solid var(--down); outline-offset:-2px; }
.st-page:has(.ccalc-head) .st-card,.ccalc-futures .calc>:is(.card,form),.st-page:has(.ccalc-head) .ef-panel { border-radius:16px; }
.st-page:has(.ccalc-head) .fx-result,.st-page:has(.ccalc-head) .stock-tax-result,.ccalc-futures .calc .result .big { background:var(--surface-2); padding:clamp(14px,2vw,22px); border:0; border-radius:12px; }
.ccalc-futures .calc .result .big { display:grid; justify-content:stretch; gap:4px; }
.ccalc-futures .calc .result .big b { white-space:normal; text-overflow:clip; overflow-wrap:anywhere; line-height:1.18; font-size:clamp(26px,3.2vw,37px); }
.ccalc-futures .calc .field input { font-variant-numeric:tabular-nums; }
/* Storage controls and the mobile result shortcut occupy these rows as soon as the calculator initializes. */
@media(scripting:enabled) { .ccalc-futures .calc-subnav { min-block-size:1.375rem; } }
@media(scripting:enabled) and (max-width:680px) { .ccalc-futures .calc-subnav { min-block-size:calc(57px + 1.375rem); } }
@media(max-width:680px) {
  .ccalc-head { min-height:44px; }
  .ccalc-picker nav { grid-template-columns:repeat(2,minmax(0,1fr)); row-gap:12px; padding:10px; }
  .ccalc-head h1.h1 { max-width:calc(100% - 105px); padding-block:4px; }
  .ccalc-futures .calc-subnav { display:grid; grid-template-columns:minmax(0,1fr); gap:5px; margin:4px 0 10px; }
  .ccalc-futures .calc-subnav .calc-saved { grid-row:2; }
  .ccalc-futures .calc-result-jump:not([hidden]) { width:100%; display:flex; justify-content:space-between; min-height:52px; margin:0; padding:7px 12px; border:1px solid var(--line); border-radius:10px; background:var(--surface); color:var(--text); }
  .ccalc-result-copy { display:flex; gap:4px 8px; flex-wrap:wrap; text-align:start; align-items:baseline; }
  .ccalc-result-copy small { color:var(--text-2); }
  .ccalc-result-copy strong { font-size:18px; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
  .ccalc-result-action { flex:none; font-size:var(--type-caption,.8125rem); color:var(--accent-ink); }
}
