/* Rankfile Chess Academy: a fictional academy website for ChessRooq Arbiter option 2 demos. System fonts only. */
:root {
  --green: #1d4636; --green-2: #2c634d; --gold: #c99a2e; --gold-2: #e5bb57; --cream: #f8f5ef; --paper: #fff;
  --ink: #1e2622; --ink-2: #5d6a64; --line: #e4dccd; --ok: #2f7d4f; --warn: #a8641a; --bad: #b23b3b; --radius: 12px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--sans); color: var(--ink); background: var(--cream); line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--green-2); }
h1, h2, h3 { font-family: var(--serif); color: var(--green); line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(32px, 5vw, 50px); }
h2 { font-size: clamp(24px, 3.2vw, 32px); }
h3 { font-size: 19px; }
p { margin: 0 0 1em; }
code { font-family: var(--mono); font-size: .92em; background: #f1ece1; padding: 1px 6px; border-radius: 5px; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 22px; }
.muted { color: var(--ink-2); }
.small { font-size: 13.5px; }

/* Demo ribbon */
.ribbon { background: #fff4d8; border-bottom: 1px solid var(--line); color: #6b4a14; font-size: 13px; }
.ribbon .wrap { padding: 7px 22px; }

/* Header */
.top { background: var(--green); color: #fff; position: sticky; top: 0; z-index: 10; box-shadow: 0 2px 12px rgba(0,0,0,.16); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 66px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 11px; color: #fff; text-decoration: none; }
.brand img { width: 38px; height: 38px; }
.brand b { font-family: var(--serif); font-size: 20px; font-weight: 600; }
.brand small { display: block; font-size: 10.5px; letter-spacing: .15em; text-transform: uppercase; color: var(--gold-2); }
nav { display: flex; gap: 2px; flex-wrap: wrap; }
nav a { color: #e3eee9; text-decoration: none; font-size: 14.5px; font-weight: 500; padding: 7px 12px; border-radius: 999px; }
nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
nav a.on { background: var(--gold); color: #1d1404; }
nav a.cta { border: 1px solid var(--gold-2); color: var(--gold-2); }
@media (max-width: 760px) { .top .wrap { flex-direction: column; align-items: flex-start; padding: 10px 16px; } }

/* Hero */
.hero { background: radial-gradient(1000px 420px at 85% -10%, rgba(201,154,46,.25), transparent 60%), linear-gradient(160deg, var(--green) 0%, #10291f 100%); color: #e9f2ee; }
.hero .wrap { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; padding: 64px 22px 72px; }
.hero h1 { color: #fff; }
.hero .lead { font-size: 18.5px; color: #cadbd3; max-width: 34em; }
.hero .board { width: 100%; max-width: 320px; justify-self: end; border-radius: 10px; box-shadow: 0 18px 50px rgba(0,0,0,.35); }
@media (max-width: 820px) { .hero .wrap { grid-template-columns: 1fr; } .hero .board { justify-self: start; max-width: 220px; } }
.btn { display: inline-block; padding: 11px 20px; border-radius: 999px; font-weight: 600; text-decoration: none; font-size: 15px; border: 0; cursor: pointer; }
.btn.gold { background: var(--gold); color: #1d1404; }
.btn.ghost { border: 1px solid rgba(255,255,255,.4); color: #fff; }
.btn.line { border: 1px solid var(--green-2); color: var(--green-2); background: transparent; }
.btn.green { background: var(--green); color: #fff; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }

/* Sections and cards */
section { padding: 56px 0; }
section.alt { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
section.alt .card { background: var(--cream); }
.card h3 { margin-bottom: .35em; }
.price { font-family: var(--serif); font-size: 26px; color: var(--green); margin: 6px 0 10px; }
.price small { font-family: var(--sans); font-size: 13px; color: var(--ink-2); }
.card ul { padding-left: 18px; margin: 0; }
.card li { margin: 4px 0; }
.tag { display: inline-block; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; padding: 2px 9px; border-radius: 999px; background: #e7f1ec; color: var(--green-2); }
.tag.gold { background: #faefd2; color: #7a5810; }
.tag.warn { background: #fbe9d6; color: var(--warn); }
.tag.bad { background: #f7dfdf; color: var(--bad); }
.tag.ok { background: #e1f1e7; color: var(--ok); }
.coach { display: flex; gap: 14px; align-items: flex-start; }
.avatar { flex: none; width: 54px; height: 54px; border-radius: 50%; background: var(--green-2); color: #fff; display: grid; place-items: center; font-family: var(--serif); font-size: 20px; }

/* Tournament banner (the link to the ChessRooq-powered tournament site) */
.tsite { background: var(--paper); border: 2px solid var(--gold); border-radius: var(--radius); padding: 24px; display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; }
.tsite .addr { font-family: var(--mono); font-size: 15px; color: var(--green); }
@media (max-width: 700px) { .tsite { grid-template-columns: 1fr; } }

table.t { width: 100%; border-collapse: collapse; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 14.5px; }
table.t th, table.t td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t th { background: #f3eee4; font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); }
table.t tr:last-child td { border-bottom: 0; }

form.f label { display: block; font-weight: 600; font-size: 14px; margin: 12px 0 4px; }
form.f input, form.f select, form.f textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; }

footer { background: #10291f; color: #b7c9c0; font-size: 14px; padding: 34px 0; }
footer a { color: var(--gold-2); }
footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* ===== Admin ===== */
body.admin { background: #f2f0ea; }
.shell { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.side { background: #142f24; color: #cfe0d8; padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .brand { padding: 4px 8px 18px; }
.side .brand b { font-size: 17px; }
.side a.nav { display: flex; gap: 10px; align-items: center; color: #cfe0d8; text-decoration: none; padding: 9px 12px; border-radius: 8px; font-size: 14.5px; margin: 1px 0; }
.side a.nav:hover { background: rgba(255,255,255,.07); }
.side a.nav.on { background: var(--gold); color: #1d1404; font-weight: 600; }
.side .grp { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #7e9a8d; margin: 16px 12px 6px; }
.side .ext::after { content: "↗"; margin-left: auto; opacity: .7; }
.main { padding: 0 0 50px; min-width: 0; }
.bar { background: #fff; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; padding: 12px 28px; gap: 12px; }
.bar .who { font-size: 14px; color: var(--ink-2); }
.page { padding: 26px 28px; max-width: 1080px; }
.page h1 { font-size: 30px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat b { display: block; font-family: var(--serif); font-size: 28px; color: var(--green); }
.stat span { font-size: 13px; color: var(--ink-2); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 18px; }
.panel h2 { font-size: 21px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
@media (max-width: 860px) { .shell { grid-template-columns: 1fr; } .side { position: static; height: auto; } }

/* Setup walkthrough */
.steps { counter-reset: s; display: grid; gap: 14px; }
.stepbox { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 18px 66px; position: relative; }
.stepbox::before { counter-increment: s; content: counter(s); position: absolute; left: 18px; top: 18px; width: 32px; height: 32px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-weight: 700; }
.stepbox.done::before { content: "✓"; background: var(--ok); }
.stepbox h3 { margin-bottom: .3em; }
.who-does { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; }
.record { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; background: #f7f4ec; border: 1px dashed #cdbf9e; border-radius: 10px; padding: 14px 16px; font-size: 14.5px; margin: 10px 0; }
.record dt { color: var(--ink-2); }
.record dd { margin: 0; font-family: var(--mono); color: var(--green); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 0; }
.tabs button { font: inherit; font-size: 14px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.tabs button.on { background: var(--green); color: #fff; border-color: var(--green); }
.tabpane { display: none; border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; margin-top: 10px; background: #fcfbf8; font-size: 14.5px; }
.tabpane.on { display: block; }
.tabpane ol { margin: 0; padding-left: 20px; }
.tabpane li { margin: 5px 0; }
.note { border-left: 4px solid var(--gold); background: #fdf7e7; padding: 10px 14px; border-radius: 0 8px 8px 0; font-size: 14px; margin: 10px 0; }
.note.bad { border-color: var(--bad); background: #fbefef; }
.flow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; margin: 8px 0 4px; }
.flow .node { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.flow .node b { display: block; font-family: var(--mono); font-size: 13px; color: var(--green); }
.flow .arrow { color: var(--ink-2); }
.check { font-family: var(--mono); font-size: 13.5px; }
.check.ok { color: var(--ok); }
.check.bad { color: var(--bad); }
