/* VennyD — a restrained Frutiger Aero: sky light, frosted glass, soft gloss. */

:root {
  --sky-top: #74bdf2;
  --sky-mid: #c3e4fb;
  --sky-bottom: #e9f7ee;
  --glow-1: rgba(255, 255, 255, 0.95);
  --glow-2: rgba(255, 255, 255, 0.55);
  --glow-3: rgba(170, 235, 190, 0.3);

  --glass: rgba(238, 247, 255, 0.86);
  --glass-strong: rgba(250, 253, 255, 0.95);
  --glass-edge: rgba(70, 125, 180, 0.6);
  --glass-rim: rgba(255, 255, 255, 0.9);
  --glass-shadow: 0 4px 10px rgba(30, 80, 130, 0.18), 0 1px 2px rgba(30, 80, 130, 0.12);
  --bar-top: #9fd6ff;
  --bar-mid: #4aa8f0;
  --bar-bottom: #1b7fd3;
  --radius: 3px;

  --ink: #10283f;
  --muted: #4f6a85;
  --line: rgba(60, 110, 160, 0.22);
  --field: rgba(255, 255, 255, 0.7);

  --accent: #1f8ee0;
  --accent-deep: #1372bd;
  --accent-light: #8fd3ff;
  --accent-ink: #ffffff;

  --warn-bg: rgba(255, 244, 200, 0.85);
  --warn-ink: #6b4e00;
  color-scheme: light;
}


* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  color: var(--ink);
  font: 12px/1.35 'Lucida Grande', Tahoma, Verdana, 'Trebuchet MS', 'Segoe UI', sans-serif;
  background:
    radial-gradient(ellipse 60% 45% at 12% 8%, var(--glow-1), transparent 70%),
    radial-gradient(ellipse 50% 40% at 88% 20%, var(--glow-2), transparent 70%),
    radial-gradient(ellipse 70% 40% at 50% 100%, var(--glow-3), transparent 70%),
    linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 55%, var(--sky-bottom) 100%);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 60;
  padding: 6px 12px;
  color: #fff;
  background: var(--accent-deep);
  border-radius: 0 0 8px 8px;
}
.skip:focus { top: 0; }

/* ---------- backdrop scene ---------- */

.backdrop {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, -14px, 0); }
}

.backdrop-bokeh,
.backdrop-bubbles { will-change: transform; }

@media (prefers-reduced-motion: no-preference) {
  .backdrop-bubbles { animation: drift 6s ease-in-out infinite alternate; }
  .backdrop-bokeh { animation: drift 11s ease-in-out infinite alternate-reverse; }
}

/* ---------- header ---------- */

/* A fixed-width page centred on wide screens, the way sites were built then. */
header,
main,
footer {
  width: 100%;
  max-width: var(--page-w);
  margin-inline: auto;
}

header {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px 6px;
}

/* The logo gets the Web 2.0 wet-floor reflection where the browser can draw one. */
.logo {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 2px 3px rgba(20, 60, 100, 0.25));
  -webkit-box-reflect: below -8px linear-gradient(transparent 55%, rgba(255, 255, 255, 0.45));
}

header h1 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.2px;
  background: linear-gradient(180deg, var(--accent-deep) 0%, var(--ink) 48%, var(--accent-deep) 52%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.8));
}

/* The obligatory "beta" sticker. */
.beta {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  vertical-align: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(180deg, #ffb347 0%, #ff8a1f 50%, #e86d00 51%, #ff8a1f 100%);
  border: 1px solid #c95d00;
  border-radius: 999px;
  text-shadow: 0 1px 1px rgba(90, 40, 0, 0.5);
  box-shadow: 0 1px 2px rgba(90, 40, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transform: rotate(-6deg);
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: #fff;
  filter: none;
}

header p { margin: 0 0 0 4px; font-style: italic; color: var(--muted); text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7); }

/* ---------- footer ---------- */

/* A window status bar: sunken strip, cells divided by etched lines. Fixed
   height so the install button appearing later can't move the page. */
footer {
  flex: none;
  display: flex;
  align-items: stretch;
  height: 26px;
  margin-bottom: 10px;
  padding: 0;
  font-size: 11px;
  line-height: 24px;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(220, 236, 250, 0.7));
  border: 1px solid var(--glass-edge);
  border-radius: 2px;
  box-shadow: inset 0 1px 2px rgba(30, 80, 130, 0.2), 0 1px 0 rgba(255, 255, 255, 0.6);
  overflow: hidden;
}

