/* Verago learning site (scripts/build-site.mjs). The app's palette: maroon,
   saffron and cream. System fonts, so Indic scripts use the device's own. */
:root {
  --maroon: #8C1C13;
  --maroon-dark: #6E140D;
  --saffron: #C46A1E;
  --cream: #FDF6E3;
  --card: #FFFFFF;
  --line: #EADFC8;
  --text: #2B1B12;
  --muted: #7A6A5C;
  --gold: #C9A227;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--cream); color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Kannada", "Noto Sans Tamil", "Noto Sans Devanagari", "Noto Sans Gujarati", sans-serif;
}
a { color: var(--maroon); }
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; background: var(--maroon); position: sticky; top: 0; z-index: 2;
}
.brand { display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 800; font-size: 20px; text-decoration: none; }
.brand img { border-radius: 8px; }
main { max-width: 860px; margin: 0 auto; padding: 20px 16px 40px; }
h1 { font-size: 32px; line-height: 1.2; margin: 8px 0 12px; }
h1 span { color: var(--maroon); white-space: nowrap; }
h2 { font-size: 23px; margin: 32px 0 12px; }
.lead { font-size: 19px; color: #4A3628; }
.crumbs { font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.hero { padding: 12px 0 4px; }

.cta {
  display: inline-block; background: var(--saffron); color: #fff; font-weight: 800; text-decoration: none;
  padding: 12px 18px; border-radius: 12px;
}
.cta:hover { background: #A9581A; }
.cta.small { padding: 7px 12px; font-size: 14px; border-radius: 10px; background: #fff; color: var(--maroon); }

.langs { list-style: none; padding: 0; margin: 20px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.langs a {
  display: flex; flex-direction: column; gap: 2px; padding: 16px; border-radius: 16px; background: var(--card);
  border: 2px solid var(--line); text-decoration: none; color: var(--text); height: 100%;
}
.langs a:hover { border-color: var(--maroon); }
.langs .native { font-size: 28px; color: var(--maroon); font-weight: 700; }
.langs small { color: var(--muted); }

.topics { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.topics a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--card);
  border: 1px solid var(--line); text-decoration: none; color: var(--text); height: 100%;
}
.topics a:hover { border-color: var(--maroon); }
.topics .emo { font-size: 22px; width: 28px; text-align: center; flex: none; }
.topics small { margin-left: auto; color: var(--muted); font-size: 13px; white-space: nowrap; }

.tools { display: flex; justify-content: flex-end; margin: 8px 0; }
.toggle-meanings {
  font: inherit; font-size: 14px; font-weight: 700; color: var(--maroon); background: #fff; border: 2px solid var(--line);
  border-radius: 999px; padding: 6px 14px; cursor: pointer;
}
.toggle-meanings[aria-pressed="true"] { background: var(--maroon); color: #fff; border-color: var(--maroon); }

.words { width: 100%; border-collapse: separate; border-spacing: 0 6px; }
.words th { text-align: left; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 0 10px; }
.words td { background: var(--card); padding: 10px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); vertical-align: middle; }
.words td:first-child { border-left: 1px solid var(--line); border-radius: 12px 0 0 12px; }
.words td:last-child { border-right: 1px solid var(--line); border-radius: 0 12px 12px 0; }
.words .pic { font-size: 26px; width: 44px; text-align: center; }
.words .rom strong { display: block; font-size: 19px; }
.words .script { display: block; color: var(--maroon); font-size: 18px; }
.words .mean { color: #4A3628; }
.words .play { width: 52px; text-align: right; }
.hide-meanings .words .mean { color: transparent; text-shadow: 0 0 9px rgba(43,27,18,.55); cursor: pointer; user-select: none; }
.hide-meanings .words .mean.shown { color: #4A3628; text-shadow: none; }
.say {
  font-size: 20px; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line); background: var(--cream);
  cursor: pointer; line-height: 1;
}
.say:hover, .say.playing { border-color: var(--maroon); background: #FBE9E1; }

.pager { display: flex; justify-content: space-between; margin: 16px 0; font-weight: 700; }

.app-card {
  display: flex; gap: 16px; align-items: flex-start; margin: 32px 0; padding: 20px; border-radius: 20px;
  background: linear-gradient(135deg, #8C1C13, #6E140D); color: #FBEFE6;
}
.app-card img { border-radius: 16px; flex: none; }
.app-card h2 { color: #fff; margin: 0 0 6px; font-size: 21px; }
.app-card p { margin: 0 0 14px; }

footer { text-align: center; padding: 24px 16px 40px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
footer a { color: var(--muted); }
.fine { font-size: 13px; }

@media (max-width: 560px) {
  h1 { font-size: 26px; }
  .lead { font-size: 17px; }
  .app-card { flex-direction: column; }
  .words .pic { display: none; }
  .words td:nth-child(2) { border-left: 1px solid var(--line); border-radius: 12px 0 0 12px; }
  .words th:first-child { display: none; }
}

/* Phrase pages, alphabet pages and the accuracy note (Nov 2026). */
.topics.sections { margin: 16px 0 4px; }
.topics.sections a { border-width: 2px; font-weight: 700; }
.phrase { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin: 14px 0; }
.phrase h2 { font-size: 18px; margin: 0 0 10px; color: #4A3628; }
.said { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; }
.said strong { display: block; font-size: 22px; }
.said .script { display: block; color: var(--maroon); font-size: 19px; }
.gloss { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.gloss li { display: flex; flex-direction: column; background: var(--cream); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; }
.gloss .script { color: var(--maroon); font-size: 15px; }
.gloss em { font-style: normal; color: var(--muted); font-size: 14px; }
.letters .letter { font-size: 30px; color: var(--maroon); font-weight: 700; width: 64px; text-align: center; }
.letters .sound { font-weight: 700; white-space: nowrap; }
.letters .mean-inline { display: block; color: var(--muted); font-size: 14px; }
.native-name { color: var(--muted); font-weight: 400; font-size: 16px; }
.words .mean small { display: block; color: var(--muted); font-size: 13px; }
.note { font-size: 14px; color: var(--muted); background: #fff; border: 1px dashed var(--line); border-radius: 12px; padding: 10px 12px; margin: 24px 0 0; }
/* The alphabet table keeps its first column on phones (the word tables hide
   their picture column there). */
@media (max-width: 560px) {
  .words.letters th:first-child { display: table-cell; }
  .words.letters td:nth-child(2) { border-left: 0; border-radius: 0; }
  .letters .letter { width: 52px; font-size: 26px; }
}
