/* The field (#field, Dec 1, docs/REDESIGN.md "The field"): the rating systems by camp, ours placed among them. The
   Model pages' look (15-model.css): a head, tiles, plain section titles, keys and folded tables. The closing line is
   blue (--score), this model orange (--turn), every other system gray; a camp picked stands out in the light blue tint.
   One slice of the page's stylesheet. The files load in the order of their numbers (the <link> list in
   web/site_template.html) and several rules rely on that order at equal specificity: never reorder or merge
   them without running tests/layout_check.js. */
#field { width: 100%; max-width: 1120px; margin: 0 auto; box-sizing: border-box; gap: 20px; min-width: 0; }

/* the opening: the numbers, then the contested game in a line of its own */
.fx-lead { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 14px 36px; align-items: start; margin-top: 20px; }
.fx-lead p { margin: 0; font-size: 1.05rem; line-height: 1.5; }
.fx-lead p + p { padding-left: 14px; border-left: 3px solid var(--turn); font-family: var(--f-display); font-weight: 600; font-size: 1.16rem;
  line-height: 1.22; color: var(--ink); }

/* the map */
.fx-pick { margin-bottom: 2px; }
.fx-campline { margin: 0 0 10px; font-size: 0.9rem; color: var(--muted); min-height: 1.4em; max-width: 90ch; }
.fx-campline b { color: var(--ink); }
.fx-cnt { white-space: nowrap; }
.fx-map { position: relative; min-width: 0; padding: 14px 12px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.fx-svg { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--f-body); }
.fx-svg .fx-col { fill: var(--bg); stroke: none; transition: fill 0.15s; }
.fx-svg.pick .fx-col { opacity: 0.55; }
.fx-svg .fx-col.on { fill: var(--score-tint); opacity: 1; }
.fx-svg .fx-ch { font-size: 12px; font-weight: 700; fill: var(--ink); }
.fx-svg .fx-cn { font-size: 11px; font-weight: 400; fill: var(--muted); }
.fx-svg.pick .fx-ch:not(.on) { opacity: 0.45; }
.fx-svg .fx-gl { font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; fill: var(--muted); }
.fx-svg .fx-arrow { stroke: var(--line-strong); stroke-width: 1.5; }
.fx-svg .fx-arrowh { fill: var(--line-strong); }
.fx-svg .fx-grid { stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 1 4; opacity: 0.7; }
.fx-svg .fx-zero { stroke: var(--turn); stroke-width: 1.5; stroke-dasharray: 6 3; }
.fx-svg .fx-tk { font-size: 11px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.fx-svg .fx-tk.z { fill: var(--turn); font-weight: 700; }
.fx-svg .fx-ax { font-size: 11px; font-weight: 600; fill: var(--muted); }
.fx-svg .fx-dir { font-size: 11px; fill: var(--muted); }
.fx-svg .fx-sep { stroke: var(--line-strong); stroke-width: 1; }
.fx-svg .fx-rowl { stroke: var(--line); stroke-width: 1; }
/* each system: gray, hollow when graded on only some games, a square when not graded here; the line blue, ours orange */
.fx-n { cursor: pointer; outline: none; transition: opacity 0.15s; }
.fx-n .fx-hit { fill: transparent; stroke: none; }
.fx-n .fx-d { fill: var(--muted); stroke: var(--surface); stroke-width: 1.5; }
.fx-n.part .fx-d { fill: var(--surface); stroke: var(--muted); stroke-width: 1.6; }
.fx-n.un .fx-d { fill: var(--surface); stroke: var(--muted); stroke-width: 1.3; }
.fx-n.k-line .fx-d { fill: var(--score); }
.fx-n.r-ours .fx-d { fill: var(--turn); }
.fx-n .fx-ring { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 3 2; }
.fx-n .fx-lb { font-size: 12px; font-weight: 600; fill: var(--ink); paint-order: stroke; stroke: var(--bg); stroke-width: 3px; stroke-linejoin: round; }
.fx-svg.tall .fx-n .fx-lb { font-size: 11px; }
.fx-n.un .fx-lb { font-weight: 400; fill: var(--muted); }
.fx-n .fx-lb.v { font-weight: 400; fill: var(--muted); }
.fx-n.r-ours .fx-lb { fill: var(--turn); font-weight: 700; }
.fx-n.k-line .fx-lb { fill: var(--score); }
.fx-n:hover .fx-d, .fx-n.act .fx-d { stroke: var(--ink); stroke-width: 2.2; }
.fx-n:hover .fx-lb, .fx-n.act .fx-lb { fill: var(--ink); }
.fx-n:focus-visible .fx-hit { stroke: var(--score); stroke-width: 2; }
.fx-svg.pick .fx-n:not(.on) { opacity: 0.2; }
.fx-svg.pick .fx-n.on .fx-lb { fill: var(--ink); }

/* the card: beside the dot; on a phone a sheet from the bottom */
.fx-card { position: absolute; z-index: 20; width: 400px; max-width: calc(100% - 8px); box-sizing: border-box; padding: 12px 14px; font-size: 0.88rem; line-height: 1.4;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 14px 36px var(--shadow); }
.fx-card:focus { outline: none; }
.fx-card:focus-visible { outline: 2px solid var(--score); outline-offset: 2px; }
.fx-card .fx-x { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--muted);
  font-size: 1.35rem; line-height: 1; cursor: pointer; }
