/* ===== How to Play Catan - technical documentation styles ===== */

:root {
  --nav-w: 260px;
  --bg: #f6f1e7;            /* parchment */
  --paper: #fffdf8;
  --ink: #2b2620;
  --muted: #6b6257;
  --line: #e2d8c6;
  --accent: #b5452b;        /* brick red */
  --accent-dark: #8d3420;
  --sea: #1f4e6b;           /* navbar sea blue */
  --sea-dark: #163a50;
  --wood: #3f7a3a;
  --brick: #b5452b;
  --wheat: #d9a521;
  --sheep: #8bc34a;
  --ore: #6e7378;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

/* ---------- navbar (fixed, left) ---------- */

#navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--nav-w);
  height: 100vh;
  overflow-y: auto;
  padding: 28px 0 20px;
  background: linear-gradient(180deg, var(--sea) 0%, var(--sea-dark) 100%);
  color: #eaf2f7;
  border-right: 4px solid var(--wheat);
  display: flex;
  flex-direction: column;
}

#navbar header {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 0 24px 4px;
  color: #ffffff;
}

.nav-tagline {
  margin: 0 24px 22px;
  font-size: 0.85rem;
  color: #a9c5d6;
  font-style: italic;
}

.nav-link {
  display: block;
  padding: 11px 24px 11px 20px;
  color: #dbe8f0;
  text-decoration: none;
  border-left: 4px solid transparent;
  font-size: 0.97rem;
  transition: background 0.18s ease, border-color 0.18s ease, padding-left 0.18s ease;
}

.nav-link:hover,
.nav-link:focus {
  background: rgba(255, 255, 255, 0.08);
  border-left-color: var(--wheat);
  padding-left: 26px;
  color: #ffffff;
}

.nav-footer {
  margin: auto 24px 0;
  padding-top: 24px;
  font-size: 0.78rem;
  color: #8fb0c4;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ---------- main column ---------- */

#main-doc {
  margin-left: var(--nav-w);
  padding: 0 56px 72px;
  max-width: 980px;
}

/* hero */

.hero {
  padding: 56px 0 28px;
  border-bottom: 2px solid var(--line);
  margin-bottom: 20px;
}

.hero-kicker {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
}

.hero h1 {
  margin: 0 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.9rem;
  line-height: 1.1;
}

.hero h1 span {
  color: var(--accent);
}

.hero-sub {
  margin: 0 0 22px;
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 640px;
}

.resource-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.res {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.15);
}

.res.wood  { background: var(--wood); }
.res.brick { background: var(--brick); }
.res.wheat { background: var(--wheat); color: #3a2d05; }
.res.sheep { background: var(--sheep); color: #1f3307; }
.res.ore   { background: var(--ore); }

/* sections */

.main-section {
  padding: 36px 0 12px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 16px;
}

.main-section:last-of-type {
  border-bottom: none;
}

.main-section header {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.85rem;
  font-weight: 700;
  margin: 0 0 14px;
  padding-bottom: 8px;
  position: relative;
}

.main-section header::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  margin-top: 10px;
  background: var(--accent);
  border-radius: 2px;
}

.main-section h3 {
  font-size: 1.15rem;
  margin: 26px 0 8px;
  color: var(--sea);
}

.main-section p {
  margin: 0 0 14px;
}

.main-section ul,
.main-section ol {
  margin: 0 0 16px;
  padding-left: 26px;
}

.main-section li {
  margin-bottom: 7px;
}

.main-section li::marker {
  color: var(--accent);
  font-weight: 700;
}

code {
  font-family: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
  background: #ece3d1;
  color: var(--accent-dark);
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid #dccfb6;
}

/* numbered steps */

.steps {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 10px 14px 10px 54px;
  margin-bottom: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--sea);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* tips list */

.tips li {
  margin-bottom: 12px;
}

/* callout boxes */

.callout {
  border-radius: 10px;
  padding: 14px 18px;
  margin: 10px 0 18px;
  border-left: 6px solid;
}

.callout p {
  margin: 0;
}

.callout.tip {
  background: #e9f3e4;
  border-color: var(--wood);
}

.callout.warn {
  background: #fbe9e2;
  border-color: var(--brick);
}

/* tables */

.cost-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  font-size: 0.95rem;
}

.cost-table th,
.cost-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.cost-table th {
  background: var(--sea);
  color: #fff;
  font-weight: 600;
}

.cost-table tr:last-child td {
  border-bottom: none;
}

.cost-table tbody tr:nth-child(even) td {
  background: #f9f4ea;
}

/* FAQ */

.faq dt {
  font-weight: 700;
  color: var(--sea);
  margin-top: 18px;
  padding-left: 26px;
  position: relative;
}

.faq dt::before {
  content: "Q";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-family: Georgia, serif;
}

.faq dd {
  margin: 6px 0 0 26px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line);
}

/* footer */

.doc-footer {
  margin-top: 40px;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- responsive ---------- */

@media (max-width: 820px) {
  #navbar {
    position: relative;
    width: 100%;
    height: auto;
    max-height: none;
    padding: 20px 0 10px;
    border-right: none;
    border-bottom: 4px solid var(--wheat);
  }

  .nav-tagline {
    margin-bottom: 12px;
  }

  .nav-link {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 4px 6px 16px;
    border-left: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
  }

  .nav-link:hover,
  .nav-link:focus {
    padding-left: 14px;
    background: rgba(255, 255, 255, 0.18);
  }

  .nav-footer {
    display: none;
  }

  #main-doc {
    margin-left: 0;
    padding: 0 20px 48px;
  }

  .hero {
    padding-top: 28px;
  }

  .hero h1 {
    font-size: 2.1rem;
  }

  .cost-table {
    font-size: 0.86rem;
  }

  .cost-table th,
  .cost-table td {
    padding: 8px 10px;
  }
}
