/* Your Frame quiz (/tests/your-frame). Builds on .mini, .mt-card, .rule, .seal and .chips from site.css.
   Drawings are made with code and use flat color. The hatch marks the 0.3 band around a cut, as in the manual. */

.yf { max-width: 640px; }

/* ---------- progress ---------- */
.yf-pips { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.yf-pips > div { display: flex; align-items: center; gap: 8px; }
.yf-pip-label { font: 700 13px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); }
.yf-pip-set { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.yf-pip-set li { width: 14px; height: 14px; border-radius: 50% 45% 55% 50%; background: rgba(43, 34, 48, .12); }
.yf-pip-set li.done { background: var(--berry); }
.yf-pip-set li.skip { background: transparent; box-shadow: inset 0 0 0 2px rgba(43, 34, 48, .4); }
.yf-pip-set li.now { background: var(--blush); box-shadow: 0 0 0 2px var(--berry); }

/* ---------- question ---------- */
.yf-how { color: var(--ink); font-size: 17px; margin-top: -4px; }
.yf-stage { width: 100%; max-width: 470px; margin: 0 auto; padding: 8px; background: #fff; box-shadow: 0 0 0 1px #E5DDD0, 0 10px 22px -14px rgba(43, 34, 48, .55); }
.yf-stage svg { display: block; width: 100%; height: auto; }
.yf-stage--small { padding: 4px; box-shadow: 0 0 0 1px #E5DDD0; }
.yf-pick { min-height: 1.4em; margin-top: -6px; text-align: center; font: italic 500 17px/1.3 var(--sans); color: var(--ink); }

.yf-field { border: 0; margin: 0; padding: 0; min-inline-size: 0; }
.yf-track { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); touch-action: none; cursor: pointer; user-select: none; -webkit-user-select: none; }
.yf-rail { position: absolute; left: 10%; right: 10%; top: 50%; height: 6px; margin-top: -3px; border-radius: 3px; background: rgba(43, 34, 48, .2); }
.yf-opt { position: relative; display: grid; place-items: center; min-height: 54px; cursor: pointer; }
.yf-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.yf-num { position: relative; z-index: 1; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 2px solid rgba(43, 34, 48, .55); font: 700 16px/1 var(--sans); color: var(--ink); transition: color .2s, background-color .2s, border-color .2s; }
.yf-opt input:checked ~ .yf-num { color: #fff; background: transparent; border-color: transparent; }
.yf-opt:focus-within .yf-num { outline: 3px solid var(--berry); outline-offset: 3px; }
.yf-handle { position: absolute; z-index: 0; top: 50%; left: 10%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: var(--berry); box-shadow: 0 0 0 4px #FFFDF8, 0 6px 12px -4px rgba(43, 34, 48, .5); opacity: 0; pointer-events: none; transition: left .3s var(--ease), opacity .2s; }
.yf-handle.on { opacity: 1; }
.yf-ends { display: flex; justify-content: space-between; gap: 14px; margin-top: 4px; font: 600 14px/1.3 var(--sans); color: var(--ink-soft); }
.yf-ends span { max-width: 48%; }
.yf-ends span:last-child { text-align: right; }

/* ---------- intro ---------- */
.yf-intro-figs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.yf-fig { margin: 0; }
.yf-fig figcaption { margin-top: 6px; font-size: 14.5px; line-height: 1.3; color: var(--ink-soft); }

/* ---------- result ---------- */
.yf-out { display: grid; gap: 28px; }
.yf-result { gap: 16px; }
.yf-sub { font: 600 19px/1.3 var(--sans); }
.yf-one { color: var(--ink); margin-top: -6px; }

/* her shape as a painting, with the line and the scale she placed as a small pair (site/data/art.json, site/js/art.js) */
.yf-art { display: grid; grid-template-columns: minmax(0, 1fr) 104px; gap: 18px; align-items: center; margin: 8px 0 4px; }
.yf-art-main { display: flex; gap: 14px; justify-content: center; }
.yf-art-main .art-slot { flex: 1 1 0; width: 100%; max-width: 190px; margin: 0; }
.yf-art--two .yf-art-main .art-slot { max-width: 150px; }
.yf-art-pair { display: grid; gap: 22px; }
.yf-art-pair .art-slot { width: 100%; max-width: 104px; margin: 0; }
.yf-art-pair figcaption { margin-top: 8px; font: 600 14px/1.2 var(--sans); font-style: normal; color: var(--ink); text-align: center; }
.yf-art--pair-only { grid-template-columns: 1fr; }
.yf-art--pair-only .yf-art-pair { grid-template-columns: repeat(2, 104px); justify-content: start; gap: 22px; }
@media (min-width: 640px) {
  .yf-art { grid-template-columns: minmax(0, 260px) 124px; gap: 34px; justify-content: start; margin: 12px 0 6px; }
  .yf-art-main .art-slot { max-width: 260px; }
  .yf-art--two { grid-template-columns: minmax(0, 360px) 124px; }
  .yf-art--two .yf-art-main .art-slot { max-width: 170px; }
  .yf-art-pair .art-slot { max-width: 124px; }
  .yf-art--pair-only .yf-art-pair { grid-template-columns: repeat(2, 124px); }
}
.yf-bars { display: grid; gap: 24px; margin-top: 4px; }
.yf-bar--line { --z1: #F3EEF8; --z2: #DCCFE9; --z3: #B9A3D0; }
.yf-bar--scale { --z1: #F6EBCB; --z2: #EBD79C; --z3: #D8B866; }
.yf-bar-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.yf-bar-head h3 { font: 600 24px/1 var(--serif); }
.yf-bar-zone { font: 700 16px/1.2 var(--sans); color: var(--berry-dark); text-align: right; }
.yf-bar-track { position: relative; height: 34px; margin-top: 20px; }
.yf-zones { display: grid; grid-template-columns: 36.25% 27.5% 36.25%; height: 100%; }
.yf-zones i { box-shadow: inset 0 0 0 1.5px var(--ink); }
.yf-zones i + i { margin-left: -1.5px; }
.yf-zones i:nth-child(1) { background: var(--z1); }
.yf-zones i:nth-child(2) { background: var(--z2); }
.yf-zones i:nth-child(3) { background: var(--z3); }
.yf-zones i.on { box-shadow: inset 0 0 0 3.5px var(--ink); position: relative; z-index: 1; }
.yf-near { position: absolute; top: 0; width: 15%; height: 100%; left: calc(var(--p) * 1% - 7.5%); pointer-events: none; z-index: 2;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='7'%3E%3Cpath d='M-1 1 L1 -1 M0 7 L7 0 M6 8 L8 6' stroke='%232B2230' stroke-opacity='.5' stroke-width='1.3'/%3E%3C/svg%3E"); }
.yf-dot { position: absolute; z-index: 3; top: 50%; left: 0; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; background: var(--berry); box-shadow: 0 0 0 4px #FFFDF8, 0 4px 10px -2px rgba(43, 34, 48, .55); transition: left 1.1s var(--ease); }
.yf-pull { position: absolute; z-index: 3; bottom: 100%; margin: 0 0 4px -10px; width: 0; height: 0; border-style: solid; border-width: 12px 10px 0; border-color: var(--ink) transparent transparent; }
.yf-zonelabels { display: grid; grid-template-columns: 36.25% 27.5% 36.25%; margin-top: 8px; text-align: center; font: 600 14px/1.2 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
.yf-zonelabels .on { color: var(--ink); font-weight: 800; }
.yf-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; font-size: 14.5px; color: var(--ink-soft); }
.yf-legend span { display: inline-flex; align-items: center; gap: 8px; }
.yf-key { display: inline-block; flex: none; }
.yf-key--dot { width: 14px; height: 14px; border-radius: 50%; background: var(--berry); }
.yf-key--pull { width: 0; height: 0; border-style: solid; border-width: 10px 8px 0; border-color: var(--ink) transparent transparent; }
.yf-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 16.5px; color: var(--ink); }
.yf-notes li { padding-left: 12px; border-left: 3px solid var(--blush); }
.yf-notes--pull li { border-left-color: var(--lilac); }
.yf-season { display: grid; gap: 8px; padding-top: 2px; }
.yf-season p { font-weight: 600; }
.yf-sw { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.yf-sw li { display: flex; align-items: center; gap: 10px; font-size: 16px; color: var(--ink); }
.yf-sw i { width: 40px; height: 40px; background: var(--c); box-shadow: 0 0 0 1px rgba(43, 34, 48, .18); }
.yf-share { margin-top: 2px; }
.yf-status { font: 700 16px/1.3 var(--sans); color: var(--strong); }

.yf-map { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 4px; margin: 0 -4px; }
.yf-map caption { caption-side: top; padding: 0 0 2px 4px; text-align: left; font-size: 14.5px; color: var(--ink-muted); }
.yf-map thead td { width: 21%; background: none; }
.yf-map th { font: 700 13px/1.2 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); text-align: center; }
.yf-map tbody th { text-align: left; }
.yf-map td { padding: 6px 2px 6px; text-align: center; vertical-align: top; background: #F6EFE2; color: var(--ink); }
.yf-glyph { display: block; width: 60px; margin: 0 auto 2px; }
.yf-glyph svg { display: block; width: 100%; height: auto; }
.yf-cellname { display: block; font: 600 14px/1.15 var(--sans); }
.yf-map td.me { background: #fff; outline: 3px solid var(--berry); outline-offset: -3px; }
.yf-map td.me .yf-cellname { font-weight: 800; color: var(--berry-dark); }
.yf-map td.near { outline: 2px dashed var(--berry); outline-offset: -4px; }

.yf-tries h3, .yf-gap h3 { font: 600 clamp(26px, 6.4vw, 34px)/1.05 var(--serif); }
.yf-tries-lead { margin-top: 8px; color: var(--ink); }
.yf-tag { margin-bottom: 6px; font: 700 13.5px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--berry); }
.yf-gap { display: grid; gap: 10px; padding: 18px 18px 20px; background: #FFFDF8; box-shadow: var(--shadow-paper); border-left: 5px solid var(--berry); }
.yf-q .mini-help summary { padding: 9px 0; }
.yf-warn { padding-left: 12px; border-left: 3px solid var(--gold); font-size: 16px; color: var(--ink); }
.yf-again { justify-content: space-between; }
.yf-q .mini-nav .mini-skip { flex: 1 0 100%; text-align: center; padding: 6px 4px; }

@media (min-width: 640px) {
  .yf-intro-figs { gap: 18px; }
  .yf-glyph { width: 72px; }
  .yf-cellname { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .yf-handle, .yf-dot { transition: none; }
}

/* ---------- in the lab (site/css/lab.css): a slide with the drawing, and a rail that fills up to the number she picks ---------- */
.lab .yf { max-width: none; }
.lab .yf-pips { gap: 4px 18px; }
.lab .yf-pip-label { font-size: 12.5px; letter-spacing: .16em; color: var(--lab-sub); }
.lab .yf-pip-set { gap: 3px; }
.lab .yf-pip-set li { width: 14px; height: 6px; border-radius: 0; background: rgba(36, 48, 72, .14); }
.lab .yf-pip-set li.done { background: var(--lab-ink); }
.lab .yf-pip-set li.skip { background: transparent; box-shadow: inset 0 0 0 1px var(--lab-tick); }
.lab .yf-pip-set li.now { background: var(--berry); box-shadow: none; }
.lab .yf-how { margin-top: 0; font-size: 16.5px; }
.lab .yf-stage { padding: 6px; box-shadow: none; border: 1px solid var(--lab-edge); border-radius: 0; }
.lab .yf-stage--small { padding: 3px; }
.lab .yf-fig figcaption { font-size: 13.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--lab-sub); font-weight: 700; }
.lab .yf-pick { font: 600 16.5px/1.3 var(--sans); font-style: normal; margin-top: 0; }
.lab .yf-track { --f: 0; }
.lab .yf-rail { height: 4px; margin-top: -2px; border-radius: 0; background: rgba(36, 48, 72, .16); }
.lab .yf-rail::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--f) * 100%); background: var(--lab-ink); transition: width .28s var(--ease); }
.lab .yf-num { border-radius: 0; width: 36px; height: 36px; border: 1px solid var(--lab-tick); }
.lab .yf-handle { border-radius: 0; background: var(--lab-ink); box-shadow: none; width: 40px; height: 40px; margin: -20px 0 0 -20px; }
.lab .yf-opt input:checked ~ .yf-num { color: #fff; }
.lab .yf-ends { font-size: 13.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; color: var(--lab-sub); }
.lab .yf-gap { border-left: 0; border: 1px solid var(--lab-edge); box-shadow: none; border-radius: 2px; background: #fff; }
.lab .yf-map td { background: var(--lab-box); }
.lab .yf-zones i { box-shadow: inset 0 0 0 1px var(--lab-ink); }
.lab .yf-zones i.on { box-shadow: inset 0 0 0 3px var(--lab-ink); }
.lab .yf-dot { box-shadow: 0 0 0 4px #fff; }
@media (prefers-reduced-motion: reduce) { .lab .yf-rail::after { transition: none; } }
.lab .yf-pip-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
