@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/source-sans-3.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}
:root {
  --font: "Source Sans 3", "Segoe UI", sans-serif;
  --serif: var(--font);
  --cream: #f6f5ee;
  --ink: #20392d;
  --green: #315e45;
  --muted: #5e6d61;
  --soft: #edf0e5;
  --border: #cbd4c5;
  --board-ink: #425a37;
  --board-label: #fff;
  --hero-bg: #183c30;
  font-family: var(--font);
  color-scheme: light;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e5e9df;
  --green: #acd4a5;
  --muted: #b2c0b3;
  --line: #3c4c41;
  --cream: #19231e;
  --paper: #233029;
  --soft: #2c3b30;
  --sage: #384d3a;
  --border: #54695a;
}
body {
  font-family: var(--font);
  background: var(--cream);
  color: var(--ink);
  min-height: 100vh;
}
button,
input,
select {
  font-family: inherit;
}
h1,
h2,
h3,
.sectiontitle h2,
.brand,
.libcard strong,
.studycard h2 {
  font-family: var(--font);
}
h1,
.sectiontitle h2,
.studycard h2 {
  font-weight: 680;
  letter-spacing: -0.04em;
}
header {
  background: var(--paper);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.headwrap,
main,
footer {
  max-width: 1310px;
  padding-left: clamp(16px, 4vw, 60px);
  padding-right: clamp(16px, 4vw, 60px);
}
.headwrap {
  min-height: 76px;
  gap: clamp(15px, 3.8vw, 52px);
}
.brand {
  font-size: 21px;
  letter-spacing: -0.035em;
  color: var(--ink);
  gap: 10px;
}
.brand .monogram {
  font-family: Georgia, serif;
  box-shadow: inset 0 0 0 1px #425c3822;
}
nav {
  gap: 6px;
}
nav button {
  color: var(--muted);
  padding: 8px 13px;
  font-size: 15px;
  border-radius: 99px;
}
nav button.active {
  background: var(--soft);
  color: var(--ink);
}
nav small {
  font: 650 10px/1 var(--font);
  padding: 4px 6px;
  background: var(--sage);
  color: var(--green);
  border-radius: 5px;
}
.utilities {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 7px;
}
.tool,
.userpic {
  height: 37px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  width: 37px;
}
.tool i {
  font-size: 18px;
}
.langbtn {
  width: auto;
  border-radius: 20px;
  padding: 0 10px;
  font-weight: 680;
  font-size: 13px;
}
.langbtn i {
  font-size: 12px;
}
.langbox {
  position: relative;
}
.flag {
  width: 19px;
  height: 19px;
  object-fit: cover;
  border-radius: 50%;
  outline: 1px solid #0002;
  display: inline-block;
  vertical-align: middle;
}
.userpic {
  background: #e3dec9;
  padding: 3px;
  border-color: transparent;
}
.userpic img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.popover {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  right: 0;
  background: var(--paper);
  border: 1px solid var(--border);
  box-shadow: 0 10px 28px #10251926;
  border-radius: 12px;
  padding: 4px;
  min-width: 160px;
}
.popover button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  padding: 7px 9px;
  border-radius: 7px;
  font-weight: 650;
}
.popover button[aria-pressed="true"] {
  background: var(--soft);
}
.popover button span {
  font-size: 13px;
  font-weight: 450;
}
.popover .flag {
  width: 17px;
  height: 17px;
}
.homeHero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 20px;
  background: var(--hero-bg);
  margin: clamp(18px, 3vw, 38px) 0 0;
  min-height: clamp(310px, 32vw, 425px);
  display: flex;
  align-items: center;
  color: #fff;
}
.heroPhoto {
  position: absolute;
  inset: 0 0 0 29%;
  z-index: -2;
  background: url("chess-club.jpg") 54% 53% / cover no-repeat;
}
.homeHero:after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    90deg,
    #183c30 0%,
    #183c30 26%,
    #183c30f2 37%,
    #183c3080 57%,
    #183c3005 79%
  );
}
.heroContent {
  padding: clamp(28px, 4.6vw, 68px);
  width: 70%;
}
.heroContent h1 {
  color: #fff;
  font: 650 clamp(60px, 6.2vw, 91px) / 0.92 var(--font);
  letter-spacing: -0.065em;
  margin: 0 0 28px;
}
.heroContent h1 span {
  color: #cfdf95;
}
.heroActions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.heroActions button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border-radius: 9px;
  font-size: 16px;
  font-weight: 670;
  padding: 12px 18px;
}
.heroActions .primary {
  background: #d6e69b;
  color: #1c3728;
}
.lightButton {
  color: #fff;
  background: #ffffff13;
  border: 1px solid #ffffff67;
}
.homeLibrary {
  padding: 28px 0 20px;
}
.homeLibrary .sectiontitle h2 {
  font-size: 27px;
}
.cards {
  gap: 13px;
}
.libcard {
  border-radius: 11px;
  padding: 13px 16px;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.libcard:hover {
  border-color: var(--border);
  background: var(--soft);
}
.libcard strong {
  font-weight: 640;
  letter-spacing: -0.025em;
  font-size: 18px;
}
.libcard .chip {
  margin-right: 6px;
}
.mini {
  width: 62px;
  height: 62px;
}
.textbtn {
  font-size: 15px;
}
.heading {
  padding: 22px 0 16px;
}
.heading h1 {
  font-size: clamp(32px, 3vw, 43px);
  margin: 0;
}
.modes {
  background: var(--soft);
  border-color: var(--line);
}
.modes button:not(.on) {
  color: var(--muted);
}
.modes .on,
.primary {
  background: #365f45;
  color: #fff;
}
.studycard,
.boardcard {
  border-radius: 13px;
}
.studycap {
  margin-bottom: 1px;
}
.studycard h2 {
  font-size: clamp(26px, 2.7vw, 38px);
  line-height: 1.04;
  letter-spacing: -0.045em;
}
.studycard .eyebrow {
  font-size: 10px;
}
.boardhead h2 {
  font: 650 17px var(--font);
}
.boardfoot .row {
  gap: 1px;
}
.sq,
.mini b {
  background: var(--square-light);
}
.sq.dark,
.mini b.dark {
  background: var(--square-dark);
}
.sq.last {
  background: color-mix(in srgb, var(--square-light) 55%, #d8d65a);
}
.sq.dark.last {
  background: color-mix(in srgb, var(--square-dark) 55%, #d8d65a);
}
.sq {
  color: var(--board-ink);
}
.sq.dark {
  color: var(--board-label);
}
.coachBlock {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 22px 0 14px;
}
.coachPic {
  width: 53px;
  height: 53px;
  object-fit: contain;
  background: #ebe7d8;
  border: 1px solid #cdd3bf;
  border-radius: 50%;
  padding: 4px;
  flex: none;
}
.speech {
  position: relative;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 3px 15px 15px 15px;
  padding: 14px 17px 10px;
  flex: 1;
  min-width: 0;
}
.speech:before {
  content: "";
  width: 11px;
  height: 11px;
  background: var(--soft);
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: absolute;
  left: -7px;
  top: 11px;
  transform: rotate(45deg);
}
.speaker {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  font-size: 13px;
  line-height: 1.1;
}
.speaker strong {
  color: var(--green);
}
.speaker span {
  color: var(--muted);
  font-weight: 550;
}
.coachText {
  color: var(--ink);
  font-weight: 490;
  font-size: clamp(19px, 1.6vw, 24px);
  line-height: 1.32;
  letter-spacing: -0.015em;
  margin: 9px 0 10px;
}
.listenBtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  color: var(--green);
  font-size: 13px;
  font-weight: 650;
}
.branches {
  border-top: 1px solid var(--line);
  padding: 12px 0 2px;
}
.branches summary {
  cursor: pointer;
  font-size: 15px;
  font-weight: 620;
  color: var(--ink);
}
.branches .prose {
  padding: 9px 0;
}
.practiceActions {
  margin: 12px 0;
}
.eng {
  font-family: var(--font);
}
.sectiontitle h2 {
  font-size: 26px;
}
footer {
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
dialog {
  background: var(--paper);
  color: var(--ink);
}
dialog[data-settings] {
  width: min(94vw, 570px);
  max-width: 94vw;
  padding: 22px 24px;
  max-height: 88dvh;
}
dialog[data-settings] form {
  display: none;
}
.configHead,
.settingLine {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.configHead h2 {
  font: 700 30px var(--font);
  letter-spacing: -0.04em;
  margin: 0;
}
.configTabs {
  display: flex;
  gap: 4px;
  background: var(--soft);
  padding: 4px;
  border-radius: 9px;
  margin: 16px 0;
}
.configTabs button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 3px;
  font-weight: 600;
  border-radius: 6px;
  font-size: 15px;
}
.configTabs [aria-pressed="true"] {
  background: var(--paper);
  box-shadow: 0 1px 4px #0002;
}
.configGroup {
  margin: 18px 0;
}
.configGroup h3 {
  font: 640 16px var(--font);
  margin: 0 0 8px;
}
.pickRow,
.dialogActions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.pick,
.sampleGrid button,
.avatarGrid button {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 560;
  padding: 7px 11px;
}
.pick[aria-pressed="true"] {
  background: var(--soft);
  border-color: var(--green);
  box-shadow: inset 0 0 0 1px var(--green);
}
.sampleGrid,
.avatarGrid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}
.sampleGrid button,
.avatarGrid button {
  flex-direction: column;
  gap: 3px;
  padding: 6px 2px;
  font-size: 12px;
  min-width: 0;
}
.pieceSample,
.swatch {
  width: 36px;
  height: 34px;
}
.swatch {
  border-radius: 3px;
  background: repeating-conic-gradient(var(--a) 0% 25%, var(--b) 0% 50%) 0
    0/18px 18px;
}
.avatarGrid {
  grid-template-columns: repeat(3, 1fr);
}
.avatarSample {
  width: 50px;
  height: 50px;
  object-fit: contain;
}
.avatarGrid .pick {
  font-size: 14px;
}
.settingLine {
  font-size: 16px;
  font-weight: 580;
  border-bottom: 1px solid var(--line);
  padding: 13px 0;
  margin-bottom: 12px;
}
.settingLine input {
  accent-color: #527c55;
}
.settingLine input[type="checkbox"] {
  width: 22px;
  height: 22px;
}
.volume input {
  width: 48%;
  margin-left: auto;
}
.dialogActions {
  margin: 12px 0;
}
:root[data-theme="dark"]
  :is(
    .tabs button,
    .prose,
    .callout p,
    .notice,
    .moveNote,
    .continuation span,
    .eng,
    .eyebrow,
    .tinybtn,
    .boardhead h2 i,
    .iconbutton,
    .transport button
  ) {
  color: var(--muted);
}
:root[data-theme="dark"] :is(.tabs button.active, .tinybtn, .textbtn) {
  color: var(--green);
}
:root[data-theme="dark"]
  :is(
    .chip,
    .family,
    .turn,
    .callout,
    .moveTag,
    .continuation strong,
    .moves button,
    .secondary,
    .outline,
    .filters input,
    .filters select,
    .studycard select
  ) {
  background: var(--soft);
  color: var(--ink);
  border-color: var(--border);
}
:root[data-theme="dark"] :is(.continuation, .tabs, .response) {
  border-color: var(--line);
}
:root[data-theme="dark"] .moves button.active {
  background: var(--sage);
}
@media (max-width: 780px) {
  .headwrap {
    min-height: 60px;
    gap: 10px;
  }
  .brand > span:last-child {
    display: none;
  }
  .headwrap nav {
    gap: 2px;
  }
  nav button {
    padding: 7px 9px;
  }
  .tool,
  .userpic {
    width: 33px;
    height: 33px;
  }
  .langbtn {
    width: auto;
  }
  .homeHero {
    min-height: 315px;
  }
  .heroContent {
    width: 82%;
  }
  .sampleGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .speaker {
    font-size: 13px;
  }
  .coachPic {
    width: 44px;
    height: 44px;
  }
  .homeLibrary .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .homeLibrary .libcard {
    flex-direction: column;
    align-items: flex-start;
  }
  .homeLibrary .mini {
    width: 58px;
    height: 58px;
  }
}
@media (max-width: 540px) {
  nav small {
    display: none;
  }
  .headwrap {
    display: grid;
    grid-template-columns: auto 1fr auto;
    padding: 9px 14px 0;
    gap: 0;
  }
  .brand {
    grid-column: 1/3;
    justify-self: start;
  }
  .brand > span:last-child {
    display: inline;
    font-size: 16px;
  }
  .headwrap nav {
    grid-row: 2;
    grid-column: 1/4;
    margin: 6px 0 4px;
  }
  .utilities {
    grid-row: 1;
    grid-column: 3;
    gap: 4px;
  }
  nav button {
    padding: 4px 11px;
  }
  .heroPhoto {
    left: 10%;
    background-position: 66% 52%;
  }
  .homeHero:after {
    background: linear-gradient(90deg, #173d31f5, #173d31ba 42%, #173d314a 78%);
  }
  .homeHero {
    min-height: 305px;
    border-radius: 14px;
  }
  .heroContent {
    width: 100%;
    padding: 25px 19px;
  }
  .heroActions {
    gap: 7px;
  }
  .heroActions button {
    font-size: 15px;
    padding: 10px 12px;
  }
  .heroContent h1 {
    font-size: 64px;
    margin-bottom: 26px;
  }
  .homeLibrary .cards {
    grid-template-columns: 1fr;
  }
  .homeLibrary .libcard {
    flex-direction: row;
    align-items: center;
    padding: 8px 12px;
  }
  .homeLibrary .mini {
    width: 43px;
    height: 43px;
  }
  .homeLibrary .sectiontitle h2 {
    font-size: 24px;
  }
  .homeLibrary {
    padding-top: 21px;
  }
  .coachBlock {
    gap: 9px;
    margin: 14px 0;
  }
  .speech {
    padding: 12px;
  }
  .coachPic {
    width: 39px;
    height: 39px;
  }
  .heroActions i {
    display: none;
  }
  dialog[data-settings] {
    padding: 16px;
  }
  .configTabs button {
    font-size: 14px;
  }
  .boardfoot .transport {
    gap: 0;
  }
  .boardfoot .iconbutton {
    width: 25px;
  }
  .heading {
    align-items: center;
  }
  .heading h1 {
    font-size: 31px;
  }
}

.pageBack {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  margin-top: 12px;
  padding: 5px 12px 5px 8px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-weight: 600;
}
