
/* Class guide pages (Setup / Go sailing), first the Australian Sharpie. Generated from pending/guide-v3/bundle/style.css with
 *   node tools/scope-css.js pending/guide-v3/bundle/style.css "#sg3"
 * so every rule lives under #sg3 (the guide container) and wins over the app styles; then the app integration rules at the end.
 * Change the look in the bundle file and regenerate, or edit here and keep the two in step. */
/* the app styles stay out: everything inside the guide (except the boat drawing, whose colours are SVG attributes)
 * goes back to the browser defaults first, so only the rules below apply */
#sg3 :where(:not(svg, svg *)) { all: revert; }
#sg3 {
  --ink: var(--fg);
  --muted: #6e6e73;
  --paper: var(--bg);
  --line: #e5e5ea;
  --accent: #1b7f45;
  --tint: rgba(27,127,69,.12);
  --serif: Georgia,serif;
}
#sg3, #sg3 * { box-sizing: border-box; }
#sg3 { background: var(--paper); color: var(--ink); font-family: var(--body); font-size: var(--fs-ml); line-height: 1.5; }
#sg3 button, #sg3 input { font: inherit; }
#sg3 button, #sg3 a, #sg3 input { -webkit-tap-highlight-color: transparent; }
#sg3 button { cursor: pointer; }
#sg3 a { color: inherit; }
#sg3 button:focus-visible,
#sg3 a:focus-visible,
#sg3 input:focus-visible,
#sg3 [role=button]:focus-visible {
  outline: 3px solid #5888ff;
  outline-offset: 4px;
}
#sg3 header {
  height: 85px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 0 5vw;
  gap: 20px;
}
#sg3 .brand {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: 2px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--fs-xl);
}
#sg3 .eyebrow { font-size: var(--fs-s); letter-spacing: 1.8px; font-weight: 700; }
#sg3 .quiet { border: 1px solid var(--line); border-radius: var(--r-s); background: transparent; padding: 10px 15px; font-size: var(--fs-m); }
#sg3 main { max-width: 1440px; padding: 0 5vw; margin: auto; }
#sg3 .intro { display: flex; align-items: center; justify-content: space-between; }
#sg3 .eyebrow { display: block; color: var(--muted); }
#sg3 h1 { font: 800 42px/1.18 var(--display); letter-spacing: -1.8px; margin: 12px 0 16px; }
#sg3 h1 span { display: block; font: italic 40px/1.2 var(--serif); letter-spacing: -1px; color: #6e6e73; margin-top: 4px; }
#sg3 .intro p { color: var(--muted); margin: 0; }
#sg3 .stages button { border-bottom: 3px solid transparent; }
#sg3 .stages button[aria-pressed=true] { border-color: var(--ink); }
#sg3 .stages b { font-size: var(--fs-s); margin-right: 9px; color: var(--faint); }
#sg3 .modes { display: flex; gap: 8px; }
#sg3 .modes button {
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--r-s);
  padding: 12px 20px;
  text-align: left;
  min-width: 145px;
  color: var(--ink);
  transition: background .2s,border-color .2s;
}
#sg3 .modes button[aria-pressed=true] { background: var(--tint); }
#sg3 .modes small { display: block; font-size: var(--fs-s); color: var(--muted); margin-top: 2px; }
#sg3 .modes i, #sg3 .dot { height: 9px; width: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
#sg3 .modes [data-mode=green] i, #sg3 .green { background: var(--mode-green); }
#sg3 .modes [data-mode=orange] i, #sg3 .orange { background: var(--mode-orange); }
#sg3 .modes [data-mode=red] i, #sg3 .red { background: var(--bad); }
#sg3 .drawing-head { display: flex; align-items: center; justify-content: space-between; padding: 25px 28px 0; gap: 12px; }
#sg3 h2 { font: 700 24px/1.3 var(--display); letter-spacing: -.6px; margin: 8px 0; }
#sg3 .drawing-head h2 { font: italic 28px var(--serif); }
#sg3 .drawing-head .eyebrow { color: var(--accent); }
#sg3 .switch {
  font-size: var(--fs-sm);
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
#sg3 .switch input { accent-color: var(--accent); }
#sg3 #boat { display: flex; align-items: center; justify-content: center; }
#sg3 #boat svg { width: 100%; height: 100%; overflow: visible; }
#sg3 #boat path { vector-effect: non-scaling-stroke; }
#sg3 #boat .pin { outline-offset: 4px; }
#sg3 #boat .pin circle { fill: white; stroke: var(--accent); stroke-width: 11; }
#sg3 #boat .pin.active circle { fill: var(--accent); }
#sg3 #boat #tape { stroke: var(--accent); stroke-dasharray: 80 65; stroke-width: 1.4; }
#sg3 .feel { background: var(--tint); border-top: 1px solid var(--line); padding: 20px 28px; }
#sg3 .feel p { margin: 6px 0 0; font-size: var(--fs-m); max-width: 700px; }
#sg3 .feel .eyebrow { color: var(--accent); }
#sg3 #confidence { font-size: var(--fs-s); letter-spacing: .5px; margin: 12px 0 6px; color: #ceddcf; }
#sg3 .next {
  margin-top: auto;
  padding: 20px 0 0;
  border: 0;
  border-top: 1px solid #3c585d;
  background: none;
  text-align: left;
  color: white;
  font-size: var(--fs-m);
}
#sg3 .badge {
  display: inline-block;
  font-size: var(--fs-xs);
  color: var(--accent);
  background: var(--tint);
  padding: 2px 6px;
  border-radius: 3px;
  margin-top: 9px;
}
#sg3 .downwind, #sg3 .sources { border: 1px solid var(--line); border-radius: var(--r-s); padding: 22px; margin: 25px 0; background: #fff; }
#sg3 summary { cursor: pointer; font-weight: 600; font-size: var(--fs-ml); }
#sg3 .downwind p, #sg3 .sources p, #sg3 .sources li { font-size: var(--fs-m); color: var(--muted); }
#sg3 #downwind { font-size: var(--fs-xxl); margin-top: 15px; }
#sg3 footer {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  padding: 25px 0 40px;
  border-top: 1px solid var(--line);
  font-size: var(--fs-sm);
  color: var(--muted);
}
#sg3 footer b { letter-spacing: 2px; color: var(--ink); }
#sg3 .reference { border-left: 3px solid var(--accent); padding: 12px 20px; margin: 25px 0; font-size: var(--fs-ml); }
#sg3 .reference p { margin: 6px 0 0; font-size: var(--fs-m); color: var(--muted); }
#sg3 .rope { height: 8px; background: repeating-linear-gradient(40deg,#b8b9ac 0px,#b8b9ac 2px,#e2dfcf 2px,#e2dfcf 5px); width: 200px; display: flex; justify-content: space-evenly; }
#sg3 .rope i { width: 12px; height: 28px; border-radius: 2px; transform: translateY(-10px); }
#sg3 .muted { color: var(--muted); }
#sg3 [hidden] { display: none!important; }
@media(min-width:1300px) {
  #sg3 #boat { height: 600px; }
}
@media(max-width:1050px) {
  #sg3 .modes button { min-width: 130px; padding: 12px 15px; }
}
@media(max-width:760px) {
  #sg3 header { padding: 0 5vw; }
  #sg3 h1 { letter-spacing: -1.1px; }
  #sg3 .brand { font-size: var(--fs-ml); }
  #sg3 .stages b { margin-right: 4px; }
  #sg3 .modes { gap: 7px; }
  #sg3 .modes button { flex: 1; min-width: 0; font-size: var(--fs-ml); }
  #sg3 footer span { display: none; }
}
@media(prefers-reduced-motion:reduce) {
  #sg3, #sg3 * { transition: none!important; }
}
@media print {
  #sg3 header, #sg3 .stages, #sg3 .sources, #sg3 footer, #sg3 .downwind { display: none; }
  #sg3 main { padding: 0; }
  #sg3 .intro { padding: 10px; }
  #sg3 .feel { padding: 10px; }
  #sg3 { background: white; }
  #sg3 .drawing-head { padding-top: 12px; }
}

