:root {
  --touchline-rail: #211f1c;
  --touchline-edge: #49433c;
  --touchline-white: #fff7ec;
  --touchline-muted: #d0c3b6;
  --touchline-red: #ff8175;
  --touchline-rail-width: 174px;
  --touchline-header-height: 62px;
  --touchline-paper: #f8f3e8;
  --touchline-panel: #fffbf1;
  --touchline-rule: #d6cbb8;
  --touchline-ink: #29231e;
  --touchline-soft: #685b50;
  --touchline-accent: #862536;
}
:root[data-theme="dark"] {
  --touchline-paper: #1c1c19;
  --touchline-panel: #24241f;
  --touchline-rule: #4f493f;
  --touchline-ink: #fff2e1;
  --touchline-soft: #cfc3b3;
  --touchline-accent: #ffa39c;
}
.touchline-visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.touchline-reader, .touchline-reader > body.touchline-reader-body {
  height: auto;
  overflow: visible;
  overscroll-behavior: auto;
}
.touchline-reader > body.touchline-reader-body {
  position: static;
  inset: auto;
  color: var(--touchline-ink);
  background: var(--touchline-paper);
}
.touchline-reader > body.touchline-reader-body::after { content:none }
.touchline-reader .wiki-masthead,
.red-thread-app > .masthead {
  color: var(--touchline-white);
  background: var(--touchline-rail);
  border-color: var(--touchline-edge);
  --coyg-pressed: #39322e;
}
.touchline-reader .masthead-row { min-height:var(--touchline-header-height); }
.touchline-reader .wiki-masthead .wordmark,
.red-thread-app .masthead-logo { color:var(--touchline-red); }
.touchline-reader-actions, .red-thread-app .masthead-right { display:flex; align-items:center; gap:3px; }
.touchline-reader .wiki-masthead .reader-section { color:var(--touchline-muted); }
.touchline-reader .masthead-row nav.global-nav .dock-icon { display:inline-flex; }
.touchline-reader .global-nav .dock-icon svg,
.touchline-reader .global-nav > a > svg,
.touchline-reader-actions svg,
.touchline-sidebar .tab-bar-icon svg,
.red-thread-app .coyg-search-link svg { width:19px; height:19px; flex:none; }
.touchline-reader .coyg-search-link > span,
.touchline-reader .coyg-search-link kbd,
.red-thread-app .coyg-search-link > span,
.red-thread-app .coyg-search-link kbd { display:none; }
.red-thread-app .masthead-right .coyg-search-link {
  display:inline-flex; align-items:center; justify-content:center; width:auto; min-width:44px; gap:4px; padding-inline:5px;
}
.red-thread-app .masthead-right .coyg-search-link > span:first-of-type { display:inline; font-size:.75rem; }
@media (max-width:375px) {
  .red-thread-app .masthead-right .coyg-search-link { flex-direction:column; gap:2px; padding-inline:2px; }
}
.red-thread-app .coyg-search-link:focus-visible { outline:2px solid var(--touchline-red); outline-offset:-2px; }
.red-thread-app .coyg-dock[data-offline-dock] { grid-template-columns:repeat(3,minmax(0,1fr)); }
.coyg-search-link[data-club-search]:focus-visible { outline:2px solid var(--touchline-red); outline-offset:-2px; }
.touchline-rail-brand, .touchline-saved-nav { display:none; }
.touchline-reader .page-heading .eyebrow,
.touchline-reader .detail-heading .eyebrow { color:var(--touchline-accent); }
.touchline-reader .detail-heading h1,
.touchline-reader .atlas-chapter-header h1 { font-family:Georgia,serif; font-weight:550; letter-spacing:-.045em; }
.touchline-reader .atlas-chapter-page .archive-passage > p { font-family:Georgia,serif; font-size:clamp(1.04rem,1.7vw,1.34rem); line-height:1.66; }
.touchline-reader .detail-heading > p:last-of-type,
.touchline-reader .atlas-chapter-intro { max-width:68ch }
.coyg-save-record {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:44px;
  padding:0 12px;
  background:var(--touchline-panel);
  color:var(--touchline-ink);
  border:1px solid var(--touchline-rule);
  border-radius:6px;
  font:650 .8rem/1 Inter,sans-serif;
  cursor:pointer;
}
.coyg-save-record[hidden] { display:none; }
.coyg-save-record[aria-pressed="true"] { color:var(--touchline-accent); }
.coyg-save-record svg { width:17px; height:17px; }
.detail-heading .coyg-save-record { margin-top:14px; }
.saved-records { max-width:740px; list-style:none; margin:20px 0; padding:0; border-top:1px solid var(--touchline-rule); }
.saved-records li { display:flex; align-items:center; justify-content:space-between; gap:9px; border-bottom:1px solid var(--touchline-rule); }
.saved-records a { display:grid; gap:1px; padding:10px 6px; flex:1; min-height:56px; }
.saved-records a span { color:var(--touchline-soft); font-size:.8rem; }
.saved-records button {
  min-height:44px;
  padding:0 10px;
  border:1px solid var(--touchline-rule);
  border-radius:5px;
  color:var(--touchline-ink);
  background:var(--touchline-panel);
  cursor:pointer;
}

