/* PUBLIC CALCULATOR PAGES (/calculators and the seven tools). Layout only: every colour is an existing
   token, gold is a hairline or an outline and never a fill (house rule). Mobile first where it matters:
   one column under 600px, 44px tap targets, and nothing may scroll the page sideways at 320px — wide
   tables scroll inside their own wrapper. The rental-yield calculator keeps its own inline styles. */

.calc-root { max-width: 920px; margin: 0 auto; padding: 0 1.25rem; }
/* The display rules below would otherwise beat the browser's own [hidden] rule, so a page script's
   el.hidden = true would not hide a field, button row or result. */
.calc-root [hidden] { display: none !important; }
.calc-crumbs { font-size: var(--t-source); color: var(--text-muted); margin: 0 0 1rem; }
.calc-crumbs a { color: var(--text-muted); }
.calc-lead { color: var(--text-muted); max-width: 64ch; }
.calc-privacy { font-size: var(--t-source); color: var(--text-muted); max-width: 64ch; }
.calc-scope { border-left: 2px solid var(--gold); padding: 0.2rem 0 0.2rem 0.9rem; margin: 1.2rem 0;
              color: var(--off-white); max-width: 68ch; }
.calc-proposal { border: 1px solid var(--gold); border-radius: 3px; padding: 0.15rem 0.45rem;
                 font-family: 'Cinzel', serif; font-size: 0.62rem; letter-spacing: 0.14em;
                 text-transform: uppercase; color: var(--gold); white-space: nowrap; }

.calc-panel { background: var(--navy-mid); border: 1px solid var(--hairline); border-radius: 4px;
              padding: 1.4rem 1.5rem; margin: 1.6rem 0; }
.calc-panel fieldset { border: 0; padding: 0; margin: 0 0 1.1rem; min-width: 0; }
.calc-legend { font-family: 'Cinzel', serif; font-size: var(--t-label); letter-spacing: var(--track-label-em);
               text-transform: uppercase; color: var(--gold); margin: 0 0 0.6rem; padding: 0; }
.calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0.9rem 1.2rem; }
.calc-field { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.calc-field > span, .calc-field > label { font-size: var(--t-source); color: var(--off-white); letter-spacing: 0.02em; }
.calc-field input[type=number], .calc-field input[type=text], .calc-field select {
  background: var(--navy-light); color: var(--off-white); border: 1px solid var(--hairline); border-radius: 3px;
  padding: 0.6rem 0.7rem; min-height: 44px; font-family: 'Jost', sans-serif; font-size: 1rem;
  font-variant-numeric: lining-nums tabular-nums; width: 100%; }
.calc-field input:focus, .calc-field select:focus { outline: none; border-color: var(--gold); }
.calc-field input::-webkit-outer-spin-button, .calc-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.calc-field input[type=number] { -moz-appearance: textfield; }
.calc-hint { font-size: var(--t-source); color: var(--text-muted); font-style: normal; }

/* Choices are real radio buttons (they work, and read, without the page script), styled as chips. */
.calc-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.calc-chip { position: relative; }
.calc-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.calc-chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0.45rem 0.9rem;
                  border: 1px solid var(--hairline); border-radius: 3px; color: var(--text-muted);
                  font-size: var(--t-source); cursor: pointer; }
.calc-chip input:checked + span { border-color: var(--gold); color: var(--off-white); }
.calc-chip input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

.calc-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.2rem; }
.calc-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
            font-family: 'Cinzel', serif; font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase;
            color: var(--gold); background: transparent; border: 1px solid rgba(var(--c-luxury-gold-rgb), 0.55);
            border-radius: 3px; padding: 0.85rem 2rem; cursor: pointer; text-decoration: none;
            transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease; }
.calc-btn:hover { border-color: var(--gold); background: rgba(var(--c-luxury-gold-rgb), 0.12); color: var(--gold-light); }
.calc-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.calc-btn-quiet { color: var(--text-muted); border-color: rgba(var(--c-light-grey-rgb), 0.28); }
.calc-btn-quiet:hover { color: var(--off-white); border-color: rgba(var(--c-light-grey-rgb), 0.55); background: transparent; }
.calc-err { color: var(--ui-error); font-size: var(--t-source); margin: 1rem 0 0; }

