/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: var(--space-5);
  box-shadow: var(--shadow-card);
}

.card-grid {
  display: grid;
  gap: var(--space-4);
}

.card-grid--2 { grid-template-columns: repeat(2, 1fr); }
.card-grid--3 { grid-template-columns: repeat(3, 1fr); }
.card-grid--watch { grid-template-columns: 1.6fr 1fr; }

.info-card__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-3);
}

.info-card__icon--mint { background: var(--mint-tint); color: var(--violet); }
.info-card__icon--gold { background: var(--gold-tint); color: #9a6a10; }
.info-card__icon--lilac { background: var(--violet-tint); color: var(--violet); }

.card--link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  text-decoration: none;
  color: var(--ink);
}

.link-card__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--mint-tint);
  color: var(--violet);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.link-card__body { flex: 1; }
.link-card__body h3 { margin-bottom: 2px; }
.link-card__body p { margin: 0; font-size: 0.92rem; }

.link-card .icon--chevron { color: var(--muted); }

/* ---------- Timeline (Spelstopp / Dragning / Resultat) ---------- */
.timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
  position: relative;
}

.timeline__step {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  position: relative;
}

.timeline__step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 28px;
  right: calc(-1 * var(--space-5) + 8px);
  width: 48px;
  height: 2px;
  background: #cfc6e3;
}

.timeline__num {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.15rem;
  font-family: var(--font-heading);
  flex-shrink: 0;
}

.timeline__step:nth-child(1) .timeline__num { background: var(--mint); color: var(--violet-dark); }
.timeline__step:nth-child(2) .timeline__num { background: var(--gold); color: var(--violet-dark); }
.timeline__step:nth-child(3) .timeline__num { background: #ded4f2; color: var(--violet-dark); }

.timeline__step h3 { margin-bottom: 2px; font-size: 1.25rem; }
.timeline__step p { margin: 0; font-size: 0.95rem; }

.card .timeline { margin-top: var(--space-4); gap: var(--space-3); }
.card .timeline__step { flex-direction: column; align-items: center; text-align: center; gap: var(--space-2); }
.card .timeline__num { width: 48px; height: 48px; font-size: 1rem; }
.card .timeline__step h3 { font-size: 1.05rem; }
.card .timeline__step p { font-size: 0.85rem; }
.card .timeline__step:not(:last-child)::after { top: 23px; left: calc(50% + 30px); right: auto; width: calc(100% - 60px + var(--space-3)); }

/* ---------- Results ---------- */
.result-panel {
  background: linear-gradient(135deg, #3a2663 0%, var(--violet-dark) 100%);
  color: var(--white);
  border-radius: var(--radius);
  padding: var(--space-5);
  display: grid;
  grid-template-columns: 0.85fr 1.7fr;
  gap: var(--space-5);
  align-items: center;
}

.result-panel__intro h2 { color: var(--white); font-size: 1.9rem; }
.result-panel__intro p { color: #cfc6e3; margin: 0 0 var(--space-3); }
.result-panel__intro .checked-date { color: #a99dc4; }

.result-panel__groups {
  display: flex;
  gap: var(--space-5);
  flex-wrap: nowrap;
  align-items: center;
  background: rgba(0, 0, 0, 0.28);
  border-radius: var(--radius);
  padding: var(--space-5);
}

.result-panel__groups > div + div {
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  padding-left: var(--space-5);
}

.result-panel__groups .result-balls { flex-wrap: nowrap; gap: 10px; }

.result-group__label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: var(--space-3);
  text-transform: none;
}

.result-balls { display: flex; gap: var(--space-3); flex-wrap: wrap; }

.ball {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  position: relative;
}

.ball--main {
  color: var(--ink);
  background: radial-gradient(circle at 32% 28%, #ffffff 0%, #f3f0f8 45%, #cfc7dd 100%);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35), inset 0 -4px 8px rgba(32, 18, 56, 0.12);
}

.ball--star { color: var(--violet-dark); width: 62px; height: 62px; }
.ball__star { position: absolute; inset: 0; color: var(--gold); filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35)); }
.ball__star svg { width: 100%; height: 100%; }
.ball__num { position: relative; z-index: 1; }
.ball--star .ball__num { font-size: 1.2rem; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.badge--demo {
  background: rgba(240, 197, 106, 0.18);
  color: var(--gold);
  border: 1px solid rgba(240, 197, 106, 0.5);
}

.result-panel .badge--demo { margin-bottom: var(--space-2); }

/* ---------- FAQ ---------- */
.faq__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}

.faq__contact {
  text-decoration: none;
  font-weight: 700;
  color: var(--violet);
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.faq__list { display: grid; gap: var(--space-3); }

.faq__item {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: var(--space-2) var(--space-4);
}

.faq__item summary {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-block: var(--space-3);
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  min-height: 44px;
}

.faq__item summary::-webkit-details-marker { display: none; }

.faq__q-mark {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--violet-tint);
  color: var(--violet);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.faq__q-mark .icon { width: 16px; height: 16px; }

.faq__question { flex: 1; }

.faq__item[open] .icon--chevron { transform: rotate(180deg); }

.faq__answer {
  padding: 0 0 var(--space-4) 44px;
  color: var(--muted);
}

.faq__answer a { color: var(--violet); font-weight: 600; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { padding-block: var(--space-4); }

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  font-size: 0.88rem;
  color: var(--muted);
}

.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--violet); text-decoration: underline; }
.breadcrumbs [aria-current="page"] { color: var(--ink); font-weight: 600; }

/* ---------- Filter form (archive) ---------- */
.filter-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-3);
  align-items: end;
}