.match-workspace { display:grid; gap:0; margin:0 0 24px; }
.match-workspace-main > .reader-tools { margin-bottom:6px; }
.match-workspace-hero {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:15px;
  padding:clamp(18px,4vw,36px);
  min-height:163px;
  background:#282521;
  color:var(--touchline-white);
  border-radius:10px 10px 0 0;
}
.match-workspace-hero--emirates {
  background-image:linear-gradient(0deg,#181411fa 0%,#181411bc 58%,#18141140 100%), image-set(url('/atlas/polish/emirates-photo-wide-768.webp') 1x, url('/atlas/polish/emirates-photo-wide-1440.webp') 2x);
  background-position:50% 46%;
  background-size:cover;
  min-height:200px;
}
.match-workspace-hero h1 {
  margin:.17em 0 .25em;
  color:inherit;
  font:600 clamp(38px,6vw,72px)/.97 'Barlow Condensed',sans-serif;
  letter-spacing:.005em;
  overflow-wrap:anywhere;
}
.match-workspace-meta {
  color:#f5dfca;
  text-transform:uppercase;
  letter-spacing:.06em;
  font-size:.75rem;
  font-weight:700;
  margin:0;
}
.match-workspace-status {
  display:flex;
  align-items:center;
  gap:4px 12px;
  flex-wrap:wrap;
  margin:0;
  font-size:.8rem;
  color:#f5dfca;
}
.match-workspace-status strong { color:#fff8ed; }
.match-workspace-hero .coyg-save-record {
  background:#27221e;
  color:var(--touchline-white);
  border-color:#9a8979;
  flex:none;
}
.match-workspace-hero .coyg-save-record[aria-pressed="true"] { color:var(--touchline-red); }
.match-workspace-tabs {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:0 5px;
  padding:0 10px;
  background:var(--touchline-panel);
  border:solid var(--touchline-rule);
  border-width:0 1px 1px;
}
.match-workspace-tabs a {
  min-height:46px;
  display:inline-flex;
  align-items:center;
  padding:0 11px;
  font-size:.82rem;
  color:var(--touchline-soft);
  font-weight:650;
  text-decoration:none;
}
.match-workspace-tabs a[aria-current="page"] {
  box-shadow:inset 0 -3px var(--touchline-accent);
  color:var(--touchline-accent);
}
.match-workspace-grid {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(195px,28%);
  gap:14px;
  align-items:start;
  margin-top:14px;
}
.match-workspace-content,.match-workspace-context {
  min-width:0;
  background:var(--touchline-panel);
  border:1px solid var(--touchline-rule);
  border-radius:8px;
  padding:clamp(12px,2vw,22px);
}
.match-workspace-content h2,.match-workspace-context h2 { font-size:1.2rem; margin-top:0; }
.match-workspace-content > :is(p,section,details):last-child { margin-bottom:0; }
.match-workspace-context p { font-size:.83rem; color:var(--touchline-soft); }
.match-workspace-context ul { padding:0; list-style:none; margin:8px 0 0; }
.match-workspace-context li { border-top:1px solid var(--touchline-rule); }
.match-workspace-context li a { display:flex; align-items:center; min-height:44px; font-size:.84rem; }
.match-overview-evidence summary { cursor:pointer; font-size:.86rem; min-height:44px; display:list-item; padding-block:10px; }
.match-overview-evidence .provenance { margin-top:0; }
.match-workspace-content .screen.terrace-screen {
  width:100%; max-width:none; min-height:auto; padding:0; margin:0; overflow:visible; display:block;
}
.match-workspace-content .terrace-screen .take-feed { max-height:none; overflow:visible; }
.match-workspace-content .terrace-screen .screen-head { position:static; display:flex; align-items:flex-start; gap:8px; }
.match-workspace-content .terrace-screen h2.screen-title { font-size:1.18rem; }
.match-workspace-content .terrace-screen .terrace-links { display:flex; flex-wrap:wrap; gap:6px; }
.match-workspace-content .terrace-composer { position:static; }
.workspace-action { display:inline-flex;align-items:center;min-height:44px;color:var(--touchline-accent); }
.match-workspace-context a, .match-workspace-content a { text-underline-offset: 3px; }
html.touchline-reader .reader-back { display:inline-flex; align-items:center; gap:4px; }
.touchline-reader .match-workspace-main .reader-tools { justify-content:flex-start; }
.touchline-reader .reader-back[data-club-origin] { max-width:min(100%,70ch); overflow-wrap:anywhere; }

.club-search-dialog {
  position:fixed;
  inset:0;
  margin:min(14vh,110px) auto auto;
  width:min(580px,calc(100vw - 28px));
  max-height:min(70dvh,690px);
  overflow:auto;
  background:var(--touchline-panel);
  color:var(--touchline-ink);
  border:1px solid var(--touchline-rule);
  border-radius:12px;
  padding:16px 17px 20px;
  box-shadow:0 24px 65px #17110f66;
  font:400 .9rem/1.5 Inter,sans-serif;
}
.club-search-dialog::backdrop { background:#161311a8; }
.club-search-dialog header { display:flex; justify-content:space-between; align-items:center; gap:8px; }
.club-search-dialog h2 { font:600 1.9rem/1 'Barlow Condensed',sans-serif; margin:0; }
.club-search-dialog form label { display:block; color:var(--touchline-soft); margin:9px 0 4px; }
.club-search-dialog form div { display:flex; gap:5px; }
.club-search-dialog input {
  flex:1; min-width:0; min-height:44px;
  border:1px solid var(--touchline-rule); border-radius:5px;
  color:var(--touchline-ink); background:var(--touchline-paper);
  padding:0 9px; font-size:1rem;
}
.club-search-dialog button {
  min-height:44px; padding:0 12px;
  border:1px solid var(--touchline-rule); border-radius:5px;
  color:var(--touchline-ink); background:var(--touchline-panel);
  cursor:pointer;
}
.club-search-dialog header button { min-width:44px; font-size:1.35rem; }
.club-search-dialog [data-search-results] { margin-top:10px; }
.club-search-dialog p { color:var(--touchline-soft); margin:3px 0; }
.club-search-dialog ul { list-style:none; margin:5px 0 0; padding:0; }
.club-search-dialog li { border-top:1px solid var(--touchline-rule); }
.club-search-dialog li a { display:grid; gap:2px; align-content:center; padding:6px 4px; min-height:44px; text-decoration:none; }
.club-search-dialog li a span { color:var(--touchline-soft); font-size:.75rem; }
.club-search-dialog :is(a,button,input):focus-visible { outline:2px solid var(--touchline-accent); outline-offset:2px; }

@media(min-width:901px) {
  .touchline-reader .wiki-masthead {
    position:sticky; top:0; z-index:12; margin-left:var(--touchline-rail-width);
  }
  .touchline-reader .masthead-row { justify-content:space-between; }
  .touchline-reader .wiki-masthead .reader-section { display:inline; margin-right:auto; }
  .touchline-reader .masthead-row nav.global-nav {
    display:flex; flex-direction:column; align-items:stretch;
    position:fixed; top:0; left:0; bottom:0; width:var(--touchline-rail-width);
    padding:61px 10px 16px; gap:5px;
    background:var(--touchline-rail); border-right:1px solid var(--touchline-edge);
  }
  .touchline-reader .masthead-row nav.global-nav a {
    display:flex; gap:9px; align-items:center; min-height:44px;
    color:var(--touchline-muted); border-radius:6px; padding:0 10px; font-size:.81rem;
  }
  .touchline-reader .masthead-row nav.global-nav a[aria-current="page"],
  .red-thread-app .tab-bar .tab-bar-item[aria-current="page"] { color:var(--touchline-red); background:#3a302c; }
  .touchline-reader .masthead-row nav.global-nav a:hover,
  .red-thread-app .tab-bar .tab-bar-item:hover { color:var(--touchline-white); background:#3a302c; }
  .touchline-reader .masthead-row nav.global-nav .touchline-saved-nav { margin-top:auto; }
  .touchline-reader .masthead-row .wordmark {
    position:fixed; z-index:1; top:16px; left:23px;
  }
  .touchline-reader .wiki-masthead .masthead-row .wordmark + .reader-section { min-width:110px; }
  .touchline-reader #main,.touchline-reader .wiki-footer > .wiki-shell {
    width:min(calc(100% - var(--touchline-rail-width) - 48px), 1120px);
    margin-left:max(calc(var(--touchline-rail-width) + 24px),calc((100% + var(--touchline-rail-width) - 1120px) / 2));
    margin-right:0;
  }
  .touchline-reader .wiki-footer { margin-left:var(--touchline-rail-width); }
  .touchline-reader .wiki-footer > .wiki-shell { margin:0 auto; width:min(calc(100% - 48px),1120px); }
  .touchline-reader .touchline-saved-mobile,.red-thread-app .touchline-saved-mobile { display:none; }
  .touchline-reader .coyg-search-link[data-club-search],
  .red-thread-app .coyg-search-link[data-club-search] {
    display:flex; width:auto; padding:0 10px; gap:8px;
    border:1px solid var(--touchline-edge); color:var(--touchline-white);
  }
  .touchline-reader .coyg-search-link[data-club-search] > span,
  .red-thread-app .coyg-search-link[data-club-search] > span { display:inline; font-size:.8rem; }
  .touchline-reader .coyg-search-link kbd,
  .red-thread-app .coyg-search-link kbd { display:inline; font-size:.71rem; color:var(--touchline-muted); }
  #root > .red-thread-app {
    display:grid;
    grid-template-columns:var(--touchline-rail-width) minmax(0,1fr);
    grid-template-rows:auto minmax(0,1fr);
    height:100%;
    max-width:none;
    padding:0;
  }
  #root > .red-thread-app > .masthead { grid-column:2; grid-row:1; min-height:var(--touchline-header-height); }
  #root > .red-thread-app > .app-body { grid-column:2; grid-row:2; min-height:0; min-width:0; width:100%; }
  #root > .red-thread-app > .tab-bar {
    grid-column:1; grid-row:1 / 3;
    display:flex; flex-direction:column; align-items:stretch; justify-content:flex-start;
    width:100%; min-width:0; min-height:0; gap:5px; margin:0; padding:13px 10px 16px;
    background:var(--touchline-rail); border-right:1px solid var(--touchline-edge);
    border-bottom:0; overflow-y:auto;
  }
  #root > .red-thread-app .tab-bar .tab-bar-item,
  #root > .red-thread-app .tab-bar .touchline-saved-nav {
    display:flex; flex-direction:row; min-height:44px; flex:none; gap:9px; align-items:center; justify-content:flex-start;
    padding:0 9px; border-radius:6px; line-height:1.18; color:var(--touchline-muted);
    border:0; width:100%; font-size:.81rem; font-weight:650;
  }
  #root > .red-thread-app .tab-bar .tab-bar-item[aria-current="page"] { color:var(--touchline-red); }
  #root > .red-thread-app .tab-bar .tab-bar-item::after { display:none; }
  #root > .red-thread-app .tab-bar .tab-bar-icon { display:inline-flex; }
  #root > .red-thread-app .tab-bar .tab-bar-label { font:inherit; }
  #root > .red-thread-app .tab-bar .touchline-rail-brand {
    display:flex; align-items:center; min-height:36px; margin:1px 8px 9px;
  }
  #root > .red-thread-app .tab-bar .touchline-saved-nav { margin-top:auto; }
  #root > .red-thread-app > .masthead .masthead-logo { display:none; }
}
@media(max-width:900px) {
  .touchline-reader .masthead-row .wordmark, .red-thread-app .masthead .masthead-logo { display:inline-flex; }
  .touchline-reader .coyg-search-link svg,.red-thread-app .coyg-search-link svg { width:18px; height:18px; }
  .touchline-reader .masthead-row .touchline-saved-mobile,.red-thread-app .masthead .touchline-saved-mobile { display:inline-grid; }
  .match-workspace-hero { min-height:138px; padding:15px 13px; }
  .match-workspace-hero--emirates { min-height:143px; }
  .match-workspace-hero h1 { font-size:clamp(32px,8.5vw,58px); }
  .match-workspace-meta { font-size:.64rem; }
  .match-workspace-status { font-size:.72rem; }
}
@media(max-width:640px) {
  .match-workspace-hero { align-items:flex-start; gap:5px; }
  .match-workspace-hero .coyg-save-record { width:44px; padding:0; }
  .match-workspace-hero .coyg-save-record span { position:absolute; width:1px; height:1px; clip-path:inset(50%); overflow:hidden; }
  .match-workspace-tabs { gap:0; padding:0 3px; }
  .match-workspace-tabs a { padding:0 7px; font-size:.74rem; }
  .match-workspace-grid { grid-template-columns:minmax(0,1fr); gap:9px; margin-top:9px; }
  .match-workspace-main .breadcrumbs { display:none; }
  .club-search-dialog { margin:12px auto auto; max-height:85dvh; }
}