/* Bow Down brand neutrals and exact traffic-light palette. */
#sg3 .modes button[aria-pressed=true] { border-color: var(--mode); box-shadow: 0 0 0 1px var(--mode); }
#sg3 .brand { color: #13263d; }
#sg3 .reference { background: var(--panel-2); }

/* Rounded, softly coloured Sharpie illustration; original geometry retained. */
#sg3 #boat path { stroke: #13263d; stroke-width: 2.15; stroke-linecap: round; stroke-linejoin: round; }
#sg3 #boat .boat-mast { fill: #627c98; stroke-width: 1.6; }
#sg3 #boat .boat-jib { fill: #fff; }
#sg3 #boat .boat-foil { fill: #c1d1e1; stroke-width: 2; }
#sg3 #boat .boat-boom { stroke-width: 3; stroke: #13263d; }
#sg3 #boat .boat-batten { stroke: #738aa3; stroke-width: 1.15; }
#sg3 #boat .boat-batten.boat-batten-mode { stroke: var(--mode, #1b7f45); stroke-width: 1.6; }
#sg3 #boat .boat-control { stroke-dasharray: 4 3; stroke-width: 1.2; }
#sg3 #boat .boat-chine { stroke: #738aa3; stroke-width: 1.1; }
#sg3 #boat .boat-forestay { stroke: #738aa3; stroke-width: 1; }
#sg3 #boat .boat-jib-tint { fill: var(--panel-2); }
#sg3 #boat .boat-sheet { stroke: #13263d; stroke-width: 1.4; }
#sg3 #boat .boat-car { fill: #13263d; stroke: none; }
#sg3 #boat .boat-sail-label { font: 700 520px var(--display); fill: #13263d; opacity: .55; text-anchor: middle; pointer-events: none; }

/* Touch-first tuning, with the two-column layout retained on desktop. */
#sg3 #boat .pin text { font-size: 195px; }
#sg3 button { touch-action: manipulation; }
@media(max-width:760px) {
  #sg3 main { padding-left: max(16px,env(safe-area-inset-left)); padding-right: max(16px,env(safe-area-inset-right)); }
  #sg3 header { padding-left: max(16px,env(safe-area-inset-left)); padding-right: max(16px,env(safe-area-inset-right)); height: 60px; }
  #sg3 .quiet { min-height: 44px; padding: 10px 12px; }
  #sg3 h1 { font-size: 28px; margin: 8px 0 10px; }
  #sg3 h1 span { font-size: 29px; }
  #sg3 .intro p { max-width: none; }
  #sg3 .stages button { padding: 12px 0; }
  #sg3 .modes button { padding: 9px 8px; gap: 7px; }
  #sg3 .modes small { font-size: var(--fs-s); }
  #sg3 .modes button>span { font-size: var(--fs-m); font-weight: 600; }
  #sg3 .drawing-head { padding: 16px 16px 0; }
  #sg3 .drawing-head h2 { font-size: 23px; margin: 5px 0; }
  #sg3 .drawing-head .eyebrow { font-size: var(--fs-xs); }
  #sg3 .feel { padding: 12px 16px; }
  #sg3 .feel p { font-size: var(--fs-m); line-height: 1.5; }
  #sg3 #confidence, #sg3 .next { grid-column: 1/-1; }
  #sg3 #confidence { margin: 8px 0 0; }
  #sg3 .sources summary, #sg3 .downwind summary { min-height: 44px; align-content: center; }
  #sg3 .sources, #sg3 .downwind { padding: 12px 16px; }
  #sg3 .sources a { overflow-wrap: anywhere; }
  #sg3 footer { padding-bottom: max(28px,env(safe-area-inset-bottom)); }
  #sg3 .stage-panel { scroll-margin-top: 85px; }
}
@media(max-width:370px) {
  #sg3 .stages { gap: 7px; }
  #sg3 .stages b { display: none; }
  #sg3 .stages button { font-size: var(--fs-sm); }
  #sg3 .modes button { gap: 5px; padding: 8px 6px; }
  #sg3 .modes small { font-size: var(--fs-xs); }
  #sg3 .modes button>span { font-size: var(--fs-ml); }
  #sg3 h1 { font-size: 26px; }
}
@media(max-height:500px) and (orientation:landscape) {
  #sg3 #boat { height: 340px; }
}
#sg3 #boat .pin.active .pin-hit { fill: transparent; stroke: none; }

/* One mobile-friendly setup table, with measuring detail on demand. */
#sg3 .green-word { color: var(--mode-green); }
#sg3 .orange-word { color: #8a5a00; }
#sg3 .red-word { color: var(--bad); }
#sg3 .setup-table { width: 100%; table-layout: fixed; text-align: left; }
#sg3 .setup-table thead small { display: block; }
#sg3 .setup-table .group-row th { text-transform: uppercase; border-top: 1px solid #e5e5ea; }
#sg3 .setup-table td strong { display: block; }
#sg3 .table-note { color: #6e6e73; margin: 14px 0 24px; }
#sg3 .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media(max-width:760px) {
  #sg3 .stages { justify-content: flex-start; gap: 32px; }
  #sg3 .stages button { font-size: var(--fs-ml); }
}
@media(max-width:370px) {
  #sg3 .setup-table { font-size: var(--fs-sm); }
  #sg3 .setup-table thead th { font-size: var(--fs-m); }
  #sg3 .setup-table td small { font-size: var(--fs-xs); }
}
@media print {
  #sg3 .setup-table { font-size: var(--fs-s); }
  #sg3 .value-row { break-inside: avoid; }
}