footer { width: calc(100% - 36px); max-width: calc(var(--page-w) - 36px); }

footer span {
  padding: 0 12px;
  white-space: nowrap;
  border-right: 1px solid rgba(60, 110, 160, 0.3);
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.7);
}

#install {
  margin-left: auto;
  height: auto;
  padding: 0 12px;
  font-size: 11px;
  line-height: 24px;
  border: 0;
  border-left: 1px solid rgba(60, 110, 160, 0.3);
  border-radius: 0;
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.7);
  background: linear-gradient(180deg, var(--glass-strong), var(--glass));
}
#install::before { display: none; }

/* ---------- layout ---------- */

/* Control sizes track the window height so the sidebar always fits without scrolling. */
:root {
  --page-w: 1100px;
  --panel-w: 300px;
  --row: clamp(20px, 3vh, 24px);
  --gap: clamp(2px, 0.6vh, 4px);
  --fs: clamp(11px, 1.5vh, 12px);
}

main {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--panel-w);
  gap: 16px;
  padding: 0 18px 8px;
}

.preview {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

/* ---------- glass surfaces ---------- */

.card,
fieldset,
#note {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow), inset 0 0 0 1px var(--glass-rim);
}

/* The diagram card: a title bar over a plain white well, so what you see is what exports. */
.card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0 5px 5px;
  overflow: hidden;
}

.bar,
legend {
  flex: none;
  margin: 0 -5px 5px;
  font: inherit;
  height: var(--bar);
  line-height: var(--bar);
  padding: 0 10px;
  margin: 0 -5px 5px;
  font-weight: 700;
  font-size: calc(var(--fs) - 2px);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 40, 80, 0.5);
  background: linear-gradient(180deg, var(--bar-top) 0%, var(--bar-mid) 50%, var(--bar-bottom) 51%, var(--bar-mid) 100%);
  border-bottom: 1px solid var(--accent-deep);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

/* The white artboard fills the frame; the picture is centred within it. */
#stage {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #fff;
  contain: layout paint;
  border-radius: 2px;
  border: 1px solid rgba(60, 110, 160, 0.35);
  box-shadow: inset 0 1px 3px rgba(30, 80, 130, 0.2);
  overflow: hidden;
}

#stage.transparent {
  background: repeating-conic-gradient(rgba(140, 170, 200, 0.18) 0% 25%, transparent 0% 50%) 0 0 / 20px 20px, var(--glass-strong);
}

#picture { position: absolute; inset: 0; contain: strict; }

#stage.dragging .handles { cursor: grabbing; }
#stage .handles { will-change: transform; }
#stage svg { display: block; width: 100%; height: 100%; }

/* ---------- hidden drag handles over the preview ---------- */

#stage .handles {
  position: absolute;
  inset: 0;
  touch-action: none;
  overflow: visible;
}

.handles .grab { fill: transparent; cursor: move; outline: none; }

.handles .ring {
  fill: none;
  stroke: #fff;
  stroke-width: 3;
  stroke-dasharray: 7 6;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}