.almanac-profile { display:grid; grid-template-columns:minmax(0,1fr) minmax(180px,24%); gap:clamp(16px,3vw,36px); align-items:start; }
.almanac-flow { min-width:0; }
.almanac-flow :is(.page-heading,.detail-heading) h1 { font-family:Georgia,serif; font-weight:550; letter-spacing:-.045em; }
.almanac-flow .archive-passage > p { max-width:70ch; }
.almanac-margin { margin-block:20px; padding:13px; border:1px solid var(--touchline-rule); border-radius:7px; background:var(--touchline-panel); }
.almanac-margin h2 { margin:0; font-size:1rem; }
.almanac-margin .ruled-list { margin-top:8px; }
.almanac-margin .ruled-list a { min-height:44px; display:flex; align-items:center; font-size:.8rem; }
.almanac-stat-history summary { min-height:44px; cursor:pointer; padding-block:9px; color:var(--touchline-accent); }
.red-thread-app .masthead :is(.masthead-name,.masthead-edition-meta,.mobile-page-title,.masthead-more summary,.masthead-share) { color:var(--touchline-white); }
.red-thread-app .masthead .masthead-more > .masthead-more-panel { color:var(--touchline-ink); }
@media(max-width:740px) {
  .almanac-profile { grid-template-columns:minmax(0,1fr); gap:4px; }
  .almanac-margin { margin-block:4px 13px; }
}

