/* The highlight colour picker (bookflow.js, "Every colour"): after a classic colour card. A field of shade with a
   faint readout, a hue strip (no opacity strip), the suggested colours, a name for the colour, and two words. */
#rbpal.hp{width:272px;padding:12px;box-sizing:border-box;border-radius:0;overflow:hidden;
  opacity:0;transform:translateY(4px) scale(.985);transform-origin:50% 0;transition:opacity .2s ease,transform .3s cubic-bezier(.32,.72,0,1)}
#rbpal.hp.in{opacity:1;transform:none}
#rbpal.hp *{box-sizing:border-box}

/* the field: white to the hue across, black down */
.hp-field{position:relative;width:100%;aspect-ratio:1.32/1;border-radius:12px;cursor:crosshair;touch-action:none;
  background:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,var(--hue,red));
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.08)}
.hp-knob{position:absolute;width:18px;height:18px;margin:-9px 0 0 -9px;border-radius:50%;pointer-events:none;
  box-shadow:0 0 0 2px #fff,0 0 0 3px rgba(0,0,0,.18),0 2px 6px rgba(0,0,0,.25)}
.hp-read{position:absolute;left:0;right:0;bottom:12px;text-align:center;pointer-events:none;
  font:400 10.5px/1 "Times New Roman",Times,Tinos,serif;letter-spacing:.12em;color:rgba(255,255,255,.88);text-shadow:0 1px 2px rgba(0,0,0,.25);
  font-variant-numeric:lining-nums;white-space:pre}
.hp-read.dk{color:rgba(28,27,25,.62);text-shadow:none}

/* the hue strip */
.hp-hue{position:relative;height:22px;margin-top:12px;border-radius:999px;cursor:pointer;touch-action:none;
  background:linear-gradient(90deg,#f00 0%,#ff0 16.7%,#0f0 33.3%,#0ff 50%,#00f 66.7%,#f0f 83.3%,#f00 100%);
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.08)}
.hp-hue .hp-knob{top:50%;width:20px;height:20px;margin:-10px 0 0 -10px}

/* the suggested colours: eight across, sized to fit the card exactly */
.hp-sw{display:grid;grid-template-columns:repeat(8,1fr);gap:6px;margin-top:14px}
.hp-c{all:unset;display:grid;place-items:center;aspect-ratio:1;border-radius:50%;cursor:pointer}
.hp-c i{display:block;width:100%;height:100%;border-radius:50%;box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);transition:transform .2s cubic-bezier(.32,.72,0,1)}
.hp-c.on i{box-shadow:inset 0 0 0 1px rgba(0,0,0,.1),0 0 0 2px var(--rb-card,#fff),0 0 0 3.5px var(--ink)}
@media (hover:hover){.hp-c:hover i{transform:scale(1.1)}}
.hp-c:focus-visible{outline:1.5px solid var(--red);outline-offset:2px}

/* its name */
.hp-name{display:flex;align-items:center;gap:10px;margin-top:14px;padding:9px 12px;border-radius:10px;
  background:color-mix(in srgb,var(--ink) 5%,transparent);cursor:text}
.hp-dot{flex:none;width:16px;height:16px;border-radius:50%;box-shadow:inset 0 0 0 1px rgba(0,0,0,.12)}
.hp-name input{all:unset;flex:1;min-width:0;font:400 16px/1.2 "EB Garamond",Garamond,Georgia,serif;color:var(--ink)}
.hp-name input::placeholder{color:var(--ink3)}
.hp-name:focus-within{box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--ink) 22%,transparent)}

