/* Shared styles for the text pages (guides, about, policies). Same palette as the boards. */
:root {
  --paper: #ece8df;
  --panel: #f7f5ef;
  --ink: #1c1c1a;
  --muted: #6d695f;
  --line: #d3cdbf;
  --line-strong: #b9b2a2;
  --mark: #c8372d;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.75 "IBM Plex Sans", "IBM Plex Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex; flex-direction: column;
}
button { font: inherit; color: inherit; }
a { color: inherit; }

/* only the chosen language is shown */
html[lang="ko"] .en, html[lang="en"] .ko { display: none !important; }

/* ---------- header ---------- */
.site-head {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 12px 20px;
  border-bottom: 1px solid var(--ink);
  background: var(--panel);
}
.site-head .brand { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; text-decoration: none; }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.site-nav a {
  text-decoration: none; font-size: 14px; padding: 6px 10px; border-radius: 8px; color: var(--muted);
}
.site-nav a:hover { color: var(--ink); background: #e3ded2; }
.site-nav a[aria-current="page"] { color: var(--ink); background: #e3ded2; font-weight: 600; }

.btn {
  height: 32px; padding: 0 12px;
  background: transparent; border: 1px solid var(--line-strong); border-radius: 8px;
  cursor: pointer; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 14px;
}
.btn:hover { border-color: var(--ink); }

.dd { position: relative; }
.dd-chev { transition: transform .15s; }
.dd-btn[aria-expanded="true"] .dd-chev { transform: rotate(180deg); }
.dd-list {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 20;
  min-width: 140px; margin: 0; padding: 4px; list-style: none;
  background: var(--panel); border: 1px solid var(--ink); border-radius: 8px;
  box-shadow: 4px 4px 0 rgba(28,28,26,.18);
}
.dd-list[hidden] { display: none; }
.dd-list button {
  width: 100%; height: 32px; padding: 0 10px; text-align: left; font-size: 14px;
  border: 0; background: none; border-radius: 6px; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
}
.dd-list button:hover, .dd-list button:focus-visible { background: #e3ded2; outline: none; }
.dd-list [aria-selected="true"]::after { content: "✓"; font-size: 12px; }

/* ---------- article ---------- */
main.doc {
  flex: 1;
  width: 100%; max-width: 780px; margin: 0 auto;
  padding: 48px 20px 64px;
}
.doc h1 { font-size: 32px; line-height: 1.3; letter-spacing: -0.03em; margin: 0 0 10px; }
.doc .lead { font-size: 18px; color: var(--muted); margin: 0 0 32px; }
.doc .updated { font-size: 13px; color: var(--muted); margin: -20px 0 32px; }
.doc h2 {
  font-size: 23px; letter-spacing: -0.02em; line-height: 1.35;
  margin: 48px 0 12px; padding-top: 20px; border-top: 1px solid var(--line);
}
.doc h3 { font-size: 18px; margin: 28px 0 8px; }
.doc p, .doc ul, .doc ol { margin: 0 0 16px; }
.doc li { margin-bottom: 6px; }
.doc strong { font-weight: 600; }
.doc a { text-underline-offset: 3px; }
.doc code, .doc kbd {
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 13px;
  border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px;
  padding: 0 5px; background: #fff;
}
.doc table { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: 15px; }
.doc th, .doc td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { font-weight: 600; background: var(--panel); }
.toc {
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: 12px;
  padding: 16px 20px; margin: 0 0 8px;
}
.toc p { margin: 0 0 6px; font-weight: 600; font-size: 14px; }
.toc ol { margin: 0; padding-left: 20px; font-size: 15px; }
.toc li { margin-bottom: 2px; }
.note {
  background: var(--panel); border-left: 3px solid var(--ink); border-radius: 0 10px 10px 0;
  padding: 12px 16px; margin: 0 0 20px; font-size: 15px;
}
.cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 10px; background: var(--ink); color: var(--panel);
  text-decoration: none; font-weight: 600; font-size: 15px;
}
.cta:hover { background: #000; }

/* formation / set entries */
.play {
  display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: start;
  margin: 28px 0 8px;
}
.play figure { margin: 0; }
.play .mini {
  width: 100%; border-radius: 12px; overflow: hidden; border: 1px solid var(--line-strong);
  background: var(--panel);
}
.play .mini svg { display: block; width: 100%; height: auto; }
.play figcaption { font-size: 12px; color: var(--muted); margin-top: 6px; }
.play h3 { margin-top: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; padding: 0; list-style: none; }
.tags li {
  font-size: 12px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: #fff; margin: 0;
}

/* ---------- footer ---------- */
.site-foot {
  border-top: 1px solid var(--line);
  padding: 20px; font-size: 13px; color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between;
}
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.site-foot a { text-decoration: none; }
.site-foot a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 680px) {
  main.doc { padding: 32px 16px 48px; }
  .doc h1 { font-size: 26px; }
  .play { grid-template-columns: 1fr; gap: 12px; }
  .site-head { gap: 10px; }
  .site-nav { order: 3; flex-basis: 100%; }
}

/* standalone diagrams inside the text (curling guide) */
.doc figure.mini { border-radius: 12px; overflow: hidden; border: 1px solid var(--line-strong); background: var(--panel); }
.doc figure.mini svg { display: block; width: 100%; height: auto; }

/* keep the right 300px free for side-rail ads (Google auto ads) on wide screens */
@media (min-width: 1400px) {
  main.doc { margin-left: max(24px, calc((100vw - 780px - 300px) / 2)); margin-right: 300px; }
}
