/* =================================================================
   HAWK CHESS — site styles
   Light and calm: warm white, beige, dark espresso type.
   The bronze of the logo is used sparingly as the accent.
================================================================= */

:root {
  --bg:       #FBF8F2;   /* warm white */
  --white:    #FFFFFF;
  --beige:    #F3E3C8;   /* brand cream */
  --beige-2:  #EADCC4;
  --ink:      #2A1A10;   /* text and dark buttons */
  --ink-2:    #4A3528;
  --muted:    #7A6656;
  --bronze:   #A8642F;
  --amber:    #D98A2B;
  --line:     #E9DECC;
  --line-2:   #D9C8AE;
  --shadow:   0 1px 2px rgba(42, 26, 16, .04), 0 12px 32px -16px rgba(42, 26, 16, .18);

  --sq-light: #F0E2C8;
  --sq-dark:  #B98A5E;

  --serif: "Cinzel", "Trajan Pro", Georgia, serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 18px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --wrap: min(1180px, calc(100% - 32px));
  --nav-bg: rgba(251, 248, 242, .85);
  --footer: #2A1A10;
  --placeholder: #A8978A;
  color-scheme: light;
}

/* ---------- Dark mode ----------
   Light is the default. Dark only applies when the visitor picks it
   with the moon/sun button (saved as data-theme on <html>). */
:root[data-theme="dark"] {
  --bg:      #16100B;
  --white:   #211811;
  --beige:   #2F2218;
  --beige-2: #3A2A1E;
  --ink:     #F3E3C8;
  --ink-2:   #E2CFB0;
  --muted:   #B29E89;
  --bronze:  #D69A5E;
  --line:    #33261C;
  --line-2:  #4A382A;
  --shadow:  0 1px 2px rgba(0,0,0,.3), 0 14px 34px -16px rgba(0,0,0,.6);
  --nav-bg:  rgba(22, 16, 11, .85);
  --footer:  #0E0906;
  --placeholder: #7E6B5B;
  color-scheme: dark;
}
body, .card, .plan, .coach, .prose, .nav { transition: background-color .3s, border-color .3s, color .3s; }

/* ---------- Page loader ----------
   A spinner in the site colours. It follows the browser's light/dark
   setting, unless the visitor picked a theme with the moon/sun button. */
:root { --loader-bg: #FBF8F2; --loader-ring: #EADCC4; --loader-arc: #A8642F; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --loader-bg: #16100B; --loader-ring: #33261C; --loader-arc: #D69A5E; } }
:root[data-theme="dark"] { --loader-bg: #16100B; --loader-ring: #33261C; --loader-arc: #D69A5E; }
.loader {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-content: center; justify-items: center; gap: 18px;
  background: var(--loader-bg);
  transition: opacity .35s ease, visibility 0s .35s;
}
.loader .spinner {
  width: 48px; height: 48px; box-sizing: border-box; display: inline-block;
  border: 5px solid var(--loader-ring); border-bottom-color: var(--loader-arc);
  border-radius: 50%; animation: rotation 1s linear infinite;
}
.loader.done { opacity: 0; visibility: hidden; }
@keyframes rotation { to { transform: rotate(360deg); } }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column; min-height: 100vh;
}
body > main { flex: 1 0 auto; width: 100%; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--beige); color: var(--ink); }
.icon { width: 1.15em; height: 1.15em; flex: none; }
:focus-visible { outline: 2px solid var(--bronze); outline-offset: 3px; border-radius: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px; border: 1px solid transparent;
  font: 600 15px/1 var(--sans); cursor: pointer; white-space: nowrap;
  transition: background .25s, color .25s, border-color .25s, transform .2s;
}
.btn:active { transform: scale(.98); }
.btn-sm { padding: 10px 18px; font-size: 14px; }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-dark:hover { background: var(--ink-2); }
.btn-outline { background: var(--white); color: var(--ink); border-color: var(--line-2); }
.btn-outline:hover { border-color: var(--ink); }
.pill {
  padding: 8px 14px; border-radius: 999px; font-size: 14px; color: var(--muted);
  border: 1px solid transparent; transition: color .2s, border-color .2s, background .2s;
}
.pill:hover { color: var(--ink); }
.pill[aria-current="page"] { color: var(--ink); background: var(--white); border-color: var(--line); }

/* ---------- Header ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 14px max(16px, calc((100% - 1180px) / 2));
  background: var(--nav-bg);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font: 700 18px/1 var(--serif); letter-spacing: .06em; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { padding: 8px 14px; font-size: 14px; color: var(--muted); transition: color .2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"] { font-weight: 600; }
.icon-btn {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
  background: transparent; border: 1px solid var(--line-2); color: var(--ink); transition: border-color .2s;
}
.icon-btn:hover { border-color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .i-sun, [data-dark] .icon-btn .i-moon { display: none; }
[data-dark] .icon-btn .i-sun { display: block; }
.only-mobile { display: none; }
.nav-actions { display: flex; align-items: center; gap: 6px; }
.burger { display: none; }

/* ---------- Shared type ---------- */
.eyebrow {
  margin: 0 0 14px; font: 600 12px/1 var(--sans);
  letter-spacing: .24em; text-transform: uppercase; color: var(--bronze);
}
.lead { color: var(--muted); font-size: 17px; max-width: 560px; }

