/* Layout idea: a league-table page. Navy ink on white, scoreboard yellow for the one action, square ruled tables, no cards or shadows. */
:root {
  color-scheme: light;
  --ink: #0d1736;
  --paper: #ffffff;
  --wash: #eef1f6;
  --card: #ffffff;
  --line: #c9d0de;
  --muted: #4c5775;
  --hi: #ffd60a;
  --accent: #0d1736;
  --good: #13754f;
  --warn: #a85f00;
  --bad: #b93127;
  --rail: #0d1736;
  --rail-text: #c9d2ea;
  --display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --body: "Public Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.55; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.02; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.8rem, 7vw, 5.2rem); max-width: 15ch; }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.5rem; }
p { margin: 0; }
a { color: var(--ink); text-underline-offset: 3px; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #1e4fe0; outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
[hidden] { display: none !important; }

.top { background: var(--paper); border-bottom: 2px solid var(--ink); position: sticky; top: 0; z-index: 20; }
.top .wrap { display: flex; align-items: center; gap: 16px; min-height: 56px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-family: var(--display); font-weight: 700; font-size: 1.3rem; }
.brand-mark { display: grid; place-items: center; min-width: 30px; padding: 0 6px; height: 30px; background: var(--ink); color: var(--hi); font-size: 1rem; }
.top nav { display: flex; gap: 2px; margin-left: auto; flex-wrap: wrap; align-items: center; }
.top nav a { text-decoration: none; padding: 7px 11px; font-weight: 500; font-size: 0.93rem; }
.top nav a:hover { text-decoration: underline; }
.top nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--hi); }
.btn { display: inline-block; background: var(--hi); color: var(--ink); border: 2px solid var(--ink); border-radius: 3px; padding: 11px 20px; font-weight: 700; text-decoration: none; cursor: pointer; text-align: center; }
.btn:hover { background: var(--ink); color: var(--hi); }
.btn.quiet { background: var(--paper); }
.btn.quiet:hover { background: var(--ink); color: #fff; }
.top nav a.btn { padding: 6px 14px; }
.free-word { color: var(--good); font-weight: 700; }

/* Landing */
.hero { padding: 44px 0 0; }
h1.hook { max-width: none; white-space: nowrap; font-weight: 800; font-size: clamp(2rem, 10.2vw, 7.4rem); padding-top: 0.72em; word-spacing: 0.12em; }
.struck { position: relative; display: inline-block; color: rgba(13, 23, 54, 0.38); margin-right: 0.06em; }
.struck svg.cut { position: absolute; left: -9%; top: 8%; width: 118%; height: 92%; overflow: visible; }
.struck svg.cut path { fill: none; stroke: var(--ink); stroke-width: 13; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.scrawl { position: absolute; left: -0.1em; top: -0.8em; font-family: "Knewave", "Marker Felt", "Segoe Print", cursive; font-weight: 400; font-size: 0.92em; color: var(--ink); transform: rotate(-6deg); line-height: 1; word-spacing: 0; padding: 0.02em 0.16em 0.06em; z-index: 1; white-space: nowrap; }
.scrawl::before { content: ""; position: absolute; inset: 16% -4% 6% -4%; background: var(--hi); z-index: -1; transform: skewX(-9deg) rotate(1.2deg); border-radius: 3px 9px 4px 8px; filter: url(#rough); }
@media (max-width: 700px) { .struck svg.cut path { stroke-width: 7; } }
.video-slot { margin-top: 28px; aspect-ratio: 16 / 9; max-height: 560px; width: 100%; background: var(--ink); color: #fff; display: grid; place-items: center; text-align: center; padding: 24px; }
.video-slot .play { width: 74px; height: 74px; border-radius: 50%; background: var(--hi); display: grid; place-items: center; margin: 0 auto 14px; }
.video-slot .play::after { content: ""; border-left: 22px solid var(--ink); border-top: 14px solid transparent; border-bottom: 14px solid transparent; margin-left: 6px; }
.video-slot small { display: block; color: var(--rail-text); font-size: 0.9rem; margin-top: 6px; }

.block { padding: 56px 0 0; }
.block:last-of-type { padding-bottom: 56px; }
.block .intro { color: var(--muted); max-width: 40rem; margin-top: 10px; }

.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 26px; border: 2px solid var(--ink); }
.plan { padding: 20px; display: flex; flex-direction: column; gap: 10px; border-right: 1px solid var(--line); position: relative; }
.plan:last-child { border-right: 0; }
.plan.pick { background: #fffbe0; box-shadow: inset 0 6px 0 var(--hi); }
.plan .flag { font-size: 0.82rem; font-weight: 700; color: var(--good); }
.plan .price { font-family: var(--display); font-size: 3rem; font-weight: 700; line-height: 1; }
.plan .price small { display: block; margin-top: 4px; font-family: var(--body); font-size: 0.88rem; font-weight: 500; color: var(--muted); }
.plan .sub { font-size: 0.93rem; min-height: 2.9em; }
.plan ul { margin: 0; padding: 12px 0 0; list-style: none; display: flex; flex-direction: column; gap: 7px; font-size: 0.93rem; flex: 1; border-top: 1px solid var(--line); }
.plan li { padding-left: 16px; position: relative; }
.plan li::before { content: "+"; position: absolute; left: 0; font-weight: 700; color: var(--good); }
.plan .btn { width: 100%; margin-top: 6px; }
.plan .fine { font-size: 0.8rem; color: var(--muted); }
.pay-msg { margin-top: 14px; padding: 10px 14px; background: #fffbe0; border-left: 5px solid var(--hi); font-size: 0.93rem; }

.sheet { margin-top: 24px; border: 2px solid var(--ink); overflow-x: auto; }
.sheet table.grid th { background: var(--ink); color: #fff; }
.sheet tr.best td { background: #fffbe0; font-weight: 600; }
.sheet-foot { font-size: 0.88rem; color: var(--muted); margin-top: 10px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.gets { margin-top: 20px; border-top: 2px solid var(--ink); }
.get { display: grid; grid-template-columns: 240px minmax(0, 1fr) auto; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.get h3 small { display: block; font-family: var(--body); font-size: 0.8rem; font-weight: 700; margin-top: 4px; color: var(--muted); }
.get h3 small.free-word { color: var(--good); }
.get p { color: var(--muted); max-width: 38rem; }
.get a { font-weight: 600; white-space: nowrap; }

.who-text { max-width: 40rem; }
.who-text p { margin-top: 14px; }

.compare-wrap { overflow-x: auto; margin-top: 22px; border: 1px solid var(--line); }
table.compare { border-collapse: collapse; width: 100%; min-width: 600px; font-size: 0.93rem; }
table.compare th, table.compare td { padding: 10px 14px; text-align: center; border-bottom: 1px solid var(--line); }
table.compare th:first-child, table.compare td:first-child { text-align: left; }
table.compare thead th { font-weight: 700; background: var(--wash); }
table.compare tr:last-child td { border-bottom: 0; }
.yes { color: var(--good); font-weight: 700; }
.no { color: #9aa3ba; }

.faq { margin-top: 16px; max-width: 44rem; border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin-top: 8px; color: var(--muted); }
footer { margin-top: 56px; padding: 22px 0 40px; border-top: 2px solid var(--ink); color: var(--muted); font-size: 0.86rem; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Tool pages */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: calc(100vh - 58px); }
.rail { background: var(--rail); color: var(--rail-text); padding: 20px 12px; }
.rail h4 { margin: 18px 10px 6px; font-size: 0.78rem; font-weight: 600; color: #8e9bc0; font-family: var(--body); }
.rail h4:first-child { margin-top: 0; }
.rail a, .rail button.linkish { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; text-align: left; background: none; border: 0; color: var(--rail-text); text-decoration: none; padding: 9px 10px; border-radius: 3px; font-size: 0.95rem; cursor: pointer; }
.rail a:hover, .rail button.linkish:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.rail a[aria-current="page"] { background: var(--hi); color: var(--ink); font-weight: 700; }
.rail .tag-x { margin-left: 0; }
.rail .dim { opacity: 0.55; cursor: default; }
.sorare-box { margin: 20px 4px 0; padding: 14px; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 0; font-size: 0.88rem; }
.sorare-box .btn { width: 100%; margin-top: 10px; padding: 8px 12px; font-size: 0.9rem; }
.main { padding: 26px 24px 60px; min-width: 0; background: var(--wash); }
.main-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.main-head p { color: var(--muted); margin-top: 6px; max-width: 44rem; }
.stamp { font-size: 0.85rem; color: var(--muted); background: var(--card); border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; white-space: nowrap; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 14px; align-items: flex-end; }
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.filters select, .filters input[type="search"], .filters input[type="number"] { background: var(--card); border: 1px solid var(--line); border-radius: 3px; padding: 8px 10px; min-width: 130px; font-weight: 400; color: var(--ink); }
.filters input[type="number"] { min-width: 0; width: 110px; }
.chk { flex-direction: row !important; align-items: center; gap: 8px !important; padding: 8px 0; font-size: 0.9rem !important; font-weight: 500 !important; color: var(--ink) !important; }
.seg { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.seg button { border: 0; background: none; padding: 8px 14px; cursor: pointer; font-size: 0.9rem; border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--hi); font-weight: 700; }
.count { margin-left: auto; font-size: 0.9rem; color: var(--muted); padding: 8px 0; }

.grid-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 0; position: relative; }
table.grid { border-collapse: collapse; width: 100%; font-size: 0.93rem; }
table.grid th { position: sticky; top: 0; background: var(--wash); text-align: right; padding: 10px 12px; font-size: 0.8rem; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; }
table.grid th.l, table.grid td.l { text-align: left; }
table.grid th button { all: unset; cursor: pointer; }
table.grid th button:focus-visible { outline: 3px solid var(--gold); }
table.grid th[aria-sort] button::after { content: " \25BE"; color: var(--accent); }
table.grid th[aria-sort="ascending"] button::after { content: " \25B4"; }
table.grid td { padding: 9px 12px; text-align: right; border-bottom: 1px solid #e8ecf5; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.grid tbody tr:last-child td { border-bottom: 0; }
table.grid tbody tr:hover td { background: #f7f9fd; }
.rank { color: var(--muted); width: 1%; }
.who { display: flex; flex-direction: column; line-height: 1.25; }
.who b { font-weight: 600; }
.who span { font-size: 0.8rem; color: var(--muted); }
.pos { display: inline-block; min-width: 38px; text-align: center; font-size: 0.74rem; font-weight: 700; padding: 2px 6px; border-radius: 4px; background: #e9edf7; color: var(--ink); }
.pos.GK { background: #fde9c4; } .pos.DEF { background: #d9e6ff; } .pos.MID { background: #dcf1e6; } .pos.FWD { background: #fbdcd8; }
.ring { --v: 50; --c: var(--accent); display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: conic-gradient(var(--c) calc(var(--v) * 1%), #e4e8f2 0); position: relative; font-weight: 700; font-size: 0.86rem; }
.ring::before { content: ""; position: absolute; inset: 5px; background: var(--card); border-radius: 50%; }
.ring span { position: relative; }
.bar { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; }
.bar i { display: block; width: 64px; height: 7px; background: #e4e8f2; border-radius: 4px; overflow: hidden; }
.bar i b { display: block; height: 100%; background: var(--accent); }
.chip { display: inline-block; font-size: 0.76rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #eceef4; color: var(--muted); }
.chip.bad { background: #fbe1de; color: var(--bad); }
.chip.warn { background: #fdeccd; color: var(--warn); }
.stars { color: var(--gold); letter-spacing: 1px; font-size: 0.8rem; }
tr.locked td { filter: blur(5px); user-select: none; pointer-events: none; }
.gate { position: sticky; bottom: 0; left: 0; right: 0; background: linear-gradient(to top, #fff 62%, rgba(255, 255, 255, 0)); padding: 70px 20px 24px; text-align: center; margin-top: -190px; z-index: 5; }
.gate h3 { font-size: 1.7rem; }
.gate p { color: var(--muted); margin: 8px auto 16px; max-width: 32rem; }
.more { display: flex; justify-content: center; padding: 14px; border-top: 1px solid var(--line); }
.preview-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #fff6df; border: 1px solid #f0d58a; border-radius: 0; padding: 10px 14px; font-size: 0.9rem; margin-top: 16px; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }

@media (max-width: 900px) {
    .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .get { grid-template-columns: 1fr; gap: 6px; }
  .plan:nth-child(2) { border-right: 0; }
  .plan:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .app { grid-template-columns: 1fr; }
  .rail { display: flex; flex-wrap: wrap; gap: 4px; padding: 10px; align-items: center; }
  .rail h4, .sorare-box { display: none; }
  .rail a, .rail button.linkish { width: auto; }
  .main { padding: 20px 16px 48px; }
}
@media (max-width: 520px) {
  .plans { grid-template-columns: 1fr; }
  .plan { border-right: 0; border-bottom: 1px solid var(--line); }
  .plan:last-child { border-bottom: 0; }
  .top nav a:not(.btn) { padding: 8px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

#hero-table th, #hero-table td { padding-left: 10px; padding-right: 10px; }

.rail .soon { font-size: 0.75rem; opacity: 0.8; }
.ring { --c: var(--ink); }
.ring.good { --c: var(--good); }

.hidden-name { filter: blur(6px); user-select: none; }
.edit-link { background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; cursor: pointer; font-size: inherit; }
body.editing [contenteditable] { outline: 1.5px dashed #1e4fe0; outline-offset: 3px; cursor: text; }
body.editing [contenteditable]:focus { outline: 2.5px solid #1e4fe0; background: #f1f5ff; }
body.editing { padding-bottom: 150px; }
.edit-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--ink); color: #fff; padding: 12px 20px; display: flex; gap: 12px 20px; flex-wrap: wrap; align-items: center; justify-content: space-between; font-size: 0.93rem; }
.edit-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.edit-bar .btn { padding: 7px 14px; }
.edit-bar textarea { width: 100%; height: 90px; font: 0.85rem/1.4 var(--body); padding: 8px; border: 0; }

.legend { font-size: 0.85rem; color: var(--muted); margin: 0 0 12px; max-width: 60rem; }
.est { font-size: 0.72rem; color: var(--muted); font-weight: 600; }
.dim-cell { color: #9aa3ba; }

/* ---------- Account and login */
#view-account { background: var(--wash); min-height: 70vh; padding: 56px 0; }
.account-box { background: var(--paper); border: 2px solid var(--ink); max-width: 28rem; margin: 0 auto; padding: 28px 24px; }
.account-box h2 { margin: 0 0 8px; }
.account-box p { color: var(--muted); margin: 0 0 18px; }
.account-box label { display: block; font-weight: 600; margin-bottom: 6px; }
.account-box input[type="email"] { width: 100%; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 3px; padding: 11px 12px; margin-bottom: 14px; }
.account-box form .btn { width: 100%; }
.account-box .form-msg { margin: 16px 0 0; color: var(--ink); font-weight: 600; }
.account-box .form-msg.bad { color: var(--bad); }
.account-box dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 16px 0 22px; }
.account-box dt { color: var(--muted); }
.account-box dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.account-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.account-box #acct-msg { margin: 0 0 18px; }
