:root { --paper: #efece5; --ink: #1c1c1a; --dim: #55534d; --rule: #d6d3cb; --navy: #000080; --grey: #808080; }
* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; color: var(--ink); font: 15px/1.45 Tahoma, Geneva, Verdana, sans-serif; -webkit-text-size-adjust: 100%; }
a { color: var(--navy); }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

#board { position: relative; max-width: 980px; margin: 0 auto; padding: 8px 16px 40px; visibility: hidden; }
#board.ready { visibility: visible; }

.wm { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; color: inherit; text-decoration: none; white-space: nowrap; }
.wm img { height: 38px; width: auto; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 9; padding: 8px 12px; background: #fff; border: 1px solid var(--ink); }
.skip:focus { top: 8px; }
h1 { margin: 24px 0 14px; font-size: clamp(34px, 10vw, 46px); line-height: 1.05; font-weight: 700; letter-spacing: -.01em; }
.lede p { margin: 0 0 10px; font-size: 16px; line-height: 1.5; max-width: 34em; }

.ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 24px 0 8px; font-size: 14px; }
#who { display: flex; gap: 6px; }
.ctl button { font: 14px Tahoma, Geneva, Verdana, sans-serif; color: #000; background: #c0c0c0; border: 0; padding: 0 12px; min-height: 30px; cursor: pointer; box-shadow: inset -1px -1px #000, inset 1px 1px #fff, inset -2px -2px #808080, inset 2px 2px #dfdfdf; }
.ctl button[aria-pressed=true] { font-weight: 700; background: #d9d9d9; box-shadow: inset 1px 1px #000, inset -1px -1px #fff, inset 2px 2px #808080, inset -2px -2px #dfdfdf; }

.mon { aspect-ratio: 4 / 3; -webkit-user-select: none; user-select: none; }
.fig svg { -webkit-user-select: none; user-select: none; touch-action: manipulation; }
.sheet tr:has(td):hover td { background: rgba(0, 0, 128, .06); }
#tip { position: fixed; z-index: 50; pointer-events: none; max-width: 300px; padding: 5px 9px 6px; background: #ffffe1; color: #000; border: 1px solid #000; box-shadow: 2px 2px 0 rgba(0, 0, 0, .2); font: 13px/1.45 Tahoma, Geneva, Verdana, sans-serif; }
#tip[hidden] { display: none; }
#tip b, #tip span, #tip em, #tip small { display: block; }
#tip i { display: inline-block; width: 9px; height: 9px; margin-right: 6px; vertical-align: -1px; }
#tip em { font-style: normal; margin-top: 4px; max-width: 280px; }
#tip small { margin-top: 5px; color: #555; font-size: 12px; }
.mon iframe { display: block; width: 100%; height: 100%; border: 0; background: var(--paper); }

.sheets { margin-top: 28px; }
.sheet { margin: 0 0 24px; padding: 14px 16px 16px; background: #fff; border: 1px solid var(--grey); box-shadow: 2px 3px 0 rgba(0, 0, 0, .2); }
.sheet h2 { margin: 0 0 6px; font-size: 15px; font-weight: 700; }
.cap { margin: 0 0 10px; color: var(--dim); font-size: 14px; }
.cap.after { margin: 10px 0 0; }
[data-b=pts] { display: none; }

table { border-collapse: collapse; width: 100%; font-size: 14px; }
td, th { padding: 5px 0 5px 12px; text-align: right; white-space: nowrap; vertical-align: top; }
td:first-child, th:first-child { padding-left: 0; text-align: left; white-space: normal; }
th { font-weight: 700; border-bottom: 1px solid var(--ink); }
tr + tr td { border-top: 1px solid var(--rule); }
.no { color: #6f6e68; }
.at { font: inherit; color: var(--navy); background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

.key { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; font-size: 13px; }
.key i { display: inline-block; width: 11px; height: 11px; margin-right: 5px; vertical-align: -1px; border: 1px solid var(--ink); }
svg { display: block; }
.fig svg text { font: 13px Tahoma, Geneva, Verdana, sans-serif; fill: var(--ink); }
#lines { display: none; position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
#lines g .ln, #lines g .tg { transition: stroke-width .12s; }
#lines g.hot .ln { stroke-width: 2.75; }
#lines g.hot .tg { stroke-width: 3; }
#lines g.e0.hot .tg { fill: rgba(0, 0, 128, .1); }
#lines g.e4 .bx { opacity: 0; transition: opacity .12s; }
#lines g.e4.hot .bx { opacity: 1; }

header.site .bar, footer.site .in { max-width: 980px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
header.site .bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 24px; min-height: 72px; padding-top: 10px; padding-bottom: 10px; }
header.site nav { display: flex; flex-wrap: wrap; gap: 0 22px; }
header.site nav a { display: inline-block; padding: 10px 0; font-size: 15px; color: var(--ink); text-decoration: none; }
header.site nav a:hover { text-decoration: underline; text-underline-offset: 3px; }
header.site nav a[aria-current] { font-weight: 700; }
footer.site { margin-top: 24px; font-size: 14px; }
footer.site .in { display: grid; grid-template-columns: minmax(0, 2.2fr) 1fr 1fr; gap: 24px 40px; padding-top: 34px; padding-bottom: 48px; }
footer.site .wm { font-size: 17px; }
footer.site .wm img { height: 30px; }
html footer.site p { margin: 12px 0 0; font-size: 14px; max-width: 34em; line-height: 1.55; }
html footer.site h2 { margin: 6px 0 8px; font-size: 14px; }
footer.site nav a { display: block; padding: 4px 0; }
html footer.site .team p { margin: 0 0 12px; color: inherit; line-height: 1.5; }
html footer.site .team b { font-size: 15px; }

html[data-p=p1] header.site { border-bottom: 1px solid var(--ink); }
html[data-p=p1] footer.site { border-top: 1px solid var(--ink); }
html[data-p=p1] footer.site .about p { color: var(--dim); }

html[data-p=p2] header.site, html[data-p=p2] footer.site { background: #c0c0c0; color: #000; box-shadow: inset 0 1px #fff, inset 0 -1px #808080; }
html[data-p=p2] header.site { border-bottom: 1px solid #000; }
html[data-p=p2] footer.site { border-top: 1px solid #fff; }
html[data-p=p2] header.site .bar { min-height: 58px; padding-top: 6px; padding-bottom: 6px; }
html[data-p=p2] header.site .wm { padding: 4px 12px 4px 8px; font-size: 17px; box-shadow: inset -1px -1px #000, inset 1px 1px #fff, inset -2px -2px #808080, inset 2px 2px #dfdfdf; }
html[data-p=p2] header.site .wm img { height: 30px; }
html[data-p=p2] header.site nav { gap: 6px; }
html[data-p=p2] header.site nav a { padding: 8px 14px; color: #000; box-shadow: inset -1px -1px #000, inset 1px 1px #fff, inset -2px -2px #808080, inset 2px 2px #dfdfdf; }
html[data-p=p2] header.site nav a[aria-current] { background: #d9d9d9; box-shadow: inset 1px 1px #000, inset -1px -1px #fff, inset 2px 2px #808080, inset -2px -2px #dfdfdf; }
html[data-p=p2] footer.site a { color: #000; }

html[data-p=p3] header.site, html[data-p=p3] footer.site { background: #000080; color: #fff; }
html[data-p=p3] header.site .wm img, html[data-p=p3] footer.site .wm img { filter: invert(1); }
html[data-p=p3] header.site nav a, html[data-p=p3] footer.site a { color: #fff; }
html[data-p=p3] header.site nav a[aria-current] { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }
html[data-p=p3] footer.site .about p { color: #d6d6f0; }
html[data-p=p3] :is(header, footer).site :focus-visible { outline-color: #fff; }
#fail, #nojs { margin: 40px 16px; font-size: 16px; }

body.doc main { max-width: 760px; margin: 0 auto; padding: 8px 16px 64px; }
body.doc h1 { margin: 36px 0 18px; font-size: clamp(32px, 8vw, 42px); }
body.doc h2 { margin: 40px 0 10px; font-size: 21px; }
body.doc p, body.doc li { font-size: 16px; line-height: 1.6; max-width: 38em; }
body.doc p { margin: 0 0 14px; }
body.doc p.intro { font-size: 18px; }
body.doc ul { margin: 0 0 14px; padding-left: 20px; }
body.doc li { margin-bottom: 8px; }
body.doc .sheet { margin: 18px 0 22px; overflow-x: auto; }
body.doc td:last-child, body.doc th:last-child { padding-left: 16px; }
body.doc table.words td, body.doc table.words th { text-align: left; white-space: normal; }
body.doc table.words td:first-child { white-space: nowrap; }
body.doc table:not(.num) td + td:not(:last-child), body.doc table:not(.num) th + th:not(:last-child) { padding-left: 16px; text-align: left; white-space: normal; }
body.doc .sum td { font-weight: 700; border-top: 1px solid var(--ink); }

@media (pointer: coarse) {
  .ctl button { min-height: 44px; padding: 0 16px; }
  .at { padding: 12px 0 12px 8px; margin: -12px 0; }
}

@media (max-width: 480px) {
  header.site .wm { font-size: 18px; }
  header.site .wm img { height: 32px; }
  header.site nav { gap: 0 18px; }
  html[data-p=p2] header.site nav { gap: 6px; }
  html[data-p=p2] header.site nav a { padding: 8px 10px; }
}

@media (max-width: 759px) {
  footer.site .in { grid-template-columns: 1fr 1fr; }
  footer.site .about { grid-column: 1 / -1; }
  .mon { margin-top: 4px; }
}

@media (min-width: 760px) and (max-width: 1279px) {
  #board, header.site .bar, footer.site .in { padding-left: 28px; padding-right: 28px; }
  .sheets { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
  .sheets .sheet { margin: 0; }
  .sheets .span { grid-column: 1 / -1; }
}

@media (min-width: 1280px) {
  #wrap { overflow: hidden; }
  #board { width: 1440px; max-width: none; margin: 0; padding: 0; transform-origin: 0 0; }
  #board [data-b] { position: absolute; margin: 0; float: none; }
  header.site .bar, footer.site .in { max-width: none; width: calc(1440px * var(--k, 1)); padding-left: calc(40px * var(--k, 1)); padding-right: calc(40px * var(--k, 1)); }  .sheets { margin: 0; }
  [data-b=pts] { display: block; }
  h1 { font-size: 44px; }
  .ctl { justify-content: flex-start; margin: 0; }
  #lines { display: block; }
}

body.doc h3 { margin: 28px 0 8px; font-size: 17px; }
.hb-k { margin: 0 0 10px; font-size: 13px; color: var(--dim); }
.hb-k i, .hb i { display: inline-block; height: 9px; }
.hb-k i { width: 9px; margin: 0 5px 0 0; vertical-align: -1px; }
.hb-k i + i, .hb-k i.q { margin-left: 12px; }
.hb { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 10px; padding: 3px 0; font-size: 13px; }
.hb:hover { background: rgba(0, 0, 128, .06); }
.hb-r { display: flex; align-items: center; gap: 5px; height: 12px; }
.hb i { width: calc(var(--v) * (100% - 38px)); min-width: 1px; }
.hb b { font-weight: 400; font-size: 11px; }
i.a { background: #000080; }
i.q { background: #808080; }
body.doc table.res td, body.doc table.res th { text-align: right; padding-left: 14px; white-space: nowrap; }
body.doc table.res td:first-child, body.doc table.res th:first-child { text-align: left; padding-left: 0; }
@media (max-width: 520px) { .hb { grid-template-columns: 1fr; gap: 2px; } }
body.doc .sheet h2 { margin: 0 0 6px; font-size: 15px; }
body.doc table.res th { white-space: normal; vertical-align: bottom; font-size: 13px; line-height: 1.25; }
body.doc table.res th:first-child { width: 150px; }
.res2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 40px; margin: 10px 0 4px; }
.res2 h3 { margin: 0 0 6px; font-size: 14px; }
@media (max-width: 759px) { .res2 { grid-template-columns: 1fr; } }
#res { max-width: 760px; margin: 0 auto; padding: 8px 16px 48px; }
#res h2 { margin: 36px 0 10px; font-size: 21px; }
#res h3 { margin: 28px 0 8px; font-size: 17px; }
#res p, #res li { font-size: 16px; line-height: 1.6; max-width: 38em; }
#res p { margin: 0 0 14px; }
#res ul { margin: 0 0 14px; padding-left: 20px; }
#res li { margin-bottom: 8px; }
#res .sheet { margin: 18px 0 22px; overflow-x: auto; }
#res .sheet h2 { margin: 0 0 6px; font-size: 15px; }
#res table.res td, #res table.res th { text-align: right; padding-left: 14px; white-space: nowrap; }
#res table.res td:first-child, #res table.res th:first-child { text-align: left; padding-left: 0; }
#res table.res th { white-space: normal; vertical-align: bottom; font-size: 13px; line-height: 1.25; }
#res table.res th:first-child { width: 150px; }