/* Two jobs only: a setup reference, and three sailing priorities. */
#sg3 .intro { padding: 30px 0 22px; }
#sg3 .intro h1 { font-size: 34px; margin: 8px 0 9px; }
#sg3 .intro p { font-size: var(--fs-m); }
#sg3 .sailing-layout {
  display: grid;
  grid-template-columns: minmax(0,1.1fr) minmax(300px,.9fr);
  background: white;
  border: 1px solid #e5e5ea;
  border-radius: var(--r-l);
  overflow: hidden;
  margin-bottom: 28px;
}
#sg3 .sailing-boat { min-width: 0; background: linear-gradient(180deg,#fff,#fafbfc); }
#sg3 .sailing-boat .drawing-head { padding: 24px 28px 0; }
#sg3 .sailing-boat .eyebrow { color: var(--accent); }
#sg3 .sailing-boat .drawing-head h2 { font: 700 24px/1.3 var(--display); letter-spacing: -.7px; }
#sg3 #boat { height: 490px; padding: 5px 20px 15px; }
#sg3 .sailing-focus { padding: 38px 32px; background: #13263d; color: #fff; display: flex; flex-direction: column; }
#sg3 .sailing-focus>.eyebrow { color: #aebed0; }
#sg3 .sailing-focus>h2 { font-size: 29px; margin: 10px 0 22px; }
#sg3 .priority { display: flex; gap: 16px; padding: 23px 0; border-top: 1px solid #33465d; }
#sg3 .priority>span {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #64748b;
  display: grid;
  place-items: center;
  color: #b9c9d9;
  font-size: var(--fs-m);
}
#sg3 .priority h3 { font: 600 21px/1.25 var(--display); margin: 2px 0 8px; letter-spacing: -.4px; }
#sg3 .priority p { color: #c3cfdb; margin: 0; max-width: 330px; }
#sg3 .setup-table { font-size: var(--fs-ml); }
#sg3 .setup-table thead th { background: #fff; color: #13263d; padding-top: 20px; padding-bottom: 18px; }
#sg3 .setup-table thead .head-green { background: #edf6f0; color: #17673b; border-top: 4px solid var(--mode-green); }
#sg3 .setup-table thead .head-orange { background: #fff5df; color: #805100; border-top: 4px solid var(--mode-orange); }
#sg3 .setup-table thead .head-red { background: #fceeee; color: #a32222; border-top: 4px solid var(--bad); }
#sg3 .setup-table td small, #sg3 .setup-table th small { display: block; }
#sg3 .setup-table sup { color: #8a5a00; }
#sg3 .setup-table .common-setting { text-align: center; color: #32465b; }
#sg3 .table-note { font-size: var(--fs-sm); line-height: 1.7; max-width: 800px; }
#sg3 .table-note b { margin-left: 10px; }
#sg3 .table-note b:first-child { margin-left: 0; }
/* v517: rig turns at every wind step (setup.steps) */
#sg3 .rig-steps { padding: 18px 22px; border: 1px solid #e5e5ea; border-radius: var(--r-s); background: white; margin: 22px 0; }
#sg3 .rig-steps summary { font-size: var(--fs-ml); min-height: 40px; align-content: center; }
#sg3 .rig-steps p { color: #6e6e73; font-size: var(--fs-ml); }
#sg3 .rig-steps-table { width: 100%; table-layout: fixed; border-collapse: collapse; text-align: center; font-family: var(--body); font-variant-numeric: tabular-nums; font-size: var(--fs-ml); }
#sg3 .rig-steps-table th, #sg3 .rig-steps-table td { padding: 8px 4px; border-bottom: 1px solid #eef0f3; }
#sg3 .rig-steps-table thead th { color: #13263d; font-weight: 600; }
#sg3 .rig-steps-table tbody th { font-weight: 600; border-left: 4px solid transparent; white-space: nowrap; }
#sg3 .rig-steps-table col.kn { width: 21%; } #sg3 .rig-steps-table col.c-forestay { width: 21%; }
#sg3 .rig-steps-table .step-green th { border-left-color: var(--mode-green); } #sg3 .rig-steps-table .step-green { background: #edf6f0; }
#sg3 .rig-steps-table .step-orange th { border-left-color: var(--mode-orange); } #sg3 .rig-steps-table .step-orange { background: #fff5df; }
#sg3 .rig-steps-table .step-red th { border-left-color: var(--bad); } #sg3 .rig-steps-table .step-red { background: #fceeee; }
@media (max-width: 760px) { #sg3 .rig-steps { padding: 12px 12px; } #sg3 .rig-steps summary { min-height: 44px; } #sg3 .rig-steps-table { font-size: var(--fs-m); } #sg3 .rig-steps-table th, #sg3 .rig-steps-table td { padding: 7px 2px; } }
#sg3 .dock-steps { padding: 18px 22px; border: 1px solid #e5e5ea; border-radius: var(--r-s); background: white; margin: 22px 0; }
#sg3 .dock-steps h2 { margin: 0 0 6px; font-size: var(--fs-l, 20px); }
#sg3 .dock-steps p { color: #6e6e73; font-size: var(--fs-ml); margin: 0 0 8px; }
#sg3 .dock-steps ol { margin: 0; padding-left: 22px; font-size: var(--fs-ml); line-height: 1.45; }
#sg3 .dock-steps li + li { margin-top: 6px; }
#sg3 .measurement-guide { padding: 18px 22px; border: 1px solid #e5e5ea; border-radius: var(--r-s); background: white; margin: 22px 0; }
#sg3 .measurement-guide summary { font-size: var(--fs-ml); min-height: 40px; align-content: center; }
#sg3 .measurement-guide p { color: #6e6e73; font-size: var(--fs-ml); }
#sg3 .measurement-row { border-top: 1px solid #e5e5ea; padding: 10px 0; }
#sg3 .measurement-row h3 { font-size: var(--fs-m); margin: 6px 0; }
#sg3 .sources { margin-top: 25px; }
@media(max-width:760px) {
  #sg3 .intro { padding: 20px 0 15px; }
  #sg3 .intro h1 { font-size: 27px; margin: 6px 0; }
  #sg3 .intro p { font-size: var(--fs-m); }
  #sg3 .intro .eyebrow { font-size: var(--fs-xs); }
  #sg3 .stages button { min-height: 44px; }
  #sg3 .modes button { min-height: 54px; }
  #sg3 .sailing-layout { display: block; border-radius: var(--r-m); }
  #sg3 .sailing-boat .drawing-head { padding: 16px 18px 0; }
  #sg3 .sailing-boat .drawing-head h2 { font-size: 21px; margin: 5px 0 0; }
  #sg3 .sailing-boat .drawing-head .eyebrow { font-size: var(--fs-xs); }
  #sg3 #boat { height: clamp(245px,36svh,320px); padding: 4px 8px 12px; }
  #sg3 .sailing-focus>.eyebrow { font-size: var(--fs-xs); }
  #sg3 .sailing-focus>h2 { font-size: 22px; margin: 6px 0 14px; }
  #sg3 .priority { padding: 15px 0; gap: 12px; }
  #sg3 .priority>span { width: 27px; height: 27px; font-size: var(--fs-sm); }
  #sg3 .priority h3 { margin: 2px 0 5px; }
  #sg3 .priority p { line-height: 1.5; max-width: none; }
  #sg3 .setup-table { font-size: var(--fs-m); }
  #sg3 .setup-table td strong { font-weight: 600; }
  #sg3 .setup-table td small, #sg3 .setup-table th small { line-height: 1.4; }
  #sg3 .table-note { font-size: var(--fs-s); }
  #sg3 .measurement-guide, #sg3 .dock-steps { padding: 12px 16px; }
  #sg3 .measurement-guide summary { min-height: 44px; }
}
@media(min-width:1500px) {
  #sg3 #boat { height: 550px; }
}
@media print {
  #sg3 .sailing-layout { display: grid; grid-template-columns: 1fr 1fr; }
  #sg3 .sailing-focus { color: #13263d; background: white; }
  #sg3 .sailing-focus p { color: #333; }
  #sg3 .priority { padding: 12px 0; }
  #sg3 .priority h3 { font-size: var(--fs-xl); }
  #sg3 .priority p { font-size: var(--fs-sm); }
  #sg3 #boat { height: 400px; }
  #sg3 .measurement-guide { display: none; }
}
#sg3 .rake-reference { scroll-margin-top: 20px; }
#sg3 .rake-reference>p { font-size: var(--fs-ml); line-height: 1.5; color: #6e6e73; }
#sg3 .rake-table { width: 100%; border-collapse: collapse; text-align: left; }
#sg3 .rake-table th { background: var(--panel-2); padding: 12px 10px; color: #13263d; }
#sg3 .rake-table small { display: block; }
#sg3 .rake-table a { color: #13263d; text-underline-offset: 3px; }
@media(max-width:480px) {
  #sg3 .rake-table { font-size: var(--fs-m); }
  #sg3 .rake-table td, #sg3 .rake-table th { padding: 10px 7px; }
}
#sg3 .rake-info-cell { position: relative; }
#sg3 .info-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
#sg3 .info-button:focus-visible, #sg3 #rake-close:focus-visible { outline: 2px solid #13263d; outline-offset: 2px; }
#sg3 .rake-dialog {
  border: 0;
  border-radius: 18px;
  width: calc(100% - 28px);
  overflow: auto;
  color: var(--fg);
  background: #fff;
  box-shadow: 0 20px 80px #13263d33;
}
#sg3 .rake-dialog::backdrop { background: rgba(19,38,61,.5); }
#sg3 .dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
#sg3 .dialog-heading h2 { font-size: 23px; margin: 6px 0 16px; }
#sg3 .dlg-nav { display: flex; justify-content: space-between; gap: 8px; margin: -8px 0 12px; }   /* v1286: Back / Next between settings (Al) */
#sg3 .dlg-nav:empty { display: none; }
#sg3 .dlg-step { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--gain, #e4572e); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }   /* v1287: arrows in orange circles (Al) */
#sg3 .dlg-step:hover { filter: brightness(1.08); }
#sg3 .dlg-step:focus-visible { outline: 2px solid #13263d; outline-offset: 2px; }
#sg3 #setting-reference[open] { margin-top: 6vh; margin-bottom: auto; max-height: 88vh; }   /* v1287: the same top for every setting, so Back / Next don't make it jump (Al) */
#sg3 .dialog-heading > div:first-child { flex: 1; min-width: 0; }
#sg3 #rake-close {
  flex-shrink: 0;
  border: 0;
  border-radius: 50%;
  background: var(--panel-2);
  color: #13263d;
  cursor: pointer;
}
#sg3 .rake-dialog>p { color: #6e6e73; }
@media(max-width:480px) {
  #sg3 .rake-dialog { padding: 16px; }
  #sg3 .dialog-heading h2 { font-size: var(--fs-xxl); }
  #sg3 .rake-info-cell { padding-right: 27px!important; }
  #sg3 .info-button { right: 0; width: 26px; }
}

