:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --navy: #0b2140;
  --blue: #075d82;
  --teal: #078b83;
  --teal-dark: #006b66;
  --sky: #e8f8fb;
  --line: #cfe3ec;
  --muted: #597286;
  --orange: #f97316;
  --signal-blue: #3155a4;
  --yellow: #f6df24;
  --red: #e32636;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 128px; }
body { margin: 0; background: #f5fbfd; color: var(--navy); }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
:focus-visible { outline: 3px solid #20b7ae; outline-offset: 3px; }

.rrs-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto auto 1fr;
  align-items: center;
  min-height: 72px;
  padding: 10px clamp(14px, 4vw, 42px);
  border-bottom: 1px solid rgba(7, 93, 130, .15);
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(14px);
}
.rrs-topbar img { width: min(210px, 34vw); max-height: 48px; object-fit: contain; }
.rrs-back, .rrs-official {
  justify-self: start;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--blue);
  background: #fff;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}
.rrs-official { justify-self: end; }

main { width: min(1160px, calc(100% - 28px)); margin: 0 auto; padding: 24px 0 64px; }
.rrs-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 270px;
  align-items: center;
  min-height: 410px;
  overflow: hidden;
  padding: clamp(30px, 6vw, 68px);
  border-radius: 34px;
  background:
    radial-gradient(circle at 82% 23%, rgba(155, 242, 232, .24), transparent 24%),
    linear-gradient(135deg, #064e70, #078b83);
  color: #fff;
  box-shadow: 0 22px 54px rgba(7, 93, 130, .2);
}
.rrs-hero::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -190px;
  width: 520px;
  height: 390px;
  border: 2px dashed rgba(255,255,255,.18);
  border-radius: 50%;
  transform: rotate(-12deg);
}
.rrs-hero-copy { position: relative; z-index: 2; }
.rrs-eyebrow { font-size: 12px; font-weight: 950; letter-spacing: .18em; }
.rrs-hero h1 { max-width: 820px; margin: 12px 0 16px; font-size: clamp(38px, 6.3vw, 70px); line-height: .96; letter-spacing: -.05em; }
.rrs-hero h1 em { color: #9bf2e8; font-style: normal; }
.rrs-hero p { max-width: 700px; margin: 0; font-size: clamp(15px, 2vw, 19px); line-height: 1.55; }
.rrs-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.rrs-primary-action, .rrs-secondary-action {
  min-height: 46px;
  padding: 13px 18px;
  border-radius: 14px;
  font-weight: 900;
  text-decoration: none;
}
.rrs-primary-action { background: #fff; color: var(--blue); }
.rrs-secondary-action { border: 1px solid rgba(255,255,255,.5); color: #fff; }
.rrs-progress-card {
  display: grid;
  grid-template-columns: minmax(190px, auto) minmax(120px, 280px);
  align-items: center;
  gap: 16px;
  max-width: 620px;
  margin-top: 24px;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 16px;
  background: rgba(4, 42, 65, .32);
}
.rrs-progress-card strong, .rrs-progress-card span { display: block; }
.rrs-progress-card strong { font-size: 14px; }
.rrs-progress-card span { margin-top: 3px; color: #d8f5f2; font-size: 11px; }
.rrs-progress-track { height: 10px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.2); }
.rrs-progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: #9bf2e8; transition: width .3s ease; }

.rrs-hero-visual { position: relative; z-index: 2; min-height: 240px; }
.rrs-hero-boat { position: absolute; left: 50%; top: 42%; font-size: 132px; transform: translate(-50%, -50%) rotate(-8deg); filter: drop-shadow(0 14px 22px rgba(0,0,0,.22)); }
.rrs-hero-wind { position: absolute; right: 5%; top: 8%; font-size: 64px; color: #9bf2e8; }
.rrs-hero-buoy { position: absolute; right: 15%; bottom: 6%; width: 28px; height: 52px; border-radius: 15px 15px 8px 8px; background: var(--orange); box-shadow: 0 9px 0 -4px rgba(255,255,255,.7); }

.rrs-course-nav {
  position: sticky;
  top: 72px;
  z-index: 25;
  display: flex;
  gap: 6px;
  margin: 14px 0 0;
  padding: 8px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 8px 24px rgba(11,33,64,.08);
  backdrop-filter: blur(12px);
  scrollbar-width: none;
}
.rrs-course-nav::-webkit-scrollbar { display: none; }
.rrs-course-nav a { flex: 0 0 auto; padding: 9px 13px; border-radius: 10px; color: #47657a; font-size: 12px; font-weight: 850; text-decoration: none; }
.rrs-course-nav a:hover { background: #e9f7f7; color: var(--teal-dark); }

.rrs-section {
  margin-top: 24px;
  padding: clamp(20px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(11, 33, 64, .05);
}
.rrs-section-heading { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 24px; }
.rrs-section-heading > span {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  height: 44px;
  border-radius: 14px;
  background: #dff7f4;
  color: var(--teal);
  font-weight: 950;
}
.rrs-section h2 { margin: 0; font-size: clamp(24px, 4vw, 36px); line-height: 1.08; letter-spacing: -.025em; }
.rrs-section-heading p:not(.rrs-kicker) { margin: 7px 0 0; color: var(--muted); line-height: 1.45; }
.rrs-kicker { margin: 0 0 5px; color: var(--teal-dark); font-size: 11px; font-weight: 950; letter-spacing: .14em; }
.rrs-subtitle { margin: 30px 0 14px; font-size: 21px; }

.rrs-plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.rrs-plan-grid a { position: relative; min-height: 128px; padding: 18px 18px 16px 62px; border: 1px solid var(--line); border-radius: 18px; background: #f8fcfd; text-decoration: none; transition: transform .18s ease, border-color .18s ease; }
.rrs-plan-grid a:hover { transform: translateY(-2px); border-color: #56bdb7; }
.rrs-plan-grid b { position: absolute; left: 16px; top: 17px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: #dff7f4; color: var(--teal-dark); }
.rrs-plan-grid span, .rrs-plan-grid small { display: block; }
.rrs-plan-grid span { font-weight: 900; line-height: 1.25; }
.rrs-plan-grid small { margin-top: 9px; color: var(--muted); }

.rrs-line-cards, .rrs-rules-grid, .rrs-action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.rrs-line-card { position: relative; padding: 22px; border: 2px solid var(--line); border-radius: 20px; }
.rrs-line-start { border-color: rgba(249, 115, 22, .45); }
.rrs-line-finish { border-color: rgba(49, 85, 164, .4); }
.rrs-card-tag { position: absolute; right: 16px; top: 16px; padding: 5px 8px; border-radius: 8px; background: #eff5f7; font-size: 10px; font-weight: 950; letter-spacing: .12em; }
.rrs-line-card h3 { margin: 14px 0 7px; font-size: 19px; }
.rrs-line-card p, .rrs-line-card li { color: #456277; line-height: 1.5; }
.rrs-line-card p { margin: 0; }
.rrs-line-card ul { margin: 12px 0 0; padding-left: 20px; }
.rrs-endpoint-demo { display: flex; align-items: center; min-height: 62px; padding-right: 76px; }
.rrs-committee { font-size: 44px; line-height: 1; }
.rrs-line-dash { flex: 1; margin: 0 8px; border-top: 4px dashed currentColor; opacity: .42; }
.rrs-mini-flag { position: relative; width: 44px; height: 42px; border-left: 4px solid #334155; }
.rrs-mini-flag::after { content: ""; position: absolute; top: 2px; left: 0; width: 34px; height: 24px; background: currentColor; }
.rrs-orange { color: var(--orange); }
.rrs-blue { color: var(--signal-blue); }
.rrs-memory, .rrs-coach-note { margin-top: 14px; padding: 15px 17px; border-radius: 15px; background: #fff6e8; color: #63492e; line-height: 1.5; }
.rrs-coach-note { background: #eaf8f7; color: #285c5a; }

.rrs-complete {
  margin-top: 18px;
  min-height: 44px;
  padding: 11px 16px;
  border: 1px solid #9ccfc9;
  border-radius: 13px;
  background: #fff;
  color: var(--teal-dark);
  font-weight: 900;
  cursor: pointer;
}
.rrs-complete.is-complete { border-color: var(--teal); background: #dff7f4; }

.rrs-sequence-lab { overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: #f7fbfc; }
.rrs-sequence-prep { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); background: #eef8fa; }
.rrs-sequence-prep > strong { color: var(--navy); font-size: 13px; }
.rrs-sequence-prep > div { display: flex; flex-wrap: wrap; gap: 7px; }
.rrs-sequence-prep button { min-width: 46px; min-height: 36px; padding: 6px 12px; border: 1px solid #a9c8d7; border-radius: 10px; background: #fff; color: #36546b; font: inherit; font-size: 12px; font-weight: 900; cursor: pointer; }
.rrs-sequence-prep button.active { border-color: var(--teal); background: #dff7f4; color: var(--teal-dark); }
.rrs-sequence-prep p { grid-column: 1 / -1; margin: 0; color: #557084; font-size: 11px; line-height: 1.45; }
.rrs-sequence-controls { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.rrs-sequence-controls button { min-height: 72px; padding: 10px; border: 0; border-right: 1px solid var(--line); background: #fff; color: var(--navy); cursor: pointer; }
.rrs-sequence-controls button:last-child { border-right: 0; }
.rrs-sequence-controls button.active { background: #dff7f4; box-shadow: inset 0 -4px var(--teal); }
.rrs-sequence-controls b, .rrs-sequence-controls span { display: block; }
.rrs-sequence-controls b { font-size: 19px; }
.rrs-sequence-controls span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.rrs-sequence-stage { display: grid; grid-template-columns: 145px minmax(330px, .9fr) minmax(270px, 1fr); gap: 20px; align-items: center; min-height: 240px; padding: 24px; }
.rrs-sequence-clock { display: grid; place-items: center; width: 132px; height: 132px; border: 8px solid #d9edf1; border-radius: 50%; background: #fff; }
.rrs-sequence-clock span { font-size: 34px; font-weight: 950; }
.rrs-sequence-clock small { color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.rrs-sequence-signals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-self: stretch; }
.rrs-sequence-signal { display: grid; grid-template-rows: 58px auto auto; place-items: center; gap: 4px; min-width: 0; padding: 12px 8px; border: 1px solid #c4dce6; border-radius: 14px; background: #fff; text-align: center; transition: opacity .18s ease, filter .18s ease; }
.rrs-sequence-signal .rrs-flag { width: 52px; height: 42px; }
.rrs-sequence-signal .flag-p::after { inset: 12px 17px; }
.rrs-sequence-signal .flag-i::after { left: 15px; top: 10px; width: 18px; height: 18px; }
.rrs-sequence-signal strong { color: #18364d; font-size: 11px; }
.rrs-sequence-signal small { color: #668095; font-size: 9px; line-height: 1.25; }
.rrs-sequence-signal.is-inactive { opacity: .36; filter: grayscale(.55); }
.rrs-sequence-signal.is-lowered { opacity: .58; }
.rrs-sequence-signal.is-lowered .rrs-flag { transform: translateY(9px); }
.rrs-sequence-prep-flags { display: flex; gap: 3px; justify-content: center; align-items: center; min-height: 58px; }
.rrs-sequence-prep-flags:has(.rrs-flag + .rrs-flag) .rrs-flag { width: 38px; }
.rrs-sequence-info h3 { margin: 12px 0 7px; font-size: 22px; }
.rrs-sequence-info p { margin: 0; color: #456277; line-height: 1.5; }
.rrs-sound-chip, .rrs-rule-pill { display: inline-flex; padding: 6px 9px; border-radius: 9px; background: #e8f1ff; color: #284b91; font-size: 11px; font-weight: 900; }
.rrs-symbol-key { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rrs-symbol-key span { padding: 7px 10px; border-radius: 9px; background: #eef5f7; color: #456277; font-size: 12px; }
.rrs-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.rrs-filters button {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #39576e;
  font-weight: 850;
  cursor: pointer;
}
.rrs-filters button.active { border-color: var(--teal); background: #dff7f4; color: var(--teal-dark); }
.rrs-signal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.rrs-signal-card { position: relative; min-height: 260px; padding: 17px; border: 1px solid var(--line); border-radius: 18px; background: #fbfdfe; cursor: pointer; }
.rrs-signal-card::after { content: "+"; position: absolute; right: 14px; top: 14px; display: grid; place-items: center; width: 25px; height: 25px; border-radius: 8px; background: #edf4f7; color: #456277; font-weight: 900; }
.rrs-signal-card.is-open::after { content: "−"; }
.rrs-signal-card h3 { margin: 12px 32px 6px 0; font-size: 17px; }
.rrs-signal-card p { margin: 0; color: #4f697d; font-size: 13px; line-height: 1.48; }
.rrs-signal-sound { display: inline-block; margin-top: 10px; padding: 5px 7px; border-radius: 8px; background: #edf4f7; color: #355267; font-size: 11px; font-weight: 850; }
.rrs-signal-action { display: none; margin-top: 12px; padding: 11px; border-left: 4px solid var(--teal); border-radius: 10px; background: #eaf8f7; color: #285c5a; font-size: 12px; line-height: 1.45; }
.rrs-signal-card.is-open .rrs-signal-action { display: block; }
.rrs-flag-challenge { margin-top: 26px; padding: clamp(16px, 3vw, 24px); border: 1px solid #a9d9dc; border-radius: 22px; background: linear-gradient(145deg, #f4fcfd, #e8f7fa); }
.rrs-flag-challenge-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: start; }
.rrs-flag-challenge-heading h3 { margin: 3px 0 7px; color: var(--navy); font-size: clamp(22px, 3vw, 29px); }
.rrs-flag-challenge-heading > div:first-child > p:last-child { max-width: 720px; margin: 0; color: #4f697d; line-height: 1.5; }
.rrs-flag-challenge-score { display: grid; min-width: 112px; padding: 11px 14px; border-radius: 15px; background: #0b2844; color: #fff; text-align: right; }
.rrs-flag-challenge-score span, .rrs-flag-challenge-score small { color: #a9dce1; font-size: 10px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.rrs-flag-challenge-score b { margin: 2px 0; font-size: 20px; }
.rrs-flag-masts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 20px 0 14px; }
.rrs-challenge-mast { position: relative; display: grid; grid-template-rows: auto 1fr auto; min-width: 0; min-height: 250px; padding: 12px 10px 10px; border: 1px solid #bdd8e2; border-radius: 16px; background: rgba(255,255,255,.78); text-align: center; overflow: hidden; }
.rrs-challenge-mast > b { color: #4b687c; font-size: 10px; letter-spacing: .1em; }
.rrs-challenge-mast.is-target { border: 2px solid #07877f; background: #fff; box-shadow: 0 9px 24px rgba(8, 122, 115, .14); }
.rrs-mast-cue { position: absolute; right: 7px; top: 7px; padding: 4px 6px; border-radius: 7px; background: #edf4f7; color: #668095; font-size: 8px; font-weight: 950; letter-spacing: .08em; }
.rrs-challenge-mast.is-target .rrs-mast-cue { background: #dff7f4; color: #08736c; }
.rrs-mast-pole { position: relative; display: grid; place-items: start center; min-height: 178px; margin-top: 8px; }
.rrs-mast-pole::before { content: ""; position: absolute; left: 50%; top: 4px; bottom: 0; width: 5px; border-radius: 4px; background: #334155; transform: translateX(-50%); }
.rrs-mast-pole::after { content: ""; position: absolute; left: calc(50% - 30px); right: calc(50% - 30px); bottom: 0; height: 5px; border-radius: 5px; background: #52687a; }
.rrs-mast-signals { position: absolute; z-index: 1; top: 10px; left: 50%; display: grid; gap: 5px; justify-items: start; padding: 0; }
.rrs-mast-signals .rrs-flag { display: block; width: 54px; height: 43px; box-sizing: border-box; }
.rrs-mast-signals .rrs-flag { border-left: 3px solid #334155; transform-origin: left center; }
.rrs-mast-signals .flag-first, .rrs-mast-signals .flag-ap { width: 68px; }
.rrs-challenge-mast.is-target .rrs-mast-signals { animation: rrs-flag-hoist .5s ease-out both; }
.rrs-challenge-mast > small { position: relative; z-index: 2; margin-top: 7px; color: #456277; font-size: 10px; }
.rrs-challenge-mast > small strong { color: #18364d; }
.rrs-flag-challenge-panel { padding: 16px; border-radius: 16px; background: #fff; }
.rrs-flag-challenge-panel > p { margin: 0 0 12px; color: #18364d; font-size: 17px; font-weight: 900; }
.rrs-flag-challenge-answers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rrs-flag-challenge-answers button { min-height: 48px; padding: 10px 12px; border: 1px solid #b8d2df; border-radius: 11px; background: #f7fbfd; color: #18364d; font: inherit; font-size: 12px; font-weight: 800; text-align: left; cursor: pointer; }
.rrs-flag-challenge-answers button.correct { border-color: #2f9f77; background: #e4f8ee; color: #0b6a49; }
.rrs-flag-challenge-answers button.wrong { border-color: #df6c6c; background: #fff0f0; color: #a52b2b; }
.rrs-flag-challenge-feedback { min-height: 48px; margin-top: 10px; padding: 11px 13px; border-left: 4px solid #15988f; border-radius: 10px; background: #eaf8f7; color: #365f64; font-size: 12px; line-height: 1.5; }
.rrs-flag-next { margin-top: 10px; min-height: 42px; padding: 9px 14px; border: 0; border-radius: 11px; background: #0b6f77; color: #fff; font: inherit; font-size: 12px; font-weight: 900; cursor: pointer; }
.rrs-flag-challenge.is-complete .rrs-flag-masts { opacity: .42; }
@keyframes rrs-flag-hoist { from { transform: translateY(32px); opacity: .35; } to { transform: translateY(0); opacity: 1; } }

.rrs-flag { position: relative; width: 74px; height: 60px; border: 2px solid rgba(11,33,64,.22); background: #fff; overflow: hidden; }
.rrs-flag::before, .rrs-flag::after { content: ""; position: absolute; }
.flag-class { background: linear-gradient(135deg, #fff 0 44%, #0d76ad 44% 56%, #fff 56%); }
.flag-o { background: linear-gradient(135deg, #facc15 0 49%, #e31b35 51% 100%); }
.flag-p { background: #3155a4; } .flag-p::after { inset: 17px 23px; background: #fff; }
.flag-i { background: var(--yellow); } .flag-i::after { width: 24px; height: 24px; border-radius: 50%; background: #111; left: 22px; top: 15px; }
.flag-z { background: conic-gradient(var(--yellow) 0 25%, #3155a4 0 50%, var(--red) 0 75%, #111 0); }
.flag-u { background: conic-gradient(#fff 0 25%, var(--red) 0 50%, #fff 0 75%, var(--red) 0); }
.flag-black { background: #111; }
.flag-x { background: linear-gradient(90deg, transparent 42%, #3155a4 42% 58%, transparent 58%), linear-gradient(transparent 42%, #3155a4 42% 58%, transparent 58%), #fff; }
.flag-first { width: 96px; clip-path: polygon(0 0,100% 50%,0 100%); background: #3155a4; } .flag-first::after { left: 13px; top: 17px; border-left: 46px solid var(--yellow); border-top: 11px solid transparent; border-bottom: 11px solid transparent; }
.flag-ap { width: 96px; clip-path: polygon(0 0,100% 50%,0 100%); background: repeating-linear-gradient(90deg,var(--red) 0 14px,#fff 14px 28px); }
.flag-n { background: conic-gradient(#3155a4 0 25%, #fff 0 50%, #3155a4 0 75%, #fff 0); background-size: 30px 30px; }
.flag-s { background: #fff; } .flag-s::after { width: 25px; height: 25px; background: #3155a4; left: 22px; top: 15px; }
.flag-c { background: linear-gradient(#3155a4 0 32%,#fff 32% 43%,var(--red) 43% 57%,#fff 57% 68%,#3155a4 68%); }
.flag-v { background: linear-gradient(45deg,transparent 43%,var(--red) 43% 57%,transparent 57%),linear-gradient(-45deg,transparent 43%,var(--red) 43% 57%,transparent 57%),#fff; }
.flag-y { background: repeating-linear-gradient(135deg,var(--yellow) 0 11px,var(--red) 11px 22px); }
.flag-orange { background: var(--orange); }
.flag-blue { background: var(--signal-blue); }
.rrs-sequence-ap-button { margin-top: 10px; min-height: 40px; padding: 8px 13px; border: 1px solid #d48b21; border-radius: 11px; background: #fff7df; color: #713f12; font: inherit; font-weight: 900; cursor: pointer; }
.rrs-sequence-ap-button.active { background: #f59e0b; color: #fff; }

.rrs-scenario-picker { display: flex; gap: 8px; margin-bottom: 14px; overflow-x: auto; scrollbar-width: thin; }
.rrs-scenario-picker button { flex: 0 0 auto; min-height: 40px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: #456277; font-weight: 850; cursor: pointer; }
.rrs-scenario-picker button.active { border-color: var(--teal); background: #dff7f4; color: var(--teal-dark); }
.rrs-scenario-viewbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.rrs-scenario-viewbar button { min-height: 40px; padding: 8px 13px; border: 1px solid #b8d4df; border-radius: 12px; background: #fff; color: #456277; font: inherit; font-size: 12px; font-weight: 900; cursor: pointer; }
.rrs-scenario-viewbar button.active { border-color: #087f78; background: #dff7f4; color: #08665f; box-shadow: inset 0 -3px #0b9489; }
.rrs-scenario-viewbar [data-scenario-replay] { margin-left: auto; border-style: dashed; }
.rrs-scenario-stage { min-width: 0; }
.rrs-pov-board { position: relative; min-height: 360px; overflow: hidden; border: 1px solid #afd6e1; border-radius: 22px; background: linear-gradient(#bde7f0 0 38%, #dff7fb 38% 43%, #80cbd8 43% 100%); box-shadow: inset 0 -60px 80px rgba(4, 92, 116, .12); isolation: isolate; }
.rrs-pov-board::before { content: ""; position: absolute; inset: 43% 0 0; z-index: -1; background: repeating-radial-gradient(ellipse at 50% -10%, rgba(255,255,255,.35) 0 2px, transparent 3px 38px); opacity: .55; }
.rrs-pov-horizon { position: absolute; left: 0; right: 0; top: 42%; border-top: 2px solid rgba(255,255,255,.8); box-shadow: 0 -5px 18px rgba(255,255,255,.45); }
.rrs-pov-wind,
.rrs-pov-alert,
.rrs-pov-own { position: absolute; z-index: 5; padding: 7px 10px; border-radius: 10px; background: rgba(7, 33, 56, .84); color: #fff; font-size: 10px; font-weight: 950; letter-spacing: .06em; box-shadow: 0 5px 15px rgba(11,33,64,.18); }
.rrs-pov-wind { left: 14px; top: 14px; }
.rrs-pov-alert { right: 14px; top: 14px; background: rgba(180, 45, 45, .9); }
.rrs-pov-own { left: 14px; bottom: 14px; background: rgba(0, 106, 116, .9); }
.rrs-pov-opponent { position: absolute; z-index: 3; width: 132px; height: 102px; transform: translate(-50%, -50%); transform-origin: center; filter: drop-shadow(0 8px 10px rgba(11,33,64,.2)); }
.rrs-pov-opponent svg { display: block; width: 100%; height: 100%; overflow: visible; transform: rotate(var(--pov-angle)); }
.rrs-pov-opponent > span { position: absolute; left: 50%; top: -2px; min-width: max-content; padding: 4px 7px; border-radius: 999px; background: rgba(255,255,255,.94); color: #18364d; font-size: 10px; font-weight: 950; transform: translate(-50%, -100%); box-shadow: 0 4px 10px rgba(11,33,64,.15); }
.rrs-pov-board.is-replaying .rrs-pov-opponent { animation: rrs-pov-approach 3.2s cubic-bezier(.2,.7,.25,1) both; }
.rrs-pov-bow { position: absolute; left: 50%; bottom: -26px; z-index: 4; width: 214px; height: 172px; transform: translateX(-50%); filter: drop-shadow(0 -10px 16px rgba(11,33,64,.2)); }
.rrs-pov-optimist { position: absolute; inset: 22px 0 0; overflow: hidden; border: 5px solid #087f8b; border-radius: 44% 44% 18% 18% / 23% 23% 12% 12%; background: #fff; clip-path: polygon(50% 0, 94% 56%, 89% 100%, 11% 100%, 6% 56%); }
.rrs-pov-opt-deck { position: absolute; inset: 0; background: linear-gradient(90deg,#fff 0 44%,#dff7f4 44% 56%,#fff 56%); }
.rrs-pov-opt-mast { position: absolute; left: 50%; top: 24px; width: 7px; height: 104px; border-radius: 6px; background: #075b68; transform: translateX(-50%); }
.rrs-pov-opt-cockpit { position: absolute; left: 50%; bottom: 18px; width: 112px; height: 68px; border: 4px solid #087f8b; border-radius: 20px 20px 12px 12px; background: #0b6380; transform: translateX(-50%); box-shadow: inset 0 10px 18px rgba(2,31,52,.38); }
.rrs-pov-opt-cockpit i { position: absolute; left: 50%; top: 10px; width: 26px; height: 34px; border-radius: 50% 50% 42% 42%; background: #ffd9b8; transform: translateX(-50%); }
.rrs-pov-opt-bench { position: absolute; left: 27px; right: 27px; bottom: 52px; height: 8px; border: 2px solid #087f8b; border-radius: 5px; background: #dff7f4; }
.rrs-pov-direction { position: absolute; left: 50%; top: 5px; z-index: 3; display: grid; justify-items: center; color: #075b68; font-size: 11px; font-weight: 950; line-height: 1; transform: translate(-50%,-100%); white-space: nowrap; text-shadow: 0 1px #fff, 0 -1px #fff, 1px 0 #fff, -1px 0 #fff; }
.rrs-pov-direction small { margin-top: 3px; font-size: 8px; font-weight: 850; letter-spacing: .02em; }
.rrs-pov-direction-arrow { position: absolute; left: 50%; top: -18px; z-index: 3; width: 3px; height: 24px; border-radius: 3px; background: #075b68; transform: translateX(-50%); }
.rrs-pov-direction-arrow::before { content: ""; position: absolute; left: 50%; top: -7px; width: 11px; height: 11px; border-left: 4px solid #075b68; border-top: 4px solid #075b68; transform: translateX(-50%) rotate(45deg); }
.rrs-pov-bow > em { position: absolute; left: 50%; bottom: 44px; z-index: 5; padding: 4px 7px; border-radius: 999px; background: rgba(7,91,104,.92); color: #fff; font-size: 9px; font-style: normal; font-weight: 950; letter-spacing: .04em; transform: translateX(-50%); white-space: nowrap; }
.rrs-pov-mark { position: absolute; right: 9%; top: 33%; z-index: 2; width: 30px; height: 68px; border: 3px solid #9a3d00; border-radius: 50% 50% 22% 22%; background: #f97316; box-shadow: 0 12px 16px rgba(11,33,64,.18); }
.rrs-pov-mark::after { content: "ZNAK"; position: absolute; left: 50%; bottom: -24px; padding: 3px 6px; border-radius: 7px; background: rgba(255,255,255,.92); color: #9a3d00; font-size: 9px; font-weight: 950; transform: translateX(-50%); }
@keyframes rrs-pov-approach {
  from { transform: translate(calc(-50% + var(--pov-dx)), calc(-50% + var(--pov-dy))) scale(.58); opacity: .68; }
  72% { opacity: 1; }
  to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
.rrs-scenario-lab { display: grid; grid-template-columns: minmax(320px, 1.15fr) 1fr; gap: 18px; }
.rrs-scenario-stage > [hidden] { display: none !important; }
.rrs-tactical-board { position: relative; min-height: 320px; overflow: hidden; border-radius: 22px; background:
  linear-gradient(rgba(255,255,255,.52) 1px, transparent 1px),
  linear-gradient(90deg, rgba(255,255,255,.52) 1px, transparent 1px),
  #d7f5fa;
  background-size: 82px 82px;
}
.rrs-board-wind { position: absolute; left: 18px; top: 16px; display: flex; align-items: center; gap: 9px; color: #287e9f; font-size: 12px; font-weight: 950; letter-spacing: .06em; }
.rrs-board-wind b { font-size: 38px; line-height: .8; }
.rrs-board-mark { position: absolute; right: 14%; top: 42%; width: 28px; height: 48px; border-radius: 15px 15px 8px 8px; background: var(--orange); }
.rrs-board-zone { position: absolute; right: 2%; top: 16%; width: 190px; height: 190px; border: 3px dashed rgba(249,115,22,.38); border-radius: 50%; }
.rrs-board-boat { position: absolute; width: 92px; height: 74px; color: #087fb0; transform-origin: center; filter: drop-shadow(0 5px 6px rgba(11,33,64,.16)); }
.rrs-board-boat svg { display: block; width: 100%; height: 100%; overflow: visible; }
.rrs-board-boat > span { position: absolute; left: 50%; top: 53%; display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 5px; border: 2px solid currentColor; border-radius: 50%; background: #fff; color: currentColor; font-size: 12px; font-weight: 950; transform: translate(-50%, -50%) rotate(-90deg); }
.rrs-board-boat.boat-b { color: #e2465c; }
.rrs-scenario-question { padding: 22px; border: 1px solid var(--line); border-radius: 22px; }
.rrs-scenario-question h3 { margin: 12px 0 6px; font-size: 23px; }
.rrs-scenario-question > p { margin: 0 0 15px; color: #456277; line-height: 1.5; }
.rrs-scenario-answers { display: grid; gap: 8px; }
.rrs-scenario-answers button { padding: 12px; border: 1px solid #bed7e3; border-radius: 12px; background: #f8fbfd; color: var(--navy); text-align: left; font-weight: 800; cursor: pointer; }
.rrs-scenario-answers button.correct { border-color: #0a9b72; background: #e3f8ef; }
.rrs-scenario-answers button.wrong { border-color: #d04a4a; background: #fff0f0; }
.rrs-scenario-feedback { min-height: 62px; margin-top: 12px; padding: 12px; border-radius: 12px; background: #f2f7f9; color: #456277; font-size: 13px; line-height: 1.5; }
.rrs-scenario-key { margin-top: 12px; padding: 12px 14px; border-left: 4px solid var(--teal); border-radius: 12px; background: #eef9fa; color: #49677a; font-size: 13px; line-height: 1.5; }
.rrs-scenario-key b { color: var(--navy); }
.rrs-rules-grid article { position: relative; padding: 18px 18px 18px 65px; border-radius: 18px; background: #f2f8fb; }
.rrs-rules-grid article > b { position: absolute; left: 16px; top: 17px; display: grid; place-items: center; width: 38px; height: 34px; border-radius: 11px; background: #dff7f4; color: var(--teal); font-size: 12px; }
.rrs-rules-grid h3, .rrs-action-grid h3 { margin: 0 0 5px; }
.rrs-rules-grid p, .rrs-action-grid p { margin: 0; color: #4f697d; line-height: 1.48; }

.rrs-course-journey { position: relative; display: grid; gap: 12px; }
.rrs-course-journey::before { content: ""; position: absolute; left: 28px; top: 28px; bottom: 28px; border-left: 3px dashed #9ccfc9; }
.rrs-course-journey article { position: relative; z-index: 1; display: grid; grid-template-columns: 58px 1fr; gap: 16px; align-items: start; padding: 16px; border: 1px solid var(--line); border-radius: 17px; background: #fff; }
.rrs-journey-icon { display: grid; place-items: center; width: 44px; height: 44px; border: 3px solid #fff; border-radius: 14px; background: var(--teal); color: #fff; box-shadow: 0 0 0 2px #9ccfc9; font-size: 11px; font-weight: 950; }
.rrs-journey-icon.rrs-orange { background: var(--orange); box-shadow: 0 0 0 2px #fdba74; }
.rrs-journey-icon.rrs-blue { background: var(--signal-blue); box-shadow: 0 0 0 2px #a8b9e0; }
.rrs-course-journey h3 { margin: 0 0 5px; }
.rrs-course-journey p { margin: 0; color: #4f697d; line-height: 1.45; }
.rrs-course-journey small { display: inline-block; margin-top: 7px; color: var(--teal-dark); font-weight: 850; }

.rrs-string-lab {
  margin-top: 16px;
  padding: clamp(16px, 3vw, 26px);
  border: 1px solid #b8dfe3;
  border-radius: 22px;
  background: linear-gradient(145deg, #f4fcfd, #e7f8fb);
}
.rrs-string-lab-copy { max-width: 780px; }
.rrs-string-lab-copy h3 { margin: 4px 0 7px; font-size: clamp(21px, 3vw, 28px); }
.rrs-string-lab-copy > p:last-child { margin: 0; color: #4f697d; line-height: 1.5; }
.rrs-string-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 12px; }
.rrs-string-tabs button {
  min-height: 42px;
  padding: 9px 13px;
  border: 1px solid #b8d4df;
  border-radius: 12px;
  background: #fff;
  color: #456277;
  font-weight: 850;
  cursor: pointer;
}
.rrs-string-tabs button.active { border-color: var(--teal); background: #dff7f4; color: var(--teal-dark); }
.rrs-string-stage { overflow: hidden; border: 1px solid #c7e1e8; border-radius: 18px; background: #dff7fb; }
.rrs-string-diagram { display: block; width: 100%; height: auto; max-height: 490px; }
.rrs-string-water-grid path { fill: none; stroke: rgba(255,255,255,.86); stroke-width: 2; }
.rrs-string-wind path { fill: none; stroke: #5799b2; stroke-width: 4; marker-end: url(#rrs-arrowhead); }
.rrs-string-wind text { fill: #39748c; font-size: 14px; font-weight: 900; text-anchor: middle; letter-spacing: .08em; }
.rrs-string-line path { fill: none; stroke-width: 5; stroke-dasharray: 11 9; }
.rrs-string-line circle { stroke: #fff; stroke-width: 4; }
.rrs-string-line text { font-size: 15px; font-weight: 950; text-anchor: middle; }
.rrs-string-start-line path { stroke: var(--orange); }
.rrs-string-start-line circle { fill: var(--orange); }
.rrs-string-start-line text { fill: #ad4e0d; }
.rrs-string-finish-line path { stroke: var(--signal-blue); }
.rrs-string-finish-line circle { fill: var(--signal-blue); }
.rrs-string-finish-line text { fill: #243f83; }
.rrs-string-mark circle, .rrs-string-gate circle { fill: #fff; stroke: #8a54e8; stroke-width: 4; }
.rrs-string-mark text, .rrs-string-gate text { fill: #6533bf; font-size: 12px; font-weight: 950; text-anchor: middle; }
.rrs-string-gate path { fill: none; stroke: #8a54e8; stroke-width: 3; stroke-dasharray: 7 7; opacity: .48; }
.rrs-string-track, .rrs-string-taut {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.rrs-string-track { stroke: #0d9db2; stroke-width: 7; opacity: .78; }
.rrs-string-taut { stroke: #f04444; stroke-width: 5; stroke-dasharray: 13 9; opacity: 0; transition: opacity .3s ease; }
.rrs-string-lab.is-tensioned .rrs-string-track { opacity: .25; }
.rrs-string-lab.is-tensioned .rrs-string-taut { opacity: 1; }
.rrs-string-boat path:first-child { fill: #fff; stroke: #087f9b; stroke-width: 3; }
.rrs-string-boat path:last-child { fill: #fff; stroke: #087f9b; stroke-width: 2; }
.rrs-string-lab.is-invalid [data-string-mark].is-error circle { fill: #fff0f0; stroke: #d73535; animation: rrs-string-pulse 1.1s ease-in-out 2; }
.rrs-string-lab.is-invalid [data-string-mark].is-error text { fill: #a91c1c; }
@keyframes rrs-string-pulse { 50% { transform: scale(1.22); transform-origin: center; } }
.rrs-string-legend { display: flex; flex-wrap: wrap; gap: 12px 18px; padding: 10px 14px; border-top: 1px solid #c7e1e8; background: rgba(255,255,255,.78); color: #48677b; font-size: 12px; font-weight: 800; }
.rrs-string-legend span { display: inline-flex; align-items: center; gap: 7px; }
.rrs-string-legend i { display: inline-block; width: 28px; border-top: 4px solid; }
.rrs-string-legend i.track { border-color: #0d9db2; }
.rrs-string-legend i.taut { border-color: #f04444; border-top-style: dashed; }
.rrs-string-legend i.required { width: 13px; height: 13px; border: 3px solid #8a54e8; border-radius: 50%; background: #fff; }
.rrs-string-controls { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: stretch; margin-top: 12px; }
.rrs-string-action { min-height: 56px; padding: 12px 18px; border: 0; border-radius: 14px; background: var(--blue); color: #fff; font-weight: 950; cursor: pointer; }
.rrs-string-action[aria-pressed="true"] { background: var(--teal-dark); }
.rrs-string-result { display: grid; align-content: center; gap: 3px; min-height: 56px; padding: 10px 14px; border-radius: 14px; background: #fff; color: #456277; }
.rrs-string-result b { color: var(--navy); }
.rrs-string-result span { font-size: 13px; line-height: 1.38; }
.rrs-string-result.is-valid { border-left: 5px solid #0a9b72; }
.rrs-string-result.is-invalid { border-left: 5px solid #d73535; }
.rrs-string-checks { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; margin: 12px 0 0; padding: 0; list-style: none; }
.rrs-string-checks li { min-height: 42px; display: grid; place-items: center; padding: 7px; border-radius: 11px; background: rgba(255,255,255,.8); color: #587184; font-size: 12px; font-weight: 850; text-align: center; }
.rrs-string-checks li::before { content: "○"; margin-right: 5px; }
.rrs-string-checks li.is-pass { background: #e3f8ef; color: #087652; }
.rrs-string-checks li.is-pass::before { content: "✓"; }
.rrs-string-checks li.is-fail { background: #fff0f0; color: #ac2929; }
.rrs-string-checks li.is-fail::before { content: "×"; }
.rrs-string-footnote { margin: 12px 0 0; color: #5d7486; font-size: 12px; line-height: 1.45; }
.rrs-action-grid article { position: relative; min-height: 165px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: #f8fbfd; }
.rrs-action-grid article > span { display: inline-grid; place-items: center; min-width: 40px; height: 30px; margin-bottom: 11px; padding: 0 8px; border-radius: 9px; background: #dff7f4; color: var(--teal-dark); font-size: 11px; font-weight: 950; }

.rrs-quiz { background: linear-gradient(180deg, #fff, #effafa); }
.rrs-quiz-status { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; color: var(--muted); font-size: 12px; font-weight: 850; }
.rrs-question { padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.rrs-question h3 { margin: 0 0 16px; font-size: 21px; }
.rrs-answers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.rrs-answer { min-height: 52px; padding: 12px 14px; border: 1px solid #bed7e3; border-radius: 13px; background: #f8fbfd; color: var(--navy); text-align: left; font-weight: 750; cursor: pointer; }
.rrs-answer.correct { border-color: #0a9b72; background: #e3f8ef; }
.rrs-answer.wrong { border-color: #d04a4a; background: #fff0f0; }
.rrs-quiz-feedback { min-height: 28px; margin: 14px 0 0; font-weight: 800; line-height: 1.45; }
.rrs-quiz-next { margin-top: 11px; min-height: 44px; padding: 11px 16px; border: 0; border-radius: 12px; background: var(--blue); color: #fff; font-weight: 900; cursor: pointer; }
.rrs-result-score { font-size: 34px; color: var(--teal-dark); }

.rrs-glossary dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.rrs-glossary dl > div { padding: 15px; border-radius: 15px; background: #f2f8fb; }
.rrs-glossary dt { font-weight: 950; }
.rrs-glossary dd { margin: 5px 0 0; color: #4f697d; font-size: 13px; line-height: 1.45; }

.rrs-disclaimer { margin-top: 24px; padding: 22px; border-left: 5px solid #f3a712; border-radius: 16px; background: #fff7df; }
.rrs-disclaimer p { margin: 7px 0 0; color: #5c5140; line-height: 1.55; }
.rrs-disclaimer div { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.rrs-disclaimer a { padding: 8px 10px; border-radius: 9px; background: #fff; color: #75510b; font-size: 12px; font-weight: 850; text-decoration: none; }
footer { display: flex; justify-content: space-between; gap: 20px; padding: 24px max(18px, calc((100% - 1160px)/2)); background: var(--navy); color: #fff; font-size: 12px; }

@media (max-width: 900px) {
  .rrs-hero { grid-template-columns: 1fr 190px; min-height: 370px; }
  .rrs-hero-boat { font-size: 100px; }
  .rrs-plan-grid, .rrs-signal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rrs-sequence-stage { grid-template-columns: 110px minmax(300px, .9fr) minmax(240px, 1fr); gap: 14px; padding: 20px; }
  .rrs-sequence-clock { width: 110px; height: 110px; }
  .rrs-scenario-lab { grid-template-columns: 1fr; }
  .rrs-pov-board { min-height: 330px; }
}

@media (max-width: 720px) {
  html { scroll-padding-top: 116px; }
  .rrs-topbar { grid-template-columns: auto 1fr auto; min-height: 62px; padding: 8px 10px; }
  .rrs-topbar img { width: 145px; }
  .rrs-back, .rrs-official { min-height: 38px; padding: 8px; font-size: 11px; }
  .rrs-course-nav { top: 62px; margin-top: 8px; border-radius: 13px; }
  .rrs-hero { grid-template-columns: 1fr; min-height: 0; padding: 30px 24px; border-radius: 24px; }
  .rrs-hero-visual { display: none; }
  .rrs-progress-card { grid-template-columns: 1fr; gap: 10px; }
  .rrs-line-cards, .rrs-rules-grid, .rrs-action-grid, .rrs-glossary dl { grid-template-columns: 1fr; }
  .rrs-sequence-prep { grid-template-columns: 1fr; }
  .rrs-sequence-prep p { grid-column: 1; }
  .rrs-sequence-stage { grid-template-columns: 110px 1fr; }
  .rrs-sequence-signals { grid-column: 2; }
  .rrs-sequence-info { grid-column: 1 / -1; }
  .rrs-answers { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  main { width: min(100% - 16px, 1160px); padding-top: 8px; }
  .rrs-topbar img { width: 122px; }
  .rrs-official { font-size: 0; }
  .rrs-official::after { content: "RRS"; font-size: 11px; }
  .rrs-hero h1 { font-size: 38px; }
  .rrs-hero-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .rrs-primary-action, .rrs-secondary-action { padding: 12px 8px; text-align: center; font-size: 13px; }
  .rrs-section { padding: 17px; border-radius: 21px; }
  .rrs-section-heading > span { flex-basis: 36px; height: 36px; border-radius: 11px; font-size: 12px; }
  .rrs-plan-grid, .rrs-signal-grid { grid-template-columns: 1fr; }
  .rrs-flag-challenge-heading { grid-template-columns: 1fr; }
  .rrs-flag-challenge-score { grid-template-columns: repeat(3, auto); gap: 8px; align-items: center; text-align: left; }
  .rrs-flag-masts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rrs-challenge-mast { min-height: 218px; }
  .rrs-mast-pole { min-height: 146px; }
  .rrs-mast-signals .rrs-flag { width: 46px; height: 37px; }
  .rrs-mast-signals .flag-first, .rrs-mast-signals .flag-ap { width: 58px; }
  .rrs-flag-challenge-answers { grid-template-columns: 1fr; }
  .rrs-plan-grid a { min-height: 100px; }
  .rrs-endpoint-demo { padding-right: 52px; }
  .rrs-sequence-controls { grid-template-columns: repeat(2, 1fr); }
  .rrs-sequence-controls button:nth-child(2) { border-right: 0; }
  .rrs-sequence-controls button:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .rrs-sequence-stage { grid-template-columns: 1fr; gap: 12px; padding: 15px; }
  .rrs-sequence-clock { justify-self: center; }
  .rrs-sequence-signals { grid-column: 1 / -1; }
  .rrs-sequence-clock { width: 88px; height: 88px; border-width: 6px; }
  .rrs-sequence-clock span { font-size: 25px; }
  .rrs-sequence-prep { padding: 13px; }
  .rrs-sequence-prep > div { display: grid; grid-template-columns: repeat(3, 1fr); }
  .rrs-sequence-prep button { min-width: 0; padding: 6px; }
  .rrs-sequence-signal { padding: 9px 4px; }
  .rrs-sequence-signal .rrs-flag { width: 46px; height: 38px; }
  .rrs-tactical-board { min-height: 280px; }
  .rrs-pov-board { min-height: 300px; }
  .rrs-pov-opponent { width: 105px; height: 82px; }
  .rrs-pov-bow { width: 174px; height: 142px; bottom: -24px; }
  .rrs-pov-opt-cockpit { width: 92px; height: 58px; }
  .rrs-pov-opt-bench { left: 23px; right: 23px; bottom: 46px; }
  .rrs-scenario-viewbar { display: grid; grid-template-columns: 1fr 1fr; }
  .rrs-scenario-viewbar [data-scenario-replay] { grid-column: 1 / -1; margin-left: 0; }
  .rrs-board-zone { right: -12%; }
  .rrs-course-journey article { grid-template-columns: 50px 1fr; padding: 13px; }
  .rrs-quiz-status { flex-direction: column; gap: 4px; }
  footer { flex-direction: column; }
}

@media (max-width: 720px) {
  .rrs-string-tabs { display: grid; grid-template-columns: 1fr; }
  .rrs-string-tabs button { text-align: left; }
  .rrs-string-controls { grid-template-columns: 1fr; }
  .rrs-string-checks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rrs-string-checks li:last-child { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .rrs-string-lab { padding: 12px; border-radius: 17px; }
  .rrs-string-stage { border-radius: 14px; }
  .rrs-string-diagram { min-height: 250px; object-fit: cover; }
  .rrs-string-legend { gap: 8px 12px; padding: 9px 10px; }
  .rrs-string-result span { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* P105 ADVANCED RRS */
.rrs-start-triangle,
.rrs-scoring-example,
.rrs-protest-workshop,
.rrs-advanced-decisions {
  margin-top: 22px;
  padding: 22px;
  border: 1px solid #bfdae6;
  border-radius: 20px;
  background: linear-gradient(145deg, #f8fcfe, #edf7fa);
}
.rrs-start-triangle-copy h3,
.rrs-scoring-example h3,
.rrs-advanced-decisions h3 { margin: 4px 0 8px; color: #0c2343; font-size: clamp(20px, 3vw, 28px); }
.rrs-start-triangle-copy > p:last-child,
.rrs-scoring-example > div:first-child > p:last-child { max-width: 820px; color: #49657a; line-height: 1.55; }

.rrs-triangle-tabs,
.rrs-protest-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.rrs-triangle-tabs button,
.rrs-protest-tabs button {
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid #a9c8d7;
  border-radius: 12px;
  background: #fff;
  color: #36546b;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}
.rrs-triangle-tabs button.active,
.rrs-protest-tabs button.active { border-color: #087f78; background: #dff7f3; color: #08665f; }
.rrs-triangle-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, .7fr); gap: 18px; align-items: stretch; }
.rrs-triangle-visual { display: grid; align-content: start; min-width: 0; }
.rrs-triangle-diagram { width: 100%; border: 1px solid #b7d9e6; border-radius: 17px 17px 0 0; background: #dff7fb; }
.rrs-protest-diagram > svg { width: 100%; border: 1px solid #b7d9e6; border-radius: 17px; background: #dff7fb; }
.rrs-triangle-signal-key,
.rrs-triangle-legend { display: flex; flex-wrap: wrap; gap: 7px 14px; padding: 9px 12px; border: 1px solid #b7d9e6; border-top: 0; background: #f8fcfe; color: #456277; font-size: 10px; font-weight: 800; }
.rrs-triangle-signal-key span,
.rrs-triangle-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rrs-triangle-signal-key i,
.rrs-triangle-legend i { display: inline-block; width: 18px; height: 12px; border: 1px solid rgba(11,33,64,.25); border-radius: 3px; }
.rrs-triangle-signal-key .is-orange { background: #f97316; }
.rrs-triangle-signal-key .is-class { background: linear-gradient(135deg, #fff 0 44%, #0d76ad 44% 56%, #fff 56%); }
.rrs-triangle-signal-key .is-prep { background: #3155a4; }
.rrs-triangle-legend { border-radius: 0 0 17px 17px; background: #fff; }
.rrs-triangle-legend .is-example { border: 2px solid #008c99; background: #fff; }
.rrs-triangle-legend .is-correct { border: 2px solid #078560; background: #ecfdf5; }
.rrs-triangle-legend span:last-child { margin-left: auto; color: #18364d; }
.rrs-triangle-grid path,
.rrs-protest-grid path { fill: none; stroke: rgba(255,255,255,.8); stroke-width: 2; }
.rrs-triangle-zone { fill: rgba(51, 65, 85, .04); stroke: #7a93a4; stroke-width: 2; stroke-dasharray: 8 8; transition: .2s ease; }
.rrs-start-triangle.is-restricted .rrs-triangle-zone { fill: rgba(239, 68, 68, .13); stroke: #dc2626; }
.rrs-triangle-start-line { fill: none; stroke: #f97316; stroke-width: 7; stroke-linecap: round; }
.rrs-triangle-committee,
.rrs-triangle-staff { color: #9a3d00; }
.rrs-triangle-committee .hull { fill: #fff; stroke: currentColor; stroke-width: 2; }
.rrs-triangle-committee .cabin { fill: #eff6ff; stroke: currentColor; stroke-width: 2; }
.rrs-triangle-committee .window { fill: #8bc4db; stroke: currentColor; stroke-width: 1.5; }
.rrs-triangle-committee .mast,
.rrs-triangle-staff > path:first-child { fill: none; stroke: #334155; stroke-width: 3; }
.rrs-triangle-committee .flag,
.rrs-triangle-staff .flag { fill: #f97316; stroke: #9a3d00; stroke-width: 1; }
.rrs-triangle-prep-flag .flag-field { stroke: none; }
.rrs-triangle-prep-flag .flag-p { fill: #3155a4; }
.rrs-triangle-prep-flag .flag-cutout { fill: #fff; }
.rrs-triangle-prep-flag .flag-outline { fill: none; stroke: #18364d; stroke-width: 1.2; }
.rrs-triangle-prep-label { fill: #18364d !important; font-size: 10px !important; font-weight: 950; text-anchor: middle; }
.rrs-triangle-class-flag rect { fill: #fff; stroke: #18364d; stroke-width: 1; }
.rrs-triangle-class-flag path { fill: none; stroke: #0d76ad; stroke-width: 3; }
.rrs-triangle-committee text,
.rrs-triangle-staff text { fill: #9a3d00; font-size: 12px; font-weight: 950; text-anchor: middle; }
.rrs-triangle-mark circle { fill: #f3a712; stroke: #9b6700; stroke-width: 2; }
.rrs-triangle-mark text { fill: #fff; font-size: 17px; font-weight: 950; text-anchor: middle; }
.rrs-triangle-boat .hull { fill: #fff; stroke: #008c99; stroke-width: 4; }
.rrs-triangle-boat .sail { fill: #fff; stroke: #008c99; stroke-width: 4; }
.rrs-start-triangle.is-restricted .rrs-triangle-boat .hull,
.rrs-start-triangle.is-restricted .rrs-triangle-boat .sail { fill: #fee2e2; stroke: #dc2626; }.rrs-start-triangle[data-active-rule="I"] .rrs-triangle-boat .hull,
.rrs-start-triangle[data-active-rule="I"] .rrs-triangle-boat .sail { fill: #fff7ed; stroke: #ea580c; }
.rrs-triangle-boat-correct .hull { fill: #ecfdf5; stroke: #078560; stroke-width: 4; }
.rrs-triangle-boat-correct .sail { fill: #fff; stroke: #078560; stroke-width: 4; }
.rrs-triangle-correct-label rect { fill: #ecfdf5; stroke: #078560; stroke-width: 1.5; }
.rrs-triangle-correct-label text { fill: #08664d; font-size: 9.5px; font-weight: 950; text-anchor: middle; }
.rrs-triangle-main-status rect { fill: #e6f7f5; stroke: #008c99; stroke-width: 1.5; }
.rrs-triangle-main-status text { fill: #076d76; font-size: 10px; font-weight: 950; text-anchor: middle; dominant-baseline: middle; }
.rrs-start-triangle.is-restricted .rrs-triangle-main-status rect { fill: #fee2e2; stroke: #dc2626; }
.rrs-start-triangle.is-restricted .rrs-triangle-main-status text { fill: #991b1b; }
.rrs-triangle-wind path,
.rrs-protest-wind path { fill: none; stroke: #237ea0; stroke-width: 4; marker-end: none; }
.rrs-triangle-wind text,
.rrs-protest-wind text { fill: #237ea0; font-size: 13px; font-weight: 950; text-anchor: middle; }
.rrs-triangle-result { padding: 18px; border-radius: 16px; background: #fff; box-shadow: 0 10px 28px rgba(26, 74, 97, .1); }
.rrs-triangle-result h4 { margin: 14px 0 7px; color: #0c2343; font-size: 20px; }
.rrs-triangle-result > p { color: #49657a; line-height: 1.55; }
.rrs-triangle-result dl { display: grid; gap: 8px; margin: 16px 0 0; }
.rrs-triangle-result dl div { padding: 10px; border-radius: 11px; background: #edf6fa; }
.rrs-triangle-result dt { color: #668095; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.rrs-triangle-result dd { margin: 3px 0 0; color: #18364d; font-size: 13px; font-weight: 850; }

.rrs-score-dictionary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rrs-score-dictionary article { display: grid; grid-template-columns: 56px 1fr; gap: 2px 10px; padding: 14px; border: 1px solid #c9dfe9; border-radius: 14px; background: #fff; }
.rrs-score-dictionary b { grid-row: 1 / span 2; display: grid; place-items: center; min-height: 50px; border-radius: 10px; background: #0c2343; color: #fff; font-size: 15px; }
.rrs-score-dictionary span { color: #18364d; font-size: 13px; font-weight: 900; }
.rrs-score-dictionary small { color: #60798c; font-size: 11px; line-height: 1.35; }

.rrs-score-bars { display: grid; gap: 10px; margin-top: 18px; }
.rrs-score-bars > div { display: grid; grid-template-columns: 180px minmax(100px, 1fr) 72px; gap: 10px; align-items: center; }
.rrs-score-bars span { color: #36546b; font-size: 12px; font-weight: 850; }
.rrs-score-bars i { position: relative; height: 16px; border-radius: 99px; background: #d8e7ee; overflow: hidden; }
.rrs-score-bars i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--score); border-radius: inherit; background: linear-gradient(90deg, #0faaa1, #f3a712, #ef5a5a); }
.rrs-score-bars b { color: #0c2343; font-size: 13px; text-align: right; }
.rrs-footnote { color: #60798c; font-size: 11px; line-height: 1.5; }

.rrs-protest-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.rrs-protest-steps article { position: relative; padding: 48px 14px 14px; border: 1px solid #c9dfe9; border-radius: 15px; background: #fff; }
.rrs-protest-steps article > b { position: absolute; top: 12px; left: 14px; display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: #087f78; color: #fff; }
.rrs-protest-steps h4 { margin: 0 0 6px; color: #0c2343; }
.rrs-protest-steps p { margin: 0; color: #526d81; font-size: 12px; line-height: 1.5; }

.rrs-protest-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, .9fr); gap: 18px; }
.rrs-protest-diagram > svg { display: block; min-height: 330px; }
.rrs-protest-boat .hull { fill: #fff; stroke: currentColor; stroke-width: 4; }
.rrs-protest-boat .sail { fill: #fff; stroke: currentColor; stroke-width: 4; }
.rrs-protest-boat .mast { stroke: currentColor; stroke-width: 3; }
.rrs-protest-boat text { fill: #0c2343; font-size: 12px; font-weight: 950; text-anchor: middle; transform: rotate(0deg); }
.rrs-protest-boat.boat-a { color: #0088bd; }
.rrs-protest-boat.boat-b { color: #ef4665; }
.rrs-protest-avoid path { fill: none; stroke: #dc2626; stroke-width: 4; stroke-dasharray: 8 6; }
[data-protest-mark] .zone { fill: rgba(243, 167, 18, .09); stroke: #e1a12a; stroke-width: 2; stroke-dasharray: 7 7; }
[data-protest-mark] .buoy { fill: #f97316; stroke: #9a3d00; stroke-width: 2; }
[data-protest-mark] text { fill: #fff; font-size: 14px; font-weight: 950; text-anchor: middle; }
.rrs-protest-question { padding: 15px; border: 1px solid #c9dfe9; border-top: 0; border-radius: 0 0 15px 15px; background: #fff; }
.rrs-protest-question h4 { margin: 12px 0 5px; color: #0c2343; font-size: 20px; }
.rrs-protest-question > p { color: #526d81; }
[data-protest-decisions] { display: grid; gap: 7px; }
[data-protest-decisions] button { padding: 10px 12px; border: 1px solid #b8d2df; border-radius: 10px; background: #f8fcfe; color: #18364d; font: inherit; font-size: 12px; font-weight: 750; text-align: left; cursor: pointer; }
[data-protest-decisions] button.correct { border-color: #36a979; background: #e4f8ee; color: #0b6a49; }
[data-protest-decisions] button.wrong { border-color: #e47676; background: #fff0f0; color: #a52b2b; }
[data-protest-feedback] { min-height: 38px; font-size: 12px; line-height: 1.45; }

.rrs-protest-form { align-self: start; border: 2px solid #b7cbd8; border-radius: 15px; overflow: hidden; background: #fff; box-shadow: 0 12px 30px rgba(26, 74, 97, .12); }
.rrs-protest-form > header { display: flex; justify-content: space-between; gap: 10px; padding: 14px; background: #0c2343; color: #fff; font-size: 11px; font-weight: 900; }
.rrs-protest-form > header b { color: #7ee8df; }
.rrs-form-grid { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid #d7e4eb; }
.rrs-form-grid label,
.rrs-form-story { display: grid; gap: 4px; padding: 10px 12px; border-right: 1px solid #d7e4eb; border-bottom: 1px solid #d7e4eb; color: #6b7f8f; font-size: 10px; font-weight: 850; text-transform: uppercase; }
.rrs-form-grid strong,
.rrs-form-story output { color: #132d43; font-size: 12px; font-weight: 800; line-height: 1.45; text-transform: none; }
.rrs-form-story output { min-height: 110px; padding: 10px; border-radius: 9px; background: #f4f8fa; }
.rrs-form-checks { display: flex; flex-wrap: wrap; gap: 5px; padding: 10px 12px; }
.rrs-form-checks span { padding: 5px 7px; border-radius: 99px; background: #e4f8ee; color: #0b6a49; font-size: 9px; font-weight: 850; }
.rrs-protest-form > footer { display: block; padding: 11px 12px; background: #f2f7fa; color: #526d81; font-size: 10px; line-height: 1.4; }
.rrs-advanced-decisions ol { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; padding-left: 22px; }
.rrs-advanced-decisions li { padding: 10px; color: #36546b; line-height: 1.5; }

@media (max-width: 900px) {
  .rrs-triangle-layout,
  .rrs-protest-layout { grid-template-columns: 1fr; }
  .rrs-score-dictionary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rrs-protest-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .rrs-start-triangle,
  .rrs-scoring-example,
  .rrs-protest-workshop,
  .rrs-advanced-decisions { padding: 13px; border-radius: 16px; }
  .rrs-triangle-tabs,
  .rrs-protest-tabs { display: grid; grid-template-columns: 1fr 1fr; }
  .rrs-triangle-tabs button,
  .rrs-protest-tabs button { padding: 8px; font-size: 11px; }
  .rrs-triangle-diagram { min-height: 250px; object-fit: cover; }
  .rrs-score-dictionary,
  .rrs-protest-steps,
  .rrs-advanced-decisions ol { grid-template-columns: 1fr; }
  .rrs-score-bars > div { grid-template-columns: 100px minmax(70px, 1fr) 58px; }
  .rrs-score-bars span,
  .rrs-score-bars b { font-size: 10px; }
  .rrs-form-grid { grid-template-columns: 1fr; }
  .rrs-protest-diagram > svg { min-height: 260px; }
}
html.academy-access-pending #start,
html.academy-access-pending #sygnaly,
html.academy-access-pending #pierwszenstwo,
html.academy-access-pending #trasa,
html.academy-access-pending #kary,
html.academy-access-pending #protesty,
html.academy-access-pending #quiz { display: none !important; }
.rrs-access-status { justify-self: end; padding: 7px 10px; border: 1px solid #b9d7e3; border-radius: 999px; background: #f4fbfd; color: #3c6173; font-size: 11px; font-weight: 850; white-space: nowrap; }
.rrs-access-status[data-mode="member"] { border-color: #91d1c5; background: #e4f8f2; color: #08705f; }
.rrs-access-status[data-mode="guest"] { border-color: #e6c58f; background: #fff6e6; color: #8a5412; }
.rrs-course-nav a.is-locked::after { content: " · 🔒"; font-size: .8em; }
.rrs-academy-gate { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 22px; align-items: center; border-color: #8bcfc5; background: linear-gradient(135deg, #eefbf8, #f7fcff); }
.rrs-academy-gate[hidden] { display: none !important; }
.rrs-academy-gate h2 { margin: 3px 0 8px; }
.rrs-academy-gate p:last-child { max-width: 780px; margin: 0; color: #456477; line-height: 1.55; }

@media (max-width: 720px) {
  .rrs-sequence-prep button,
  .rrs-sequence-ap-button,
  .rrs-scenario-picker button,
  .rrs-scenario-viewbar button,
  .rrs-string-tabs button,
  .rrs-triangle-tabs button,
  .rrs-protest-tabs button,
  .rrs-flag-next { min-height: 44px; }
  .rrs-topbar { grid-template-columns: auto 1fr auto; }
  .rrs-access-status { grid-column: 1 / -1; justify-self: center; order: 4; }
  .rrs-academy-gate { grid-template-columns: 1fr; }
}
