/* Bean Squad — site styles. One stylesheet for every page; no scripts, no web
   fonts, no third-party requests. Text colours are the game's UI kit ink
   (kit/ui.json): #2b3242 ink, #1f68c9 link blue, #f2563f coral for accents. */

:root {
  color-scheme: light;
  --ground: #f6f8fc;
  --surface: #ffffff;
  --line: #dde3ee;
  --text: #2b3242;
  --muted: #5d6578;
  --link: #1f68c9;
  --accent: #f2563f;
  --sans: system-ui, -apple-system, "Segoe UI", "Apple SD Gothic Neo",
    "Noto Sans KR", "Malgun Gothic", Roboto, sans-serif;
  --measure: 72ch;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ground: #151924;
    --surface: #1d2230;
    --line: #2f3647;
    --text: #e8ecf4;
    --muted: #a6aec0;
    --link: #7fb0f5;
    --accent: #ff8a75;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.7;
}

main {
  flex: 1 0 auto;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  z-index: 2;
}

.shell {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.top {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.top-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.brand img {
  border-radius: 22%;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  font-size: 0.95rem;
}

.top-nav a {
  color: var(--muted);
  text-decoration: none;
}

.top-nav a[aria-current="page"] {
  color: var(--text);
  font-weight: 700;
}

.top-nav a:hover {
  color: var(--link);
}

/* Landing */
.hero {
  padding: 2.5rem 0 1rem;
  text-align: center;
}

.hero img {
  margin: 0 auto 1.25rem;
  width: min(100%, 30rem);
}

.hero .tagline {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 700;
}

.hero p {
  max-width: 40rem;
  margin: 0 auto 1rem;
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
  padding: 1.5rem 0 3rem;
}

.card {
  display: block;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  color: var(--text);
  text-decoration: none;
}

.card strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--link);
}

.card span {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Legal documents */
.doc {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.doc h1 {
  margin: 0 0 0.25rem;
  font-size: 1.9rem;
  line-height: 1.25;
}

.doc .meta {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.doc h2 {
  margin: 2.25rem 0 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  font-size: 1.3rem;
  line-height: 1.35;
}

.doc h3 {
  margin: 1.5rem 0 0.25rem;
  font-size: 1.05rem;
}

.doc li + li {
  margin-top: 0.35rem;
}

.toc {
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}

.toc p {
  margin: 0 0 0.25rem;
  font-weight: 700;
}

.toc ol {
  margin: 0;
  padding-left: 1.25rem;
}

.table-scroll {
  overflow-x: auto;
  margin: 1rem 0;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--surface);
}

table {
  width: 100%;
  min-width: 36rem;
  border-collapse: collapse;
  font-size: 0.93rem;
  line-height: 1.55;
}

th,
td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--ground);
}

tr:last-child td {
  border-bottom: 0;
}

.note {
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--accent);
  background: var(--surface);
}

.contact {
  margin-top: 2.5rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}

.contact p {
  margin: 0;
}

/* 404 */
.lost {
  padding: 3rem 0;
  text-align: center;
}

.lost img {
  margin: 0 auto 1rem;
  border-radius: 22%;
}

/* Footer */
.foot {
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9rem;
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}

.foot p {
  margin: 0;
}