@media(max-width:600px) {
  .touchline-reader .register-heading { margin-block:9px 12px; }
  .touchline-reader .register-heading h1 { font-size:clamp(29px,9vw,44px); margin-block:3px 7px; }
  .touchline-reader .register-heading > p:not(.eyebrow) { font-size:.84rem; line-height:1.4; }
  .touchline-reader .register-heading .register-scope { margin-block:7px 0; }
  .touchline-reader .register-tabs { margin-bottom:12px; }
  .touchline-reader .register-results-heading { margin-top:5px; }
  .touchline-reader .register-rows li > a { min-height:58px; }
}

.match-workspace-panels { min-width:0; }
.match-workspace-content[hidden], [data-saved-count][hidden] { display:none; }
.match-workspace-content > p, .page-heading > p, .almanac-flow .prose-section > p { max-width:68ch; }
.match-workspace-content .terrace-screen :is(.screen-title,.take-text,.compose-hint) { color:var(--touchline-ink); }
.match-workspace-content .terrace-composer { display:flex; flex-wrap:wrap; gap:6px; min-width:0; }
.match-workspace-content .terrace-composer .compose-claim { white-space:normal; min-width:74px; min-height:44px; overflow:visible; }
.match-workspace-content .terrace-composer .compose-input { flex:1 1 110px; min-width:0; min-height:44px; }
.match-workspace-content .terrace-composer button { min-height:44px; }
.match-index-tabs { margin-top:10px; }
.match-filter {
  display:grid; grid-template-columns:auto minmax(94px,1fr) auto minmax(94px,1fr);
  align-items:center; gap:8px 12px;
}
.touchline-reader :is(.match-filter select,.match-filter button,.register-form select,.register-form button,.register-filters summary,.reader-back,.provenance > summary) { min-height:44px; }
.match-filter select { width:100%; min-width:0; }
.match-filter button { grid-column:1 / -1; justify-self:start; }
.device-match-call { padding-bottom:12px; border-bottom:1px solid var(--touchline-rule); }
.device-match-call > div { display:flex; flex-wrap:wrap; gap:7px; }
.device-match-call button {
  flex:1 1 84px; min-height:44px; border-radius:5px; border:1px solid var(--touchline-rule);
  background:var(--touchline-paper); color:var(--touchline-ink); font:inherit; cursor:pointer;
}
.device-match-call button[aria-pressed="true"] { border-color:var(--touchline-accent); color:var(--touchline-accent); }
.device-match-call [role="status"] { display:block; margin-top:6px; font-size:.82rem; color:var(--touchline-soft); }
.player-portrait { margin:0 0 16px; }
.player-portrait img { display:block; width:100%; height:auto; aspect-ratio:4 / 5; object-fit:cover; object-position:center 22%; border-radius:5px; }
.player-portrait--thierry-henry img { object-position:center top; }
.player-portrait figcaption { color:var(--touchline-soft); font-size:.7rem; }
.analysis-scroll { max-width:100%; overflow-x:auto; overscroll-behavior-inline:contain; margin-block:12px; }
.analysis-scroll table { margin:0; }
.analysis-scroll td, .analysis-scroll th { white-space:nowrap; }
.fixture-loading { min-height:140px; padding:20px; border:1px solid var(--touchline-rule); border-radius:8px; color:var(--touchline-ink); background:var(--touchline-panel); }
.fixture-loading h2 { margin:0 0 5px; }
.fixture-loading a { display:inline-flex; align-items:center; min-height:44px; color:var(--touchline-accent); }
.touchline-saved-mobile { position:relative; }
.touchline-reader .touchline-saved-mobile > .saved-mobile-count:not([hidden]),
.red-thread-app .touchline-saved-mobile > .saved-mobile-count:not([hidden]) {
  display:grid; place-items:center; position:absolute; inset:0 1px auto auto; min-width:15px; padding:2px; border-radius:10px;
  color:var(--touchline-rail); background:var(--touchline-red); font:750 .63rem/1 Inter,sans-serif;
}
.touchline-reader .touchline-saved-mobile[aria-current="page"] { color:var(--touchline-red); }
.touchline-reader :is(.skip-link, a.reader-back):focus-visible { outline:2px solid var(--touchline-accent); outline-offset:2px; }
@media(max-width:900px) {
  .touchline-reader > body.touchline-reader-body { padding-bottom:calc(82px + env(safe-area-inset-bottom)); }
  .touchline-reader .wiki-footer { padding-bottom:14px; }
}
@media(max-width:640px) {
  .touchline-reader .match-workspace-tabs { display:grid; grid-template-columns: 1fr 1.3fr 1fr; }
  .match-workspace-tabs a { justify-content:center; text-align:center; }
  .match-filter { grid-template-columns:auto minmax(0,1fr); }
  .match-filter > * { min-width:0; }
  .almanac-margin .player-portrait { max-width:180px; }
}

