/* The Apache Tongues — theme mirrored from the Muse master (theme.css values). */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;0,9..144,700;1,9..144,400;1,9..144,600&display=swap');

:root {
  --bg: #f3ead9; --surface: #faf4e6; --surface-2: #eadfc8; --text: #2a1d12; --dim: #6d5b45;
  --border: #d8c8a6; --accent: #9a3b26; --teal: #2e6f6a; --ochre: #b07a1e; --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d130c; --surface: #2a1c11; --surface-2: #38271a; --text: #f1e6d2; --dim: #bfa888;
    --border: #4d3a28; --accent: #d97a52; --teal: #5fb3a9; --ochre: #d9a84e;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text);
  font-family: ui-sans-system, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; line-height: 1.55; }
h1, h2, h3, .serif { font-family: "Fraunces", Georgia, serif; }
a { color: var(--teal); }
.wrap { max-width: 64rem; margin: 0 auto; padding: 0 1rem; }

nav.top { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--border); }
nav.top .wrap { display: flex; align-items: center; gap: 1rem; min-height: 52px; flex-wrap: wrap; }
nav.top .brand { font-family: "Fraunces", Georgia, serif; font-weight: 700; color: var(--text); text-decoration: none; }
nav.top a.navlink { color: var(--dim); text-decoration: none; font-size: .92rem; }
nav.top a.navlink:hover { color: var(--accent); }

.hero { position: relative; color: #fff; }
.hero img { width: 100%; height: 420px; object-fit: cover; display: block; background: #38271a; }
.hero .overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,10,4,.25), rgba(20,10,4,.78)); }
.hero .inner { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; }
.hero .inner .wrap { width: 100%; padding-bottom: 2rem; }
.kicker { text-transform: uppercase; letter-spacing: .18em; font-size: .78rem; font-weight: 700; color: var(--teal); }
.hero .kicker { color: #e8b34b; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); margin: .3rem 0 .6rem; color: #fff; }
.hero p { max-width: 44rem; color: #f5ead2; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .55rem 1.2rem;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-weight: 600; cursor: pointer; text-decoration: none; font-size: .95rem; }
.btn.rust { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.teal { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.ghost { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.5); }
.btn.small { min-height: 36px; padding: .3rem .8rem; font-size: .85rem; }
.tongue-strip { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; padding: .9rem 0; font-family: "Fraunces", Georgia, serif;
  font-style: italic; font-size: 1.05rem; }
.tongue-strip a { color: var(--accent); text-decoration: none; }

section { padding: 2.6rem 0 .6rem; }
section h2 { font-size: clamp(1.7rem, 4vw, 2.3rem); margin: .35rem 0 .5rem; }
section .intro { color: var(--dim); max-width: 46rem; }
h3.sub { font-size: 1.35rem; margin: 1.8rem 0 .4rem; }

.grid { display: grid; gap: 1rem; }
.grid.cols-2 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.card h3, .card h4 { margin: .2rem 0 .4rem; }
.card .dim { color: var(--dim); }
.card figure { margin: -1rem -1rem .8rem; }
.card figure img { width: 100%; height: 170px; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; display: block; background: var(--surface-2); }
.card figcaption { font-size: .8rem; color: var(--dim); padding: .4rem 1rem 0; }
dl.facts { display: grid; grid-template-columns: auto 1fr; gap: .15rem .8rem; margin: .6rem 0; font-size: .92rem; }
dl.facts dt { font-weight: 700; color: var(--dim); }
dl.facts dd { margin: 0; }

.chip { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--border); border-radius: 999px;
  padding: .12rem .6rem; font-size: .78rem; font-weight: 600; background: var(--surface); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.chip .dot.teal { background: var(--teal); } .chip .dot.ochre { background: var(--ochre); } .chip .dot.rust { background: var(--accent); }
.chip.recognition { color: var(--dim); font-weight: 500; }

.status-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.status-list li { display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  border-bottom: 1px dotted var(--border); padding-bottom: .45rem; }

.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table.words { border-collapse: collapse; min-width: 34rem; width: 100%; }
table.words th, table.words td { padding: .5rem .8rem; text-align: left; border-bottom: 1px solid var(--border); }
table.words th { background: var(--surface-2); }
table.words td:first-child, table.words th:first-child { position: sticky; left: 0; background: var(--surface); font-weight: 600; }
table.words th:first-child { background: var(--surface-2); }
.mobile-hint { display: none; color: var(--dim); font-size: .85rem; }
@media (max-width: 640px) { .mobile-hint { display: block; } }

.pron-grid .mark { font-family: "Fraunces", Georgia, serif; color: var(--accent); font-size: 1.4rem; font-weight: 700; }

form.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; display: grid; gap: .7rem; margin: 1rem 0; }
form.panel label { display: grid; gap: .25rem; font-size: .9rem; font-weight: 600; }
form.panel input, form.panel select, form.panel textarea, input.search, select.filter {
  min-height: 44px; padding: .5rem .7rem; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--text); font: inherit; width: 100%; }
form.panel textarea { min-height: 90px; }
.form-error { color: var(--accent); font-weight: 600; min-height: 1.2em; }
.toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: 1rem 0; }
.toolbar .search, .toolbar .filter { flex: 1 1 200px; width: auto; }
.pills { display: flex; flex-wrap: wrap; gap: .45rem; margin: .8rem 0; }
.pills button { min-height: 36px; padding: .3rem .85rem; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer; font-weight: 600; font-size: .88rem; }
.pills button.active { background: var(--teal); border-color: var(--teal); color: #fff; }
.empty { border: 1px dashed var(--border); border-radius: var(--radius); padding: 1.4rem; text-align: center; color: var(--dim); background: var(--surface); }
.empty .big { font-family: "Fraunces", Georgia, serif; color: var(--text); font-size: 1.15rem; display: block; margin-bottom: .3rem; }
.word-big { font-family: "Fraunces", Georgia, serif; font-size: 1.7rem; font-weight: 700; }
.icon-btn { background: none; border: none; cursor: pointer; color: var(--dim); font-size: 1rem; padding: .3rem; min-width: 32px; min-height: 32px; }
.icon-btn:hover { color: var(--accent); }
.timeline { display: grid; gap: 1rem; }
.timeline .era { color: var(--ochre); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
footer.site { margin-top: 3rem; border-top: 1px solid var(--border); padding: 2rem 0 3rem; background: var(--surface); }
footer.site .credits { color: var(--dim); font-size: .85rem; }
.hidden { display: none !important; }
