/* Ethos Immigration Academy: platform styles.
   Navy #1F2A37 dominant, Teal #2F7C7B accent, warm stone grounds.
   Libre Baskerville headings, Inter body, with system fallbacks. */

:root {
  --navy: #1F2A37;
  --navy-deep: #16202B;
  --teal: #2F7C7B;
  --teal-dark: #256664;
  --stone: #F4F1EA;
  --stone-mid: #E9E2D4;
  --stone-line: #D8CFBB;
  --ink: #26313D;
  --muted: #5D6B78;
  --white: #FFFFFF;
  --gold: #B8860B;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--stone);
  line-height: 1.55;
}

h1, h2, h3, .serif {
  font-family: "Libre Baskerville", Baskerville, Georgia, "Times New Roman", serif;
  color: var(--navy);
  line-height: 1.25;
}

a { color: var(--teal-dark); }
a:hover { color: var(--teal); }

/* header */
.site-header {
  background: var(--navy);
  color: var(--stone);
  border-bottom: 4px solid var(--teal);
}
.header-inner {
  max-width: 1120px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.header-inner img.seal { height: 54px; width: auto; }
.brand { display: flex; flex-direction: column; }
.brand .brand-name {
  font-family: "Libre Baskerville", Baskerville, Georgia, serif;
  font-size: 1.3rem; color: var(--white); letter-spacing: 0.02em;
}
.brand .brand-line { font-size: 0.8rem; color: var(--stone-mid); }
.main-nav { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.main-nav a {
  color: var(--stone); text-decoration: none; padding: 7px 12px;
  border-radius: 4px; font-size: 0.92rem;
}
.main-nav a:hover { background: var(--navy-deep); color: var(--white); }
.main-nav .who { color: var(--stone-mid); padding: 7px 4px; font-size: 0.92rem; }

/* Greek key accent */
.meander {
  height: 14px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--teal) 0 10px, transparent 10px 14px,
    var(--teal) 14px 18px, transparent 18px 28px);
  opacity: 0.55;
}
.meander.thin { height: 8px; opacity: 0.4; }

/* layout */
.wrap { max-width: 1120px; margin: 0 auto; padding: 28px 20px 48px; }
.narrow { max-width: 780px; }

.flash {
  background: #FBF3D9; border: 1px solid var(--gold); color: #6B5205;
  padding: 10px 14px; border-radius: 6px; margin-bottom: 16px;
}

/* catalog */
.hero {
  background: var(--navy); color: var(--stone); border-radius: 10px;
  padding: 36px; margin-bottom: 28px;
  background-size: cover; background-position: center;
}
.hero h1 { color: var(--white); margin: 0 0 10px; font-size: 2rem; }
.hero p { max-width: 640px; color: var(--stone-mid); }
.hero .flagline { color: var(--white); font-family: "Libre Baskerville", Georgia, serif; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.card {
  background: var(--white); border: 1px solid var(--stone-line);
  border-radius: 8px; padding: 20px; display: flex; flex-direction: column;
}
.card h3 { margin: 4px 0 6px; }
.card .counts { color: var(--muted); font-size: 0.9rem; }
.card .price { font-size: 1.5rem; color: var(--navy); margin: 12px 0 4px;
  font-family: "Libre Baskerville", Georgia, serif; }
.card img.art { width: 100%; height: 110px; object-fit: cover; border-radius: 5px; }
.card .grow { flex: 1; }

.btn {
  display: inline-block; background: var(--teal); color: var(--white);
  text-decoration: none; padding: 10px 18px; border-radius: 6px;
  border: none; font-size: 0.95rem; cursor: pointer; text-align: center;
}
.btn:hover { background: var(--teal-dark); color: var(--white); }
.btn.secondary { background: var(--navy); }
.btn.secondary:hover { background: var(--navy-deep); }
.btn.plain { background: transparent; color: var(--teal-dark); border: 1px solid var(--teal); }
.btn:disabled { background: var(--stone-line); cursor: default; }

.pathway {
  background: var(--white); border: 2px solid var(--teal); border-radius: 10px;
  padding: 26px; margin: 28px 0;
}
.pathway .price { font-size: 2rem; font-family: "Libre Baskerville", Georgia, serif; color: var(--navy); }
.terms { color: var(--muted); font-size: 0.94rem; }

/* video placeholder */
.video-ph {
  aspect-ratio: 16 / 9; background: var(--navy-deep); border-radius: 8px;
  color: var(--stone); display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 20px; margin-bottom: 22px; border-bottom: 4px solid var(--teal);
  background-size: cover; background-position: center;
}
.video-ph .v-title {
  font-family: "Libre Baskerville", Georgia, serif; color: var(--white);
  font-size: 1.25rem; max-width: 640px;
}
.video-ph .v-state {
  margin-top: 10px; font-size: 0.82rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--stone-mid);
  border: 1px solid var(--stone-line); padding: 4px 12px; border-radius: 20px;
  background: rgba(22, 32, 43, 0.75);
}
.video-ph .v-frame { background: rgba(22, 32, 43, 0.72); padding: 22px 30px; border-radius: 8px; }