/* Quiet typography and compact source comparison. */
#sg3 .setup-table, #sg3 .rake-table { font-family: var(--body); font-variant-numeric: tabular-nums; letter-spacing: 0; }
#sg3 .setup-table-wrap { border-color: #e2e7ec; }
#sg3 .setup-table th, #sg3 .setup-table td { overflow-wrap: normal; border-bottom-color: var(--water); }
#sg3 .setup-table td small, #sg3 .setup-table th small { letter-spacing: 0; }
#sg3 .setup-table .rake-info-cell strong, #sg3 .setup-table .value-row:first-of-type td strong { font-variant-numeric: tabular-nums; }
#sg3 .rake-info-cell { padding-right: 38px!important; }
#sg3 .info-button {
  right: 5px;
  width: 28px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: var(--fs-sm);
  color: #8b97a3;
}
#sg3 .info-button span {
  width: 14px;
  height: 14px;
  border: 1px solid #a7b1bb;
  border-radius: 50%;
  font-family: Georgia,serif;
  font-size: var(--fs-s);
  font-style: italic;
  line-height: 12px;
  text-align: center;
}
#sg3 .info-button:hover span { border-color: #13263d; color: #13263d; background: var(--panel-2); }
#sg3 .rake-dialog { max-width: 760px; padding: 28px; }
#sg3 .rake-dialog .dialog-heading h2 { font-family: var(--display); font-weight: 600; letter-spacing: -.7px; }
#sg3 .rake-table-wrap { border: 1px solid #e5e9ed; border-radius: var(--r-m); overflow: hidden; margin: 22px 0; }
#sg3 .rake-table { table-layout: fixed; font-size: var(--fs-ml); }
#sg3 .rake-table thead th {
  background: var(--bg);
  color: #7a8797;
  font-size: var(--fs-s);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .7px;
}
#sg3 .rake-table tbody th, #sg3 .rake-table td { background: white; border-bottom: 1px solid var(--water); vertical-align: top; text-align: left; font-weight: 400; }
#sg3 .rake-table tbody tr:last-child>* { border-bottom: 0; }
#sg3 .rake-table tbody th a { font-weight: 500; color: #263b51; text-decoration: none; display: block; }
#sg3 .rake-table tbody th a:hover { text-decoration: underline; }
#sg3 .rake-table strong { font-weight: 500; letter-spacing: -.2px; white-space: nowrap; color: #13263d; }
#sg3 .rake-table small { font-size: var(--fs-s); color: #8a95a1; }
#sg3 .rake-table .reading-context { display: block; font-size: var(--fs-s); color: #697788; white-space: normal; }
#sg3 .empty-reading { color: #bdc5cd; }
#sg3 .rake-table td:nth-child(2) { white-space: normal; }
@media(max-width:760px) {
  #sg3 .rake-info-cell { padding-right: 24px!important; }
  #sg3 .info-button { right: 0; width: 23px; }
  #sg3 .info-button span { width: 12px; height: 12px; font-size: var(--fs-xs); line-height: 10px; }
  #sg3 .rake-dialog { padding: 18px 14px; }
  #sg3 .rake-table { font-size: var(--fs-sm); }
  #sg3 .rake-table thead th { font-size: var(--fs-xs); letter-spacing: .3px; }
  #sg3 .rake-table small, #sg3 .rake-table .reading-context { font-size: var(--fs-xs); }
  #sg3 .rake-table-wrap { margin: 18px 0; }
  #sg3 .rake-dialog>p { font-size: var(--fs-m); }
}
#sg3 .dialog-close {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--panel-2);
  color: #13263d;
  font-size: 28px;
  cursor: pointer;
}
#sg3 .dialog-close:focus-visible { outline: 2px solid #13263d; outline-offset: 2px; }
#sg3 .setting-source-table strong { white-space: normal; font-size: var(--fs-ml); display: block; }
#sg3 .source-reading+.source-reading { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--water); }
#sg3 .setting-source-table .reading-context { font-size: var(--fs-sm); }
#sg3 .setting-source-table td:nth-child(2) { white-space: normal; }
@media(max-width:760px) {
  #sg3 .setting-source-table strong { font-size: var(--fs-m); }
  #sg3 .setting-source-table .reading-context { font-size: var(--fs-s); }
}

/* Setup: strong values, quiet labels, and an aligned three-mode grid. */
#sg3 .setup-table-wrap { border: 1px solid #dce3eb; border-radius: var(--r-l); overflow: hidden; background: #fff; box-shadow: 0 8px 30px rgba(19,38,61,.035); }
#sg3 .setup-table { border-collapse: separate; border-spacing: 0; font-family: var(--body); }
#sg3 .setup-table th, #sg3 .setup-table td { padding: 22px 16px; border: 0; border-bottom: 1px solid #e3e9ef; vertical-align: middle; }
#sg3 .setup-table thead th {
  text-align: center;
  font-size: var(--fs-xl);
  font-weight: 700;
  letter-spacing: -.25px;
  padding: 22px 12px;
  border-bottom: 1px solid #dce3eb;
}
#sg3 .setup-table thead th:first-child { text-align: left; padding-left: 24px; color: #617084; font-size: var(--fs-ml); font-weight: 500; }
#sg3 .setup-table thead th:not(:first-child) { border-left: 1px solid #e1e7ee; }
#sg3 .setup-table thead small { font-size: var(--fs-sm); font-weight: 500; margin-top: 5px; letter-spacing: 0; }
#sg3 .setup-table .value-row th {
  text-align: left;
  background: #fff;
  font-size: var(--fs-ml);
  font-weight: 500;
  line-height: 1.45;
  color: #526277;
  padding-left: 24px;
}
#sg3 .setup-table .value-row td { text-align: center; border-left: 1px solid #e1e7ee; position: relative; }
#sg3 .setup-table td strong {
  font-family: var(--display);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.55px;
  color: #13263d;
  font-variant-numeric: tabular-nums;
}
#sg3 .setup-table td small {
  font-family: var(--body);
  font-size: var(--fs-sm);
  font-weight: 400;
  letter-spacing: .1px;
  color: #8591a0;
  line-height: 1.4;
  margin-top: 7px;
}
#sg3 .setup-table th small { font-size: var(--fs-s); font-weight: 400; color: #8994a1; line-height: 1.5; margin-top: 6px; }
#sg3 .setup-table .column-0 { background: var(--bg); }
#sg3 .setup-table .column-1 { background: #fffaf0; }
#sg3 .setup-table .column-2 { background: #fff6f5; }
#sg3 .setup-table .common-setting { background: var(--panel); }
#sg3 .setup-table .common-setting>small { text-transform: uppercase; font-size: var(--fs-xs); letter-spacing: 1.2px; margin-top: 7px; color: #8b97a4; }
#sg3 .setup-table .group-row th {
  background: var(--panel-2);
  color: #66788e;
  font-size: var(--fs-s);
  font-weight: 600;
  letter-spacing: 1.5px;
  text-align: left;
  padding: 11px 24px;
  border-bottom: 1px solid #dce3eb;
}
#sg3 .setup-table tbody:last-child tr:last-child>* { border-bottom: 0; }
#sg3 .setup-table .rake-info-cell { padding-left: 16px!important; padding-right: 16px!important; }
#sg3 .setup-table .info-button { right: 3px; top: 7px; transform: none; width: 25px; height: 25px; }
#sg3 .setup-table .info-button span {
  width: 13px;
  height: 13px;
  font-size: var(--fs-xs);
  line-height: 11px;
  color: #8a97a5;
  border-color: #b8c2cc;
  background: rgba(255,255,255,.55);
}
#sg3 .setup-table sup { font-size: var(--fs-s); font-weight: 400; vertical-align: super; margin-left: 2px; }
@media(max-width:760px) {
  #sg3 .setup-table-wrap { border-radius: var(--r-m); }
  #sg3 .setup-table th, #sg3 .setup-table td { padding: 20px 7px; }
  #sg3 .setup-table thead th { font-size: var(--fs-m); padding: 18px 6px; letter-spacing: -.25px; }
  #sg3 .setup-table thead th:first-child { padding-left: 12px; font-size: var(--fs-sm); }
  #sg3 .setup-table thead small { font-size: var(--fs-xs); margin-top: 5px; }
  #sg3 .setup-table .value-row th { font-size: var(--fs-sm); padding-left: 12px; line-height: 1.4; }
  #sg3 .setup-table td strong { font-size: var(--fs-l); line-height: 1.35; letter-spacing: -.45px; overflow-wrap: normal; }
  #sg3 .setup-table td small { font-size: var(--fs-xs); margin-top: 6px; letter-spacing: 0; }
  #sg3 .setup-table th small { font-size: var(--fs-xs); line-height: 1.4; margin-top: 6px; }
  #sg3 .setup-table .group-row th { font-size: var(--fs-xs); letter-spacing: 1.1px; padding: 10px 12px; }
  #sg3 .setup-table .common-setting>small { font-size: var(--fs-xxs); letter-spacing: 1px; }
  #sg3 .setup-table .rake-info-cell { padding: 23px 7px 20px!important; }
  #sg3 .setup-table .info-button { right: 0; top: 0; width: 24px; height: 24px; }
  #sg3 .setup-table .info-button span { width: 11px; height: 11px; font-size: var(--fs-xxs); line-height: 9px; }
  #sg3 .setup-table sup { font-size: var(--fs-xxs); margin-left: 1px; }
}
@media(max-width:370px) {
  #sg3 .setup-table td strong { font-size: var(--fs-ml); }
  #sg3 .setup-table .value-row th { font-size: var(--fs-s); padding-left: 9px; }
  #sg3 .setup-table th, #sg3 .setup-table td { padding-left: 5px; padding-right: 5px; }
}
@media print {
  #sg3 .setup-table td strong { font-size: var(--fs-m); }
  #sg3 .setup-table th, #sg3 .setup-table td { padding: 12px 8px; }
  #sg3 .setup-table .info-button { display: none; }
}
#sg3 .setup-table .value-row { cursor: pointer; touch-action: manipulation; }
#sg3 .setup-table .value-row:hover>th, #sg3 .setup-table .value-row:hover>td { box-shadow: inset 0 0 0 999px rgba(19,38,61,.025); }
#sg3 .setup-table .value-row:focus-visible { outline: 2px solid #13263d; outline-offset: -2px; }
#sg3 .setup-table .value-row:focus-visible>th, #sg3 .setup-table .value-row:focus-visible>td { background: var(--panel-2); }
#sg3 .sailing-focus { padding-top: 28px; padding-bottom: 28px; }
#sg3 .priority { padding-top: 17px; padding-bottom: 17px; }
#sg3 .priority h3 { font-size: var(--fs-xxl); }
#sg3 .priority p { font-size: var(--fs-ml); line-height: 1.5; }
@media(max-width:760px) {
  #sg3 .priority { padding-top: 14px; padding-bottom: 14px; }
  #sg3 .priority h3 { font-size: var(--fs-xl); }
  #sg3 .priority p { font-size: var(--fs-m); }
  #sg3 .sailing-focus { padding: 20px 18px; }
}

