@font-face{font-family:"Fraunces";src:url(fonts/fraunces-roman.woff2) format("woff2");font-weight:100 900;font-display:swap}
:root{
  /* ===== DESIGN TOKENS (see DESIGN_SYSTEM.md) ===== */
  /* surfaces */
  --page:#FBF5EA; --card:#FFFDF9; --surface:#FFFFFF; --surface2:#F6EFE0; --line:#E3D9C6; --field:#8A8F98;
  /* text */
  --ink:#1D2433; --muted:#5D6472;
  /* colour ROLES: one colour = one job */
  --action:#C62B1F; --action-d:#A82016;          /* RED = buy. Nothing else is red. */
  --info:#1F5F99;   --info-bg:#EAF2FA;           /* BLUE = information, links, secondary buttons */
  --ok:#1F7A52;     --ok-bg:#EAF6EF;             /* GREEN = savings and confirmation only */
  --warn-bg:#FFF3D6; --warn-line:#EFCE86;        /* notices */
  /* product colour CODING: Son = blue, Daughter = orange, Both = gold */
  --p-son:#2F7FC1; --p-daughter:#D9692A; --p-both:#A67C00; --accent:#D9692A;
  /* type */
  --display:"Fraunces",Georgia,"Times New Roman",serif;
  --text:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --fs-xs:13px; --fs-sm:15px; --fs-md:17px; --fs-lg:19px;
  --fs-h3:clamp(22px,5.8vw,26px); --fs-h2:clamp(28px,7.4vw,36px); --fs-h1:clamp(36px,10vw,56px);
  /* space */
  --s1:4px; --s2:8px; --s3:12px; --s4:16px; --s5:24px; --s6:32px; --s7:48px; --s8:64px;
  /* shape + depth */
  --r-sm:10px; --r-md:16px; --r-pill:999px;
  --shadow-1:0 1px 2px rgba(29,36,51,.08); --shadow-2:0 8px 24px rgba(29,36,51,.12);
  /* aliases so the checkout page keeps working */
  --bg:var(--page); --link:var(--info); --green:var(--ok); --red:var(--action); --btn:var(--action); --btn-d:var(--action-d);
  --head:#17304F; --earth:var(--accent); --sky-d:var(--info);
  --selbg:color-mix(in srgb,var(--accent) 10%,var(--surface)); --hover:var(--info-bg);
  --notice:var(--warn-bg); --notice-b:var(--warn-line); --okbg:var(--ok-bg); --okb:#B9DFD3; --okc:#0B5D49;
  color-scheme:light;
}
@media (prefers-color-scheme:dark){:root{
  --page:#000; --card:#121212; --surface:#161616; --surface2:#1C1C1C; --line:#2B2B2B; --field:#5A5A5A;
  --ink:#F1ECE2; --muted:#A9A59C;
  --info:#7FB8EE; --info-bg:#12202E; --ok:#4FC98F; --ok-bg:#0D211A; --warn-bg:#2A2210; --warn-line:#5A4818;
  --p-son:#5AA6E8; --p-daughter:#F08A4B; --p-both:#E3B341; --accent:#F08A4B;
  --head:#0B1A2E; --okb:#1D5A45; --okc:#7FE0B8;
  --shadow-1:0 1px 2px rgba(0,0,0,.5); --shadow-2:0 8px 24px rgba(0,0,0,.6);
  color-scheme:dark;
}}
/* colour coding follows the chosen book */
body[data-p="son"]{--accent:var(--p-son)}
body[data-p="daughter"]{--accent:var(--p-daughter)}
body[data-p="both"]{--accent:var(--p-both)}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--page);color:var(--ink);font:var(--fs-md)/1.5 var(--text);padding-bottom:calc(86px + env(safe-area-inset-bottom))}
a{color:var(--link);text-decoration:none}
a:hover{text-decoration:underline;color:var(--earth)}
.muted{color:var(--muted)} .small{font-size:13px} .tiny{font-size:12px;color:var(--muted)} .center{text-align:center}
.green{color:var(--green)} .red{color:var(--red)}

