/* =========================================================
   OPSPARINGSMÅL — PAGE SPECIFIC STYLES
   ========================================================= */

/* ---------- Result card ---------- */
.result-card.result-premium {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.result-card.result-premium > * {
  width: 100%;
}

/* Result heading – align with Guardian h2 scale */
.result-heading {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
  color: var(--text);
}
@media (max-width: 768px) {
  .result-heading { font-size: 1.05rem; }
}

/* ---------- Topline ---------- */
.result-topline {
  text-align: center;
  margin-bottom: 24px;
  width: 100%;
}
.topline-label {
  font-size: 0.875rem;
  color: var(--muted);
}
.topline-value {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: 6px;
}
@media (max-width: 768px) {
  .topline-value { font-size: 1.8rem; }
}

/* ---------- Result grid ---------- */
.result-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 560px) {
  .result-grid { grid-template-columns: 1fr; }
}
.result-label {
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-2);
}
.result-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin: 6px 0;
}
.result-desc {
  font-size: 0.80rem;
  color: var(--muted);
}

/* ---------- Goal results grid (alternative layout) ---------- */
.goal-results-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  text-align: center;
  margin-bottom: 24px;
}
@media (max-width: 560px) {
  .goal-results-grid { grid-template-columns: 1fr; }
}
.goal-result-item { max-width: 260px; }

/* ---------- Insight bar ---------- */
.gpw-insight {
  border-left: 3px solid var(--primary);
  background: var(--primary-soft);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 0.875rem;
  color: var(--text);
  margin-top: 16px;
  display: none;
}

/* ---------- Note text ---------- */
.result-note {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.5;
}

/* ---------- Info/tax note (gpw-note) ---------- */
.gpw-note {
  border-top: 1px solid var(--border);
  margin-top: 20px;
  padding-top: 16px;
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.6;
}
.gpw-note p { margin: 0 0 8px; }
.gpw-note-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 700;
}
.gpw-note-heading--tax { margin-top: 16px; }
.goal-extra-icon { font-size: 0.85rem; color: var(--primary); }
.gpw-note-list {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 0.875rem;
  line-height: 1.6;
}
.gpw-note-list li { margin-bottom: 6px; }
.gpw-note a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}
.gpw-note a:hover { text-decoration: underline; }

/* ---------- Input card ---------- */
.input-card { width: 100%; }
.input-card .field-group {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-bottom: 14px;
}
.input-card .field-group label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-2);
  margin-bottom: 5px;
}
.input-card input,
.input-card select {
  width: 100%;
  display: block;
  box-sizing: border-box;
  font-size: 0.875rem;
}
.input-card .button-row {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

/* ---------- Table ---------- */
.guardian-table-wrapper { margin-top: 16px; }
.table-wrapper {
  margin-top: 8px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: auto;
  max-height: 280px;
}
.guardian-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.guardian-table thead th {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 2px solid var(--border);
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-2);
  background: var(--surface-2);
  position: sticky;
  top: 0;
}
.guardian-table tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.guardian-table tbody tr:last-child td { border-bottom: none; }
.guardian-table tbody tr:hover { background: var(--surface-2); }
.guardian-table td:nth-child(n+2) { text-align: right; }

/* ---------- Chart container ---------- */
.chart-container {
  min-height: 200px;
  margin-top: 8px;
}
.chart-container canvas { width: 100% !important; }