/* ---------- Hero ---------- */
.hero {
  width: var(--wrap); margin: 0 auto; padding: 40px 0 70px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.hero-logo {
  width: min(300px, 62vw); margin-bottom: 18px;
  filter: drop-shadow(0 24px 30px rgba(42, 26, 16, .18));
  animation: rise .9s var(--ease) both;
}
.title {
  margin: 0; font: 700 clamp(44px, 7vw, 92px)/1 var(--serif); letter-spacing: .02em;
  animation: rise .9s var(--ease) .1s both;
}
.tagline {
  margin: 14px 0 0; font: 500 clamp(15px, 1.8vw, 20px)/1.3 var(--serif);
  letter-spacing: .16em; text-transform: uppercase; color: var(--bronze);
}
.hero .lead { margin: 18px auto 30px; }
.hero .eyebrow, .hero .tagline, .hero .lead, .hero .pgn-drop, .hero .stats { animation: rise .9s var(--ease) .2s both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

.pgn-drop {
  display: flex; align-items: center; gap: 10px; width: 100%; max-width: 580px;
  padding: 7px 7px 7px 20px; border-radius: 999px;
  background: var(--white); border: 1px solid var(--line-2); box-shadow: var(--shadow);
  transition: border-color .2s, box-shadow .2s;
}
.pgn-drop:focus-within, .pgn-drop.drag { border-color: var(--bronze); box-shadow: 0 0 0 4px rgba(168, 100, 47, .12); }
.pgn-icon { color: var(--bronze); display: flex; }
.pgn-drop input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--ink); font: 15px var(--sans); }
.pgn-drop input::placeholder, input::placeholder, textarea::placeholder { color: var(--placeholder); }

.stats { display: flex; gap: 48px; margin: 40px 0 0; padding: 0; list-style: none; }
.stats strong { display: block; font: 700 30px/1 var(--serif); }
.stats li > span { font-size: 13px; color: var(--muted); }

