/* Vail shard site: dark stone, parchment text, gold accents. */
:root {
  --bg: #12100e;
  --bg-2: #1b1714;
  --panel: #221d18;
  --panel-2: #2a231d;
  --line: #3d3328;
  --text: #e6dcc6;
  --muted: #a99c84;
  --gold: #d4a94f;
  --gold-2: #f0c96a;
  --red: #b5533c;
  --green: #7fa65a;
  --link: #e8c174;
  --radius: 10px;
  --wrap: 1120px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(1200px 600px at 50% -200px, rgba(212, 169, 79, 0.10), transparent 70%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 420px);
  background-color: var(--bg);
  color: var(--text);
  font-family: "Crimson Pro", Georgia, "Times New Roman", serif;
  font-size: 19px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--gold-2); text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: "Cinzel", Georgia, serif;
  color: var(--gold);
  line-height: 1.25;
  letter-spacing: 0.02em;
  margin: 1.6em 0 0.5em;
}
h1 { font-size: clamp(2rem, 5vw, 3rem); margin-top: 0; }
h2 { font-size: 1.6rem; border-bottom: 1px solid var(--line); padding-bottom: 0.3em; }
h3 { font-size: 1.2rem; color: var(--gold-2); }

p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
li { margin: 0.25em 0; }
strong { color: #f3e9d2; }
code, kbd {
  font-family: "Consolas", "SFMono-Regular", Menlo, monospace;
  font-size: 0.85em;
  background: #0d0b09;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.1em 0.4em;
  color: var(--gold-2);
}
pre {
  background: #0d0b09;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1em;
  overflow-x: auto;
  font-size: 0.9em;
}
pre code { border: 0; padding: 0; background: none; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

/* Header and navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(18, 16, 14, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: "Cinzel", serif; font-size: 1.5rem; color: var(--gold); font-weight: 700; letter-spacing: 0.08em; }
.brand:hover { text-decoration: none; color: var(--gold-2); }
.brand-mark { width: 30px; height: 30px; }
.nav-toggle { display: none; }
.nav-toggle-label { display: none; cursor: pointer; color: var(--gold); font-size: 1.6rem; padding: 4px 8px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.site-nav a {
  display: block;
  padding: 8px 14px;
  border-radius: 6px;
  font-family: "Cinzel", serif;
  font-size: 0.95rem;
  color: var(--text);
  letter-spacing: 0.04em;
}
.site-nav a:hover { background: var(--panel); color: var(--gold-2); text-decoration: none; }
.site-nav a.active { color: var(--gold); background: var(--panel); }
.site-nav a.cta { background: var(--gold); color: #1a140c; font-weight: 700; }
.site-nav a.cta:hover { background: var(--gold-2); color: #1a140c; }

@media (max-width: 760px) {
  .nav-toggle-label { display: block; }
  .site-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg-2); border-bottom: 1px solid var(--line); }
  .site-nav ul { flex-direction: column; padding: 8px 16px 16px; }
  .nav-toggle:checked ~ .site-nav { display: block; }
}

main { flex: 1; padding: 40px 0 60px; }

/* Hero */
.hero { text-align: center; padding: 70px 0 50px; }
.hero .eyebrow { font-family: "Cinzel", serif; color: var(--muted); letter-spacing: 0.3em; text-transform: uppercase; font-size: 0.85rem; }
.hero h1 { font-size: clamp(2.6rem, 8vw, 4.6rem); margin: 0.2em 0; text-shadow: 0 2px 20px rgba(212, 169, 79, 0.25); }
.hero .tagline { font-size: 1.3rem; color: var(--text); max-width: 680px; margin: 0 auto 1.6em; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  font-family: "Cinzel", serif;
  font-weight: 700;
  letter-spacing: 0.05em;
  border: 1px solid var(--gold);
  color: var(--gold);
  background: transparent;
}
.btn:hover { background: rgba(212, 169, 79, 0.12); text-decoration: none; color: var(--gold-2); }
.btn.primary { background: var(--gold); color: #1a140c; }
.btn.primary:hover { background: var(--gold-2); color: #1a140c; }

/* Connection box */
.connect-box {
  margin: 30px auto 0;
  max-width: 560px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 18px;
  text-align: left;
  box-shadow: var(--shadow);
}
.connect-box dt { color: var(--muted); font-family: "Cinzel", serif; font-size: 0.85rem; letter-spacing: 0.08em; align-self: center; }
.connect-box dd { margin: 0; font-family: "Consolas", Menlo, monospace; color: var(--gold-2); word-break: break-all; }

/* Cards and grids */
.grid { display: grid; gap: 18px; }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card { min-width: 0; }
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.card .icon { font-size: 1.8rem; line-height: 1; margin-bottom: 8px; display: block; }
a.card { color: var(--text); display: block; transition: border-color 0.15s, transform 0.15s; }
a.card:hover { border-color: var(--gold); transform: translateY(-2px); text-decoration: none; }

.section { margin: 60px 0; }
.section-title { text-align: center; margin-bottom: 28px; }
.section-title h2 { border: 0; margin-bottom: 0.2em; }
.section-title p { color: var(--muted); margin: 0; }

.callout {
  border-left: 4px solid var(--gold);
  background: var(--panel);
  padding: 14px 18px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.2em 0;
}
.callout.warn { border-left-color: var(--red); }
.callout.tip { border-left-color: var(--green); }
.callout p:last-child { margin: 0; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 1em 0 1.4em; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--panel-2); font-family: "Cinzel", serif; font-size: 0.85rem; letter-spacing: 0.05em; color: var(--gold); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) td { background: rgba(255, 255, 255, 0.02); }

.tag { display: inline-block; font-size: 0.75rem; font-family: "Cinzel", serif; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); letter-spacing: 0.05em; }
.tag.new { color: var(--green); border-color: var(--green); }

/* Steps */
ol.steps { list-style: none; counter-reset: step; padding: 0; }
ol.steps > li { counter-increment: step; position: relative; padding: 0 0 18px 52px; }
ol.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--panel-2); border: 1px solid var(--gold);
  color: var(--gold); font-family: "Cinzel", serif; font-weight: 700;
  display: grid; place-items: center;
}

