/* Hedonic treadmill lesson. Everything scoped under .ht-*. */
.ht-sc { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ht-hero img { display: block; width: 240px; max-width: 100%; max-height: 26vh; object-fit: contain; margin: 0 auto; filter: drop-shadow(0 18px 30px rgba(123,92,253,.3)); }
.ht-hero.small img { width: 170px; max-height: 18vh; }
.ht-note { text-align: center; font-size: 12px; color: var(--faint); }

/* the stare: a teal circle on gray, a black dot to hold the eyes still */
.ht-eye { position: relative; width: min(250px, 34vh); aspect-ratio: 1; border-radius: 18px; background: #bcbcbc; }
.ht-disc { position: absolute; inset: 17%; border-radius: 50%; background: #00c4c4; }
.ht-disc.gone { display: none; }
.ht-dot { position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #000; }
.ht-count { min-height: 26px; font: 700 20px var(--mono); color: var(--text); text-align: center; }
.ht-count:not(:empty) { font-size: 14px; }

/* the gap chart */
.ht-panel { width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: 6px; }
.ht-read { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 12px; border-radius: 12px; background: var(--raised); border: 1.5px solid var(--line); }
.ht-read span { font-size: 13px; font-weight: 700; color: var(--dim); }
.ht-read b { font: 700 17px var(--sans); color: var(--text); transition: color .3s; }
.ht-read.up b { color: var(--mint); }
.ht-read.dn b { color: var(--red); }
.ht-chw { width: 100%; }
.ht-ch { display: block; width: 100%; height: auto; overflow: visible; }
.ht-ax { stroke: var(--line-strong); stroke-width: 1.5; }
.ht-have { fill: none; stroke: var(--gold); stroke-width: 3.5; stroke-linejoin: round; }
.ht-ghost { fill: none; stroke: var(--gold); stroke-width: 3.5; stroke-linejoin: round; opacity: .35; }
.ht-used { fill: none; stroke: var(--text); stroke-width: 2; stroke-dasharray: 5 4; opacity: .85; }
.ht-pos { fill: var(--mint); opacity: .38; stroke: none; }
.ht-neg { fill: var(--red); opacity: .42; stroke: none; }
.ht-tl, .ht-tt { font: 700 12px var(--sans); fill: var(--faint); }
.ht-tt { fill: var(--text); }
.ht-key { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; font-size: 12px; font-weight: 700; color: var(--dim); }
.ht-key .k::before { content: ''; display: inline-block; width: 18px; height: 0; margin-right: 6px; vertical-align: middle; }
.ht-key .have::before { border-top: 3.5px solid var(--gold); }
.ht-key .used::before { border-top: 2px dashed var(--text); }

/* 1978: two bars */
.ht-bars { width: 100%; max-width: 320px; display: flex; flex-direction: column; gap: 8px; }
.ht-bar { display: grid; grid-template-columns: 70px 1fr 34px; align-items: center; gap: 8px; }
.ht-bar span { font-size: 14px; font-weight: 700; color: var(--text); }
.ht-bar i { height: 14px; border-radius: 7px; background: var(--raised); border: 1px solid var(--line); overflow: hidden; }
.ht-bar u { display: block; height: 100%; width: 0; border-radius: 7px; transition: width .7s cubic-bezier(.2,.8,.2,1); }
.ht-bar.win u { background: var(--gold); }
.ht-bar.oth u { background: var(--violet); }
.ht-bar b { font: 700 15px var(--mono); color: var(--text); }
.ht-bars small { text-align: center; font-size: 12px; color: var(--faint); }

/* 2020: the Swedish survey */
.ht-sw { width: 100%; max-width: 320px; }
.ht-swc { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 14px; border-radius: 14px; background: var(--raised); border: 1.5px solid var(--line); text-align: center; transition: border-color .3s; }
.ht-swc small { font: 700 12px var(--sans); color: var(--dim); letter-spacing: .06em; text-transform: uppercase; }
.ht-swc b { font-size: 16px; color: var(--text); }
.ht-swc em { font-style: normal; font-size: 15px; font-weight: 700; color: var(--mint); }
.ht-swc em:empty { display: none; }
.ht-sw.on .ht-swc { border-color: var(--mint); }

/* Germany: two sketches */
.ht-minis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; max-width: 340px; }
.ht-mini { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; border-radius: 14px; background: var(--raised); border: 1.5px solid var(--line); }
.ht-mini svg { width: 100%; height: auto; }
.ht-mini path { fill: none; stroke-width: 3.5; stroke-linecap: round; }
.ht-mini.up path { stroke: var(--mint); }
.ht-mini.dn path { stroke: var(--red); }
.ht-base { stroke: var(--text); stroke-width: 1.5; stroke-dasharray: 4 4; opacity: .7; }
.ht-mini span { font-size: 15px; font-weight: 700; color: var(--text); }

/* breaks: two small charts */
.ht-pw { width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: 8px; }
.ht-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ht-pair text { font-size: 13px; }
.ht-pair .ht-chw { padding: 6px; border-radius: 12px; background: var(--raised); border: 1.5px solid var(--line); }