.filter-form .btn { grid-column: 1 / -1; white-space: nowrap; }

@media (min-width: 640px) {
  .filter-form .btn { grid-column: auto; }
}

.filter-field { display: flex; flex-direction: column; gap: 6px; }

.filter-field label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.filter-field select {
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  font: inherit;
}

/* ---------- Archive table ---------- */
.archive-table-wrap { overflow-x: auto; }

.archive-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 var(--space-2);
  min-width: 640px;
}

.archive-table th {
  text-align: left;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 var(--space-3) var(--space-2);
}

.archive-table td {
  background: var(--white);
  padding: var(--space-3);
  vertical-align: middle;
}

.archive-table tr td:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.archive-table tr td:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.archive-table .result-balls { gap: 6px; }
.archive-table .ball { width: 40px; height: 40px; font-size: 0.9rem; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.archive-table .ball--star { width: 42px; height: 42px; }

.empty-state {
  background: var(--white);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: var(--space-5);
  text-align: center;
  color: var(--muted);
}

.pagination {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
  margin-top: var(--space-5);
}

.pagination button,
.pagination span {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.pagination [aria-current="page"] {
  background: var(--violet);
  color: var(--white);
}

/* ---------- Step list (viewing guide) ---------- */
.step-list { display: grid; gap: var(--space-4); }

.step-list__item {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: var(--space-4);
  align-items: flex-start;
}

.step-list__num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-family: var(--font-heading);
}

.step-list__item:nth-child(1) .step-list__num { background: var(--mint); color: var(--violet-dark); }
.step-list__item:nth-child(2) .step-list__num { background: var(--gold); color: var(--violet-dark); }
.step-list__item:nth-child(3) .step-list__num { background: #ded4f2; color: var(--violet-dark); }

.step-list__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--lilac);
  color: var(--violet);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Source note ---------- */
.source-note {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: var(--space-3);
}

.source-note a { color: var(--violet); font-weight: 600; text-decoration: underline; }

.checked-date {
  font-size: 0.82rem;
  color: var(--muted);
}

/* ---------- Prose pages (Om oss, Integritet, etc.) ---------- */
.prose h2 { margin-top: var(--space-6); }
.prose ul { list-style: disc; padding-left: 1.4em; margin-bottom: var(--space-4); }
.prose ul li { color: var(--muted); margin-bottom: var(--space-2); }
.prose a { color: var(--violet); font-weight: 600; }

/* ---------- Forms (contact) ---------- */
.contact-form { display: grid; gap: var(--space-4); margin-top: var(--space-4); }

.form-field { display: grid; gap: 6px; }

.form-field label { font-weight: 600; font-size: 0.92rem; }

.form-field input[type="text"],
.form-field input[type="email"],
.form-field textarea {
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  width: 100%;
}

.form-field textarea { min-height: 140px; resize: vertical; }

.form-field input:focus-visible,
.form-field textarea:focus-visible { outline: 3px solid var(--violet); outline-offset: 1px; }

.form-field--checkbox {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: var(--space-2);
}

.form-field--checkbox input { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; }
.form-field--checkbox label { font-weight: 400; font-size: 0.9rem; }

.form-field--honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  margin: var(--space-3) 0;
  font-size: 0.92rem;
}

.form-status--success { background: var(--mint-tint); color: #1c5c37; }
.form-status--error { background: #fbe7e7; color: #8a2323; }
.form-status--error ul { list-style: disc; padding-left: 1.2em; margin: 0; }
.form-status--error li { margin-bottom: 4px; }

/* ---------- 404 ---------- */
.error-page {
  text-align: center;
  padding-block: var(--space-8);
}

.error-page__search {
  max-width: 480px;
  margin: var(--space-5) auto 0;
  text-align: left;
}

.error-page__search input[type="search"] {
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
}

.error-page__links { margin-top: var(--space-6); text-align: left; }

.error-page__code {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(3rem, 10vw, 6rem);
  color: var(--violet);
  margin: 0;
}

@media (max-width: 900px) {
  .card-grid--2, .card-grid--3, .card-grid--watch { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; gap: var(--space-4); }
  .card .timeline { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ball { width: 50px; height: 50px; font-size: 1.15rem; }
  .ball--star { width: 54px; height: 54px; }
  .result-panel__groups .result-balls { gap: 8px; }
  .timeline__step:not(:last-child)::after { top: 60px; left: 27px; right: auto; width: 2px; height: calc(100% - 40px + var(--space-4)); }
  .result-panel__groups { flex-direction: column; align-items: flex-start; gap: var(--space-4); }
  .result-panel__groups > div + div { border-left: 0; padding-left: 0; border-top: 1px solid rgba(255,255,255,0.15); padding-top: var(--space-4); width: 100%; }
  .result-panel { grid-template-columns: 1fr; }
  .filter-form { grid-template-columns: 1fr; }
  .step-list__item { grid-template-columns: auto 1fr; }
  .step-list__icon { grid-column: 2; }
}

.badge--verified {
  background: var(--mint-tint);
  color: #1c5c37;
  border: 1px solid #9fe0bb;
}
