﻿@font-face {
  font-family: var(--song);
  src: url("assets/fonts/NotoSans-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
/* Precomposed pinyin uses one explicitly licensed font with Latin Extended coverage. */
.title-pinyin, .family-pinyin, .word-pinyin, .word-card .word-pinyin, .example-pinyin, .recall-card-pinyin,
.card-pinyin, .entry-pinyin, .category-pinyin, .pinyin-sample {
  font-family: var(--song), "Segoe UI", Arial, sans-serif;
  font-variant-ligatures: none;
}
.title-pinyin { font-weight: 450; letter-spacing: 0; }
.family-pinyin, .word-pinyin, .example-pinyin, .recall-card-pinyin, .card-pinyin, .entry-pinyin, .category-pinyin, .pinyin-sample { font-weight: 400; }

/* v3 home */
.v3-hero { position: relative; overflow: hidden; min-height: 500px; padding: 70px clamp(26px,8vw,120px) 80px; display: grid; grid-template-columns: minmax(0,1.25fr) minmax(180px,.55fr); align-items: center; gap: 40px; border-bottom: 1px solid var(--line); }
.v3-hero::after { content: ""; position: absolute; inset: auto 0 0; height: 68%; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 300'%3E%3Cpath d='M0 260c110-20 140-100 230-70 65 22 82-74 153-57 63 15 72 96 144 79 83-19 105-105 181-86 67 17 74 100 149 96 88-5 131-68 206-37 63 26 82 61 137 50v65H0Z' fill='%23315f52' opacity='.09'/%3E%3Cpath d='M0 275c170-20 232-62 349-40 104 19 170-35 264-17 106 21 177 48 292 19 103-29 188-18 295-4' fill='none' stroke='%23315f52' opacity='.2'/%3E%3C/svg%3E") center bottom/cover no-repeat; }
.v3-hero-copy { position: relative; z-index: 1; max-width: 750px; }
.v3-hero h1 { margin: 13px 0 19px; font-family: var(--song); font-weight: 400; font-size: clamp(46px,5.4vw,72px); line-height: 1.05; letter-spacing: -.04em; }
.v3-hero h1 em { color: var(--pine); font-weight: 400; }
.v3-hero-copy > p:not(.eyebrow) { max-width: 580px; color: #53635b; font-size: 16px; line-height: 1.8; }
.home-inscription { position: relative; z-index: 1; justify-self: center; text-align: center; display: grid; gap: 10px; width: 150px; }
.home-inscription .inscription-glyph { display: block; width: 100%; height: auto; overflow: hidden; }
.home-inscription span { display: inline-grid; place-items: center; width: 27px; height: 27px; border: 2px solid rgba(163,58,43,.72); color: var(--cinnabar); font-family: var(--serif); transform: rotate(3deg); }
.home-promise { display: flex; gap: 18px; margin-top: 25px; color: var(--muted); font-size: 10px; letter-spacing: .05em; }
.home-promise span::before { content: "·"; color: var(--cinnabar); margin-right: 7px; }
.entry-section { padding: 55px clamp(24px,7vw,105px) 82px; }
.entry-section > .section-label { display: block; margin-bottom: 22px; }
.entry-grid { display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.entry-card { padding: 29px 30px 27px; text-decoration: none; border-right: 1px solid var(--line); position: relative; }
.entry-card:last-child { border-right: 0; }
.entry-card:hover { background: rgba(49,95,82,.045); }
.entry-card h2 { font-family: var(--song); font-size: 29px; font-weight: 400; margin: 15px 0 8px; }
.entry-card p { color: var(--muted); font-size: 12px; min-height: 58px; }
.entry-card .entry-go { color: var(--pine); font-size: 11px; font-weight: 650; }
.entry-diagram { height: 72px; display: flex; align-items: center; gap: 12px; color: var(--pine); }
.entry-diagram .demo-glyph { font-family: var(--song); color: var(--ink); font-size: 53px; line-height: 1; }
.entry-diagram .demo-small { font-size: 18px; color: var(--cinnabar); }
.entry-pinyin { font-size: 20px; color: var(--pine); }
.tone-demo { width: 115px; height: 55px; }
.tone-demo path { fill: none; stroke: var(--cinnabar); stroke-width: 2; }
.practice-demo { display: grid; gap: 6px; }
.practice-demo span { display: block; width: 100px; height: 8px; border: 1px solid rgba(49,95,82,.35); }
.practice-demo span:first-child { background: rgba(49,95,82,.18); }

/* Characters category landing */
.category-intro { padding: 60px clamp(24px,7vw,105px) 45px; border-bottom: 1px solid var(--line); }
.category-intro h1 { font-family: var(--song); font-weight: 400; font-size: clamp(39px,4.5vw,58px); margin: 12px 0; letter-spacing: -.03em; }
.category-intro p:not(.eyebrow) { color: var(--muted); max-width: 640px; font-size: 14px; }
.category-grid { padding: 52px clamp(24px,7vw,105px) 80px; display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.category-card { border-top: 2px solid var(--pine); border-bottom: 1px solid var(--line); padding: 23px 20px 25px; text-decoration: none; display: flex; flex-direction: column; min-height: 360px; }
.category-card.rare-card { border-top-color: var(--cinnabar); }
.category-card:hover { background: rgba(49,95,82,.04); }
.category-card .category-number { color: #8b958d; font-family: var(--song); font-size: 12px; }
.category-card .category-glyph { font-family: var(--song); font-size: 84px; line-height: 1.15; margin: 17px 0 12px; }
.category-card h2 { font-family: var(--song); font-weight: 400; font-size: 25px; margin: 0 0 8px; }
.category-card p { color: var(--muted); font-size: 11px; }
.category-card .category-pinyin { color: var(--pine); font-size: 18px; }
.category-card .category-go { margin-top: auto; padding-top: 20px; color: var(--pine); font-size: 11px; font-weight: 650; }
.root-note { margin-top: 9px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 10px; }

/* Always-visible qing meanings */
.qing-explanations { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0; margin-top: 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.meaning-card { padding: 17px 17px 18px; border-right: 1px solid var(--line); min-width: 0; }
.meaning-card:last-child { border-right: 0; }
.meaning-card-label { color: #818b83; font-size: 8px; letter-spacing: .12em; margin: 0 0 8px; }
.meaning-card h3 { display: flex; align-items: baseline; gap: 9px; font-family: var(--song); font-size: 34px; font-weight: 400; line-height: 1; margin: 0 0 8px; }
.meaning-card h3 .card-pinyin { color: var(--pine); font-size: 17px; }
.meaning-card-main { color: var(--pine); font-family: var(--song); font-size: 17px; margin: 0 0 8px; }
.meaning-card > p:not(.meaning-card-label):not(.meaning-card-main) { color: var(--muted); font-size: 10px; line-height: 1.65; }
.meaning-card-role { border-top: 1px solid var(--line); padding-top: 9px; }
.meaning-card-role strong { display: block; color: var(--cinnabar); font-size: 10px; }

/* Honest lightweight secondary modules */
.placeholder-section { min-height: 570px; padding: 65px clamp(24px,8vw,120px) 80px; display: grid; grid-template-columns: minmax(0,1fr) minmax(240px,.6fr); gap: 60px; align-items: center; }
.placeholder-section h1 { font-family: var(--song); font-size: clamp(42px,5vw,64px); font-weight: 400; margin: 12px 0 15px; }
.placeholder-section .lead { color: var(--muted); max-width: 560px; font-size: 15px; }
.placeholder-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 25px; }
.placeholder-art { border-top: 2px solid var(--pine); border-bottom: 1px solid var(--line); padding: 28px 15px; text-align: center; }
.placeholder-art .demo-glyph { font-family: var(--song); font-size: 72px; }
.placeholder-art p { color: var(--muted); font-size: 11px; }

@media (max-width: 850px) {
  .entry-grid, .category-grid { grid-template-columns: 1fr; }
  .entry-card { border-right: 0; border-bottom: 1px solid var(--line); }
  .entry-card:last-child { border-bottom: 0; }
  .entry-card p { min-height: 0; }
  .category-card { min-height: 300px; }
  .qing-explanations { grid-template-columns: 1fr; }
  .meaning-card { border-right: 0; border-bottom: 1px solid var(--line); }
  .meaning-card:last-child { border-bottom: 0; }
  .placeholder-section { grid-template-columns: 1fr; gap: 35px; }
}
@media (max-width: 600px) {
  .v3-hero { min-height: 550px; display: block; padding: 52px 24px 42px; }
  .v3-hero h1 { font-size: 45px; }
  .v3-hero-copy > p:not(.eyebrow) { font-size: 14px; max-width: 94%; }
  .home-inscription { position: absolute; right: 16px; bottom: 18px; opacity: .78; width: 64px; gap: 8px; }
  .home-inscription span { width: 21px; height: 21px; font-size: 13px; }
  .home-promise { flex-direction: column; gap: 3px; max-width: 220px; }
  .entry-section, .category-grid { padding: 35px 19px 55px; }
  .category-intro { padding: 42px 20px 32px; }
  .category-card { min-height: 285px; }
  .category-card .category-glyph { font-size: 69px; }
  .meaning-card { padding: 16px 13px; }
  .placeholder-section { padding: 45px 22px 55px; }
}