/* ---------- inside the BowDown app ---------- */
#sg3 { margin: 0 -2px; border-radius: 0; }
#sg3 .sg3-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* v242: inside the app the sailor is already in this class's fleet, so the class header shows only on the printed sheet;
   "All guides" sits at the right end of the Setup / Go sailing tabs */
#sg3 .sg3-printhead { display: none; }
#sg3 .stages { align-items: center; }
@media print {
  #sg3 .sg3-printhead { display: block; padding: 0 0 12px; }
}

/* printing the guide: only the guide (the app menu, tabs and the old table stay off the page) */

/* v244: source dialogs keep the title and the table's column header pinned while the rows scroll. */
#sg3 .rake-dialog { padding-top: 0; --dlg-head: 0px; }
#sg3 .rake-dialog .dialog-heading {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #fff;
  margin: 0 -28px;
  padding: 28px 28px 0;
}
#sg3 .rake-dialog .dialog-heading h2 { margin-bottom: 12px; }
#sg3 .rake-dialog .rake-table-wrap { overflow: clip; }
#sg3 .rake-dialog .rake-table thead th { position: sticky; top: var(--dlg-head); z-index: 2; box-shadow: inset 0 -1px 0 #e5e9ed; }
@media(max-width:760px) {
  #sg3 .rake-dialog .dialog-heading { margin: 0 -14px; padding: 18px 14px 0; }
}

/* Go sailing: numbered dots in the mode colour (v247; red in v246) on the parts that change, listed beside the boat  */
#sg3 #boat .pin { cursor: pointer; outline: none; }
#sg3 #boat .pin .pin-hit { fill: transparent; stroke: none; pointer-events: all; }
#sg3 #boat .pin .pin-dot { fill: var(--mode,var(--bad)); stroke: #fff; stroke-width: 2; }
#sg3 #boat .pin text { fill: var(--mode-ink,#fff); font: 700 12px Inter,sans-serif; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
#sg3 #boat .pin .pin-ring { fill: none; stroke: var(--mode,var(--bad)); stroke-width: 2; opacity: 0; }
#sg3 #boat .pin.active .pin-dot { fill: var(--mode,var(--bad)); }
#sg3 #boat .pin.active .pin-ring, #sg3 #boat .pin:focus-visible .pin-ring { opacity: .45; animation: sg3pulse 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
#sg3 #boat .pin.active text { fill: var(--mode-ink,#fff); }
@keyframes sg3pulse{0%,100%{transform:scale(.9);opacity:.45}50%{transform:scale(1.3);opacity:.12}}
#sg3 .sailing-focus { justify-content: flex-start; }
#sg3 .changes-hint { font-size: var(--fs-m); color: #aebed0; margin: -12px 0 14px; }
#sg3 .changes { list-style: none; margin: 0; padding: 0; }
#sg3 .changes li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 10px;
  border-top: 1px solid #33465d;
  cursor: pointer;
  border-radius: var(--r-s);
  transition: background .15s;
}
#sg3 .changes li:hover { background: #1b3150; }
#sg3 .changes li.on { background: #22395a; box-shadow: inset 3px 0 0 var(--mode,var(--bad)); }
#sg3 .changes li:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
#sg3 .changes .change-n {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--mode,var(--bad));
  color: var(--mode-ink,#fff);
  display: grid;
  place-items: center;
  font: 700 14px/1 Inter,sans-serif;
}
#sg3 .changes li>div { flex: 1; min-width: 0; }
#sg3 .changes h3 { font: 600 14px/1.3 Inter,sans-serif; letter-spacing: .4px; text-transform: uppercase; color: #aebed0; margin: 3px 0 4px; }
#sg3 .changes strong { display: block; font: 600 18px/1.3 var(--display); color: #fff; letter-spacing: -.3px; }
#sg3 .changes p { font-size: var(--fs-ml); line-height: 1.5; color: #c3cfdb; margin: 6px 0 0; }
@media(max-width:760px) {
  #sg3 .changes li { padding: 12px 6px; }
  #sg3 .changes strong { font-size: var(--fs-l); }
}
@media(prefers-reduced-motion:reduce) {
  #sg3 #boat .pin.active .pin-ring { animation: none; opacity: .45; }
}
@media(min-width:761px) {
  #sg3 .sailing-boat { position: sticky; top: calc(var(--side-h,0px) + var(--subnav-h,0px)); align-self: start; }
}

/* Go sailing, compact (v250): Light / Medium / Heavy as a wind picker above the card (v252),
   boat and change list share one screen-high card, the list scrolls inside it, the open line says how the change works. */