/* the two words */
.hp-foot{display:flex;justify-content:space-between;align-items:center;margin-top:12px;padding:4px 4px 0}
.hp-foot button{all:unset;cursor:pointer;padding:6px 2px;font:400 12px/1 "Times New Roman",Times,Tinos,serif;letter-spacing:.14em;text-transform:uppercase;color:var(--ink3)}
.hp-foot .hp-use{color:var(--ink)}
@media (hover:hover){.hp-foot button:hover{color:var(--ink);text-decoration:underline;text-underline-offset:4px;text-decoration-thickness:1px}}
.hp-foot button:focus-visible{outline:1.5px solid var(--red);outline-offset:3px}
@media (prefers-reduced-motion:reduce){#rbpal.hp{transition:none}}

/* ===== The wheel (2026-11-17, the user's reference): replaces the shade field, hue strip and suggested colours.
   A hue ring around the chosen colour, a strength arc on the left and a light arc on the right, the code below. ===== */
#rbpal.hp{width:288px!important;padding:18px 18px 14px!important}
.hw{position:relative;width:100%;aspect-ratio:1;touch-action:none;cursor:pointer;user-select:none}
.hw-arcs{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.hw-arc{fill:none;stroke-width:4.5;stroke-linecap:round}
/* the ring sits on a white disc with a soft shadow, the colour in a raised core */
.hw::before{content:"";position:absolute;inset:calc(50% - 41.5%);border-radius:50%;background:#fff;box-shadow:0 10px 26px -12px rgba(0,0,0,.28),inset 0 0 0 1px rgba(0,0,0,.04)}
.hw-ring{position:absolute;inset:calc(50% - 38.3%);border-radius:50%;
  background:conic-gradient(from 0deg,#f00,#ff0,#0f0,#0ff,#00f,#f0f,#f00);
  -webkit-mask:radial-gradient(circle closest-side,transparent 68.6%,#000 69.6%);mask:radial-gradient(circle closest-side,transparent 68.6%,#000 69.6%)}
.hw-core{all:unset;cursor:pointer;position:absolute;inset:calc(50% - 21%);border-radius:50%;box-shadow:0 0 0 7px #fff,0 0 0 8px rgba(0,0,0,.05),0 8px 18px -6px rgba(0,0,0,.3);transition:background .08s,transform .1s}
@media (hover:hover){.hw-core:hover{transform:scale(1.04)}}
.hw-core:active{transform:scale(.97)}
.hw .hp-knob{position:absolute;width:18px;height:18px;margin:-9px 0 0 -9px;border-radius:50%;pointer-events:none;
  box-shadow:0 0 0 3px #fff,0 0 0 4px rgba(0,0,0,.12),0 2px 6px rgba(0,0,0,.28)}
.hw-hex{display:flex;justify-content:center;margin-top:12px}
.hw-hex .hp-read{position:static!important;display:inline-block;padding:7px 18px;border-radius:9px;box-shadow:inset 0 0 0 1px rgba(60,48,36,.16);
  font:400 13px/1 "Times New Roman",Times,Tinos,serif!important;letter-spacing:.14em;color:var(--ink)!important;text-shadow:none!important}
html.night .hw::before{background:#2A2A2A}html.night .hw-core{box-shadow:0 0 0 7px #2A2A2A,0 0 0 8px rgba(255,255,255,.06),0 8px 18px -6px rgba(0,0,0,.6)}
html.night .hw .hp-knob{box-shadow:0 0 0 3px #2A2A2A,0 0 0 4px rgba(255,255,255,.15),0 2px 6px rgba(0,0,0,.5)}

/* a colour's own menu (right-click a colour): the site's Garamond, normal case, a dot or a drawn icon before each */
#rbpalmenu.pm{padding:6px;min-width:236px;border-radius:0;overflow:hidden;opacity:0;transform:translateY(4px) scale(.985);transform-origin:50% 0;
  transition:opacity .2s ease,transform .3s cubic-bezier(.32,.72,0,1)}
#rbpalmenu.pm.in{opacity:1;transform:none}
#rbpalmenu.pm button{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:12px;width:100%;padding:9px 12px;border-radius:0;cursor:pointer;
  font:400 17px/1.2 "EB Garamond",Garamond,Georgia,serif!important;letter-spacing:0!important;text-transform:none!important;font-variant-caps:normal!important;color:var(--ink)!important}
#rbpalmenu.pm button span{flex:1}
#rbpalmenu.pm button small{font:400 14px/1 "EB Garamond",Garamond,Georgia,serif;color:var(--ink3);max-width:96px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#rbpalmenu.pm button[disabled]{opacity:.38;cursor:default}
@media (hover:hover){#rbpalmenu.pm button:not([disabled]):hover{background:color-mix(in srgb,var(--ink) 6%,transparent)}}
#rbpalmenu.pm button:focus-visible{outline:1.5px solid var(--red);outline-offset:-1.5px}
.pm-dot{flex:none;width:14px;height:14px;border-radius:50%;box-shadow:inset 0 0 0 1px rgba(0,0,0,.12)}
.pm-wheel{background:conic-gradient(#f00,#ff0,#0f0,#0ff,#00f,#f0f,#f00)!important}
.pm-ic,.pm-chev{flex:none;width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.pm-ic circle{fill:currentColor;stroke:none}
.pm-chev{width:14px;height:14px;color:var(--ink3)}
#rbpalmenu.pm .pm-back{color:var(--ink3)!important;font-size:14px!important;padding:8px 10px 10px;margin-bottom:2px;border-bottom:1px solid var(--rb-line,var(--line));border-radius:0}
#rbpalmenu.pm .pm-back span{color:var(--ink3)}
.pm-name{display:flex;align-items:center;gap:10px;margin:6px 6px 2px;padding:9px 12px;border-radius:10px;background:color-mix(in srgb,var(--ink) 5%,transparent);cursor:text}
.pm-name input{all:unset;flex:1;min-width:0;font:400 17px/1.2 "EB Garamond",Garamond,Georgia,serif;color:var(--ink)}
.pm-name input::placeholder{color:var(--ink3)}
.pm-name:focus-within{box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--ink) 22%,transparent)}
#rbpalmenu.pm .pm-save{justify-content:flex-end;font-size:15px!important;color:var(--ink)!important}
#rbpalmenu.pm .pm-save span{flex:none}
/* normal case, the site's Garamond (outranks wordbtns.css's capitals for these two places) */
html body #rbpalmenu#rbpalmenu.pm button,html body #rbpalmenu#rbpalmenu.pm button span,
html body #rbpal#rbpal.hp .hp-foot button{text-transform:none!important;letter-spacing:0!important;font-variant-caps:normal!important;
  font-family:"EB Garamond",Garamond,Georgia,serif!important;font-weight:400!important}
html body #rbpalmenu#rbpalmenu.pm button{font-size:17px!important}
html body #rbpalmenu#rbpalmenu.pm .pm-back,html body #rbpalmenu#rbpalmenu.pm .pm-back span{font-size:14px!important;color:var(--ink3)!important}
html body #rbpal#rbpal.hp .hp-foot button{font-size:16px!important}

/* no hex readout under the wheel */
html body #rbpal .hw-hex{display:none!important}