.handles .knob {
  fill: url(#orb-white);
  stroke: var(--accent-deep);
  stroke-width: 1.5;
  cursor: ew-resize;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
  filter: drop-shadow(0 1px 2px rgba(0, 40, 80, 0.4));
}

.handles g:hover .ring,
.handles g:focus-within .ring,
.handles g.active .ring { opacity: 0.9; }

.handles g:hover .knob,
.handles g:focus-within .knob,
.handles g.active .knob { opacity: 1; pointer-events: all; }

.handles .grab:focus-visible + .knob,
.handles g:focus-within .ring { stroke: var(--accent); }

/* The note floats over the picture so the stage never changes size. */
#note {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  margin: 0;
  padding: 6px 12px;
  z-index: 2;
  border-radius: 3px;
  border-color: rgba(190, 150, 40, 0.5);
  background: linear-gradient(180deg, #fffbe6, #ffeeae);
  color: var(--warn-ink);
  font-size: 13px;
}

button.linkish {
  padding: 0 6px;
  border: 0;
  background: none;
  box-shadow: none;
  font-weight: 600;
  color: #8a5a00;
  text-decoration: underline dotted;
}
button.linkish::before { display: none; }
button.linkish:hover { background: none; box-shadow: none; color: #5a4200; }

.actions { flex: none; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.actions button { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 12px 0 7px; font-size: 12px; }
.ico { width: 16px; height: 16px; flex: none; filter: drop-shadow(0 1px 1px rgba(0, 40, 80, 0.3)); }

/* ---------- glossy buttons ---------- */

button {
  position: relative;
  isolation: isolate;
  padding: 3px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--glass-strong), var(--glass));
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(30, 80, 130, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

button::before {
  content: '';
  position: absolute;
  z-index: 1;
  inset: 1px 1px 50% 1px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.08));
  pointer-events: none;
}

button:hover { background: linear-gradient(180deg, #fff, var(--glass-strong)); box-shadow: 0 2px 8px rgba(31, 142, 224, 0.35), inset 0 1px 0 #fff; }
button:active { transform: translateY(1px); background: linear-gradient(180deg, var(--glass), var(--glass-strong)); }
button:active::before { opacity: 0.5; }

button.primary {
  border-color: var(--accent-deep);
  background: linear-gradient(180deg, var(--accent-light) 0%, var(--accent) 50%, var(--accent-deep) 51%, var(--accent) 100%);
  color: var(--accent-ink);
  text-shadow: 0 1px 1px rgba(0, 40, 80, 0.35);
  box-shadow: 0 3px 10px rgba(31, 142, 224, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

button.primary::before { background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.1)); }
button.primary:hover { background: linear-gradient(180deg, #b6e3ff 0%, #3aa0ec 50%, #1b7fd3 51%, #3aa0ec 100%); }
button.primary:active { background: linear-gradient(180deg, var(--accent-deep) 0%, var(--accent) 50%, var(--accent-light) 100%); }

/* A steady glow ring marks the default button; nothing on the page animates
   continuously, so idle costs nothing. */
button.primary::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: -1px;
  border-radius: inherit;
  box-shadow: 0 0 0 3px rgba(58, 165, 243, 0.35), 0 0 10px rgba(58, 165, 243, 0.45);
  pointer-events: none;
}
}

/* ---------- controls ---------- */


form {
  display: flex;
  flex-direction: column;
  gap: calc(var(--gap) + 3px);
  min-height: 0;
  overflow: hidden;
  padding: 1px;
  font-size: var(--fs);
}

:root { --bar: calc(var(--row) - 4px); }

.card,
fieldset {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0) 38%, rgba(190, 220, 245, 0.25) 100%);
}

fieldset {
  margin: 0;
  padding: calc(var(--bar) + var(--gap) + 4px) 12px calc(var(--gap) + 6px);
  display: grid;
  gap: var(--gap);
  min-width: 0;
  align-content: start;
  overflow: hidden;
}

/* The legend becomes a Vista-style title bar: positioning it drops the
   fieldset's special legend rendering, so it can span the full width. */
legend {
  position: absolute;
  inset: 0 0 auto 0;
  margin: 0;
}

/* Etched groove. */
hr { width: 100%; border: 0; border-top: 1px solid rgba(60, 110, 160, 0.35); border-bottom: 1px solid rgba(255, 255, 255, 0.9); margin: 1px 0; }
.hint { margin: 0; color: var(--muted); font-size: calc(var(--fs) - 1.5px); }

input[type='text'],
input[type='number'],
select {
  width: 100%;
  min-width: 0;
  height: var(--row);
  padding: 0 9px;
  border: 1px solid rgba(60, 110, 160, 0.45);
  border-top-color: rgba(60, 110, 160, 0.7);
  border-radius: 2px;
  background: linear-gradient(180deg, #f3f9ff 0%, #fff 40%);
  color: var(--ink);
  font: inherit;
  box-shadow: inset 1px 1px 2px rgba(30, 80, 130, 0.22), 0 1px 0 rgba(255, 255, 255, 0.8);
}

select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 26px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%239fd6ff'/%3E%3Cstop offset='.5' stop-color='%234aa8f0'/%3E%3Cstop offset='.51' stop-color='%231b7fd3'/%3E%3Cstop offset='1' stop-color='%234aa8f0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Ccircle cx='8' cy='8' r='7.5' fill='url(%23g)' stroke='%231372bd'/%3E%3Cpath d='M4.5 6.5h7L8 10.5z' fill='%23fff'/%3E%3C/svg%3E") no-repeat right 5px center,
    linear-gradient(180deg, #f3f9ff 0%, #fff 40%);
}

input:focus,
select:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: inset 0 2px 3px rgba(30, 80, 130, 0.12), 0 0 0 3px rgba(58, 165, 243, 0.45);
}

input[type='checkbox'] { accent-color: var(--accent); }

/* A field that was pulled back to its limit blinks amber once. */
@keyframes limit { from { box-shadow: 0 0 0 3px rgba(255, 170, 40, 0.7); } to { box-shadow: 0 0 0 3px rgba(255, 170, 40, 0); } }
input.limited { animation: limit 0.6s ease-out; }

input[type='color'] {
  flex: none;
  width: 34px;
  height: var(--row);
  padding: 2px;
  border: 1px solid rgba(60, 110, 160, 0.45);
  border-radius: 2px;
  background: linear-gradient(180deg, #fff, #e8f2fb);
  box-shadow: inset 0 1px 0 #fff, 0 1px 1px rgba(30, 80, 130, 0.15);
  cursor: pointer;
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.set,
.thead {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 72px;
  gap: 6px;
  align-items: center;
}

/* Zebra rows on the circle table. */
.set { margin: 0 -6px; padding: 1px 6px; border-radius: 2px; }
.set:nth-of-type(even) { background: rgba(120, 170, 220, 0.12); }

.thead {
  margin-bottom: -2px;
  font-size: calc(var(--fs) - 2px);
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--muted);
}

.thead span:nth-child(2) { grid-column: 2; }
.thead span:first-child { grid-column: 1; }

.row label { display: flex; align-items: center; gap: 7px; }
.dots { display: inline-flex; flex: none; }
.dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 1px rgba(30, 80, 130, 0.3);
}
.dots i + i { margin-left: -4px; }

.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  gap: 8px;
  align-items: center;
}

