  :root {
    --paper: #f3eee3; --sheet: #fbf8f1; --ink: #1b1915; --muted: #6e665a; --rule: #d8cebb; --rule-2: #e8e0cf;
    --red: #c4452b; --red-text: #b0381f; --on-red: #fff; --brass-text: #866417; --forest: #2c5a4b; --brass: #a8822b; --brass-soft: #efe3c3; --hl: #f0e6cf; --done: #a59c8d;
    --serif: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", sans-serif;  /* (display text: sans, for reading) */
    --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
    --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", sans-serif;
  }
  /* dark: the reader's system choice, unless the page's own switch says otherwise (kept in this browser) */
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --paper: #12110f; --sheet: #1a1815; --ink: #ece5d6; --muted: #a2998a; --rule: #37322a; --rule-2: #2a2621;
      --red: #e2674b; --red-text: #e2674b; --on-red: #1b1915; --brass-text: #cfa851; --forest: #6fb59a; --brass: #cfa851; --brass-soft: #2c2616; --hl: #2a251c; --done: #6b6458;
      --silkline: rgba(255, 255, 255, .9); --silkw: 1.2px;
    }
  }
  :root[data-theme="dark"] {
      --paper: #12110f; --sheet: #1a1815; --ink: #ece5d6; --muted: #a2998a; --rule: #37322a; --rule-2: #2a2621;
      --red: #e2674b; --red-text: #e2674b; --on-red: #1b1915; --brass-text: #cfa851; --forest: #6fb59a; --brass: #cfa851; --brass-soft: #2c2616; --hl: #2a251c; --done: #6b6458;
      --silkline: rgba(255, 255, 255, .9); --silkw: 1.2px;
  }
  :root { color-scheme: light; } :root[data-theme="dark"] { color-scheme: dark; }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: dark; } }
  * { box-sizing: border-box; }
  body { margin: 0; background: var(--paper); color: var(--ink); font: 14px/1.5 var(--sans); }
  button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
  /* (keyboard users see where they are: a brass ring on whatever has the focus; the mouse sees nothing new) */
  :focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
  @media (pointer: coarse) {
    .star, .mk, .switch button, .seg button, .tb-ico, .tb-acc, .tb-btn, .countries button, .btn.small, .pill, .navi, .vmeta button, .alertbtn, .mbell, .unmark, .fi, .stub { position: relative; }
    .star::after, .mk::after, .switch button::after, .seg button::after, .tb-ico::after, .tb-acc::after, .tb-btn::after, .countries button::after, .btn.small::after, .pill::after, .vmeta button::after,
    .alertbtn::after, .mbell::after, .unmark::after, .dot::after {
      content: ''; position: absolute; left: 50%; top: 50%; width: max(100%, 44px); height: max(100%, 44px); transform: translate(-50%, -50%); }
    .dot::after { width: 30px; height: 30px; }   /* (the timeline's dots sit close: room for a finger without taking a neighbour's) */
  }
  .finder:focus-within, .vbox:focus-within { border-color: var(--brass); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brass) 28%, transparent); }
  a { color: inherit; }
  .mono { font-family: var(--mono); }
  .wrap { max-width: 1520px; margin: 0 auto; padding: 0 22px; }

  /* the week's features: an ink ribbon */
  .ribbon { background: #15130f; color: #f1e9d6; font-size: 13px; position: relative; z-index: 3; }
  .ribbon .wrap { display: flex; align-items: center; gap: 14px; height: 38px; }
  .rlabel { flex: 0 0 auto; font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 15px; color: #e3c46f; display: flex; align-items: center; gap: 7px; }
  .rlabel svg { width: 18px; height: 18px; }
  .marquee { flex: 1; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); }
  .track { display: inline-flex; gap: 34px; white-space: nowrap; animation: slide var(--dur, 60s) linear infinite; padding-left: 20px; }
  .marquee:hover .track { animation-play-state: paused; }
  @keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }
  @media (prefers-reduced-motion: reduce) { .track { animation: none; } .marquee { overflow-x: auto; } }
  .marquee:hover .track, .marquee:focus-within .track { animation-play-state: paused; }
  .fi { display: inline-flex; align-items: center; gap: 8px; color: inherit; }
  .fi:hover .fn { text-decoration: underline; text-underline-offset: 3px; }
  .fi .fd { font-family: var(--mono); font-size: 11.5px; color: #b9ad94; letter-spacing: .5px; }
  .fi .fn { font-weight: 600; }
  .fi .fv { color: #b9ad94; }
  .seal { font-family: var(--mono); font-size: 10.5px; font-weight: 600; padding: 1px 6px; border-radius: 10px; letter-spacing: .4px; border: 1px solid currentColor; }
  .s1 { background: #e3c46f; color: #1a1406; border-color: #e3c46f; } .s2 { color: #e8e2d4; } .s3 { color: #d39a73; } .sL { color: #8fc7b3; } .sF { color: #c9b8f0; } .sN { color: #b9ad94; }
  .rnote { flex: 0 0 auto; font-size: 11px; color: #8d846f; display: none; }
  @media (min-width: 1200px) { .rnote { display: block; } }

  /* masthead */
  .mast { border-bottom: 3px double var(--rule); }
  .mast .wrap { display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; align-items: end; padding-top: 18px; padding-bottom: 0; }
  .title { font-family: var(--serif); font-weight: 800; font-size: clamp(30px, 4.2vw, 50px); line-height: .95; letter-spacing: -.5px; margin: 0; }
  .title i { font-weight: 500; color: var(--red); }
  .edition { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 15px; margin-top: 6px; }
  .ctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
  .pill { border: 1px solid var(--rule); background: var(--sheet); border-radius: 999px; padding: 4px 12px; font-size: 13px; }
  .pill:hover { border-color: var(--ink); }
  .ctl input { font: 500 13px var(--mono); border: 1px solid var(--rule); background: var(--sheet); color: var(--ink); border-radius: 999px; padding: 3px 10px; }
  .switch { display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; background: var(--sheet); }
  .switch button:first-child { border-radius: 999px 0 0 999px; } .switch button:last-child { border-radius: 0 999px 999px 0; }  /* (rounded here, not clipped: a finger's area may reach past the edge) */
  .switch button { padding: 4px 11px; font-size: 12.5px; }
  .switch button.on { background: var(--ink); color: var(--sheet); }
  .switch.theme button { display: inline-flex; align-items: center; padding: 4px 9px; } .switch.theme svg { width: 14px; height: 14px; }
  .srcs { grid-column: 1 / -1; font-size: 11.5px; color: var(--muted); font-family: var(--mono); }

  /* the racing day around the world */
  .sec { font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 18px; margin: 18px 0 8px; display: flex; align-items: baseline; gap: 12px; }
  .sech { font: inherit; margin: 0; display: inline-flex; align-items: baseline; gap: 12px; }
  .sec small { font-family: var(--sans); font-style: normal; font-weight: 400; font-size: 12px; color: var(--muted); }
  .countries { display: flex; flex-wrap: wrap; gap: 2px 4px; font-size: 13px; margin-left: auto; justify-content: flex-end; flex: 1 1 360px; min-width: 0; font-family: var(--sans); font-style: normal; font-weight: 400; }
  /* (the heading keeps its line; the countries — twenty and more some days — wrap under it rather than squeeze it) */
  .sec:has(.countries) { flex-wrap: wrap; } .sech { flex: 0 0 auto; white-space: nowrap; }
  .countries button { padding: 2px 7px; border-radius: 4px; color: var(--muted); }
  .countries button:hover { color: var(--ink); }
  .countries button.on { color: var(--ink); background: var(--hl); font-weight: 600; }
  .countries .n { font-family: var(--mono); font-size: 11px; opacity: .7; }
  .tl { position: relative; background: var(--sheet); border: 1px solid var(--rule); border-radius: 4px; overflow-x: auto; scrollbar-width: thin; }
  .tl-in { position: relative; }
  .tl-row { display: flex; height: 22px; align-items: center; border-bottom: 1px dotted var(--rule-2); }
  .tl-row:last-child { border-bottom: 0; }
  .tl-lab { position: sticky; left: 0; z-index: 2; flex: 0 0 170px; background: var(--sheet); padding: 0 10px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; height: 100%; display: flex; align-items: center; gap: 6px; border-right: 1px solid var(--rule); }
  .tl-lab.sel { font-weight: 600; color: var(--red-text); }
  .tl-lane { position: relative; height: 100%; }
  .tl-hours { display: flex; height: 22px; align-items: center; border-bottom: 1px solid var(--rule); font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
  .tl-tick { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--rule-2); }
  .tl-hl { position: absolute; top: 4px; font-family: var(--mono); font-size: 10.5px; color: var(--muted); transform: translateX(3px); }
  .dot { position: absolute; top: 50%; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%; border: 1.5px solid var(--forest); background: var(--sheet); z-index: 1; }
  .dot:hover { transform: scale(1.4); }
  .dot.done { background: var(--done); border-color: var(--done); }
  .dot.gr { border-color: var(--brass); background: var(--brass); }
  .dot.on { border-color: var(--red); background: var(--red); outline: 2px solid var(--red); outline-offset: 2px; }
  .now { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px solid var(--red); z-index: 3; pointer-events: none; }
  .now span { position: absolute; top: 2px; left: 3px; font-family: var(--mono); font-size: 10px; color: var(--red-text); font-weight: 600; background: var(--sheet); padding: 0 2px; }
  .flag { width: 18px; height: 13px; border-radius: 1px; box-shadow: 0 0 0 1px rgba(0,0,0,.15); object-fit: cover; flex: 0 0 auto; vertical-align: -2px; }

  .cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; margin-top: 18px; }
  .cols > main { order: -1; }  /* (narrow screens: the race first, the index after it) */
  @media (min-width: 1150px) { .cols > main { order: 0; } }
  @media (min-width: 1150px) {
    .cols { grid-template-columns: 340px minmax(0, 1fr); }
    .index { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; scrollbar-width: thin; padding-right: 6px; }
  }
  /* the programme index */
  .ix-c { font: 600 11px var(--sans); letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin: 16px 0 4px; display: flex; gap: 7px; align-items: center; border-bottom: 1px solid var(--rule); padding-bottom: 4px; }
  .ix-c:first-child { margin-top: 0; }
  .ix-m { padding: 7px 0 8px; border-bottom: 1px dotted var(--rule); }
  .ix-m h3 { margin: 0 0 4px; font-family: var(--serif); font-weight: 600; font-size: 17px; display: flex; align-items: baseline; gap: 8px; }
  .ix-m h3 small { font-family: var(--sans); font-weight: 400; font-size: 11.5px; color: var(--muted); margin-left: auto; text-align: right; }
  .ix-m.sel h3 { color: var(--red-text); }
  .times { display: flex; flex-wrap: wrap; gap: 2px 0; font-family: var(--mono); font-size: 12.5px; }
  .times button { padding: 3px 8px; border-radius: 4px; }
  .times button + button::before { content: ""; }
  .times button:hover { background: var(--hl); }
  .times .done { color: var(--done); }
  .times .nexton { color: var(--red-text); font-weight: 600; }
  .times .on { background: var(--ink); color: var(--sheet); }
  .times .gr { text-decoration: underline; text-decoration-color: var(--brass); text-decoration-thickness: 2px; text-underline-offset: 3px; }
  .going { font-size: 11px; font-style: italic; font-family: var(--serif); }

  /* the race page */
  .page { background: var(--sheet); border: 1px solid var(--rule); border-radius: 4px; box-shadow: 0 1px 0 var(--rule), 0 12px 30px -22px rgba(0,0,0,.3); min-width: 0; }
  .rnav { display: flex; overflow-x: auto; border-bottom: 1px solid var(--rule); scrollbar-width: thin; }
  .rnav button { flex: 0 0 auto; padding: 8px 13px 7px; border-right: 1px solid var(--rule-2); text-align: center; }
  .rnav b { display: block; font-family: var(--serif); font-size: 15px; font-weight: 600; }
  .rnav span { font-family: var(--mono); font-size: 11px; color: var(--muted); }
  .rnav .done b { color: var(--done); }
  .rnav .on { background: var(--ink); color: var(--sheet); } .rnav .on span { color: var(--brass-soft); } .rnav .on b { color: var(--sheet); }
  .head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 26px; padding: 22px 26px 16px; border-bottom: 1px solid var(--rule); }
  .rno { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 15px; color: var(--muted); text-align: center; }
  .rno b { display: block; font-style: normal; font-weight: 800; font-size: 64px; line-height: .9; color: var(--ink); }
  .off { margin-top: 10px; text-align: center; font-family: var(--mono); }
  .off .t { font-size: 22px; font-weight: 600; }
  .off .l { font-size: 11px; color: var(--muted); }
  .off .c { display: inline-block; margin-top: 5px; font-size: 11px; font-weight: 600; color: var(--red-text); border: 1px solid var(--red); border-radius: 999px; padding: 0 8px; }
  .crumb { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
  .crumb a { color: var(--forest); text-decoration-thickness: 1px; text-underline-offset: 2px; }
  .rtitle { font-family: var(--serif); font-weight: 800; font-size: clamp(24px, 2.6vw, 34px); line-height: 1.08; margin: 6px 0 2px; letter-spacing: -.3px; }
  .grade { display: inline-block; vertical-align: middle; margin-left: 8px; font-family: var(--mono); font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; letter-spacing: .5px; }
  .g1 { background: var(--brass); color: #1c1505; } .g2 { background: var(--ink); color: var(--sheet); } .g3 { border: 1.5px solid var(--ink); }
  .gL { border: 1.5px dashed var(--forest); color: var(--forest); }
  .jp { font-size: 13px; color: var(--muted); }
  .spec { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-top: 14px; border-top: 1px solid var(--rule); }
  .spec div { padding: 7px 10px 6px 0; border-bottom: 1px solid var(--rule-2); }
  .spec .k { display: block; font: 600 10.5px var(--sans); letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
  .spec b { font-weight: 500; }
  .purse { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 8px; }
  .quote { margin: 16px 26px 0; padding: 4px 0 4px 44px; position: relative; font-family: var(--serif); font-size: 15.5px; line-height: 1.5; }
  .quote::before { content: "“"; position: absolute; left: 0; top: -14px; font-size: 64px; color: var(--brass); font-family: var(--serif); line-height: 1; }
  .quote summary { cursor: pointer; font-style: italic; font-weight: 700; list-style: none; }
  .quote summary::-webkit-details-marker { display: none; }
  .quote .fc { font-family: var(--sans); font-size: 12.5px; color: var(--muted); margin-top: 6px; }
  .status { font-size: 12px; color: var(--red-text); padding: 8px 26px 0; min-height: 4px; font-family: var(--mono); }

  /* entries */
  /* entries: No | silks | horse | jockey | trainer | rating | price (results: placed first) */
  .ehead, .entry { display: grid; grid-template-columns: 52px 62px minmax(0, 1.7fr) minmax(0, .9fr) minmax(0, .9fr) 58px 82px;
                   grid-template-areas: "no silk horse jockey trainer third price"; gap: 0 14px; align-items: center; }
  .ehead.res, .entry.res { grid-template-columns: 50px 52px 62px minmax(0, 1.7fr) minmax(0, .9fr) minmax(0, .9fr) 58px 82px;
                           grid-template-areas: "pos no silk horse jockey trainer third price"; }
  .a-pos { grid-area: pos; } .a-no { grid-area: no; } .a-silk { grid-area: silk; } .a-horse { grid-area: horse; min-width: 0; }
  .a-jockey { grid-area: jockey; } .a-trainer { grid-area: trainer; } .a-third { grid-area: third; } .a-price { grid-area: price; }
  .person { min-width: 0; font-size: 13.5px; line-height: 1.35; padding-left: 10px; border-left: 1px solid var(--rule-2); }
  .person .pn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .jrow { display: flex; align-items: center; gap: 9px; min-width: 0; }
  .jtx { min-width: 0; }
  .jtx .pn { white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }  /* (beside the portrait: wrap, never cut) */
  .jav { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; object-fit: cover; object-position: 50% 15%;
         background: var(--paper); box-shadow: 0 0 0 1px var(--rule); }
  /* the portrait enlarged in its round frame, the face in the middle of it */
  .jframe { position: relative; overflow: hidden; display: inline-block; }
  .jframe img { position: absolute; width: 100%; height: auto; left: 0; top: -8%; max-width: none; }
  .jav.mono { display: inline-flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 11.5px;
              font-weight: 600; letter-spacing: .5px; color: var(--muted); }
  .person .ps { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .person .pl { display: none; font: 600 10.5px var(--sans); letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
  .ehead .person { border-left-color: transparent; }
  .people { display: contents; }
  .breed { font-size: 12px; color: var(--muted); margin-top: 1px; }
  .breed i { font-family: var(--serif); }
  .breed .long { color: var(--red-text); font-weight: 600; }
  .ehead { padding: 14px 26px 6px; font: 600 10.5px var(--sans); letter-spacing: 1px; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--ink); margin: 0 0 0; }
  .entry { padding: 11px 26px; border-bottom: 1px solid var(--rule-2); cursor: pointer; }
  .entry:hover { background: var(--hl); }
  /* a runner under the mouse: the silks come forward a touch, the name takes the ink red, the chevron hints at more */
  .entry { transition: background-color .18s ease; }
  .entry .medal, .entry .hn, .entry .chev, .entry .num, .entry .stub { transition: transform .22s cubic-bezier(.2, .8, .2, 1), color .18s ease, box-shadow .22s ease, border-color .18s ease; }
  @media (hover: hover) {
    .entry:hover .medal { transform: scale(1.08) rotate(-4deg); box-shadow: inset 0 0 0 2px var(--ink), 0 0 0 3px var(--sheet), 0 0 0 4px var(--rule); }
    .entry:hover .hn { color: var(--red-text); }
    .entry:hover .chev { transform: translateY(2px); color: var(--ink); }
    .entry:hover .num { transform: translateX(2px); }
    .entry:hover .stub { border-color: var(--ink); }
  }
  @media (prefers-reduced-motion: reduce) {
    .entry .medal, .entry .chev, .entry .num { transition: none; }
    .entry:hover .medal, .entry:hover .chev, .entry:hover .num { transform: none; }
  }
  .entry.open { background: var(--hl); border-bottom-color: transparent; }
  .entry.scr { opacity: .4; } .entry.scr .hn { text-decoration: line-through; }
  .num { font-family: var(--serif); font-weight: 800; font-size: 34px; line-height: 1; text-align: center; position: relative; }
  .num .w { display: block; height: 4px; width: 28px; margin: 4px auto 0; border-radius: 2px; }
  .num .dr { display: block; font-family: var(--mono); font-weight: 400; font-size: 10.5px; color: var(--muted); margin-top: 3px; }
  .medal { width: 58px; height: 58px; border-radius: 50%; background: transparent; box-shadow: inset 0 0 0 2px var(--rule), 0 0 0 3px var(--sheet), 0 0 0 4px var(--rule-2); display: flex; align-items: center; justify-content: center; overflow: hidden; }
  .medal img, .medal svg { width: 48px; height: 48px; object-fit: contain; }
  /* (a hairline round the jacket in the theme's opposite — dark on the light page, light on the dark — so a white
     jacket shows on the one and a black jacket on the other) */
  .medal img { --c: var(--silkline, rgba(0, 0, 0, .75)); --w: var(--silkw, .6px);
               filter: drop-shadow(var(--w) 0 0 var(--c)) drop-shadow(calc(-1 * var(--w)) 0 0 var(--c)) drop-shadow(0 var(--w) 0 var(--c)) drop-shadow(0 calc(-1 * var(--w)) 0 var(--c)); }
  .hn { font-family: var(--serif); font-weight: 700; font-size: 17px; letter-spacing: 0; line-height: 1.2; }
  .hn .chev { font-family: var(--sans); font-size: 10px; color: var(--muted); margin-left: 5px; vertical-align: 3px; font-variant: normal; }
  .hs { font-size: 12px; color: var(--muted); }
  .figs { font-family: var(--mono); font-size: 13px; letter-spacing: 1.5px; margin-top: 2px; }
  .figs .f1 { color: var(--red-text); font-weight: 600; }
  .jt { font-size: 13px; min-width: 0; line-height: 1.4; }
  .jt div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .jt .x { font-family: var(--serif); font-style: italic; color: var(--muted); margin-right: 5px; }
  .jt .sub { font-size: 11.5px; color: var(--muted); }
  .third { text-align: center; font-family: var(--mono); font-size: 15px; font-weight: 500; }
  .third small { display: block; font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
  .stub { justify-self: end; min-width: 72px; text-align: center; padding: 6px 8px 5px; border: 1.5px dashed var(--rule); border-radius: 3px; font-family: var(--mono); font-size: 17px; font-weight: 600; position: relative; background: var(--sheet); }
  .stub::before, .stub::after { content: ""; position: absolute; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--paper); border: 1.5px dashed var(--rule); }
  .stub::before { left: -6px; clip-path: inset(0 0 0 50%); } .stub::after { right: -6px; clip-path: inset(0 50% 0 0); }
  .entry:hover .stub::before, .entry:hover .stub::after, .entry.open .stub::before, .entry.open .stub::after { background: var(--hl); }
  .stub small { display: block; font-size: 10px; letter-spacing: 1.2px; color: var(--muted); font-weight: 500; }
  .stub.fav { border-style: solid; border-color: var(--red); color: var(--red-text); } .stub.fav small { color: var(--red-text); }
  .stub.none { opacity: .45; }
  .rosette { width: 44px; height: 50px; }
  .marg { font-family: var(--mono); font-size: 10.5px; color: var(--muted); text-align: center; }
  .pending { opacity: .55; font-style: italic; }
  .mob { display: none; }

  .det { background: var(--hl); padding: 4px 26px 18px 26px; border-bottom: 1px solid var(--rule); }
  .dfacts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 20px; font-size: 13px; margin-bottom: 10px; }
  .dfacts div { padding: 6px 0; border-bottom: 1px dotted var(--rule); }
  .dfacts .k { display: block; font: 600 10.5px var(--sans); letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
  .cmt { font-family: var(--serif); font-style: italic; font-size: 14px; margin: 4px 0 12px; }
  .tw { overflow-x: auto; }
  .runs .nl { color: var(--muted); }
  .sx { display: inline-block; vertical-align: 2px; margin-left: 6px; padding: 0 5px; border-radius: 4px; font: 600 11px/1.5 var(--mono);
        letter-spacing: .3px; background: var(--hl); color: var(--muted); border: 1px solid var(--rule); }
  .sx-C, .sx-H { color: #2f5f9e; border-color: color-mix(in srgb, #2f5f9e 35%, transparent); background: color-mix(in srgb, #2f5f9e 8%, transparent); }
  .sx-F, .sx-M { color: #a63d5f; border-color: color-mix(in srgb, #a63d5f 35%, transparent); background: color-mix(in srgb, #a63d5f 8%, transparent); }
  .sx-G, .sx-R { color: var(--muted); }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sx-C, :root:not([data-theme="light"]) .sx-H { color: #8db4ec; }
                                         :root:not([data-theme="light"]) .sx-F, :root:not([data-theme="light"]) .sx-M { color: #e58aa8; } }
  :root[data-theme="dark"] .sx-C, :root[data-theme="dark"] .sx-H { color: #8db4ec; }
  :root[data-theme="dark"] .sx-F, :root[data-theme="dark"] .sx-M { color: #e58aa8; }
  .foot .sx { margin-left: 0; background: #1d1a15; }  /* (the footer is always dark: the light tints) */
  .foot .sx-C { color: #8db4ec; border-color: #3d5a80; } .foot .sx-F { color: #e58aa8; border-color: #7d3e55; } .foot .sx-G { color: #b9ad94; border-color: #5a5141; }
  .runsh { font-weight: 700; font-size: 13.5px; margin: 6px 0 6px; }
  .runsbox { max-height: 440px; overflow: auto; border: 1px solid var(--rule-2); border-radius: 4px; }
  .runsbox thead th { position: sticky; top: 0; z-index: 1; background: var(--sheet); }
  .runs { width: 100%; border-collapse: collapse; font-size: 12.5px; background: var(--sheet); }
  .runs th { text-align: left; font: 600 10.5px var(--sans); letter-spacing: 1px; text-transform: uppercase; color: var(--muted); padding: 6px 8px; border-bottom: 1.5px solid var(--ink); white-space: nowrap; font-weight: 500; }
  .runs td { padding: 6px 8px; border-bottom: 1px solid var(--rule-2); white-space: nowrap; vertical-align: top; }
  .runs td.wr { white-space: normal; min-width: 170px; }
  .runs .r { text-align: right; font-family: var(--mono); }
  .runs .p1 { color: var(--red-text); font-weight: 700; } .runs .p2, .runs .p3 { font-weight: 700; }
  .small { font-size: 12px; color: var(--muted); }
  .empty { color: var(--muted); text-align: center; padding: 60px 16px; font-family: var(--serif); font-style: italic; font-size: 16px; }
  /* the days: a strip under the masthead */
  /* one bar: arrows and calendar at its ends, nine days between, each day a column of weekday / date / its biggest race */
  .dayrow { grid-column: 1 / -1; display: flex; align-items: stretch; margin-top: 12px; border: 1px solid var(--rule); border-radius: 10px;
            background: var(--sheet); position: relative; }
  .days { display: flex; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; scroll-behavior: smooth; }
  .days::-webkit-scrollbar { display: none; }
  .day { flex: 1 0 64px; padding: 7px 4px 6px; text-align: center; position: relative; line-height: 1.1; border-left: 1px solid var(--rule-2);
         display: flex; flex-direction: column; align-items: center; gap: 2px; transition: background-color .15s; }
  .day:first-child { border-left: 0; }
  .day:hover { background: var(--hl); }
  .day .w { font: 600 10.5px var(--sans); letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
  .day .d { font-weight: 700; font-size: 21px; font-variant-numeric: tabular-nums; }
  .day .g { font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .4px; line-height: 14px; min-height: 14px; color: var(--muted); }
  .day .g b { display: inline-block; padding: 0 5px; border-radius: 7px; border: 1px solid currentColor; font-weight: inherit; }
  /* (the site's grade colours: G1 brass, G2 ink, G3 an outline) */
  .day .g .dg1 { background: var(--brass); border-color: var(--brass); color: #1c1505; }
  .day .g .dg2 { background: var(--ink); border-color: var(--ink); color: var(--sheet); } .day .g .dg3 { color: var(--ink); }
  .day.today .w { color: var(--red-text); font-weight: 600; }
  .day.today::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 22px; height: 3px; margin-left: -11px; border-radius: 3px 3px 0 0; background: var(--red); }
  .day.past .d { color: var(--muted); }
  .day.on { background: var(--ink); color: var(--sheet); }
  .day.on .w, .day.on .g { color: var(--brass-soft); } .day.on .d { color: var(--sheet); }
  .day.on .g .dg2 { background: var(--sheet); border-color: var(--sheet); color: var(--ink); } .day.on .g .dg3 { color: var(--sheet); }
  .navbtn { flex: 0 0 auto; width: 36px; font-size: 20px; color: var(--muted); }
  .navbtn:hover { color: var(--ink); background: var(--hl); }
  #prev { border-right: 1px solid var(--rule); border-radius: 10px 0 0 10px; } #nextd { border-left: 1px solid var(--rule); }
  .calbtn { flex: 0 0 auto; display: flex; align-items: center; gap: 7px; border-left: 1px solid var(--rule); padding: 0 14px; font-size: 13px;
            border-radius: 0 10px 10px 0; }
  .calbtn:hover, .calbtn[aria-expanded="true"] { background: var(--hl); }
  .calbtn svg { width: 16px; height: 16px; }
  /* the month: drops under the bar, at its right */
  .cal { position: absolute; right: 0; top: calc(100% + 6px); z-index: 70; width: 316px; max-width: calc(100vw - 32px); background: var(--sheet);
         border: 1px solid var(--ink); border-radius: 10px; padding: 10px 12px 12px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
  .cal[hidden] { display: none; }
  .cal .ch { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
  .cal .ch b { font-size: 15px; text-transform: capitalize; }
  .cal .ch button { width: 30px; height: 30px; border-radius: 6px; font-size: 18px; color: var(--muted); }
  .cal .ch button:hover { background: var(--hl); color: var(--ink); }
  .cal .cg { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
  .cal .cw { font: 600 10.5px var(--sans); letter-spacing: .8px; text-transform: uppercase; color: var(--muted); text-align: center; padding: 4px 0; }
  .cal .cd { position: relative; height: 38px; border-radius: 6px; font-size: 13.5px; font-variant-numeric: tabular-nums; }
  .cal .cd:hover { background: var(--hl); }
  .cal .cd.out { color: var(--muted); opacity: .45; }
  .cal .cd.wk { background: var(--hl); }
  .cal .cd.today { color: var(--red-text); font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--red); }
  .cal .cd.on { background: var(--ink); color: var(--sheet); font-weight: 700; box-shadow: none; }
  .cal .cd i { position: absolute; left: 50%; bottom: 4px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--brass); }
  .cal .cd .pdot { top: 3px; left: 3px; }
  .cal .cd .pdot svg { width: 9px; height: 9px; }
  .cal .cf { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--rule-2);
             font-size: 11px; color: var(--muted); flex-wrap: wrap; }
  .cal .cf .k { display: inline-flex; align-items: center; gap: 4px; margin-right: 8px; }
  .cal .cf .k i { width: 10px; height: 10px; border-radius: 3px; background: var(--hl); display: inline-block; }
  .cal .cf .k i.f { width: 5px; height: 5px; border-radius: 50%; background: var(--brass); }
  .cal .cf .pill { font-size: 12px; padding: 3px 10px; }
  .dayhint { grid-column: 1 / -1; font-size: 11.5px; color: var(--muted); margin-top: 4px; min-height: 16px;
             display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
  .dayhint svg, .pdot svg { width: 12px; height: 12px; vertical-align: -2px; }
  .pinnote { white-space: nowrap; }
  .pinbtn { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--rule); background: var(--sheet); color: var(--ink);
            border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 12px; cursor: pointer; }
  .pinbtn:hover { border-color: var(--ink); }
  .pinbtn.on { background: var(--ink); color: var(--sheet); border-color: var(--ink); }
  .day { position: relative; }
  .pdot { position: absolute; top: 6px; left: 8px; color: var(--muted); line-height: 0; }
  .day.on .pdot { color: inherit; }
  .fnote .pins { margin-left: 4px; }
  .pinchip { border: 1px solid var(--rule); background: var(--sheet); color: var(--ink); border-radius: 999px; padding: 1px 8px; margin: 0 2px;
             font: inherit; font-size: 11.5px; cursor: pointer; }
  .pinchip:hover { border-color: var(--ink); }
  .fnote .small { display: block; margin-top: 2px; }
  @media (max-width: 560px) { .cal { left: 0; right: 0; width: auto; max-width: none; } }
  @media (max-width: 800px) { .day { flex-basis: 54px; } .day .d { font-size: 18px; } .calbtn span { display: none; } .calbtn { padding: 0 11px; } }

  /* the card on one screen: a reading mode, a runner to a low line */
  .rnav .densebtn { margin-left: auto; border-left: 1px solid var(--rule-2); border-right: 0; padding: 0 14px; font-size: 12.5px; color: var(--muted);
                    display: flex; align-items: center; gap: 6px; white-space: nowrap; }
  .rnav .densebtn:hover { color: var(--ink); }
  .rnav .densebtn + .densebtn { margin-left: 0; }
  .noodds .a-price, .noodds .c-odds { visibility: hidden; } .noodds .oddsfrom, .noodds .srcl { display: none; }
  .rnav .densebtn.on { color: var(--ink); font-weight: 600; background: var(--hl); }
  .nosort { font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; background: none; border: 0; padding: 2px 4px; border-radius: 4px; cursor: pointer; white-space: nowrap; }
  .nosort:hover { color: var(--ink); background: var(--hl); } .nosort.on { color: var(--ink); } .nosort .sa { margin-left: 3px; }
  .page.dense .fbanner { padding: 6px 14px; grid-template-columns: 22px minmax(0, 1fr) 22px; }
  .page.dense .fbanner svg { width: 22px; height: 28px; }
  .page.dense .fbanner .nm { font-size: 17px; margin: 0; } .page.dense .fbanner .sub { display: none; }
  .page.dense .head { padding: 8px 18px 6px; gap: 0 16px; }
  .page.dense .rno { display: flex; align-items: baseline; gap: 10px; }
  .page.dense .rno b { font-size: 30px; }
  .page.dense .off { margin: 0; display: flex; gap: 8px; align-items: baseline; }
  .page.dense .off .t { font-size: 16px; } .page.dense .off .c { margin: 0; }
  .page.dense .rtitle { font-size: 20px; margin: 2px 0 0; }
  .page.dense .jp, .page.dense .purse, .page.dense .quote, .page.dense .status { display: none; }
  .page.dense .spec { margin-top: 6px; border-top: 0; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .page.dense .spec div { padding: 2px 8px 2px 0; border-bottom: 0; font-size: 12.5px; }
  .page.dense .ehead { padding: 6px 18px 4px; }
  .page.dense .ehead, .page.dense .entry { grid-template-columns: 40px 46px minmax(0, 1.7fr) minmax(0, 1.2fr) minmax(0, .9fr) 66px 66px; gap: 0 10px; }
  .page.dense .ehead.res, .page.dense .entry.res { grid-template-columns: 34px 40px 46px minmax(0, 1.7fr) minmax(0, 1.2fr) minmax(0, .9fr) 66px 66px; }
  .page.dense .entry { padding: 2px 18px; min-height: 33px; }
  .page.dense .num { font-size: 18px; display: flex; align-items: center; justify-content: center; gap: 4px; }
  .page.dense .num .w { width: 4px; height: 16px; margin: 0; } .page.dense .num .dr { display: none; }
  .page.dense.mixdraw .num .dr { display: inline-block; margin: 0; padding: 0 3px; min-width: 12px; text-align: center; font-size: 10.5px; line-height: 15px;
                                 border: 1px solid var(--rule); border-radius: 3px; } .page.dense .num .drw { display: none; }
  .page.dense.mixdraw .ehead, .page.dense.mixdraw .entry { grid-template-columns: 76px 46px minmax(0, 1.7fr) minmax(0, 1.2fr) minmax(0, .9fr) 66px 66px; }
  .page.dense.mixdraw .ehead.res, .page.dense.mixdraw .entry.res { grid-template-columns: 34px 76px 46px minmax(0, 1.7fr) minmax(0, 1.2fr) minmax(0, .9fr) 66px 66px; }
  .page.dense .medal { width: 27px; height: 27px; box-shadow: inset 0 0 0 1px var(--rule); }
  .page.dense .medal img, .page.dense .medal svg { width: 24px; height: 24px; }
  .page.dense .rosette { width: 21px; height: 25px; } .page.dense .marg { display: none; }
  .page.dense .a-horse { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; overflow: hidden; }
  .page.dense .hn { font-size: 15px; flex: 0 0 auto; }
  .page.dense .hs, .page.dense .figs { font-size: 11.5px; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; }
  .page.dense .figs { letter-spacing: .5px; margin: 0; } .page.dense .breed, .page.dense .a-horse .hs { display: none; }
  .page.dense .person { font-size: 12.5px; padding-left: 8px; } .page.dense .person .ps { display: none; }
  .page.dense .jav { width: 22px; height: 22px; font-size: 9px; } .page.dense .jrow { gap: 6px; }
  .page.dense .jtx .pn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .page.dense .third { font-size: 12px; white-space: nowrap; } .page.dense .third small { display: none; }
  .page.dense .ehead > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .page.dense .ehead .a-silk { letter-spacing: 0; }
  .page.dense .stub { min-width: 56px; padding: 2px 6px; font-size: 14px; } .page.dense .stub small { display: none; }
  .page.dense .stub::before, .page.dense .stub::after { display: none; }
  .page.dense .det { padding: 4px 18px 12px; }
  .page.dense .openhint { display: none; }
  @media (max-width: 800px) {
    .page.dense .entry, .page.dense.mixdraw .entry { grid-template-columns: 30px 30px minmax(0, 1fr) 56px; grid-template-areas: "no silk horse price" "no silk people price"; }
    .page.dense .entry.res, .page.dense.mixdraw .entry.res { grid-template-columns: 28px 30px 30px minmax(0, 1fr) 54px; grid-template-areas: "pos no silk horse price" "pos no silk people price"; }
    .page.dense.mixdraw .entry { grid-template-columns: 46px 30px minmax(0, 1fr) 56px; } .page.dense.mixdraw .entry.res { grid-template-columns: 28px 46px 30px minmax(0, 1fr) 54px; }
    .page.dense .people { grid-area: people; display: block; min-width: 0; } .page.dense .a-trainer, .page.dense .person .pl { display: none; }
    .page.dense .a-jockey { padding: 0; border: 0; font-size: 12px; color: var(--muted); }
    .page.dense .ehead { display: block; } .page.dense .ehead > div:not(.a-no) { display: none; }
  }

  /* search */
  .finder { grid-column: 1 / -1; position: relative; display: flex; align-items: center; gap: 8px; margin-top: 10px;
            border: 1px solid var(--rule); border-radius: 8px; background: var(--sheet); padding: 0 12px; }
  .finder:focus-within { border-color: var(--ink); }
  .finder svg { width: 16px; height: 16px; color: var(--muted); flex: 0 0 auto; }
  .finder input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: 15px var(--sans); padding: 9px 0; outline: none; }
  .found { position: absolute; z-index: 20; left: -1px; right: -1px; top: calc(100% + 4px); background: var(--sheet); border: 1px solid var(--ink);
           border-radius: 8px; max-height: 420px; overflow-y: auto; box-shadow: 0 14px 30px -18px rgba(0,0,0,.5); }
  .fr { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; width: 100%; text-align: left;
        padding: 8px 12px; border-bottom: 1px solid var(--rule-2); }
  .fr:hover, .fr.sel { background: var(--hl); }
  .fr .ty { font: 600 10.5px var(--sans); letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
  .fr .nm { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .fr .nm small { font-weight: 400; color: var(--muted); margin-left: 6px; }
  .fr .wh { font-size: 12.5px; color: var(--muted); white-space: nowrap; display: flex; gap: 6px; align-items: center; }
  .fchips { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 12px; border-bottom: 1px solid var(--rule-2); position: sticky; top: 0; background: var(--sheet); z-index: 1; }
  .fchip { border: 1px solid var(--rule); border-radius: 999px; padding: 2px 10px; font-size: 12.5px; }
  .fchip span { font-family: var(--mono); font-size: 11px; color: var(--muted); }
  .fchip.on { background: var(--ink); color: var(--sheet); border-color: var(--ink); } .fchip.on span { color: inherit; opacity: .75; }
  .fperson { display: flex; gap: 10px; align-items: baseline; padding: 8px 12px; border-bottom: 1px solid var(--rule-2); background: var(--hl); }
  .fperson .ty { font: 600 10.5px var(--sans); letter-spacing: 1px; text-transform: uppercase; color: var(--muted); width: 64px; }
  .fnote { padding: 8px 12px; font-size: 12px; color: var(--muted); }
  .fr .fday { color: var(--ink); font-weight: 600; }
  /* the race reminder bell */
  .alertbtn { display: inline-flex; align-items: center; gap: 5px; margin-left: 10px; padding: 2px 10px; border: 1px solid var(--rule); border-radius: 999px;
              font-size: 12px; font-weight: 600; color: var(--muted); vertical-align: 1px; }
  .alertbtn svg { width: 13px; height: 13px; }
  .alertbtn:hover { border-color: var(--ink); color: var(--ink); }
  .alertbtn.on { background: var(--ink); border-color: var(--ink); color: var(--sheet); }
  .marked .mbell { font: 600 12px var(--mono); text-decoration: none !important; color: var(--red-text) !important; }
  /* the world rankings page */
  .rankbtn { position: relative; font-weight: 600; }
  /* (the mini game's button: the rankings' shape, in the house brass — a game, not a page of the paper) */
  .gamebtn { font-weight: 600; color: var(--brass-text); border-color: color-mix(in srgb, var(--brass) 55%, var(--rule)); }
  .gamebtn:hover { background: var(--brass); color: var(--sheet); border-color: var(--brass); }
  .rankbtn.on { background: var(--ink); color: var(--sheet); border-color: var(--ink); }
  .newtag { font-style: normal; font: 700 9.5px var(--mono); letter-spacing: .5px; background: var(--red); color: #fff; border-radius: 999px; padding: 1px 5px; margin-left: 6px; vertical-align: 1px; }
  .newtag[hidden], .rankpage[hidden], #daywrap[hidden] { display: none; }
  .rankpage { padding-top: 18px; padding-bottom: 30px; }
  .rkmeta { color: var(--muted); margin: 0 0 14px; font-size: 13.5px; }
  .rktable { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--sheet); border: 1px solid var(--rule); font-size: 14px; }
  .rktable th { text-align: left; font: 600 10.5px var(--sans); letter-spacing: 1.8px; text-transform: uppercase; color: var(--brass-text); padding: 10px 10px 9px; border-bottom: 3px double var(--brass); white-space: nowrap; }
  .rktable td { padding: 9px 10px; border-bottom: 1px solid var(--rule-2); vertical-align: middle; }
  .rktable tr:not(.top1):not(.top2):not(.top3):hover td { background: var(--hl); }
  .rktable .rk { font: 700 25px/1 var(--disp); text-align: center; width: 52px; color: var(--muted); font-variant-numeric: lining-nums; }
  .rktable .rt { font: 700 25px/1 var(--disp); white-space: nowrap; font-variant-numeric: lining-nums; } .rktable .rt small { font: 600 11px var(--mono); margin-left: 4px; }
  /* the podium: the first three on a tinted row behind a medal — gold, silver, bronze — and their names larger */
  .rktable .rk b { font: inherit; }
  .rktable .rk .award svg { width: 36px; height: 48px; display: block; margin: -6px auto -3px; }
  .rktable tr.top1 .rk .award svg { width: 40px; height: 53px; }
  .rktable tr.top1 .hzn { font-size: 25px; } .rktable tr.top2 .hzn, .rktable tr.top3 .hzn { font-size: 23px; }
  .rktable tr.top1 .rt { color: var(--brass); font-size: 29px; } .rktable tr.top2 .rt, .rktable tr.top3 .rt { font-size: 27px; }
  /* the first three rows each in a frame of their own: a double rule in gold, silver or bronze, rounded, apart */
  /* (as an engraved plaque: a double rule and a hairline inside it, a lozenge at each corner, a band of the metal's
     light across the row, brighter at its ends) */
  .rktable tr.top1 { --m: #b8902f; --t: #e3c46f; } .rktable tr.top2 { --m: #98a0aa; --t: #c9ced6; } .rktable tr.top3 { --m: #a86c3c; --t: #d39a73; }
  .rktable :is(tr.top1, tr.top2, tr.top3) { background: linear-gradient(90deg, color-mix(in srgb, var(--t) 30%, var(--sheet)),
      color-mix(in srgb, var(--t) 9%, var(--sheet)) 45%, color-mix(in srgb, var(--t) 9%, var(--sheet)) 60%, color-mix(in srgb, var(--t) 24%, var(--sheet))); }
  .rktable :is(tr.top1, tr.top2, tr.top3):hover { background: linear-gradient(90deg, color-mix(in srgb, var(--t) 38%, var(--sheet)),
      color-mix(in srgb, var(--t) 15%, var(--sheet)) 45%, color-mix(in srgb, var(--t) 15%, var(--sheet)) 60%, color-mix(in srgb, var(--t) 30%, var(--sheet))); }
  .rktable :is(tr.top1, tr.top2, tr.top3) td { position: relative; border-top: 3px double var(--m); border-bottom: 3px double var(--m);
      background: linear-gradient(var(--m), var(--m)) 0 3px / 100% 1px no-repeat, linear-gradient(var(--m), var(--m)) 0 calc(100% - 3px) / 100% 1px no-repeat; }
  .rktable :is(tr.top1, tr.top2, tr.top3) td:first-child { border-left: 3px double var(--m);
      background: linear-gradient(var(--m), var(--m)) 3px 3px / calc(100% - 3px) 1px no-repeat, linear-gradient(var(--m), var(--m)) 3px calc(100% - 3px) / calc(100% - 3px) 1px no-repeat,
                  linear-gradient(var(--m), var(--m)) 3px 3px / 1px calc(100% - 6px) no-repeat; }
  .rktable :is(tr.top1, tr.top2, tr.top3) td:last-child { border-right: 3px double var(--m);
      background: linear-gradient(var(--m), var(--m)) 0 3px / calc(100% - 3px) 1px no-repeat, linear-gradient(var(--m), var(--m)) 0 calc(100% - 3px) / calc(100% - 3px) 1px no-repeat,
                  linear-gradient(var(--m), var(--m)) calc(100% - 3px) 3px / 1px calc(100% - 6px) no-repeat; }
  .rktable :is(tr.top1, tr.top2, tr.top3) td:first-child::before, .rktable :is(tr.top1, tr.top2, tr.top3) td:first-child::after,
  .rktable :is(tr.top1, tr.top2, tr.top3) td:last-child::before, .rktable :is(tr.top1, tr.top2, tr.top3) td:last-child::after {
      content: ''; position: absolute; width: 7px; height: 7px; background: var(--m); transform: rotate(45deg); box-shadow: 0 0 0 2px var(--sheet); }
  .rktable :is(tr.top1, tr.top2, tr.top3) td:first-child::before { left: -6px; top: -6px; }
  .rktable :is(tr.top1, tr.top2, tr.top3) td:first-child::after { left: -6px; bottom: -6px; }
  .rktable :is(tr.top1, tr.top2, tr.top3) td:last-child::before { right: -6px; top: -6px; }
  .rktable :is(tr.top1, tr.top2, tr.top3) td:last-child::after { right: -6px; bottom: -6px; }
  .rktable tr.gap td { height: 12px; padding: 0; border: 0; background: transparent; }
  .rktable tr.gap:hover td { background: transparent; }
  .rktable .hzn { font: 700 21px/1.1 var(--disp); text-align: left; }
  /* the board in a frame, as an honours board: an ink rule, a gold hairline inside it, a fleuron at each corner */
  .rkframe { --disp: "Cormorant Garamond", Georgia, "Times New Roman", serif; position: relative; border: 1px solid var(--ink); padding: 5px; background: var(--sheet); margin-top: 4px; }
  .rkframe > .in { position: relative; border: 1px solid var(--brass); padding: 30px 24px 10px; }
  .rkframe .fl { position: absolute; width: 22px; height: 22px; color: var(--brass); background: var(--sheet); line-height: 0; }
  .rkframe .fl svg { width: 22px; height: 22px; }
  .rkframe .fl.c-tl { left: -12px; top: -12px; } .rkframe .fl.c-tr { right: -12px; top: -12px; }
  .rkframe .fl.c-bl { left: -12px; bottom: -12px; } .rkframe .fl.c-br { right: -12px; bottom: -12px; }
  .rkframe .rktable { border: 0; background: transparent; }
  .rkframe .tw { margin: 0 -14px; padding: 0 8px; }
  /* the podium at the head of the board: second, first, third in three columns between hairlines; a struck medal, the
     place in italic, the name in a display serif; the winner's medal between laurels */
  .podium { --disp: "Cormorant Garamond", Georgia, "Times New Roman", serif;
            display: grid; grid-template-columns: 1fr 1.3fr 1fr; align-items: end; margin: 0 0 18px; padding-bottom: 22px; position: relative; }
  .podium::after { content: ''; position: absolute; left: 12%; right: 12%; bottom: 0; height: 3px; border-top: 1px solid var(--brass); border-bottom: 1px solid var(--brass); }
  .pd { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; padding: 0 18px; }
  .pd.p1 { order: 2; } .pd.p2 { order: 1; border-right: 1px solid var(--rule-2); } .pd.p3 { order: 3; border-left: 1px solid var(--rule-2); }
  .pd .crest { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--brass); }
  .pd .crest > svg { width: 40px; height: 50px; }
  .pd .award svg { width: 62px; height: 83px; display: block; filter: drop-shadow(0 2px 2px rgba(0,0,0,.22)); }
  .pd.p1 .award svg { width: 82px; height: 109px; }
  .pd .place { margin-top: 8px; font: italic 600 16px var(--disp); color: var(--muted); letter-spacing: .3px; }
  .pd .who { display: block; margin: 0 auto; max-width: 100%; font: 700 25px/1.08 var(--disp); color: var(--ink); overflow-wrap: anywhere; }
  .pd.p1 .who { font-size: 34px; }
  .pd .who:hover { text-decoration: underline; text-decoration-color: var(--brass); text-decoration-thickness: 1px; text-underline-offset: 5px; }
  .pd .sub { margin-top: 4px; font-size: 12px; color: var(--muted); }
  .pd .sub .flag { vertical-align: -2px; border-radius: 2px; margin-right: 3px; }
  .pd .stat { margin-top: 10px; display: flex; align-items: center; gap: 10px; }
  .pd .stat::before, .pd .stat::after { content: ''; width: 18px; height: 1px; background: var(--brass); }
  .pd .stat b { font: 700 27px/1 var(--disp); color: var(--ink); font-variant-numeric: lining-nums; } .pd.p1 .stat b { font-size: 36px; color: var(--brass); }
  .pd .stat small { font: 600 10.5px var(--sans); letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
  @media (max-width: 680px) {
    .rkframe > .in { padding: 20px 10px 6px; }
    .podium { grid-template-columns: 1fr; padding-bottom: 14px; }
    .pd.p1, .pd.p2, .pd.p3 { order: 0; border: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center;
                              gap: 0 12px; text-align: left; padding: 10px 4px; }
    .pd + .pd { border-top: 1px solid var(--rule-2); }
    .pd .crest > svg { display: none; }
    .pd .award svg, .pd.p1 .award svg { width: 38px; height: 51px; }
    .pd .place { margin: 0; font-size: 13px; }
    .pd .who, .pd.p1 .who { font-size: 23px; margin: 0; } .pd .sub { margin-top: 1px; }
    .pd .stat { margin: 0; flex-direction: column; gap: 0; align-items: flex-end; } .pd .stat::before, .pd .stat::after { display: none; }
    .pd .stat b, .pd.p1 .stat b { font-size: 26px; }
    .pd .mid { min-width: 0; }
  }
  .rktable .hzn:hover { text-decoration: underline; text-decoration-color: var(--brass); text-decoration-thickness: 1px; text-underline-offset: 4px; }
  .rktable .mv { font: 600 12px var(--mono); white-space: nowrap; }
  .rktable .up, .rktable .mv.up { color: var(--forest); } .rktable .down, .rktable .mv.down { color: var(--red-text); }
  .rktable .mv.same { color: var(--muted); } .rktable .mv.new { color: #fff; background: var(--brass); border-radius: 3px; padding: 1px 5px; font-size: 10px; }
  .rktable .cat { display: inline-flex; flex-direction: column; line-height: 1.2; white-space: nowrap; margin-right: 6px; }
  .rktable .cat b { font: italic 600 16px/1.1 var(--disp); } .rktable .cat small { font: 10.5px var(--mono); color: var(--muted); }
  .trbtn { margin: 12px 0 0; font-size: 13px; } .pflinks a { margin-right: 2px; }
  .rktable .tr { white-space: nowrap; font: 600 12.5px var(--mono); }
  .rktable .flag { vertical-align: -2px; border-radius: 2px; }
  .rkfoot { margin-top: 10px; }
  /* a profile from the rankings */
  /* ---- one house style for the site's sections and panels ------------------------------------------------------
     the sections as words in the display serif, the one shown underlined in brass (as the rankings' boards);
     every panel framed as the rankings are (an ink rule, a brass hairline inside), headed alike (a small-capital
     kicker, the title in the display serif, a fleuron between two rules), its tabs and buttons alike */
  :root { --disp: "Cormorant Garamond", Georgia, "Times New Roman", serif; }
  /* the toolbar: round icon buttons, the account chip, a segmented choice — all 36 px, one border, one hover */
  .tbar { display: flex; align-items: center; gap: 8px; }
  .tb-ico, .tb-acc, .tb-btn, .seg { height: 36px; box-sizing: border-box; border: 1px solid var(--rule); background: var(--sheet); color: var(--ink);
    transition: border-color .15s, background-color .15s, color .15s; }
  .tb-ico { width: 36px; border-radius: 50%; display: inline-grid; place-items: center; }
  .tb-ico .ico { width: 18px; height: 18px; vertical-align: 0; }
  .tb-ico:hover, .tb-acc:hover, .tb-btn:hover { border-color: var(--ink); }
  .tb-acc { border-radius: 999px; padding: 0 16px; font: 600 14px var(--sans); display: inline-flex; align-items: center; }
  .tb-acc.in { padding: 0 14px 0 4px; background: color-mix(in srgb, var(--brass) 12%, var(--sheet)); border-color: color-mix(in srgb, var(--brass) 45%, var(--rule)); }
  .tb-acc #accname { display: inline-flex; align-items: center; gap: 8px; }
  .tb-acc .av { width: 26px; height: 26px; border-radius: 50%; font: 700 10px var(--sans); color: #fff; display: grid; place-items: center; flex: none; }
  .tb-sep { width: 1px; height: 22px; background: var(--rule); margin: 0 2px; }
  #themebtn .i-sun, #themebtn[data-now="dark"] .i-moon { display: none; } #themebtn[data-now="dark"] .i-sun { display: block; }
  .seg { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; }
  .seg button { height: 100%; display: inline-flex; align-items: center; gap: 6px; padding: 0 11px; border-radius: 999px; font: 600 12.5px var(--sans); color: var(--muted); transition: background-color .15s, color .15s; }
  .seg button:hover { color: var(--ink); } .seg button.on { background: var(--ink); color: var(--sheet); }
  .seg button .ico { width: 15px; height: 15px; vertical-align: 0; }
  .tb-btn { border-radius: 999px; padding: 0 14px; display: inline-flex; align-items: center; gap: 7px; font: 600 13px var(--sans); }
  .tb-btn .ico { width: 16px; height: 16px; vertical-align: 0; color: var(--brass-text); }
  /* the sections: serif names under line icons' company, the one shown underlined in brass */
  .navrow { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px;
    border-bottom: 1px solid var(--rule); margin-top: 8px; }
  .mainnav { display: flex; flex-wrap: wrap; gap: 0 4px; }
  .mainnav .navi { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 10px; margin-bottom: -1px;
    border-bottom: 3px solid transparent; border-radius: 10px 10px 0 0; font: 700 19px/1.1 var(--disp); color: var(--muted); transition: color .15s, background-color .15s; }
  .mainnav .navi .ico { width: 19px; height: 19px; vertical-align: 0; }
  .mainnav .navi:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 4%, transparent); }
  .mainnav .navi.on { color: var(--ink); border-bottom-color: var(--brass); }
  .mainnav .navi.on .ico { color: var(--brass-text); }
  .mainnav .navi .newtag { margin-left: 0; }
  .navrow .tools { display: flex; gap: 8px; align-items: center; padding-bottom: 9px; }
  /* on a phone: the sections as a bar at the bottom of the screen, under the thumb */
  @media (max-width: 640px) {
    .mainnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px;
      padding: 5px 6px calc(5px + env(safe-area-inset-bottom)); background: var(--sheet); border-top: 1px solid var(--rule); box-shadow: 0 -8px 24px rgba(0,0,0,.08); }
    .mainnav .navi { flex-direction: column; justify-content: center; gap: 3px; min-height: 52px; padding: 5px 2px; margin: 0; border: 0; border-radius: 12px;
      font: 600 11px/1.15 var(--sans); text-align: center; }
    .mainnav .navi .ico { width: 23px; height: 23px; }
    .mainnav .navi.on { background: color-mix(in srgb, var(--brass) 15%, transparent); }
    .mainnav .navi .newtag { position: absolute; top: 3px; left: calc(50% + 8px); }
    .navrow { border-bottom: 0; margin-top: 4px; } .navrow .tools { width: 100%; justify-content: space-between; padding-bottom: 4px; }
    body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
    .toasts { bottom: calc(76px + env(safe-area-inset-bottom)); }
    .tbar { flex-wrap: wrap; }
  }
  .pfbox { border: 1px solid var(--ink); box-shadow: inset 0 0 0 5px var(--sheet), inset 0 0 0 6px var(--brass), 0 20px 50px -20px rgba(0,0,0,.45); padding: 26px 28px 22px; }
  .pfbox .phead { text-align: center; margin: 0 0 16px; }
  .pfbox .phead .kick { font: 600 10.5px var(--mono); letter-spacing: 3px; text-transform: uppercase; color: var(--brass-text); }
  .pfbox .phead h3 { font: 700 31px/1.1 var(--disp); margin: 4px 0 0; padding: 0 26px; }
  .pfbox .phead .orn { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--brass); margin: 9px 0 8px; }
  .pfbox .phead .orn i { width: 60px; height: 1px; background: var(--brass); } .pfbox .phead .orn svg { width: 13px; height: 13px; }
  .pfbox .phead .lead { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 0 auto; max-width: 600px; }
  .ptabs { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 24px; border-bottom: 1px solid var(--rule); margin: 0 0 14px; }
  .ptabs button { padding: 5px 0 6px; margin-bottom: -1px; border-bottom: 2px solid transparent; font: 700 18px var(--disp); color: var(--muted); }
  .ptabs button:hover { color: var(--ink); } .ptabs button.on { color: var(--ink); border-bottom-color: var(--brass); }
  .ptabs select { font: inherit; font-size: 13px; padding: 3px 6px; border: 1px solid var(--rule); border-radius: 6px; background: var(--sheet); color: var(--ink); margin-bottom: 5px; }
  .btn, .accbox .go { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 18px; border-radius: 999px;
                      background: var(--ink); color: var(--sheet); border: 1px solid var(--ink); font: 600 13.5px var(--sans); }
  .btn:hover, .accbox .go:hover { background: var(--brass); border-color: var(--brass); }
  .btn.small { padding: 3px 12px; font-size: 12.5px; }
  .btn.ghost { background: transparent; color: var(--ink); } .btn.ghost:hover { color: var(--sheet); }
  .gate { text-align: center; padding: 14px; margin: 0 0 16px; border: 1px dashed var(--brass); border-radius: 8px; background: color-mix(in srgb, var(--brass) 7%, var(--sheet)); }
  .gate p { margin: 0 0 10px; font-size: 14px; }
  #introwrap { position: fixed; inset: 0; z-index: 2100; display: grid; place-items: center; padding: 16px; background: rgb(0 0 0 / .72); }
  .introbox { position: relative; width: min(100%, 760px); }
  .introbox video { display: block; width: 100%; border-radius: 10px; box-shadow: 0 12px 40px rgb(0 0 0 / .5); background: #000; }
  .introx { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer; font-size: 22px; line-height: 1;
    color: #fff; background: rgb(0 0 0 / .55); }
  .introsnd { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 12px 22px; border-radius: 999px; border: 0; cursor: pointer;
    font: 600 15px var(--sans); color: #fff; background: rgb(0 0 0 / .65); box-shadow: 0 0 0 2px rgb(255 255 255 / .7); }
  #introwrap.wait .introbox { cursor: pointer; }
  .gamebox .nickform.need { padding: 10px 12px; border: 1px dashed var(--brass); border-radius: 8px; }
  .gamebox h4, .newsbox h4.sec { font: 700 18px var(--disp); margin: 16px 0 6px; }
  /* the racing news: a paper's page — the hottest stories of two days, or a morning's bulletin */
  .newsbtn { font-weight: 600; }
  .newsbox { width: min(880px, 100%); }
  .newsbox h3 { font: 800 26px/1.15 var(--serif); margin: 0 0 2px; padding-right: 26px; }
  .newsbox .sub { color: var(--muted); font-size: 12.5px; margin: 0 0 12px; }
  .newsbox .regions { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px; margin: 0 0 6px; }
  .newsbox .regions button { padding: 2px 10px; border: 1px solid var(--rule); border-radius: 999px; font-size: 12.5px; color: var(--muted); }
  .newsbox .regions button.on { background: var(--ink); color: var(--sheet); border-color: var(--ink); }
  /* the news as a feed: a post a story — who carried it, when, the story in the reader's language (the original a
     click away), its picture when the source has one, and the other papers carrying it */
  .feed { max-width: 640px; margin: 0 auto; }
  .post { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 0 12px; padding: 14px 4px; border-bottom: 1px solid var(--rule-2); }
  img.av { object-fit: cover; display: block; background: var(--rule-2); }
  .gpl { display: inline-flex; align-items: center; gap: 8px; } .gpl .av { width: 24px; height: 24px; border-radius: 50%; font: 700 9.5px var(--sans); color: #fff; display: grid; place-items: center; flex: none; }
  .annbox li .av { width: 30px; height: 30px; border-radius: 50%; font: 700 11px var(--sans); color: #fff; display: grid; place-items: center; flex: none; }
  .admq { flex: 1; min-width: 140px; padding: 6px 12px; border: 1px solid var(--rule); border-radius: 999px; background: var(--sheet); color: var(--ink); font: 14px var(--sans); }
  .admt { width: 100%; border-collapse: collapse; margin: 8px 0; } .admt th { text-align: left; font: 600 10.5px var(--sans); letter-spacing: 1px; text-transform: uppercase; color: var(--muted); padding: 6px 4px; border-bottom: 1px solid var(--rule); }
  .admt td { padding: 7px 4px; border-bottom: 1px solid var(--rule-2); vertical-align: middle; } .admt select { font: 13px var(--sans); padding: 3px 6px; border: 1px solid var(--rule); border-radius: 6px; background: var(--sheet); color: var(--ink); }
  .rolebadge { font: 600 11.5px var(--sans); padding: 2px 9px; border-radius: 999px; border: 1px solid var(--rule); } .rolebadge.r-admin { color: var(--brass-text); border-color: var(--brass); } .rolebadge.r-photo { color: var(--forest); border-color: var(--forest); } .rolebadge.r-banned { color: var(--red-text); border-color: var(--red); }
  .cropbox { max-width: 360px; text-align: center; } .cropbox canvas { width: min(280px, 100%); aspect-ratio: 1; touch-action: none; cursor: grab;
    border-radius: 8px; background: repeating-conic-gradient(var(--rule-2) 0 25%, transparent 0 50%) 0 0 / 16px 16px; display: block; margin: 0 auto 10px; }
  .cropbox canvas:active { cursor: grabbing; } .cropbox input[type=range] { width: min(280px, 100%); margin: 0 auto 12px; display: block; accent-color: var(--brass); }
  .cropbox .row { justify-content: center; }
  .mestats .pup b { color: var(--brass-text); } .mestats .pdown b { color: #6a7fd0; }
  .bellwrap { position: relative; display: inline-flex; }
  .bellbtn { position: relative; } .bellbtn[hidden] { display: none; }
  .bellnum { position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px; box-sizing: border-box; border-radius: 999px;
    background: var(--red); color: #fff; font: 700 10.5px/17px var(--sans); text-align: center; }
  .bellpanel { position: absolute; top: calc(100% + 8px); right: 0; z-index: 1200; width: min(380px, calc(100vw - 24px)); max-height: min(520px, 75vh); overflow: auto;
    background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.22); text-align: left; }
  @media (max-width: 640px) {  /* (on a phone: a sheet across the screen, never past its edges) */
    .bellpanel { position: fixed; top: 12px; left: 12px; right: 12px; width: auto; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
    .toasts { left: 12px; right: 12px; bottom: 12px; max-width: none; }
  }
  .bellhead { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 6px; position: sticky; top: 0; background: var(--sheet); }
  .bellhead b { font: 700 19px var(--disp); } .bellhead button { font: 600 12px var(--sans); color: var(--brass-text); }
  .bellpanel ul { list-style: none; margin: 0; padding: 4px 6px 8px; }
  .bellpanel li button { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; align-items: center; width: 100%; padding: 8px 26px 8px 8px; border-radius: 8px; text-align: left; font: 13.5px/1.4 var(--sans); color: var(--ink); }
  .bellpanel li button:hover { background: color-mix(in srgb, var(--ink) 6%, var(--sheet)); } .bellpanel li button.unread { background: color-mix(in srgb, var(--brass) 10%, var(--sheet)); }
  .bellpanel .av { width: 40px; height: 40px; border-radius: 50%; font: 700 14px var(--sans); color: #fff; display: grid; place-items: center; }
  .bellpanel .nicon { background: color-mix(in srgb, var(--brass) 22%, var(--sheet)); color: var(--ink); font-size: 18px; } .bellpanel .nicon.n-tip { font-size: 16px; }
  .bellpanel .ntext small { display: block; color: var(--muted); font-size: 12px; } .bellpanel .ntext .nago { color: var(--brass-text); font-weight: 600; }
  .bellpanel .dot { position: absolute; right: 10px; top: 50%; margin-top: -4.5px; width: 9px; height: 9px; border-radius: 50%; background: var(--brass); } .bellnone { padding: 6px 16px 16px; }
  .plname { display: flex; flex-direction: column; line-height: 1.25; margin-bottom: 4px; } .plname b { font-size: 18px; }
  .askwrap { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.45); }
  .askwrap[hidden] { display: none; }
  .askbox { width: min(380px, 100%); box-sizing: border-box; padding: 20px 20px 16px; border-radius: 14px; background: var(--sheet); color: var(--ink);
    border: 1px solid var(--rule); box-shadow: 0 18px 50px rgba(0,0,0,.3); }
  .askbox p { margin: 0 0 18px; font: 600 15px/1.45 var(--sans); }
  .askacts { display: flex; justify-content: flex-end; gap: 8px; } .askacts .btn.danger { background: var(--red); border-color: var(--red); color: var(--on-red); }
  .ico { width: 1.05em; height: 1.05em; vertical-align: -.17em; flex: none; } .soon .ico { margin-right: 5px; }
  .bellpanel .nicon .ico { width: 20px; height: 20px; }
  .gwho { display: inline-flex; flex-direction: column; line-height: 1.2; min-width: 0; } .gwho .handle { font-size: 11.5px; }
  .plfollow { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
  .fplayers { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 8px 10px; border-bottom: 1px solid var(--rule-2); }
  .fplayers .ty { font: 600 10.5px var(--sans); letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
  .fplayer { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border: 1px solid var(--rule); border-radius: 999px; background: var(--sheet); text-align: left; }
  .fplayer:hover { border-color: var(--ink); } .fplayer .av { width: 28px; height: 28px; border-radius: 50%; font: 700 10px var(--sans); color: #fff; display: grid; place-items: center; }
  .topviews { margin: 18px 0 6px; } .topviews[hidden] { display: none; }
  .tvlist { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 320px); gap: 12px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x mandatory; }
  .tvcard { scroll-snap-align: start; display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 12px;
    background: var(--sheet); color: var(--ink); transition: border-color .15s, transform .15s; }
  .tvcard:hover { border-color: var(--brass); }
  .tvmarq { overflow: hidden; padding: 4px 0 10px; mask-image: linear-gradient(90deg, transparent, #000 2%, #000 98%, transparent); }
  .tvtrack, .tvcopy { display: flex; gap: 12px; width: max-content; }
  .tvtrack { padding-right: 12px; will-change: transform; }   /* (so half its length is one copy and a gap: a seamless loop) */
  .tvtrack .tvcard { width: 300px; flex: none; }
  .tvmarq { cursor: grab; touch-action: pan-y; user-select: none; } .tvmarq.dragging { cursor: grabbing; } .tvmarq.dragging .tvcard { pointer-events: none; }
  .tvcard.tvbest { border: 2px solid var(--brass); background: var(--brass-soft); box-shadow: 0 8px 22px -14px rgba(0,0,0,.45); }
  .tvbadge { align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; font: 600 11px var(--sans); letter-spacing: .3px;
    color: var(--brass-text); background: var(--sheet); border: 1px solid var(--brass); border-radius: 999px; padding: 2px 9px; }
  .tvbadge .ico { width: 13px; height: 13px; }
  .tvwho { display: flex; align-items: center; gap: 8px; } .tvwho .av { width: 32px; height: 32px; border-radius: 50%; font: 700 11px var(--sans); color: #fff; display: grid; place-items: center; flex: none; }
  .tvrace { font: 600 11px var(--sans); letter-spacing: .5px; color: var(--muted); text-transform: uppercase; }
  .tvtext { font: 14px/1.45 var(--sans); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .tvmeta { display: flex; gap: 12px; font: 600 12px var(--sans); color: var(--muted); margin-top: auto; }
  .admreports { list-style: none; margin: 0; padding: 0; } .admreports li { padding: 10px 0; border-bottom: 1px solid var(--rule-2); }
  .admreports .arhead { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; } .admreports p { margin: 6px 0 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
  .aracts { display: flex; gap: 8px; flex-wrap: wrap; } .btn.danger, .accbox .btn.danger { background: var(--red); border-color: var(--red); color: var(--on-red); }
  a.btn { text-decoration: none; } .admstats .warn b { color: var(--red-text); } .admstats small { font-size: 12px; color: var(--muted); }
  /* the slim bar */
  .minibar { position: fixed; top: 0; left: 0; right: 0; z-index: 65; display: flex; align-items: center; gap: 10px;
    padding: calc(6px + env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 6px max(14px, env(safe-area-inset-left));
    background: color-mix(in srgb, var(--sheet) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); box-shadow: 0 6px 18px rgba(0,0,0,.07); }
  .minibar[hidden] { display: none; }
  .mbtitle { font: 700 18px/1 var(--serif); letter-spacing: -.3px; white-space: nowrap; } .mbtitle i { color: var(--red); font-weight: 400; }
  .mbdate { font: 600 12px var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mbacts { margin-left: auto; display: flex; gap: 8px; align-items: center; } .minibar .tb-ico, .minibar .tb-acc { height: 34px; }
  .minibar .tb-acc { white-space: nowrap; } .minibar .tb-ico { width: 34px; } .minibar .tb-acc.in { padding: 0 3px; } .minibar .tb-acc .av { width: 26px; height: 26px; }
  /* 2. the race numbers stay in reach while a long card is read */
  .rnav { position: sticky; top: 0; z-index: 6; background: var(--sheet); transition: top .2s; }
  body.mini .rnav { top: calc(47px + env(safe-area-inset-top)); }
  .star .ico, .mk .ico { width: 15px; height: 15px; vertical-align: -2px; } .chev .ico { width: 13px; height: 13px; vertical-align: -1px; }
  .vote button .ico { width: 14px; height: 14px; vertical-align: -2px; } .vote .ico { width: 13px; height: 13px; } .mestats .ico { width: .8em; height: .8em; }
  /* 8. while something loads: grey shapes where it will be, not a word (still, for reduced motion) */
  .skel { display: grid; gap: 10px; padding: 6px 0; }
  .skel i { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--rule-2) 25%, color-mix(in srgb, var(--rule-2) 40%, var(--sheet)) 50%, var(--rule-2) 75%);
    background-size: 300% 100%; animation: skel 1.3s ease-in-out infinite; }
  .skel i.w60 { width: 60%; } .skel i.w80 { width: 80%; } .skel i.w40 { width: 40%; } .skel i.h30 { height: 30px; } .skel i.av { width: 36px; height: 36px; border-radius: 50%; }
  .skel .row { display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: center; } .skel .row div { display: grid; gap: 7px; }
  @keyframes skel { from { background-position: 100% 0; } to { background-position: -100% 0; } }
  @media (prefers-reduced-motion: reduce) { .skel i { animation: none; } }
  /* the points event: a band across the top, a badge on the races it counts for */
  .evband { background: var(--ink); color: var(--paper); text-align: center; font: 600 12.5px/1.4 var(--sans); padding: 7px 14px; letter-spacing: .2px; }
  .evband[hidden] { display: none; } .evband b { color: var(--brass); font: 700 14px var(--mono); margin-right: 8px; }
  .evx { display: inline-block; font: 700 11px/1.5 var(--mono); padding: 0 6px; border-radius: 3px; background: var(--brass); color: var(--ink); vertical-align: 1px; }
  /* the event's ticket: ink, a brass frame inside, the G1 ×5 large in the middle */
  .evticket { position: relative; text-align: center; background: #1b1915; color: #f3eee3; border-radius: 6px; padding: 22px 18px 20px; margin: 4px 0 12px;
    box-shadow: inset 0 0 0 6px #1b1915, inset 0 0 0 7px #cfa851, inset 0 0 0 10px #1b1915, inset 0 0 0 11px rgba(207,168,81,.45), 0 14px 30px -14px rgba(0,0,0,.6); }
  .evticket .evkick { display: block; font: 600 11px var(--mono); letter-spacing: 3.5px; text-transform: uppercase; color: #cfa851; }
  .evticket .evorn { display: flex; align-items: center; justify-content: center; gap: 10px; color: #cfa851; font-size: 12px; margin: 10px auto; max-width: 260px; }
  .evticket .evorn i { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, #cfa851); } .evticket .evorn i:last-child { transform: scaleX(-1); }
  .evticket .evbig { display: flex; align-items: baseline; justify-content: center; gap: 14px; line-height: 1; }
  .evticket .evbig .g { font: 700 64px/1 var(--sans); letter-spacing: -2px; color: #f3eee3; }
  .evticket .evbig .x { font: 700 64px/1 var(--sans); letter-spacing: -1px; color: #e3c26e; }
  .evticket .evsub { font: 600 13px var(--sans); color: #d9cfb9; margin-top: 6px; }
  .evticket .evwhen { font: 500 13px var(--sans); color: #d9cfb9; } .evticket .evwhen b { color: #fff; font-weight: 700; }
  .evsec .evrule { text-align: center; margin: 0 6px; }
  .ntsec p { margin: 4px 0 10px; line-height: 1.55; }
  .rpstat b { color: var(--brass-text); } .rpnote { margin: 4px 0 10px; }
  .nttab { border-collapse: collapse; margin: 0 auto 6px; min-width: 240px; } .nttab th, .nttab td { padding: 5px 14px; border-bottom: 1px solid var(--rule); text-align: left; }
  .nttab th { font: 600 11px var(--sans); letter-spacing: 1px; text-transform: uppercase; color: var(--muted); } .nttab td:last-child { font-weight: 700; }
  .rnav .evx { display: block; margin: 2px auto 0; width: max-content; font-size: 11px; }
  /* (a moderator's button to put in a rider's photo: a small badge on the photo's corner, taking no room from the name) */
  /* (after the rider's name, beside the star: the photo and the name left uncovered; a long name cut short, not the badge) */
  .page.dense .a-jockey .pn { display: flex; align-items: center; min-width: 0; } .page.dense .a-jockey .pn > :not(.pnx) { flex: 0 0 auto; }
  .page.dense .a-jockey .pnx { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .jup { display: inline-grid; place-items: center; vertical-align: middle; margin-left: 4px; width: 18px; height: 18px; border-radius: 50%; cursor: pointer;
    background: var(--sheet); border: 1px solid var(--rule); color: var(--muted); } .jup:hover { color: var(--ink); border-color: var(--brass); }
  .jup .ico { width: 11px; height: 11px; }
  .plink { font: inherit; color: inherit; padding: 0; text-align: left; cursor: pointer; } .plink:hover { text-decoration: underline; }
  .pltabs { margin-top: 4px; } .plfarm { margin: 0 0 10px; } .plfarm b { font: 700 20px var(--disp); }
  .plhorses { list-style: none; margin: 0 0 12px; padding: 0; } .plhorses li { display: flex; align-items: baseline; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--rule-2); }
  .plhorses .rt { margin-left: auto; font: 700 15px var(--mono); } .plmedals { display: flex; flex-wrap: wrap; gap: 6px; }
  .plmedals .medal { font-size: 12.5px; border-radius: 999px; padding: 3px 10px; border: 1px solid; }
  .plmedals .t1 { color: #8a5626; } .plmedals .t2 { color: #6b7380; } .plmedals .t3 { color: #a37a17; } .plopen { text-align: center; margin: 14px 0 0; }
  .plhead { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; } .plhead .av { width: 64px; height: 64px; border-radius: 50%; font: 700 22px var(--sans); color: #fff; display: grid; place-items: center; flex: none; }
  .myrec { margin: 6px 0 12px; } .myrec h4 { display: flex; align-items: center; gap: 10px; } .msg.warn { color: var(--red-text); font-weight: 600; }
  .accav { display: flex; align-items: center; gap: 14px; margin: 4px 0 14px; } .accav .av { width: 72px; height: 72px; border-radius: 50%; font: 700 24px var(--sans); color: #fff; display: grid; place-items: center; flex: none; }
  .accav label.btn { color: var(--sheet); font: 600 12.5px var(--sans); margin: 0; cursor: pointer; } .accav label.btn:hover { color: var(--sheet); }
  .accav .acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .accav input[type=file] { display: none; }
  .post .av, .vpost .av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font: 700 15px var(--sans); color: #fff;
              letter-spacing: .3px; box-shadow: inset 0 0 0 2px rgba(255,255,255,.15); }
  .post .av.t1 { box-shadow: 0 0 0 2px var(--sheet), 0 0 0 3.5px var(--brass); }
  .post .who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; font-size: 14px; line-height: 1.3; }
  .post .who b { font-weight: 700; } .post .who .dim { color: var(--muted); font-size: 13px; }
  .post .who .flag { vertical-align: -2px; border-radius: 2px; }
  .post .who .hot { margin-left: auto; font: 600 10.5px var(--sans); letter-spacing: 1px; text-transform: uppercase; color: var(--brass-text);
                    border: 1px solid var(--brass); border-radius: 4px; padding: 0 5px; }
  .post .txt { margin-top: 4px; font-size: 15.5px; line-height: 1.45; }
  .post .txt b { font-weight: 700; display: block; }
  .post .txt p { margin: 4px 0 0; font-size: 14.5px; color: color-mix(in srgb, var(--ink) 85%, var(--muted)); }
  .post .orig { margin-top: 6px; }
  .post .orig summary { list-style: none; cursor: pointer; font-size: 12.5px; color: var(--muted); }
  .post .orig summary::-webkit-details-marker { display: none; }
  .post .orig summary:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
  .post .orig div { margin-top: 4px; padding: 8px 10px; border-left: 2px solid var(--rule); font-size: 13.5px; color: var(--muted); }
  .post .pic { display: block; margin-top: 10px; border-radius: 14px; overflow: hidden; border: 1px solid var(--rule-2); background: var(--paper); }
  .post .pic img { display: block; width: 100%; max-height: 360px; object-fit: cover; }
  .post .acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
  .post .acts a { color: var(--muted); text-decoration: none; } .post .acts a:hover { color: var(--ink); }
  .post .acts .read { margin-left: auto; font-weight: 600; color: var(--ink); }
  .post .acts .heat { display: inline-block; height: 4px; border-radius: 2px; background: var(--brass); vertical-align: 2px; margin-right: 5px; }
  .post .also a { text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
  @media (max-width: 560px) { .post { grid-template-columns: 36px minmax(0, 1fr); gap: 0 10px; } .post .av { width: 36px; height: 36px; font-size: 13px; } }
  .newsbox .note { font-size: 12px; color: var(--muted); margin-top: 12px; }
  /* accounts: the header button, and a panel to sign in, register, or (signed in) manage the account */
  .accbox { width: min(460px, 100%); }
  .accbox h3 { font: 800 22px/1.2 var(--serif); margin: 0 0 4px; padding-right: 26px; }
  .accbox .lead { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
  .accbox form { display: grid; gap: 10px; margin-bottom: 16px; }
  .accbox label { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); }
  .accbox input { font: inherit; font-size: 15px; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 6px; background: var(--sheet); color: var(--ink); }
  .accbox input:focus { outline: 2px solid var(--brass); outline-offset: 1px; }
  .accbox .go { justify-self: start; }
  .accbox .msg { min-height: 18px; font-size: 13px; color: var(--red-text); } .accbox .msg.ok { color: var(--forest); }
  .accbox details { border-top: 1px solid var(--rule-2); padding: 10px 0; } .accbox summary { cursor: pointer; font-weight: 600; font-size: 13.5px; }
  .accbox .row { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 14px; }
  .accbox .danger { color: var(--red-text); border-color: var(--red); }
  /* the mini game: a strip on each card not yet off, and its panel (points, the month's table, the player's tips) */
  .tipbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 22px 12px; padding: 9px 14px; border: 1px dashed var(--brass);
            border-radius: 8px; background: color-mix(in srgb, var(--brass) 7%, var(--sheet)); font-size: 13.5px; }
  .views { margin: 6px 22px 22px; padding-top: 14px; border-top: 1px solid var(--rule); }
  .views h3 { font: 700 20px var(--disp); margin: 0 0 10px; } .views h3 small { font: 600 12px var(--mono); color: var(--muted); }
  .vcompose { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; margin-bottom: 14px; }
  .vcompose .av, .vpost .av { width: 36px; height: 36px; border-radius: 50%; font: 700 13px var(--sans); color: #fff; display: grid; place-items: center; }
  .vbox { border: 1px solid var(--rule); border-radius: 18px; padding: 8px 12px; background: color-mix(in srgb, var(--ink) 4%, var(--sheet)); }
  .vbox textarea { width: 100%; box-sizing: border-box; border: 0; outline: 0; background: transparent; color: var(--ink); font: 14px/1.5 var(--sans); resize: none; padding: 4px 0; }
  .vbox .vrow { display: flex; align-items: center; gap: 10px; } .vbox .vrow .btn { margin-left: auto; }
  .vbody { min-width: 0; } .vbub { display: inline-block; max-width: 100%; box-sizing: border-box; padding: 8px 12px; border-radius: 18px;
    background: color-mix(in srgb, var(--ink) 7%, var(--sheet)); } .vbub p { margin: 3px 0 0; white-space: pre-wrap; line-height: 1.45; overflow-wrap: anywhere; }
  .vbub .you { color: var(--muted); font-size: 12px; } .handle { color: var(--muted); font-weight: 400; font-size: .92em; }
  .vedit textarea { width: 100%; box-sizing: border-box; padding: 8px 12px; border: 1px solid var(--brass); border-radius: 14px; font: 14px/1.5 var(--sans);
    background: color-mix(in srgb, var(--ink) 4%, var(--sheet)); color: var(--ink); resize: none; }
  .vedit .vrow { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; } .vbub .vmarks { margin-top: 3px; }
  .vhit { display: inline-flex; align-items: center; gap: 3px; margin-left: 8px; padding: 0 7px; border-radius: 999px; font: 700 11px/18px var(--sans);
    background: color-mix(in srgb, var(--forest) 16%, transparent); color: var(--forest); vertical-align: 1px; }
  .vhit .ico { width: 12px; height: 12px; } .vhit.miss { background: none; color: var(--muted); font-weight: 600; }
  .vpost.vflash > .vbody > .vbub { box-shadow: 0 0 0 2px var(--red); transition: box-shadow .3s; }
  .vmeta { display: flex; flex-wrap: wrap; row-gap: 2px; white-space: nowrap; gap: 12px; padding: 3px 12px 0; font: 600 12px var(--sans); color: var(--muted); }
  .vote { display: inline-flex; align-items: center; gap: 4px; } .vote b { min-width: 14px; text-align: center; color: var(--ink); }
  .vmeta .vote button { font-size: 12px; line-height: 1; padding: 2px 3px; border-radius: 4px; }
  .vmeta .vote button:hover { text-decoration: none; background: color-mix(in srgb, var(--ink) 8%, transparent); }
  .vote.up button[data-vote="1"], .vote.up b { color: var(--brass-text); } .vote.down button[data-vote="-1"], .vote.down b { color: #6a7fd0; }
  .vmeta button { font: inherit; color: inherit; padding: 0; } .vmeta button:hover { text-decoration: underline; color: var(--ink); } .vmeta .danger { color: var(--red-text); }
  .vown { border: 1px solid var(--rule-2); border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; background: var(--sheet); }
  .vown textarea { width: 100%; box-sizing: border-box; margin: 8px 0; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 6px;
                   font: 14px/1.5 var(--sans); background: var(--paper, var(--sheet)); color: var(--ink); resize: none; }
  .vown.done p, .vpost p { white-space: pre-wrap; margin: 6px 0 0; line-height: 1.5; overflow-wrap: anywhere; }
  .vrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .vrow .btn { margin-left: auto; }
  .vshare { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; cursor: pointer; }
  .vgate { margin-bottom: 14px; padding: 10px 12px; border: 1px dashed var(--brass); border-radius: 8px; }
  .vmarks { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13.5px; }
  .vm em { font-style: normal; font: 600 11px var(--mono); margin-left: 5px; color: var(--muted); } .vm em.won { color: var(--brass-text); }
  .vlist, .vreplies { list-style: none; margin: 0; padding: 0; } .vreplies { margin: 4px 0 0; }
  .vreplies .vpost { grid-template-columns: 28px minmax(0, 1fr); } .vreplies .av, .vreply .av { width: 28px; height: 28px; font-size: 10.5px; }
  .vreply { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 8px; align-items: center; margin: 6px 0 2px; }
  .vreply input { min-width: 0; padding: 7px 12px; border: 1px solid var(--rule); border-radius: 999px; background: color-mix(in srgb, var(--ink) 4%, var(--sheet)); color: var(--ink); font: 13.5px var(--sans); }
  .vreply .av { border-radius: 50%; color: #fff; display: grid; place-items: center; font-weight: 700; } .vpost { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 8px; padding: 5px 0; }
  .vpost .who { display: flex; gap: 6px; align-items: baseline; }
  .vdel { margin-left: auto; font: 600 11.5px var(--sans); color: var(--red, #b3261e); border: 1px solid currentColor; border-radius: 999px; padding: 1px 10px; } .vnone { margin: 0; }
  .tipbar .tg { font: 600 10.5px var(--sans); letter-spacing: 1.5px; text-transform: uppercase; color: var(--brass-text); }
  .tipbar select { font: inherit; padding: 4px 8px; border: 1px solid var(--rule); border-radius: 6px; background: var(--sheet); color: var(--ink); max-width: 100%; }
  .tipbar .mine b { font-weight: 700; } .tipbar .won { color: var(--forest); font-weight: 700; } .tipbar .lost { color: var(--muted); }
  .tipbar .pill { padding: 3px 10px; font-size: 12px; }
  .gamebox h3 { font: 800 24px/1.15 var(--serif); margin: 0 0 4px; padding-right: 26px; }

  .annbox { max-width: 460px; } .annbox:has(.ntsteps) { max-width: 600px; }
  /* (a notice's guide: each part numbered, its heading and what to do there, one under another) */
  .annbox ol.ntsteps { text-align: left; margin: 12px 0 4px; counter-reset: none; }
  .annbox .ntsteps li { display: block; padding: 10px 12px; }
  .annbox .ntsteps li b { display: block; font: 700 15px var(--sans); margin-bottom: 3px; color: var(--ink); }
  .annbox .ntsteps li span { display: block; font-size: 14px; line-height: 1.55; color: var(--ink-2, var(--ink)); }
  .annbox section { margin: 0 0 14px; } .annbox h4 { font: 700 18px var(--disp); margin: 0 0 8px; text-align: center; }
  .annbox ol, .annbox ul { list-style: none; margin: 0; padding: 0; }
  .annbox li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--rule-2); border-radius: 6px; margin-bottom: 6px; }
  .annbox li .award svg { width: 28px; height: 28px; } .annbox li .pts { margin-left: auto; color: var(--muted); white-space: nowrap; }
  .annbox .you { color: var(--brass-text); font-weight: 700; } .annbox .mark { font: 700 16px var(--disp); color: var(--brass); min-width: 52px; }
  .annacts { display: flex; justify-content: center; gap: 10px; margin-top: 6px; }
  .gamebox .yday { margin-top: 8px; } .gamebox .yday .award svg { width: 18px; height: 18px; vertical-align: -4px; }
  .gamebox .mestats, .admstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-bottom: 14px; }
  .gamebox .mestats div, .admstats div { border: 1px solid var(--rule-2); border-radius: 6px; padding: 8px 10px; }
  .gamebox .mestats b, .admstats b { display: block; font: 700 22px var(--mono); } .gamebox .mestats span, .admstats span { font: 600 10.5px var(--sans); letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
  .gamebox form { display: flex; gap: 8px; margin: 0 0 14px; flex-wrap: wrap; align-items: center; justify-content: center; }
  .gamebox input { font: inherit; padding: 6px 10px; border: 1px solid var(--rule); border-radius: 6px; background: var(--sheet); color: var(--ink); }
  .gamebox table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
  .gamebox th { text-align: left; font: 600 10.5px var(--sans); letter-spacing: 1px; text-transform: uppercase; color: var(--muted); padding: 5px 6px; border-bottom: 1px solid var(--ink); }
  .gamebox td { padding: 6px; border-bottom: 1px solid var(--rule-2); } .gamebox td.r { text-align: right; font-family: var(--mono); } .gamebox th.r { text-align: right; }
  .gamebox tr.me td { background: var(--hl); font-weight: 600; }
  .gamebox .tips button { width: 100%; text-align: left; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 7px 10px;
                          border: 1px solid var(--rule-2); border-radius: 5px; margin-bottom: 4px; font-size: 13px; }
  .gamebox .tips button:hover { border-color: var(--ink); }
  .gamebox .tips .st { font: 700 12px var(--mono); text-align: right; } .gamebox .tips .st.won { color: var(--forest); } .gamebox .tips .st.wait { color: var(--muted); }
  .gamebox .tips small { color: var(--muted); grid-column: 1 / -1; }
  .gamebox .two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; } @media (max-width: 640px) { .gamebox .two { grid-template-columns: 1fr; } }
  .pfwrap { position: fixed; inset: 0; z-index: 80; background: rgba(20, 18, 14, .45); display: flex; justify-content: center; align-items: flex-start; overflow-y: auto; padding: 5vh 14px; }
  .pfwrap[hidden] { display: none; }
  @media (pointer: coarse) and (max-height: 520px) { .pfwrap { background: var(--sheet); overscroll-behavior: contain; } }  /* (a phone on its side) */
  body.pfopen { overflow: hidden; }
  .pfbox { position: relative; width: min(720px, 100%); background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; padding: 22px 24px 20px; }
  .pfx { position: absolute; top: 10px; right: 14px; font-size: 24px; line-height: 1; color: var(--muted); }
  .pfx:hover { color: var(--ink); }
  .pfhead { display: flex; gap: 16px; align-items: center; margin-bottom: 12px; padding-right: 26px; }
  .pfimg { width: 120px; height: 90px; object-fit: cover; border-radius: 6px; border: 1px solid var(--rule); flex: 0 0 auto; }
  .pfhead h3 { font: 800 26px/1.15 var(--serif); margin: 2px 0; }
  /* (a person's picture: round, the face — near the top of a portrait — in it) */
  .pfimg.person { width: 96px; height: 96px; border-radius: 50%; object-position: 50% 18%; }
  .pfkind { font: 600 10.5px var(--sans); letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
  .pfboard { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 16px; padding: 12px 0; border-top: 1px solid var(--rule-2); border-bottom: 1px solid var(--rule-2); font-size: 14px; }
  .pfboard .k, .pff .k { display: block; font: 600 10.5px var(--sans); letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
  .pfbox h4 { font: 700 14px var(--sans); margin: 14px 0 6px; }
  .pfruns { display: flex; flex-direction: column; gap: 4px; }
  .pfruns button { text-align: left; padding: 6px 10px; border: 1px solid var(--rule-2); border-radius: 5px; font-size: 13.5px; }
  .pfruns button:hover { border-color: var(--ink); }
  .pfext { margin: 14px 0 10px; line-height: 1.55; }
  .pffacts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 18px; font-size: 13.5px; }
  .pff.wide { grid-column: 1 / -1; } .pff ul { margin: 2px 0 0; padding-left: 18px; columns: 2; column-gap: 24px; } .pff li { break-inside: avoid; }
  .pfnote { margin: 14px 0; color: var(--muted); font-size: 13.5px; }
  .pfact { display: flex; gap: 10px; align-items: center; margin-top: 14px; }
  @media (max-width: 560px) { .pfbox { padding: 18px 14px; } .pfimg { width: 84px; height: 64px; } .pfhead h3 { font-size: 21px; } .pff ul { columns: 1; } }
  .rktabs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
  .rktabs { gap: 0 22px; border-bottom: 1px solid var(--rule); margin-bottom: 18px; }
  .rktabs button { padding: 8px 0 7px; margin-bottom: -1px; border-bottom: 2px solid transparent; font: 700 19px var(--disp, 'Cormorant Garamond', Georgia, serif); color: var(--muted); }
  .rktabs button:hover { color: var(--ink); }
  .rktabs button.on { color: var(--ink); border-bottom-color: var(--brass); }
  .rkfilters { display: flex; gap: 2px 16px; flex-wrap: wrap; justify-content: center; margin: 0 0 14px; }
  .rkfilters button { padding: 3px 0; border-bottom: 1px solid transparent; font: italic 600 16px var(--disp); color: var(--muted); }
  .rkfilters button:hover { color: var(--ink); }
  .rkfilters button.on { color: var(--ink); border-bottom-color: var(--brass); }
  .rkfilters button span { font: normal 10.5px var(--mono); color: var(--brass-text); margin-left: 2px; }
  .rkfilters button small { font: normal 10.5px var(--mono); color: var(--muted); margin-left: 4px; }
  /* the head of the board inside its frame: the title centred over a fleuron between two rules, the dates under it */
  .rkcap { text-align: center; margin: 0 0 22px; }
  .rkcap h2 { font: 700 clamp(28px, 3.6vw, 42px)/1.05 var(--disp); margin: 0; letter-spacing: .2px; }
  .rkcap .orn { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--brass); margin: 10px 0 8px; }
  .rkcap .orn i { width: 70px; height: 1px; background: var(--brass); } .rkcap .orn svg { width: 14px; height: 14px; }
  .rkcap .rkmeta { margin: 0; font-size: 12.5px; }
  .rkfoot { text-align: center; }
  .rktable .num2 { font: 13px var(--mono); white-space: nowrap; color: var(--muted); }
  .rktable .sf { font: italic 600 16px var(--disp); }
  .rktable .star { vertical-align: 1px; }
  @media (max-width: 560px) { .rktable .hide-s { display: none; } }
  @media (max-width: 560px) {
    .rktable .ow, .rktable th:nth-child(7), .rktable .sf, .rktable th:nth-child(6) { display: none; }
    .rktable td, .rktable th { padding: 7px 6px; } .rktable .rk, .rktable .rt { font-size: 20px; } .rktable .hzn { font-size: 18px; }
    .rktable tr.top1 .hzn, .rktable tr.top2 .hzn, .rktable tr.top3 .hzn { font-size: 19px; } .rktable tr.top1 .rt, .rktable tr.top2 .rt, .rktable tr.top3 .rt { font-size: 22px; }
    .rkcap h2 { font-size: 27px; }
  }
  .countries .soon { font-weight: 600; }
  .countries .soon.on { background: var(--red); border-color: var(--red); color: var(--on-red); }
  .soonnote { margin: -4px 0 10px; font-size: 12.5px; color: var(--muted); }
  .soonnote[hidden] { display: none; }
  .figs .more { color: var(--muted); margin-left: 2px; }
  .runs td.seed { font-family: var(--mono); color: var(--muted); }
  .runs td.seed.fav { color: var(--ink); font-weight: 700; }
  .runs td.seed.beat { color: var(--red-text); font-weight: 700; }
  .presence { font: 12px var(--mono); color: var(--muted); margin-top: 4px; display: flex; align-items: center; gap: 6px; }
  .presence[hidden] { display: none; }
  .presence .live { width: 7px; height: 7px; border-radius: 50%; background: var(--forest); }
  .peek { display: flex; gap: 16px; align-items: center; padding: 22px 24px 0; }
  .peek .pk-no { font-family: var(--mono); font-size: 34px; font-weight: 600; line-height: 1; }
  .peek b { display: block; font-size: 20px; font-weight: 700; }
  .peek span { font-size: 13px; color: var(--muted); }
  /* followed horses and jockeys */
  .star { font-size: 15px; line-height: 1; color: var(--muted); padding: 2px 3px; border-radius: 4px; font-family: var(--sans); font-variant: normal; }
  .star:hover { color: var(--brass); }
  .star.on { color: var(--brass); }
  .entry.fol { background: color-mix(in srgb, var(--brass) 9%, transparent); }
  /* one's own marks in a race (◎ ○ ▲ △ ☆ ✓ ✕) */
  .mk { font: 600 15px/1 var(--sans); width: 24px; height: 24px; margin-right: 6px; border-radius: 50%; border: 1px dashed var(--rule);
        color: var(--muted); vertical-align: 2px; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
  .mk:hover { border-color: var(--ink); color: var(--ink); }
  .mk.on { border-style: solid; border-color: currentColor; background: var(--sheet); }
  .mk-honmei { color: var(--red-text) !important; } .mk-taikou { color: var(--forest) !important; } .mk-tanana { color: var(--brass) !important; }
  .mk-renka { color: var(--ink) !important; } .mk-hoshi { color: #7a5bb5 !important; } .mk-check { color: #2f6db0 !important; }
  .mk-kesu { color: var(--done) !important; }
  .entry.m-honmei { background: color-mix(in srgb, var(--red) 8%, transparent); }
  .entry.m-taikou { background: color-mix(in srgb, var(--forest) 8%, transparent); }
  .entry.m-tanana { background: color-mix(in srgb, var(--brass) 10%, transparent); }
  .entry.m-renka { background: color-mix(in srgb, var(--ink) 5%, transparent); }
  .entry.m-hoshi { background: color-mix(in srgb, #7a5bb5 8%, transparent); }
  .entry.m-check { background: color-mix(in srgb, #2f6db0 8%, transparent); }
  .entry.m-kesu .a-horse, .entry.m-kesu .people { opacity: .45; }
  .markpick { position: absolute; z-index: 1100; background: var(--sheet); border: 1px solid var(--ink); border-radius: 8px; padding: 4px;
              box-shadow: 0 8px 24px rgba(0,0,0,.18); display: grid; min-width: 190px; }
  .markpick[hidden] { display: none; }  /* (display: grid above would otherwise keep it on screen) */
  .markpick button { display: flex; gap: 10px; align-items: center; padding: 6px 10px; border-radius: 5px; font-size: 13.5px; text-align: left; color: var(--ink); }
  .markpick button:hover, .markpick button.on { background: var(--hl); }
  .markpick .sym { font-size: 17px; width: 20px; text-align: center; font-weight: 700; }
  .markpick .clr { color: var(--muted); border-top: 1px solid var(--rule-2); border-radius: 0 0 5px 5px; }
  .toasts { position: fixed; right: 16px; bottom: 16px; z-index: 70; display: grid; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
  .toast { position: relative; background: var(--ink); color: var(--paper); border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
  .toast .tb { display: grid; gap: 3px; text-align: left; padding: 12px 34px 12px 14px; color: inherit; width: 100%; }
  .toast .tb b { font-size: 14px; } .toast .tb span { font-size: 13px; opacity: .85; }
  .toast .tx { position: absolute; top: 6px; right: 8px; color: inherit; opacity: .7; font-size: 18px; line-height: 1; }
  .marked { border-color: var(--red); background: color-mix(in srgb, var(--red) 6%, var(--sheet)); }
  .marked .mres { font-family: var(--mono); font-size: 12px; }
  .marked .unmark { color: var(--muted) !important; text-decoration: none !important; }
  .follow { margin-top: 14px; border: 1px solid var(--brass); border-radius: 6px; background: var(--brass-soft); padding: 10px 14px; }
  .follow h2 { font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 17px; margin: 0 0 6px; }
  .follow h2 .clearall { float: right; font: 500 12px var(--sans); font-style: normal; color: var(--muted); border: 1px solid var(--rule); border-radius: 999px; padding: 2px 10px; }
  .follow h2 .clearall:hover { color: var(--ink); border-color: var(--ink); }
  .follow h2 .clearall.sure { color: var(--sheet); background: var(--red); border-color: var(--red); }
  .follow ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
  .follow li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 13.5px; }
  .follow li b { font-weight: 600; }
  .follow li button { color: var(--ink); text-decoration: underline; text-decoration-color: var(--brass); text-underline-offset: 2px; font-size: 13px; }
  .follow .fday { font-family: var(--mono); font-size: 11px; color: var(--muted); padding-left: 8px; border-left: 1px solid var(--brass); }
  .follow .fday.on { color: var(--ink); font-weight: 600; }
  .follow .ty { font: 600 10.5px var(--sans); letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }

  /* feature races: a banner on the card, a row of them for the day */
  .fbanner { --acc: #e3c46f; background: #15130f; color: #f1e9d6; padding: 16px 22px; display: grid; grid-template-columns: 54px minmax(0, 1fr) 54px;
             align-items: center; gap: 12px; text-align: center; border-bottom: 3px double var(--acc); }
  .fbanner.k2 { --acc: #d7dbe0; } .fbanner.k3 { --acc: #d39a73; } .fbanner.kL { --acc: #8fc7b3; } .fbanner.kF { --acc: #c9b8f0; } .fbanner.kN { --acc: #b9ad94; }
  .fbanner svg { width: 54px; height: 64px; color: var(--acc); }
  .fbanner .lv { font-family: var(--mono); font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: var(--acc); }
  .fbanner .nm { font-family: var(--serif); font-weight: 800; font-size: clamp(21px, 2.4vw, 30px); line-height: 1.12; margin: 3px 0; }
  .fbanner .sub { font-size: 12.5px; color: #b9ad94; }
  .fbanner .sub b { color: #f1e9d6; font-weight: 600; }
  .bigday { margin-top: 16px; }
  .bigday h2 { font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 18px; margin: 0 0 8px; }
  .bigs { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
  .big { --acc: #e3c46f; flex: 0 0 auto; width: 250px; text-align: left; background: #15130f; color: #f1e9d6; border-radius: 6px; padding: 11px 14px 12px;
         border-top: 3px solid var(--acc); }
  .big:hover .bn { text-decoration: underline; text-underline-offset: 3px; }
  .big.k2 { --acc: #d7dbe0; } .big.k3 { --acc: #d39a73; } .big.kL { --acc: #8fc7b3; } .big.kF { --acc: #c9b8f0; } .big.kN { --acc: #b9ad94; }
  .big .bl { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
  .big .bl .bg { font: 700 11px var(--mono); letter-spacing: 1px; color: var(--acc); border: 1px solid currentColor; border-radius: 999px; padding: 1px 8px; }
  .big .bl .bt { font: 600 13px var(--mono); color: #f1e9d6; }
  .big .bc { align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; padding: 2px 9px; border-radius: 999px;
    background: rgba(255,255,255,.08); color: #d9cfb9; font: 600 11.5px var(--sans); } .big .bc .ico { width: 13px; height: 13px; vertical-align: 0; }
  .big .bn { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-family: var(--serif); font-weight: 800;
    font-size: 18px; line-height: 1.15; margin: 8px 0 5px; min-height: 2.3em; }
  .big { display: flex; flex-direction: column; }
  .big .bv { font-size: 12px; color: #b9ad94; display: flex; gap: 6px; align-items: center; }
  .big.ran { opacity: .6; }
  .fi:has(.s1) .fn { color: #f2d77e; font-weight: 700; } .fi .s1 { font-size: 11.5px; padding: 1px 8px; }
  .fi .s2 { color: #d7dbe0; border-color: #d7dbe0; }
  .grade.g1 { background: linear-gradient(90deg, #f2d77e, #c99a35); color: #1c1505; font-size: 13px; padding: 2px 10px; }
  /* the grades in order of standing: G1 in gold and light, G2 in silver, G3 in bronze */
  .fbanner, .big { position: relative; overflow: hidden; }
  .fbanner.k1 { background: linear-gradient(135deg, #1d1606 0%, #2c210a 45%, #1a1405 100%); border-top: 3px double #e3c46f; border-bottom: 3px double #e3c46f; padding: 22px 22px; }
  .fbanner.k1 .nm { font-size: clamp(25px, 3vw, 38px); color: #f2d77e; }
  .fbanner.k1 .lv { font-size: 12.5px; letter-spacing: 5px; font-weight: 700; }
  .fbanner.k1 svg { width: 64px; height: 76px; }
  .fbanner.k2 { background: linear-gradient(135deg, #15171a 0%, #23262b 50%, #15171a 100%); border-top: 2px solid #d7dbe0; border-bottom: 2px solid #d7dbe0; }
  .fbanner.k2 .nm { font-size: clamp(23px, 2.7vw, 33px); color: #e6eaee; }
  .fbanner.k2 .lv { letter-spacing: 4px; font-weight: 600; }
  .big.k1 { width: 290px; border: 2px solid #e3c46f; padding-top: 13px; background: linear-gradient(150deg, #2c210a 0%, #15130f 60%); }
  .big.k1 .bn { font-size: 20px; color: #f7e6a8; }
  .big.k1 .bl { font-weight: 700; }
  /* (a silver frame inside the card: a pale border outside would vanish against the paper) */
  .big.k2 { outline: 1.5px solid #c3c9d1; outline-offset: -5px; padding-top: 12px; background: linear-gradient(150deg, #2a2e34 0%, #15130f 65%); }
  .big.k2 .bn { color: #eef1f4; }
  /* G1 only: a slow sweep of light across */
  .fbanner.k1::after, .big.k1::after { content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 236, 170, .16) 50%, transparent 65%); transform: translateX(-100%);
    animation: g1-sheen 5.5s ease-in-out infinite; }
  @keyframes g1-sheen { 0%, 55% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
  @media (prefers-reduced-motion: reduce) { .fbanner.k1::after, .big.k1::after { animation: none; display: none; } }
  @media (max-width: 800px) { .fbanner { grid-template-columns: 30px minmax(0, 1fr) 30px; padding: 12px 10px; } .fbanner svg { width: 30px; height: 40px; } }

  /* the course, under the card */
  .course { margin-top: 18px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; }
  .course .cmap { display: block; background: #fff; text-align: center; }
  .course .cmap img { max-width: 100%; max-height: 520px; display: inline-block; }
  .course .satbtn { float: right; font: 500 12px var(--sans); font-style: normal; margin-top: -2px; }
  .course h3 { margin: 0; padding: 14px 22px 10px; font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 18px;
               display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; border-bottom: 1px solid var(--rule); }
  .course h3 small { font-family: var(--sans); font-style: normal; font-weight: 400; font-size: 12px; color: var(--muted); }
  .course .diagram { padding: 22px; display: flex; justify-content: center; background: #fff; }
  .course .diagram img { max-width: 100%; height: auto; max-height: 340px; }
  /* (the map's own layers stack up to 1000 inside it, not over the page: the mark picker and the rest stay above) */
  .course .map { height: 380px; background: #1c1f1b; position: relative; z-index: 0; isolation: isolate; }
  .course .cap { padding: 8px 22px 12px; font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--rule-2); }
  .course .cap b { color: var(--ink); font-weight: 600; }
  .course .none { padding: 30px 22px; text-align: center; color: var(--muted); font-family: var(--serif); font-style: italic; }
  .course .keys { display: inline-flex; gap: 12px; margin-left: auto; font-size: 12px; font-family: var(--sans); font-style: normal; font-weight: 400; color: var(--muted); }
  .course .keys i { display: inline-block; width: 16px; height: 16px; border-radius: 50%; color: #fff; font-style: normal; font-weight: 700; font-size: 10px;
                    text-align: center; line-height: 16px; margin-right: 4px; }
  @media (max-width: 800px) { .course .map { height: 280px; } .course .diagram { padding: 12px; } }

  /* sans throughout, upright: headings and labels that were italic serif read plainly now */
  .title i, .edition, .sec, .sech, .quote, .quote summary, .bigday h2, .follow h2, .course h3, .foot h2, .rno, .off .l, .off .t,
  .going, .cmt, .empty, .fbanner .nm, .rlabel, .day .d, .fline i, .breed i { font-style: normal; }
  .title { letter-spacing: -1px; font-weight: 700; } .title i { font-weight: 400; }
  .rtitle, .rno b, .num, .day .d, .fbanner .nm, .big .bn { font-weight: 700; letter-spacing: -.2px; }

  /* the back page */
  .foot { margin-top: 40px; background: #15130f; color: #e9e1cf; border-top: 3px double #5a5141; }
  .foot .wrap { padding-top: 30px; padding-bottom: 18px; }
  .fcols { display: grid; grid-template-columns: 1.4fr 1.1fr 1fr; gap: 28px; }   /* (the gifts' column gone, 2026-11-29) */
  @media (max-width: 1100px) { .fcols { grid-template-columns: 1fr 1fr; } }
  @media (max-width: 640px) { .fcols { grid-template-columns: 1fr; } }
  .foot h2 { margin: 0 0 10px; font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 19px; color: #e3c46f; }
  .foot a { color: #f1e9d6; text-decoration-color: #7d7360; text-underline-offset: 2px; }
  .foot a:hover { text-decoration-color: #e3c46f; }
  .foot .small, .foot .lead { color: #a69c88; font-size: 12.5px; }
  .foot .lead { margin: -4px 0 12px; }
  .cm { display: grid; grid-template-columns: 34px 1fr; gap: 0 10px; align-items: center; padding: 9px 10px; margin-bottom: 8px; border: 1px solid #3a342a;
        border-radius: 6px; text-decoration: none; background: #1d1a15; transition: border-color .15s, transform .15s; }
  .cm:hover { border-color: #e3c46f; transform: translateY(-1px); }
  .cm svg { width: 30px; height: 30px; grid-row: span 3; }
  .cm .k { font: 600 10.5px var(--sans); letter-spacing: 1px; text-transform: uppercase; color: #a69c88; }
  .cm .n { font-weight: 600; font-size: 14px; line-height: 1.25; }
  .cm .c { font-size: 11.5px; color: #a69c88; } .cm .c b { color: #8fd19e; font-weight: 500; }
  .legend { margin: 0; font-size: 12.5px; display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; align-items: start; }
  .legend dt { white-space: nowrap; display: flex; gap: 4px; align-items: center; min-height: 20px; }
  .legend dd { margin: 0; color: #cfc6b3; }
  .legend .grade { margin: 0; font-size: 10.5px; padding: 1px 6px; }
  .foot .g2 { background: #efe6d2; color: #15130f; } .foot .g3 { border-color: #efe6d2; } .foot .gL { border-color: #8fc7b3; color: #8fc7b3; }
  .ldot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid #8fc7b3; }
  .ldot.done { background: #7d7360; border-color: #7d7360; } .ldot.gr { background: #cfa851; border-color: #cfa851; } .ldot.on { background: #e2674b; border-color: #e2674b; }
  .lsilk svg { width: 26px; height: 26px; }
  .foot .long { color: #e2674b; font-weight: 600; font-size: 11.5px; }
  .cover, .srcl { margin: 0 0 10px; padding: 0; list-style: none; font-size: 12.5px; color: #cfc6b3; }
  .cover li, .srcl li { padding: 4px 0; border-bottom: 1px dotted #3a342a; }
  .cover b { color: #f1e9d6; font-weight: 600; }
  .status-list { font-family: var(--mono); font-size: 11.5px; margin: 6px 0; }
  .status-list div { display: flex; gap: 7px; align-items: center; padding: 2px 0; }
  .status-list i { width: 8px; height: 8px; border-radius: 50%; background: #8fd19e; display: inline-block; }
  .status-list i.bad { background: #e2674b; }
  .notice { margin: 26px 0 0; padding: 12px 16px; border: 1px solid #5a5141; border-left: 4px solid #e3c46f; border-radius: 0 6px 6px 0;
            background: #1d1a15; font-size: 13.5px; line-height: 1.55; color: #e9e1cf; }
  .notice b { color: #e3c46f; }
  .fline { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 20px; margin-top: 26px; padding-top: 12px; border-top: 1px solid #3a342a;
           font-size: 11.5px; color: #8d846f; }
  .fline i { font-family: var(--serif); color: #e3c46f; }

  @media (max-width: 800px) {
    .wrap { padding: 0 14px; }
    .mast .wrap { grid-template-columns: 1fr; } .ctl { justify-content: flex-start; }
    .tl-lab { flex-basis: 112px; font-size: 11px; }
    .sec { flex-wrap: wrap; } .sec .countries { margin-left: 0; width: 100%; }
    .head { grid-template-columns: 1fr; padding: 16px; } .rno { display: flex; gap: 14px; align-items: baseline; text-align: left; }
    .rno b { font-size: 40px; } .off { margin: 0; text-align: left; }
    .quote { margin: 12px 16px 0; } .status { padding: 6px 16px 0; }
    /* (only the number column's heading stays, to change the order) */
    .ehead { display: block; padding: 8px 14px 4px; border-bottom-width: 1px; } .ehead > div:not(.a-no), .ehead.res { display: none; } .ehead .a-no { text-align: left !important; }
    .nosort { font-size: 11.5px; }
    /* a card per runner: number, silks, horse, price on top; jockey and trainer side by side below */
    .entry { grid-template-columns: 40px 52px minmax(0, 1fr) 70px; grid-template-areas: "no silk horse price" "people people people people"; gap: 6px 10px; padding: 10px 14px; }
    .entry.res { grid-template-columns: 38px 34px 52px minmax(0, 1fr) 66px; grid-template-areas: "pos no silk horse price" "people people people people people"; }
    .entry .a-third { display: none; }
    .entry .a-jockey, .entry .a-trainer { grid-area: auto; }
    .people { grid-area: people; display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
    .person { padding: 4px 8px; border: 1px solid var(--rule-2); border-left: 1px solid var(--rule-2); border-radius: 3px; background: var(--paper); }
    .person .pl { display: block; }
    .num { font-size: 26px; } .medal { width: 48px; height: 48px; } .medal img, .medal svg { width: 40px; height: 40px; }
    .mob { display: block; font-size: 12px; color: var(--muted); }
    .det { padding: 4px 14px 14px; }
    .mast .wrap { grid-template-columns: minmax(0, 1fr); }
  }
  /* phones: the horse gets the width; the price goes down beside the jockey and the trainer */
  @media (max-width: 560px) {
    .entry { grid-template-columns: 30px 42px minmax(0, 1fr) 64px; grid-template-areas: "no silk horse horse" "people people people price"; gap: 6px 8px; padding: 10px 12px; }
    .entry.res { grid-template-columns: 30px 26px 42px minmax(0, 1fr) 64px; grid-template-areas: "pos no silk horse horse" "people people people people price"; }
    .people { grid-template-columns: 1fr 1fr; gap: 0 6px; }
    .entry .stub { min-width: 0; width: 64px; font-size: 15px; padding: 4px 4px 3px; align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
    .num { font-size: 22px; } .medal { width: 40px; height: 40px; } .medal img, .medal svg { width: 34px; height: 34px; }
    .rosette { width: 30px; height: 34px; } .a-pos .marg { font-size: 10px; }
    .hn { font-size: 16px; } .hn .mk { width: 21px; height: 21px; font-size: 13px; margin-right: 4px; }
    .figs { font-size: 12px; letter-spacing: .5px; }
    .breed { font-size: 11.5px; }
    .person .pn { font-size: 13px; }
    .dfacts { grid-template-columns: 1fr 1fr; gap: 0 12px; font-size: 12.5px; }
    /* the race record: a small block per run instead of a wide table row */
    .runsbox { max-height: 520px; }
    .runs thead { display: none; }
    .runs, .runs tbody { display: block; }
    .runs tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 8px 10px; border-bottom: 1px solid var(--rule-2); }
    .runs td { display: inline; padding: 0; border: 0; white-space: normal; min-width: 0 !important; }
    .runs .c-pos { order: 1; font-size: 16px; } .runs .c-seed { order: 2; font-size: 12px; }
    .runs .c-seed::before { content: attr(data-l) " "; font-family: var(--mono); font-size: 10px; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); font-weight: 400; }
    .runs .c-date { order: 3; color: var(--muted); font-size: 12px; margin-left: auto; } .runs .c-venue { order: 4; font-size: 12px; font-weight: 600; }
    .runs .c-race { order: 5; flex-basis: 100%; font-weight: 600; }
    .runs .c-dist, .runs .c-going, .runs .c-wt, .runs .c-odds { order: 6; font-size: 12px; color: var(--muted); }
    .runs .c-notes { order: 7; flex-basis: 100%; font-size: 11.5px; }
  }
  /* phone: last, so it wins over the rules above */
  @media (max-width: 640px) {
    .presence { display: none !important; }
    /* 3. panels as full screens, their close button always in reach */
    .pfwrap { padding: 0; align-items: stretch; background: var(--sheet); overscroll-behavior: contain; }  /* (nothing of the card behind shows through) */
    .pfbox { width: 100%; min-height: 100%; box-sizing: border-box; border: 0; border-radius: 0; box-shadow: none;
      padding: calc(16px + env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom)); }
    .pfx { position: fixed; top: calc(8px + env(safe-area-inset-top)); right: 10px; z-index: 3; width: 40px; height: 40px; border-radius: 50%;
      background: var(--sheet); border: 1px solid var(--rule); display: grid; place-items: center; box-shadow: 0 4px 12px rgba(0,0,0,.12); }
    .pfbox .phead h3 { padding: 0 46px; font-size: 27px; }  /* (room for the close button on either side) */
    /* 5. the countries as one row, scrolled sideways */
    .sec .countries { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; scrollbar-width: none; padding-bottom: 4px; }
    .sec .countries::-webkit-scrollbar { display: none; } .sec .countries > * { flex: none; white-space: nowrap; }
  }
  /* (a phone: the smallest letters a little larger — the timeline's hours, the draw under a number, the labels) */
  @media (max-width: 640px) { .tl-hl { font-size: 12px; } .num .dr { font-size: 12px; } .person .pl { font-size: 11.5px; } .page.dense.mixdraw .num .dr { font-size: 11.5px; } }
/* the footer's QR for gifts, their total, and the panel thanking the givers */
.donate .dnqr { display: block; width: 160px; height: 160px; border-radius: 10px; background: #fff; padding: 6px; margin: 4px 0 10px; }
.thankbox .dnqr { display: block; width: 160px; height: 160px; margin: 18px auto 4px; border-radius: 10px; background: #fff; padding: 6px; }
.dntotal { margin: 6px 0 10px; }
.dnthanks { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid currentColor; background: none; color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.thanks { list-style: none; margin: 12px 0 0; padding: 0; }
.thanks li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 2px; border-top: 1px solid var(--rule-2); }
.thanks .amt { font-family: var(--mono); white-space: nowrap; }
.thanks small { grid-column: 1 / -1; color: var(--muted); }
.thanks p { grid-column: 1 / -1; margin: 2px 0 0; font-style: italic; }
.dnbar { height: 12px; border-radius: 999px; background: rgb(255 255 255 / .14); overflow: hidden; margin: 4px 0 6px; max-width: 320px; }
.dnbar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #b8892c, #e8c76a); transition: width .6s cubic-bezier(.23, 1, .32, 1); }
.dnfig { margin: 0 0 10px; font-variant-numeric: tabular-nums; }
.dndone { margin: 4px 0 12px; font-weight: 600; color: #e8c76a; }
.thankbox .dndone { text-align: center; color: inherit; margin-top: 18px; }
@media (prefers-reduced-motion: reduce) { .dnbar i { transition: none; } }
.dnqr[hidden] { display: none; }   /* (the goal reached: the QR put away — its display:block would keep it) */
.dnnames { margin: 0 0 10px; font-size: 14px; line-height: 1.5; }