.match-filter { grid-template-columns:repeat(3,minmax(0,1fr)); }
.match-filter label { display:grid; gap:3px; min-width:0; }
.match-coverage-strip { display:flex; align-items:center; flex-wrap:wrap; gap:0 8px; padding:0 12px; color:var(--touchline-soft); background:var(--touchline-panel); margin:0; border:1px solid var(--touchline-rule); border-bottom:0; }
.match-coverage-strip a { display:inline-flex; min-height:44px; align-items:center; }
.match-workspace-tabs a { min-width:44px; }
.touchline-reader .wordmark,.red-thread-app .masthead-logo { min-width:44px; min-height:44px; align-items:center; }
.touchline-reader .register-results-heading a, .touchline-reader .wiki-footer a, .rt-home-fixtures__heading > a, .living-more .chip { min-height:44px; display:inline-flex; align-items:center; }
.touchline-reader .archive-passage > p { max-width:68ch; }
@media(max-width:640px) {
  .match-filter { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .touchline-reader .match-workspace-tabs { grid-auto-flow:column; grid-template-columns:none; grid-auto-columns:minmax(0,1fr); }
  .almanac-flow .fact-table :is(th,td) { display:block; width:100%; }
  .almanac-flow .fact-table th { border-bottom:0; padding-bottom:0; }
  .almanac-flow .fact-table td { padding-top:4px; }
}

#site-analytics-settings { min-height:44px; }
#site-analytics .sm-actions button { min-height:44px; }
@media(max-width:900px) {
  body #site-analytics { bottom:calc(76px + env(safe-area-inset-bottom)); }
  .touchline-reader body > #site-analytics-settings { margin-bottom:12px; }
}
@media(min-width:901px) {
  body #site-analytics { left:calc(var(--touchline-rail-width) + 16px); right:16px; }
  .touchline-reader body > #site-analytics-settings { margin-left:calc(var(--touchline-rail-width) + 16px); }
}

/* The selected match section stays in reach without masking the route title. */
.match-workspace [data-match-tabs][role=tablist] {
  position:sticky;
  top:var(--touchline-header-height);
  z-index:8;
  border-radius:0 0 7px 7px;
}
.match-workspace-grid { scroll-margin-top:48px; }
.match-workspace [data-match-tab] { -webkit-tap-highlight-color:transparent; }
.match-workspace [data-match-tab]:focus-visible { outline-offset:-4px; }
.match-workspace [data-match-island] { min-width:0; }
.match-workspace [data-match-island] a { display:inline-flex; align-items:center; min-height:44px; }
@media(max-width:900px) {
  .match-workspace [data-match-tabs][role=tablist] { top:var(--mobile-app-header-height); }
}
@media(max-width:540px) {
  .match-workspace-hero--emirates {
    background-image:linear-gradient(0deg,#181411fa 0%,#181411bc 58%,#18141140 100%),image-set(url('/atlas/polish/emirates-photo-compact-480.webp') 1x,url('/atlas/polish/emirates-photo-compact-780.webp') 2x);
  }
}

.player-opening {
  display:grid;
  grid-template-columns:minmax(0,1fr) clamp(110px,28%,200px);
  align-items:start;
  gap:clamp(12px,3vw,26px);
  margin-bottom:16px;
}
.player-opening .player-portrait { margin:0; min-width:0; }
.player-opening :is(.page-heading,.detail-heading) h1 { overflow-wrap:anywhere; }
.player-opening .player-portrait img { background:var(--touchline-rule); }
@media(max-width:640px) {
  .player-opening { grid-template-columns:minmax(0,1fr) clamp(94px,30%,140px); }
  .player-opening .player-portrait figcaption { line-height:1.3; }
}

:root[data-theme="light"] :is(.wiki-masthead,.red-thread-app > .masthead,.red-thread-app > .tab-bar) {
  --touchline-rail:var(--touchline-panel);
  --touchline-edge:var(--touchline-rule);
  --touchline-white:var(--touchline-ink);
  --touchline-muted:var(--touchline-soft);
  --touchline-red:var(--touchline-accent);
}
:root[data-theme="light"] :is(.global-nav,.tab-bar) a:is(:hover,[aria-current="page"]),
:root[data-theme="light"] #root .tab-bar .tab-bar-item:is(:hover,[aria-current="page"]) {
  color:var(--touchline-accent); background:#eee4d5;
}
:root .red-thread-app > .masthead {
  color:var(--touchline-white); background:var(--touchline-rail);
}
.red-thread-app .masthead .masthead-menu,
.red-thread-app .masthead .mobile-install-guide summary {
  color:var(--touchline-ink); background:var(--touchline-panel);
}
.red-thread-app .masthead .masthead-menu p { color:var(--touchline-soft); }
.red-thread-app .masthead .masthead-menu a { color:var(--touchline-accent); }

.match-workspace-content .terrace-screen {
  --programme-paper:var(--touchline-paper);
  --programme-raised:var(--touchline-panel);
  --programme-ink:var(--touchline-ink);
  --programme-muted:var(--touchline-soft);
  --programme-line:var(--touchline-rule);
  --ink:var(--touchline-ink);
  --ink-dim:var(--touchline-soft);
  --ink-muted:var(--touchline-soft);
  --surface:var(--touchline-panel);
  --raised:var(--touchline-paper);
  --red-deep:var(--touchline-accent);
  background:var(--touchline-paper); color:var(--touchline-ink);
}
.match-workspace-content .terrace-screen .terrace-head { flex-wrap:wrap; }
.match-workspace-content .terrace-head > div:first-child { flex:1 1 15rem; min-width:0; }
.match-workspace-content .terrace-head .handle-chip {
  flex:none; width:auto; max-width:100%; min-height:44px; white-space:nowrap;
  color:var(--touchline-ink); background:var(--touchline-panel); border-color:var(--touchline-rule);
}
.match-workspace-content .terrace-links a { color:var(--touchline-accent); }
.match-workspace-content .terrace-links a,
.match-workspace-context a,
#goal-timeline li a {
  min-width:44px; min-height:44px; display:inline-flex; align-items:center;
}
.archive-sources > summary { min-height:44px; align-content:center; }
.red-thread-app .rt-matchday__team button { min-height:44px; min-width:44px; }
body > :is(.app-skip-link,.skip-link) {
  position:fixed; z-index:100; left:12px; top:8px; transform:translateY(calc(-100% - 12px));
  min-height:44px; display:inline-flex; align-items:center; padding:0 12px;
  background:var(--touchline-panel); color:var(--touchline-ink);
}
body > :is(.app-skip-link,.skip-link):focus { transform:none; }

