/* NROTC Guide — field manual aesthetic. Deliberately NOT a SaaS template. */
@import url('https://fonts.googleapis.com/css2?family=Staatliches&family=Special+Elite&family=Source+Sans+3:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
  --paper: #f2efe4;
  --paper-dark: #e8e3d3;
  --ink: #1c1a15;
  --navy: #1e2c4f;
  --navy-deep: #141d36;
  --brass: #a07d1c;
  --brass-light: #c9a227;
  --olive: #5b6236;
  --stamp-red: #a33327;
  --muted: #6b675a;
  --line: #d8d2bd;
  --card: #faf8f0;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
/* kill horizontal scrolling at the viewport level (decorative elements must never trigger it) */
html, body { overflow-x: clip; }
body {
  font-family: "Source Sans 3", -apple-system, sans-serif;
  background: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  color: var(--ink);
  line-height: 1.7;
}
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 24px; }
h1, h2, .display { font-family: "Staatliches", sans-serif; font-weight: 400; letter-spacing: 1.5px; }
.type { font-family: "Special Elite", monospace; }

/* ---------- nav: stencil bar ---------- */
.nav { background: var(--navy-deep); border-bottom: 3px solid var(--brass); position: sticky; top: 0; z-index: 50; }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; padding-bottom: 12px; }
.brand { color: #fff; text-decoration: none; font-family: "Staatliches", sans-serif; font-size: 24px; letter-spacing: 2px; display: flex; align-items: center; gap: 10px; }
.brand .tag { font-family: "Special Elite", monospace; font-size: 10px; color: var(--brass-light); border: 1px solid var(--brass); padding: 3px 8px; letter-spacing: 1px; }
.nav-links { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-links a { color: #b9c0d8; text-decoration: none; font-size: 13.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; padding: 8px 13px; transition: all .15s; font-family: "Source Sans 3", sans-serif; }
.nav-links a:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav-links a.on { color: var(--navy-deep); background: var(--brass-light); }
@media (max-width: 760px) { .nav .wrap { flex-direction: column; gap: 8px; } .nav-links { justify-content: center; } }

/* ---------- hero: transmission ---------- */
.hero { background: var(--navy-deep); color: #fff; padding: 90px 0 80px; position: relative; }
.scroll-hint { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; font-family: "Special Elite", monospace; font-size: 11px; letter-spacing: 3px; color: rgba(216,201,138,.75); text-decoration: none; }
.scroll-hint .chev { width: 10px; height: 10px; border-right: 2px solid var(--brass-light); border-bottom: 2px solid var(--brass-light); transform: rotate(45deg); animation: chevdrop 1.8s ease-in-out infinite; }
@keyframes chevdrop { 0%, 100% { transform: rotate(45deg) translate(0,0); opacity: .9; } 50% { transform: rotate(45deg) translate(4px,4px); opacity: .35; } }
.hero::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(0,0,0,.12) 4px); pointer-events: none; }
.radar { position: absolute; right: 6%; bottom: -70px; width: 340px; height: 340px; border-radius: 50%; border: 1px solid rgba(201,162,39,.25); opacity: .5; pointer-events: none; }
.radar::before { content: ""; position: absolute; inset: 34px; border-radius: 50%; border: 1px solid rgba(201,162,39,.18); }
.radar::after { content: ""; position: absolute; inset: 68px; border-radius: 50%; border: 1px solid rgba(201,162,39,.12); }
.radar .sweep { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, rgba(201,162,39,.35), transparent 22%); animation: sweep 4.5s linear infinite; }
.radar .blip { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--brass-light); animation: blip 4.5s ease-in-out infinite; }
.radar .blip.b1 { top: 30%; left: 62%; }
.radar .blip.b2 { top: 58%; left: 38%; animation-delay: 1.5s; }
.radar .blip.b3 { top: 42%; left: 48%; animation-delay: 3s; }
@keyframes sweep { to { transform: rotate(360deg); } }
@keyframes blip { 0%,100% { opacity: .15; } 12% { opacity: 1; box-shadow: 0 0 10px var(--brass-light); } 30% { opacity: .15; } }
@media (max-width: 760px) { .radar { display: none; } }
@media (max-width: 760px) and (orientation: portrait) { .hero .stamp { display: none; } }
.hero .stamp { position: absolute; top: 28px; right: 4%; transform: rotate(8deg); font-family: "Special Elite", monospace; color: var(--stamp-red); border: 3px double var(--stamp-red); padding: 8px 18px; font-size: 15px; letter-spacing: 2px; opacity: .85; }
.hero h1 { font-size: clamp(44px, 7vw, 84px); line-height: 1.02; margin-bottom: 20px; max-width: 800px; }
.hero h1 .amber { color: var(--brass-light); }
.transmission { background: rgba(0,0,0,.4); border: 1px solid rgba(201,162,39,.4); border-left: 4px solid var(--brass-light); padding: 16px 20px; max-width: 620px; margin-bottom: 30px; font-family: "Special Elite", monospace; font-size: 15px; line-height: 1.6; color: #d8c98a; min-height: 82px; }
.transmission .cursor::after { content: "▌"; animation: blink .8s steps(1) infinite; color: var(--brass-light); }
@keyframes blink { 50% { opacity: 0; } }
.hero p.sub { color: #a8b0cc; max-width: 600px; font-size: 17px; margin-bottom: 28px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 13px 26px; font-weight: 800; font-size: 15px; text-decoration: none; letter-spacing: .5px; transition: all .15s; font-family: "Source Sans 3", sans-serif; }
.btn-brass { background: var(--brass-light); color: var(--navy-deep); clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); padding-left: 32px; padding-right: 32px; }
.btn-brass:hover { background: #fff; transform: translateY(-2px); }
.btn-outline { border: 2px solid rgba(255,255,255,.35); color: #fff; }
.btn-outline:hover { border-color: var(--brass-light); color: var(--brass-light); }

/* ---------- sections: manual chapters ---------- */
.section { padding: 70px 0; }
.chapter-label { font-family: "Special Elite", monospace; color: var(--stamp-red); font-size: 14px; letter-spacing: 2px; margin-bottom: 8px; }
.chapter-label a { color: inherit; text-decoration: none; cursor: pointer; transition: color .2s; }
.chapter-label a:hover { color: var(--brass); text-decoration: underline; }
.section h2 { font-size: clamp(32px, 4.5vw, 52px); color: var(--navy-deep); margin-bottom: 10px; line-height: 1.05; }
.section .lead { color: var(--muted); font-size: 17px; max-width: 700px; margin-bottom: 38px; }

/* ---------- audience doors ---------- */
.door-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 34px 0 20px; }
@media (max-width: 700px) { .door-grid { grid-template-columns: 1fr; } }
.door { display: block; text-decoration: none; padding: 34px 30px; position: relative; transition: transform .18s ease, box-shadow .18s ease; }
.door h3 { font-family: "Staatliches", sans-serif; font-size: 40px; letter-spacing: 1px; margin: 8px 0 10px; line-height: 1; }
.door-future { background: var(--navy-deep); color: #fff; border-top: 5px solid var(--brass-light); box-shadow: 3px 3px 0 rgba(0,0,0,.25); }
.door-future h3 { color: #fff; }
.door-future p { color: #a8b0cc; }
.door-current { background: var(--card); color: var(--ink); border: 1px solid var(--line); border-top: 5px solid var(--navy); box-shadow: 3px 3px 0 rgba(0,0,0,.2); }
.door-current h3 { color: var(--navy-deep); }
.door-current p { color: var(--muted); }
.door p { font-size: 16px; margin-bottom: 16px; }
.door:hover { transform: translate(-2px, -4px); box-shadow: 6px 8px 0 rgba(0,0,0,.28); }
.door-kicker { font-family: "Special Elite", monospace; font-size: 12px; letter-spacing: 2px; color: var(--brass-light); }
.door-current .door-kicker { color: var(--brass); }
.door-go { font-weight: 800; text-transform: uppercase; font-size: 13px; letter-spacing: 1px; color: var(--brass-light); }
.door-current .door-go { color: var(--brass); }
.door-go .arrow { display: inline-block; transition: transform .2s ease; }
.door:hover .door-go .arrow { transform: translateX(6px); }
.door-escape { text-align: center; color: var(--muted); font-size: 14.5px; }
.door-escape a { color: var(--brass); font-weight: 700; }
.doc-list a { color: var(--brass); font-weight: 700; }
/* ---------- audience groups ---------- */
#start { scroll-margin-top: 70px; }
#builder { scroll-margin-top: 70px; }
#topics { scroll-margin-top: 70px; }
.audience-group { margin-bottom: 64px; scroll-margin-top: 90px; }
.audience-group:last-child { margin-bottom: 0; }
.audience-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 18px; }
/* ---------- schools search ---------- */
.school-search { margin: 22px 0 4px; max-width: 440px; }
.school-search input { width: 100%; padding: 12px 16px; font: 15px "Inter", sans-serif; color: var(--ink); background: var(--card); border: 1px solid var(--line); box-shadow: 2px 2px 0 rgba(0,0,0,.15); }
.school-search input::placeholder { color: var(--muted); }
.school-search input:focus { outline: 2px solid var(--brass); outline-offset: 1px; }
.school-noresults { color: var(--muted); font-style: italic; margin: 14px 0; }
/* ---------- cards: index cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 900px) { .card-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); } }
.card { background: var(--card); border: 1px solid var(--line); border-top: 5px solid var(--navy); padding: 24px 20px; text-decoration: none; color: inherit; display: block; position: relative; transition: all .18s; box-shadow: 2px 2px 0 rgba(0,0,0,.2); }
.card:hover { transform: translate(-2px, -3px); box-shadow: 5px 6px 0 rgba(0,0,0,.3); border-top-color: var(--brass-light); }
.card .ch { font-family: "Special Elite", monospace; font-size: 11px; color: var(--stamp-red); letter-spacing: 2px; margin-bottom: 8px; }
.card h3 { font-family: "Staatliches", sans-serif; font-size: 26px; letter-spacing: 1px; color: var(--navy-deep); margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14.5px; }
.card .go { margin-top: 12px; font-weight: 800; font-size: 13px; letter-spacing: 1px; color: var(--brass); text-transform: uppercase; }

/* ---------- prose ---------- */
.prose { max-width: 760px; }
.prose h3 { font-family: "Staatliches", sans-serif; font-size: 28px; letter-spacing: 1px; color: var(--navy-deep); margin: 40px 0 12px; }
.prose h3:first-child { margin-top: 0; }
.prose p, .prose li { color: #2e2b23; margin-bottom: 12px; }
.prose ul, .prose ol { margin: 0 0 16px 22px; }
.prose strong { color: var(--navy-deep); }
.field-note { background: #fffdf4; border: 1px dashed var(--brass); padding: 18px 22px; margin: 24px 0; position: relative; font-size: 15px; }
.field-note::before { content: "FIELD NOTE"; position: absolute; top: -11px; left: 18px; background: var(--paper); padding: 0 10px; font-family: "Special Elite", monospace; font-size: 11px; letter-spacing: 2px; color: var(--olive); }
.field-note strong { color: var(--navy-deep); }
.source { font-size: 12px; color: #b8b49e; font-family: "Special Elite", monospace; margin-top: 4px; line-height: 1.7; }
table.info { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 15px; background: var(--card); border: 1px solid var(--line); }
table.info th { background: var(--navy-deep); color: #fff; text-align: left; padding: 11px 16px; font-family: "Staatliches", sans-serif; letter-spacing: 1.5px; font-weight: 400; font-size: 16px; }
table.info td { padding: 11px 16px; border-bottom: 1px solid var(--line); }
table.info tr:last-child td { border-bottom: none; }

/* ---------- accordion: file folders ---------- */
.acc { background: var(--card); border: 1px solid var(--line); margin-bottom: 10px; }
.acc-head { width: 100%; background: none; border: none; text-align: left; padding: 18px 22px; font-size: 17px; font-weight: 700; color: var(--navy-deep); cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-family: inherit; }
.acc-head::after { content: "[ + ]"; font-family: "Special Elite", monospace; font-size: 14px; color: var(--brass); }
.acc.open .acc-head::after { content: "[ – ]"; }
.acc-body { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.acc-body .inner { padding: 0 22px 20px; font-size: 15.5px; border-top: 1px dashed var(--line); padding-top: 16px; margin: 0 22px 20px; padding-left: 0; padding-right: 0; }
/* NROTC schools list */
.unit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin: 18px 0 20px; }
.unit-card { background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--navy); padding: 14px 16px; transition: transform .15s ease, box-shadow .15s ease; }
.unit-card:hover { transform: translateY(-3px); box-shadow: 3px 4px 0 rgba(0,0,0,.18); }
.unit-card h4 { font-family: "Staatliches", sans-serif; font-size: 19px; letter-spacing: 1.5px; color: var(--navy-deep); margin-bottom: 2px; }
.unit-card h4 a { color: var(--navy-deep); text-decoration: underline; text-decoration-color: var(--brass); text-underline-offset: 2px; }
.unit-card h4 a:hover { color: var(--brass); }
.unit-state { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.x-label { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin: 8px 0 4px; border-top: 1px dashed var(--line); padding-top: 8px; }
.unit-card ul { list-style: none; margin: 0; padding: 0; }
.unit-card li { font-size: 14px; padding: 2px 0; color: #2e2b23; }
.unit-card li a { color: var(--navy); text-decoration: underline; text-decoration-color: var(--brass); text-underline-offset: 2px; }
.unit-card li a:hover { color: var(--brass); }

/* ---------- quiz widget ---------- */
.quiz-box { background: var(--navy-deep); color: #fff; padding: 36px 32px; margin: 30px 0; position: relative; overflow: hidden; }
.quiz-box::before { content: "TEST YOURSELF"; position: absolute; top: 14px; right: 18px; font-family: "Special Elite", monospace; font-size: 11px; letter-spacing: 2px; color: var(--brass-light); opacity: .7; }
.quiz-q { font-family: "Staatliches", sans-serif; font-size: 26px; letter-spacing: 1px; margin-bottom: 18px; }
.quiz-opts { display: grid; gap: 10px; }
.quiz-opt { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.2); color: #fff; padding: 13px 18px; text-align: left; font-size: 15.5px; cursor: pointer; font-family: inherit; transition: all .15s; }
.quiz-opt:hover:not(:disabled) { background: rgba(255,255,255,.14); border-color: var(--brass-light); }
.quiz-opt.right { background: rgba(46,125,50,.35); border-color: #4ade80; }
.quiz-opt.wrong { background: rgba(163,51,39,.35); border-color: var(--stamp-red); }
.quiz-opt:disabled { cursor: default; opacity: .85; }
.quiz-feedback { margin-top: 16px; font-size: 15px; min-height: 24px; }
.quiz-feedback .ok { color: #4ade80; font-weight: 700; }
.quiz-feedback .no { color: #ff9d9d; font-weight: 700; }
.quiz-feedback .qsrc { display: block; font-size: 12px; color: #8f96b8; font-weight: 400; margin-top: 4px; font-family: "Special Elite", monospace; }
.quiz-next { margin-top: 14px; }

/* ---------- drill simulator ---------- */
.sim-wrap { background: var(--navy-deep); padding: 36px 28px; margin: 30px 0; position: relative; overflow: hidden; }
.sim-wrap::before { content: "DRILL DECK — LIVE"; position: absolute; top: 14px; left: 20px; font-family: "Special Elite", monospace; font-size: 11px; letter-spacing: 2px; color: var(--brass-light); opacity: .7; }
.sim-live { position: absolute; top: 12px; right: 20px; display: flex; align-items: center; gap: 8px; font-family: "Special Elite", monospace; font-size: 11px; letter-spacing: 2px; color: #ff6b6b; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #ff3b3b; animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
.soldier.snap { animation: snap .3s ease; }
@keyframes snap { 0% { scale: 1; } 40% { scale: 1.04 .96; } 100% { scale: 1; } }
.sim-stage { display: flex; justify-content: center; padding: 20px 0 10px; min-height: 300px; }
.soldier { transition: transform .45s cubic-bezier(.3,1.4,.5,1); transform-origin: 50% 90%; }
.soldier .pose { display: none; }
.soldier .pose.on { display: block; }
.soldier.marching { animation: marchbob .55s ease-in-out infinite; }
.soldier.marching .leg-l { animation: legswing .55s ease-in-out infinite; transform-origin: 50% 0; }
.soldier.marching .leg-r { animation: legswing .55s ease-in-out infinite reverse; transform-origin: 50% 0; }
.soldier.marching .arm-l { animation: armswing .55s ease-in-out infinite reverse; transform-origin: 50% 0; }
.soldier.marching .arm-r { animation: armswing .55s ease-in-out infinite; transform-origin: 50% 0; }
@keyframes marchbob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes legswing { 0%,100% { transform: rotate(24deg); } 50% { transform: rotate(-24deg); } }
@keyframes armswing { 0%,100% { transform: rotate(-20deg); } 50% { transform: rotate(20deg); } }
.sim-cmd { text-align: center; font-family: "Special Elite", monospace; color: var(--brass-light); font-size: 19px; letter-spacing: 1px; min-height: 32px; margin: 8px 0 18px; }
.sim-hint { text-align: center; color: #8f96b8; font-size: 13px; margin-top: 14px; font-family: "Special Elite", monospace; }
.quiz-box { background: var(--navy-deep); color: #fff; padding: 36px 32px; margin: 30px 0; position: relative; overflow: hidden; }
.quiz-box::before { content: "TEST YOURSELF"; position: absolute; top: 14px; right: 18px; font-family: "Special Elite", monospace; font-size: 11px; letter-spacing: 2px; color: var(--brass-light); opacity: .7; }
.quiz-q { font-family: "Staatliches", sans-serif; font-size: 26px; letter-spacing: 1px; margin-bottom: 18px; }
.quiz-opts { display: grid; gap: 10px; }
.quiz-opt { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.2); color: #fff; padding: 13px 18px; text-align: left; font-size: 15.5px; cursor: pointer; font-family: inherit; transition: all .15s; }
.quiz-opt:hover:not(:disabled) { background: rgba(255,255,255,.14); border-color: var(--brass-light); }
.quiz-opt.right { background: rgba(46,125,50,.35); border-color: #4ade80; }
.quiz-opt.wrong { background: rgba(163,51,39,.35); border-color: var(--stamp-red); }
.quiz-opt:disabled { cursor: default; opacity: .85; }
.quiz-feedback { margin-top: 16px; font-size: 15px; min-height: 24px; }
.quiz-feedback .ok { color: #4ade80; font-weight: 700; }
.quiz-feedback .no { color: #ff9d9d; font-weight: 700; }
.quiz-feedback .qsrc { display: block; font-size: 12px; color: #8f96b8; font-weight: 400; margin-top: 4px; font-family: "Special Elite", monospace; }
.quiz-next { margin-top: 14px; }

/* ---------- insignia explorer ---------- */
.ins-explorer { background: var(--card); border: 1px solid var(--line); margin: 28px 0; }
.ins-tabs { display: flex; border-bottom: 2px solid var(--navy-deep); }
.ins-tab { flex: 1; background: none; border: none; padding: 16px 8px; font-family: "Staatliches", sans-serif; font-size: 20px; letter-spacing: 1.5px; color: var(--muted); cursor: pointer; border-right: 1px solid var(--line); transition: all .15s; }
.ins-tab:last-child { border-right: none; }
.ins-tab:hover { background: var(--paper-dark); }
.ins-tab.on { background: var(--navy-deep); color: var(--brass-light); }
.ins-panel { display: none; padding: 32px 28px; }
.ins-panel.on { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 700px) { .ins-panel.on { grid-template-columns: 1fr; } }
.ins-panel h4 { font-family: "Staatliches", sans-serif; font-size: 30px; letter-spacing: 1px; color: var(--navy-deep); margin-bottom: 6px; }
.ins-panel .yr { font-family: "Special Elite", monospace; font-size: 13px; color: var(--brass); letter-spacing: 1px; margin-bottom: 14px; }
.ins-panel p, .ins-panel li { font-size: 15px; color: #2e2b23; }
.ins-panel ul { margin: 12px 0 12px 20px; }
.ins-panel li { margin-bottom: 8px; }
.ins-photo { background: #fff; border: 1px solid var(--line); padding: 20px; text-align: center; }
.ins-photo img { max-width: 220px; height: auto; display: block; margin: 0 auto; }
.ins-cap { font-family: "Special Elite", monospace; font-size: 12px; color: var(--muted); margin-top: 10px; }
/* ---------- uniform diagram ---------- */
.uni-diagram { background: var(--card); border: 1px solid var(--line); padding: 32px 28px; margin: 28px 0; }
.uni-diagram h4 { font-family: "Staatliches", sans-serif; font-size: 28px; letter-spacing: 1px; color: var(--navy-deep); margin-bottom: 4px; text-align: center; }
.uni-diagram .sub { text-align: center; font-family: "Special Elite", monospace; font-size: 12.5px; color: var(--muted); margin-bottom: 20px; }
.uni-flex { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 700px) { .uni-flex { grid-template-columns: 1fr; } }
.uni-label { font-family: "Special Elite", monospace; font-size: 12px; fill: var(--navy-deep); }
.uni-leader { stroke: var(--brass); stroke-width: 1.2; }
.uni-dot { fill: var(--stamp-red); }
.testi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.testi { background: var(--card); border: 1px solid var(--line); padding: 26px 24px; position: relative; }
.testi::before { content: "\201C"; position: absolute; top: 6px; left: 16px; font-family: "Staatliches", sans-serif; font-size: 52px; color: var(--brass); opacity: .35; }
.testi p.quote { font-style: italic; color: #2e2b23; margin: 18px 0 14px; font-size: 15.5px; }
.testi .who { font-family: "Special Elite", monospace; font-size: 13px; color: var(--navy-deep); }
.testi .who span { color: var(--muted); }
.testi.empty { border-style: dashed; display: flex; align-items: center; justify-content: center; min-height: 170px; text-align: center; }
.testi.empty::before { display: none; }
.testi.empty p { font-family: "Special Elite", monospace; color: var(--muted); font-size: 14px; }
.testi:hover { box-shadow: 4px 5px 0 rgba(0,0,0,.22); }

.hero .byline { font-family: "Special Elite", monospace; font-size: 14px; letter-spacing: 2px; color: var(--brass-light); margin-top: 18px; text-transform: uppercase; }
/* ---------- motion upgrades ---------- */
/* button shine sweep */
.btn { position: relative; overflow: hidden; }
.btn::after { content: ""; position: absolute; top: 0; left: -80%; width: 50%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent); transform: skewX(-20deg); transition: left .5s ease; }
.btn:hover::after { left: 130%; }
/* nav underline */
.nav-links a { position: relative; }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: -4px; width: 0; height: 2px; background: var(--brass-light); transition: width .25s ease; }
.nav-links a:hover::after, .nav-links a.on::after { width: 100%; }
/* chapter label line draw */
.chapter-label { position: relative; display: block; margin-bottom: 12px; }
.chapter-label::after { content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0; background: var(--brass); transition: width .8s ease .2s; }
.reveal.in .chapter-label::after { width: 100%; }
/* card tilt */
.card, .testi { transition: transform .25s ease, box-shadow .25s ease; transform-style: preserve-3d; will-change: transform; }
/* stamp hover */
.stamp { transition: transform .3s ease; }
.stamp:hover { transform: rotate(-4deg) scale(1.06); }
/* stat band */
.stat-band { background: var(--paper-dark); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; text-align: center; padding: 34px 0; }
.stat .num { font-family: "Staatliches", sans-serif; font-size: 52px; color: var(--navy-deep); letter-spacing: 1px; }
.stat .num .dollar { color: var(--brass); }
.stat .lbl { font-family: "Special Elite", monospace; font-size: 12.5px; color: var(--muted); letter-spacing: 1px; margin-top: 4px; }
/* hero light sweep */
.hero::before { content: ""; position: absolute; top: 0; left: -30%; width: 22%; height: 100%; background: linear-gradient(100deg, transparent, rgba(201,162,39,.07), transparent); transform: skewX(-15deg); animation: lightsweep 9s ease-in-out infinite; pointer-events: none; }
@keyframes lightsweep { 0%, 55% { left: -30%; } 100% { left: 78%; } }
/* accordion snap */
.acc-body { transition: max-height .35s cubic-bezier(.3,1.2,.4,1); }

/* ---------- hover: everything does something ---------- */
.acc-head { transition: background .2s, padding-left .2s; }
.acc-head:hover { background: var(--paper-dark); padding-left: 26px; }
.stat { transition: transform .2s; cursor: default; }
.stat:hover { transform: translateY(-4px); }
.stat:hover .num { color: var(--brass); }
.brand { transition: letter-spacing .25s; }
.brand:hover { letter-spacing: 3px; }
footer .fine span { transition: color .2s; }
footer .fine span:hover { color: var(--brass-light); }
.field-note { transition: transform .2s, box-shadow .2s; }
.field-note:hover { transform: translateX(4px); box-shadow: -4px 0 0 var(--brass); }
.uni-diagram svg, .ins-svg svg, .sim-stage svg { transition: transform .3s ease; }
.uni-diagram:hover svg { transform: scale(1.02); }
/* easter egg: GQ overlay */
#gq { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; background: rgba(20,0,0,.92); animation: gqflash .5s steps(2) infinite; cursor: pointer; }
#gq.on { display: flex; }
#gq .msg { text-align: center; color: #fff; font-family: "Staatliches", sans-serif; }
#gq .msg .big { font-size: 64px; letter-spacing: 4px; color: #ff5a5a; }
#gq .msg .sub2 { font-family: "Special Elite", monospace; font-size: 15px; color: #ffb3b3; margin-top: 12px; }
@keyframes gqflash { 50% { background: rgba(60,0,0,.92); } }
/* easter egg: toast */
#egg-toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(80px); background: var(--navy-deep); color: var(--brass-light); font-family: "Special Elite", monospace; font-size: 14px; letter-spacing: 1px; padding: 14px 26px; border: 1px solid var(--brass); z-index: 200; opacity: 0; transition: all .35s cubic-bezier(.3,1.3,.5,1); pointer-events: none; white-space: nowrap; }
#egg-toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
/* easter egg: stamp spin */
.stamp.egg-spin { animation: stampspin .8s cubic-bezier(.3,1.4,.5,1); }
@keyframes stampspin { to { transform: rotate(356deg) scale(1.15); } }
/* easter egg: anchor rain */
.egg-anchor { position: fixed; top: -40px; z-index: 200; pointer-events: none; animation: anchorfall linear forwards; font-size: 24px; }
@keyframes anchorfall { to { transform: translateY(110vh) rotate(340deg); } }

/* ---------- uniform gallery ---------- */
.ugal { background: var(--card); border: 1px solid var(--line); margin: 28px 0; }
.ugal, .ugal-branch { scroll-margin-top: 90px; }
.ugal-branch { display: flex; border-bottom: 2px solid var(--navy-deep); }
.branch-tab { flex: 1; background: none; border: none; padding: 18px; font-family: "Staatliches", sans-serif; font-size: 22px; letter-spacing: 2px; color: var(--muted); cursor: pointer; transition: all .2s; }
.branch-tab.on { background: var(--navy-deep); color: var(--brass-light); }
.branch-tab[data-branch="marines"].on { background: #3a0f0f; }
.ugal-pills { display: flex; flex-wrap: wrap; gap: 10px; padding: 20px 24px 0; }
.upill { background: var(--paper); border: 1px solid var(--brass); color: var(--navy-deep); font-family: "Special Elite", monospace; font-size: 13px; letter-spacing: 1px; padding: 10px 18px; cursor: pointer; transition: all .15s; }
.upill:hover { background: var(--paper-dark); }
.upill.on { background: var(--navy-deep); color: var(--brass-light); border-color: var(--navy-deep); }
.ugal-display { display: grid; grid-template-columns: 340px 1fr; gap: 32px; padding: 28px; align-items: start; }
@media (max-width: 760px) { .ugal-display { grid-template-columns: 1fr; } }
.ugal-fig { background: var(--paper); border: 1px dashed var(--brass); padding: 16px; text-align: center; min-height: 560px; display: flex; align-items: center; justify-content: center; }
.ugal-fig svg { max-width: 100%; height: auto; max-height: 560px; animation: figin .4s ease; }
@keyframes figin { from { opacity: 0; transform: translateY(10px); } }

/* ---------- photo uniform gallery (compact) ---------- */
.ugal-display { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; padding: 20px 24px; }
.ugal-fig { min-height: 0; display: flex; align-items: flex-start; justify-content: center; }
.ugal-info h4 { font-family: "Staatliches", sans-serif; font-size: 26px; letter-spacing: 1px; color: var(--navy-deep); margin-bottom: 8px; }
.ugal-when { font-size: 15px; color: #2e2b23; margin-bottom: 12px; }
.ugal-when span { display: block; font-family: "Special Elite", monospace; font-size: 11.5px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--navy-deep); margin-bottom: 3px; }
.ugal-keys { list-style: disc; margin: 0 0 0 18px; padding: 0; }
.ugal-keys li { font-size: 14px; color: #2e2b23; margin-bottom: 6px; }
.uphoto-wrap { position: relative; overflow: hidden; border: 1px solid var(--line); background: var(--paper-dark); max-width: 220px; }
.uphoto-wrap.uloading { display: flex; align-items: center; justify-content: center; min-height: 300px; background: #101a30; }
.uphoto-wrap.uloading .nrotc-loader { width: 150px; height: 150px; }
.uphoto { display: block; width: 100%; height: auto; transition: transform .3s ease-out; }
.uphoto.breathing { animation: breathe 4s ease-in-out infinite; }
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.015); }
}
.uphoto-shine { position: absolute; top: 0; left: -100%; width: 60%; height: 100%; background: linear-gradient(105deg, transparent, rgba(255,255,255,.15), transparent); animation: shine 6s ease-in-out infinite; pointer-events: none; }
@keyframes shine {
  0%, 60% { left: -100%; }
  100% { left: 160%; }
}
@media (max-width: 700px) { .ugal-display { grid-template-columns: 1fr; } .ugal-fig { min-height: 0; } }

/* ---------- ribbon rack builder ---------- */
.rack-builder { background: var(--card); border: 1px solid var(--line); margin: 28px 0; }
.rp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; padding: 24px; }
.rp-item { background: var(--paper); border: 1px solid var(--line); padding: 16px; transition: border-color .15s; }
.rp-item:hover { border-color: var(--brass); }
.rp-ribbon { margin-bottom: 10px; }
.rp-ribbon svg { border-radius: 2px; }
.rp-name { font-family: "Staatliches", sans-serif; font-size: 18px; letter-spacing: .5px; color: var(--navy-deep); }
.rp-crit { font-size: 12.5px; color: var(--muted); margin: 4px 0 12px; line-height: 1.4; }
.rp-controls { display: flex; flex-direction: column; gap: 8px; }
.rp-toggle { background: none; border: 1px solid var(--brass); color: var(--navy-deep); font-family: "Special Elite", monospace; font-size: 13px; padding: 8px; cursor: pointer; transition: all .15s; }
.rp-toggle:hover { background: var(--paper-dark); }
.rp-toggle.on { background: var(--navy-deep); color: var(--brass-light); border-color: var(--navy-deep); }
.rp-stars { display: flex; align-items: center; gap: 6px; font-family: "Special Elite", monospace; font-size: 12px; color: var(--muted); }
.rp-star { background: none; border: 1px solid var(--line); padding: 4px 8px; cursor: pointer; font-size: 13px; color: var(--muted); }
.rp-star.on { border-color: var(--brass); color: var(--brass); background: rgba(201,162,39,.1); }
.rack-out { border-top: 2px solid var(--navy-deep); padding: 24px; background: var(--navy-deep); }
.rack-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; flex-wrap: wrap; gap: 8px; }
.rack-head .chapter-label { color: var(--brass-light); }
.rack-head span:last-child { font-family: "Special Elite", monospace; font-size: 13px; color: #a8b0cc; }
/* realistic ribbon rack: metal holder backing */
.rack-holder { display: none; }
.uniform-shirt { position: relative; background: #faf8f4; border: 1px solid var(--line); max-width: 560px; margin: 0 auto; padding: 36px 30px 40px; overflow: hidden; }
.shirt-fabric { position: absolute; inset: 0; background:
  repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,.02) 2px, rgba(0,0,0,.02) 3px),
  #faf8f4; pointer-events: none; }
.ribbon-mount { position: relative; display: flex; flex-direction: column; align-items: center; margin-bottom: 0; }
/* spacing measurement between ribbons and pocket */
.spacing-measure { position: relative; height: 44px; width: 120px; margin: 2px auto 6px; }
.measure-bracket { position: absolute; top: 0; bottom: 0; width: 34px; border-left: 2px solid #b00; border-right: 2px solid #b00; }
.measure-bracket::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; border-top: 2px solid #b00; }
.measure-bracket span { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); background: #faf8f4; padding: 1px 5px; font-family: "Special Elite", monospace; font-size: 12px; color: #b00; font-weight: bold; white-space: nowrap; }
.measure-bracket.navy { left: 8px; }
.measure-bracket.marines { right: 8px; border-color: #888; }
.measure-bracket.marines::before { border-color: #888; }
.measure-bracket.marines span { color: #888; font-size: 11px; }
/* realistic pocket */
.shirt-pocket-real { position: relative; width: 320px; max-width: 90%; height: 150px; margin: 0 auto; }
.pocket-body { position: absolute; bottom: 0; left: 0; right: 0; height: 112px; background: linear-gradient(180deg, #f2efe8 0%, #e8e4d8 100%); border: 1px solid #cfc9ba; border-top: none; box-shadow: inset 0 2px 4px rgba(0,0,0,.06); }
.pocket-flap-real { position: absolute; top: 0; left: -5px; right: -5px; height: 48px; background: linear-gradient(180deg, #f6f3ec 0%, #ece8dc 100%); border: 1px solid #cfc9ba; box-shadow: 0 2px 3px rgba(0,0,0,.08); }
.pocket-flap-real::after { content: ''; position: absolute; bottom: 7px; left: 20px; right: 20px; border-top: 1px solid #d8d2c2; }
.pocket-button { position: absolute; top: 19px; left: 50%; transform: translateX(-50%); width: 17px; height: 17px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #d8d2c2 60%, #b8b2a2); border: 1px solid #a8a296; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
/* wider measurement area for labels */
.spacing-measure { position: relative; height: 48px; width: 200px; margin: 2px auto 6px; }
.measure-bracket { position: absolute; top: 0; bottom: 0; width: 52px; border-left: 2px solid #b00; border-right: 2px solid #b00; }
.measure-bracket span { font-size: 11px; }
.pocket-button::after { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 6px; height: 6px; border-radius: 50%; border: 1px solid #99937f; }
.shirt-label { text-align: center; font-family: "Special Elite", monospace; font-size: 11px; color: #999; margin-top: 14px; line-height: 1.5; }
.rack-row { display: flex; gap: 3px; justify-content: center; margin-bottom: 3px; flex-wrap: nowrap; }
.rack-row:last-child { margin-bottom: 0; }
.rack-slot svg { display: block; border-radius: 1px; }
.rack-empty { position: relative; text-align: center; color: #999; font-family: "Special Elite", monospace; padding: 30px; border: 1px dashed #ccc; }

/* ---------- footer ---------- */
footer { background: var(--navy-deep); color: #8f96b8; padding: 44px 24px 28px; margin: 50px 0 0; border-top: 4px solid var(--brass); display: block; width: auto; }
footer .wrap { max-width: 1200px; margin: 0 auto; }
footer .disclaimer { border: 1px solid rgba(255,255,255,.15); padding: 18px 22px; font-size: 13px; margin-bottom: 22px; font-family: "Special Elite", monospace; line-height: 1.6; }
footer .disclaimer strong { color: var(--brass-light); }
footer .fine { font-size: 12px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-family: "Special Elite", monospace; }
footer .fine a { color: inherit; text-decoration: none; transition: color .2s; }
footer .fine a:hover { color: var(--brass-light); }

/* ---------- scroll progress ---------- */
.progress { position: fixed; top: 0; left: 0; height: 3px; background: var(--brass-light); width: 0; z-index: 100; }
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .55s ease, transform .55s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .transmission .cursor::after { animation: none; } .scroll-hint .chev { animation: none; } }

/* nav dropdown */
.nav-drop { position: relative; display: flex; align-items: stretch; }
.nav-drop .drop-toggle { display: flex; align-items: center; }
.drop-menu { display: none; position: absolute; top: 100%; left: 0; background: var(--navy-deep); border: 1px solid rgba(201,162,39,.3); min-width: 200px; z-index: 100; padding: 6px 0; }
.nav-drop:hover .drop-menu { display: block; }
@media (hover: none) { .nav-drop:hover .drop-menu { display: none; } .nav-drop.open .drop-menu { display: block; } }
.drop-menu a { display: block; padding: 10px 18px; color: #c8c4b8; text-decoration: none; font-size: 14px; white-space: nowrap; }
.drop-menu a:hover { background: rgba(201,162,39,.15); color: #fff; }
/* keep the last dropdown (Uniforms) from running off the right edge */
@media (min-aspect-ratio: 8/9) {
  .nav-links .nav-drop:last-child .drop-menu { left: auto; right: 0; }
}

/* ---------- aspect ratio support ---------- */
/* Ultrawide 16:9+ : use the space */
@media (min-aspect-ratio: 16/9) and (min-width: 1400px) {
  .wrap { max-width: 1400px; }
  .prose { max-width: 1000px; }
  .rp-grid { grid-template-columns: repeat(3, 1fr); max-width: 1200px; margin: 0 auto; }
  .hero h1 { font-size: clamp(54px, 6vw, 96px); }
}
/* Narrow portrait 8:9 and below : stack everything */
@media (max-aspect-ratio: 8/9) {
  .wrap { padding: 0 16px; }
  .nav .wrap { flex-direction: column; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .nav-links { flex-wrap: wrap; justify-content: center; gap: 2px; }
  .nav-links a { padding: 6px 10px; font-size: 12px; }
  .nav-drop .drop-menu { left: 50%; transform: translateX(-50%); }
  .hero { padding: 40px 0 30px; }
  .hero h1 { font-size: clamp(36px, 10vw, 54px); }
  .rp-grid { grid-template-columns: 1fr; padding: 16px; }
  .ugal-display { grid-template-columns: 1fr; }
  .uniform-shirt { padding: 24px 16px 30px; margin: 0 -8px; }
  .shirt-pocket-real { width: 200px; }
  .spacing-measure { width: 100px; }
  .ins-explorer .ins-panel.on { grid-template-columns: 1fr; }
  .sim-stage svg { max-width: 100%; height: auto; }
}

/* Mobile nav: hide Home (brand goes home), fit all options on one line */
@media (max-width: 760px), (max-aspect-ratio: 8/9) {
  .nav-links { flex-wrap: nowrap; justify-content: space-between; width: 100%; gap: 0; }
  .nav-links > a[href="/"] { display: none; }
  .nav-links > a, .nav-links .drop-toggle { font-size: 11.5px; padding: 7px 6px; letter-spacing: 0; white-space: nowrap; }
}

/* ---------- naval decorations (subtle, professional) ---------- */
/* Section dividers with anchor motif */
.section { position: relative; padding: 60px 0; }
.section::before {
  content: '';
  position: absolute;
  top: 18px; left: 50%;
  transform: translateX(-50%);
  width: 120px; height: 24px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 24'%3E%3Cg fill='none' stroke='%23a07d1c' stroke-width='1' opacity='0.35'%3E%3Cline x1='0' y1='12' x2='44' y2='12'/%3E%3Cline x1='76' y1='12' x2='120' y2='12'/%3E%3Cg transform='translate(60,12) scale(0.55)'%3E%3Ccircle cx='0' cy='-7' r='2.5'/%3E%3Cline x1='0' y1='-4.5' x2='0' y2='8'/%3E%3Cline x1='-5' y1='-2' x2='5' y2='-2'/%3E%3Cpath d='M-7 4 Q-7 10 0 10 Q7 10 7 4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
}
/* Card corner rope detail */
.card::after {
  content: '';
  position: absolute;
  bottom: 8px; right: 8px;
  width: 20px; height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='7' fill='none' stroke='%23a07d1c' stroke-width='1' opacity='0.25' stroke-dasharray='2 1.5'/%3E%3C/svg%3E");
  pointer-events: none;
}
/* Hero compass accent */
.hero::after {
  content: '';
  position: absolute;
  bottom: 20px; right: 40px;
  width: 80px; height: 80px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23c9a227' stroke-width='0.8' opacity='0.15'%3E%3Ccircle cx='40' cy='40' r='32'/%3E%3Ccircle cx='40' cy='40' r='24'/%3E%3Cpath d='M40 12 L43 40 L40 68 L37 40 Z' fill='%23c9a227' opacity='0.1'/%3E%3Cpath d='M12 40 L40 37 L68 40 L40 43 Z' fill='%23c9a227' opacity='0.1'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

/* ---------- alive cards ---------- */
.card-alive { overflow: hidden; }
.card-alive .card-icon { margin-bottom: 14px; opacity: 0.9; transition: transform .3s ease; }
.card-alive:hover .card-icon { transform: scale(1.08); }
.card-alive .go .arrow { display: inline-block; transition: transform .2s ease; }
.card-alive:hover .go .arrow { transform: translateX(6px); }
.card-alive::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 5px;
  background: linear-gradient(90deg, var(--brass-light), var(--brass), var(--brass-light));
  background-size: 200% 100%;
  transition: background-position .5s ease;
}
.card-alive:hover::before { background-position: 100% 0; }
/* staggered entrance */
.card-grid .card-alive:nth-child(1) { transition-delay: 0s; }
.card-grid .card-alive:nth-child(2) { transition-delay: .08s; }
.card-grid .card-alive:nth-child(3) { transition-delay: .16s; }
.card-grid .card-alive:nth-child(4) { transition-delay: .24s; }
.card-grid .card-alive:nth-child(5) { transition-delay: .32s; }
/* section title animation */
.section h2 { position: relative; display: inline-block; }
.section h2::after {
  content: '';
  position: absolute;
  bottom: -8px; left: 0;
  width: 0; height: 3px;
  background: var(--brass);
  transition: width .6s ease;
}
.section h2.in::after { width: 60px; }

/* general orders */
.general-orders { counter-reset: go; list-style: none; padding: 0; }
.general-orders li { counter-increment: go; padding: 12px 16px 12px 52px; margin-bottom: 8px; background: var(--card); border: 1px solid var(--line); position: relative; font-size: 15px; }
.general-orders li::before { content: counter(go); position: absolute; left: 12px; top: 12px; width: 28px; height: 28px; background: var(--navy); color: var(--brass-light); font-family: "Staatliches", sans-serif; font-size: 16px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }

/* sticky footer */
html, body { height: 100%; }
body { display: flex; flex-direction: column; min-height: 100vh; }
.section { flex-shrink: 0; }
footer { margin-top: auto !important; }

/* chain of command graphic */
.coc { display: flex; flex-direction: column; align-items: center; max-width: 520px; margin: 30px auto; }
.coc-node { position: relative; background: var(--card); border: 2px solid var(--navy); border-radius: 8px; padding: 12px 24px; text-align: center; min-width: 280px; margin-bottom: 28px; transition: transform .2s ease, box-shadow .2s ease; }
.coc-node:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.coc-node:not(:last-child)::after { content: ''; position: absolute; bottom: -30px; left: 50%; transform: translateX(-50%); width: 2px; height: 28px; background: var(--navy); }
.coc-node:not(:last-child)::before { content: ''; position: absolute; bottom: -30px; left: 50%; transform: translateX(-50%); border: 6px solid transparent; border-top: 8px solid var(--navy); margin-bottom: -8px; }
.coc-rank { display: block; font-family: "Staatliches", sans-serif; font-size: 18px; letter-spacing: 1px; color: var(--navy); }
.coc-sub { display: block; font-size: 13px; color: #666; margin-top: 2px; }
.coc-unit { border-color: var(--brass); background: linear-gradient(135deg, #fffdf5, #faf6e8); }
.coc-unit .coc-rank { color: #7a5c00; }
.coc-you { background: var(--navy); border-color: var(--navy); }
.coc-you .coc-rank { color: #fff; font-size: 22px; }
.coc-you .coc-sub { color: var(--brass-light); }
.coc-top { background: linear-gradient(135deg, var(--navy), #2a3f7a); }
.coc-top .coc-rank { color: #fff; }
.coc-top .coc-sub { color: var(--brass-light); }

/* Loading icon — gold fouled anchor with sweeping progress arc.
   Usage:
     <div class="nrotc-loader">
       <img src="/img/loader-base.webp" alt="Loading">
       <div class="nrotc-loader-arc"></div>
     </div> */
.nrotc-loader { position: relative; width: 280px; height: 280px; }
.nrotc-loader img { display: block; width: 100%; height: 100%; }
.nrotc-loader-arc {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg,
    rgba(255,217,122,0) 0deg,
    rgba(212,175,55,.35) 50deg,
    rgba(255,217,122,.85) 80deg,
    #ffe9a8 90deg,
    rgba(255,217,122,0) 90deg);
  -webkit-mask: radial-gradient(closest-side,
    transparent 0%, transparent 49%,
    #000 50.2%, #000 52%, transparent 53%);
  mask: radial-gradient(closest-side,
    transparent 0%, transparent 49%,
    #000 50.2%, #000 52%, transparent 53%);
  filter: drop-shadow(0 0 10px rgba(255,217,122,.65));
  animation: nrotc-loader-spin 1.6s linear infinite;
}
@keyframes nrotc-loader-spin { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) {
  .nrotc-loader-arc { animation: none; }
}
/* small loading indicator over lazy-loading images */
.nrotc-loader.sm { width: 110px; height: 110px; }
.img-load { position: relative; }
.img-load .nrotc-loader.sm { position: absolute; inset: 0; margin: auto; }
img[data-loader] { opacity: 0; transition: opacity .35s ease; }
.img-load.done img[data-loader] { opacity: 1; }
.img-load.done .nrotc-loader.sm { display: none; }
.ufig-col { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; }
.uvariant-btns { display: flex; gap: 10px; }
.usweats-btn { background: var(--paper); border: 1px solid var(--brass); color: var(--navy-deep); font-family: "Special Elite", monospace; font-size: 12px; letter-spacing: 1px; padding: 8px 18px; cursor: pointer; transition: all .15s; }
.usweats-btn:hover { background: var(--paper-dark); }
.usweats-btn.on { background: var(--navy-deep); color: var(--brass-light); border-color: var(--navy-deep); }
/* segmented control for the 4-option class-year toggle */
.uvariant-btns.segmented { gap: 0; width: 100%; max-width: 220px; border: 1px solid var(--brass); }
.uvariant-btns.segmented .usweats-btn { flex: 1 1 0; border: none; border-left: 1px solid var(--brass); padding: 8px 0; text-align: center; }
.uvariant-btns.segmented .usweats-btn:first-child { border-left: none; }

.rank-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin: 6px 0 10px; }
@media (max-width: 700px) { .rank-cols { grid-template-columns: 1fr; } }
.rank-branch { font-family: "Staatliches", sans-serif; font-size: 21px; letter-spacing: 1.5px; color: var(--navy-deep); margin-bottom: 10px; }
.rank-cols table.info { margin: 0 0 10px; }
.class-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0; }
@media (max-width: 700px) { .class-grid { grid-template-columns: repeat(2, 1fr); } }
.class-card { background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--brass); padding: 16px 14px; text-align: center; transition: transform .15s ease, box-shadow .15s ease; }
.class-card:hover { transform: translateY(-3px); box-shadow: 3px 4px 0 rgba(0,0,0,.18); }
.cc-rank { display: block; font-family: "Staatliches", sans-serif; font-size: 30px; letter-spacing: 1px; color: var(--navy-deep); }
.cc-year { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; }

.ranks-layout { display: grid; grid-template-columns: 330px 1fr; gap: 32px; align-items: start; }
@media (max-width: 900px) { .ranks-layout { grid-template-columns: 1fr; } }
.coc-side .coc { margin: 20px auto; }
.coc-asof { text-align: center; font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ask-a-midshipman form */
.ask-form { max-width: 640px; }
.ask-form h3 .opt { font-family: inherit; font-size: 15px; letter-spacing: 0; color: var(--muted); }
.ask-field { margin-bottom: 20px; }
.ask-field label { display: block; font-family: "Special Elite", monospace; font-size: 12px; letter-spacing: 2px; color: var(--navy-deep); margin-bottom: 8px; }
.ask-field input[type="text"], .ask-field input[type="email"], .ask-field textarea, .ask-field select { width: 100%; box-sizing: border-box; background: #fffdf4; border: 1px solid var(--brass); color: #2e2b23; font-family: inherit; font-size: 16px; padding: 10px 12px; }
.ask-field textarea { min-height: 140px; resize: vertical; }
.ask-field .hint, .ask-form > .hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.ask-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 600px) { .ask-grid { grid-template-columns: 1fr; } }
.ask-submit { background: var(--navy-deep); color: var(--brass-light); border: 1px solid var(--navy-deep); font-family: "Special Elite", monospace; font-size: 14px; letter-spacing: 2px; padding: 12px 28px; cursor: pointer; transition: background .15s; }
.ask-submit:hover { background: #0e1e38; }
.ask-submit:disabled { opacity: .6; cursor: wait; }
.ask-msg { margin: 16px 0; padding: 14px 18px; border: 1px solid var(--brass); display: none; }
.ask-msg.ok { display: block; background: #f2f7ee; }
.ask-msg.err { display: block; background: #fdf2f0; border-color: #a33; }
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---------- tool tabs: section sub-nav ---------- */
.tool-tabs { background: var(--navy); border-bottom: 1px solid rgba(201,162,39,.35); }
.tool-tabs .wrap { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.tool-tabs a { color: #b9c0d8; text-decoration: none; font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; padding: 7px 14px; transition: all .15s; }
.tool-tabs a:hover { color: #fff; background: rgba(255,255,255,.08); }
.tool-tabs a.on { color: var(--navy-deep); background: var(--brass-light); }
@media (max-width: 760px) { .tool-tabs a { font-size: 12px; padding: 6px 10px; } }
