/* Palette from the "Dr. Silvia Buet" header.
   --stone = the header's last (bottom) color, so the page continues it with no seam.
   --gold  = the color of the book logo, used for every button. */
:root{
  --stone:#b2adab; --stone-deep:#7d7778;
  --beige:#e4e1d5; --cream:#f4f2ec; --gold:#827150; --gold-dark:#6b5d42; --gold-light:#a8926a;
  --ink:#1c1a1a; --muted:#57514f; --line:#e2ddd4; --card:#ffffff;
  --sans:"Mulish","Helvetica Neue",Arial,sans-serif;
  --display:"Playfair Display",Georgia,"Times New Roman",serif;
  /* Body text: 18px desktop, 17px tablet, 16px mobile. Legal text under the form is smaller on purpose. */
  --fs:18px; --h1:40px; --h2:20px;
}
@media (max-width:1024px){:root{--fs:17px;--h1:35px;--h2:19px}}
@media (max-width:600px){:root{--fs:16px;--h1:27px;--h2:17px}}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;background:var(--stone-deep)}
body{margin:0;min-height:100vh;color:var(--ink);font:400 var(--fs)/1.65 var(--sans);
  background:linear-gradient(180deg,var(--stone) 0,var(--stone) 22%,#a6a09f 45%,#8e8889 72%,var(--stone-deep) 100%) no-repeat;
  background-color:var(--stone-deep)}
.site-header,.site-header img{display:block;width:100%;height:auto}
.site-header{background:var(--stone)}
.shell{max-width:740px;margin:6px auto 0;padding:0 16px 40px;position:relative}
.card{background:var(--card);border-radius:16px;box-shadow:0 18px 50px rgba(40,34,34,.22),0 2px 6px rgba(40,34,34,.08);padding:44px 48px;position:relative;overflow:hidden}
.card::before{content:"";position:absolute;left:0;right:0;top:0;height:4px;background:linear-gradient(90deg,var(--gold-light),var(--gold),var(--gold-light))}
[hidden]{display:none !important}

.eyebrow{font:800 calc(var(--fs) - 2px)/1.2 var(--sans);letter-spacing:.16em;text-transform:uppercase;color:var(--gold);margin:0 0 10px}
h1{font:700 var(--h1)/1.15 var(--display);color:var(--ink);margin:0 0 14px;text-wrap:balance}
/* Questions in Mulish (the sans-serif): easier to read than Playfair at this size */
h2{font:700 var(--h2)/1.45 var(--sans);color:var(--ink);margin:16px 0 16px;outline:none}
p{margin:0 0 16px}
.muted{color:var(--muted)}

/* Start screen: title, one line, Start button. Everything else sits below the button. */
.intro .eyebrow,.intro h1,.intro .sub{text-align:center}
.intro .sub{font-size:calc(var(--fs) + 1px);line-height:1.5;max-width:520px;margin:0 auto 22px}
.howto{font-size:calc(var(--fs) - 2px);line-height:1.5;color:var(--muted);text-align:center;max-width:460px;margin:14px auto 0}
.center{text-align:center}
.by{font-size:calc(var(--fs) - 3px);color:var(--muted);margin:18px 0 0;text-align:center}

/* Buttons: all in the logo color */
.btn{font:800 var(--fs)/1 var(--sans);letter-spacing:.02em;border-radius:12px;border:0;padding:17px 32px;cursor:pointer;transition:transform .08s,background .15s,box-shadow .15s,opacity .15s}
.btn:active{transform:translateY(1px)}
.btn-primary{background:var(--gold);color:#fff;box-shadow:0 8px 20px rgba(130,113,80,.35)}
.btn-primary:hover{background:var(--gold-dark)}
.btn-primary:disabled{opacity:.7;cursor:wait}
.btn-block{width:100%;margin-top:6px}
#start{min-width:240px}
.btn:focus-visible,.opt:focus-visible,.back:focus-visible,input:focus-visible{outline:3px solid var(--gold-light);outline-offset:2px}

/* Top of each question: small Back link + progress bar on one line */
.qtop{display:flex;align-items:center;gap:14px}
.back{flex:0 0 auto;background:none;border:0;padding:6px 2px;font:700 calc(var(--fs) - 2px)/1 var(--sans);color:var(--muted);cursor:pointer}
.back:hover{color:var(--ink)}
.qtop .progress-track{flex:1 1 auto}
.progress-track{height:6px;background:#ece8e1;border-radius:99px;overflow:hidden}
.progress-fill{height:100%;background:linear-gradient(90deg,var(--gold-light),var(--gold));border-radius:99px;transition:width .35s ease}

/* Answer options */
.choices{display:grid;gap:8px}
.opt{font:600 var(--fs)/1.3 var(--sans);color:var(--ink);background:#fff;border:1.5px solid var(--line);border-radius:12px;cursor:pointer;transition:border-color .12s,background .12s,color .12s}
.opt.choice{text-align:left;padding:13px 18px;min-height:48px}
.opt:hover{border-color:var(--gold-light);background:var(--cream)}
.opt.selected{border-color:var(--gold);background:var(--gold);color:#fff}
.scale-row{display:grid;grid-template-columns:repeat(11,1fr);gap:6px}
.opt.num{padding:14px 0;font-weight:800;text-align:center}
.scale-labels{display:flex;justify-content:space-between;gap:12px;font-size:calc(var(--fs) - 1px);color:var(--muted);margin-top:10px}
.scale-labels span:last-child{text-align:right}

/* Phones + tablets 0-10: one drop-down menu, centered and symmetrical.
   Tapping it opens the phone's own picker (one answer at a time). */
.dd{display:none;position:relative}
.dd::after{content:"";position:absolute;right:20px;top:50%;width:9px;height:9px;border-right:2.5px solid var(--gold);border-bottom:2.5px solid var(--gold);transform:translateY(-70%) rotate(45deg);pointer-events:none}
.dd-select{width:100%;height:56px;padding:0 44px;font:700 17px/1.2 var(--sans);color:var(--muted);
  text-align:center;background:var(--cream);border:1.5px solid var(--gold-light);border-radius:12px;cursor:pointer}
.dd.chosen .dd-select{color:var(--ink);border:2px solid var(--gold);background:#fff}
.dd-select:focus-visible{outline:3px solid var(--gold-light);outline-offset:2px}
/* The open list: over the page, every row visible, number 10 included */
.sheet-back{position:fixed;inset:0;z-index:50;background:rgba(28,26,26,.45);display:flex;align-items:center;justify-content:center;padding:12px}
.sheet-list{width:100%;max-width:420px;background:#fff;border-radius:16px;overflow:hidden;box-shadow:0 20px 50px rgba(0,0,0,.3)}
.sheet-head{display:flex;align-items:center;justify-content:space-between;height:var(--rowh,46px);padding:0 8px 0 18px;background:var(--cream);font:800 14px/1 var(--sans);letter-spacing:.06em;text-transform:uppercase;color:var(--gold-dark)}
.sheet-head button{width:40px;height:40px;border:0;background:none;font-size:18px;color:var(--muted);cursor:pointer}
.sheet-opt{display:block;width:100%;height:var(--rowh,46px);border:0;border-top:1px solid var(--line);background:#fff;font:700 17px/1 var(--sans);color:var(--ink);text-align:center;cursor:pointer}
.sheet-opt:active,.sheet-opt.selected{background:var(--gold);color:#fff}
.dd-ends{display:none;text-align:center;font-size:14px;color:var(--muted);margin:10px 0 0}

/* Last screen: compact form, the button stays on the same screen */
.final h2{margin-bottom:6px}
label{display:block;font-weight:700;font-size:calc(var(--fs) - 2px);margin:14px 0 6px}
.optional{font-weight:400;color:var(--muted)}
input[type=text],input[type=email],input[type=password]{width:100%;height:48px;font:16px/1.3 var(--sans);padding:0 14px;border:1.5px solid var(--line);border-radius:10px;background:#fff;color:var(--ink)}
input[type=text]:focus,input[type=email]:focus,input[type=password]:focus{border-color:var(--gold);outline:none}
.check{display:flex;gap:10px;align-items:flex-start;font-weight:400;font-size:13px;line-height:1.45;color:var(--muted);margin:14px 0 0;cursor:pointer}
.check + .check{margin-top:10px}
.check input{width:20px;height:20px;flex:0 0 20px;margin:0;accent-color:var(--gold)}
.check a{color:var(--ink)}
.final .btn-block{margin-top:16px}
.dp{font-size:12px;line-height:1.45;color:var(--muted);margin:14px 0 0}
.dp strong{color:var(--ink)}
.dp a{color:var(--muted)}
.hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.error{background:var(--cream);color:var(--ink);border-left:3px solid var(--gold);border-radius:8px;padding:10px 14px;font-size:14px;margin:12px 0 0}
.foot{text-align:center;color:#fff;font-size:calc(var(--fs) - 2px);margin-top:26px;opacity:.92}
.noscript{text-align:center;padding:20px;color:#fff}

@media (max-width:1024px){
  .card{padding:36px 40px}
}
@media (max-width:600px){
  .shell{margin-top:2px;padding:0 10px 24px}
  /* Room to scroll each question card to the top of the screen */
  .shell{min-height:100vh;min-height:100svh}
  .card{padding:20px 18px 18px;border-radius:14px}
  .intro{padding:24px 20px 22px}
  .intro .eyebrow{margin-bottom:12px}
  .intro h1{font-size:26px;margin-bottom:14px}
  .intro .sub{font-size:15.5px;line-height:1.62;margin-bottom:22px}
  .intro .howto{font-size:14px;margin-top:16px}
  .intro .by{font-size:13px;margin-top:10px;line-height:1.45}
  h1{margin-bottom:10px}
  h2{margin:14px 0 14px;line-height:1.35}
  #start{width:100%}
  .scale-row,.scale-labels{display:none}
  .dd,.dd-ends{display:block}
  .opt.choice{padding:11px 16px}
}
/* Phones AND tablets (any touch screen): the 0-10 answers are the full-width drop-down list,
   never the row of small number buttons. */
@media (max-width:1024px),(pointer:coarse){
  .scale-row,.scale-labels{display:none}
  .dd,.dd-ends{display:block}
}
@media (prefers-reduced-motion:reduce){*{transition:none !important}}

/* Playfair shows 0 like an 'o' by default: use modern (lining) numbers everywhere.
   (Kept at the end: the 'font:' shorthand above would otherwise reset it.) */
body, body :not(#lnum){font-variant-numeric:lining-nums;font-feature-settings:"lnum" 1}