.match-goal-list a { display: inline-flex; min-height: 44px; align-items: center; }
.match-goal-list li > span small { display: block; }
.edition-match-list article { padding-block: 12px; }
.edition-match-list article h3, .edition-match-list article p { margin: 0 0 6px; }
.edition-match-list article h3 a { display: inline-flex; min-height: 44px; padding: 0; align-items: center; }
.player-monogram { display: grid; place-items: center; aspect-ratio: 4 / 5; max-width: 245px; width: 100%; margin-inline: auto; border: 1px solid var(--touchline-rule); border-radius: 8px; background: var(--touchline-panel); color: var(--touchline-accent); font: 700 clamp(2.4rem, 8vw, 5.5rem) / 1 "Barlow Condensed", sans-serif; }
.match-workspace-content .terrace-screen :is(.terrace-utility-row,.north-bank-rules,.north-bank-receipts) {
  color:var(--touchline-ink); background:var(--touchline-panel);
}
.match-workspace-content .terrace-utility-row :is(.community-activity,.community-activity > span:last-child,.safety-entry),
.match-workspace-content .terrace-screen :is(.north-bank-rules,.north-bank-receipts) > summary {
  color:var(--touchline-ink); background:var(--touchline-panel);
}
:root.touchline-reader[data-theme="light"] .masthead-row nav.global-nav a:is(:hover,[aria-current="page"]) {
  color:var(--touchline-accent); background:#eee4d5;
}

