/* fm4ts web sites: one stylesheet for the community and the admin site.
 *
 * The look of forzamotorsport.net in the Forza Motorsport 4 years (June 2011 - November 2013; style.css v6):
 * black page, 101 px warm-brown header with photo art, sliding-door tabs that turn red, a grey-to-black band,
 * light "paper" panels with warm brown ink, one red-orange accent in bold italic uppercase with the slanted
 * hash stripes, dotted separators, the leaderboard sheet. Joined with FM4's in-game pieces: the class plates
 * (letter panel + slanted PI panel, colours sampled from the game's CLASS_*_LG badges), the black gloss
 * selection bars with the red rim, the round red-ring icons, trophies and the BANNED / UNDER REVIEW labels.
 * Community: FM4 header art. Admin: the franchise header and the in-game dialog vignette, so the two never
 * look alike. No JavaScript needed; max-width 990 px, fluid down to 320 px.
 *
 * Values marked (sNNN) are from the archived style__v=6.css line NNN. Art: Turn 10 Studios / Microsoft,
 * private local use only (img/fmnet from the Wayback Machine, img/fm4 from the game, tools/web_assets.py).
 */

@font-face {
  font-family: 'FuturaCondensedExtraBoldIt';
  src: url(fonts/futura-condensed-extra-bold-italic-webfont.woff) format('woff');   /* served to this machine only */
  font-style: italic; font-weight: 800; font-display: swap;
}

:root {
  /* chrome (dark) */
  --fm-page: #000;            --fm-page-sub: #050304;      --fm-header: #16110d;      --fm-footer: #050503;
  --fm-nav-tab: #271e18;      --fm-nav-text: #ada8a1;      --fm-utility-text: #858375;
  --fm-title: #e3ddd5;        --fm-head-on-dark: #e5dfd7;  --fm-text-on-dark: #b8b8b8;
  --fm-muted-on-dark: #8a837b;   /* #726c65 (s1444) lifted for small text: 5.3:1 on black */
  --fm-dark-line: #39362f;    --fm-dark-edge: #423c3c;     --fm-tout-edge: #302c24;
  /* paper (light) */
  --fm-paper: #e4e3e1;        --fm-paper-2: #eae9e8;       --fm-paper-3: #fafafa;     --fm-thead: #cac7c7;
  --fm-filterlist: #e0dedd;   --fm-filterlist-edge: #a1a1a1; --fm-row-line: #b8b5b5; --fm-row-hover: #d4d2d2;
  --fm-board: #a4a19f;        --fm-faq: #e7e6e4;
  --fm-ink: #0e0b0b;          --fm-body: #413a34;          --fm-body-2: #534741;      --fm-olive: #73654e;
  --fm-meta: #6f5648;         /* #736357 / #907160 (s411/s490) darkened: 5.3:1 on paper */
  --fm-cell: #6b5c5c;         /* #756666 (s1881) */
  --fm-spec-label: #362f2d;   --fm-spec-value: #555;       --fm-spec-edge: #eee3e3;   --fm-spec-line: #e6d9cc;
  /* the red family */
  --fm-red: #ed2d00;          /* THE accent, on dark (s356) */
  --fm-red-paper: #b82300;    /* the accent for small text on paper (5.0:1 and more) */
  --fm-red-tab: #dc2900;      --fm-red-select: #eb2d00;    --fm-red-deep: #a82000;    --fm-red-signin: #d90708;
  --fm-red-divider: #e8484d;  --fm-link-brown: #723f3f;    --fm-link-brown-hover: #481b1c;
  --fm-link-copy: #8f0000;    --fm-green: #4f6c1c;
  /* FM4 in-game (sampled from the game's textures) */
  --fm4-red: #ed1c12;         --fm4-select-red: #da2200;   --fm4-ring-red: #e14f1f;
  --fm4-bar-gloss: #525252;   --fm4-bar-black: #020202;    --fm4-panel-edge: #d5d5d5; --fm4-dialog: #1b1b1b;
  /* type */
  --fm-font: Helvetica, Arial, Verdana, sans-serif;
  --fm-font-display: 'FuturaCondensedExtraBoldIt', 'Futura Condensed ExtraBold', 'Arial Narrow', 'Bahnschrift Condensed',
                     Helvetica, Arial, sans-serif;
  --fm4-font-ui: 'Swiss 721 BT', 'Swis721 Cn BT', 'Helvetica Neue Condensed', 'Arial Narrow', 'Bahnschrift Condensed',
                 Helvetica, Arial, sans-serif;     /* FM4's UI font A is Swiss 721 Bold Condensed */
  /* layout and effects */
  --fm-width: 990px;
  --fm-shadow-panel: 0 0 15px #000;   --fm-shadow-table: 0 0 5px #000;   --fm-shadow-inset: inset 0 0 20px rgba(0,0,0,.3);
  --fm-shadow-tout: 0 0 9px #000;
}

