/* Self-hosted fonts (SIL OFL; licence texts OFL-*.txt next to the font files) */
/* Inter 400 latin-ext */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/static/fonts/inter-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* Inter 400 latin */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/static/fonts/inter-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Inter 500 latin-ext */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/static/fonts/inter-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* Inter 500 latin */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/static/fonts/inter-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Inter 600 latin-ext */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/static/fonts/inter-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* Inter 600 latin */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/static/fonts/inter-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* JetBrains Mono 400 latin-ext */
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/static/fonts/jetbrains-mono-400-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* JetBrains Mono 400 latin */
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/static/fonts/jetbrains-mono-400-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Space Grotesk 700 latin-ext */
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/static/fonts/space-grotesk-700-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* Space Grotesk 700 latin */
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/static/fonts/space-grotesk-700-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root{--bg:#070D18;--surface:#0C1626;--surface-deep:#08111F;--line:#23324A;--line-soft:#1C2B44;--text:#E6EDF7;--label:#C9D5E6;--muted:#A9B8CE;--dim:#8FA3BF;--accent:#5EEAD4;--accent-hover:#99F6E4;--accent-rgb:94 234 212;--accent-soft:rgb(94 234 212 / .12);--on-accent:#04201C;--warn:#F5A524;--warn-rgb:245 165 36;--warn-text:#F5C46B;--danger:#FCA5A5;--danger-rgb:252 165 165;--muted-rgb:143 163 191;--placeholder:#6B7C96;--shadow:rgb(0 0 0 / .4);color-scheme:dark;--display:'Space Grotesk',sans-serif;--mono:'JetBrains Mono',ui-monospace,monospace}
/* light theme: the device setting, unless the person picked one with the theme button */
@media (prefers-color-scheme:light){:root:not([data-theme="dark"]){--bg:#F3F6FA;--surface:#FFFFFF;--surface-deep:#EDF1F6;--line:#C9D3E0;--line-soft:#E1E7EF;--text:#0F1B2D;--label:#1F2D42;--muted:#4A5A70;--dim:#5E6E84;--accent:#0F766E;--accent-hover:#115E59;--accent-rgb:15 118 110;--accent-soft:rgb(15 118 110 / .10);--on-accent:#FFFFFF;--warn:#D97706;--warn-rgb:217 119 6;--warn-text:#92400E;--danger:#B91C1C;--danger-rgb:185 28 28;--muted-rgb:74 90 112;--placeholder:#7A889B;--shadow:rgb(15 27 45 / .12);color-scheme:light}}
:root[data-theme="light"]{--bg:#F3F6FA;--surface:#FFFFFF;--surface-deep:#EDF1F6;--line:#C9D3E0;--line-soft:#E1E7EF;--text:#0F1B2D;--label:#1F2D42;--muted:#4A5A70;--dim:#5E6E84;--accent:#0F766E;--accent-hover:#115E59;--accent-rgb:15 118 110;--accent-soft:rgb(15 118 110 / .10);--on-accent:#FFFFFF;--warn:#D97706;--warn-rgb:217 119 6;--warn-text:#92400E;--danger:#B91C1C;--danger-rgb:185 28 28;--muted-rgb:74 90 112;--placeholder:#7A889B;--shadow:rgb(15 27 45 / .12);color-scheme:light}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,system-ui,sans-serif}
a{color:var(--accent)}a:hover{color:var(--accent-hover)}
[hidden]{display:none!important}
.grid-bg{background-image:linear-gradient(rgb(var(--accent-rgb) / .05) 1px,transparent 1px),linear-gradient(90deg,rgb(var(--accent-rgb) / .05) 1px,transparent 1px);background-size:48px 48px}
.tr-input{width:100%;min-height:48px;padding:0 14px;border-radius:10px;border:1px solid var(--line);background:var(--surface-deep);color:var(--text);font:500 15px Inter,system-ui,sans-serif;outline:none}
.tr-input:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgb(var(--accent-rgb) / .18)}
.tr-input::placeholder{color:var(--placeholder)}
.tr-input:disabled{opacity:.55}
.tr-code{min-height:64px;text-align:center;letter-spacing:.4em;font:400 26px var(--mono)}
.tr-choice{display:flex;align-items:center;gap:10px;min-height:48px;padding:0 14px;border-radius:10px;border:1px solid var(--line);background:var(--surface-deep)}
.tr-choice input,.tr-check input{width:18px;height:18px;accent-color:var(--accent)}
.tr-label{display:flex;flex-direction:column;gap:8px;font-size:13px;font-weight:600;color:var(--label)}
.tr-2col{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.tr-form{display:flex;flex-direction:column;gap:16px}
.tr-head{display:flex;flex-direction:column;gap:6px}
.tr-head h2{margin:0;font:700 28px var(--display)}
.tr-head p{margin:0;font-size:14px;line-height:1.5;color:var(--muted)}
.tr-kicker{margin:0;font:400 12px var(--mono);color:var(--accent);letter-spacing:.14em}
.tr-btn{min-height:52px;padding:0 20px;border:0;border-radius:12px;background:var(--accent);color:var(--on-accent);font:700 16px var(--display);letter-spacing:.02em;cursor:pointer}
.tr-btn:hover{background:var(--accent-hover)}
.tr-btn:disabled{background:var(--line);color:var(--muted);cursor:not-allowed}
.tr-ghost{min-height:44px;padding:0 14px;border:1px solid var(--line);border-radius:10px;background:transparent;color:var(--text);font:600 13px Inter,system-ui,sans-serif;cursor:pointer;white-space:nowrap}
.tr-ghost:hover{border-color:var(--accent)}
.tr-btn:focus-visible,.tr-ghost:focus-visible,.tr-tab:focus-visible,.tr-nav:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.tr-tab{min-height:48px;padding:8px 10px;border-radius:8px;border:1px solid transparent;background:transparent;color:var(--muted);font:600 13px Inter,system-ui,sans-serif;line-height:1.25;cursor:pointer}
.tr-tab:hover{color:var(--text)}
.tr-tab[aria-pressed="true"]{border-color:var(--accent);background:var(--accent-soft);color:var(--text)}
.tr-note{margin:0;display:flex;gap:10px;align-items:flex-start;font-size:13px;line-height:1.5;color:var(--muted)}
.tr-note::before{content:"";flex:none;width:8px;height:8px;margin-top:6px;border-radius:50%;background:var(--warn)}
.tr-error{margin:0;padding:12px 14px;border-radius:10px;border:1px solid rgb(var(--danger-rgb) / .45);background:rgb(var(--danger-rgb) / .1);color:var(--danger);font-size:14px;line-height:1.5}
.tr-mono{font:400 13px var(--mono)}
.tr-card{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:24px}
.tr-card h2{margin:0;font:700 20px var(--display)}
.tr-panel{width:100%;max-width:520px;background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:clamp(20px,3vw,36px);box-shadow:0 20px 40px var(--shadow);display:flex;flex-direction:column;gap:24px}
.tr-logo{display:flex;align-items:center;gap:12px}
.tr-logo b{font:700 22px var(--display);letter-spacing:.04em}
.tr-pill{font:400 11px var(--mono);color:var(--dim);border:1px solid var(--line);border-radius:999px;padding:4px 10px;letter-spacing:.08em}
.tr-pill.admin{color:var(--warn-text);border-color:var(--warn)}
.tr-center{min-height:100vh;padding:48px 16px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:28px}
/* login page */
.tr-login{min-height:100vh;display:flex;flex-wrap:wrap;align-items:stretch}
.tr-hero{flex:1 1 520px;min-width:0;padding:56px clamp(24px,5vw,80px);display:flex;flex-direction:column;justify-content:space-between;gap:40px;border-right:1px solid var(--line-soft)}
.tr-hero h1{margin:0;font:700 clamp(40px,5vw,64px)/1.05 var(--display);letter-spacing:-.02em;max-width:620px}
.tr-hero p{margin:0;font-size:17px;line-height:1.6;color:var(--muted);max-width:520px}
.tr-side{flex:1 1 460px;min-width:0;padding:56px clamp(16px,4vw,72px);display:flex;align-items:center;justify-content:center}
/* admin */
.tr-top{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px;padding:14px clamp(16px,3vw,40px);background:var(--surface-deep);border-bottom:1px solid var(--line-soft)}
.tr-shell{display:flex;align-items:stretch;min-height:100vh}
.tr-sidebar{flex:none;width:248px;position:sticky;top:0;height:100vh;overflow-y:auto;display:flex;flex-direction:column;gap:18px;padding:18px 14px;background:var(--surface-deep);border-right:1px solid var(--line-soft)}
.tr-sidebar-logo{padding:4px 6px 8px}
.tr-sidebar-nav{display:flex;flex-direction:column;align-items:stretch;gap:2px;margin:0;padding:0}
.tr-sidebar-nav>.tr-nav{margin:0;width:auto;justify-content:flex-start}
.tr-sidebar-head{margin:4px 14px 6px;font:600 11px Inter,system-ui,sans-serif;letter-spacing:.08em;text-transform:uppercase;color:var(--dim)}
.tr-sidebar-foot{margin-top:auto;display:flex;flex-direction:column;gap:8px;padding-top:14px;border-top:1px solid var(--line-soft)}
.tr-sidebar-foot .tr-whoami{font-size:13px;line-height:1.45;color:var(--muted);padding:0 6px}
.tr-sidebar-foot .tr-whoami b{color:var(--text)}
.tr-body{flex:1 1 auto;min-width:0;display:flex;flex-direction:column}
.tr-body>.tr-page{width:100%}
.tr-body>.tr-main{flex:1 1 auto}
.tr-menu-btn{display:none}
@media (max-width:860px){
  .tr-sidebar{position:fixed;left:0;top:0;bottom:0;z-index:60;width:min(280px,86vw);padding-bottom:84px;transform:translateX(-100%);transition:transform .2s;box-shadow:0 0 40px var(--shadow)}
  .tr-sidebar.is-open{transform:none}
  .tr-menu-btn{display:inline-flex;align-items:center;position:fixed;left:16px;bottom:16px;z-index:61;min-height:44px;padding:0 16px;border:1px solid var(--line);border-radius:999px;background:var(--surface);color:var(--text);font:600 14px Inter,system-ui,sans-serif;cursor:pointer;box-shadow:0 4px 14px var(--shadow)}
  .tr-body>.tr-page,.tr-body>.tr-main{padding-bottom:88px}
}
@media (prefers-reduced-motion:reduce){.tr-sidebar{transition:none}}
.tr-sidenav{flex:1 1 200px;max-width:100%;padding:24px 16px;display:flex;flex-direction:column;gap:6px;border-right:1px solid var(--line-soft)}
.tr-main{flex:999 1 560px;min-width:0;padding:32px clamp(16px,3vw,40px);display:flex;flex-direction:column;gap:28px}
.tr-main h1{margin:0;font:700 32px var(--display)}
.tr-nav{display:flex;align-items:center;min-height:44px;padding:0 14px;border-radius:10px;color:var(--muted);font-size:14px;font-weight:600;text-decoration:none}
.tr-nav:hover{color:var(--text)}
.tr-nav[aria-current="page"]{background:var(--accent-soft);color:var(--text)}
.tr-row{display:flex;flex-wrap:wrap;align-items:flex-start;gap:24px}
.tr-table{width:100%;min-width:760px;border-collapse:collapse;font-size:14px}
.tr-table th{padding:12px 16px;border-bottom:1px solid var(--line);text-align:left;font:600 12px Inter,system-ui,sans-serif;letter-spacing:.06em;text-transform:uppercase;color:var(--dim)}
.tr-table td{padding:12px 16px;border-bottom:1px solid var(--line-soft);vertical-align:middle}
.tr-table td.sub{color:var(--muted)}
.tr-badge{display:inline-block;padding:4px 10px;border-radius:999px;font-size:12px;font-weight:600;white-space:nowrap}
.tr-badge.ok{background:var(--accent-soft);color:var(--accent)}
.tr-badge.warn{background:rgb(var(--warn-rgb) / .14);color:var(--warn-text)}
.tr-badge.muted{background:rgb(var(--muted-rgb) / .14);color:var(--muted)}
.tr-actions{display:flex;justify-content:flex-end;gap:8px}
.tr-actions form{margin:0}
.tr-link-box{display:flex;flex-direction:column;gap:10px;padding:16px;border-radius:12px;background:var(--accent-soft);border:1px solid rgb(var(--accent-rgb) / .35)}
.tr-link-box code{flex:1 1 220px;min-width:0;overflow-wrap:anywhere;padding:10px 12px;border-radius:8px;background:var(--surface-deep)}
.tr-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.tr-qr{align-self:center;width:200px;height:200px;padding:8px;border-radius:12px;background:#fff}
.tr-qr svg{width:100%;height:100%;display:block}
.tr-codes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0;padding:16px;list-style:none;border-radius:12px;background:var(--surface-deep);border:1px solid var(--line)}
@media (max-width:520px){.tr-2col{grid-template-columns:1fr}}
@media print{body{background:#fff;color:#000}.tr-codes{border-color:#000;background:#fff}}
/* signed-in pages and COLREG */
.tr-page{max-width:1120px;margin:0 auto;padding:32px clamp(16px,3vw,40px) 64px;display:flex;flex-direction:column;gap:28px}
.tr-h1{margin:0;font:700 clamp(28px,4vw,40px)/1.1 var(--display);text-wrap:balance}
.tr-sub{margin:0;color:var(--muted);font-size:14px;line-height:1.5}
.tr-muted{color:var(--muted)}
.tr-topic{flex:1 1 300px;display:flex;flex-direction:column;gap:14px}
.tr-stat{margin:0;font-size:14px;color:var(--muted)}.tr-stat b{color:var(--text)}
.tr-btn-link,.tr-ghost-link{display:inline-flex;align-items:center;justify-content:center;text-decoration:none}
.tr-btn-link{color:var(--on-accent)}.tr-btn-link:hover{color:var(--on-accent)}
.tr-ghost-link{color:var(--text)}
.tr-list{margin:12px 0 0;padding:0;list-style:none;display:flex;flex-direction:column}
.tr-list li{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:10px 0;border-bottom:1px solid var(--line-soft);font-size:14px}
.tr-quiz{display:flex;flex-direction:column;gap:18px;max-width:900px;width:100%;align-self:center}
.tr-qbar{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;font:400 12px var(--mono);color:var(--dim);letter-spacing:.06em}
.tr-progress{height:4px;border-radius:4px;background:var(--line-soft);overflow:hidden}
.tr-progress i{display:block;height:100%;background:var(--accent)}
.tr-q{margin:0;font:600 19px/1.4 Inter,system-ui,sans-serif}
.tr-pic{border-radius:10px;overflow:hidden;border:1px solid var(--line-soft);background:var(--surface-deep);line-height:0}
.tr-pic svg{width:100%;height:auto;display:block}
.tr-pic img{width:100%;height:auto;display:block}
.tr-pair{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,380px),1fr));gap:18px}
.tr-pair figure{margin:0;display:flex;flex-direction:column;gap:8px;min-width:0}
.tr-pair figcaption{font-size:13px;color:var(--muted);line-height:1.5}
.tr-tag{font:400 11px var(--mono);letter-spacing:.08em;text-transform:uppercase;color:var(--dim)}
.tr-steps{display:flex;gap:8px;flex-wrap:wrap}
.tr-steps span{font:400 12px var(--mono);padding:5px 10px;border-radius:999px;border:1px solid var(--line-soft);color:var(--dim)}
.tr-steps span.now{border-color:var(--accent);color:var(--text)}
.tr-steps span.done-ok{color:var(--accent);border-color:rgb(var(--accent-rgb) / .4)}
.tr-steps span.done-no{color:var(--danger);border-color:rgb(var(--danger-rgb) / .4)}
.tr-opts{display:grid;gap:10px}
.tr-opts button{display:flex;gap:12px;align-items:flex-start;text-align:left;min-height:52px;padding:12px 14px;border-radius:10px;border:1px solid var(--line);background:var(--surface-deep);color:var(--text);cursor:pointer;font:500 15px/1.4 Inter,system-ui,sans-serif}
.tr-opts button:hover:not(:disabled){border-color:var(--accent)}
.tr-opts button:disabled{cursor:default}
.tr-opts .letter{font:400 13px var(--mono);color:var(--dim);padding-top:2px}
.tr-opts button.right{border-color:var(--accent);background:var(--accent-soft)}
.tr-opts button.wrong{border-color:var(--danger);background:rgb(var(--danger-rgb) / .1)}
.tr-feedback{padding:16px;border-radius:12px;background:var(--surface-deep);border:1px solid var(--line);display:flex;flex-direction:column;gap:8px;font-size:15px;line-height:1.55}
.tr-feedback strong{font:700 17px var(--display)}
.tr-feedback.ok strong{color:var(--accent)}.tr-feedback.no strong{color:var(--danger)}
.tr-feedback .rules{font:400 12px var(--mono);color:var(--accent)}
.tr-kicker a{color:inherit}
.tr-rules-part{display:flex;flex-direction:column;gap:4px}
.tr-rules-sec{margin:16px 0 0;font:600 14px var(--display);color:var(--muted)}
.tr-keypoints{margin:12px 0 16px;padding-left:20px;display:flex;flex-direction:column;gap:8px;line-height:1.55}
.tr-rule-text{display:flex;flex-direction:column;gap:10px;line-height:1.6;overflow-wrap:anywhere}
.tr-rule-text p{margin:0}
.tr-rule-text p.l2{padding-left:28px}
.tr-rule-text h3{margin:14px 0 0;font:700 16px var(--display)}
.tr-rule-text h3.sub{margin-top:6px;font-size:14px;font-style:italic}
.tr-rule-text pre{margin:0;overflow-x:auto;font:400 13px var(--mono);color:var(--muted)}
.tr-rule-table{overflow-x:auto}
.tr-rule-table .tr-table{min-width:420px}
.tr-rule-text a,.tr-keypoints a{color:var(--accent)}

.tr-check-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,220px),1fr));gap:14px;margin-top:12px}
.tr-check-grid figure{margin:0;display:flex;flex-direction:column;gap:6px;min-width:0}
.tr-check-grid figcaption{font-size:12px;color:var(--muted);line-height:1.45}
.tr-check-actions{display:flex;flex-direction:column;gap:12px}
.tr-report summary{cursor:pointer;font-weight:600;font-size:14px;color:var(--accent)}
.tr-textarea{min-height:110px;padding:12px 14px;resize:vertical;font:400 14px/1.5 Inter,system-ui,sans-serif}
.tr-note-ok::before{background:var(--accent)}
.tr-guide summary{cursor:pointer}
.tr-guide ol{margin:12px 0;padding-left:22px;display:flex;flex-direction:column;gap:8px;line-height:1.55;font-size:15px}

