/* ==========================================================================
   ThinkGLP — Calculator / tool UI (loaded only on /tools pages)
   Builds on the tokens in styles.css.
   ========================================================================== */
.tool-shell { padding: 30px 0 70px; }
.tool-wrap { max-width: 760px; margin: 0 auto; }

.tool-head { border-bottom: 1px solid var(--line); padding-bottom: 22px; margin-bottom: 26px; }
.tool-head .topic { color: var(--emerald-700); font-weight: 700; font-size: 13px; letter-spacing: .07em; text-transform: uppercase; }
.tool-head h1 { font-family: var(--font-head); font-size: clamp(1.9rem, 4.6vw, 2.7rem); line-height: 1.08; letter-spacing: -.02em; color: var(--ink); margin: 10px 0 12px; }
.tool-head .standfirst { font-size: 1.14rem; color: var(--muted); margin: 0; max-width: 64ch; }

/* Calculator card */
.calc { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin: 0 0 24px; }
.calc .seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin-bottom: 20px; gap: 4px; }
.calc .seg button { border: none; background: transparent; padding: 8px 18px; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; }
.calc .seg button.on { background: var(--emerald-700); color: #fff; }

.calc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.field label .hint { font-size: 12.5px; color: var(--faint); font-weight: 400; }
.field input, .field select { font: inherit; font-size: 16px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: #fff; color: var(--ink); width: 100%; }
.field input:focus, .field select:focus { outline: none; border-color: var(--emerald-500); box-shadow: 0 0 0 3px rgba(20,184,166,.15); }
.field .row2 { display: flex; gap: 10px; }
.hidden { display: none !important; }

/* Result panel */
.result { margin-top: 22px; background: linear-gradient(180deg, var(--emerald-50), #fff); border: 1px solid var(--emerald-100); border-left: 4px solid var(--emerald-700); border-radius: var(--radius); padding: 22px 24px; }
.result .rlabel { font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--emerald-800); margin-bottom: 8px; }
.result .big { font-family: var(--font-data); font-size: 2.7rem; font-weight: 700; color: var(--forest-700); line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.result .sub { font-size: 16px; color: var(--text); margin-top: 8px; }
.result .pill { display: inline-block; margin-top: 12px; padding: 4px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 700; background: var(--emerald-700); color: #fff; }
.result .breakdown { margin-top: 14px; font-size: 15px; color: var(--muted); }
.result .breakdown strong { color: var(--ink); }
.privacy-note { font-size: 12.5px; color: var(--faint); margin-top: 14px; display: flex; align-items: center; gap: 6px; }
.privacy-note svg { flex: none; color: var(--emerald-700); }

/* Inline CTA */
.tool-cta { margin: 24px 0; }
.tool-cta a.btn-inline { display: inline-block; background: var(--ink); color: #fff; font-weight: 700; padding: 11px 20px; border-radius: 999px; font-size: 15px; }
.tool-cta a.btn-inline:hover { background: var(--emerald-800); text-decoration: none; }

/* Supporting prose under a tool */
.tool-prose { max-width: 720px; font-size: 17.5px; }
.tool-prose h2 { font-family: var(--font-head); font-size: 1.5rem; color: var(--ink); margin: 34px 0 12px; scroll-margin-top: 90px; }
.tool-prose p { margin: 0 0 16px; color: var(--text); }
.tool-prose ul { margin: 0 0 18px; padding-left: 22px; }
.tool-prose li { margin-bottom: 8px; }
.tool-prose a { color: var(--emerald-700); text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 640px) {
  .calc-grid { grid-template-columns: 1fr; }
}
