/* AllaRätt.nu – kompletterande stil för historiska prov.
   Glasytorna följer #ordlista-wrapper i design-dark.css. */
.hp-history { padding-bottom: 42px; }
.hp-history .hp-breadcrumbs { font-size:.9rem; margin:20px 0; display:flex; gap:9px; flex-wrap:wrap; align-items:center; opacity:.85; }
.hp-history .hp-breadcrumbs a { color:inherit; text-decoration:none; }

/* Samma glasprincip som #ordlista-wrapper i design-dark.css.
   Endast denna sidans tre typer av rutor påverkas. */
.hp-history .hp-stat,
.hp-history .hp-cta,
.hp-history .hp-file-list {
  position: relative;
  background: rgba(12,18,28,.05);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 15px 40px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.03);
  overflow: hidden;
  isolation: isolate;
}
/* Kantreflektion och ljusträff, hämtade från ordlista-wrapper. */
.hp-history .hp-stat::before,
.hp-history .hp-cta::before,
.hp-history .hp-file-list::before,
.hp-history .hp-stat::after,
.hp-history .hp-cta::after,
.hp-history .hp-file-list::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.hp-history .hp-stat::before,
.hp-history .hp-cta::before,
.hp-history .hp-file-list::before {
  background: linear-gradient(135deg,
    rgba(255,255,255,.22) 0%, rgba(255,255,255,.08) 18%,
    rgba(255,255,255,.02) 35%, transparent 52%,
    rgba(0,255,120,.05) 72%, rgba(255,255,255,.10) 100%);
  opacity: .9;
}
.hp-history .hp-stat::after,
.hp-history .hp-cta::after,
.hp-history .hp-file-list::after {
  inset: -1px;
  background: conic-gradient(from 215deg at 10% 10%,
    transparent 0deg, transparent 18deg,
    rgba(255,255,255,.55) 30deg, rgba(170,255,220,.28) 42deg,
    transparent 62deg, transparent 210deg,
    rgba(255,255,255,.12) 245deg, transparent 270deg, transparent 360deg);
  filter: blur(.2px);
  opacity: .95;
}
.hp-stat-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(175px,1fr)); gap:14px; margin:25px 0; }
.hp-history .hp-stat {
  display:flex; flex-direction:column; justify-content:center; gap:8px;
  padding:22px 14px; border-radius:18px; min-height:105px; text-align:center;
}
.hp-stat-label { font-size:.82rem; opacity:.76; }
.hp-stat strong { font-size:clamp(1rem,2vw,1.45rem); line-height:1.25; }

.hp-history .hp-cta { padding:25px; margin:28px 0; border-radius:20px; }
.hp-cta h2 { margin-top:0; }
.hp-cta-button { display:inline-block; text-decoration:none; margin-top:12px; }

.hp-history .hp-file-list { border-radius:18px; overflow:hidden; margin:18px 0; }
.hp-file { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:15px 17px; border-bottom:1px solid rgba(255,255,255,.085); }
.hp-file:last-child { border-bottom:0; }
.hp-file-info { display:flex; align-items:center; gap:12px; min-width:0; }
.hp-file-info .fa-file-pdf { color:inherit; opacity:.75; }
.hp-file-action {
  color:inherit; background:rgba(255,255,255,.055);
  border:1px solid rgba(255,255,255,.15);
  border-radius:12px; padding:10px 13px; white-space:nowrap;
  font:inherit; font-size:.9rem; cursor:pointer; text-decoration:none;
  transition:background .2s ease, border-color .2s ease;
}
.hp-file-action:hover,.hp-file-action:focus-visible { background:rgba(255,255,255,.11); border-color:rgba(255,255,255,.27); }
.hp-file-action:focus-visible { outline:2px solid currentColor; outline-offset:3px; }
.hp-history .content-section { margin-top:34px; }
.hp-related { display:flex; flex-wrap:wrap; gap:18px; margin:35px 0; }
.hp-related a { text-decoration:none!important;  }

@media (max-width:650px) {
  .hp-stat-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .hp-stat { min-height:85px; padding:14px 10px; }
  .hp-file { align-items:flex-start; flex-direction:column; }
  .hp-file-action { width:100%; text-align:center; box-sizing:border-box; }
  .hp-cta { padding:17px; }
}
@media (max-width:360px) { .hp-stat-grid { grid-template-columns:1fr; } }
@media (prefers-reduced-motion:reduce) { .hp-file-action { transition:none; } }

/* Samma bredd som faktakorten på historiksidan. */
.hp-history #hp-provsimulator {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-inline: 0;
  padding-inline: 0;
}