.row label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row.overlap { grid-template-columns: auto minmax(0, 1fr) 84px; gap: 7px; }

/* Caption fields read as labels until you point at them. */
input.caption {
  padding-left: 4px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  text-overflow: ellipsis;
}
input.caption::placeholder { color: var(--ink); opacity: 1; }
input.caption:hover,
input.caption:focus {
  border-color: rgba(60, 110, 160, 0.45);
  background: linear-gradient(180deg, #f3f9ff 0%, #fff 40%);
}
input.caption:focus::placeholder { color: var(--muted); }
.row.off input.caption::placeholder { color: var(--muted); }
.row.off label,
.set.off input[type='text'] { color: var(--muted); opacity: 0.6; }
input:disabled { opacity: 0.5; }
.check { display: flex; gap: 8px; align-items: center; }


button.quiet { justify-self: start; padding: 0; font-size: calc(var(--fs) - 1px); font-weight: 400; color: #0033cc; text-decoration: underline; }
button.quiet:hover { color: #cc0000; }


@media (max-height: 620px) {
  .hint { display: none; }
}

/* Narrow screens can't hold both panels at once, so they stack and scroll. */
@media (max-width: 820px) {
  body { position: relative; height: auto; min-height: 100dvh; overflow: auto; }
  :root { --row: 30px; --gap: 5px; --fs: 14px; }
  body { font-size: 14px; }
  header { flex-wrap: wrap; row-gap: 0; }
  header h1 { white-space: nowrap; }
  header p { flex-basis: 100%; margin: 0; }
  .backdrop { position: absolute; height: 100%; }
  :root { --glass: rgba(255, 255, 255, 0.92); }
  main { grid-template-columns: minmax(0, 1fr); }
  .card { flex: none; }
  #stage { aspect-ratio: 4 / 3; flex: none; }
  form { overflow: visible; }
}

/* ---------- first-visit splash ---------- */

#splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--sky-top), var(--sky-bottom));
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.45s ease, transform 0.45s ease;
  will-change: opacity, transform;
}
#splash.done { opacity: 0; transform: translateY(-12px); }
#splash[hidden] { display: none; }

.splash-card {
  width: 260px;
  padding: 22px 24px 20px;
  text-align: center;
  background: var(--glass-strong);
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow), inset 0 0 0 1px var(--glass-rim);
}
.splash-card .logo.big { width: 56px; height: 56px; -webkit-box-reflect: below -14px linear-gradient(transparent 55%, rgba(255, 255, 255, 0.45)); }
.splash-card p { margin: 18px 0 10px; font-weight: 700; color: var(--accent-deep); }

.progress {
  height: 14px;
  padding: 2px;
  border: 1px solid rgba(60, 110, 160, 0.45);
  border-radius: 999px;
  background: linear-gradient(180deg, #e9f3fb, #fff);
  box-shadow: inset 0 2px 3px rgba(30, 80, 130, 0.18);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.35) 0 6px, transparent 6px 12px),
    linear-gradient(180deg, var(--accent-light) 0%, var(--accent) 50%, var(--accent-deep) 51%, var(--accent) 100%);
  animation: fill 1s ease-out forwards;
}
@keyframes fill { to { width: 100%; } }

