/* ═══════════════════════════════════════════════════════════
   ImmICalculator — PNP Calculator Styles
   Self-contained, no external dependencies
   ═══════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green:       #1D9E75;
  --green-dk:    #085041;
  --green-hover: #178a64;
  --green-lt:    #e8f7f2;
  --bg:          #f8f8f6;
  --card:        #ffffff;
  --border:      rgba(0,0,0,0.09);
  --text:        #111;
  --muted:       #555;
  --radius:      10px;
  --font:        -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding: 32px 16px 64px;
  line-height: 1.55;
}

/* ── Page wrapper ── */
.pnp-wrap { max-width: 720px; margin: 0 auto; }

/* ── Back link ── */
.pnp-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.83rem; color: var(--muted); text-decoration: none; margin-bottom: 20px;
}
.pnp-back:hover { color: var(--green); }

/* ── Header ── */
.pnp-header { text-align: center; margin-bottom: 28px; }
.pnp-header h1 { font-size: 1.75rem; font-weight: 800; margin-bottom: 5px; }
.pnp-header p  { font-size: 0.92rem; color: var(--muted); }

/* ── Progress ── */
.pnp-progress { margin-bottom: 24px; }
.pnp-progress__meta {
  display: flex; justify-content: space-between;
  font-size: 0.78rem; color: var(--muted); margin-bottom: 7px; font-weight: 500;
}
.pnp-progress__bar {
  height: 5px; background: #e0e0e0; border-radius: 999px; overflow: hidden;
}
.pnp-progress__fill {
  height: 100%; background: var(--green); border-radius: 999px; transition: width 0.3s;
}

/* ── Card ── */
.pnp-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 28px 24px; box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.pnp-card h2 {
  font-size: 1.15rem; font-weight: 700; margin-bottom: 6px;
  padding-bottom: 14px; border-bottom: 1px solid var(--border);
}
.pnp-card > p { font-size: 0.88rem; color: var(--muted); margin-bottom: 20px; }

/* ── Section headings ── */
.pnp-section-title {
  font-size: 0.95rem; font-weight: 700; margin: 20px 0 10px; color: #222;
}

/* ── Form groups ── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; font-size: 0.84rem; font-weight: 600;
  margin-bottom: 7px; color: #333;
}
.form-hint { font-size: 0.74rem; color: var(--muted); margin-top: 4px; }

/* ── Inputs / Selects ── */
.form-control {
  width: 100%; padding: 10px 13px; font-size: 0.9rem;
  border: 1.5px solid rgba(0,0,0,0.14); border-radius: var(--radius);
  background: #fff; color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s; appearance: none;
}
.form-control:focus {
  outline: none; border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(29,158,117,0.12);
}

/* ── Language grid ── */
.lang-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}

/* ── Check/Radio rows ── */
.check-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius); cursor: pointer; background: #fff;
  transition: border-color 0.15s, background 0.15s; margin-bottom: 8px;
}
.check-row:hover { border-color: var(--green); background: var(--green-lt); }
.check-row input[type="checkbox"],
.check-row input[type="radio"] {
  margin-top: 2px; flex-shrink: 0; accent-color: var(--green);
  width: 16px; height: 16px;
}
.check-row .cr-title { font-size: 0.88rem; font-weight: 600; margin-bottom: 2px; }
.check-row .cr-desc  { font-size: 0.75rem; color: var(--muted); line-height: 1.4; }

/* Deduction row (red) */
.check-row.danger:hover { border-color: #e05; background: #fff5f5; }

/* Nested radio group */
.radio-group { padding: 14px; border: 1.5px solid var(--border); border-radius: var(--radius); margin-bottom: 8px; }
.radio-group .rg-title { font-size: 0.88rem; font-weight: 600; margin-bottom: 10px; }
.radio-opt { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 0.86rem; cursor: pointer; }
.radio-opt input { accent-color: var(--green); width: 15px; height: 15px; }

/* ── Collapsible section ── */
.collapsible { display: none; margin-top: 12px; }
.collapsible.open { display: block; }

/* ── Info box ── */
.info-box {
  background: var(--green-lt); border-left: 4px solid var(--green);
  padding: 12px 14px; border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.82rem; color: var(--green-dk); margin-bottom: 16px; line-height: 1.5;
}
.warn-box {
  background: #fff5f5; border-left: 4px solid #e05;
  padding: 12px 14px; border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.82rem; color: #8b0000; margin-bottom: 16px; line-height: 1.5;
}

/* ── Divider ── */
.pnp-divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* ── Nav buttons ── */
.pnp-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border);
}
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 22px; border-radius: var(--radius);
  font-size: 0.9rem; font-weight: 600; border: none;
  cursor: pointer; text-decoration: none; transition: background 0.15s;
  font-family: var(--font);
}
.btn-primary   { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-hover); }
.btn-secondary { background: #f0f0ee; color: #444; }
.btn-secondary:hover { background: #e4e4e2; }
.btn-lg { padding: 13px 28px; font-size: 1rem; }

/* ── Results ── */
.score-box {
  text-align: center; background: var(--green-lt);
  border: 1px solid rgba(29,158,117,0.2); border-radius: 14px;
  padding: 32px 24px; margin-bottom: 20px;
}
.score-box__num   { font-size: 3.5rem; font-weight: 900; color: var(--green-dk); line-height: 1; }
.score-box__label { font-size: 0.78rem; font-weight: 700; color: var(--green); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
.score-box__max   { font-size: 0.84rem; color: var(--muted); margin-top: 6px; }

.badge {
  display: inline-block; padding: 4px 14px; border-radius: 999px;
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.03em;
}
.badge-ok   { background: var(--green-lt); color: var(--green-dk); }
.badge-warn { background: #fff8e1; color: #7a5000; }
.badge-fail { background: #fde8e8; color: #8b0000; }

.breakdown { margin-bottom: 20px; }
.breakdown h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 12px; }
.breakdown-row {
  display: flex; justify-content: space-between;
  padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 0.86rem;
}
.breakdown-row:last-child { border-bottom: none; }
.breakdown-row__pts { font-weight: 700; color: var(--green); }
.breakdown-total {
  display: flex; justify-content: space-between;
  padding: 14px 0 0; margin-top: 8px; border-top: 2px solid var(--green);
  font-weight: 800; font-size: 1rem;
}
.breakdown-total span:last-child { color: var(--green-dk); }

/* ── Responsive ── */
@media (max-width: 560px) {
  body { padding: 20px 12px 48px; }
  .pnp-card { padding: 20px 16px; }
  .lang-grid { grid-template-columns: 1fr; }
  .pnp-nav { flex-direction: column-reverse; gap: 10px; }
  .pnp-nav .btn { width: 100%; justify-content: center; }
}

@media print {
  body { background: #fff; }
  .pnp-back, .pnp-nav, form { display: none !important; }
}
