/* ───────────────────────────────────────────────────────────────
   GYMEX — calculator layer for /tools/ pages.
   Loads after guides.css; uses the same tokens (theme.css wins last).
   ─────────────────────────────────────────────────────────────── */

.calc [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.calc { margin: 8px 0 32px; padding: 24px; border: 1px solid var(--border-highlight); border-radius: 20px; background: var(--surface); }
.calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.calc label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-muted); }
.calc input, .calc select { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border-highlight); background: rgba(255,255,255,0.03); color: var(--text); font: inherit; font-size: 16px; }
.calc input:focus, .calc select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.calc fieldset { border: 0; margin-top: 16px; }
.calc legend { font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }
.calc .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.calc .chips label { flex-direction: row; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); }
.calc .chips input { width: auto; }

.calc-result { margin-top: 20px; padding: 18px 20px; border-radius: 16px; background: linear-gradient(135deg, rgba(159,216,255,0.08), rgba(138,166,201,0.03)); border: 1px solid rgba(159,216,255,0.2); }
.calc-result .label { font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--accent); }
.calc-result .big { font-family: 'Outfit', sans-serif; font-size: clamp(26px, 5vw, 38px); font-weight: 800; letter-spacing: -0.8px; color: var(--text); line-height: 1.2; margin-top: 4px; overflow-wrap: anywhere; }
.calc-result .sub { font-size: 14px; color: var(--text-muted); margin-top: 6px; }
.calc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-top: 14px; }
.calc-stats div { padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; }
.calc-stats span { display: block; font-size: 12px; color: var(--text-muted); }
.calc-stats strong { font-family: 'Outfit', sans-serif; font-size: 20px; color: var(--text); }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 16px 0 24px; }
.table-scroll .guide-table { margin: 0; min-width: 420px; }

.app-nudge { display: flex; gap: 14px; align-items: center; margin: 28px 0; padding: 18px 20px; border: 1px solid var(--border-highlight); border-radius: 16px; background: var(--glass); }
.app-nudge p { margin: 0; color: var(--text); }
.app-nudge .btn { white-space: nowrap; }
@media (max-width: 560px) { .app-nudge { flex-direction: column; align-items: stretch; } .calc { padding: 18px; } }

.share-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: -12px 0 8px; }
.share-status { font-size: 13px; color: var(--text-muted); }
.embed-code { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border-highlight); background: rgba(255,255,255,0.03); color: var(--text); font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; resize: vertical; margin-bottom: 10px; }
.embed-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.embed-card .embed-code { margin-top: 12px; }
.embed-card p { font-size: 14px; }