/* class plate colours: [letter panel, its highlight] from CLASS_<x>_LG.png */
.c-f  { --c: #071b53; --c-light: #153162; }   .c-e  { --c: #095695; --c-light: #1a659d; }
.c-d  { --c: #005964; --c-light: #06636b; }   .c-c  { --c: #ae8400; --c-light: #b68c07; }
.c-b  { --c: #c6620e; --c-light: #c96b1f; }   .c-a  { --c: #75161b; --c-light: #7f2b31; }
.c-s  { --c: #3e1a43; --c-light: #503454; }   .c-r3 { --c: #4c4410; --c-light: #706b50; }
.c-r2 { --c: #76600b; --c-light: #93825a; }   .c-r1 { --c: #9b6b16; --c-light: #a67a40; }
.c-x, .c-u { --c: #cc0307; --c-light: #cf0e16; }

/* ================================================================= base */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--fm-page); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-width: 320px; background: var(--fm-page); color: var(--fm-text-on-dark);
  font: 12px/1.4 var(--fm-font); }
img { max-width: 100%; height: auto; border: 0; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
summary:focus-visible { outline: 2px solid var(--fm-red); outline-offset: 2px; }
h1, h2, h3, h4 { margin: 0; }
.fm-wrap { max-width: var(--fm-width); margin: 0 auto; padding: 0 16px; position: relative; }
@media (min-width: 1022px) { .fm-wrap { padding: 0; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ================================================================= header: 101 px, art centred, logo left, tabs right */
.fm-header { background: var(--fm-header) url(img/fmnet/bg-header-fm4.jpg) top center no-repeat; min-height: 101px; }
.fm-header.franchise { background-image: url(img/fmnet/bg-header-franchise.jpg); }
.fm-header .fm-wrap { min-height: 101px; display: flex; flex-wrap: wrap; align-items: flex-end;
  justify-content: space-between; gap: 6px 16px; }
.fm-logo { display: block; flex: none; align-self: flex-start; width: 153px; height: 73px; margin: 14px 0;
  background: url(img/fmnet/logo_fm4.png) no-repeat; text-indent: -9999em; overflow: hidden; }
.franchise .fm-logo { width: 152px; height: 69px; margin-top: 16px; background-image: url(img/fmnet/logo-franchise.png); }
.fm-utility { position: absolute; top: 0; right: 16px; display: flex; margin: 0; padding: 0; list-style: none; }
@media (min-width: 1022px) { .fm-utility { right: 0; } }
.fm-utility li { line-height: 26px; padding: 0 8px 0 9px; background: url(img/fmnet/bg-utility-li.gif) right center no-repeat; }
.fm-utility li:last-child { background: none; padding-right: 0; }
.fm-utility a, .fm-utility span { color: var(--fm-utility-text); font-size: 10px; text-decoration: none; }
.fm-utility a:hover { color: #fff; text-decoration: underline; }
.fm-admin-mark { display: inline-block; padding: 0 6px; line-height: 15px; color: #fff !important; font-weight: bold;
  text-transform: uppercase; background: var(--fm-red-tab); }

/* sliding-door tabs: bg-nav-button.png row 0 rest, row -22px red (hover / current) */
.fm-nav { margin-left: auto; }
.fm-tabs { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; margin: 0 0 3px; padding: 0; list-style: none; }
.fm-tabs a { display: block; height: 22px; padding-left: 15px; color: var(--fm-nav-text); text-decoration: none;
  text-transform: uppercase; background: var(--fm-nav-tab) url(img/fmnet/bg-nav-button.png) 0 0 no-repeat; }
.fm-tabs a span { display: block; height: 22px; line-height: 22px; padding-right: 15px; font-size: 10px; font-weight: bold;
  white-space: nowrap; background: var(--fm-nav-tab) url(img/fmnet/bg-nav-button.png) 100% 0 no-repeat; }
.fm-tabs a:hover, .fm-tabs a[aria-current="page"] { color: #fff; background-position: 0 -22px; }
.fm-tabs a:hover span, .fm-tabs a[aria-current="page"] span { background-position: 100% -22px; }
.fm-tabs a.buy, .fm-tabs a.buy span { color: #dfe8c9; background-color: var(--fm-green); background-image: url(img/fmnet/bg-nav-buy.png); }
.fm-tabs a.buy:hover, .fm-tabs a.buy[aria-current="page"] { background-position: 0 -22px; color: #fff; }
.fm-tabs a.buy:hover span, .fm-tabs a.buy[aria-current="page"] span { background-position: 100% -22px; }

.fm-admin-strip { background: linear-gradient(90deg, var(--fm-red-tab), rgba(220,41,0,.55) 40%, rgba(220,41,0,0) 85%) #000;
  color: #fff; font-size: 11px; font-weight: bold; font-style: italic; text-transform: uppercase; line-height: 22px; }
.fm-hzrule { height: 1px; background: url(img/fmnet/bg-global-hzrule.png) top center no-repeat; }

/* ================================================================= band, title, messages */
.fm-band { display: block; background: var(--fm-page-sub) url(img/fmnet/bg-sub-desat.gif) 0 0 repeat-x; padding: 4px 0 48px;
  min-height: 420px; }
.fm-band.news { background-image: url(img/fmnet/bg-sub-news.jpg); }
.site-admin .fm-band { background: #050505 url(img/fm4/ui/bg_dialog.jpg) top center / 100% 720px no-repeat; }
.fm-crumbs { margin: 14px 0 -8px; color: var(--fm-muted-on-dark); font-size: 11px; text-transform: uppercase; }
.fm-crumbs a { color: var(--fm-text-on-dark); text-decoration: none; }
.fm-crumbs a:hover { color: #fff; text-decoration: underline; }
.fm-titlebar { margin: 19px 0 18px; }
.fm-titlebar h1 { color: var(--fm-title); font: italic 800 clamp(26px, 6vw, 40px)/1.05 var(--fm-font-display);
  text-transform: uppercase; letter-spacing: .01em; overflow-wrap: anywhere; }
.fm-subtitle { margin: 6px 0 0; color: var(--fm-text-on-dark); font-size: 13px; }
.fm-flash { margin: 0 0 16px; padding: 9px 12px 9px 44px; border: 1px solid var(--fm-tout-edge); color: #fff;
  font-weight: bold; background: rgba(0,0,0,.6) url(img/fmnet/a-link-hash-home.png) 4px 50% no-repeat; }
.fm-flash.ok { border-left: 4px solid #6f9a2a; }
.fm-flash.warn { border-left: 4px solid #c6a335; }
.fm-flash.error { border-left: 4px solid var(--fm-red); background-color: rgba(120,10,0,.55); }
.fm-notice { margin: 8px 0; padding: 8px 10px; border-left: 3px solid #8a837b; background: rgba(0,0,0,.35); }
.fm-paper .fm-notice { background: rgba(255,255,255,.45); color: var(--fm-body); border-left-color: var(--fm-olive); }
.fm-notice.warn { border-left-color: #c6a335; } .fm-notice.error { border-left-color: var(--fm-red); }
.fm-empty { margin: 10px 0; color: var(--fm-muted-on-dark); font-style: italic; }
.fm-paper .fm-empty, .fm-table .fm-empty { color: var(--fm-meta); }
.fm-notinstalled { padding: 8px 10px; border: 1px dashed #8a837b; color: var(--fm-muted-on-dark); }
.fm-notinstalled b { color: var(--fm-head-on-dark); text-transform: uppercase; font-size: 10px; margin-right: 6px; }
.fm-paper .fm-notinstalled { color: var(--fm-meta); border-color: #a39b94; }
.fm-paper .fm-notinstalled b { color: var(--fm-body); }

/* ================================================================= panels */
.fm-paper { margin: 0 0 20px; padding: 20px; color: var(--fm-body); box-shadow: var(--fm-shadow-panel);
  background: var(--fm-paper) url(img/fmnet/bg-article-content.jpg) 0 0 repeat-x; }
.fm-paper h2 { color: var(--fm-ink); font-size: 16px; text-transform: uppercase; }
.fm-paper h3 { color: var(--fm-body); font-size: 13px; text-transform: uppercase; margin: 14px 0 6px; }
.fm-paper p { margin: 0 0 10px; font-size: 13px; line-height: 20px; }
.fm-paper a { color: var(--fm-link-copy); }
.fm-panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px;
  margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px dotted #b0aead; }
.fm-actions { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.fm-dark { margin: 0 0 20px; padding: 12px; color: var(--fm-text-on-dark); background: rgba(0,0,0,.6);
  border: 1px solid var(--fm-tout-edge); box-shadow: var(--fm-shadow-tout); }
.fm-dark > h2 { margin: 0 0 10px; color: var(--fm-head-on-dark); font-size: 16px; text-transform: uppercase; }
.fm-dark a { color: #fff; }
.fm-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 0 20px; align-items: start; }
.fm-cols > * { min-width: 0; }
.fm-cols.wide-left { grid-template-columns: minmax(0, 2fr) minmax(min(100%, 280px), 1fr); }
@media (max-width: 760px) { .fm-cols.wide-left { grid-template-columns: minmax(0, 1fr); } }

/* ================================================================= links and buttons */
.fm-cta { display: inline-block; min-height: 17px; padding-left: 40px; line-height: 17px; color: var(--fm-red);
  font-size: 11px; font-weight: bold; font-style: italic; text-transform: uppercase; text-decoration: none;
  background: url(img/fmnet/a-link-hash-home.png) 0 0 no-repeat; }
.fm-cta:hover { text-decoration: underline; }
.fm-cta.on-paper, .fm-paper .fm-cta { padding-left: 21px; color: var(--fm-red-paper); background: url(img/fmnet/a-link-hash.png) 0 50% no-repeat; }
.fm-cta.on-paper:hover, .fm-paper .fm-cta:hover { color: #8c0701; }
.fm-more { display: inline-block; height: 22px; line-height: 20px; padding: 0 22px 0 14px; border: 1px solid #403f3f; color: #a9a9a9;
  font-size: 10px; font-weight: bold; text-transform: uppercase; text-decoration: none;
  background: #000 url(img/fmnet/spr-arrow-red.gif) calc(100% - 8px) 50% no-repeat; }
.fm-more:hover { color: #fff; }
.fm-btn { display: inline-block; height: 27px; padding: 0 14px 0 62px; border: 0; color: #fff; cursor: pointer;
  font: italic bold 11px/27px var(--fm-font); text-transform: uppercase; text-decoration: none; white-space: nowrap;
  background: var(--fm-red-signin) url(img/fmnet/prof-bg-btnsignin.gif) 0 0 no-repeat; }
.fm-btn:hover { text-decoration: underline; filter: brightness(1.08); }
.fm-btn.ghost { height: 29px; padding: 0 14px 0 44px; color: var(--fm-red-paper); border: 1px solid #999998; line-height: 27px;
  background: #e8e7e5 url(img/fmnet/comm-bg-sbuttons.gif) -6px -1px no-repeat; }
.fm-btn.danger { background-color: #8f0000; box-shadow: 0 0 0 2px #000, 0 0 0 3px var(--fm-red); }
.fm-btn[disabled] { opacity: .45; cursor: not-allowed; text-decoration: none; filter: grayscale(.6); }

/* ================================================================= leaderboard sheet (Rivals boards, every big list) */
.fm-board { margin: 0 0 20px; padding: 20px; background: var(--fm-board) url(img/fmnet/bg-leaderboardbot-tile.png) center top repeat-y;
  box-shadow: var(--fm-shadow-panel); color: var(--fm-body); }
.fm-board-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; margin: -4px 0 14px; }
.fm-board-head h2 { color: #1d1815; font-size: 18px; text-transform: uppercase; text-shadow: 0 1px 0 rgba(255,255,255,.35); }
.fm-board .fm-cta { color: #8f0000; padding-left: 21px; background: url(img/fmnet/a-link-hash.png) 0 50% no-repeat; }
.fm-filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 14px;
  margin: 0 0 14px; padding: 14px; background: var(--fm-paper-2); }
.fm-filterlist { border: 1px solid var(--fm-filterlist-edge); background: var(--fm-filterlist); box-shadow: inset 0 0 0 1px #fff; }
.fm-filterlist > strong { display: block; height: 36px; line-height: 36px; padding: 0 10px; color: #000; font-size: 12px;
  background: var(--fm-thead) url(img/fmnet/bg-leaderboard-thead.png) 0 0 repeat-x; border-bottom: 1px solid #fff; }
.fm-filterlist ul { list-style: none; margin: 0; padding: 0; max-height: 144px; overflow: auto; position: relative; }
.fm-filterlist a { display: block; line-height: 22px; padding: 0 10px; margin-bottom: 1px; color: #423c3c; text-decoration: none; }
.fm-filterlist a:hover, .fm-filterlist a[aria-current="true"] { background: var(--fm-row-hover); color: #000; }
.fm-filterlist a[aria-current="true"] { font-weight: bold; }
.fm-results { padding: 14px; background: rgba(0,0,0,.15); box-shadow: var(--fm-shadow-inset); }
.fm-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 10px; }
.fm-table { width: 100%; border-collapse: collapse; border: 1px solid #fff; box-shadow: var(--fm-shadow-table);
  background: var(--fm-paper-3) url(img/fmnet/bg-leaderboard-resultstable.png) 0 0 / 100% auto repeat-y; color: var(--fm-cell); }
.fm-table caption { padding: 0 0 6px; text-align: left; color: var(--fm-body); font-weight: bold; text-transform: uppercase; }
.fm-table thead tr { background: var(--fm-thead) url(img/fmnet/bg-leaderboard-thead.png) 0 0 / auto 100% repeat-x; }
.fm-table th { height: 34px; padding: 0 10px; text-align: left; color: #000; font-size: 12px; font-weight: bold;
  text-transform: uppercase; white-space: nowrap; border-right: 1px solid #fff; }
.fm-table th:last-child { border-right: 0; }
.fm-table td { padding: 7px 10px; border-bottom: 1px solid var(--fm-row-line); vertical-align: middle; }
.fm-table tbody tr:last-child td { border-bottom-color: #fff; }
.fm-table tbody tr:hover td { background: rgba(212,210,210,.45); }
.fm-table td a { color: var(--fm-link-brown); font-weight: bold; text-decoration: none; }
.fm-table td a:hover { color: var(--fm-link-brown-hover); text-decoration: underline; }
.fm-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fm-table .score { color: #000; font-weight: bold; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fm-table .pic { width: 1%; white-space: nowrap; }
.fm-table .pic img { display: block; max-height: 40px; width: auto; }
.fm-table tr.me td { color: #fff; background: #1f1d1c url(img/fmnet/bg-leaderboard-tdcurrentuser.png) 0 0 / auto 100% repeat-x; }
.fm-table tr.me td a, .fm-table tr.me .score { color: #fff; }
.fm-table tr.me .fm-clubtag { color: #c9bfb5; }
.fm-table td img { vertical-align: middle; }
.fm-table tr.flagged td:first-child, .fm-flag { padding-left: 30px; background-image: url(img/fmnet/ico-dirty.png);
  background-repeat: no-repeat; background-position: 9px 50%; }
.fm-table tr.hidden-row td { opacity: .55; font-style: italic; }
.fm-pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; color: #423c3c; font-size: 12px; }
.fm-pager a { color: var(--fm-link-brown); font-size: 11px; font-weight: bold; text-decoration: none; }
.fm-pager a:hover { color: var(--fm-link-brown-hover); text-decoration: underline; }
.fm-pager .off { color: #8d8686; font-size: 11px; font-weight: bold; }
.fm-pager b { color: #000; font-size: 11px; }
.fm-dark .fm-pager, .fm-band > .fm-wrap > .fm-pager { color: var(--fm-text-on-dark); }
.fm-dark .fm-pager a { color: #fff; }

/* ================================================================= dark list (events, rosters, records on the band) */
.fm-listbox { margin: 0 0 20px; background: rgba(0,0,0,.6); border: 1px solid var(--fm-tout-edge); padding: 0 10px 6px; }
.fm-list-head { display: flex; justify-content: space-between; height: 36px; line-height: 36px; margin: 0 -10px 4px; padding: 0 10px;
  color: var(--fm-head-on-dark); font-size: 12px; font-weight: bold; text-transform: uppercase;
  background: url(img/fmnet/comm-bg-eventslist-hd.gif) 0 0 repeat-x; }
.fm-list { list-style: none; margin: 0; padding: 0; }
.fm-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 29px; padding: 4px 10px;
  border-bottom: 1px solid var(--fm-dark-line); color: #fff; font-size: 12px; }
.fm-list li:last-child { border-bottom: 0; }
.fm-list li a { color: #fff; text-decoration: none; font-weight: bold; }
.fm-list li a:hover { text-decoration: underline; }
.fm-list li .val { color: var(--fm-muted-on-dark); white-space: nowrap; text-align: right; }
.fm-list li[aria-current="true"] { background: linear-gradient(90deg, var(--fm-red-select), var(--fm-red-deep) 45%, rgba(168,32,0,0) 80%); }
.fm-list li[aria-current="true"] .val { color: #ddd; }

/* ================================================================= sub tabs (message centre) */
.fm-subtabs { display: flex; flex-wrap: wrap; margin: 0 0 16px; padding: 0; list-style: none; background: #000 url(img/fmnet/bg-msg-nav.png) 0 0 repeat-x; }
.fm-subtabs a { display: block; height: 29px; line-height: 29px; padding: 0 14px; border-right: 1px solid var(--fm-dark-edge);
  color: var(--fm-head-on-dark); font-size: 12px; font-weight: bold; text-transform: uppercase; text-decoration: none;
  background: url(img/fmnet/bg-msg-nav-li.png) 0 0 repeat-x; }
.fm-subtabs a[aria-current="page"] { color: #fff; background-position: 0 -29px; }
.fm-subtabs a:hover { text-decoration: underline; }

/* ================================================================= spec box and facts */
.fm-spec { margin: 0 0 20px; background: #fff; border: 3px solid var(--fm-spec-edge); border-radius: 4px; box-shadow: var(--fm-shadow-panel); color: var(--fm-spec-value); }
.fm-spec h3 { margin: 8px 10px; color: #8a6a63; font-size: 12px; line-height: 19px; text-transform: uppercase; }
.fm-spec dl { margin: 0; }
.fm-spec .row { display: grid; grid-template-columns: minmax(90px, 130px) 1fr; gap: 0 10px; padding: 2px 10px; line-height: 19px;
  font-size: 11px; border-top: 1px dotted var(--fm-spec-line); background: #fafafa; }
.fm-spec .row:nth-child(even) { background: #fff; }
.fm-spec dt { font-weight: bold; color: var(--fm-spec-label); }
.fm-spec dd { margin: 0; overflow-wrap: anywhere; }
.fm-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px 16px; margin: 0 0 14px; }
.fm-facts dt { color: var(--fm-muted-on-dark); font-size: 10px; font-weight: bold; text-transform: uppercase; }
.fm-facts dd { margin: 2px 0 0; color: #fff; font: italic 800 20px/1.1 var(--fm-font-display); overflow-wrap: anywhere; }
.fm-paper .fm-facts dt { color: var(--fm-meta); }
.fm-paper .fm-facts dd { color: var(--fm-ink); }

/* ================================================================= picture grid (cars, tracks, makes, packs) */
.fm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); margin: 0 0 20px; background: #000;
  border: 1px solid #97908a; box-shadow: var(--fm-shadow-panel); }
.fm-grid a { position: relative; display: block; height: 124px; border-top: 1px dotted #5b5959; border-left: 1px dotted #5b5959; overflow: hidden; }
.fm-grid img { display: block; width: 100%; height: 100%; object-fit: contain; opacity: .6; transition: opacity .15s; }
.fm-grid a:hover img, .fm-grid a:focus-visible img, .fm-grid a[aria-current="true"] img { opacity: 1; }
.fm-grid a[aria-current="true"] { box-shadow: inset 0 0 15px #adadad; }
.fm-grid a span { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 4px; text-align: center; color: #fff; font-size: 9px;
  font-weight: bold; text-transform: uppercase; background: linear-gradient(rgba(178,20,0,.85), rgba(110,10,0,.9)); }
.noimg { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, #1b1b1b, #050505); }

/* ================================================================= gallery cards (storefront, Big Shots, auctions) */
.fm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 18px; margin: 0 0 20px; }
.fm-card { display: flex; flex-direction: column; color: var(--fm-body); text-decoration: none; background: #fff;
  border: 2px solid #fff; outline: 1px solid #818181; box-shadow: var(--fm-shadow-tout); }
.fm-card .pic { position: relative; aspect-ratio: 176 / 102; background: #111; overflow: hidden; }
.fm-card .pic img:not(.fm-stamp) { display: block; width: 100%; height: 100%; object-fit: cover; }
.fm-card .pic .fm-stamp { position: absolute; right: 4px; bottom: 4px; width: 96px; }
.fm-card .txt { padding: 6px 8px 8px; }
.fm-card h3 { margin: 0 0 2px; color: #4a3f3f; font-size: 12px; text-transform: uppercase; overflow-wrap: anywhere; }
.fm-card p { margin: 0; color: #5a5050; font-size: 11px; }
a.fm-card:hover { outline-color: var(--fm-red); }
a.fm-card:hover h3 { color: var(--fm-red-paper); }

/* ================================================================= FM4 in-game pieces */
/* black gloss bars, red rim when selected (BADGE_BKGRND / _ROLL) */
.fm4-bars { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 8px; }
.fm4-bar { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 14px; color: #fff; text-decoration: none;
  border: 2px solid var(--fm4-panel-edge); border-radius: 3px;
  background: linear-gradient(var(--fm4-bar-gloss), #1c1c1c 46%, var(--fm4-bar-black) 54%, #000); }
.fm4-bar b { display: block; font: italic bold 15px/1.15 var(--fm4-font-ui); font-stretch: condensed; text-transform: uppercase; }
.fm4-bar small { display: block; color: #bdbdbd; font-size: 11px; }
.fm4-bar img { flex: none; }
.fm4-bar:hover, .fm4-bar[aria-current="true"], .fm4-bar:focus-visible { border-color: var(--fm4-select-red);
  box-shadow: 0 0 0 1px #000, 0 0 10px rgba(218,34,0,.55); outline: none; }

/* class plate: coloured letter panel + slanted white PI panel */
.fm4-pi { display: inline-flex; align-items: stretch; height: 20px; vertical-align: middle; border-radius: 2px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0,0,0,.45); font: italic bold 13px/20px var(--fm4-font-ui); font-stretch: condensed; white-space: nowrap; }
.fm4-pi b { position: relative; z-index: 1; min-width: 22px; padding: 0 8px 0 5px; margin-right: -6px; text-align: center; color: #fff;
  background: linear-gradient(var(--c-light, #555) 0, var(--c, #333) 55%); clip-path: polygon(0 0, 100% 0, calc(100% - 6px) 100%, 0 100%); }
.fm4-pi i { padding: 0 6px 0 10px; color: #111; font-style: italic; background: linear-gradient(#fff, #d5d5d5); }
.fm4-pi b:only-child { margin-right: 0; padding-right: 5px; clip-path: none; }
.fm4-class { vertical-align: middle; }

.fm-gt { white-space: nowrap; }
.fm-gt a { font-weight: bold; }
.fm-gt.flagged { padding-left: 20px; background: url(img/fmnet/ico-dirty.png) 0 50% no-repeat; }
.fm-clubtag { color: var(--fm-muted-on-dark); font-weight: bold; }
.fm-paper .fm-clubtag, .fm-table .fm-clubtag { color: var(--fm-meta); }
.fm-icon { vertical-align: middle; }
/* a Turn 10 staff player's mark (base.staff_mark), next to the name like the VIP crown: the red of the site's ribbon */
.fm-t10 { display: inline-block; vertical-align: middle; height: 15px; padding: 0 4px; font: bold 10px/15px var(--fm-font);
  letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; color: #fff; background: var(--fm-red-deep);
  border-radius: 2px; }
.fm-medal { vertical-align: middle; }
.fm-pos { display: inline-block; min-width: 21px; text-align: center; font-weight: bold; }
.fm-stamp { display: inline-block; vertical-align: middle; }
.fm-stamp-big { float: right; width: 180px; margin: 0 0 10px 16px; }

/* event header: poster with the red ribbon */
.fm-hero { position: relative; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px;
  min-height: 90px; margin: 0 0 20px; background: #000; box-shadow: var(--fm-shadow-panel); overflow: hidden; }
.fm-hero.has-pic { min-height: 180px; }
.fm-hero .hero-pic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.fm-ribbon { position: relative; max-width: 645px; padding: 12px 60px 12px 16px; margin: 0 0 14px;
  background: linear-gradient(90deg, #c51d00, rgba(197,29,0,.85) 55%, rgba(197,29,0,0)); }
.fm-ribbon h2 { color: #fff; font: italic 800 clamp(18px, 4vw, 26px)/1.1 var(--fm-font-display); text-transform: uppercase; }
.fm-ribbon p { margin: 4px 0 0; color: #000; font-size: 12px; font-weight: bold; }
.fm-hero .hero-side { position: relative; padding: 10px 14px; }

/* ================================================================= forms */
.fm-form { margin: 0; }
.fm-field { margin: 0 0 12px; }
.fm-field > label { display: block; margin: 0 0 4px; color: var(--fm-spec-label); font-size: 11px; font-weight: bold; text-transform: uppercase; }
.fm-dark .fm-field > label { color: var(--fm-head-on-dark); }
.fm-field .help { margin: 4px 0 0; color: var(--fm-meta); font-size: 11px; line-height: 15px; }
.fm-dark .fm-field .help { color: var(--fm-muted-on-dark); }
.fm-field .error { margin: 4px 0 0; color: var(--fm-red-paper); font-size: 11px; font-weight: bold; }
.fm-field.has-error .fm-input, .fm-field.has-error .fm-select { border-color: var(--fm-red-paper); box-shadow: 0 0 0 1px var(--fm-red-paper); }
.fm-input, .fm-select { max-width: 100%; min-height: 26px; padding: 3px 8px; border: 1px solid var(--fm-body-2); border-radius: 0;
  color: #2b2420; background: #fff; font: 12px var(--fm-font); }
input.fm-input:not([size]) { width: min(100%, 360px); }
textarea.fm-input { width: 100%; min-height: 80px; line-height: 1.4; }
.fm-select { padding-right: 24px; }
.fm-check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.fm-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 14px; }
.fm-inline { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; }
.fm-confirm-msg { font-size: 14px !important; font-weight: bold; color: var(--fm-ink); }
.fm-confirm .fm-spec { box-shadow: none; }

/* admin settings: FAQ accordion look (faq.css) */
.fm-acc { margin: 0 0 6px; background: var(--fm-paper); color: var(--fm-body); box-shadow: 0 0 8px #000; }
.fm-acc > summary { list-style: none; cursor: pointer; padding: 10px 14px 10px 26px; color: #5d412f; font-size: 13px; font-weight: bold;
  text-transform: uppercase; background: url(img/fmnet/faq-arrow.png) 12px 50% no-repeat; }
.fm-acc > summary::-webkit-details-marker { display: none; }
.fm-acc[open] > summary { background: #fff url(img/fmnet/faq-arrow-on.png) 10px 50% no-repeat; border-bottom: 1px dotted #b0aead; }
.fm-acc > summary .count { float: right; color: var(--fm-meta); font-weight: normal; text-transform: none; }
.fm-acc > .acc-body { padding: 4px 14px 12px; background: var(--fm-faq); }
.fm-setting { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr); gap: 6px 18px; padding: 10px 0;
  border-bottom: 1px dotted #b0aead; }
.fm-setting:last-child { border-bottom: 0; }
.fm-setting .name { color: var(--fm-ink); font-weight: bold; font-size: 12px; }
.fm-setting .flag { color: var(--fm-meta); font-family: Consolas, 'Courier New', monospace; font-size: 11px; }
.fm-setting .help { margin: 3px 0 0; color: var(--fm-body-2); font-size: 11px; line-height: 15px; }
.fm-setting .now { margin: 4px 0 0; color: var(--fm-meta); font-size: 11px; }
.fm-setting .now code { color: var(--fm-ink); }
.fm-setting .danger { margin: 4px 0 0; padding-left: 21px; color: #8f0000; font-size: 11px; font-weight: bold;
  background: url(img/fmnet/ico-dirty.png) 0 1px no-repeat; }
@media (max-width: 640px) { .fm-setting { grid-template-columns: 1fr; } }
.fm-tag { display: inline-block; margin: 0 4px 0 0; padding: 0 5px; line-height: 15px; border-radius: 2px; color: #fff; font-size: 9px;
  font-weight: bold; text-transform: uppercase; vertical-align: 1px; background: #6b6460; }
.fm-tag.live { background: #4f6c1c; }  .fm-tag.reload { background: #2f6a7a; }  .fm-tag.restart { background: #b26a00; }
.fm-tag.fixed { background: #555; }    .fm-tag.danger { background: #8f0000; } .fm-tag.pending { background: var(--fm-red-tab); }
.fm-tag.off { background: transparent; color: #8a837b; border: 1px solid #8a837b; }
code, .mono { font-family: Consolas, 'Courier New', monospace; font-size: 11px; overflow-wrap: anywhere; }

/* ================================================================= news, article, profile */
.fm-news { margin: 0 0 20px; padding: 0 0 6px; background: #fff url(img/fmnet/bg-news-tiles.jpg) 0 0 repeat-y; box-shadow: var(--fm-shadow-panel); }
.fm-news article { display: flex; gap: 12px; padding: 10px; border-bottom: 1px dotted #b0aead; }
.fm-news article img { flex: none; width: 300px; max-width: 38%; height: auto; align-self: flex-start; }
.fm-news h2 { margin: 2px 0 8px; font-size: 13px; color: var(--fm-body); }
.fm-news h2 a { color: var(--fm-body); text-decoration: none; }
.fm-news h2 a:hover { color: var(--fm-red-paper); }
.fm-news p { margin: 0; font-size: 13px; line-height: 18px; color: var(--fm-body-2); }
.fm-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; margin: 10px 0 0; padding: 0; list-style: none; color: var(--fm-meta); font-size: 11px; }
.fm-meta .author { font-weight: bold; text-transform: uppercase; }
.fm-article { font-size: 13px; line-height: 20px; color: var(--fm-body); }
.fm-article h1 { margin: 0 0 6px; font-size: 24px; line-height: 1.2; color: var(--fm-body); }
.fm-article .byline { margin: 0 0 14px; font-size: 11px; color: #4a443e; }
.fm-article .byline .author { font-weight: bold; text-transform: uppercase; }
.fm-article img { display: block; margin: 10px 0; }
.fm-article a { color: var(--fm-link-copy); }
.fm-article .end { margin-top: 16px; border-bottom: 1px dotted var(--fm-red-divider); }
.fm-profile { display: grid; grid-template-columns: minmax(0, 305px) minmax(0, 1fr); gap: 20px; }
@media (max-width: 760px) { .fm-profile { grid-template-columns: 1fr; } }
.fm-profile-card { padding: 16px; color: var(--fm-text-on-dark); background: #1a1715 url(img/fmnet/prof-bg-user.png) 0 0 no-repeat;
  border: 1px solid var(--fm-tout-edge); box-shadow: var(--fm-shadow-panel); }
.fm-profile-card h2 { color: var(--fm-head-on-dark); font-size: 16px; text-transform: uppercase; overflow-wrap: anywhere; }
.fm-profile-card .title { margin: 2px 0 10px; color: var(--fm-red); font-weight: bold; font-style: italic; text-transform: uppercase; font-size: 11px; }
.fm-avatar { float: right; width: 64px; height: 64px; margin: 0 0 8px 10px; background: #000 url(img/fmnet/gc_helmet.gif) center / 48px no-repeat;
  border: 1px solid #5a5650; }
.fm-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.fm-badges li { text-align: center; font-size: 10px; color: var(--fm-muted-on-dark); }
.fm-badges img { display: block; width: 66px; height: 40px; margin: 0 auto 2px; object-fit: contain; }
.fm-badges li.locked img { opacity: .2; }
.fm-badges li.current { color: #fff; font-weight: bold; }

/* ================================================================= footer */
.fm-footer { padding: 26px 0 40px; border-top: 1px solid #000; color: #796b63; font-size: 10px;
  background: var(--fm-footer) url(img/fmnet/bg-footer-top_new.gif) 0 0 repeat-x; }
.fm-footer .logos { display: flex; justify-content: flex-end; align-items: center; gap: 36px; min-height: 70px; }
.fm-footer small { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; margin-top: 24px; font-size: 10px; }
.fm-footer a { color: #8d7865; text-decoration: none; }
.fm-footer a:hover { text-decoration: underline; }

/* ================================================================= error page */
.fm-error { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.fm-error img { flex: none; }
.fm-error h2 { margin: 0 0 8px; }

/* ================================================================= utilities */
.right { text-align: right; } .nowrap { white-space: nowrap; } .muted { color: var(--fm-muted-on-dark); }
.fm-paper .muted, .fm-table .muted { color: var(--fm-meta); }
.red { color: var(--fm-red); } .fm-paper .red, .fm-table .red { color: var(--fm-red-paper); }
.mt0 { margin-top: 0 !important; } .mb0 { margin-bottom: 0 !important; }

/* ================================================================= phone width */
@media (max-width: 760px) {
  .fm-header .fm-wrap { padding-top: 22px; }
  .fm-utility { left: 16px; right: auto; }
  .fm-logo { margin: 4px 0 6px; width: 120px; height: 58px; background-size: contain; }
  .franchise .fm-logo { width: 120px; height: 55px; margin-top: 4px; }
  .fm-nav { width: 100%; margin: 0; }
  .fm-tabs { justify-content: flex-start; gap: 4px; }
  .fm-tabs a { padding-left: 9px; } .fm-tabs a span { padding-right: 9px; }
  .fm-paper, .fm-board { padding: 14px; }
  .fm-results { padding: 8px; }
  .fm-filters { padding: 10px; gap: 10px; }
  .fm-news article { flex-direction: column; }
  .fm-news article img { max-width: 100%; width: 100%; }
  .fm-ribbon { padding-right: 24px; }
  .fm-btn { padding-left: 52px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ================================================================= admin additions (fm4ts/web/admin*.py) */
.fm-pre { max-height: 420px; margin: 6px 0; padding: 8px 10px; overflow: auto; white-space: pre-wrap; word-break: break-word;
  color: #2b2420; background: #fff; border: 1px solid var(--fm-row-line); font: 11px/1.45 Consolas, 'Courier New', monospace; }
.fm-actions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px 18px; }
.fm-actions-grid > * { min-width: 0; padding: 10px 12px; background: var(--fm-paper-3); border: 1px dotted #b0aead; }
.fm-actions-grid h3 { margin: 0 0 8px; }
.fm-table .fm-inline { flex-wrap: nowrap; }
.fm-table .fm-btn { white-space: nowrap; }

/* ================================================================= community additions (fm4ts/web/community.py) */
/* a page whose header is a hero (with an sr-only h1), not a title bar */
.fm-crumbs + :not(.fm-titlebar), .fm-crumbs + .sr-only + * { margin-top: 24px; }
.fm-news article > .noimg { flex: none; width: 160px; max-width: 30%; height: 90px; background: transparent; }
.fm-news .fm-meta { align-items: center; }
.fm-profile-card .club { margin: 0 0 12px; font-weight: bold; }
.fm-profile-card .club a { color: #fff; text-decoration: none; }
.fm-profile-card .club a:hover { text-decoration: underline; }
.fm-profile-card .note { margin: 0 0 10px; color: var(--fm-muted-on-dark); font-size: 11px; font-style: italic; }
.fm-table .car img { margin-right: 6px; }
.fm-grid.channels a { height: 110px; }
.fm-grid.channels img { object-fit: contain; padding: 6px 6px 22px; }
@media (max-width: 760px) { .fm-news article > .noimg { display: none; } }
/* review: columns marked 'opt' (assists, clean, date, ghost on a leaderboard) fold away on a phone */
@media (max-width: 640px) { .fm-table th.opt, .fm-table td.opt { display: none; } }
/* My Forza (fm4ts/web/myforza_pages.py, static/myforza.js): the classic-YouTube wall - white cards on the dark
   band, thumbnail with the duration badge, title, description, uploader, views, age, stars - the 640 px player
   with the overview filmstrip and 320 px of related videos, the rating form. Existing tokens only: links in
   the site's link brown, one accent (red on dark, paper red on white), big numbers in the display face. */
.mf-toolbar { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0 16px; }
.mf-toolbar .fm-subtabs { margin-bottom: 12px; }
.mf-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 0 0 12px; }
.mf-sort { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; color: var(--fm-muted-on-dark);
  font-size: 11px; font-weight: bold; text-transform: uppercase; }
.mf-sort a { display: inline-block; padding: 4px 0; color: var(--fm-text-on-dark); text-decoration: none; }
.mf-sort a:hover { color: #fff; text-decoration: underline; }
.mf-sort a[aria-current="true"] { color: #fff; box-shadow: inset 0 -2px 0 var(--fm-red); }
.mf-search input.fm-input { width: 220px; }
.mf-wallbox > h2 { overflow-wrap: anywhere; }
.mf-channel { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: -4px 0 12px; font-size: 13px; }
.mf-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 18px 16px;
  margin: 0 0 14px; }
.mf-wall.mf-row { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.mf-card { display: flex; flex-direction: column; min-width: 0; color: var(--fm-body); background: #fff;
  border: 2px solid #fff; outline: 1px solid #818181; box-shadow: var(--fm-shadow-tout); }
.mf-card:hover, .mf-card:focus-within { outline-color: var(--fm-red); }
.mf-thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #111; }
.mf-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mf-thumb img.mf-contain { object-fit: contain; padding: 4px; background: radial-gradient(#3b3836, #0b0b0b 75%); }
.mf-thumb .noimg { position: absolute; inset: 0; }
.mf-badge { position: absolute; right: 4px; bottom: 4px; z-index: 3; padding: 0 4px; border-radius: 2px; color: #fff;
  background: rgba(0,0,0,.8); font: bold 11px/16px var(--fm-font); text-transform: uppercase; letter-spacing: .02em;
  font-variant-numeric: tabular-nums; }
.mf-chip { position: absolute; left: 4px; top: 4px; z-index: 3; padding: 0 5px; color: #fff; background: var(--fm-red-tab);
  font: italic bold 10px/16px var(--fm-font); text-transform: uppercase; }
.mf-scrub, .mf-pv { position: absolute; inset: 0; width: 100%; height: 100%; }
.mf-pv { z-index: 1; object-fit: cover; background: #000; }
.mf-scrub { z-index: 2; background-color: #000; background-repeat: no-repeat; }
.mf-scrubbar { position: absolute; left: 0; bottom: 0; z-index: 3; width: 0; height: 3px; background: var(--fm-red); }
.mf-txt { min-width: 0; padding: 7px 8px 9px; }
.mf-title { margin: 0 0 3px; font-size: 13px; line-height: 16px; }
.mf-title a, .mf-desc, .mf-rel h3 a { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden; overflow-wrap: anywhere; }
.mf-title a { color: var(--fm-link-brown); text-decoration: none; }
.mf-title a:hover { color: var(--fm-red-paper); text-decoration: underline; }
.mf-desc { margin: 0 0 4px; color: var(--fm-body-2); font-size: 11px; line-height: 14px; }
.mf-by, .mf-stats { margin: 0; color: var(--fm-meta); font-size: 11px; line-height: 15px; overflow-wrap: anywhere; }
.mf-by a { color: var(--fm-link-brown); font-weight: bold; text-decoration: none; }
.mf-by a:hover { color: var(--fm-link-brown-hover); text-decoration: underline; }
/* stars: a grey row and an accent row clipped to the average (r0..r10 = half steps); drawn by CSS, no inline style */
.mf-stars { margin: 3px 0 0; color: var(--fm-meta); font-size: 11px; line-height: 15px; white-space: nowrap; }
.mf-stars.none { font-style: italic; }
.mf-bar { position: relative; display: inline-block; vertical-align: -1px; font-size: 13px; line-height: 1; }
.mf-bar::before { content: '\2605\2605\2605\2605\2605'; color: #c9c4c0; }
.mf-bar::after { content: '\2605\2605\2605\2605\2605'; position: absolute; left: 0; top: 0; width: 0; overflow: hidden;
  white-space: nowrap; color: var(--fm-red-paper); }
.mf-stars.r1 .mf-bar::after { width: 10%; }  .mf-stars.r2 .mf-bar::after { width: 20%; }
.mf-stars.r3 .mf-bar::after { width: 30%; }  .mf-stars.r4 .mf-bar::after { width: 40%; }
.mf-stars.r5 .mf-bar::after { width: 50%; }  .mf-stars.r6 .mf-bar::after { width: 60%; }
.mf-stars.r7 .mf-bar::after { width: 70%; }  .mf-stars.r8 .mf-bar::after { width: 80%; }
.mf-stars.r9 .mf-bar::after { width: 90%; }  .mf-stars.r10 .mf-bar::after { width: 100%; }
.mf-side .mf-bar::before { color: #5d5650; }
.mf-side .mf-bar::after { color: var(--fm-red); }

/* the watch page: 640 px player + 30 px + 320 px related = the site's 990 px column */
.mf-watch { display: grid; grid-template-columns: minmax(0, 640px) minmax(0, 320px); gap: 0 30px; align-items: start; }
.mf-main { min-width: 0; }
.mf-player { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000;
  border: 1px solid var(--fm-tout-edge); box-shadow: var(--fm-shadow-panel); }
.mf-player video, .mf-player img { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.mf-player > a { display: block; width: 100%; height: 100%; }
.mf-player.mf-wait img { opacity: .5; object-fit: cover; }
.mf-player.mf-wait img.mf-contain { object-fit: contain; padding: 6% 10% 18%; }
.mf-msg { position: absolute; left: 12px; right: 12px; bottom: 12px; margin: 0; padding: 8px 10px; color: #fff;
  background: rgba(0,0,0,.78); border-left: 3px solid var(--fm-red); font-size: 12px; font-weight: bold; }
.mf-novideo { margin: 0; padding: 12px; color: #fff; }
/* the overview filmstrip: frames cut from one storyboard picture by classes (CSP: no style="") */
.mf-strip { margin: 0 0 14px; overflow-x: auto; background: #000; border: 1px solid var(--fm-tout-edge); border-top: 0;
  -webkit-overflow-scrolling: touch; }
.mf-strip ol { display: flex; width: max-content; margin: 0; padding: 0; list-style: none; }
.mf-strip a { position: relative; display: block; width: 64px; color: #fff; text-decoration: none; }
.mf-strip a::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.7); pointer-events: none; }
.mf-strip a:hover::after, .mf-strip a:focus-visible::after { box-shadow: inset 0 0 0 2px var(--fm-red); }
.mf-strip a:focus-visible { outline-offset: -2px; }
.mf-cell { position: relative; display: block; width: 64px; height: 36px; overflow: hidden; }
.mf-cell img { position: absolute; left: 0; top: 0; max-width: none; opacity: .75; transition: opacity .15s; }
.mf-strip a:hover img, .mf-strip a:focus-visible img { opacity: 1; }
.mf-time { position: absolute; right: 2px; bottom: 1px; z-index: 1; font-size: 9px; font-weight: bold; line-height: 11px;
  text-shadow: 0 0 2px #000, 0 0 2px #000; font-variant-numeric: tabular-nums; }
.mf-cx1 { left: -64px; }  .mf-cx2 { left: -128px; } .mf-cx3 { left: -192px; } .mf-cx4 { left: -256px; }
.mf-cx5 { left: -320px; } .mf-cx6 { left: -384px; } .mf-cx7 { left: -448px; } .mf-cx8 { left: -512px; }
.mf-cx9 { left: -576px; }
.mf-cy1 { top: -36px; }   .mf-cy2 { top: -72px; }   .mf-cy3 { top: -108px; }  .mf-cy4 { top: -144px; }
.mf-cy5 { top: -180px; }  .mf-cy6 { top: -216px; }  .mf-cy7 { top: -252px; }  .mf-cy8 { top: -288px; }
.mf-cy9 { top: -324px; }
/* under the player: uploader, the big view count, rating, downloads */
.mf-info { margin: 0 0 20px; padding: 12px 14px; background: rgba(0,0,0,.6); border: 1px solid var(--fm-tout-edge);
  box-shadow: var(--fm-shadow-tout); }
.mf-player + .mf-info { margin-top: 14px; }
.mf-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 6px 16px;
  padding: 0 0 10px; border-bottom: 1px dotted #5b5959; }
.mf-uploader { margin: 0; color: var(--fm-text-on-dark); font-size: 13px; overflow-wrap: anywhere; }
.mf-uploader .fm-gt { white-space: normal; }
.mf-uploader .fm-gt a { color: #fff; text-decoration: none; }
.mf-uploader .fm-gt a:hover { text-decoration: underline; }
.mf-date { color: var(--fm-muted-on-dark); white-space: nowrap; }
.mf-viewcount { margin: 0 0 0 auto; color: var(--fm-muted-on-dark); font-size: 11px; font-weight: bold;
  text-transform: uppercase; white-space: nowrap; }
.mf-viewcount b { margin-right: 3px; color: #fff; font: italic 800 30px/1 var(--fm-font-display); letter-spacing: .01em;
  font-variant-numeric: tabular-nums; }
.mf-viewcount.none { font-style: italic; text-transform: none; font-weight: normal; }
.mf-rate { padding: 10px 0; border-bottom: 1px dotted #5b5959; }
.mf-rateform { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0; }
.mf-rate-label, .mf-dl h2 { color: var(--fm-head-on-dark); font-size: 11px; font-weight: bold; text-transform: uppercase; }
.mf-btns { display: inline-flex; align-items: center; gap: 8px; }
.mf-starbtns { display: inline-flex; }
.mf-rateform button { cursor: pointer; font-family: var(--fm-font); }
.mf-rateform[aria-busy="true"] button { cursor: progress; }
.mf-star { min-width: 30px; height: 32px; padding: 0 2px; border: 0; background: none; color: #5d5650;
  font-size: 26px; line-height: 32px; }
.mf-star.on { color: var(--fm-red); }
.mf-starbtns:hover .mf-star { color: #5d5650; }
.mf-starbtns .mf-star:hover, .mf-starbtns .mf-star:has(~ .mf-star:hover) { color: var(--fm-red); }
.mf-star:focus-visible { outline-offset: -2px; }
.mf-zero { min-width: 28px; height: 26px; padding: 0 6px; border: 1px solid #5d5650; border-radius: 2px; color: var(--fm-text-on-dark);
  background: transparent; font-size: 12px; font-weight: bold; }
.mf-zero:hover { border-color: var(--fm-red); color: #fff; }
.mf-zero[aria-pressed="true"] { border-color: var(--fm-red); color: #fff; background: var(--fm-red-deep); }
.mf-avg { color: var(--fm-text-on-dark); font-size: 12px; }
.mf-avg b { color: #fff; font-size: 14px; }
.mf-mine { flex-basis: 100%; margin: 0; color: var(--fm-muted-on-dark); font-size: 11px; }
.mf-mine b { color: #fff; }
.mf-clear { margin-left: 8px; padding: 0; border: 0; color: var(--fm-text-on-dark); background: none; font-size: 11px;
  text-decoration: underline; }
.mf-clear:hover { color: #fff; }
.mf-rate-msg { flex-basis: 100%; margin: 0; color: #f2b8a8; font-size: 11px; }
.mf-rate-msg:empty { display: none; }
.mf-dl { padding: 10px 0 0; }
.mf-dl h2 { margin: 0 0 6px; }
.mf-dl ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.mf-dl li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.mf-dlsize { color: var(--fm-muted-on-dark); font-size: 11px; }
.mf-dlnote { margin: 8px 0 0; color: var(--fm-muted-on-dark); font-size: 11px; font-style: italic; }
.mf-about .fm-spec { margin: 12px 0 0; box-shadow: none; }
.mf-about .mf-subtitle { color: var(--fm-meta); font-style: italic; }
.mf-spec img { vertical-align: middle; margin: 0 6px 0 0; }
.mf-spec img.mf-logo { max-height: 22px; width: auto; }
.mf-spec img.mf-car { display: block; width: 76px; height: 36px; margin: 0 0 2px; object-fit: contain; }
/* related videos (on the dark band) */
.mf-side { margin: 0 0 20px; padding: 12px; background: rgba(0,0,0,.6); border: 1px solid var(--fm-tout-edge);
  box-shadow: var(--fm-shadow-tout); }
.mf-side > h2 { margin: 0 0 10px; color: var(--fm-head-on-dark); font-size: 14px; text-transform: uppercase; }
.mf-related { display: grid; gap: 10px; margin: 0 0 12px; padding: 0; list-style: none; }
.mf-rel { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px; align-items: start; }
.mf-rel .mf-thumb { border: 1px solid #2c2a27; }
.mf-rel .mf-badge { right: 2px; bottom: 2px; font-size: 10px; line-height: 14px; padding: 0 3px; }
.mf-rel .mf-chip { font-size: 9px; line-height: 13px; }
.mf-rel h3 { margin: 0 0 2px; font-size: 12px; line-height: 15px; }
.mf-rel h3 a { color: #fff; text-decoration: none; }
.mf-rel h3 a:hover { color: var(--fm-red); text-decoration: underline; }
.mf-rel p { margin: 0; color: var(--fm-muted-on-dark); font-size: 11px; line-height: 14px; overflow-wrap: anywhere; }
.mf-rel p a { color: var(--fm-text-on-dark); font-weight: bold; text-decoration: none; }
.mf-rel p a:hover { color: #fff; text-decoration: underline; }
.mf-rel .mf-stars { color: var(--fm-muted-on-dark); }
.mf-more { margin: 0; }
.mf-note { margin: 0 0 20px; color: var(--fm-muted-on-dark); font-size: 11px; }
@media (max-width: 760px) {
  .mf-watch { grid-template-columns: minmax(0, 1fr); }
  .mf-tools { width: 100%; }
}
/* a phone: the wall becomes a list (thumbnail left, text right), like YouTube's search results */
@media (max-width: 480px) {
  .mf-wall, .mf-wall.mf-row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .mf-card { display: grid; grid-template-columns: minmax(0, 42%) minmax(0, 1fr); }
  .mf-card .mf-thumb { align-self: start; }
  .mf-txt { padding: 3px 8px 6px; }
  .mf-title { font-size: 12px; line-height: 15px; }
  .mf-search, .mf-search input.fm-input { width: 100%; }
  .mf-search input.fm-input { flex: 1 1 140px; width: auto; }
  .mf-viewcount { margin-left: 0; }
}
@media (pointer: coarse) {
  .mf-star { min-width: 44px; height: 44px; line-height: 44px; }
  .mf-zero { min-width: 44px; height: 44px; }
  .mf-clear { min-height: 44px; }
  .mf-sort a { padding: 12px 0; }
}

/* ===================================================================== Sign-in additions (fm4ts/web/signin.py) */
.fm-utility .fm-util-id { color: var(--fm-utility-text); font-size: 10px; opacity: .8; }
.fm-utility form.fm-util-form { display: inline; margin: 0; }
.fm-utility form.fm-util-form button { padding: 0; border: 0; color: var(--fm-utility-text); background: none;
  font: inherit; font-size: 10px; cursor: pointer; }
.fm-utility form.fm-util-form button:hover, .fm-utility form.fm-util-form button:focus-visible { color: #fff;
  text-decoration: underline; }
.si-paper { max-width: 760px; }
.si-paper p { line-height: 1.5; }
.si-lead { font-size: 13px; }
.si-form { margin: 12px 0; }
.si-form input.fm-input { width: min(100%, 260px); }
input.si-code { font: bold 18px/1.2 Consolas, "Courier New", monospace; letter-spacing: 2px; text-transform: uppercase; }
.si-resend { margin: 6px 0; }
.si-small { margin: 2px 0 8px; font-size: 11px; }
.si-number { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 12px; padding: 10px 14px;
  border-left: 4px solid var(--fm-red-paper); background: rgba(255,255,255,.55); }
.si-number span { font-size: 12px; font-weight: bold; text-transform: uppercase; }
.si-number b { font: italic 800 40px/1 var(--fm-font-display); color: var(--fm-red-paper); }
.si-status { font-weight: bold; }
.si-foot { max-width: 760px; margin: 14px 0 0; color: var(--fm-muted-on-dark); font-size: 11px; }
.si-foot p { margin: 2px 0; }
@media (max-width: 480px) {
  .si-number b { font-size: 32px; }
  .fm-utility .fm-util-id { display: none; }
}
@media (pointer: coarse) {
  .fm-utility form.fm-util-form button { min-height: 26px; }
}
/* build B (fm4ts/web/account.py): the recovery code, the web Message Center */
.cl-code { margin: 6px 0 14px; padding: 10px 14px; border-left: 4px solid var(--fm-red-paper);
  background: rgba(255,255,255,.55); font: bold 22px/1.3 Consolas, "Courier New", monospace; letter-spacing: 2px;
  overflow-wrap: anywhere; }
.mc-text { margin: 10px 0; padding: 10px 14px; background: rgba(255,255,255,.55); overflow-wrap: anywhere; }
.mc-text p { margin: 4px 0; }
.mc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; }
.mc-actions form.fm-form { margin: 0; }
@media (max-width: 480px) {
  .cl-code { font-size: 17px; letter-spacing: 1px; }
}
