.ci-hero{background:linear-gradient(125deg,#1c2f4a,#2f4569);padding:64px 0 58px}
.ci-hero-inner{max-width:780px;text-align:center}
.ci-hero h1{font-size:clamp(36px,6vw,54px);line-height:1.1;color:#fff;margin:18px 0 12px}
.ci-hero h1 em{display:block;font-style:normal;color:var(--gold-2)}
.ci-hero p{color:rgba(255,255,255,.82);font-size:16px;max-width:620px;margin:0 auto}
.chess-tabs a{text-decoration:none}
.ci-content{padding-top:42px;padding-bottom:56px}
.ci-card{background:#fff;border:1px solid var(--border);border-radius:14px;padding:26px;box-shadow:0 4px 14px rgba(28,47,74,.06);margin-bottom:20px}
.ci-card h2{color:var(--navy);font-size:25px;margin-bottom:7px}
.ci-muted{color:var(--muted);font-size:14px}
.ci-search{display:grid;grid-template-columns:1fr minmax(260px,.9fr);column-gap:38px;row-gap:16px;align-items:start}
.ci-search>div{padding-top:4px}
.ci-search .eyebrow,.ci-coach .eyebrow,.ci-section-heading .eyebrow{margin-bottom:8px}
.ci-form{display:grid;gap:8px}
.ci-form label,.ci-coach label{font-size:13px;font-weight:700;color:var(--navy);margin-top:4px}
.ci-form input,.ci-form select,.ci-coach textarea{width:100%;border:1px solid #cbd5e1;border-radius:8px;padding:11px 12px;background:#fff;color:#1e293b;font:inherit}
.ci-form input:focus,.ci-form select:focus,.ci-coach textarea:focus{outline:3px solid rgba(201,168,76,.3);border-color:#8a6d1a}
.ci-button{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:10px 16px;border-radius:8px;font:600 14px 'Inter',sans-serif;text-decoration:none;cursor:pointer;border:1px solid transparent}
.ci-button-primary{background:var(--navy);color:#fff}
.ci-button-primary:hover{background:var(--navy-2)}
.ci-button-secondary{background:#fff;color:var(--navy);border-color:#cbd5e1}
.ci-button-secondary:hover{background:#f8fafc}
.ci-status{grid-column:1/-1;min-height:21px;font-size:13px;color:#475569}
.ci-results[hidden]{display:none}
.ci-profile-top,.ci-section-heading,.ci-game-top,.ci-actions,.ci-game-actions{display:flex;align-items:center;justify-content:space-between;gap:12px}
.ci-profile-top{margin-bottom:8px}
.ci-profile-top h2{margin:0}
.ci-profile-link,.ci-text-link{color:#294c75;font-size:13px;font-weight:700;text-decoration:underline;text-underline-offset:3px}
.ci-small-heading{font-size:15px;color:var(--navy);margin:22px 0 10px}
.ci-ratings{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px 18px}
.ci-ratings dt{font-size:12px;color:var(--muted);text-transform:capitalize}
.ci-ratings dd{font-weight:700;color:var(--navy);font-size:15px}
.ci-games{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:18px}
.ci-game{padding:16px;border:1px solid var(--border);border-radius:10px;background:#fbfcfd}
.ci-game h3{font:600 15px 'Inter',sans-serif;color:var(--navy)}
.ci-game-top{align-items:flex-start;margin-bottom:5px}
.ci-result{white-space:nowrap;font-size:11px;font-weight:700;padding:3px 8px;border-radius:20px;background:#f1f5f9;color:#475569}
.ci-result.win{background:#ecfdf5;color:#047857}
.ci-result.loss{background:#fff1f2;color:#be123c}
.ci-game-actions{justify-content:flex-start;margin-top:10px}
.ci-game-coach{background:none;border:0;padding:0;font-family:inherit;cursor:pointer}
.ci-coach{margin-top:20px}
.ci-coach>p{max-width:760px;margin:0 0 14px}
.ci-coach textarea{display:block;resize:vertical;min-height:150px;font:13px/1.55 ui-monospace,Consolas,monospace;margin:6px 0 14px}
.ci-actions{justify-content:flex-start;flex-wrap:wrap}
.ci-coach .ci-status{margin-top:12px}
.ci-footnote{font-size:12px;color:var(--muted);margin:24px 2px 0}
.ci-footer{display:flex;justify-content:space-between;align-items:center;gap:15px;flex-wrap:wrap;font-size:13px}
.ci-footer a{color:rgba(255,255,255,.8);text-decoration:underline}
@media(max-width:760px){
  .ci-search{grid-template-columns:1fr}
  .ci-games{grid-template-columns:1fr}
  .ci-ratings{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ci-content{padding-top:26px}
  .ci-card{padding:20px}
  .ci-profile-top,.ci-section-heading{align-items:flex-start}
  .navwrap{height:auto;min-height:60px}
  .chess-tabs{display:flex}
}

.ci-study-frame{overflow:hidden;border:1px solid var(--border);border-radius:10px;background:#f8fafc;margin-top:18px}
 .ci-study-frame iframe{display:block;width:100%;height:min(72vh,720px);min-height:560px;border:0}
@media(max-width:760px){
  .ci-study-frame iframe{height:70vh;min-height:500px}
  .navwrap{height:auto;min-height:60px;flex-wrap:wrap;overflow:visible;justify-content:center;padding-top:8px;padding-bottom:8px}
  .chess-tabs{display:flex;width:100%;justify-content:center;flex-wrap:wrap}
}

.ci-study-chapters{display:flex;gap:10px;flex-wrap:wrap;margin:18px 0}
.ci-study-chapter{border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:var(--navy);padding:10px 14px;font:600 13px 'Inter',sans-serif;cursor:pointer}
.ci-study-chapter:hover{background:#f8fafc}
.ci-study-chapter.active{background:var(--navy);border-color:var(--navy);color:#fff}
.ci-study-heading{margin-bottom:8px}
.ci-study-heading h3{font:600 16px 'Inter',sans-serif;color:var(--navy);margin:0}
@media(max-width:760px){.ci-study-chapter{flex:1 1 100%;text-align:left}.ci-study-heading{align-items:flex-start}}

.ci-player-search{margin:22px 0 18px}
.ci-player-search label{display:block;color:var(--navy);font-size:13px;font-weight:700;margin-bottom:7px}
.ci-player-search input{display:block;width:100%;min-height:46px;border:1px solid var(--border);border-radius:9px;padding:11px 13px;font:inherit;color:#1e293b;background:#fff}
.ci-player-search input:focus{outline:3px solid rgba(201,168,76,.28);border-color:var(--gold)}
.ci-search-help,.ci-search-empty{font-size:12px;color:var(--muted);margin-top:7px}
.ci-search-list{list-style:none;display:grid;gap:8px;margin-top:12px}
.ci-search-result{width:100%;text-align:left;background:#f8fafc;border:1px solid var(--border);border-radius:8px;padding:11px 12px;color:var(--navy);font:600 13px/1.5 'Inter',sans-serif;cursor:pointer}
.ci-search-result:hover,.ci-search-result:focus{background:#eef3fa;border-color:#b8c5d7}
@media(max-width:600px){.ci-player-search{margin:18px 0 15px}.ci-search-result{font-size:12.5px}}

.ci-notation{display:none}
@media(max-width:760px){
  .ci-notation{display:block;margin:18px 0;border:1px solid var(--border);border-radius:10px;background:#f8fafc;padding:12px}
  .ci-notation summary{font-weight:700;color:var(--navy);cursor:pointer;margin-bottom:10px}
  .ci-notation-scroll{overflow-x:hidden}
  .ci-notation table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:13px}
  .ci-notation th,.ci-notation td{padding:7px 8px;border-bottom:1px solid var(--border);text-align:left}
  .ci-notation thead th{color:var(--muted);font-size:11px}
  .ci-notation tbody th{width:36px;color:var(--muted);font-weight:500}
  .ci-notation tbody td{font-weight:600;color:var(--navy)}
  .ci-notation tbody tr:nth-child(even){background:rgba(226,232,240,.45)}
}
@media(max-width:760px){.ci-study-frame{display:block!important}.ci-study-frame iframe{height:640px;min-height:640px}}

/* Free opening and middlegame practice trainer */
.ci-training-card{margin-top:26px}
.training-controls{display:grid;grid-template-columns:1fr 2fr 1fr;gap:12px;margin:20px 0 16px}
.training-controls label{display:grid;gap:6px;color:var(--navy);font-size:13px;font-weight:700}
.training-controls select{width:100%;min-width:0;padding:10px 12px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#1e293b;font:500 14px Inter,sans-serif}
.training-progress{margin:10px 0;color:#475569;font-size:13px;font-weight:700}
.training-board{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));width:min(100%,520px);aspect-ratio:1;margin:0 auto;border:3px solid #1c2f4a;border-radius:5px;overflow:hidden;touch-action:manipulation}
.training-square{position:relative;display:flex;align-items:center;justify-content:center;min-width:0;aspect-ratio:1;padding:0;border:0;font-family:Arial,sans-serif;font-size:clamp(22px,6vw,54px);line-height:1;cursor:pointer}
.training-square.light{background:#f0d9b5}
.training-square.dark{background:#7796a8}
.training-square.white-piece{color:#fff;text-shadow:0 1px 2px #132238,1px 0 2px #132238,-1px 0 2px #132238,0 -1px 2px #132238}
.training-square.black-piece{color:#1d2732;text-shadow:0 1px 1px #fff9}
.training-square.selected{box-shadow:inset 0 0 0 4px #e2bd54}
.training-square.legal-target:after{content:"";position:absolute;width:24%;height:24%;border-radius:50%;background:#1c2f4a66}
.training-square.legal-target.white-piece:after,.training-square.legal-target.black-piece:after{width:90%;height:90%;border:4px solid #1c2f4a88;background:transparent}
.training-status{min-height:26px;margin:13px auto 4px;max-width:520px;color:#475569;font-size:14px;font-weight:600}
.training-status[data-kind="success"]{color:#087443}
.training-status[data-kind="retry"]{color:#9a3412}
.training-actions{display:flex;flex-wrap:wrap;gap:8px;max-width:520px;margin:10px auto}
.training-actions button[hidden]{display:none}
.training-note{max-width:520px;margin:12px auto 0;color:var(--muted);font-size:12px}
@media(max-width:760px){
 .ci-training-card{padding:18px}
 .training-controls{grid-template-columns:1fr 1fr;gap:10px}
 .training-controls label:nth-child(2){grid-column:1/-1;grid-row:1}
 .training-board{width:100%;max-width:430px}
 .training-square{font-size:clamp(21px,10vw,45px)}
 .training-actions{display:grid;grid-template-columns:1fr 1fr}
 .training-actions #training-next{grid-column:1/-1}
}