#sg3 #sail { --sail-h: clamp(440px,calc(100svh - 300px),720px); }
#sg3 #sail .sailing-layout { grid-template-columns: minmax(0,1.15fr) minmax(320px,.85fr); height: var(--sail-h); margin: 16px 0 14px; }
#sg3 #sail .sailing-boat {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  top: auto;
  align-self: stretch;
}
#sg3 #sail .sailing-boat .drawing-head { padding: 16px 22px 0; }
#sg3 #sail .sailing-boat .drawing-head h2 { font-size: 21px; margin: 4px 0 2px; }
#sg3 .mode-how { font-size: var(--fs-ml); line-height: 1.45; color: #3b4b5e; margin: 2px 0 0; max-width: 560px; }
#sg3 .boat-stage { position: relative; flex: 1; min-height: 0; touch-action: pan-y; }
#sg3 #sail #boat {
  position: absolute;
  inset: 0;
  height: auto;
  min-height: 0;
  padding: 6px 12px;
  box-sizing: border-box;
}
#sg3 #sail #boat svg { display: block; width: 100%; height: 100%; overflow: visible; }
#sg3 #sail .sailing-focus { padding: 18px 18px 12px; justify-content: flex-start; min-height: 0; }
#sg3 #sail .sailing-focus>h2 { font-size: 21px; margin: 4px 0 6px; }
#sg3 #sail .changes-hint { margin: 0 0 8px; font-size: var(--fs-m); }
#sg3 #sail .changes {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #3d5470 transparent;
  margin: 0 -6px;
  padding: 0 6px;
  position: relative;
}
#sg3 #sail .changes li { padding: 9px 8px; gap: 11px; }
#sg3 #sail .changes .change-n { width: 24px; height: 24px; font-size: var(--fs-sm); }
#sg3 .change-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
#sg3 #sail .changes h3 { margin: 3px 0 0; font-size: var(--fs-sm); }
#sg3 #sail .changes strong { font-size: var(--fs-ml); text-align: right; }
#sg3 .change-more { display: none; }
#sg3 .changes li.on .change-more { display: block; }
#sg3 #sail .changes .change-why { color: var(--water); font-size: var(--fs-ml); line-height: 1.5; margin: 7px 0 0; }
#sg3 .change-why b {
  display: block;
  font: 600 12px/1.2 Inter,sans-serif;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: #aebed0;
  margin-bottom: 3px;
}
#sg3 #sail #priorities {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
#sg3 #priorities button {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px 6px 6px;
  border-radius: var(--r-pill);
  border: 1px solid #e1e5ea;
  font: 600 14.5px/1.2 Inter,sans-serif;
  color: #13263d;
  background: #fff;
  min-height: 32px;
}
#sg3 #priorities button span {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: var(--fs-sm);
  border: 1px solid #c9d3de;
  color: #32465b;
}
#sg3 #priorities button[aria-pressed=true] { border-color: var(--mode); box-shadow: 0 0 0 1px var(--mode); }
#sg3 #priorities button[aria-pressed=true] span { background: var(--mode); color: var(--mode-ink); border-color: var(--mode); }
#sg3 #priorities button:focus-visible { outline: 2px solid #13263d; outline-offset: 2px; }
@media(max-width:760px) {
  #sg3 #sail .sailing-layout { display: block; height: auto; margin-top: 12px; }
  #sg3 #sail .sailing-boat .drawing-head { padding: 12px 14px 0; }
  #sg3 #sail .sailing-boat .drawing-head h2 { font-size: var(--fs-xl); }
  #sg3 .mode-how { font-size: var(--fs-m); }
  #sg3 #sail .boat-stage { flex: none; }
  #sg3 #sail .sailing-focus { padding: 14px 12px 10px; }
  #sg3 #sail .sailing-focus>h2 { font-size: var(--fs-xl); }
  #sg3 #sail #priorities { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  #sg3 #priorities button { white-space: nowrap; }
}
@media print {
  #sg3 .windpick { position: static; }
  #sg3 #sail .sailing-layout { height: auto; }
  #sg3 #sail .changes { overflow: visible; max-height: none; }
  #sg3 .change-more { display: block; }
}

/* Speed pack (v251): placeholder tab until the sticker packs are ready */
#sg3 .pack-card {
  max-width: 620px;
  margin: 28px 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: var(--panel,#fff);
}
#sg3 .pack-card h2 { margin: 6px 0 12px; }
#sg3 .pack-card p { line-height: 1.5; margin: 0 0 10px; }
#sg3 .pack-contact a { color: var(--gain); font-weight: 600; }
@media (max-width:600px) {
  #sg3 .pack-card { margin: 18px 0; padding: 20px; }
}

/* v494: Speed pack with the pack itself (Sharpie first) */
#sg3 .pack-v2 { max-width: 1080px; margin: 0 0 40px; }
#sg3 .pack-head { max-width: 680px; margin-top: 40px; }
#sg3 .pack-head h2 { margin: 6px 0 10px; font-size: clamp(26px,3.4vw,38px); line-height: 1.1; }
#sg3 .pack-head p { line-height: 1.55; margin: 0; color: var(--muted); }
#sg3 .pack-head .eyebrow { color: var(--gain); margin: 0; }
#sg3 .pack-fig figcaption {
  display: none;
  font-size: var(--fs-s);
  color: var(--muted);
  text-align: center;
  padding: 6px 0 8px;
  background: var(--panel,#fff);
}
@media (max-width:760px) {
  #sg3 .pack-fig figcaption { display: block; }
}
#sg3 .pack-fig { margin: 22px 0 0; border-radius: var(--r-l); overflow: hidden; border: 1px solid var(--line); background: #fff; }
#sg3 .pack-fig img { display: block; width: 100%; height: auto; }
#sg3 .pack-v2 h3 { margin: 30px 0 12px; font-size: var(--fs-xxl); }
#sg3 .pack-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
  gap: 12px;
}
#sg3 .pack-steps li {
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  padding: 14px 16px;
  background: var(--panel,#fff);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
#sg3 .pack-steps b { display: flex; align-items: center; gap: 8px; font-size: var(--fs-l); }
#sg3 .pack-steps span { line-height: 1.45; color: var(--muted); }
#sg3 .pack-n {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #13263d;
  color: #fff !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-sm);
  flex: none;
}
#sg3 .pack-get { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 28px; align-items: start; margin-top: 8px; }
#sg3 .pack-sheet { box-shadow: 0 10px 30px rgba(19,38,61,.14); }
/* v512: the sheets one under another at full width, each with its title above */
#sg3 .pack-sheets { display: grid; gap: 28px; }
#sg3 .pack-sheets .pack-fig { margin: 0; }
#sg3 #pack .pack-sheet-title { display: block; position: static; padding: 12px 16px; background: var(--navy, #13263d); color: #fff; font-weight: 700; font-size: var(--fs-l); text-align: left; }
#sg3 .pack-get-solo { grid-template-columns: minmax(0, 680px); margin-top: 30px; }
#sg3 .pack-list { margin: 0 0 20px; padding-left: 20px; line-height: 1.5; }
#sg3 .pack-list li { margin: 0 0 6px; }
#sg3 .pack-buy {
  display: inline-block;
  background: var(--gain);
  color: #fff !important;
  font-weight: 700;
  text-decoration: none;
  padding: 13px 22px;
  border-radius: var(--r-pill);
  margin: 0 0 12px;
}
#sg3 .pack-buy:hover { background: #c9461f; }
@media (max-width:760px) {
  #sg3 .pack-get { grid-template-columns: 1fr; }
  #sg3 .pack-v2 { margin: 0 0 28px; }
}

/* Wind picker (v252): three buttons across the top of the sail card, each as wide as its wind band. Unpicked ones are
   outlined in the mode colour, the picked one is filled with a tick, so it reads as a choice and not as a chart. */