/* ---------- Grades strip ---------- */
.grades {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px;
  padding: 22px 16px; background: var(--white);
  border-block: 1px solid var(--line);
}
.grades span { display: flex; align-items: center; gap: 10px; font: 600 15px/1 var(--serif); letter-spacing: .06em; color: var(--ink-2); }
.tag {
  display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 5px;
  border-radius: 50%; font: 800 12px/1 var(--sans); color: #fff;
}
.t-brill { background: #1fa89c; } .t-great { background: #4f82c0; } .t-best { background: #6f9c33; }
.t-inacc { background: #d9a92e; } .t-mist { background: #e0762f; } .t-blund { background: #cf4334; }
.t-mate  { background: var(--ink); } .t-book { background: #9c7a55; }
.tag svg { width: 1.05em; height: 1.05em; display: block; }

/* ---------- Sections ---------- */
.section { width: var(--wrap); margin: 0 auto; padding: 110px 0 0; }
.section-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.section-head h2 { margin: 0; font: 700 clamp(30px, 4.2vw, 50px)/1.1 var(--serif); }
.section-head p:not(.eyebrow) { color: var(--muted); margin: 14px 0 0; }

/* Gentle fade-in, once */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Demo ---------- */
.demo-grid {
  display: grid; grid-template-columns: 26px minmax(0, 540px) minmax(0, 400px);
  justify-content: center; gap: 20px; align-items: start;
}
.eval {
  position: relative; align-self: stretch; border-radius: 8px; overflow: hidden;
  background: #1E130B; border: 1px solid var(--line-2);
}
.eval-fill {
  position: absolute; left: 0; right: 0; bottom: 0; height: 50%;
  background: #FFFDF8; transition: height .8s var(--ease);
}
.eval-num { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; font: 700 10px/1 var(--sans); color: #2A1A10; }
.eval.black-better .eval-num { top: 6px; bottom: auto; color: #FFFDF8; }

.board-wrap { position: relative; }
.board {
  position: relative; aspect-ratio: 1; width: 100%; border-radius: 10px; overflow: hidden;
  box-shadow: var(--shadow), 0 0 0 8px var(--white), 0 0 0 9px var(--line);
}
.sq { position: absolute; width: 12.5%; height: 12.5%; }
.sq.l { background: var(--sq-light); }
.sq.d { background: var(--sq-dark); }
.sq .coord { position: absolute; font: 700 10px/1 var(--sans); opacity: .75; pointer-events: none; }
.sq.l .coord { color: var(--sq-dark); } .sq.d .coord { color: var(--sq-light); }
.coord.f { right: 4px; bottom: 3px; } .coord.r { left: 4px; top: 3px; }
.sq.hl::after { content: ""; position: absolute; inset: 0; background: rgba(217, 138, 43, .38); }
.sq.check::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(circle, rgba(207, 67, 52, .85), rgba(207, 67, 52, .25) 50%, transparent 72%);
}
.pc {
  position: absolute; z-index: 2; width: 12.5%; height: 12.5%;
  display: grid; place-items: center;
  font-size: clamp(26px, 5.2vw, 50px); line-height: 1;
  transition: transform .6s cubic-bezier(.45, .05, .25, 1), opacity .35s;
}
.pc.w { color: #fffdf8; text-shadow: 0 0 1px #2A1A10, 0 1px 0 #2A1A10, 1px 0 0 #2A1A10, -1px 0 0 #2A1A10, 0 -1px 0 #2A1A10, 0 3px 4px rgba(0,0,0,.2); }
.pc.b { color: #2A1A10; text-shadow: 0 3px 4px rgba(0,0,0,.2); }
.pc.moving { z-index: 5; }
.pc.gone { opacity: 0; }
.board-badge {
  position: absolute; left: 0; top: 0; z-index: 6; width: 12.5%; aspect-ratio: 1;
  pointer-events: none; transition: transform .45s var(--ease);
}
.board-badge .tag { position: absolute; right: -9px; top: -9px; width: 26px; height: 26px; min-width: 0; box-shadow: 0 2px 6px rgba(0,0,0,.25); }

.coach {
  display: flex; flex-direction: column; gap: 16px; padding: 22px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.coach-head { display: flex; align-items: center; gap: 12px; }
.coach-head img { border-radius: 50%; background: var(--beige); padding: 4px; }
.coach-head strong { display: block; font: 700 16px/1.2 var(--serif); letter-spacing: .04em; }
.coach-head span { font-size: 13px; color: var(--muted); }
.coach-bubble { padding: 16px 18px; min-height: 120px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; }
.coach-bubble p { margin: 0; font-size: 15px; color: var(--ink-2); }
.coach-bubble .caret { display: inline-block; width: 2px; height: 1em; background: var(--bronze); vertical-align: -2px; margin-left: 2px; }
.coach-tag { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 8px; font: 700 12px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.coach-tag:empty { display: none; }
.coach-tag .tag { width: 22px; height: 22px; min-width: 0; font-size: 10px; }

.moves {
  min-height: 110px; max-height: 200px; overflow-y: auto; margin: 0; padding: 0; list-style: none;
  display: grid; grid-template-columns: 32px 1fr 1fr; gap: 2px 6px; align-content: start;
  scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
}
.moves .num { color: #B3A293; font-size: 13px; padding: 5px 0; }
.moves .mv {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 5px 8px; border-radius: 6px; font: 600 14px/1.2 var(--sans); color: var(--muted); cursor: pointer;
}
.moves .mv:hover { background: var(--bg); color: var(--ink); }
.moves .mv.cur { background: var(--beige); color: var(--ink); }
.moves .mv .tag { width: 18px; height: 18px; min-width: 0; font-size: 9px; }

.controls { display: flex; align-items: center; gap: 10px; }
.ctrl {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: var(--white); border: 1px solid var(--line-2); color: var(--ink); cursor: pointer;
}
.ctrl:hover { border-color: var(--ink); }
.ctrl-main { width: 50px; height: 50px; background: var(--ink); color: var(--bg); border: 0; }
.ctrl .i-pause, .ctrl.playing .i-play { display: none; }
.ctrl.playing .i-pause { display: grid; }
.progress { flex: 1; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.progress div { height: 100%; width: 0; background: var(--bronze); transition: width .5s var(--ease); }
.fineprint { margin: 18px 0 0; text-align: center; font-size: 12px; color: #A8978A; }

/* ---------- Cards ---------- */
.card {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  padding: 30px 28px; border-radius: var(--radius);
  background: var(--white); border: 1px solid var(--line);
  transition: border-color .25s, box-shadow .25s;
}
.card:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.card h2, .card h3 { margin: 0; font: 700 20px/1.3 var(--serif); letter-spacing: .02em; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card-icon {
  display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 10px;
  border-radius: 12px; color: var(--bronze); font-size: 21px; background: var(--beige);
}

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.step { text-align: center; }
.step-n {
  display: inline-grid; place-items: center; width: 64px; height: 64px; margin-bottom: 16px;
  border-radius: 50%; font: 700 20px/1 var(--serif); color: var(--bronze);
  background: var(--white); border: 1px solid var(--line-2);
}
.step h3 { margin: 0 0 6px; font: 700 21px/1.3 var(--serif); }
.step p { margin: 0 auto; max-width: 280px; color: var(--muted); }

/* ---------- Pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: center; }
.plan {
  position: relative; display: flex; flex-direction: column; gap: 22px; padding: 34px 30px;
  border-radius: var(--radius); background: var(--white); border: 1px solid var(--line);
}
.plan-featured { padding: 44px 30px; background: var(--beige); border-color: var(--line-2); box-shadow: var(--shadow); }
.plan-ribbon {
  position: absolute; top: 18px; right: 18px; padding: 6px 12px; border-radius: 999px;
  font: 700 11px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--bg); background: var(--ink);
}
.plan h3 { margin: 0; font: 700 21px/1 var(--serif); letter-spacing: .04em; }
.price { display: flex; align-items: baseline; gap: 4px; }
.price .cur { font: 600 20px/1 var(--serif); color: var(--bronze); }
.price .amt { font: 700 54px/1 var(--serif); }
.price .per { margin-left: 8px; font-size: 14px; color: var(--muted); }
.plan ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; flex: 1; }
.plan li { display: flex; gap: 10px; font-size: 15px; color: var(--ink-2); }
.plan li .icon { color: var(--bronze); margin-top: 3px; }

/* ---------- CTA ---------- */
.cta { padding-bottom: 110px; }
.cta-box {
  text-align: center; padding: 60px 28px; border-radius: 28px;
  background: var(--beige); border: 1px solid var(--line-2);
}
.cta-logo { width: 96px; margin: 0 auto 18px; }
.cta-box h2 { margin: 0; font: 700 clamp(28px, 4vw, 46px)/1.1 var(--serif); }
.cta-box > p { max-width: 460px; margin: 12px auto 28px; color: var(--ink-2); }
.waitlist { display: flex; gap: 10px; max-width: 480px; margin: 0 auto; }
.waitlist input[type=email] {
  flex: 1; min-width: 0; padding: 14px 22px; border-radius: 999px; outline: 0;
  background: var(--white); border: 1px solid var(--line-2); color: var(--ink); font: 15px var(--sans);
}
.waitlist input[type=email]:focus { border-color: var(--bronze); box-shadow: 0 0 0 4px rgba(168, 100, 47, .12); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-msg { min-height: 1.6em; margin: 14px 0 0; font-size: 14px; }
.form-msg.ok { color: #4f7d22; } .form-msg.err { color: #b33a2c; }
.form-legal { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.form-legal a { text-decoration: underline; }

/* ---------- Inner pages (contact, privacy) ---------- */
.page { width: var(--wrap); margin: 0 auto; padding: 70px 0 110px; }
.page-title { margin: 0 0 16px; font: 700 clamp(38px, 6vw, 72px)/1.05 var(--serif); }
.page-title em { font-style: normal; color: var(--bronze); }
.page .lead { margin: 0 0 48px; }
.grid { display: grid; gap: 18px; }
.grid-contact { grid-template-columns: 1.2fr .8fr; align-items: start; }
.grid-socials { grid-template-columns: repeat(3, 1fr); }
.label {
  align-self: flex-start; padding: 6px 12px; border-radius: 999px;
  font: 600 11px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase;
  color: var(--bronze); background: var(--beige);
}
.list { margin: 0; padding-left: 1.1em; color: var(--muted); display: grid; gap: 4px; }
.list li::marker { color: var(--bronze); }
.mail { align-self: flex-start; margin-top: 6px; font: 700 clamp(17px, 2vw, 21px)/1.3 var(--serif); border-bottom: 1px solid var(--line-2); word-break: break-all; }
.mail:hover { color: var(--bronze); border-color: var(--bronze); }
.note { font-size: 13px !important; }
.embed { margin: 6px 0 10px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.embed iframe { display: block; width: 100%; height: 400px; border: 0; }
.card .btn { align-self: flex-start; }
.sub-title { margin: 70px 0 22px; font: 700 clamp(24px, 3vw, 34px)/1.2 var(--serif); }
.social { min-height: 210px; }
.social-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--beige); color: var(--bronze); margin-bottom: 8px; }
.social-icon svg { width: 22px; height: 22px; }
.social .handle { margin-top: auto; padding-top: 8px; font-size: 14px; font-weight: 600; color: var(--ink); }
.social .arrow { display: inline-block; transition: transform .25s var(--ease); }
.social:hover .arrow { transform: translate(3px, -3px); }

.legal { display: grid; grid-template-columns: 220px 1fr; gap: 50px; align-items: start; }
.toc { position: sticky; top: 90px; display: grid; gap: 2px; }
.toc a { padding: 7px 12px; border-left: 2px solid var(--line); font-size: 14px; color: var(--muted); transition: color .2s, border-color .2s; }
.toc a:hover { color: var(--ink); border-color: var(--bronze); }
.prose { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 40px; }
.prose section { padding: 30px 0; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.prose section:first-child { border-top: 0; }
.prose h2 { display: flex; align-items: baseline; gap: 14px; margin: 0 0 12px; font: 700 22px/1.3 var(--serif); }
.prose h2 .num { font: 600 13px/1 var(--sans); color: var(--bronze); letter-spacing: .1em; }
.prose p, .prose li { margin: 0; color: var(--muted); line-height: 1.8; max-width: 68ch; }
.prose p + p, .prose p + ul, .prose ul + p { margin-top: 12px; }
.prose ul { padding-left: 1.1em; display: grid; gap: 6px; margin: 0; }
.prose li::marker { color: var(--bronze); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--ink); border-bottom: 1px solid var(--line-2); }
.prose a:hover { border-color: var(--bronze); }

/* ---------- Forms ---------- */
.form { display: grid; gap: 16px; text-align: left; }
.form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.label-row { display: flex; justify-content: space-between; }
.label-row a, .check a, .auth-switch a, .note a { color: var(--bronze); font-weight: 600; }
.form input[type=email], .form input[type=password], .form input[type=text], textarea, select {
  width: 100%; padding: 13px 16px; border-radius: 12px; outline: 0;
  background: var(--bg); border: 1px solid var(--line-2); color: var(--ink); font: 15px var(--sans);
  transition: border-color .2s, box-shadow .2s;
}
.form input:focus, textarea:focus, select:focus { border-color: var(--bronze); box-shadow: 0 0 0 4px rgba(168, 100, 47, .14); }
.form .check { display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--muted); }
.check input { flex: none; width: 17px; height: 17px; accent-color: var(--bronze); }
.btn-block { width: 100%; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Auth pages ---------- */
.auth { width: var(--wrap); margin: 0 auto; padding: 60px 0 100px; display: grid; place-items: center; }
.auth-card {
  width: 100%; max-width: 440px; padding: 40px 34px; text-align: center;
  background: var(--white); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow);
}
.auth-logo { margin: 0 auto 14px; }
.auth-card h1 { margin: 0; font: 700 30px/1.2 var(--serif); }
.auth-sub { margin: 8px 0 28px; color: var(--muted); font-size: 15px; }
.auth-switch { margin: 22px 0 0; font-size: 14px; color: var(--muted); }

/* ---------- Analyze page ---------- */
.analyze-panel { gap: 14px; }
.analyze-panel textarea { resize: vertical; min-height: 170px; font: 14px/1.5 ui-monospace, "SFMono-Regular", Consolas, monospace; }
.analyze-row { display: flex; gap: 10px; flex-wrap: wrap; }
.file-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 12px; cursor: pointer;
  border: 1px dashed var(--line-2); color: var(--ink-2); font-size: 14px; font-weight: 600;
}
.file-btn:hover { border-color: var(--bronze); color: var(--bronze); }
.select { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.select select { width: auto; padding: 10px 12px; }

/* ---------- History page ---------- */
.history-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 8px 16px; border-radius: 999px; cursor: pointer; font: 600 14px/1 var(--sans);
  background: var(--white); color: var(--muted); border: 1px solid var(--line);
}
.chip.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.history-stats { display: flex; gap: 22px; font-size: 14px; color: var(--muted); }
.history-stats strong { font: 700 18px/1 var(--serif); color: var(--ink); margin-right: 4px; }
.empty {
  display: grid; justify-items: center; gap: 10px; padding: 60px 24px; text-align: center;
  background: var(--white); border: 1px dashed var(--line-2); border-radius: var(--radius);
}
.empty img { width: 110px; opacity: .9; margin-bottom: 6px; }
.empty h2 { margin: 0; font: 700 24px/1.2 var(--serif); }
.empty p { margin: 0; max-width: 420px; color: var(--muted); }
.empty-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }

/* =================================================================
   ANALYZER
================================================================= */
.page-analyze { padding-top: 40px; }
.an-intro { margin-bottom: 28px; }
.an-intro.compact .lead, .an-intro.compact .eyebrow { display: none; }
.an-intro.compact .page-title { font-size: clamp(28px, 3.4vw, 40px); }
.analyze { display: grid; grid-template-columns: minmax(0, 580px) minmax(0, 1fr); gap: 28px; align-items: start; }
.an-board-col { display: grid; gap: 10px; position: sticky; top: 84px; }
.an-board-row { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; }
.an-board-row .eval { min-height: 100%; }
.eval.flipped .eval-fill { top: 0; bottom: auto; }
.eval.flipped .eval-num { top: 6px; bottom: auto; }
.eval.flipped.black-better .eval-num { top: auto; bottom: 6px; }
.an-board-col .board-wrap { position: relative; }
.arrows { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; }
.arrows line { stroke: rgba(111, 156, 51, .85); }
.arrows polygon { fill: rgba(111, 156, 51, .85); }

.player-bar { display: flex; justify-content: space-between; align-items: center; padding: 0 2px 0 34px; font-size: 15px; font-weight: 600; }
.player-bar small { color: var(--muted); font-weight: 500; }
.pacc { font: 700 15px/1 var(--serif); color: var(--bronze); }
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 8px; vertical-align: -1px; border: 1px solid var(--line-2); }
.dot.w { background: #FFFDF8; } .dot.b { background: #2A1A10; }
.me { margin-left: 6px; padding: 2px 7px; border-radius: 999px; font: 600 10px/1.4 var(--sans); font-style: normal; text-transform: uppercase; letter-spacing: .08em; color: var(--bronze); background: var(--beige); }
.an-controls { display: flex; justify-content: center; gap: 8px; padding-left: 34px; }
.an-controls .ctrl svg.icon { width: 18px; height: 18px; }

.an-side { min-width: 0; }
.an-panel { gap: 16px; }
.an-panel:hover { box-shadow: none; }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.tab { flex: 1; padding: 9px 10px; border: 0; border-radius: 9px; cursor: pointer; background: transparent; color: var(--muted); font: 600 14px/1 var(--sans); }
.tab.is-on { background: var(--white); color: var(--ink); box-shadow: var(--shadow); }
.tab-body { display: grid; gap: 12px; }
.tab-body textarea { resize: vertical; min-height: 180px; font: 13px/1.5 ui-monospace, "SFMono-Regular", Consolas, monospace; }
.analyze-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.an-run { justify-content: space-between; }
.user-row { display: flex; gap: 10px; }
.user-row input { flex: 1; min-width: 0; padding: 12px 16px; border-radius: 12px; outline: 0; background: var(--bg); border: 1px solid var(--line-2); color: var(--ink); font: 15px var(--sans); }
.user-row input:focus { border-color: var(--bronze); }
.game-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 360px; overflow-y: auto; }
.game-list button {
  width: 100%; display: grid; grid-template-columns: 52px 1fr; gap: 2px 10px; align-items: center; text-align: left; cursor: pointer;
  padding: 10px 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); color: var(--ink); font: 14px var(--sans);
}
.game-list button:hover { border-color: var(--bronze); }
.gl-players small { color: var(--muted); }
.gl-meta { grid-column: 2; font-size: 12px; color: var(--muted); text-transform: capitalize; }
.gl-res { grid-row: span 2; justify-self: start; padding: 4px 8px; border-radius: 8px; font: 700 11px/1 var(--sans); text-transform: uppercase; letter-spacing: .06em; background: var(--beige); color: var(--ink-2); }
.gl-res.win { background: rgba(111, 156, 51, .18); color: #4f7d22; }
.gl-res.loss { background: rgba(207, 67, 52, .14); color: #b33a2c; }
.muted { color: var(--muted); font-size: 14px; padding: 6px 2px; }

.progress.big { height: 6px; }
#progBar { height: 100%; width: 0; background: var(--bronze); transition: width .3s ease; }
.an-panel .btn-sm { align-self: flex-start; }

.acc-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; text-align: center; }
.acc { padding: 14px 10px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); min-width: 0; }
.acc span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc strong { display: block; font: 700 32px/1.1 var(--serif); }
.acc small { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.acc.w strong { color: var(--ink); }
.acc-vs { font: 700 14px/1 var(--serif); color: var(--muted); }
.counts { margin-top: 10px; font-size: 14px; }
.counts summary { cursor: pointer; color: var(--bronze); font-weight: 600; padding: 4px 0; }
.counts table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.counts td { padding: 5px 4px; border-top: 1px solid var(--line); color: var(--ink-2); }
.counts td.num { width: 40px; text-align: center; font-weight: 700; }
.counts .tag { width: 20px; height: 20px; min-width: 0; font-size: 9px; margin-right: 6px; vertical-align: middle; }

.ai-btn { margin-top: 10px; padding: 7px 12px; border-radius: 999px; cursor: pointer; border: 1px solid var(--line-2); background: var(--white); color: var(--bronze); font: 600 13px var(--sans); }
.ai-btn:hover { border-color: var(--bronze); }

.graph { width: 100%; height: 70px; border-radius: 10px; overflow: hidden; cursor: pointer; border: 1px solid var(--line); display: block; }
.g-black { fill: #3a2a1e; }
.g-white { fill: #F3EBDD; }
.g-mid { stroke: rgba(168, 100, 47, .5); stroke-width: .3; vector-effect: non-scaling-stroke; }
.g-cur { stroke: var(--bronze); stroke-width: 2; vector-effect: non-scaling-stroke; }
.gdot { stroke: #fff; stroke-width: .3; }
.gdot.t-blund { fill: #cf4334; } .gdot.t-mist { fill: #e0762f; } .gdot.t-miss { fill: #d6577a; }
.gdot.t-brill { fill: #1fa89c; } .gdot.t-great { fill: #4f82c0; }
.an-moves { max-height: 260px; }
/* Game rating */
.grating { display: block; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font: 700 18px/1.1 var(--serif); font-style: normal; color: var(--bronze); }
.grating small { display: block; font: 600 10px/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.grating.low { opacity: .7; }
.grating-note { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.gm-rating strong { display: block; font: 700 20px/1 var(--serif); color: var(--bronze); }
.gm-rating small { white-space: nowrap; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

/* Analyzer pieces glide between squares */
#anBoard .pc { transition: transform .6s cubic-bezier(.45, .05, .25, 1), opacity .35s ease; will-change: transform; }
#anBoard .pc.appear { opacity: 0; }
#anBoard .pc.gone { opacity: 0; transition: opacity .3s ease .3s; }

.result-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.opening-name { margin: 12px 0 0; text-align: center; font-size: 14px; color: var(--ink-2); }
.opening-name span { display: inline-block; margin-right: 8px; padding: 1px 7px; border-radius: 6px; background: var(--beige); font: 600 11px/1.6 var(--sans); letter-spacing: .04em; color: var(--bronze); }

.t-exc { background: #8fb34a; } .t-good { background: #9aa58a; } .t-forced { background: #a58a6c; }
.t-miss { background: #d6577a; }

/* ---------- History list ---------- */
.games { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.game {
  display: grid; grid-template-columns: 64px minmax(0, 1.4fr) 100px 110px minmax(0, 1fr) 100px 32px;
  align-items: center; gap: 14px; padding: 16px 18px; flex-direction: row;
}
.game .gl-res { grid-row: auto; text-align: center; }
.game-link { position: absolute; inset: 0; border-radius: inherit; z-index: 1; }
.gm-players { display: grid; gap: 4px; font-weight: 600; font-size: 15px; min-width: 0; }
.gm-players span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-players small { color: var(--muted); font-weight: 500; }
.gm-acc { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.gm-acc strong { font: 700 20px/1 var(--serif); }
.gm-acc span { color: var(--muted); }
.gm-acc small { width: 100%; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.gm-marks { display: flex; gap: 10px; flex-wrap: wrap; }
.gm-mark { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 14px; }
.gm-mark .tag { width: 20px; height: 20px; min-width: 0; font-size: 9px; }
.gm-meta { font-size: 13px; color: var(--muted); }
.gm-del { position: relative; z-index: 2; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; border: 1px solid var(--line); background: transparent; color: var(--muted); }
.gm-del:hover { color: #b33a2c; border-color: #b33a2c; }

@media (max-width: 1020px) {
  .analyze { grid-template-columns: 1fr; }
  .an-board-col { max-width: 600px; width: 100%; margin: 0 auto; position: static; }
  .game { grid-template-columns: 56px minmax(0, 1fr) auto auto 32px; }
  .gm-marks, .gm-meta { display: none; }
}
@media (max-width: 640px) {
  .an-board-row { grid-template-columns: 16px minmax(0, 1fr); gap: 8px; }
  .player-bar, .an-controls { padding-left: 24px; }
  .an-controls { gap: 4px; }
  .an-controls .ctrl { width: 40px; height: 40px; }
  .an-controls .ctrl-main { width: 46px; height: 46px; }
  .acc strong { font-size: 26px; }
  .user-row { flex-direction: column; }
}

/* ---------- Account ---------- */
.user-pill { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.avatar { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--bronze); color: #fff; font: 700 12px/1 var(--sans); }
button.pill { background: transparent; cursor: pointer; font: inherit; font-size: 14px; }
.account-note { margin: -30px 0 34px; font-size: 14px; color: var(--muted); }
.account-note a, .account-note strong { color: var(--ink); font-weight: 600; }
.account-note a { color: var(--bronze); }
.form .form-msg { margin: 0; min-height: 0; text-align: center; }
.form .form-msg:empty { display: none; }
.btn.is-busy { opacity: .6; pointer-events: none; }

/* ---------- Ads (free plan only) ---------- */
.ad-slot { display: block; margin: 18px 0; padding: 10px; border-radius: 14px; background: var(--bg); border: 1px dashed var(--line-2); min-height: 90px; max-height: 140px; overflow: hidden; }
.ad-label { display: block; margin-bottom: 6px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.ad-label a { color: var(--bronze); text-transform: none; letter-spacing: 0; }

/* =================================================================
   Hawk mascot (log in page)
================================================================= */
.mascot { position: relative; width: 156px; height: 156px; margin: -8px auto 10px; }
.mascot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.mascot-bubble circle { fill: var(--beige); stroke: var(--line-2); stroke-width: 2; }

.h-lid { transform-box: fill-box; transform-origin: top; transform: scaleY(0); }
.h-pupil { transition: transform .18s ease-out; }
.h-wing { transform-box: view-box; transition: transform .45s cubic-bezier(.34, 1.3, .64, 1); }
.h-wing-l { transform-origin: 64px 116px; }
.h-wing-r { transform-origin: 136px 116px; }
.h-head { transform-box: view-box; transform-origin: 100px 112px; transition: transform .3s ease; }
.mascot .mascot-hawk { transition: opacity .3s ease, transform .3s ease; }

/* Blink now and then */
.mascot.blink .h-lid { animation: blink .22s ease; }
@keyframes blink { 50% { transform: scaleY(1); } }

/* Covering the eyes while a password is typed */
.mascot.hide .h-wing-l { transform: translate(18px, 2px) rotate(148deg); }
.mascot.hide .h-wing-r { transform: translate(-18px, 2px) rotate(-148deg); }
.mascot.hide .h-head { transform: translateY(3px); }

/* Wrong password: shakes its head */
.mascot.no .h-head { animation: nope .5s ease; }
@keyframes nope { 20%, 60% { transform: rotate(-8deg); } 40%, 80% { transform: rotate(8deg); } }

/* Success: the card trembles, the hawk ducks out of its bubble... */
.auth-card.tremble { animation: tremble .45s ease; }
@keyframes tremble {
  10%, 50%, 90% { transform: translate(-5px, 1px) rotate(-.4deg); }
  30%, 70% { transform: translate(5px, -1px) rotate(.4deg); }
}
.mascot.gone .mascot-hawk { opacity: 0; transform: translateY(24px) scale(.9); }

/* ...and a full-size hawk comes out from the bottom-left corner,
   spreads its wings and takes off */
.hawk-launch {
  position: fixed; z-index: 150; left: 0; top: 0; pointer-events: none;
  width: min(1100px, 120vw); aspect-ratio: 780 / 380;
  will-change: transform; filter: drop-shadow(0 30px 40px rgba(30, 15, 5, .35));
}
.hawk-launch svg { display: block; width: 100%; height: 100%; overflow: visible; }
.hf-flap { transform-box: view-box; transform-origin: 0 0; transition: transform .7s cubic-bezier(.3, 1.2, .5, 1); }
.hawk-launch.folded .hf-flap { transform: rotate(62deg) scale(.42, .8); transition: none; }
.hawk-launch.flap .hf-flap { transition: none; animation: hfFlap .42s ease-in-out infinite alternate; }
@keyframes hfFlap {
  from { transform: rotate(-16deg) scaleY(1.05); }
  to   { transform: rotate(26deg) scaleY(.82); }
}


/* ---------- Calibration tool ---------- */
.cal-panel { margin-bottom: 18px; gap: 12px; }
.cal-panel h2 { font-size: 20px; }
.cal-row { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.cal-row input, .cal-row textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg); color: var(--ink); font: 14px var(--sans); }
.cal-row textarea { font: 12px ui-monospace, monospace; }
.cal-inline { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.cal-inline label { display: flex; gap: 8px; align-items: center; }
.cal-inline select { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg); color: var(--ink); }
.cal-bands { display: flex; flex-wrap: wrap; gap: 8px; }
.cal-bands span { padding: 6px 10px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.cal-bands span.done { border-color: var(--bronze); color: var(--ink); }

/* ---------- Account / Pro ---------- */
.pro-badge { display: inline-block; margin-left: 4px; padding: 2px 7px; border-radius: 999px; font: 700 10px/1.4 var(--sans); letter-spacing: .08em; color: #2A1A10; background: linear-gradient(135deg, #ffd38a, #D98A2B); vertical-align: middle; }
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.account-guest { max-width: 520px; }
.plan-card h2 small { font: 500 13px var(--sans); color: var(--muted); }
.plan-card.is-pro { border-color: var(--bronze); background: linear-gradient(180deg, var(--beige), var(--white) 60%); }
.plan-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 4px; }
.plan-opt { display: grid; gap: 2px; padding: 14px; border-radius: 14px; cursor: pointer; text-align: left; background: var(--bg); border: 1px solid var(--line-2); color: var(--ink); font: 14px var(--sans); }
.plan-opt strong { font: 700 22px/1.1 var(--serif); }
.plan-opt span { color: var(--muted); font-size: 13px; }
.plan-opt.is-on { border-color: var(--bronze); box-shadow: 0 0 0 3px rgba(168, 100, 47, .15); }
@media (max-width: 760px) { .account-grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.footer { background: var(--footer); color: rgba(243, 227, 200, .7); font-size: 14px; }
.footer-inner {
  width: var(--wrap); margin: 0 auto; padding: 34px 0 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.footer p { margin: 0; }
.footer-brand { display: flex; align-items: center; gap: 10px; font: 700 16px/1 var(--serif); color: #F3E3C8; letter-spacing: .06em; }
.footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.footer nav a:hover { color: #F3E3C8; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 90; max-width: calc(100% - 32px);
  padding: 14px 22px; border-radius: 14px; background: var(--ink); color: var(--bg); font-size: 14px;
  transform: translate(-50%, calc(100% + 40px)); opacity: 0; visibility: hidden;
  transition: transform .4s var(--ease), opacity .3s, visibility 0s .4s;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition: transform .4s var(--ease), opacity .3s; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .demo-grid { grid-template-columns: 22px minmax(0, 1fr); }
  .coach { grid-column: 1 / -1; }
  .features, .grid-socials { grid-template-columns: repeat(2, 1fr); }
  .plans { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
  .grid-contact, .analyze { grid-template-columns: 1fr; }
  .legal { grid-template-columns: 1fr; }
  .toc { display: none; }
}
@media (max-width: 860px) {
  .nav-links {
    position: absolute; top: 100%; left: 16px; right: 16px; flex-direction: column; padding: 10px;
    background: var(--white); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
    opacity: 0; pointer-events: none; transform: translateY(-6px); transition: .25s var(--ease);
  }
  .nav-links.open { opacity: 1; pointer-events: auto; transform: none; }
  .nav-links a { padding: 13px 14px; font-size: 16px; }
  .only-mobile { display: block; }
  .pill { display: none; }
  .burger {
    display: grid; gap: 6px; width: 42px; height: 42px; place-content: center; cursor: pointer;
    background: var(--white); border: 1px solid var(--line-2); border-radius: 50%;
  }
  .burger span { width: 18px; height: 1.5px; background: var(--ink); transition: transform .25s; }
  .burger.open span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .burger.open span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
}
@media (max-width: 640px) {
  .stats { gap: 24px; }
  .stats strong { font-size: 24px; }
  .features, .steps, .grid-socials { grid-template-columns: 1fr; }
  .section { padding-top: 84px; }
  .pgn-drop { flex-wrap: wrap; border-radius: 22px; padding: 12px; }
  .pgn-drop input { flex-basis: calc(100% - 40px); padding: 6px 0; }
  .pgn-drop .btn { width: 100%; }
  .waitlist { flex-direction: column; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer nav { justify-content: center; }
  .prose { padding: 4px 22px; }
  .embed iframe { height: 360px; }
  .board { box-shadow: var(--shadow), 0 0 0 4px var(--white); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* =================================================================
   PUZZLES
================================================================= */
.pz { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 28px; align-items: start; }
.pz-board-col .board-wrap { position: relative; }
.play-board { touch-action: none; user-select: none; -webkit-user-select: none; }
.play-board .pc { cursor: grab; transition: transform .45s cubic-bezier(.45, .05, .25, 1), opacity .3s ease; }
.play-board .pc.appear, .play-board .pc.gone { opacity: 0; }
.play-board .pc.dragging { transition: none; z-index: 9; cursor: grabbing; }
.sq.sel::after { content: ""; position: absolute; inset: 0; background: rgba(217, 138, 43, .5); }
.sq.dot::before { content: ""; position: absolute; z-index: 3; left: 50%; top: 50%; width: 26%; height: 26%; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(42, 26, 16, .22); }
.sq.cap::before { content: ""; position: absolute; z-index: 3; inset: 4%; border-radius: 50%; border: 5px solid rgba(42, 26, 16, .22); }
.sq.hint::after { content: ""; position: absolute; inset: 0; background: rgba(79, 130, 192, .45); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.pz-side { gap: 14px; }
.pz-side:hover { box-shadow: var(--shadow); }
.pz-head { display: flex; justify-content: space-between; align-items: center; }
.pz-theme { padding: 4px 10px; border-radius: 999px; font: 700 11px/1.4 var(--sans); letter-spacing: .08em; text-transform: uppercase; background: var(--beige); color: var(--bronze); }
.pz-theme[data-t="mate"] { background: rgba(207, 67, 52, .14); color: #b33a2c; }
.pz-theme[data-t="punish"] { background: rgba(214, 87, 122, .14); color: #b0405f; }
.pz-theme[data-t="defend"] { background: rgba(79, 130, 192, .14); color: #3b6aa3; }
.pz-count { font-size: 13px; color: var(--muted); font-weight: 600; }
.pz-turn { margin: 0; font: 700 26px/1.2 var(--serif); }
.pz-text { margin: 0; font-size: 16px; color: var(--ink-2); }
.pz-from { margin: 0; font-size: 14px; color: var(--muted); }
.pz-feedback { min-height: 24px; font-size: 15px; }
.pz-feedback.ok { color: #4f7d22; } .pz-feedback.err { color: #b33a2c; }
.pz-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pz-actions .btn-dark { margin-left: auto; }
.pz-review { font-size: 14px; color: var(--bronze); font-weight: 600; }
.pz-chips { flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--line); }
.pz-stats { margin: 0; font-size: 13px; color: var(--muted); }
.pz-lock, .rp-lock { max-width: 620px; margin: 0 auto; text-align: center; gap: 10px; }
.pz-lock h2, .rp-lock h2 { margin: 0; font: 700 28px/1.2 var(--serif); }
.pz-lock p, .rp-lock p { margin: 0; color: var(--muted); }
.pz-lock .empty-actions, .rp-lock .empty-actions { justify-content: center; margin-top: 8px; }
[data-theme="dark"] .sq.dot::before { background: rgba(0, 0, 0, .3); }

/* =================================================================
   WEAKNESS REPORT
================================================================= */
.rp-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 40px; }
.rp-stat { gap: 4px; padding: 18px 20px; }
.rp-stat strong { font: 700 32px/1.1 var(--serif); color: var(--bronze); }
.rp-stat span { font-size: 13px; color: var(--muted); }
.rp-h { margin: 0 0 16px; font: 700 26px/1.2 var(--serif); }
.rp-tips { display: grid; gap: 12px; margin-bottom: 40px; }
.rp-tip { flex-direction: row; gap: 18px; align-items: flex-start; padding: 20px 22px; }
.rp-tip h3 { margin: 0 0 6px; font: 700 19px/1.3 var(--serif); }
.rp-tip p { margin: 0; color: var(--ink-2); }
.rp-tip a { display: inline-block; margin-top: 8px; color: var(--bronze); font-weight: 600; font-size: 14px; }
.rp-tip-n { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--beige); color: var(--bronze); font: 700 18px/1 var(--serif); }
.rp-pro { position: relative; }
.rp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.blur { filter: blur(7px); pointer-events: none; user-select: none; opacity: .8; }
.rp-lock { position: absolute; left: 50%; top: 80px; transform: translateX(-50%); width: min(620px, calc(100% - 24px)); z-index: 3; box-shadow: var(--shadow), 0 30px 60px -30px rgba(42, 26, 16, .4); }
.rp-card { gap: 10px; }
.rp-card:hover { box-shadow: var(--shadow); }
.rp-card h3 { margin: 0 0 4px; font: 700 20px/1.2 var(--serif); }
.rp-card h4 { margin: 10px 0 0; font: 600 12px/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.rp-note { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.rp-bar { display: grid; grid-template-columns: 130px minmax(0, 1fr) 54px; gap: 12px; align-items: center; font-size: 14px; }
.rp-bar-l { color: var(--ink-2); }
.rp-bar-t { height: 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; }
.rp-bar-t i { display: block; height: 100%; border-radius: inherit; background: #6f9c33; }
.rp-bar.warm .rp-bar-t i { background: #e0762f; }
.rp-bar-r { text-align: right; font-weight: 700; }
.rp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rp-table th { text-align: left; font: 600 11px/1.4 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 0 6px 6px; }
.rp-table td { padding: 8px 6px; border-top: 1px solid var(--line); }
.rp-table td.low { color: #b33a2c; font-weight: 700; } .rp-table td.high { color: #4f7d22; font-weight: 700; }
.rp-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rp-duo > div { display: grid; gap: 2px; padding: 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.rp-duo strong { font: 700 28px/1.1 var(--serif); }
.rp-duo span { font-size: 13px; color: var(--ink-2); }
.rp-duo small { font-size: 12px; color: var(--muted); }
.rp-spark { width: 100%; height: 110px; overflow: visible; }
.rp-spark polyline { fill: none; stroke: var(--bronze); stroke-width: 2; vector-effect: non-scaling-stroke; }
.rp-spark circle { fill: var(--white); stroke: var(--bronze); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.rp-spark circle.win { fill: #6f9c33; stroke: #6f9c33; } .rp-spark circle.loss { fill: #cf4334; stroke: #cf4334; }

@media (max-width: 1020px) {
  .pz { grid-template-columns: 1fr; }
  .pz-board-col { max-width: 560px; width: 100%; margin: 0 auto; }
}
@media (max-width: 760px) {
  .rp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rp-grid { grid-template-columns: 1fr; }
  .rp-bar { grid-template-columns: 96px minmax(0, 1fr) 44px; }
}
.history-links { display: flex; gap: 8px; flex-wrap: wrap; margin: -10px 0 18px; }
.free-limit { margin: 16px 0 0; }

/* Legal pages */
mark.todo { background: rgba(217, 169, 46, .28); color: inherit; padding: 0 4px; border-radius: 4px; }
.legal-en { margin: -28px 0 40px; max-width: 680px; padding: 12px 16px; border-radius: 12px; background: var(--white); border: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.form-model { margin: 10px 0 0; padding: 18px 20px; border-left: 3px solid var(--bronze); border-radius: 0 12px 12px 0; background: var(--white); font-size: 15px; color: var(--ink-2); }
/* Terms box before paying */
.terms-check { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); font-size: 13px; line-height: 1.5; color: var(--ink-2); cursor: pointer; }
.terms-check input { margin-top: 3px; accent-color: var(--bronze); width: 16px; height: 16px; flex: none; }
.terms-check a { color: var(--bronze); font-weight: 600; }
.terms-check.need { border-color: #cf4334; box-shadow: 0 0 0 3px rgba(207, 67, 52, .12); }
.link-btn { display: block; margin: 8px auto 0; padding: 4px; border: 0; background: none; cursor: pointer; color: var(--muted); font: 500 13px var(--sans); text-decoration: underline; }
.link-btn:hover { color: #b33a2c; }