/* ---------- era details ---------- */

/* Candy stripes on every title bar. */
.bar,
legend {
  background-image:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0 3px, transparent 3px 8px),
    linear-gradient(180deg, var(--bar-top) 0%, var(--bar-mid) 50%, var(--bar-bottom) 51%, var(--bar-mid) 100%);
}

/* Wet-floor reflection under the big buttons, where the browser can draw one. */
.actions button {
  -webkit-box-reflect: below -5px linear-gradient(transparent 62%, rgba(255, 255, 255, 0.32));
}

/* Gel checkboxes. */
input[type='checkbox'] {
  -webkit-appearance: none;
  appearance: none;
  width: 17px;
  height: 17px;
  margin: 0;
  flex: none;
  border: 1px solid rgba(60, 110, 160, 0.55);
  border-radius: 3px;
  background: linear-gradient(180deg, #fff 0%, #e4eef8 100%);
  box-shadow: inset 0 1px 0 #fff, 0 1px 1px rgba(30, 80, 130, 0.2);
  cursor: pointer;
  position: relative;
}

input[type='checkbox']::before {
  content: '';
  position: absolute;
  inset: 1px 1px 50% 1px;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.15));
  pointer-events: none;
}

input[type='checkbox']:checked {
  border-color: var(--accent-deep);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5 6.5 11.5 12.5 5' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 13px no-repeat,
    linear-gradient(180deg, var(--accent-light) 0%, var(--accent) 50%, var(--accent-deep) 51%, var(--accent) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 1px 3px rgba(31, 142, 224, 0.4);
}

input[type='checkbox']:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Gel colour wells. */
input[type='color']::-webkit-color-swatch-wrapper { padding: 0; }
input[type='color']::-webkit-color-swatch,
input[type='color']::-moz-color-swatch {
  border: 1px solid rgba(0, 30, 60, 0.3);
  border-radius: 2px;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.15) 50%, rgba(0, 0, 0, 0.05) 51%, rgba(0, 0, 0, 0.12) 100%);
}

/* Vista infotip: white, rounded, soft shadow, with a tail. */
#tip {
  position: fixed;
  z-index: 50;
  max-width: 240px;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.3;
  color: var(--ink);
  background: linear-gradient(180deg, #fff 0%, #eef5fc 100%);
  border: 1px solid rgba(60, 110, 160, 0.5);
  border-radius: 3px;
  box-shadow: 0 4px 12px rgba(30, 80, 130, 0.25), inset 0 1px 0 #fff;
  pointer-events: none;
}

#tip::before,
#tip::after {
  content: '';
  position: absolute;
  left: calc(var(--tail, 50%) - 7px);
  border: 7px solid transparent;
}

#tip::before { top: 100%; border-top-color: rgba(60, 110, 160, 0.5); }
#tip::after { top: calc(100% - 1px); border-top-color: #eef5fc; }
#tip.below::before { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: rgba(60, 110, 160, 0.5); }
#tip.below::after { top: auto; bottom: calc(100% - 1px); border-top-color: transparent; border-bottom-color: #fff; }

/* Links the way they were: blue, underlined, purple once visited. */
a { color: #0033cc; text-decoration: underline; }
a:visited { color: #551a8b; }
a:hover { color: #cc0000; }
footer a { color: #0033cc; }