.calc-out { margin: 1.6rem 0; }
.calc-heads { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.calc-head { background: var(--navy-light); border: 1px solid var(--hairline); border-radius: 4px; padding: 1.1rem 1.2rem; }
.calc-head-label { font-family: 'Cinzel', serif; font-size: var(--t-source); letter-spacing: var(--track-label-em);
                   text-transform: uppercase; color: var(--gold); display: block; margin-bottom: 0.3rem; }
.calc-head-value { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 2.1rem; color: var(--off-white);
                   display: block; font-variant-numeric: lining-nums tabular-nums; overflow-wrap: anywhere; }
.calc-head-note { font-size: var(--t-source); color: var(--text-muted); display: block; margin-top: 0.3rem; }

.calc-box { background: var(--navy-mid); border: 1px solid var(--hairline); border-radius: 4px; padding: 1.1rem 1.2rem; margin: 1rem 0; }
.calc-box h3, .calc-h3 { font-family: 'Cinzel', serif; font-size: var(--t-source); letter-spacing: var(--track-label-em);
                         text-transform: uppercase; color: var(--gold); margin: 0 0 0.7rem; }
.calc-box dl { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 0.45rem 1rem; }
.calc-box dt { font-size: var(--t-source); color: var(--text-muted); margin: 0; }
.calc-box dd { margin: 0; font-size: var(--t-source); color: var(--off-white); text-align: right; font-variant-numeric: lining-nums tabular-nums; }
.calc-box .calc-sum { border-top: 1px solid var(--hairline); padding-top: 0.5rem; color: var(--off-white); }
.calc-box p, .calc-box li { font-size: var(--t-source); color: var(--text-muted); }

.calc-tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.calc-tbl { width: 100%; border-collapse: collapse; font-size: var(--t-source); font-variant-numeric: lining-nums tabular-nums; }
.calc-tbl th { text-align: left; color: var(--gold); font-weight: normal; border-bottom: 1px solid var(--hairline); padding: 0.45rem 0.6rem; white-space: nowrap; }
.calc-tbl td { border-bottom: 1px solid var(--hairline); padding: 0.45rem 0.6rem; color: var(--off-white); }
.calc-tbl td.num, .calc-tbl th.num { text-align: right; white-space: nowrap; }

.calc-cta { border: 1px solid var(--gold); border-radius: 4px; padding: 1.2rem 1.4rem; margin: 2rem 0;
            display: flex; gap: 1rem 1.6rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.calc-cta p { margin: 0; color: var(--off-white); max-width: 52ch; }

.calc-section { margin: 2.4rem 0; }
.calc-section h2 { font-family: 'Cormorant Garamond', Georgia, serif; color: var(--off-white); }
.calc-section p, .calc-section li { color: var(--text-muted); max-width: 70ch; }
.calc-section h3 { font-family: 'Cormorant Garamond', Georgia, serif; color: var(--off-white); font-size: 1.25rem; }
.calc-src { padding-left: 1.1rem; }
.calc-src li { margin: 0.35rem 0; }
.calc-dated { color: var(--text-muted); }
.calc-asof { font-size: var(--t-source); color: var(--text-muted); }

.calc-faq { margin: 2.4rem 0; }
.calc-faq h2 { font-family: 'Cormorant Garamond', Georgia, serif; color: var(--off-white); }
.calc-faq details { border-top: 1px solid var(--hairline); padding: 0.9rem 0; }
.calc-faq summary { cursor: pointer; color: var(--off-white); font-size: 1rem; min-height: 24px; }
.calc-faq summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.calc-faq .calc-faq-a { color: var(--text-muted); max-width: 70ch; margin: 0.7rem 0 0; }

.calc-related ul { padding-left: 1.1rem; }
.calc-disclaimer { font-size: var(--t-source); color: var(--text-muted); border-top: 1px solid var(--hairline); padding-top: 1rem; margin-top: 2rem; }

/* Hub */
.calc-hub { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin: 1.6rem 0; }
.calc-hub a { display: block; background: var(--navy-mid); border: 1px solid var(--hairline); border-radius: 4px;
              padding: 1.1rem 1.2rem; text-decoration: none; min-height: 44px; }
.calc-hub a:hover, .calc-hub a:focus-visible { border-color: var(--gold); }
.calc-hub strong { display: block; color: var(--off-white); font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.3rem; }
.calc-hub span { display: block; color: var(--text-muted); font-size: var(--t-source); margin-top: 0.35rem; }

@media (max-width: 600px) {
  .calc-panel { padding: 1.1rem 1rem; }
  .calc-actions .calc-btn, .calc-cta .calc-btn { width: 100%; }
  .calc-head-value { font-size: 1.7rem; }
}