/* The fixture list and match story lead. Related records stay in reach below. */
.touchline-reader .compact-index-heading {
  margin: 0 0 .7rem;
  padding: 0;
  border: 0;
}
.touchline-reader .compact-index-heading h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.5rem);
}
.match-index-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  border-bottom: 1px solid var(--touchline-rule);
  margin-bottom: .8rem;
}
.match-index-controls .register-tabs { margin: 0; }
.match-index-controls .match-index-tabs { grid-column: 1 / -1; }
.match-index-controls .match-team-tabs { border-bottom: 0; }
.match-filter-disclosure { position: static; }
.match-index-controls:has(.match-filter-disclosure[open]) {
  display: block;
}
.match-index-controls:has(.match-filter-disclosure[open]) .match-team-tabs {
  border-bottom: 1px solid var(--touchline-rule);
}
.match-filter-disclosure summary,
.match-private-call summary,
.match-workspace-context summary,
.almanac-related summary {
  min-height: 44px;
  padding: 11px 4px;
  cursor: pointer;
  color: var(--touchline-accent);
  font-weight: 650;
}
.match-filter-disclosure summary { padding-inline: .65rem .2rem; }
.match-filter-disclosure .match-filter {
  padding: 0 .5rem .75rem;
  margin: 0;
  border: 0;
}
.match-filter-actions { display: flex; align-items: center; gap: .7rem; }
.match-filter-actions a { display: inline-flex; align-items: center; min-height: 44px; }
.match-index-controls + .prose-section { margin-top: .75rem; }
.match-index-controls ~ .prose-section > h2 { margin: 0 0 .4rem; }
.match-index-controls ~ .prose-section .ruled-list a { min-height: 56px; }
.match-index-controls ~ .prose-section [id^="match-row-"] { scroll-margin-top: 80px; }
.match-workspace-hero, .match-workspace-hero--emirates {
  min-height: 0;
  padding: clamp(12px, 2.5vw, 26px);
}
.match-workspace-hero h1 { font-size: clamp(34px, 5vw, 62px); }
.match-workspace-status strong { font-weight: 700; }
.match-workspace-grid {
  grid-template-columns: minmax(0, 1fr);
  width: min(100%, 760px);
  gap: .2rem;
}
.match-workspace-content, .match-workspace-context {
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.match-workspace-content > .prose-section { margin-top: 0; }
.match-workspace-content .prose-section + .prose-section { margin-top: 18px; }
.match-workspace-content .match-goal-list { margin-top: 0; }
.match-workspace-content .match-goal-list li {
  grid-template-columns: 56px minmax(0, 1fr);
  padding-inline: 4px;
}
.match-workspace-content #goal-timeline { scroll-margin-top: 110px; }
.match-workspace-content [id^="goal-event-"] { scroll-margin-top: 110px; }
.match-workspace-context, .match-overview-evidence, .match-private-call {
  border-top: 1px solid var(--touchline-rule);
  margin-top: 9px;
}
.match-private-call { margin-top: .75rem; }
.touchline-reader .almanac-profile { display: block; max-width: 820px; }
.touchline-reader .almanac-related { position: static; margin-top: 14px; }
.touchline-reader .player-opening--monogram {
  grid-template-columns: minmax(0, 1fr) clamp(43px, 14%, 80px);
}
.touchline-reader .player-opening--monogram .player-monogram {
  aspect-ratio: 1;
  min-height: 0;
  max-height: 80px;
  font-size: clamp(1rem, 4vw, 2rem);
}
.touchline-reader [data-club-saved-list] { max-width: 45rem; }
.touchline-reader [data-club-saved-list] nav { display: flex; flex-wrap: wrap; gap: 0 16px; }
.touchline-reader [data-club-saved-list] nav a { display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 900px) {
  .touchline-reader .masthead-row .reader-section { visibility: hidden; }
  .match-workspace-grid { width: 100%; }
}
@media (max-width: 480px) {
  .match-index-controls .match-team-tabs { gap: 0; }
  .match-index-controls .match-team-tabs a { padding-inline: 6px; font-size: .79rem; }
  .match-filter-disclosure summary { font-size: .81rem; }
  .match-workspace-hero { gap: 5px; }
  .match-workspace-hero h1 { font-size: clamp(30px, 8.2vw, 38px); }
  .match-workspace-hero .match-workspace-meta { font-size: .69rem; }
}

/* Reference records share the app's content slot when opened in a journey. */
.club-reader {
  width: 100%;
  min-height: 100%;
  color: var(--touchline-ink);
  background: var(--touchline-paper);
  font: 1rem/1.58 Inter, system-ui, sans-serif;
}
.club-reader .club-reader-content {
  width: min(100%, 860px);
  padding: clamp(14px, 3vw, 36px) clamp(14px, 3.8vw, 38px) 38px;
  margin: 0 auto;
  min-width: 0;
}
.club-reader .match-workspace { margin: 0; }
.club-reader .reader-tools { margin-top: 0; }
.club-reader :is(.reader-back,#goal-timeline,[id^="goal-event-"],[id^="match-row-"]) { scroll-margin-top: 16px; }
.club-reader :is(.page-heading,.detail-heading,.atlas-chapter-header) h1 {
  font: 600 clamp(2.4rem, 6vw, 4.5rem)/.97 'Barlow Condensed', Inter, sans-serif;
}
.club-reader .match-workspace [data-match-tabs][role=tablist] { top: 0; }
.club-reader :is(.reader-collections,.reader-collections-menu,.breadcrumbs) { display: none; }
.club-reader .reader-back { min-height: 44px; color: var(--touchline-soft); font-size: .83rem; }
.club-reader :is(.reader-back,.reader-tools) + .breadcrumbs { margin: 0; }
.club-route-progress {
  position: fixed; top: var(--touchline-header-height); left: 0; right: 0;
  height: 2px; background: var(--touchline-red); z-index: 19; opacity: .7;
  pointer-events: none;
}
.touchline-reader .touchline-reader-actions { margin-inline-start: auto; }
@media(min-width:901px) {
  .touchline-reader .coyg-global-saved > span:not([hidden]) { display: inline; }
  .club-route-progress { left: var(--touchline-rail-width); }
}
@media(max-width:900px) {
  .club-route-progress { top: var(--mobile-app-header-height); }
}

:root[data-theme="light"] {
  --touchline-paper:#fff;
  --touchline-panel:#fff;
  --touchline-rule:#e4d6d8;
  --touchline-ink:#21171a;
  --touchline-soft:#66545a;
  --touchline-accent:#bc1429;
  --rt-surface:#fff;
  --rt-raised:#fff;
  --rt-text:#21171a;
  --rt-muted:#66545a;
  --rt-line:#e4d6d8;
  --rt-accent:#bc1429;
  --rt-on-accent:#fff;
  --raised:#faf1f2;
}
:root[data-theme="light"] :is(.touchline-reader,.club-reader),
:root.touchline-reader[data-theme="light"] {
  --paper:#fff;
  --ink:#21171a;
  --muted:#66545a;
  --red:#bc1429;
  --rule:#e4d6d8;
}
:root[data-theme="light"] .coyg-dock {
  color:#21171a;
  background:#fff;
  border-color:#e4d6d8;
  --coyg-accent:#bc1429;
  --coyg-pressed:#faf1f2;
}
:root[data-theme="light"] :is(.global-nav,.tab-bar) a:is(:hover,[aria-current="page"]),
:root[data-theme="light"] #root .tab-bar .tab-bar-item:is(:hover,[aria-current="page"]) {
  background:#faf1f2;
}
.club-team-control { display:flex; align-items:center; gap:6px; font-size:12px; color:var(--touchline-white); }
.club-team-control select {
  height:44px; padding:0 5px; border:1px solid var(--touchline-edge); border-radius:6px;
  color:var(--touchline-white); background:var(--touchline-rail); font:inherit; font-weight:600;
}
.club-team-control select:focus-visible, .reader-appearance :is(select,summary):focus-visible {
  outline:2px solid var(--touchline-red); outline-offset:2px;
}
.touchline-reader .reader-appearance { position:relative; }
.touchline-reader .reader-appearance summary {
  box-sizing:border-box; display:grid; place-items:center; width:44px; height:44px; border:1px solid var(--touchline-edge);
  border-radius:6px; padding:0; color:var(--touchline-white); background:var(--touchline-rail); font-size:11px;
}
.reader-appearance summary::-webkit-details-marker { display:none; }
.reader-appearance .masthead-menu {
  position:absolute; top:100%; right:0; z-index:10; width:220px; padding:12px;
  color:var(--touchline-ink); background:var(--touchline-panel); border:1px solid var(--touchline-rule);
}
.reader-appearance .rt-theme { display:grid; gap:6px; }
.reader-appearance select { min-height:44px; color:var(--touchline-ink); background:var(--touchline-panel); }
@media (max-width:750px) {
  .club-team-label { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
}

@media (min-width:1000px) {
  .touchline-reader .touchline-reader-actions .coyg-global-saved,
  .red-thread-app .masthead-right .coyg-global-saved { display:inline-flex; align-items:center; width:auto; min-width:44px; gap:6px; padding-inline:8px; white-space:nowrap; }
  .touchline-reader-actions .masthead-more, .red-thread-app .masthead-right .masthead-more { flex:none; }
}

.touchline-reader :is(.career-comparison-form, .league-comparison-form) {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.touchline-reader .career-comparison-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.career-comparison-form input { width: 100%; }
.league-comparison .analysis-table {
  display: table;
  width: 100%;
  margin-inline: 0;
  white-space: normal;
}
.league-comparison .analysis-table tbody a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
@media (max-width: 560px) {
  .touchline-reader :is(.career-comparison-form, .league-comparison-form) { grid-template-columns: minmax(0, 1fr); }
  .league-comparison .analysis-table :is(th, td) { padding-inline-end: .25rem; }
  .league-comparison .analysis-table th { letter-spacing: 0; overflow-wrap: anywhere; }
}