#sg3 .windpick {
  position: sticky;
  top: calc(var(--side-h,0px) + var(--subnav-h,0px));
  z-index: 4;
  background: #fff;
  border: 1px solid #e5e5ea;
  border-radius: var(--r-l);
  padding: 10px 14px 12px;
  margin: 16px 0 0;
}
#sg3 .wp-q { font: 600 15.5px/1.3 Inter,sans-serif; color: #13263d; margin: 0 0 7px; }
#sg3 .wp-row { display: flex; gap: 6px; }
#sg3 .wp-b {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  padding: 7px 11px;
  min-height: 46px;
  border-radius: var(--r-s);
  border: 1.5px solid var(--c);
  background: #fff;
  color: var(--ct);
  transition: background .15s,color .15s,transform .1s;
}
#sg3 .wp-b b { font: 700 14px/1.2 var(--display); white-space: nowrap; }
#sg3 .wp-b small { font: 500 13.5px/1.2 Inter,sans-serif; white-space: nowrap; opacity: .9; }
#sg3 .wp-b[aria-pressed=true] { background: var(--c); color: var(--fill-ink); }
#sg3 .wp-b[aria-pressed=true] b::before { content: "\2713\00a0"; }
#sg3 .wp-b[aria-pressed=false]:hover { background: var(--hover); }
#sg3 .wp-b:active { transform: scale(.98); }
#sg3 .wp-b:focus-visible { outline: 2px solid #13263d; outline-offset: 2px; }
#sg3 .wp-green { --c: var(--mode-green); --ct: var(--mode-green); --fill-ink: #fff; --hover: rgba(27,127,69,.08); }
#sg3 .wp-orange { --c: var(--mode-orange); --ct: #8a5a00; --fill-ink: #13263d; --hover: rgba(242,162,12,.12); }
#sg3 .wp-red { --c: var(--bad); --ct: var(--bad); --fill-ink: #fff; --hover: rgba(198,40,40,.08); }
#sg3 #sail .windpick+.sailing-layout { margin-top: 10px; }
@media(max-width:760px) {
  #sg3 .windpick { margin-top: 12px; border-radius: var(--r-m); box-shadow: 0 8px 12px -12px #13263d66; }
  #sg3 .wp-row { gap: 4px; }
  #sg3 .wp-b b { font-size: var(--fs-ml); }
  #sg3 .wp-b small { font-size: var(--fs-sm); }
}

/* Why it works (v252): each change is its name and how it works, no values (those are on Setup), and a link to the References */
#sg3 #sail .changes .change-why { margin-top: 6px; }

/* Marked control line (v252): a cam cleat on the left of the drawing; the line slides (like the rope easing in the
   mode-assets animation) so the picked mode's mark sits at the cleat. Rope layer is 2160 tall in a 1600 view. */
#sg3 .cleatline {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  height: min(290px,52svh);
  aspect-ratio: 210/800;
  overflow: hidden;
  z-index: 1;
  -webkit-mask-image: linear-gradient(transparent,#000 14%,#000 86%,transparent);
  mask-image: linear-gradient(transparent,#000 14%,#000 86%,transparent);
  pointer-events: none;
}
#sg3 .cleatline img { position: absolute; left: 0; top: 0; width: 100%; user-select: none; }
#sg3 .cleatline .rope-bg { height: 100%; }
#sg3 .cleatline .rope-line { height: 135%; transform: translateY(calc(var(--rope-y,0) / 2160 * -100%)); transition: transform 1.2s cubic-bezier(.45,0,.25,1); will-change: transform; }
#sg3 #sail #boat { padding-left: 112px; }
@media(max-width:760px) {
  #sg3 .cleatline { left: 8px; height: 200px; }
  #sg3 #sail #boat { padding-left: 66px; }
}
@media(prefers-reduced-motion:reduce) {
  #sg3 .cleatline .rope-line { transition: none; }
}

/* v254: the line slides only as the breeze builds; going back down (heavy > medium > light) it jumps */
#sg3 .cleatline.jump .rope-line { transition: none; }
#sg3 #pins { transition: opacity .25s; }
#sg3 #pins.waiting { opacity: 0; transition: none; }

/* Phone pass (v252): the drawing's white plate no longer spills over the dark list, the list is the page (no scroll box
   inside it), rows are big readable tap targets with an open/close chevron, and the pinned wind picker is compact. */
#sg3 #boat svg>rect { fill: transparent; }
#sg3 .changes .change-row { position: relative; padding-right: 22px; }
#sg3 .changes .change-row::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid #8fa3b8;
  border-bottom: 2px solid #8fa3b8;
  transform: translateY(-70%) rotate(45deg);
  transition: transform .2s;
}
#sg3 .changes li.on .change-row::after { transform: translateY(-30%) rotate(-135deg); border-color: #fff; }
@media(max-width:760px) {
  #sg3 #sail .boat-stage { height: clamp(240px,40svh,330px); overflow: hidden; margin-bottom: 10px; }
  #sg3 #sail #boat { padding: 4px 8px 16px 66px; }
  #sg3 #sail .changes { max-height: none; overflow: visible; margin: 0; padding: 0; }
  #sg3 #sail .changes li { padding: 0 10px; min-height: 54px; align-items: center; gap: 12px; }
  #sg3 #sail .changes li.on { align-items: flex-start; padding: 14px 10px; }
  #sg3 #sail .changes .change-n { width: 28px; height: 28px; font-size: var(--fs-ml); }
  #sg3 #sail .changes h3 { font: 600 15.5px/1.3 Inter,sans-serif; letter-spacing: 0; text-transform: none; color: #fff; margin: 0; }
  #sg3 #sail .changes li.on h3 { margin-top: 4px; }
  #sg3 #sail .changes .change-why { font-size: var(--fs-ml); line-height: 1.55; color: var(--panel-2); margin-top: 8px; }
  #sg3 #sail .changes-hint { font-size: var(--fs-ml); }
  #sg3 .windpick { padding: 6px 8px 8px; }
  #sg3 .wp-q { font-size: var(--fs-ml); margin-bottom: 5px; }
  #sg3 .wp-b { min-height: 40px; padding: 4px 8px; }
}
@media(hover:none) {
  #sg3 .changes li:not(.on):hover { background: transparent; }
}

/* v257: compact source dialogs, so the whole table nearly always fits without scrolling.
   Tighter rows and header, value and millimetres share a line on wider screens, taller dialog. */
#sg3 .rake-dialog { max-height: 92dvh; padding-bottom: 16px; }
#sg3 .rake-dialog .dialog-heading { padding-top: 18px; }
#sg3 .rake-dialog .dialog-heading h2 { font-size: var(--fs-xxl); margin: 2px 0 6px; }
#sg3 .rake-dialog .dialog-close, #sg3 #rake-close { width: 36px; height: 36px; font-size: 24px; display: grid; place-items: center; padding: 0; }
#sg3 .rake-dialog .dialog-close:focus:not(:focus-visible), #sg3 #rake-close:focus:not(:focus-visible) { outline: none; }
#sg3 .rake-dialog>p { font-size: var(--fs-ml); line-height: 1.4; margin: 0 0 8px; }
#sg3 .rake-dialog .table-note { font-size: var(--fs-sm); line-height: 1.4; margin: 8px 0 0; }
#sg3 .rake-dialog .rake-table-wrap { margin: 8px 0; }
#sg3 .rake-table thead th { padding: 8px 12px; }
#sg3 .rake-table tbody th, #sg3 .rake-table td { padding: 8px 12px; }
#sg3 .rake-table strong { font-size: var(--fs-m); }
#sg3 .rake-table small { margin-top: 1px; }
#sg3 .rake-table .reading-context { margin-top: 2px; line-height: 1.3; }
#sg3 .rake-table tbody th a { line-height: 1.3; }
@media(min-width:761px) {
  #sg3 .rake-table td>strong { display: inline; }
  #sg3 .rake-table td>strong+small { display: inline; margin-left: 6px; }
}
#sg3 .setting-source-table strong { line-height: 1.35; }
#sg3 .setting-source-table .reading-context { margin-top: 2px; }
@media(max-width:760px) {
  #sg3 .rake-dialog .dialog-heading { padding-top: 12px; }
  #sg3 .rake-dialog .dialog-heading h2 { font-size: var(--fs-xl); }
  #sg3 .rake-table thead th { padding: 7px 6px; }
  #sg3 .rake-table tbody th, #sg3 .rake-table td { padding: 7px 6px; }
  #sg3 .rake-table strong { font-size: var(--fs-m); }
}

