:root {
	/* brand tokens from the logo kit */
	--pc-ink: #16181D; --pc-paper: #F4F2EE; --pc-accent: #1F7A5A; --pc-accent-dark: #3FB58A;
	/* page background: clean white (chosen 2026-11-01); header, panels and cards sit on --surface */
	--bg: #FFFFFF; --surface: #FAFAF8; --card: #fff; --ink: var(--pc-ink); --muted: #6b6b66; --line: #e8e8e3;
	--soft: #3a3a37; --border: #c9c9c3; --hit: #e9efe9;
	--accent: var(--pc-accent); --accent-ink: #fff; --accent-soft: #e6f1ec; --danger: #a33; --ok-bg: #e6f3ea; --err-bg: #f8e4e4;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.45 Sora, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--accent); }
main { max-width: 1100px; margin: 0 auto; padding: 16px; }
h1 { font-size: 1.6rem; margin: .4rem 0 .6rem; }
h2 { font-size: 1.15rem; margin: 1.2rem 0 .6rem; }
h3 { font-size: 1rem; margin: .4rem 0; }
.muted { color: var(--muted); font-weight: normal; }
code { background: #eee; padding: 0 4px; border-radius: 3px; }

header.top { background: var(--surface); border-bottom: 1px solid var(--line); }
header.top .bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1120px; height: 60px; margin: 0 auto; padding: 0 24px; }
header.top .brand { display: inline-flex; align-items: center; line-height: 0; }
header.top .brand img { height: 34px; width: auto; }
.card.narrow .logo { display: block; margin: 0 auto 14px; height: 96px; width: auto; }
header.top nav { display: flex; align-items: center; gap: 22px; font-size: .92rem; white-space: nowrap; }
header.top nav a { color: var(--ink); text-decoration: none; }
header.top nav a:hover { color: var(--accent); }
header.top nav a.btn.primary { color: var(--accent-ink); padding: 7px 14px; font-weight: 600; font-size: .88rem; border-radius: 7px; }
header.top nav a.btn.primary:hover { background: #18654a; border-color: #18654a; }
header.top .only-m { display: none; }
footer.bottom { max-width: 1120px; margin: 30px auto; padding: 0 24px; color: var(--muted); font-size: .85rem; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; margin: 14px 0; }
.card.narrow { max-width: 420px; margin: 40px auto; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }

/* ---- home page (body.home): full-bleed bands, each band centres its own content in .wrap ---- */
body.home { font-size: 17px; line-height: 1.5; }
body.home main { max-width: none; padding: 0; }
body.home main > .flash { max-width: 1072px; margin: 12px auto; }
.home .wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.home .num { font-variant-numeric: tabular-nums; }
.home .btn { font-weight: 600; border-radius: 7px; padding: 12px 22px; }
.home .btn.primary:hover { background: #18654a; border-color: #18654a; }
.home .btn.ghost { color: var(--ink); border-color: var(--border); background: var(--surface); }

.home .hero { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: center; padding-top: 72px; padding-bottom: 64px; }
.home .eyebrow { display: inline-flex; gap: 10px; align-items: center; font-size: .82rem; font-weight: 600; letter-spacing: .02em; color: var(--accent); background: var(--accent-soft); padding: 6px 12px; border-radius: 20px; margin-bottom: 22px; }
.home .eyebrow i { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); opacity: .5; }
.home .hero h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); line-height: 1.03; letter-spacing: -0.035em; margin: 0 0 22px; }
.home .hero .sub { font-size: 1.12rem; color: var(--soft); max-width: 46ch; margin: 0 0 30px; }
.home .cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 0; }
.home .cta-note { margin: 16px 0 0; font-size: .85rem; color: var(--muted); }

