/* AI-valmiustesti.
   Sama kortin kuvakieli kuin teknisessä pikatestissä, jotta työkalut
   näyttävät samalta perheeltä. */

#puro-ai-valmius { margin: 48px 0; }

.av-kortti {
  position: relative;
  padding: 38px 40px 34px;
  background: linear-gradient(150deg, var(--green, #003E33) 0%, var(--green-deep, #002A22) 100%);
  border-radius: var(--radius, 6px);
  color: var(--on-dark, #F1E9D6);
  overflow: hidden;
}
.av-kortti::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 100% at 100% 0%, rgba(184, 155, 110, .16) 0%, transparent 58%);
}
.av-kortti > * { position: relative; z-index: 1; }

.av-tag {
  display: inline-block;
  margin-bottom: 14px;
  padding: 5px 12px;
  border: 1px solid var(--border-dark-strong, rgba(255, 255, 255, .18));
  border-radius: 100px;
  color: var(--gold-soft, #D4BD93);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.av-title {
  margin: 0 0 10px;
  font-family: 'Fraunces', serif;
  font-size: clamp(1.5rem, 3.4vw, 2.05rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--cream, #F7F2E8);
  text-transform: none;
}
.av-title:focus { outline: none; }

.av-lead {
  margin: 0 0 26px;
  max-width: 62ch;
  color: rgba(247, 242, 232, .74);
  font-size: 1rem;
  line-height: 1.6;
}

/* ---- Kysymykset ---- */
.av-kys {
  margin: 0 0 22px;
  padding: 0 0 20px;
  border: 0;
  border-bottom: 1px solid rgba(247, 242, 232, .10);
}
.av-kys:last-of-type { border-bottom: 0; }

.av-legend {
  display: flex;
  align-items: baseline;
  gap: 11px;
  padding: 0;
  margin-bottom: 12px;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--cream, #F7F2E8);
}
.av-num {
  flex: none;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--gold, #B89B6E);
}
.av-apu {
  margin: -6px 0 12px 32px;
  font-size: .86rem;
  line-height: 1.5;
  color: rgba(247, 242, 232, .55);
}

.av-chips { display: flex; flex-wrap: wrap; gap: 9px; margin-left: 32px; }
.av-chip {
  padding: 10px 16px;
  border: 1px solid rgba(247, 242, 232, .18);
  border-radius: 100px;
  background: transparent;
  color: rgba(247, 242, 232, .82);
  font-family: inherit;
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .2s, background .2s, color .2s;
  -webkit-tap-highlight-color: transparent;
}
.av-chip:hover { border-color: rgba(184, 155, 110, .6); color: var(--cream, #F7F2E8); }
.av-chip.on {
  background: var(--gold, #B89B6E);
  border-color: var(--gold, #B89B6E);
  color: var(--green-deep, #002A22);
  font-weight: 600;
}
.av-chip:focus-visible { outline: 2px solid var(--gold-soft, #D4BD93); outline-offset: 2px; }

.av-error {
  margin: 0 0 14px;
  color: #F0B4A0;
  font-size: .9rem;
}

.av-toimet {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 26px;
}
.av-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border: 0;
  border-radius: var(--radius, 6px);
  font-family: inherit;
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.av-btn-ensi {
  background: var(--gold, #B89B6E);
  color: var(--green-deep, #002A22);
}
.av-btn-ensi:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0, 0, 0, .28); }
.av-btn:focus-visible { outline: 2px solid var(--gold-soft, #D4BD93); outline-offset: 3px; }

.av-edisty {
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .08em;
  color: rgba(247, 242, 232, .5);
}
.av-edisty.valmis { color: var(--gold-soft, #D4BD93); }

.av-uusiksi {
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(247, 242, 232, .6);
  font-family: inherit;
  font-size: .88rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.av-uusiksi:hover { color: var(--gold-soft, #D4BD93); }

/* ---- Tulos ---- */
.av-mittari { margin: 4px 0 22px; }
.av-luku {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-family: 'Fraunces', serif;
}
.av-luku strong { font-size: 3.1rem; font-weight: 400; line-height: 1; color: var(--cream, #F7F2E8); }
.av-luku span { font-size: 1rem; color: rgba(247, 242, 232, .5); }

.av-palkki {
  position: relative;
  height: 5px;
  margin: 12px 0 8px;
  border-radius: 100px;
  background: rgba(247, 242, 232, .12);
  overflow: hidden;
}
.av-palkki i {
  display: block;
  height: 100%;
  border-radius: 100px;
  background: var(--gold, #B89B6E);
  transition: width .8s cubic-bezier(.22, 1, .36, 1);
}
.av-alku .av-palkki i { background: #C98A6B; }
.av-kohtalainen .av-palkki i { background: var(--gold, #B89B6E); }
.av-hyva .av-palkki i { background: #8FB89A; }

.av-mittari-nimi {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(247, 242, 232, .5);
}

.av-suositus {
  margin: 22px 0;
  padding: 24px 26px;
  border: 1px solid rgba(184, 155, 110, .3);
  border-radius: var(--radius, 6px);
  background: rgba(184, 155, 110, .07);
}
.av-suositus-label {
  display: block;
  margin-bottom: 8px;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold, #B89B6E);
}
.av-suositus h4 {
  margin: 0 0 10px;
  font-family: 'Fraunces', serif;
  font-size: 1.32rem;
  font-weight: 400;
  color: var(--cream, #F7F2E8);
  text-transform: none;
  letter-spacing: -.01em;
}
.av-suositus p { margin: 0 0 14px; color: rgba(247, 242, 232, .78); line-height: 1.62; }

.av-askeleet {
  margin: 0 0 18px;
  padding-left: 20px;
  color: rgba(247, 242, 232, .74);
  font-size: .93rem;
  line-height: 1.6;
}
.av-askeleet li { margin-bottom: 6px; }
.av-askeleet li::marker { color: var(--gold, #B89B6E); font-weight: 700; }

.av-hinta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  padding-top: 16px;
  border-top: 1px solid rgba(247, 242, 232, .12);
}
.av-hinta div { display: flex; flex-direction: column; gap: 3px; }
.av-hinta span {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(247, 242, 232, .5);
}
.av-hinta strong {
  font-family: 'Fraunces', serif;
  font-size: 1.18rem;
  font-weight: 400;
  color: var(--gold-soft, #D4BD93);
}

.av-linkki { margin: 16px 0 0; font-size: .9rem; }
.av-linkki a { color: var(--gold-soft, #D4BD93); font-weight: 600; }

.av-saasto {
  margin: 22px 0;
  padding: 22px 24px;
  border-radius: var(--radius, 6px);
  background: rgba(0, 0, 0, .18);
}
.av-saasto-label {
  display: block;
  margin-bottom: 8px;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold, #B89B6E);
}
.av-saasto p { margin: 0 0 10px; color: rgba(247, 242, 232, .82); line-height: 1.62; }
.av-saasto strong { color: var(--cream, #F7F2E8); }
.av-oletus { font-size: .84rem; color: rgba(247, 242, 232, .52) !important; }

.av-toinen {
  margin: 18px 0 0;
  color: rgba(247, 242, 232, .7);
  font-size: .95rem;
  line-height: 1.6;
}
.av-toinen strong { color: var(--gold-soft, #D4BD93); font-weight: 600; }

.av-toimet-tulos { margin-top: 24px; }

.av-huom {
  margin: 18px 0 0;
  font-size: .84rem;
  line-height: 1.55;
  color: rgba(247, 242, 232, .5);
}

@media (max-width: 640px) {
  .av-kortti { padding: 30px 22px 28px; }
  .av-chips { margin-left: 0; }
  .av-apu { margin-left: 0; }
  .av-legend { gap: 8px; }
  .av-btn { width: 100%; }
  .av-toimet { gap: 12px; }
  .av-luku strong { font-size: 2.6rem; }
  .av-suositus, .av-saasto { padding: 20px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .av-palkki i { transition: none; }
  .av-btn-ensi:hover { transform: none; }
}
