/* Demopyyntö (/demo/) — uses site.css tokens */
.demo-page { --demo-radius: 18px; }
.demo-hero-section { padding-bottom: clamp(1.5rem, 4vw, 3rem); }
.demo-hero-section h1 { max-width: 18ch; }
.demo-hero-section .lede { max-width: 60ch; }
.demo-section { padding-top: 0; }

.demo-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem); gap: 1.25rem; align-items: start; }

.demo-card { padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); color: var(--ink); }
.demo-card h2 { margin: 0 0 0.75rem; font-size: 1.15rem; }

.demo-progress { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.demo-progress li { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.8rem 0.35rem 0.4rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 0.82rem; font-weight: 700; }
.demo-progress li span { display: grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-size: 0.72rem; font-weight: 800; }
.demo-progress li.is-current { color: var(--ink); border-color: var(--blue); }
.demo-progress li.is-current span, .demo-progress li.is-done span { color: #fff; background: var(--blue); }

.demo-why { margin: 0 0 1.25rem; color: var(--muted); line-height: 1.6; max-width: 62ch; }
.demo-step-title { margin: 0 0 0.4rem; font-size: 1.3rem; }

.demo-question { margin: 0 0 1.25rem; padding: 0; border: 0; min-width: 0; }
.demo-question legend { margin-bottom: 0.6rem; padding: 0; font-weight: 800; }
.demo-options { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.demo-option { position: relative; cursor: pointer; }
.demo-option input { position: absolute; opacity: 0; pointer-events: none; }
.demo-option span { display: inline-block; padding: 0.55rem 0.9rem; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface-strong); font-size: 0.88rem; font-weight: 700; transition: border-color .15s, background .15s; }
.demo-option:hover span { border-color: var(--blue); }
.demo-option input:checked + span { color: #fff; background: var(--blue); border-color: var(--blue); }
.demo-option input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }

.demo-field { display: grid; gap: 0.35rem; margin-bottom: 1rem; }
.demo-field label { font-size: 0.88rem; font-weight: 800; }
.demo-optional { color: var(--muted); font-weight: 400; }
.demo-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.demo-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.demo-consent { display: flex; gap: 0.6rem; align-items: flex-start; margin-top: 0.5rem; font-size: 0.86rem; line-height: 1.5; color: var(--muted); cursor: pointer; }
.demo-consent input { margin-top: 0.2rem; width: 1.05rem; height: 1.05rem; accent-color: var(--blue); flex: none; }
.demo-consent a { color: var(--blue); }
.demo-calc-note { margin: 1rem 0 0; padding: 0.7rem 0.9rem; border-radius: 12px; background: var(--blue-soft); font-size: 0.84rem; }

.demo-error { margin: 1rem 0 0; padding: 0.7rem 0.9rem; border-radius: 12px; color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); font-size: 0.88rem; font-weight: 700; }
.demo-error:focus { outline: none; }
.demo-actions { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.demo-actions .btn[disabled] { opacity: 0.6; cursor: progress; }

.demo-aside { display: grid; gap: 1rem; position: sticky; top: 7rem; }
.demo-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.55rem; }
.demo-list li { position: relative; padding-left: 1.5rem; color: var(--muted); line-height: 1.5; font-size: 0.92rem; }
.demo-list li::before { content: "✓"; position: absolute; left: 0; color: var(--blue); font-weight: 900; }
.demo-calc-card { display: block; color: #f7f5ef; background: linear-gradient(135deg, #111722, #25205b); border-color: transparent; text-decoration: none; }
.demo-calc-card strong { display: block; font-size: 1.05rem; }
.demo-calc-card p { margin: 0.4rem 0 0.9rem; color: rgba(247, 245, 239, 0.72); line-height: 1.5; font-size: 0.9rem; }
.demo-calc-card span { color: #b9b0ff; font-weight: 800; }

.demo-success { text-align: left; }
.demo-success:focus { outline: none; }
.demo-check { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; margin-bottom: 1rem; border-radius: 50%; color: #fff; background: var(--blue); font-size: 1.3rem; font-weight: 900; }
.demo-success h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.demo-success p { color: var(--muted); line-height: 1.6; max-width: 56ch; }

html[data-theme="dark"] :is(.demo-card:not(.demo-calc-card), .demo-option span) { background: rgba(18, 24, 34, 0.9); }
html[data-theme="dark"] .demo-option input:checked + span { background: var(--blue); }

@media (max-width: 900px) {
  .demo-grid { grid-template-columns: 1fr; }
  .demo-aside { position: static; }
}
@media (max-width: 560px) {
  .demo-two { grid-template-columns: 1fr; }
  .demo-progress li { font-size: 0.76rem; }
}
.demo-mailto { margin-top: 0.75rem; }