/* hero figure: the board list with a phone card over its corner */
.home .figure { position: relative; margin: 0; padding: 0 0 40px 28px; }
.home .figure::before { content: ""; position: absolute; inset: -30px -40px 0 -10px; z-index: 0; opacity: .045;   /* faint board pattern */
	background: conic-gradient(var(--ink) 25%, transparent 0 50%, var(--ink) 0 75%, transparent 0) 0 0 / 56px 56px;
	-webkit-mask: radial-gradient(closest-side, #000 55%, transparent); mask: radial-gradient(closest-side, #000 55%, transparent); }
.home .sheet { position: relative; z-index: 1; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px 10px; box-shadow: 0 18px 40px -22px rgba(22,24,29,.35); font-size: .9rem; }
.home .sheet .cap { display: flex; justify-content: space-between; font-weight: 600; padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.home .sheet .cap span:last-child { color: var(--muted); font-weight: 400; }
.home .sheet ol { list-style: none; margin: 0; padding: 0; }
.home .sheet li { display: grid; grid-template-columns: 1.4em minmax(0,1fr) 52px minmax(0,1fr); gap: 8px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.home .sheet li:last-child { border-bottom: 0; }
.home .sheet .bd { color: var(--muted); }
.home .sheet .w, .home .sheet .b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home .sheet .b { text-align: right; }
.home .sheet em { font-style: normal; color: var(--muted); margin-left: 4px; }
.home .sheet .res { justify-self: center; font-weight: 600; font-size: .82rem; min-width: 46px; text-align: center; padding: 3px 0; border-radius: 4px; background: var(--accent-soft); color: var(--accent); opacity: 0; animation: pc-fill .4s ease-out forwards; }
.home .sheet .res.pending { background: none; }
.home .sheet .res.pending::before { content: ""; display: block; height: 6px; width: 22px; margin: 0 auto; border-radius: 3px; background: var(--accent); }   /* the link bar from the logo */
.home .sheet .bye .res { background: none; color: var(--muted); font-weight: 400; }
.home .sheet li:nth-child(1) .res { animation-delay: .3s; }
.home .sheet li:nth-child(2) .res { animation-delay: .42s; }
.home .sheet li:nth-child(3) .res { animation-delay: .54s; }
.home .sheet li:nth-child(4) .res { animation-delay: .66s; }
.home .sheet li:nth-child(5) .res { animation-delay: .78s; }
@keyframes pc-fill { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.home .phone { position: absolute; z-index: 2; left: -8px; bottom: 0; width: 214px; background: var(--pc-ink); border-radius: 22px; padding: 8px; box-shadow: 0 20px 40px -16px rgba(22,24,29,.5); }
.home .phone .screen { background: var(--surface); border-radius: 15px; padding: 12px 12px 14px; font-size: .74rem; }
.home .phone .screen b { display: block; font-size: .7rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.home .phone .pair { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 9px; }
.home .phone .btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.home .phone .btns span { text-align: center; padding: 7px 0; border: 1px solid var(--border); border-radius: 5px; font-weight: 600; }
.home .phone .btns span.on { background: var(--accent); border-color: var(--accent); color: #fff; }

.home .trust { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.home .trust ul { list-style: none; margin: 0 auto; padding: 18px 24px; max-width: 1120px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; font-size: .92rem; color: var(--soft); }
.home .trust li { display: flex; align-items: center; gap: 12px; }
.home .trust svg { flex: none; }

.home .band { padding-top: 96px; }
.home .band h2 { font-size: clamp(1.6rem, 3vw, 2.15rem); letter-spacing: -0.025em; line-height: 1.1; margin: 0 0 12px; }
.home .band .lede { color: var(--soft); max-width: 52ch; margin: 0 0 40px; }

/* how it works: numbered steps joined by the green link bar */
.home .steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 22px; }
.home .steps > li { position: relative; }
.home .steps .n { position: relative; display: flex; align-items: center; margin-bottom: 16px; }
.home .steps .n span { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 700; font-size: .9rem; display: grid; place-items: center; }
.home .steps > li:not(:last-child) .n::after { content: ""; position: absolute; left: 44px; right: -12px; height: 6px; border-radius: 3px; background: var(--accent); }
.home .steps h3 { font-size: 1.05rem; margin: 0 0 4px; }
.home .steps p { margin: 0 0 16px; color: var(--soft); font-size: .92rem; }
.home .frag { background: var(--surface); border: 1px solid var(--line); border-radius: 7px; padding: 12px; font-size: .78rem; }
.home .frag .row { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.home .frag .row:last-child { border-bottom: 0; }
.home .frag .lbl { color: var(--muted); }
.home .frag .input { border: 1px solid var(--border); border-radius: 5px; padding: 6px 8px; margin-bottom: 4px; background: #fff; }
.home .frag .input::after { content: "|"; color: var(--accent); margin-left: 1px; }
.home .frag .hit { display: flex; justify-content: space-between; padding: 6px 8px; background: var(--hit); border-radius: 4px; }
.home .frag .hit span:last-child { color: var(--muted); }
.home .frag .bar { width: 18px; height: 5px; border-radius: 3px; background: var(--accent); align-self: center; }
.home .frag .pts { font-weight: 700; }

.home .features { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.home .feature { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 24px 24px 22px; }
.home .feature .ic { width: 36px; height: 36px; border-radius: 8px; background: var(--accent-soft); display: grid; place-items: center; margin-bottom: 14px; }
.home .feature h3 { font-size: 1.02rem; margin: 0 0 6px; }
.home .feature p { margin: 0; color: var(--soft); font-size: .92rem; }

/* happening now: public tournaments */
.home .tlist { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.home .tlist a { display: grid; grid-template-columns: 14px minmax(0,2fr) minmax(0,1fr) minmax(0,1.6fr) 80px; gap: 16px; align-items: center; padding: 15px 20px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: .95rem; }
.home .tlist li:last-child a { border-bottom: 0; }
.home .tlist a:hover .name, .home .tlist a:focus-visible .name { text-decoration: underline; }
.home .tlist .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.home .tlist .live .dot { background: var(--accent); box-shadow: 0 0 0 0 rgba(31,122,90,.5); animation: pc-pulse 2s infinite; }
@keyframes pc-pulse { 70% { box-shadow: 0 0 0 7px rgba(31,122,90,0); } 100% { box-shadow: 0 0 0 0 rgba(31,122,90,0); } }
.home .tlist .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home .tlist .meta { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home .tlist .state { text-align: right; font-size: .85rem; color: var(--muted); }
.home .tlist .live .state { color: var(--accent); font-weight: 600; }

/* faq: native details/summary */
.home .faq { display: grid; grid-template-columns: minmax(0,4fr) minmax(0,7fr); gap: 56px; }
.home .faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.home .faq details:first-child { border-top: 1px solid var(--line); }
.home .faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.home .faq summary::-webkit-details-marker { display: none; }
.home .faq summary::after { content: "+"; color: var(--accent); font-weight: 400; font-size: 1.3rem; line-height: 1; }
.home .faq details[open] summary::after { content: "\2013"; }
.home .faq details p { margin: 10px 0 0; color: var(--soft); font-size: .95rem; max-width: 60ch; }

.home .closing { margin-top: 96px; background: var(--pc-ink); color: #fff; }
.home .closing .wrap { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding-top: 64px; padding-bottom: 64px; }
.home .closing .wrap > div { flex: 1; }
.home .closing h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); letter-spacing: -0.03em; line-height: 1.08; margin: 0; }
.home .closing .link { display: inline-block; width: 46px; height: 8px; border-radius: 4px; background: var(--accent); margin-bottom: 18px; }
.home .closing .btn.primary { background: var(--pc-accent-dark); border-color: var(--pc-accent-dark); color: var(--pc-ink); }
.home .closing .btn.primary:hover { background: #57c79c; border-color: #57c79c; }

@media (prefers-reduced-motion: reduce) {
	.home .sheet .res { animation: none; opacity: 1; }
	.home .tlist .live .dot { animation: none; }
}

@media (max-width: 860px) {
	header.top .bar { padding: 0 16px; }
	header.top nav { gap: 14px; }
	header.top .hide-m { display: none; }
	header.top .only-m { display: inline; }
	header.top .brand img { height: 30px; }
	footer.bottom { padding: 0 16px; }
	body.home { font-size: 16px; }
	.home .wrap { padding: 0 16px; }
	.home .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 40px; padding-bottom: 40px; }
	.home .figure { padding-left: 18px; }
	.home .figure::before { inset: -20px 0 0 0; }
	.home .sheet { font-size: .8rem; padding: 14px 14px 8px; }
	.home .sheet li { grid-template-columns: 1.2em minmax(0,1fr) 42px minmax(0,1fr); gap: 6px; }
	.home .sheet .res { min-width: 40px; font-size: .74rem; }
	.home .phone { width: 180px; }
	.home .trust ul { grid-template-columns: 1fr; gap: 12px; padding: 18px 16px; }
	.home .band { padding-top: 64px; }
	.home .steps { grid-template-columns: 1fr; gap: 0; }
	.home .steps > li { padding: 0 0 28px 50px; }
	.home .steps .n { position: absolute; left: 0; top: 0; margin: 0; }
	.home .steps > li:not(:last-child)::before { content: ""; position: absolute; left: 14px; top: 42px; bottom: 6px; width: 6px; border-radius: 3px; background: var(--accent); }
	.home .steps > li:not(:last-child) .n::after { display: none; }
	.home .steps h3 { padding-top: 5px; }
	.home .features { grid-template-columns: 1fr; }
	.home .tlist a { grid-template-columns: 12px minmax(0,1fr) auto; padding: 14px 16px; }
	.home .tlist .city { display: none; }
	.home .tlist .rnd { grid-column: 2; font-size: .85rem; }
	.home .faq { grid-template-columns: 1fr; gap: 8px; }
	.home .closing { margin-top: 64px; }
	.home .closing .wrap { flex-direction: column; align-items: flex-start; padding-top: 48px; padding-bottom: 48px; }
}

.flash { padding: 10px 14px; border-radius: 6px; margin: 10px 0; }
.flash.ok { background: var(--ok-bg); }
.flash.err { background: var(--err-bg); color: var(--danger); }

form label { display: block; margin: 8px 0; }
form label input, form label select { display: block; width: 100%; margin-top: 3px; }
form label.check { display: flex; align-items: center; gap: 8px; }
form label.check input { display: inline-block; width: auto; margin: 0; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], select, textarea {
	font: inherit; padding: 7px 9px; border: 1px solid #c9c9c3; border-radius: 5px; background: #fff; width: 100%;
}
textarea { font-family: ui-monospace, Consolas, monospace; font-size: .9rem; }
form.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 14px; align-items: end; }
form.grid > div { margin: 8px 0; }
form.inline { display: inline; }

.btn, button { font: inherit; padding: 7px 13px; border: 1px solid #c9c9c3; border-radius: 6px; background: #fff; color: var(--ink); cursor: pointer; text-decoration: none; display: inline-block; }
.btn.primary, button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger, button.danger { color: var(--danger); border-color: var(--danger); }
.btn.current { background: #e6f1ec; border-color: var(--accent); }
.hero h1 { color: var(--pc-ink); }
button:disabled { opacity: .5; cursor: default; }
button.small { padding: 2px 8px; font-size: .85rem; }
button.chip { padding: 1px 7px; font-size: .8rem; border-radius: 12px; margin-right: 4px; }
.btn small { color: var(--muted); font-size: .75rem; margin-left: 4px; }
.rounds { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }

table.list { width: 100%; border-collapse: collapse; background: var(--card); }
table.list th, table.list td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.list th { font-weight: 600; color: var(--muted); font-size: .85rem; }
table.list tr.withdrawn td { color: var(--muted); text-decoration: line-through; }
table.list td.actions { white-space: nowrap; text-align: right; }
table.players select { width: auto; display: inline-block; padding: 2px 4px; font-size: .85rem; }
table.standings td.rnd, table.standings th.rnd { font-size: .8rem; color: var(--muted); text-align: center; padding: 7px 4px; }
table td.pts { font-weight: 600; text-align: center; }

td.result { white-space: nowrap; }
label.res { display: inline-block; margin: 0 2px 0 0; }
label.res input { position: absolute; opacity: 0; width: 0; height: 0; }
label.res span { display: inline-block; min-width: 40px; text-align: center; padding: 6px 6px; border: 1px solid #c9c9c3; border-radius: 5px; cursor: pointer; user-select: none; }
label.res input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
label.res.clear span { min-width: 28px; color: var(--muted); }

/* "i" info popups on table headers: hover, keyboard focus or tap */
.info { display: inline-block; position: relative; width: 15px; height: 15px; margin-left: 5px; border: 1px solid #b5b5af; border-radius: 50%; color: var(--muted); font: 600 10px/13px system-ui, sans-serif; text-align: center; cursor: help; vertical-align: 1px; outline: none; }
.info:hover, .info:focus { border-color: var(--accent); color: var(--accent); }
.info::after { content: attr(data-tip); display: none; position: absolute; left: 0; top: 150%; width: 260px; padding: 8px 10px; background: #2b2b28; color: #fff; border-radius: 6px; box-shadow: 0 6px 18px rgba(0,0,0,.2); font: 400 .8rem/1.4 system-ui, sans-serif; text-align: left; white-space: pre-line; z-index: 30; }
.info.right::after { left: auto; right: 0; }
.info:hover::after, .info:focus::after { display: block; }
table.list th.actions { text-align: right; }

.suggest-anchor { position: relative; }
ul.suggest { position: absolute; left: 0; min-width: 100%; width: max-content; max-width: min(420px, 90vw); top: 100%; z-index: 20; margin: 2px 0 0; padding: 0; list-style: none; background: #fff; border: 1px solid #c9c9c3; border-radius: 6px; box-shadow: 0 6px 18px rgba(0,0,0,.12); max-height: 320px; overflow-y: auto; }
ul.suggest li { padding: 7px 10px; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; font-weight: normal; }
ul.suggest li .n { white-space: nowrap; }
ul.suggest li .m { color: var(--muted); font-size: .85rem; text-align: right; }
ul.suggest li:hover, ul.suggest li.active { background: #e9efe9; }
ul.suggest li.status { color: var(--muted); cursor: default; font-style: italic; }
ul.suggest li.status:hover { background: none; }

@media (max-width: 700px) {
	table.list th, table.list td { padding: 6px 5px; }
	table.boards td { display: block; border-bottom: none; }
	table.boards tr { display: block; border-bottom: 1px solid var(--line); padding: 6px 0; }
	table.boards thead { display: none; }
	.info::after { width: min(260px, 80vw); }
	td.result { white-space: normal; }
}