/* Wiki layout */
.wiki { display: grid; grid-template-columns: 250px 1fr; gap: 36px; align-items: start; }
.wiki-side {
  position: sticky; top: 84px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px;
}
.wiki-side h4 { margin: 0 0 8px; font-size: 0.85rem; color: var(--muted); letter-spacing: 0.15em; text-transform: uppercase; }
.wiki-side ul { list-style: none; margin: 0 0 14px; padding: 0; }
.wiki-side li { margin: 0; }
.wiki-side a { display: block; padding: 5px 10px; border-radius: 6px; color: var(--text); font-size: 0.95rem; }
.wiki-side a:hover { background: var(--panel-2); text-decoration: none; color: var(--gold-2); }
.wiki-side a.active { background: var(--panel-2); color: var(--gold); border-left: 3px solid var(--gold); }
.wiki-body { min-width: 0; }
.wiki-body > h1 { margin-bottom: 0.3em; }
.wiki-body .lead { font-size: 1.15rem; color: var(--muted); margin-bottom: 1.5em; }
.breadcrumb { font-size: 0.9rem; color: var(--muted); margin-bottom: 10px; }

@media (max-width: 860px) {
  .wiki { grid-template-columns: 1fr; }
  .wiki-side { position: static; }
}

/* Page header (non-hero pages) */
.page-head { margin-bottom: 30px; }
.page-head .lead { font-size: 1.2rem; color: var(--muted); max-width: 760px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--bg); padding: 30px 0; color: var(--muted); font-size: 0.9rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--gold-2); }

/* Forms */
.field { display: block; margin-bottom: 16px; font-family: "Cinzel", serif; font-size: 0.9rem; color: var(--gold); letter-spacing: 0.04em; }
.field input, .field select, .field textarea {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px;
  background: #0d0b09; color: var(--text); border: 1px solid var(--line); border-radius: 8px;
  font-family: "Crimson Pro", Georgia, serif; font-size: 1.05rem;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); }
.cf-turnstile { margin: 4px 0 16px; }
.feedback-status { margin: 14px 0 0; color: var(--gold-2); min-height: 1.4em; }
button.btn { cursor: pointer; font-size: 1rem; }
button.btn:disabled { opacity: 0.6; cursor: wait; }