/* Top tabs (v269): big, clear pills like the bottom tab bar */
#sg3 .stages {
  gap: 8px;
  border-bottom: 0;
  padding: 4px 0 12px;
  overflow-x: auto;
  scrollbar-width: none;
  justify-content: flex-start;
}
#sg3 .stages::-webkit-scrollbar { display: none; }
#sg3 .stages button {
  flex: none;
  border: 0;
  border-radius: var(--r-pill);
  padding: 10px 16px;
  min-height: 44px;
  font-size: var(--fs-l);
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  white-space: nowrap;
}
#sg3 .stages button[aria-pressed=true] { background: #fbe6df; color: var(--gain); }
#sg3 .stages b { display: none; }
@media (max-width: 760px) {
  #sg3 .stages button { font-size: var(--fs-l); padding: 10px 14px; }
}
#sg3 .stages { display: none; }

/* v269: the stage tabs are in #subnav */
/* v273: setting dialog source kind (champions listed first) */
#sg3 .setting-source-table .source-kind {
  display: inline-block;
  margin-top: 6px;
  padding: 1px 7px;
  border-radius: var(--r-pill);
  font-size: var(--fs-s);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  border: 1px solid #c9d3de;
  color: #4b5c6e;
  background: #fff;
}
#sg3 .setting-source-table .kind-champion { border-color: #13263d; background: #13263d; color: #fff; }
#sg3 .setting-source-table .kind-bowdown { border-color: #e4572e; background: #e4572e; color: #fff; }

/* v321: every sources table is Sailor / Light / Medium / Heavy; one tbody per source, its lines split by a hairline */
#sg3 .source-grid thead th small {
  display: block;
  margin-top: 2px;
  font-size: var(--fs-xs);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: #9aa5b1;
}
#sg3 .source-grid tbody.source-row>tr>* { border-bottom: 0; }
#sg3 .source-grid tbody.source-row+tbody.source-row>tr:first-child>* { border-top: 1px solid var(--water); }
#sg3 .source-grid tbody.source-row>tr+tr>td { border-top: 1px dashed var(--water); }
#sg3 .source-grid strong { white-space: normal; overflow-wrap: anywhere; }
#sg3 .source-grid td.all-winds { background: #fafbfc; }
#sg3 .source-grid .all-winds-tag {
  display: block;
  margin-top: 4px;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #9aa5b1;
}
@media(max-width:480px) {
  #sg3 .source-grid colgroup col:first-child { width: 25%!important; }
  #sg3 .source-grid .source-kind { font-size: var(--fs-xxs); padding: 0 5px; }
}

/* v280: every stage panel starts at the same height (first block's margin no longer pushes the panel down) */
#sg3 .stage-panel>:first-child { margin-top: 0; }

/* v280: drawing head sized to the longest mode's words, so the boat and cleat stay put */
#sg3 .drawing-head .head-stack { display: grid; flex: 1; min-width: 0; }
#sg3 .drawing-head .head-stack>* { grid-area: 1/1; }
#sg3 .drawing-head .head-sizer { visibility: hidden; pointer-events: none; }

/* v501: Tune reads easily on a phone: the whole class guide is one type step larger there (Al, 19 Oct) */
@media (max-width: 760px) {
  #sg3 { --fs-xxs: 12px; --fs-xs: 13px; --fs-s: 14px; --fs-sm: 15px; --fs-m: 16px; --fs-ml: 17px; --fs-l: 18px; --fs-xl: 20px; --fs-xxl: 22px; }
}

/* v513: the full-screen sheet viewer; the picture zooms inside it, the page never does */
html.pz-open { overflow: hidden; }
#sg3 .pack-zoom { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #0e1b2c; color: #fff; }
#sg3 .pack-zoom[open] { display: flex; flex-direction: column; }
#sg3 .pack-zoom::backdrop { background: #0e1b2c; }
#sg3 .pz-bar { display: flex; align-items: center; gap: 8px; padding: max(10px, env(safe-area-inset-top)) 12px 10px; flex: none; }
#sg3 .pz-name { flex: 1; min-width: 0; display: grid; }
#sg3 .pz-name b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#sg3 .pz-name small { font-size: 12px; color: rgba(255,255,255,.65); }
#sg3 .pz-bar button { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font: 700 22px/1 system-ui, sans-serif; cursor: pointer; }
#sg3 .pz-bar button:hover { background: rgba(255,255,255,.26); }
#sg3 .pz-scroll { flex: 1; min-height: 0; overflow: auto; touch-action: pan-x pan-y; overscroll-behavior: contain; background: #e9edf2; cursor: zoom-in; }
#sg3 .pack-zoom[data-zoomed="1"] .pz-scroll { cursor: grab; }
#sg3 .pz-scroll.drag { cursor: grabbing; }
#sg3 .pz-scroll img { display: block; max-width: none; height: auto; margin: 0 auto; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }

/* v692: Sources tab: every source the settings rest on, BowDown and champions first */
#sg3 .sources-card { max-width: 1240px; margin: 0 auto; padding: 24px 16px; }
#sg3 .sources-card > p { max-width: 860px; }
/* v750: champions and gurus | sailmakers, side by side on a PC, one under the other on a phone */
#sg3 .source-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 12px 24px; align-items: start; margin-top: 16px; }
#sg3 .source-col h3 { margin: 0 0 10px; font-size: var(--fs-s); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #4b5c6e; }
#sg3 .source-col .source-list { margin: 0; }
#sg3 .sources-card h2 { margin: 6px 0 12px; }
#sg3 .source-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; }
#sg3 .source-list li { border: 1px solid #d7dee6; border-radius: 12px; padding: 12px 14px; background: #fff; }
#sg3 .source-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#sg3 .source-head small { color: #4b5c6e; }
#sg3 .source-list .source-kind { display: inline-block; padding: 1px 7px; border-radius: var(--r-pill); font-size: var(--fs-s); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; border: 1px solid #c9d3de; color: #4b5c6e; background: #fff; }
#sg3 .source-list .kind-champion { border-color: #13263d; background: #13263d; color: #fff; }
#sg3 .source-list .kind-bowdown { border-color: #e4572e; background: #e4572e; color: #fff; }
#sg3 .source-cred, #sg3 .source-title { margin: 6px 0 0; }
#sg3 .source-sets { margin: 6px 0 0; color: #4b5c6e; font-size: var(--fs-s); }

/* v921: "your sail / your boat" picker above the setup table: small wind-picker-style buttons that wrap on a phone, picked one filled in the accent */
#sg3 .variant-pick { margin: 14px 0 10px; display: grid; gap: 8px; }
#sg3 .vp-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
#sg3 .vp-q { font: 600 14px/1.3 Inter,sans-serif; color: #13263d; margin-right: 4px; }
#sg3 .vp-row { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
#sg3 .vp-b { all: unset; box-sizing: border-box; cursor: pointer; min-height: 34px; padding: 5px 11px; border-radius: var(--r-s); border: 1.5px solid var(--accent); background: #fff; color: var(--accent); font: 600 13.5px/1.2 Inter,sans-serif; }
#sg3 .vp-b[aria-pressed=true] { background: var(--accent); color: #fff; }
#sg3 .vp-b:focus-visible { outline: 2px solid #13263d; outline-offset: 2px; }
#sg3 .vp-note { flex-basis: 100%; font: 500 13px/1.3 Inter,sans-serif; color: var(--muted); }
#sg3 .vp-note:empty { display: none; }
/* v1019: on PC the Setup tab fits one screen (Al): tighter rows, smaller numbers, the notes close under the table */
@media(min-width:761px) {
  #sg3 .setup-table th, #sg3 .setup-table td { padding: 4px 14px; }
  #sg3 .setup-table thead th { padding: 8px 12px; font-size: var(--fs-l); }
  #sg3 .setup-table thead small { margin-top: 1px; }
  #sg3 .setup-table .group-row th { padding: 5px 24px; }
  #sg3 .setup-table td strong { font-size: 16px; line-height: 1.2; }
  #sg3 .setup-table td small, #sg3 .setup-table th small { margin-top: 1px; line-height: 1.25; }
  #sg3 .setup-table .common-setting>small { margin-top: 1px; }
  #sg3 .setup-table .info-button { top: 2px; }
  #sg3 #setup .table-note { margin: 6px 0 8px; }
  #sg3 #setup .measurement-guide, #sg3 #setup .dock-steps, #sg3 #setup .rig-steps { padding: 6px 16px; margin: 8px 0; }
  #sg3 #setup .measurement-guide summary { min-height: 30px; }
}
