/* Learn Koine Greek (/greek) — parchment & antique gold, scoped under .gk-page.
   Greek text uses EB Garamond (loaded on greek.html), which carries full
   polytonic Greek; the site's Cormorant Garamond does not. */

.gk-page {
  max-width: 880px;
  margin: 0 auto;
  padding: 6.5rem 1.15rem 4rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  color: #3a3327;
}
.gk-greek { font-family: 'EB Garamond', 'Palatino Linotype', 'Times New Roman', serif; }

/* ---- header ---- */
.gk-head { text-align: center; margin-bottom: 2rem; }
.gk-eyebrow {
  font-family: 'Cinzel', serif; font-size: 0.74rem; letter-spacing: 0.24em;
  text-transform: uppercase; color: #8a6626; margin: 0 0 0.6rem;
}
.gk-title {
  font-family: 'Cinzel', serif; font-size: clamp(2.1rem, 5vw, 3.1rem);
  font-weight: 800; line-height: 1.06; color: #34301f; margin: 0;
}
.gk-sub { font-size: 1.28rem; font-style: italic; color: #6b6350; max-width: 40rem; margin: 0.7rem auto 0; }
.gk-intro { font-size: 1.1rem; line-height: 1.65; color: #4a4437; max-width: 44rem; margin: 1.2rem auto 0; }

/* ---- stats ---- */
.gk-stats { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin: 0 0 2rem; }
.gk-stat {
  font-family: 'Cinzel', serif; font-size: 0.78rem; letter-spacing: 0.04em;
  color: #5f5744; background: rgba(250, 243, 226, 0.8);
  border: 1px solid #e4d7b4; border-radius: 999px; padding: 0.4rem 0.9rem;
  text-decoration: none;
}
.gk-stat b { color: #8a6626; }
.gk-stat--due { background: #8a6626; color: #fbf3e1; border-color: #8a6626; }
.gk-stat--due b { color: #fff; }
.gk-stat--due:hover { background: #6f501c; }
.gk-stat--zen { color: #7a7159; font-style: italic; }

/* ---- unit map ---- */
.gk-unit { margin-bottom: 2.4rem; }
.gk-unit-head {
  display: flex; align-items: center; gap: 0.9rem; margin: 0 0 1rem;
  padding: 0 0 0.7rem; border-bottom: 2px solid #ecdcb4; position: relative;
}
.gk-unit-glyph {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem; font-weight: 700; color: #a8823f;
  background: linear-gradient(150deg, #f7edd2, #efe0bd);
  border: 1px solid #e3d0a0; box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}
.gk-unit-headtext { flex: 1; min-width: 0; }
.gk-unit-title { font-family: 'Cinzel', serif; font-size: 1.28rem; font-weight: 700; color: #4f3a12; margin: 0 0 0.15rem; line-height: 1.2; }
.gk-unit-blurb { font-size: 1.02rem; color: #6b6350; margin: 0; line-height: 1.4; }
.gk-unit-count {
  flex: 0 0 auto; align-self: flex-start; font-family: 'Cinzel', serif; font-size: 0.72rem;
  font-weight: 700; letter-spacing: 0.04em; color: #8a7a52;
  background: rgba(250, 243, 226, 0.9); border: 1px solid #e4d7b4;
  border-radius: 999px; padding: 0.2rem 0.6rem;
}
.gk-lessons { display: flex; flex-direction: column; gap: 0.55rem; }
.gk-lesson {
  display: flex; align-items: center; gap: 0.9rem;
  background: rgba(255, 253, 247, 0.9);
  border: 1px solid #e7dcc2; border-left: 4px solid var(--cat, #cdb987);
  border-radius: 12px;
  padding: 0.8rem 1rem; text-decoration: none; color: inherit;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}
.gk-lesson:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(59, 51, 39, 0.12); }
.gk-lesson-num {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Cinzel', serif; font-weight: 700; font-size: 0.9rem;
  background: color-mix(in srgb, var(--cat, #8a6626) 14%, #fbf5e6);
  color: var(--cat, #8a6626);
  border: 1px solid color-mix(in srgb, var(--cat, #8a6626) 34%, #ddc998);
}
.gk-lesson-num svg { width: 17px; height: 17px; }
.gk-lesson.is-done .gk-lesson-num { background: #4a7a3c; border-color: #4a7a3c; color: #fff; }
.gk-lesson-body { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.gk-lesson-title { font-family: 'Cinzel', serif; font-size: 0.98rem; font-weight: 700; color: #43391f; }
.gk-lesson-blurb { font-size: 0.98rem; color: #6b6350; line-height: 1.35; }
.gk-lesson-meta { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 0.28rem; }
.gk-lesson-tag {
  display: inline-flex; align-items: center; gap: 0.32rem;
  font-family: 'Cinzel', serif; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--cat, #8a7a52);
  background: color-mix(in srgb, var(--cat, #8a7a52) 12%, transparent);
  border-radius: 999px; padding: 0.2rem 0.55rem;
}
.gk-cat-ic { width: 13px; height: 13px; }
.gk-lesson-min { font-family: 'Cinzel', serif; font-size: 0.62rem; letter-spacing: 0.06em; text-transform: uppercase; color: #a0916c; }
.gk-fineprint { font-size: 0.95rem; font-style: italic; color: #7a7159; text-align: center; margin-top: 2rem; }
.gk-fineprint a { color: #8a6626; text-decoration: underline; }

/* ---- player chrome ---- */
.gk-player { max-width: 640px; margin: 0 auto; }
.gk-player-top { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 0.5rem; }
.gk-back {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #7a7159; text-decoration: none; font-size: 1rem;
  border: 1px solid #e0d2ac; background: rgba(255, 253, 247, 0.8);
}
.gk-back:hover { color: #43391f; border-color: #cdb987; }
.gk-progress { flex: 1; height: 8px; border-radius: 999px; background: rgba(74, 67, 53, 0.12); overflow: hidden; }
.gk-progress > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #b0873a, #8a6626); transition: width 0.25s ease; }
.gk-player-lesson { font-family: 'Cinzel', serif; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: #8a7a52; margin: 0 0 0.9rem; text-align: center; }

/* ---- cards ---- */
.gk-card {
  background: rgba(255, 253, 247, 0.94);
  border: 1px solid #e7dcc2; border-radius: 16px;
  padding: 1.6rem 1.5rem;
  box-shadow: 0 14px 34px rgba(59, 51, 39, 0.08);
}
.gk-card-h { font-family: 'Cinzel', serif; font-size: 1.12rem; font-weight: 700; color: #43391f; margin: 0 0 1rem; line-height: 1.35; }
.gk-teach h2 { font-family: 'Cinzel', serif; font-size: 1.3rem; font-weight: 700; color: #43391f; margin: 0 0 0.8rem; }
.gk-teach-body { font-size: 1.12rem; line-height: 1.65; color: #453f33; }
.gk-teach-body p { margin: 0 0 0.8rem; }
.gk-teach-body b { color: #43391f; }
.gk-teach .gk-next { margin-top: 0.6rem; }

/* ---- paradigm tables (grammar lessons) ---- */
.gk-teach-body .gk-table-wrap { overflow-x: auto; margin: 0.4rem 0 1rem; -webkit-overflow-scrolling: touch; }
.gk-teach-body table.gk-para {
  border-collapse: collapse; width: 100%; min-width: 320px;
  font-size: 1.02rem; background: rgba(250, 243, 226, 0.4); border-radius: 10px; overflow: hidden;
}
.gk-teach-body table.gk-para caption {
  caption-side: top; text-align: left; font-family: 'Cinzel', serif; font-size: 0.8rem;
  letter-spacing: 0.04em; color: #8a6626; padding: 0 0 0.4rem;
}
.gk-teach-body table.gk-para th,
.gk-teach-body table.gk-para td {
  border: 1px solid #e6d8b6; padding: 0.42rem 0.7rem; text-align: left; vertical-align: baseline;
}
.gk-teach-body table.gk-para thead th,
.gk-teach-body table.gk-para tbody th {
  background: rgba(176, 135, 58, 0.12); font-family: 'Cinzel', serif;
  font-size: 0.82rem; font-weight: 700; color: #6f501c; letter-spacing: 0.02em;
}
.gk-teach-body table.gk-para .gk-greek { font-size: 1.24rem; color: #34301f; }
.gk-teach-body table.gk-para .gk-end { color: #a34a33; font-weight: 700; } /* highlight the ending */
.gk-teach-body table.gk-para td small { color: #7a7159; font-style: italic; }

/* ---- grammar example / note callouts ---- */
.gk-eg {
  margin: 0.4rem 0 1rem; padding: 0.85rem 1.05rem; border-radius: 10px;
  background: rgba(176, 135, 58, 0.09); border-left: 3px solid #b0873a;
}
.gk-eg-gr { font-size: 1.35rem; line-height: 1.7; color: #34301f; margin: 0; }
.gk-eg-tr { font-size: 1.02rem; font-style: italic; color: #6b6350; margin: 0.15rem 0 0; }
.gk-note-box {
  margin: 0.4rem 0 1rem; padding: 0.8rem 1rem; border-radius: 10px;
  background: rgba(47, 111, 122, 0.08); border-left: 3px solid #2b6c78;
  font-size: 1.02rem; line-height: 1.55; color: #40473f;
}
.gk-note-box b { color: #245862; }

/* ---- buttons ---- */
.gk-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  font-family: 'Cinzel', serif; font-size: 0.92rem; font-weight: 700; letter-spacing: 0.03em;
  border-radius: 10px; padding: 0.7rem 1.4rem; cursor: pointer; text-decoration: none;
  border: 1px solid transparent; transition: background 0.15s ease, transform 0.1s ease;
}
.gk-btn--primary { background: linear-gradient(180deg, #b0873a, #8a6626); color: #fff7e6; box-shadow: 0 6px 16px rgba(138, 102, 38, 0.3); }
.gk-btn--primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.gk-btn--primary:disabled { opacity: 0.45; cursor: default; transform: none; }
.gk-btn--ghost { background: transparent; color: #6f5a2a; border-color: #d9c79a; }
.gk-btn--ghost:hover { background: rgba(217, 199, 154, 0.18); }

/* ---- letter grid ---- */
.gk-letter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.7rem; margin-bottom: 1.1rem; }
.gk-letter { border: 1px solid #ead9b6; border-radius: 12px; background: rgba(250, 243, 226, 0.65); padding: 0.8rem 0.9rem; text-align: center; }
.gk-letter-glyph { font-size: 2rem; line-height: 1.1; color: #43391f; }
.gk-letter-name { font-family: 'Cinzel', serif; font-size: 0.86rem; font-weight: 700; color: #8a6626; margin-top: 0.25rem; display: flex; align-items: center; justify-content: center; gap: 0.3rem; }
.gk-letter-sound { font-size: 0.95rem; color: #554f40; margin-top: 0.15rem; }
.gk-letter-note { font-size: 0.85rem; font-style: italic; color: #7a7159; margin-top: 0.3rem; line-height: 1.35; }
.gk-letter-ex { font-size: 0.92rem; color: #5f5744; margin-top: 0.35rem; }

/* ---- audio buttons ---- */
.gk-audio {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%; border: 1px solid #d9c79a;
  background: #fbf3e1; color: #8a6626; cursor: pointer; padding: 0;
  vertical-align: middle; transition: background 0.15s ease;
}
.gk-audio svg { width: 14px; height: 14px; }
.gk-audio:hover { background: #f2e4c4; }
.gk-audio.is-playing { background: #8a6626; color: #fbf3e1; }
body.gk-no-audio .gk-audio { opacity: 0.35; cursor: default; }

/* ---- options / mcq ---- */
.gk-mcq-gr { font-size: 2rem; text-align: center; color: #34301f; margin: 0 0 1rem; }
.gk-options { display: flex; flex-direction: column; gap: 0.55rem; }
.gk-opt {
  font: inherit; font-size: 1.06rem; text-align: left; cursor: pointer;
  background: rgba(250, 243, 226, 0.55); color: #453f33;
  border: 1.5px solid #e0d2ac; border-radius: 10px; padding: 0.75rem 1rem;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.gk-opt:hover:not(:disabled) { border-color: #b0873a; background: #f6edda; }
.gk-opt--greek { font-size: 1.4rem; text-align: center; }
.gk-opt.is-correct { border-color: #4a7a3c; background: #e7efdf; color: #2f5426; }
.gk-opt.is-wrong { border-color: #a34a33; background: #f3e0d8; color: #7c3322; }
.gk-opt:disabled { cursor: default; }

/* ---- feedback ---- */
.gk-feedback { margin-top: 1rem; border-radius: 10px; padding: 0.9rem 1rem; }
.gk-feedback.is-right { background: #e7efdf; border: 1px solid #b5cba3; }
.gk-feedback.is-wrong { background: #f3e6da; border: 1px solid #d9b8a0; }
.gk-feedback p { margin: 0 0 0.7rem; font-size: 1.04rem; line-height: 1.5; color: #453f33; }

/* ---- match ---- */
.gk-match { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem 0.9rem; }
.gk-match-col { display: flex; flex-direction: column; gap: 0.55rem; }
.gk-match-item.is-picked { border-color: #8a6626; background: #f2e4c4; }
.gk-match-item.is-correct { opacity: 0.55; }

/* ---- tiles ---- */
.gk-tiles-answer {
  min-height: 52px; border: 1.5px dashed #d9c79a; border-radius: 10px;
  padding: 0.55rem; display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center;
  margin-bottom: 0.8rem; background: rgba(250, 243, 226, 0.4);
}
.gk-tiles-hint { font-size: 0.95rem; font-style: italic; color: #8a7a52; padding-left: 0.3rem; }
.gk-tiles-bank { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 0.9rem; }
.gk-tile {
  font: inherit; font-size: 1.02rem; cursor: pointer;
  background: #fbf3e1; border: 1.5px solid #d9c79a; border-radius: 8px;
  padding: 0.4rem 0.8rem; color: #43391f;
}
.gk-tile:hover:not(:disabled) { border-color: #b0873a; }
.gk-tile:disabled { opacity: 0.3; cursor: default; }
.gk-tile--picked { background: #f2e4c4; border-color: #b0873a; cursor: default; }
.gk-tiles-actions { display: flex; gap: 0.6rem; }

/* ---- flashcards ---- */
.gk-flash { text-align: center; }
.gk-flash-gr { font-size: 2.6rem; color: #34301f; margin: 0.4rem 0 0.2rem; line-height: 1.2; }
.gk-flash-translit { font-size: 1.1rem; font-style: italic; color: #7a7159; margin: 0 0 1.2rem; }
.gk-flash-gloss { font-size: 1.5rem; color: #43391f; margin: 0.4rem 0 0.3rem; }
.gk-flash-meta { font-family: 'Cinzel', serif; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: #8a7a52; margin: 0 0 0.6rem; }
.gk-flash-note { font-size: 1rem; font-style: italic; color: #6b6350; max-width: 30rem; margin: 0 auto 0.6rem; line-height: 1.5; }
.gk-flash-grade { display: flex; gap: 0.7rem; justify-content: center; margin-top: 0.9rem; }

/* ---- reading ---- */
.gk-reading h2 { font-family: 'Cinzel', serif; font-size: 1.35rem; color: #43391f; margin: 0 0 0.5rem; }
.gk-reading-intro { font-size: 1.05rem; font-style: italic; color: #6b6350; margin: 0 0 1.4rem; }
.gk-verse { position: relative; padding-left: 2rem; margin-bottom: 1.4rem; }
.gk-verse-n {
  position: absolute; left: 0; top: 0.45rem;
  font-family: 'Cinzel', serif; font-size: 0.75rem; font-weight: 700; color: #b0873a;
}
.gk-verse-gr { font-size: 1.55rem; line-height: 2; color: #34301f; margin: 0 0 0.3rem; }
.gk-word {
  font: inherit; background: none; border: 0; cursor: pointer; padding: 0 0.06em;
  border-radius: 4px; border-bottom: 1px dotted rgba(176, 135, 58, 0.55);
  color: inherit;
}
.gk-word:hover { background: #f2e4c4; }
.gk-word.is-active { background: #ecd9ab; }
.gk-verse-toggle {
  font-family: 'Cinzel', serif; font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase;
  background: none; border: 0; cursor: pointer; color: #8a6626; text-decoration: underline; padding: 0;
}
.gk-verse-tr { font-size: 1.04rem; font-style: italic; color: #5f5744; margin: 0.35rem 0 0; }
.gk-reading-src { font-size: 0.9rem; font-style: italic; color: #8a7a52; margin: 1rem 0 1.2rem; }
.gk-wordcard {
  position: absolute; left: 50%; transform: translateX(-50%);
  z-index: 40; width: min(320px, 86vw);
  background: #fffdf7; border: 1px solid #cdb987; border-radius: 12px;
  box-shadow: 0 18px 40px rgba(59, 51, 39, 0.22); padding: 0.9rem 1rem; text-align: center;
}
.gk-wordcard-gr { font-size: 1.7rem; color: #34301f; margin: 0; }
.gk-wordcard-gloss { font-size: 1.15rem; color: #43391f; margin: 0.2rem 0 0.2rem; }
.gk-wordcard-parse { font-size: 0.95rem; font-style: italic; color: #6b6350; margin: 0; line-height: 1.45; }
.gk-reading-done { margin-top: 0.4rem; }

/* ---- finish ---- */
.gk-finish { text-align: center; }
.gk-finish-mark {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 0.9rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.9rem; color: #fff; background: linear-gradient(180deg, #5d924c, #4a7a3c);
  box-shadow: 0 10px 26px rgba(74, 122, 60, 0.35);
}
.gk-finish h2 { font-family: 'Cinzel', serif; font-size: 1.4rem; color: #43391f; margin: 0 0 0.5rem; }
.gk-finish p { font-size: 1.1rem; color: #554f40; max-width: 30rem; margin: 0 auto 1.2rem; line-height: 1.6; }
.gk-finish-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; justify-content: center; }

/* ---- responsive & motion ---- */
@media (max-width: 560px) {
  .gk-page { padding-top: 5.4rem; }
  .gk-lesson-meta { display: none; }
  .gk-letter-grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
  .gk-verse-gr { font-size: 1.35rem; }
}
@media (prefers-reduced-motion: reduce) {
  .gk-lesson, .gk-btn--primary, .gk-progress > span { transition: none; }
}