.tr-theme{position:fixed;right:16px;bottom:16px;z-index:50;min-height:40px;padding:0 14px;border:1px solid var(--line);border-radius:999px;background:var(--surface);color:var(--text);font:600 13px Inter,system-ui,sans-serif;cursor:pointer;box-shadow:0 4px 14px var(--shadow)}
.tr-theme:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
@media print{.tr-theme{display:none}}
.tr-poster{display:flex;flex-direction:column;gap:16px}
.tr-poster-card{display:flex;flex-direction:column;gap:8px;min-width:0;padding:18px}
.tr-poster-card h2{font-size:17px}
.tr-poster-pics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;align-items:start}
.tr-poster-noday{grid-column:1/-1;margin:0;text-align:center}
@media (max-width:760px){.tr-poster-pics{grid-template-columns:repeat(2,minmax(0,1fr))}}
.tr-poster figure{margin:0;display:flex;flex-direction:column;gap:4px;min-width:0}
.tr-poster figcaption{font-size:11.5px;color:var(--muted);line-height:1.35}
@media print{
  .tr-top,.tr-sidebar,.tr-menu-btn,.tr-noprint,.tr-theme{display:none!important}
  .tr-page{padding:0}
  .tr-poster{gap:8px}
  .tr-poster-card{break-inside:avoid;padding:12px;border-color:#999;background:#fff;color:#000}
  .tr-poster figcaption,.tr-poster .tr-sub{color:#333}
  @page{size:landscape;margin:10mm}
}
/* COLREG drawings: a flashing light (Annex I 12: 120 flashes a minute) blinks; with motion off, and on paper, a dashed ring marks it instead */
@keyframes tr-flash{0%,49%{opacity:1}50%,100%{opacity:.08}}
.tr-flash{animation:tr-flash .5s steps(1,end) infinite}
.tr-flash-ring{display:none}
@media (prefers-reduced-motion:reduce){.tr-flash{animation:none}.tr-flash-ring{display:inline}}
@media print{.tr-flash{animation:none}.tr-flash-ring{display:inline}}
/* sound and light signals: the practice question (colreg_round.html) */
.tr-signal{display:flex;flex-direction:column;gap:12px}
.tr-signal .tr-pic{max-width:420px}
.tr-sig-controls{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
#lamp .glow{opacity:0;transition:opacity .08s}
#lamp.on .glow{opacity:.55}
#lamp .core{fill:#3a3f47;transition:fill .08s}
#lamp.on .core{fill:#ffffff}
.tr-sigopt{display:flex;gap:8px;align-items:stretch}
.tr-sigopt .tr-sig-answer{flex:1 1 auto;min-width:0}
.tr-sigopt .tr-sig-play{flex:0 0 52px;justify-content:center;align-items:center;padding:0}
.tr-sig-pattern{margin:0;font-size:18px;letter-spacing:.08em}
/* the signals table and check pages (signal_table.js) */
.tr-sig-list li{align-items:center}
.tr-sig-what{flex:1 1 260px;min-width:0;line-height:1.45}
.tr-sig-cell{display:inline-flex;flex-wrap:wrap;align-items:center;gap:8px}
.tr-sig-text{font-size:16px;letter-spacing:.04em}
.tr-sig-btn{min-height:44px;min-width:44px;white-space:nowrap}
.tr-sig-lamp{display:inline-block;flex:0 0 auto;width:32px;height:32px;border-radius:8px;background:radial-gradient(circle,#3a3f47 0 6px,#0b1626 7px)}
.tr-sig-lamp.on{background:radial-gradient(circle,#fff 0 7px,rgb(255 255 255 / .45) 8px 11px,#0b1626 14px)}
.tr-sig-thumb{display:block;width:160px;max-width:100%}
.tr-sig-group{margin:20px 0 4px;font-size:15px;letter-spacing:.04em;text-transform:uppercase;color:var(--label);font-family:var(--display)}
.tr-sig-media{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-start}
.tr-sig-medium{margin:0;display:flex;flex-direction:column;gap:6px;width:220px;max-width:100%}
.tr-sig-medium figcaption{line-height:1.35}
.tr-sig-photo{display:block;width:100%}
.tr-sig-words{font-size:16px}
.tr-sig-question{padding:16px 0;border-bottom:1px solid var(--line-soft)}
.tr-sig-question h3{margin:0 0 8px;font-size:16px}
.tr-sig-shown{margin:0 0 4px}
/* buoys and marks: the practice question (colreg_round.html), the reference page and the check pages (buoy_pages.js) */
.tr-buoy{display:flex;flex-direction:column;gap:8px}
.tr-buoy .tr-pic{max-width:360px}
.tr-buoy .tr-pic.tr-buoy-chart,.tr-buoy-chart{max-width:640px}
.tr-chart-sample{display:flex;flex-direction:column;gap:6px;margin:0 0 8px}
.tr-chart-sample .tr-buoy-chart{width:100%}
/* narrow screens: the chart runs into the card padding, full width (its text is sized by buoy_charts.js) */
@media (max-width:520px){.tr-card .tr-buoy-chart,.tr-buoy .tr-pic.tr-buoy-chart{margin-left:-23px;margin-right:-23px;max-width:none;width:auto;border-radius:0;border-left:0;border-right:0}}
.tr-buoy-mark{display:flex;flex-direction:column;gap:6px}
article.tr-buoy-mark+article.tr-buoy-mark{border-top:1px solid var(--line-soft);padding-top:16px;margin-top:8px}
.tr-buoy-mark h3{margin:0;font-size:17px}
.tr-buoy-mark p{margin:0;line-height:1.5}
.tr-buoy-looks{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-start}
.tr-buoy-looks figure{margin:0;display:flex;flex-direction:column;gap:4px;width:132px;max-width:calc(50% - 6px)}
.tr-buoy-thumb{display:block;width:100%}
.tr-buoy-mini{width:96px;flex:0 0 auto}
.tr-buoy-shown{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:0 0 8px}
.tr-buoy-shown .tr-buoy-thumb{width:200px;max-width:100%}
.tb-rhythm{margin:0;padding:6px 8px;font-size:14px;line-height:1.4;color:var(--muted)}
.tr-buoy-lights{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:8px}
.tr-buoy-lights li{display:inline-flex;align-items:center;gap:8px;padding:4px 4px 4px 12px;border:1px solid var(--line-soft);border-radius:10px}
/* rules knowledge: the drawn situations (scenarios.js) */
.tr-scenario{max-width:560px;width:100%}
.tr-chart-sample .tr-scenario{max-width:560px}
/* onboard calendar (onboard_*.html): ship colours 0-3, the month grid, the ship timeline */
:root{--ship-2:#A78BFA;--ship-3:#7DD3FC}
@media (prefers-color-scheme:light){:root:not([data-theme="dark"]){--ship-2:#6D28D9;--ship-3:#0369A1}}
:root[data-theme="light"]{--ship-2:#6D28D9;--ship-3:#0369A1}
.tr-ship-0{--c:var(--accent)}.tr-ship-1{--c:var(--warn)}.tr-ship-2{--c:var(--ship-2)}.tr-ship-3{--c:var(--ship-3)}
.tr-ob-bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px}
.tr-ob-nav{display:flex;flex-wrap:wrap;gap:8px}
.tr-ob-stats{display:flex;flex-wrap:wrap;gap:14px}
.tr-ob-stat{flex:1 1 150px;display:flex;flex-direction:column;gap:2px;padding:16px 20px}
.tr-ob-stat b{font:700 32px var(--display)}
.tr-ob-grid{width:100%;margin-top:16px;border-collapse:collapse;table-layout:fixed}
.tr-ob-grid th{padding:6px 2px;font:600 11px Inter,system-ui,sans-serif;letter-spacing:.06em;text-transform:uppercase;color:var(--dim)}
.tr-ob-grid td{height:72px;padding:4px;vertical-align:top;border:1px solid var(--line-soft);overflow:hidden}
.tr-ob-grid td .n{display:block;font:500 13px Inter,system-ui,sans-serif;color:var(--muted)}
.tr-ob-grid td.out .n{color:var(--placeholder)}
.tr-ob-grid td.out{background:var(--surface-deep)}
.tr-ob-grid td.today{outline:2px solid var(--accent);outline-offset:-2px}
.tr-ob-grid td.today .n{color:var(--text);font-weight:700}
.tr-ob-mark{display:block;margin-top:4px;min-height:22px;padding:3px 5px;border-radius:5px;border-left:3px solid var(--c);background:color-mix(in srgb,var(--c) 22%,transparent);font-size:11px;line-height:1.3;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tr-ob-grid td.out .tr-ob-mark{opacity:.55}
.tr-ob-legend{margin:14px 0 0;padding:0;list-style:none;display:flex;flex-wrap:wrap;gap:8px 18px;font-size:13px;color:var(--muted)}
.tr-ob-legend li{display:inline-flex;align-items:center;gap:8px}
.tr-ob-swatch{display:inline-block;width:16px;height:12px;border-radius:3px;border-left:3px solid var(--c);background:color-mix(in srgb,var(--c) 30%,transparent)}
@media (max-width:600px){.tr-ob-month .tr-ob-swatch{border-left:0;background:var(--c)}.tr-ob-grid td{height:52px;padding:2px}.tr-ob-mark{min-height:14px;padding:0;border-left:0;background:var(--c)}.tr-ob-mark .nm{display:none}.tr-ob-grid th{font-size:10px;letter-spacing:0}}
.tr-ob-periods,.tr-ob-vessels{margin:12px 0 0;padding:0;list-style:none;display:flex;flex-direction:column}
.tr-ob-periods>li,.tr-ob-vessels>li{display:flex;flex-wrap:wrap;align-items:center;gap:10px 18px;padding:14px 0;border-bottom:1px solid var(--line-soft);font-size:14px}
.tr-ob-periods .what,.tr-ob-vessels .what{flex:1 1 260px;min-width:0;display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px}
.tr-ob-periods .nums{display:flex;flex-wrap:wrap;gap:4px 16px;color:var(--muted)}
.tr-ob-periods .nums b{color:var(--text);font-size:16px}
.tr-ob-periods .tr-actions a,.tr-steps-row a{display:inline-flex}
.tr-ob-note{flex-basis:100%;color:var(--muted);white-space:pre-line;overflow-wrap:anywhere}
.tr-ob-details{flex-basis:100%}
.tr-ob-details summary{cursor:pointer;font-size:13px;font-weight:600;color:var(--accent)}
.tr-ob-hist{margin:10px 0 0;padding-left:20px;display:flex;flex-direction:column;gap:8px;font-size:13px;line-height:1.5}
.tr-ob-hist li{display:flex;flex-direction:column}
.tr-ob-hist ul{margin:2px 0 0;padding-left:16px;color:var(--muted)}
.tr-ob-vessels .acts{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.tr-ob-vessels .acts form{margin:0}
.tr-ob-inline{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:0}
.tr-ob-inline .tr-input{min-height:44px;width:auto;min-width:0;flex:1 1 150px;max-width:260px}
.tr-ob-formcard{max-width:640px;width:100%}
.tr-ob-who{margin:0;display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px}
.tr-ob-cadet{margin:0;padding:0;border:0;display:flex;flex-direction:column;gap:8px}
.tr-hint{font-weight:400;font-size:12px;color:var(--muted)}
.tr-steps-row{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.tr-btn-danger{background:var(--danger);color:var(--surface)}.tr-btn-danger:hover{background:var(--danger);filter:brightness(1.08)}
.tr-ok{margin:0;padding:12px 14px;border-radius:10px;border:1px solid rgb(var(--accent-rgb) / .4);background:var(--accent-soft);color:var(--text);font-size:14px}
.tr-ob-tl{margin-top:16px;display:flex;flex-direction:column}
.tr-ob-tl-row{display:grid;grid-template-columns:minmax(96px,200px) minmax(0,1fr);gap:12px;align-items:center;padding:8px 0;border-bottom:1px solid var(--line-soft)}
.tr-ob-tl-row.head{padding:0 0 4px}
.tr-ob-tl-row .who{min-width:0;display:flex;flex-direction:column;font-size:14px;font-weight:600;overflow-wrap:anywhere}
.tr-ob-tl-row .who .tr-muted{font-size:12px;font-weight:400}
.tr-ob-tl .track{position:relative;height:30px}
.tr-ob-tl .head .track{height:38px}
.tr-ob-tl .month{position:absolute;top:0;padding-left:4px;font:400 11px var(--mono);color:var(--dim);white-space:nowrap;overflow:hidden;border-left:1px solid var(--line)}
.tr-ob-tl .todaylbl{position:absolute;top:20px;transform:translateX(-50%);font:600 11px Inter,system-ui,sans-serif;color:var(--warn-text);white-space:nowrap}
.tr-ob-tl .grid{position:absolute;top:0;bottom:0;border-left:1px solid var(--line-soft)}
.tr-ob-tl .seg{--c:var(--ship-2);position:absolute;top:7px;height:16px;border-radius:4px;background:var(--c)}
.tr-ob-tl .seg.cadet,.tr-ob-swatch.done.cadet{--c:var(--accent)}
.tr-ob-tl .seg.plan{background:repeating-linear-gradient(135deg,color-mix(in srgb,var(--c) 55%,transparent) 0 4px,transparent 4px 8px);box-shadow:inset 0 0 0 1px var(--c)}
.tr-ob-tl .now{position:absolute;top:-8px;bottom:-8px;width:2px;margin-left:-1px;background:var(--warn)}
.tr-ob-swatch.done{--c:var(--ship-2);border-left:0;background:var(--c)}
.tr-ob-swatch.plan{--c:var(--muted);border-left:0;background:repeating-linear-gradient(135deg,var(--c) 0 3px,transparent 3px 6px);box-shadow:inset 0 0 0 1px var(--c)}
.tr-ob-swatch.nowline{width:3px;border-left:0;background:var(--warn)}
@media (max-width:520px){.tr-ob-tl-row{grid-template-columns:minmax(0,1fr)}.tr-ob-tl-row.head .who{display:none}.tr-ob-tl-row{gap:4px}}
/* timeline bars cut off by the window edge: square end, fading out, so it doesn't read as a sign-on/off that day */
.tr-ob-tl .seg.clip-l{border-top-left-radius:0;border-bottom-left-radius:0;-webkit-mask-image:linear-gradient(90deg,rgb(0 0 0 / .25),#000 18px);mask-image:linear-gradient(90deg,rgb(0 0 0 / .25),#000 18px)}
.tr-ob-tl .seg.clip-r{border-top-right-radius:0;border-bottom-right-radius:0;-webkit-mask-image:linear-gradient(270deg,rgb(0 0 0 / .25),#000 18px);mask-image:linear-gradient(270deg,rgb(0 0 0 / .25),#000 18px)}
.tr-ob-tl .seg.clip-l.clip-r{-webkit-mask-image:linear-gradient(90deg,rgb(0 0 0 / .25),#000 18px,#000 calc(100% - 18px),rgb(0 0 0 / .25));mask-image:linear-gradient(90deg,rgb(0 0 0 / .25),#000 18px,#000 calc(100% - 18px),rgb(0 0 0 / .25))}
.tr-topic-pre{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
/* demo copy (TRAINEE_DEMO=1): a banner above every page; solid warn amber with near-black text reads in both themes */
.tr-demo{background:var(--warn);color:#1A1200;padding:10px 16px;border-bottom:2px solid #1A1200;text-align:center;font:500 14px/1.4 Inter,system-ui,sans-serif;overflow-wrap:anywhere}
.tr-demo p{margin:0}
.tr-demo p[lang="en"]{font-weight:700}
.tr-demo p+p{margin-top:2px}
@media print{.tr-demo{background:none;color:#000;border-bottom:1px solid #000}}
/* terms of use (spec 2026-10-31-terms-of-use): the text box (scrolls inside forms), the acceptance checkbox, footer */
.tr-terms-panel{max-width:860px}
.tr-terms{max-height:min(50vh,420px);overflow-y:auto;display:flex;flex-direction:column;gap:20px;padding:16px;border-radius:12px;border:1px solid var(--line);background:var(--surface-deep);color:var(--text);font-size:14px;line-height:1.55;overflow-wrap:anywhere}
.tr-terms:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.tr-terms-full{max-height:none;overflow:visible;background:transparent;border:0;padding:0}
.tr-terms-lang{display:flex;flex-direction:column;min-width:0}
.tr-terms-lang + .tr-terms-lang{padding-top:16px;border-top:1px solid var(--line-soft)}
.tr-terms .tr-tag{margin:0 0 6px}
.tr-terms h3{margin:10px 0 4px;font-size:16px}.tr-terms h4{margin:8px 0 4px;font-size:14px}
.tr-terms p{margin:0 0 8px}.tr-terms ol,.tr-terms ul{margin:8px 0 4px;padding-left:24px;font-weight:600}
.tr-terms-check{display:flex;align-items:flex-start;gap:12px;min-height:44px;font-size:14px;line-height:1.45;color:var(--text)}
.tr-terms-check input{flex:none;width:20px;height:20px;margin:1px 0 0;accent-color:var(--accent)}
.tr-terms-actions{display:flex;flex-wrap:wrap;gap:12px;align-items:center}
.tr-terms-actions form{margin:0}
.tr-terms-edit{min-height:320px}
.tr-terms-table{min-width:0}
.tr-foot{padding:24px 16px 80px;text-align:center;font-size:13px;color:var(--muted)}
.tr-sort{all:unset;cursor:pointer;display:inline-flex;align-items:center;gap:6px;font:inherit;letter-spacing:inherit;text-transform:inherit;color:inherit}
.tr-sort::after{content:"↕";font-size:11px;opacity:.45}
th[aria-sort="ascending"] .tr-sort::after{content:"↑";opacity:1}
th[aria-sort="descending"] .tr-sort::after{content:"↓";opacity:1}
.tr-sort:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:4px}
.tr-pass{position:relative;display:block}
.tr-pass>input{width:100%;padding-right:118px;box-sizing:border-box}
.tr-pass-btn{position:absolute;right:6px;top:50%;transform:translateY(-50%);min-height:34px;padding:0 10px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--text);font:600 12px Inter,system-ui,sans-serif;cursor:pointer}
.tr-pass-btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.tr-th{display:inline-flex;flex-direction:column;gap:2px;line-height:1.25}
.tr-th-et{font-weight:500;font-size:11px;letter-spacing:.04em;color:var(--dim);opacity:.85}
/* the language switch of the learning sections (EST | ENG): in the menu and at the top of every learning page */
.tr-lang{display:inline-flex;align-items:center;gap:2px;margin:0;font:600 13px Inter,system-ui,sans-serif;color:var(--muted)}
.tr-lang button{min-height:36px;min-width:44px;padding:0 8px;border:1px solid transparent;border-radius:8px;background:transparent;color:var(--muted);font:inherit;cursor:pointer}
.tr-lang button:hover{color:var(--text);border-color:var(--line)}
.tr-lang button[aria-pressed="true"]{color:var(--text);background:var(--accent-soft)}
.tr-lang-top{display:flex;justify-content:flex-end;margin:0 0 4px}