.fx-card .fx-x:hover { background: var(--bg); color: var(--ink); }
.fx-card .fx-x:focus-visible { outline: 2px solid var(--score); outline-offset: 0; }
.fx-cc { margin: 0; padding-right: 34px; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.fx-chd { margin: 2px 0 6px; padding-right: 26px; font-family: var(--f-display); font-weight: 700; font-size: 1.12rem; line-height: 1.1; }
.fx-chd .md-tag { font-size: 0.62rem; vertical-align: 0.3em; margin-left: 4px; }
.fx-ct { margin: 0 0 8px; }
.fx-ca { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 0 8px; margin: 0 0 8px; padding: 8px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fx-cv { font-family: var(--f-display); font-weight: 700; font-size: 1.68rem; line-height: 1; font-variant-numeric: tabular-nums; }
.fx-cv.o { color: var(--turn); }
.fx-cv.l { color: var(--score); }
.fx-cu { font-size: 0.82rem; color: var(--muted); }
.fx-cg { grid-column: 1 / -1; margin-top: 4px; font-weight: 600; }
.fx-cg.better { color: var(--score); }
.fx-cg.worse { color: var(--turn); }
.fx-ca small { grid-column: 1 / -1; font-size: 0.78rem; color: var(--muted); }
.fx-ca.un { display: block; color: var(--muted); }
.fx-ca.un b { color: var(--ink); }
.fx-cd { display: grid; gap: 4px; margin: 0; font-size: 0.84rem; line-height: 1.35; }
.fx-cd div { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 8px; }
.fx-cd dt { padding-top: 2px; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.fx-cd dd { margin: 0; overflow-wrap: anywhere; }
.fx-cd a, .fx-t a { color: var(--score); }

/* the key's swatches */
.md-sw.fx-k { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.md-sw.fx-k.o { width: 12px; height: 12px; background: var(--turn); }
.md-sw.fx-k.l, .md-sw.fx-k.m { width: 9px; height: 9px; border-radius: 1px; transform: rotate(45deg); }
.md-sw.fx-k.l { background: var(--score); }
.md-sw.fx-k.h { box-sizing: border-box; background: transparent; border: 1.6px solid var(--muted); }
.md-sw.fx-k.u { box-sizing: border-box; width: 8px; height: 8px; border-radius: 1px; background: transparent; border: 1.3px solid var(--muted); }
.md-sw.fx-k.n { outline: 1.5px dashed var(--ink); outline-offset: 2px; }

/* the camps */
.fx-strip-k { margin: 0 0 10px; font-size: 0.82rem; color: var(--muted); }
.fx-camps { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.fx-camp { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  transition: border-color 0.15s, box-shadow 0.15s; }
.fx-camp.on { border-color: var(--score); box-shadow: 0 0 0 1px var(--score); }
.fx-camp header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; }
.fx-camp-h { margin: 0; font-family: var(--f-display); font-weight: 700; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.03em; line-height: 1.15; }
.fx-camp-n { font-size: 0.78rem; color: var(--muted); }
.fx-camp-1 { margin: 0; font-size: 0.9rem; }
.fx-cs { display: none; }
.fx-strip { position: relative; height: 18px; margin: 4px 0 2px; border-radius: 9px; background: var(--bg); }
.fx-strip i { position: absolute; top: 4px; width: 10px; height: 10px; margin-left: -5px; box-sizing: border-box; border-radius: 50%; background: var(--muted); border: 1.5px solid var(--bg); }
.fx-strip i.h { background: var(--surface); border-color: var(--muted); }
.fx-strip i.l { border-radius: 1px; transform: rotate(45deg); background: var(--score); }
.fx-strip i.o { z-index: 2; width: 12px; height: 12px; top: 3px; margin-left: -6px; background: var(--turn); }
.fx-strip .z { position: absolute; top: -3px; bottom: -3px; width: 0; border-left: 2px dashed var(--turn); }
.fx-camp-acc { margin: 0; font-size: 0.84rem; color: var(--muted); }
.fx-camp-acc b { color: var(--ink); }
.fx-camp-ex { margin: auto 0 0; padding-top: 4px; font-size: 0.82rem; color: var(--muted); }
.fx-camp-ex span { margin-right: 4px; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.fx-ad { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 14px 28px; margin: 24px 0 16px; }
.fx-ad p { margin: 0; font-size: 0.92rem; }
.fx-mxw { max-width: 100%; }
.fx-mx { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.fx-mx th, .fx-mx td { padding: 7px 10px 7px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.fx-mx thead th { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.fx-mx tbody th { font-weight: 700; white-space: nowrap; }
.fx-mx tr.on th, .fx-mx tr.on td { background: var(--score-tint); }
.fx-mx tr[data-camp="possession"] th { color: var(--turn); }

/* where ours sits */
.fx-intro { margin: 0 0 16px; max-width: 74ch; font-size: 1rem; }
.fx-pls { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 16px 22px; margin-bottom: 22px; }
.fx-pl { padding-top: 8px; border-top: 3px solid var(--turn); }
.fx-pl p { margin: 0; font-size: 0.9rem; }
.fx-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 18px 36px; margin-bottom: 22px; }
.fx-two > * { min-width: 0; }
.fx-ul { display: grid; gap: 7px; margin: 0; padding-left: 18px; font-size: 0.92rem; }
.fx-who { color: var(--muted); }
.fx-fine { margin: 8px 0 0; font-size: 0.82rem; color: var(--muted); }
.fx-claim { margin-top: 18px; font-size: 0.95rem; color: var(--ink); border-left-color: var(--turn); }

/* every system */
.fx-tw { max-width: 100%; overflow-x: auto; }
.fx-t { min-width: 1000px; }
.fx-t th, .fx-t td { vertical-align: top; font-size: 0.8rem; }
.fx-t tbody th { color: var(--ink); font-weight: 600; font-size: 0.82rem; }
.fx-t td.n { text-align: right; white-space: nowrap; }
.fx-t tr.o th { color: var(--turn); }
.fx-tw:focus-visible { outline: 2px solid var(--score); outline-offset: 2px; }

@media (max-width: 640px) {
  .fx-lead p + p { font-size: 1.25rem; }
  .fx-map { padding: 10px 8px 8px; }
  .fx-card { position: fixed; left: 8px; right: 8px; bottom: 8px; top: auto; z-index: 60; width: auto; max-width: none; max-height: 72vh; overflow-y: auto; border-radius: 16px;
    box-shadow: 0 0 0 100vmax rgba(10, 14, 18, 0.35), 0 14px 36px var(--shadow); }
  .fx-mx thead { display: none; }
  .fx-mx, .fx-mx tbody, .fx-mx tr, .fx-mx th, .fx-mx td { display: block; }
  .fx-mx tr { padding: 8px 0; border-bottom: 1px solid var(--line); }
  .fx-mx th, .fx-mx td { padding: 2px 0; border: 0; }
  .fx-mx td { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px; }
  .fx-mx td::before { content: attr(data-l); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); padding-top: 2px; }
  .fx-u { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2px 14px; }
  .fx-u .fx-un { grid-column: 1 / -1; }
  .fx-uh span:first-child { display: none; }
}