/* placed lesson videos */
.video-block { margin-bottom: 22px; }
.video-label {
  font-family: "Libre Baskerville", Georgia, serif; color: var(--navy);
  font-size: 1.05rem; margin-bottom: 8px;
}
.lesson-video {
  width: 100%; aspect-ratio: 16 / 9; display: block; background: #101820;
  border-radius: 8px; border-bottom: 4px solid var(--teal);
}

/* lists and progress */
.rows { display: flex; flex-direction: column; gap: 10px; }
.row-item {
  background: var(--white); border: 1px solid var(--stone-line); border-radius: 8px;
  padding: 14px 18px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.row-item .grow { flex: 1; min-width: 220px; }
.row-item .code { color: var(--muted); font-size: 0.82rem; letter-spacing: 0.04em; }
.badge {
  font-size: 0.78rem; padding: 3px 10px; border-radius: 20px;
  background: var(--stone-mid); color: var(--navy); white-space: nowrap;
}
.badge.open { background: #DDEEEC; color: var(--teal-dark); }
.badge.done { background: var(--teal); color: var(--white); }
.badge.locked { background: var(--stone); color: var(--muted); border: 1px solid var(--stone-line); }
.progressbar { background: var(--stone-mid); border-radius: 6px; height: 10px; overflow: hidden; }
.progressbar > div { background: var(--teal); height: 100%; }

/* lesson reading */
.reading {
  background: var(--white); border: 1px solid var(--stone-line); border-radius: 8px;
  padding: 30px 36px; margin-bottom: 22px;
}
.reading .body { text-align: justify; }
.reading .body li { margin-bottom: 6px; }
.reading-note {
  background: var(--white); border: 1px dashed var(--stone-line); border-radius: 8px;
  padding: 22px; color: var(--muted); margin-bottom: 22px;
}

/* lesson book (page-turner: one slide, its own text underneath) */
.book {
  background: var(--white); border: 1px solid var(--stone-line); border-radius: 8px;
  padding: 30px 36px; margin-bottom: 22px;
}
.book-text { text-align: justify; margin-top: 20px; }
.book-text p { margin: 0 0 10px; }
.book-text p:last-child { margin-bottom: 0; }
.book-img { width: 100%; }

/* book exercises: a deck question page as a working exercise */
.book-exercise {
  margin-top: 22px; border-top: 1px solid var(--stone-line);
  padding-top: 18px;
}
.ex-q { font-weight: 600; color: var(--navy); margin-bottom: 12px; }
.ex-opt {
  display: flex; align-items: flex-start; gap: 10px; width: 100%;
  text-align: left; font: inherit; color: var(--ink); cursor: pointer;
  background: var(--white); border: 1px solid var(--stone-line);
  border-radius: 6px; padding: 10px 14px; margin-bottom: 8px;
}
.ex-opt:hover { border-color: var(--teal); }
.ex-opt:disabled { cursor: default; }
.ex-opt .ex-mark {
  flex: none; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--stone-line); margin-top: 2px;
}
.ex-opt.correct { border-color: #2E7D32; background: #EAF3E6; }
.ex-opt.correct .ex-mark { background: #2E7D32; border-color: #2E7D32; }
.ex-opt.wrong { border-color: #8B1A1A; background: #F8E9E6; }
.ex-opt.wrong .ex-mark { background: #8B1A1A; border-color: #8B1A1A; }
.ex-feedback {
  border-radius: 6px; padding: 10px 14px; margin-top: 4px;
  font-size: 0.94rem;
}
.ex-feedback.right { background: #EAF3E6; border: 1px solid #2E7D32; }
.ex-feedback.wrong { background: #F8E9E6; border: 1px solid #8B1A1A; }

/* under-zone: the lesson's own material under the book */
.underzone {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
  margin-bottom: 22px;
}
.uz-card {
  background: var(--white); border: 1px solid var(--stone-line);
  border-radius: 8px; padding: 22px 26px;
}
.uz-card h3 { margin: 0 0 10px; }
.uz-card p { margin: 0; text-align: justify; }
.uz-card ol { margin: 0; padding-left: 20px; }
.uz-card li { margin-bottom: 6px; }
.uz-card li:last-child { margin-bottom: 0; }
.uz-tip { border-top: 4px solid var(--teal); }
.uz-takeaways { border-top: 4px solid var(--navy); }
.uz-wide { grid-column: 1 / -1; }
@media (max-width: 760px) {
  .underzone { grid-template-columns: 1fr; }
}

/* lesson slides viewer */
.slides {
  background: var(--white); border: 1px solid var(--stone-line); border-radius: 8px;
  padding: 30px 36px; margin-bottom: 22px;
}
.slide-img {
  width: 100%; display: block; background: var(--navy-deep);
  border: 1px solid var(--stone-line); border-radius: 6px;
}
.slide-controls {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-top: 14px;
}
.slide-counter { color: var(--muted); font-size: 0.9rem; white-space: nowrap; }
.slide-thumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.slide-thumb {
  padding: 0; border: 2px solid var(--stone-line); border-radius: 4px;
  background: none; cursor: pointer; line-height: 0;
}
.slide-thumb img { width: 92px; height: auto; display: block; border-radius: 2px; }
.slide-thumb.active { border-color: var(--teal); }

/* forms */
form.stack { display: flex; flex-direction: column; gap: 12px; max-width: 440px; }
form.stack label { font-size: 0.9rem; color: var(--navy); }
form.stack input[type="text"], form.stack input[type="email"],
form.stack input[type="password"], form.stack textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--stone-line);
  border-radius: 6px; font: inherit; background: var(--white);
}
form.wide { max-width: 720px; }
fieldset.q {
  background: var(--white); border: 1px solid var(--stone-line); border-radius: 8px;
  padding: 18px 20px; margin-bottom: 14px;
}
fieldset.q legend { font-weight: 600; color: var(--navy); padding: 0 6px; }
fieldset.q label.opt { display: block; padding: 5px 0 5px 26px; text-indent: -26px; cursor: pointer; }
.feedback { border-radius: 6px; padding: 10px 14px; margin-top: 10px; font-size: 0.94rem; }
.feedback.right { background: #E4F0EE; border: 1px solid var(--teal); }
.feedback.wrong { background: #F9E8E4; border: 1px solid #B4553F; }
.score-banner {
  border-radius: 8px; padding: 20px; margin-bottom: 20px; color: var(--navy);
}
.score-banner.pass { background: #DDEEEC; border: 1px solid var(--teal); }
.score-banner.fail { background: #FBF3D9; border: 1px solid var(--gold); }

/* panels */
.panel {
  border: 1px solid var(--stone-line); border-left: 5px solid var(--teal);
  background: var(--white); border-radius: 6px; padding: 18px 20px; margin: 22px 0;
}
.panel h3 { margin-top: 0; }
.panel .state { font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal-dark); }

/* tables */
table { border-collapse: collapse; width: 100%; background: var(--white); }
th, td { border: 1px solid var(--stone-line); padding: 8px 10px; text-align: left; font-size: 0.92rem; vertical-align: top; }
th { background: var(--navy); color: var(--stone); font-weight: 600; }

/* boards */
.thread-row .meta { color: var(--muted); font-size: 0.85rem; }
.post {
  background: var(--white); border: 1px solid var(--stone-line); border-radius: 8px;
  padding: 16px 20px; margin-bottom: 12px;
}
.post .meta { color: var(--muted); font-size: 0.85rem; margin-bottom: 6px; }

/* footer */
.site-footer {
  background: var(--navy); color: var(--stone-mid); margin-top: 40px;
}
.footer-inner { max-width: 1120px; margin: 0 auto; padding: 26px 20px; font-size: 0.9rem; }
.footer-inner .flagline { color: var(--stone); font-family: "Libre Baskerville", Georgia, serif; }

.lockbox {
  background: var(--white); border: 1px solid var(--stone-line); border-radius: 8px;
  padding: 30px; max-width: 640px;
}
.small { font-size: 0.88rem; color: var(--muted); }

/* the course book (The Ethos Standard): reader pages, callout bands,
   and image panels. Body text is justified by the reading styles;
   headings, signal labels, and captions keep their own alignment. */
.bookread { padding: 36px 42px; }
.bookread .body { font-size: 1.05rem; line-height: 1.75; }
.bookread .body h2, .bookread .body h3, .bookread .body h4 { text-align: left; }
.bookread .body blockquote {
  margin: 18px 0; padding: 4px 18px; border-left: 3px solid var(--stone-line);
  color: var(--muted);
}
.book-part { margin: 26px 0 10px; }
.chapter-progress {
  color: var(--muted); font-size: 0.85rem; letter-spacing: 0.12em;
  text-transform: uppercase; margin-bottom: 6px;
}
.book-progressbar { margin-bottom: 18px; }
.chapter-appears { margin-top: -6px; }
.chapter-nav {
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin-top: 6px;
}

.callout {
  border-left: 5px solid; border-radius: 6px;
  padding: 16px 20px; margin: 22px 0;
}
.callout p { margin: 0; }
.callout-label {
  font-weight: 700; font-size: 0.8rem; letter-spacing: 0.14em;
  margin-bottom: 6px; text-align: left;
}
.callout-redflag { background: #F8E9E6; border-color: #8B1A1A; }
.callout-redflag .callout-label { color: #8B1A1A; }
.callout-caution { background: #FBF3D9; border-color: #B8860B; }
.callout-caution .callout-label { color: #B8860B; }
.callout-protip { background: #E4F0EE; border-color: #2F7C7B; }
.callout-protip .callout-label { color: #256664; }

.imgslot {
  margin: 24px 0; background: var(--white);
  border: 1px solid var(--stone-line); border-radius: 8px; overflow: hidden;
}
.imgslot-frame {
  height: 190px; background: var(--stone);
  border-top: 14px solid transparent;
  border-image: repeating-linear-gradient(
    90deg,
    var(--teal) 0 10px, transparent 10px 14px,
    var(--teal) 14px 18px, transparent 18px 28px) 14;
  display: flex; align-items: center; justify-content: center;
}
.imgslot-mark {
  font-size: 0.8rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--stone-line);
  border-radius: 20px; padding: 5px 14px; background: rgba(255, 255, 255, 0.75);
}
.imgslot figcaption {
  padding: 12px 18px; font-size: 0.92rem; color: var(--muted);
  font-style: italic; text-align: center; border-top: 1px solid var(--stone-line);
}

/* a placed photograph inside an image panel: the frame keeps its
   Greek key border, the photograph sits in it as a plate at its own
   proportions, never stretched or cropped */
.imgslot.has-image .imgslot-frame { background: var(--stone); }
.imgslot-frame img.plate {
  display: block; max-height: 190px; max-width: 100%;
  width: auto; height: auto;
}

/* the book's title plate: the academy seal over the front matter */
.book-titleplate { text-align: center; margin-bottom: 20px; }
.book-titleplate img { height: 96px; width: auto; }
.book-titleplate .meander { margin-top: 16px; }

/* level workbook panel: cover photograph beside the text, the seal
   set above the heading as a bookplate mark */
.wb-panel { display: flex; gap: 20px; align-items: flex-start; }
.wb-panel .grow { flex: 1; min-width: 220px; }
.wb-cover {
  width: 168px; height: auto; flex: none; border-radius: 6px;
  border: 1px solid var(--stone-line);
}
.seal-mini { height: 44px; width: auto; margin-bottom: 6px; }
.wb-panel h3 { margin-top: 0; }
@media (max-width: 640px) {
  .wb-panel { flex-direction: column; }
  .wb-cover { width: 100%; max-width: 300px; }
}

/* catalog membership band: text beside a branded photograph */
.member-band {
  display: flex; gap: 22px; align-items: center;
  background: var(--white); border: 1px solid var(--stone-line);
  border-radius: 8px; padding: 22px 26px; margin: 28px 0;
}
.member-band .grow { flex: 1; min-width: 220px; }
.member-band h2 { margin-top: 0; }
.member-band .band-art {
  width: 240px; height: auto; flex: none; border-radius: 6px;
  border: 1px solid var(--stone-line);
}
@media (max-width: 640px) {
  .member-band { flex-direction: column; align-items: flex-start; }
  .member-band .band-art { width: 100%; max-width: 320px; }
}
