/* GPON optical power budget calculator. Complements styles.css and maram-tools-kit.css. */
.gp-hero-visual { display: flex; flex-direction: column; gap: 16px; }
.gp-mock { position: relative; z-index: 1; padding: 22px; border-radius: 20px; background: rgba(255,255,255,.97); box-shadow: 0 24px 60px rgba(0,0,0,.25); display: grid; gap: 12px; color: var(--ink); }
.gp-mock-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.gp-mock-top strong { font-size: .95rem; }
.gp-mock-pill { padding: 5px 10px; border-radius: 999px; background: #dcfce7; color: #15803d; font-size: .72rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.gp-mock-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gp-mock-k { padding: 12px 14px; border-radius: 14px; background: var(--soft); }
.gp-mock-k span { display: block; color: var(--muted); font-size: .7rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.gp-mock-k b { font-size: 1.25rem; letter-spacing: -.03em; }
.gp-mock-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: #e8eef6; }
.gp-mock-bar i { display: block; height: 100%; }
.gp-mock-note { margin: 0; font-size: .8rem; font-weight: 700; color: var(--muted); }

.gp-layout { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 26px; align-items: start; }
.gp-results { position: sticky; top: 140px; display: grid; gap: 16px; }
.gp-note { margin: 4px 0 8px; font-size: .88rem; padding: 10px 14px; border-radius: 12px; background: #f0f7ff; color: #1e3a5f; border: 1px solid #d6e8fb; }
.gp-note strong { color: inherit; }
.gp-field label { min-height: 2.4em; display: flex; align-items: flex-end; line-height: 1.3; }
.gp-input { position: relative; display: flex; align-items: center; }
.gp-input input, .gp-input select { width: 100%; border: 1px solid var(--border); border-radius: 12px; background: var(--soft); padding: 12px 14px; font-weight: 750; color: var(--ink); }
.gp-input select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px); background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; padding-right: 32px; }
.gp-input input:focus, .gp-input select:focus { outline: none; border-color: var(--blue); background-color: #fff; box-shadow: 0 0 0 4px rgba(10,102,194,.12); }
.gp-input.has-post input { padding-right: 58px; }
.gp-unit { position: absolute; right: 12px; color: var(--muted); font-weight: 800; pointer-events: none; font-size: .78rem; }
.gp-hint { margin-top: 8px; font-size: .82rem; font-weight: 650; color: var(--muted); }
.gp-class-row { display: flex; flex-wrap: wrap; gap: 8px; }
.gp-class { border: 1px solid var(--border); background: #fff; color: var(--ink); padding: 10px 14px; border-radius: 12px; font-weight: 800; font-size: .88rem; cursor: pointer; }
.gp-class small { display: block; font-weight: 650; color: var(--muted); font-size: .72rem; margin-top: 2px; }
.gp-class[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.gp-class[aria-pressed="true"] small { color: rgba(255,255,255,.72); }
.gp-split-modes { margin: 0 0 12px; }
.gp-eq { margin: 8px 0 0; font-size: .82rem; font-weight: 700; color: var(--muted); }

.gp-overall { display: flex; align-items: flex-start; gap: 14px; padding: 18px 20px; border-radius: 20px; border: 1px solid var(--border); background: #fff; box-shadow: var(--shadow); }
.gp-overall strong { display: block; font-size: 1.02rem; }
.gp-overall p { margin: 4px 0 0; font-size: .88rem; color: var(--muted); font-weight: 650; }
.gp-pill { flex: 0 0 auto; padding: 7px 12px; border-radius: 999px; font-size: .76rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.gp-overall.is-pass, .gp-dir.is-pass { border-color: #bbf7d0; }
.gp-overall.is-pass { background: #f0fdf4; }
.gp-overall.is-pass .gp-pill, .gp-dir.is-pass .gp-pill { background: #dcfce7; color: #15803d; }
.gp-overall.is-warn, .gp-dir.is-warn { border-color: #fde68a; }
.gp-overall.is-warn { background: #fffbeb; }
.gp-overall.is-warn .gp-pill, .gp-dir.is-warn .gp-pill { background: #fef3c7; color: #92400e; }
.gp-overall.is-fail, .gp-dir.is-fail { border-color: #fecaca; }
.gp-overall.is-fail { background: #fef2f2; }
.gp-overall.is-fail .gp-pill, .gp-dir.is-fail .gp-pill { background: #fee2e2; color: #b91c1c; }
.gp-directions { display: grid; gap: 16px; }
.gp-dir { padding: 20px; border-radius: 22px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow); }
.gp-dir header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.gp-dir h3 { margin: 0; font-size: 1.15rem; }
.gp-dir h3 small { color: var(--muted); font-weight: 700; font-size: .8rem; }
.gp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gp-kpis .mt-kpi { min-width: 0; }
.gp-kpis .mt-kpi strong { font-size: clamp(1.05rem, 2vw, 1.35rem); font-variant-numeric: tabular-nums; white-space: nowrap; }
.gp-kpis .mt-kpi.is-pass strong { color: #15803d; }
.gp-kpis .mt-kpi.is-warn strong { color: #b45309; }
.gp-kpis .mt-kpi.is-fail strong { color: #b91c1c; }
.gp-reach { margin: 12px 0 0; font-size: .9rem; font-weight: 650; color: #334155; }
.gp-hot { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: #fff7ed; color: #9a3412; font-size: .86rem; font-weight: 700; }
.gp-bar { margin-top: 14px; }
.gp-bar-track { position: relative; display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: #e8eef6; }
.gp-seg { display: block; height: 100%; min-width: 0; }
.gp-budget-mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); border-radius: 2px; }
.gp-bar-key { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0 0; padding: 0; list-style: none; font-size: .78rem; font-weight: 700; color: #334155; }
.gp-bar-key i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.gp-bar-key b { font-variant-numeric: tabular-nums; }
.gp-credit { margin: 4px 2px 0; font-size: .78rem; font-weight: 650; color: var(--muted); }
.gp-share-note { margin: 0; max-width: 42ch; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

@media (max-width: 1040px) {
  .gp-layout { grid-template-columns: 1fr; }
  .gp-results { position: static; }
}
@media (max-width: 720px) {
  .gp-mock { padding: 16px; }
  .gp-class { flex: 1 1 calc(50% - 8px); }
}

[hidden] { display: none !important; }