.top{background:var(--head);color:#fff;position:sticky;top:0;z-index:20}
.top-in{max-width:1000px;margin:0 auto;height:56px;padding:0 16px;display:flex;align-items:center;justify-content:space-between}
.brand{font-family:var(--display);font-size:22px;font-weight:600;color:#fff;letter-spacing:.2px}
.brand:hover{color:#fff;text-decoration:none}
.secure{display:flex;gap:6px;align-items:center;font-size:13px;color:#ddd}

.wrap{max-width:1000px;margin:0 auto;padding:14px 12px 20px}
h1{font-family:var(--display);font-size:28px;font-weight:800;margin:6px 4px 10px}
h1 .count{font-size:15px;color:var(--link)}
.steps{display:flex;gap:6px;margin:0 4px 12px;font-size:12px}
.steps span{flex:1;text-align:center;padding:6px 0;border-top:3px solid var(--line);color:var(--muted)}
.steps span.on{border-color:var(--earth);color:var(--ink);font-weight:700}

.layout{display:block}
.card{background:var(--card);border:1px solid var(--line);border-radius:8px;padding:14px 14px 16px;margin-bottom:12px}
h2{font-size:18px;margin:0 0 10px;font-weight:700;display:flex;gap:10px;align-items:center}
.n{width:24px;height:24px;border-radius:50%;background:var(--head);color:#fff;font-size:13px;display:inline-grid;place-items:center;flex:none}

.notice{background:var(--notice);border:1px solid var(--notice-b);border-radius:8px;padding:11px 14px;margin-bottom:12px;font-size:14px}

.row-info{display:flex;gap:10px;align-items:flex-start;margin-bottom:12px}
.lbl{display:block;font-weight:700;font-size:14px;margin:6px 0 5px}
input[type=email]{width:100%;font-size:16px;padding:11px 12px;border:1px solid var(--field);background:var(--surface);color:var(--ink);border-radius:6px;box-shadow:0 1px 0 rgba(255,255,255,.5),0 1px 0 rgba(15,17,17,.15) inset}
input[type=email]:focus{outline:none;border-color:var(--earth);box-shadow:0 0 0 3px var(--info-bg),0 0 0 1px var(--accent) inset}

.item{display:grid;grid-template-columns:auto 84px 1fr auto;gap:10px;padding:14px 0;border-top:1px solid var(--line);align-items:start}
.item:first-of-type{border-top:0;padding-top:4px}
.item img{width:84px;height:auto;border-radius:3px;border:1px solid var(--line);display:block}
.item h3{font-size:16px;margin:0 0 2px;line-height:1.25}
.item .meta .muted{font-size:13px}
.instock{color:var(--green);font-size:13px;margin-top:3px}
.links{font-size:13px;margin-top:6px}
.links i{color:var(--line);font-style:normal;margin:0 4px}
.price{font-weight:700;font-size:16px;white-space:nowrap}
.item.off{opacity:.45}
.item.off .price{text-decoration:line-through}

.chk{display:block;padding-top:2px}
.chk input{position:absolute;opacity:0;width:24px;height:24px;margin:0}
.chk span{display:block;width:22px;height:22px;border:2px solid var(--field);border-radius:4px;background:var(--surface);position:relative}
.chk input:checked + span{background:var(--link);border-color:var(--link)}
.chk input:checked + span::after{content:"";position:absolute;left:5px;top:1px;width:6px;height:12px;border:solid #fff;border-width:0 3px 3px 0;transform:rotate(45deg)}
.chk input:focus-visible + span{outline:3px solid var(--info);outline-offset:2px}

.bundle{margin:6px 0 10px;padding:10px 12px;border-radius:6px;background:var(--okbg);border:1px solid var(--okb);font-size:14px;color:var(--okc)}
.bundle:empty{display:none}
.bundle a{font-weight:700}

.pay-badges{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.pay-badges span{border:1px solid var(--line);border-radius:5px;padding:5px 10px;font-size:12px;font-weight:700;color:var(--ink);background:var(--surface2)}

.seller{display:flex;gap:12px;align-items:center}
.seller img{width:56px;height:56px;border-radius:50%;object-fit:cover;flex:none}

.buy{display:block;width:100%;background:var(--btn);border:1px solid var(--btn-d);border-radius:12px;font:inherit;font-size:15px;font-weight:700;padding:13px 16px;color:#fff;cursor:pointer;box-shadow:0 3px 0 var(--btn-d)}
.buy:hover{background:var(--btn-d)}
.buy:active{transform:translateY(1px)}
.buy:focus-visible{outline:3px solid var(--info);outline-offset:2px}
.sum dl{margin:0}
.sum dl div{display:flex;justify-content:space-between;padding:3px 0;font-size:14px}
.sum dt,.sum dd{margin:0}
.sum .tot{font-size:18px;font-weight:700;color:var(--red);border-top:1px solid var(--line);margin-top:8px;padding-top:10px}
.sum hr{border:0;border-top:1px solid var(--line);margin:12px 0}
.sum-h{font-size:17px;margin:0 0 8px;display:block}
.arrive{margin-top:10px;font-size:14px}
.right .buy{margin-bottom:8px}

/* mobile: summary shown above the fold-bar, sticky bar at bottom */
.bar{position:fixed;left:0;right:0;bottom:0;background:var(--surface);border-top:1px solid var(--line);padding:10px 12px calc(10px + env(safe-area-inset-bottom));display:flex;gap:12px;align-items:center;z-index:30}
.bar-t{display:flex;flex-direction:column;line-height:1.15;min-width:84px}
.bar-t b{font-size:18px;color:var(--red)}
.bar .buy{flex:1}
.right #buy1{display:none}
.right .tiny.center{display:none}
.right hr{display:none}

dialog{background:var(--card);color:var(--ink);border:0;border-radius:12px;padding:0;width:min(520px,calc(100vw - 24px));max-height:88vh;overflow:auto}
dialog::backdrop{background:rgba(0,0,0,.55)}
dialog p{margin:0 16px 14px}
dialog .buy{width:auto;margin:0 16px 16px;padding:10px 28px}
.dlg-h{display:flex;justify-content:space-between;align-items:center;padding:14px 16px}
.x{border:0;background:none;font-size:28px;line-height:1;cursor:pointer;color:var(--muted)}
.strip{display:flex;gap:10px;overflow-x:auto;padding:0 16px 12px;scroll-snap-type:x mandatory}
.strip img{height:330px;width:auto;border:1px solid var(--line);border-radius:4px;scroll-snap-align:center;flex:none}
.btn2{display:block;margin:0 16px 16px;text-align:center;padding:11px;border:1px solid var(--line);border-radius:12px;font-weight:600;background:var(--surface);color:var(--ink)}

@media(min-width:820px){
  body{padding-bottom:30px}
  .wrap{padding:20px 16px 40px}
  h1{font-size:28px}
  .layout{display:grid;grid-template-columns:1fr 300px;gap:16px;align-items:start}
  .right{position:sticky;top:76px}
  .bar{display:none}
  .right #buy1{display:block}
  .right .tiny.center{display:block}
  .right hr{display:block}
  .steps{max-width:420px}
}
@media(max-width:360px){
  .item{grid-template-columns:auto 70px 1fr}
  .item img{width:70px}
  .price{grid-column:3}
}
@media(prefers-reduced-motion:no-preference){.buy{transition:background .15s}}
