/* The IGF look, with values taken from the WordPress site's styles. */
@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/inter-latin.8e433c0592f7.woff2") format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/inter-latin-ext.ad4eb06671be.woff2") format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/inter-cyrillic.06ab411342ac.woff2") format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root {
  --orange: #ea652d;
  --orange-deep: #c94f1c;  /* white text on it stays readable at small sizes */
  --heading: #2f353b;
  --text: #343434;
  --muted: #8a8a8a;
  --line: #dfdfdf;
  --grey: #f3f3f3;
  --stripe: #f9fafb;
  /* Every page uses the same side margin: it grows with the window, and content stops at its maximum width */
  --gutter: clamp(16px, 4vw, 30px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
body { margin: 0; background: #fff; color: var(--text); font: 400 16px/1.75 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1 0 auto; }
img { max-width: 100%; height: auto; }
a { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, h5, h6 { color: var(--heading); font-weight: 600; line-height: 1.25; margin: 1.5em 0 0.6em; }
h2 { font-size: 28px; }
h3 { font-size: 22px; }
h4 { font-size: 19px; }
h5, h6 { font-size: 16px; }
p { margin: 0 0 1.25em; }
.container { width: min(100% - 2 * var(--gutter), 1140px); margin-inline: auto; }

/* Header and menu */
.site-header { position: relative; z-index: 20; background: #fff; border-bottom: 1px solid rgb(0 0 0 / 10%); padding: 20px var(--gutter) 18px; }
.header-inner { display: flex; align-items: center; justify-content: space-between; max-width: 1012px; margin: 0 auto; padding-right: clamp(0px, 100vw - 1092px, 40px); }
.logo img { display: block; width: 200px; }
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav > ul { display: flex; gap: 30px; }
.main-nav li { position: relative; line-height: 1.5; }
.main-nav a, .main-nav span { display: block; padding: 6px 0; color: var(--heading); cursor: pointer; }
.main-nav a:hover, .main-nav span:hover, .main-nav .active > a, .main-nav .active > span { color: var(--orange); text-decoration: none; }
.has-sub > span::after { content: ''; display: inline-block; width: 5px; height: 5px; margin: 0 2px 3px 11px; border: solid currentcolor; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.has-sub > ul { display: none; position: absolute; left: -16px; top: 100%; min-width: 250px; padding: 10px 16px; background: #fff; box-shadow: 0 8px 24px rgb(0 0 0 / 12%); }
.has-sub:hover > ul, .has-sub:focus-within > ul { display: block; }
/* In a narrower window the last two dropdowns open leftward, to stay inside the window */
@media (max-width: 1300px) {
  .main-nav > ul > li:nth-last-child(-n+2) > ul { left: auto; right: -16px; }
}
.nav-toggle { position: absolute; opacity: 0; width: 44px; height: 44px; margin: 0; right: var(--gutter); top: 16px; cursor: pointer; }
.nav-button { display: none; }

/* Sections */
/* The banner: photo, shade, board and heading in layers */
.hero { position: relative; height: clamp(240px, 39.45vw, 620px); overflow: hidden; background: #2d3e54; }
.hero > img, .hero > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero > img { object-fit: cover; object-position: top center; }
/* Frosted glass: the blur also hides the lettering in today's photo. Browsers without it get the solid colour. */
.hero-band { position: absolute; left: 0; right: 0; bottom: 0; height: 35%; background: #2d3e54; }
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .hero-band { background: rgb(45 62 84 / 60%); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); }
}
.hero-lines { stroke: rgb(255 255 255 / 85%); stroke-width: 1.5; fill: none; }
.hero-placed circle { animation: stone-placed 0.45s ease-out backwards; }
@keyframes stone-placed { from { opacity: 0; } }
.hero-text { position: absolute; left: 0; right: 0; bottom: 0; height: 35%; display: flex; align-items: center; pointer-events: none; }
.hero-text h1 { margin: 0; color: #fff; font-size: clamp(21px, 3.9vw, 50px); font-weight: 600; line-height: 1.18; letter-spacing: 0.01em; }
.band { padding: 60px 0; }
.band-grey {
  padding: 70px 0 80px; background-color: var(--grey);
  background-image: linear-gradient(rgb(0 0 0 / 3.5%) 1px, transparent 1px), linear-gradient(90deg, rgb(0 0 0 / 3.5%) 1px, transparent 1px);
  background-size: 44px 44px;
}
.band-orange { background: var(--orange); padding: 50px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 25px; }
.section-head h2 { margin: 0; }
.section-head > a { padding: 8px 20px; border-radius: 3px; background: var(--orange-deep); color: #fff; font-size: 15px; font-weight: 600; transition: background 0.2s; }
.section-head > a:hover { background: var(--heading); text-decoration: none; }
/* A black and a white stone before a heading */
.stones::before {
  content: ''; display: inline-block; width: 32px; height: 19px; margin-right: 12px; vertical-align: -2px;
  background: url("stones.737bc9168cac.svg") center / contain no-repeat;
}

/* The strip of figures under the banner */
.home-figures { padding: 26px 0; background: var(--heading); color: #fff; text-align: center; }
.home-figures .container { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home-figures .container div + div { border-left: 1px solid rgb(255 255 255 / 18%); }
.home-figures b { display: block; color: var(--orange); font-size: clamp(30px, 5vw, 44px); font-weight: 700; line-height: 1.15; }
.home-figures span { display: block; padding-inline: 10px; font-size: 15px; line-height: 1.35; }

/* News cards */
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.news-card { position: relative; display: block; aspect-ratio: 370 / 380; overflow: hidden; background: #3a3f45; transition: transform 0.25s, box-shadow 0.25s; }
.news-card:hover { text-decoration: none; transform: translateY(-4px); box-shadow: 0 10px 24px rgb(0 0 0 / 28%); }
.news-card img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.news-card:hover img { transform: scale(1.05); }
.news-card-text { position: absolute; left: 0; right: 0; bottom: 0; display: block; padding: 70px 30px 28px; background: linear-gradient(to top, rgb(0 0 0 / 88%), rgb(0 0 0 / 68%) 55%, transparent); }
.news-card-meta { display: block; margin-bottom: 14px; color: rgb(255 255 255 / 75%); font-size: 14px; line-height: 1.4; }
.news-card-title { display: block; color: #fff; font-size: 20px; font-weight: 600; line-height: 1.2; transition: color 0.2s; }
.news-card:hover .news-card-title { color: #ff9a6e; }
/* On the front page the newest story is the big one: with five small ones it fills three rows of three */
.news-grid-lead .news-card:first-child { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.news-grid-lead .news-card:first-child img { position: absolute; inset: 0; }
.news-grid-lead .news-card:first-child .news-card-title { font-size: clamp(22px, 3vw, 32px); }
.news-grid-lead .news-card:first-child .news-card-meta { font-size: 15px; }
.pagination { display: flex; justify-content: space-between; padding-top: 30px; }

/* Home */
.home-intro { display: grid; grid-template-columns: minmax(0, 545fr) minmax(0, 555fr); gap: 40px; align-items: start; padding: 98px 0 110px; }
.home-intro h2 { margin: 12px 0 18px; }
.home-intro p { margin-bottom: 1.75em; }
.home-intro img { display: block; width: 100%; max-width: 534px; margin-left: 2px; }
.associated { display: flex; align-items: center; justify-content: space-between; color: #fff; }
.associated h2 { margin: 0 0 0 10px; color: #fff; }
.associated-logos { display: flex; gap: 20px; margin-right: 40px; }
.associated-logos img { display: block; width: 150px; height: 150px; border-radius: 50%; background: #fff; object-fit: contain; }

/* Pages */
.page-head { padding-top: clamp(50px, 11vw, 110px); }
.page-head h1 { margin: 0; padding-bottom: 20px; border-bottom: 1px solid var(--line); color: var(--orange); font-size: clamp(34px, 6vw, 44px); font-weight: 700; }
.page-body { padding-top: 25px; padding-bottom: 40px; }
.page-body > :first-child { margin-top: 0; }
.page-body ul, .page-body ol, .post-body ul, .post-body ol { padding-left: clamp(20px, 5vw, 40px); }
.page-body table { width: 100%; border-collapse: collapse; line-height: 1.5; overflow-wrap: break-word; }
.page-body th, .page-body td { padding: 12px 11px; border-bottom: 1px solid #e8e8e8; text-align: left; vertical-align: middle; }
.page-body th { font-size: 14px; font-weight: 600; color: #111; background: var(--stripe); }
.page-body tbody tr:nth-child(even) td { background: var(--stripe); }
.page-body td { font-size: 14px; }
.page-body td p { margin: 0; }
/* An image alone in its paragraph stays close to the caption under it */
.page-body > p:has(> img:only-child) { margin-bottom: 0.25em; }
.page-body > p > img:only-child { display: block; }
.page-body > h2 { color: #000; font-size: 26px; font-weight: 500; margin: 1.6em 0 0.7em; }
/* Tables without a header row are the ones Elementor built from columns */
.page-body table:not(:has(thead)):not(.member-details) { table-layout: fixed; }
.page-body table:not(:has(thead)):not(.member-details) td { padding: 8px 10px; border: 0; background: none; font-size: 16px; vertical-align: top; }
.page-body table:not(:has(thead)):not(.member-details) td p { line-height: 2; }
.page-body table:not(:has(thead)):not(.member-details) tbody:nth-of-type(odd) td { background: #f0f0f0; }
/* Each row group is one position: its people sit as close together as lines of one paragraph */
.page-body table:not(:has(thead)):not(.member-details) tr:not(:first-child) td { padding-top: 0; }
.page-body table:not(:has(thead)):not(.member-details) tr:not(:last-child) td { padding-bottom: 0; }
.table-scroll { overflow-x: auto; }
.member-table { border: 1px solid #e8e8e8; }
.member-table td:first-child { width: 21.6%; }
.member-table td:nth-child(2) { width: 27.8%; }
.member-table img { display: block; }
.member-table a { color: inherit; }
.member-table a:hover { color: var(--orange); }

/* A member's details are the one table with visible borders */
.page-body .member-details { border: 2px solid var(--line); }
.page-body .member-details th, .page-body .member-details td, .page-body .member-details tbody tr:nth-child(even) td { padding: 10px 10px 34px; border: 2px solid var(--line); background: none; color: #000; font-size: 16px; font-weight: 400; vertical-align: top; }
.page-body .member-details th { width: 33.33%; }
.member-details p { margin: 0; }
.member-update { margin: 25px 0 0; }

/* News post */
.post-head { width: min(100% - 2 * var(--gutter), 845px); margin: 0 auto; padding-top: 22px; text-align: center; }
.post-meta { margin: 0 0 32px; color: var(--muted); font-size: 14px; }
.post-head h1 { margin: 0 0 38px; color: var(--heading); font-size: clamp(30px, 5vw, 40px); font-weight: 400; line-height: 1.5; }
.post-image { display: block; width: 100%; max-width: 1290px; height: auto; max-height: 615px; margin: 0 auto; object-fit: cover; object-position: 50% 15%; }
.post-body { width: min(100% - 2 * var(--gutter), 845px); margin: 0 auto; padding: clamp(30px, 5vw, 46px) 0 clamp(50px, 8vw, 70px); font-size: clamp(17px, 2.2vw, 19px); line-height: 1.52; }
.post-body p { margin-bottom: 1.5em; }
.post-body img { display: block; margin: 0 auto; }
.sgf-frame { margin: 0 0 1.5em; }
/* Long player names wrap inside their half instead of pushing the other player out of view */
.post-body .besogo-blackInfo, .post-body .besogo-whiteInfo { flex: 1 1 50%; min-width: 0; overflow-wrap: anywhere; }

/* Footer */
.site-footer {
  padding: 80px var(--gutter); background-color: var(--heading);
  background-image: linear-gradient(rgb(255 255 255 / 3%) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / 3%) 1px, transparent 1px);
  background-size: 44px 44px;
}
.footer-inner { display: grid; grid-template-columns: minmax(0, 295fr) minmax(0, 285fr) minmax(0, 285fr) minmax(0, 275fr); max-width: 1140px; margin: 0 auto; }
.footer-logo { justify-self: start; align-self: start; padding: 14px 16px; border-radius: 4px; background: #fff; }
.footer-logo img { display: block; width: 130px; }
.site-footer ul { list-style: none; margin: 0; padding: 9px 0 0; }
.site-footer li { line-height: 1.5; padding-bottom: 10px; font-size: 17px; }
.site-footer li a { color: #fff; }
.site-footer li a:hover { color: #ff9a6e; }
.copyright { margin: 0; padding-top: 9px; font-size: 14px; color: rgb(255 255 255 / 75%); text-align: right; line-height: 1.5; }

/* Narrow screens */
@media (max-width: 860px) {
  .site-header { padding: 16px var(--gutter); }
  .nav-button { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; margin-right: -10px; padding: 10px; pointer-events: none; }
  .nav-button span { display: block; height: 2px; background: var(--heading); }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; padding: 8px var(--gutter) 16px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 8px 24px rgb(0 0 0 / 12%); max-height: calc(100vh - 80px); overflow-y: auto; }
  .nav-toggle:checked ~ .main-nav { display: block; }
  .main-nav > ul { flex-direction: column; gap: 0; }
  .has-sub > ul { display: block; position: static; min-width: 0; padding: 0 0 6px 16px; box-shadow: none; }
  .has-sub > span { font-weight: 600; cursor: default; }
  .has-sub > span::after { display: none; }
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Two columns: the big story takes one row, and five stories under it would leave a gap */
  .news-grid-lead .news-card:first-child { grid-row: auto; aspect-ratio: 16 / 10; }
  .news-grid-lead .news-card:nth-child(6) { display: none; }
  .band-grey { padding: 40px 0; }
  .section-head { margin-inline: 0; }
  .home-intro { grid-template-columns: minmax(0, 1fr); padding-top: 50px; padding-bottom: 50px; }
  .home-intro img { margin: 0; }
  .associated { flex-direction: column; gap: 24px; }
  .associated h2 { margin: 0; }
  .associated-logos { margin: 0; flex-wrap: wrap; justify-content: center; }
  .associated-logos img { width: 100px; height: 100px; }
  .footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
  .copyright { grid-column: 1 / -1; text-align: left; }
  .site-footer { padding-block: 50px; }
}
.report-form { max-width: 640px; margin-top: 30px; }
.report-form p { margin: 0 0 20px; }
.report-form label { display: block; font-weight: 500; }
.report-form input:not([type="checkbox"]), .report-form select, .report-form textarea { display: block; box-sizing: border-box; width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 3px; background: #fff; color: var(--text); font: inherit; font-weight: 400; }
.report-form .report-confirm label { display: flex; gap: 10px; align-items: baseline; font-weight: 400; }
.report-form input[type="checkbox"] { flex: none; margin: 0; accent-color: var(--orange); }
.report-form button { padding: 12px 30px; border: 0; border-radius: 3px; background: var(--orange-deep); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.report-trap { position: absolute; left: -10000px; }
/* Beside the board, the buttons spread evenly across the narrow panel */
@media (min-width: 861px) {
  .post-body .besogo-control { justify-content: space-between; }
  .post-body .besogo-control button { margin-inline: 0; }
}
/* On a phone the board takes the whole width, and the panels below it keep the page's margin */
@media (max-width: 599px) {
  .sgf-frame { margin-inline: calc(-1 * var(--gutter)); }
  .post-body .besogo-panels { padding-inline: var(--gutter); }
}
@media (max-width: 540px) {
  .news-grid { grid-template-columns: minmax(0, 1fr); }
  .news-grid-lead .news-card:first-child { grid-column: auto; aspect-ratio: 370 / 380; }
  .news-grid-lead .news-card:nth-child(6) { display: block; }
}
@media (max-width: 540px) {
  .home-figures span { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .news-card, .news-card img, .news-card-title, .section-head > a { transition: none; }
  .hero-placed circle { animation: none; }
  .news-card:hover, .news-card:hover img { transform: none; }
}
