:root {
  color-scheme: light;
  font-family: Inter, "Noto Sans TC", "PingFang HK", sans-serif;
  color: #172033;
  background: #f3f0e8;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 85% 0, #ffd985 0, transparent 30rem), #f3f0e8;
}

main {
  width: min(70rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 4rem 0 6rem;
}

.eyebrow {
  color: #a45514;
  font-weight: 800;
  letter-spacing: .12em;
}

h1 {
  max-width: 15ch;
  margin: .35rem 0 1rem;
  font-size: clamp(2.4rem, 7vw, 5.8rem);
  line-height: .98;
}

.lede {
  max-width: 42rem;
  font-size: 1.15rem;
  line-height: 1.7;
}

section {
  margin-top: 2rem;
  padding: clamp(1.2rem, 4vw, 2.5rem);
  overflow: hidden;
  border: 1px solid #d9d0bd;
  border-radius: 1.4rem;
  background: rgb(255 255 255 / .78);
  box-shadow: 0 1rem 3rem rgb(60 45 15 / .08);
}

h2 {
  margin-top: 0;
  color: #655c4c;
  font-size: .95rem;
}

cantomore-text {
  display: block;
  line-height: 1.7;
}

output {
  display: block;
  margin-top: 1.5rem;
  color: #655c4c;
}


pre { overflow-x: auto; padding: 1rem; border-radius: .6rem; background: #f3f0e8; line-height: 1.6; }
footer { margin-top: 2rem; line-height: 1.7; }
a { color: #1769aa; }
h1 { line-height: 1.18; }

main { width: min(88rem, calc(100% - 2rem)); }
.usage-note { line-height: 1.7; color: #655c4c; }
.example-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 3vw, 3rem); }
.example-preview, .example-guide { min-width: 0; }
.example-guide { border-left: 1px solid #d9d0bd; padding-left: clamp(1.5rem, 3vw, 3rem); }
.example-guide p { line-height: 1.7; margin: .75rem 0; }
.example-guide pre { margin-bottom: 0; font-size: .85rem; }
.code-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
h3 { font-size: .95rem; margin: 0; color: #655c4c; }
.copy-code { flex-shrink: 0; min-height: 2.75rem; padding: .5rem .8rem; border: 1px solid #b6a88d; border-radius: .5rem; color: #172033; background: #fffaf0; font: inherit; font-size: .875rem; cursor: pointer; }
.copy-code:hover { background: #f4e6c8; }
.copy-code:focus-visible, pre:focus-visible { outline: 3px solid #1769aa; outline-offset: 3px; }
.copy-status { min-height: 1.5em; font-size: .85rem; color: #17623f; }
@media (max-width: 850px) {
  .example-section { grid-template-columns: minmax(0, 1fr); }
  .example-guide { border-left: 0; padding-left: 0; border-top: 1px solid #d9d0bd; padding-top: 1.5rem; }
}

/* Logo matches the published font.cantomore.com wordmark and symbol. */
:root { --brand-ink: #173f3b; --brand-muted: #a7445c; }
.brand-line {
  width: max-content;
  display: inline-flex;
  gap: .42rem;
  align-items: center;
  color: var(--brand-ink);
  text-decoration: none;
}
.brand-wordmark {
  ruby-align: center;
  ruby-position: over;
  white-space: nowrap;
}
.brand-symbol {
  width: auto;
  height: 2.45rem;
  display: block;
  object-fit: contain;
}
.brand-name-zh {
  color: var(--brand-muted);
  font-family: "Noto Serif HK", "Noto Serif TC", "Noto Serif CJK TC", serif;
  font-size: 1.55rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .1rem;
}
.brand-name-en {
  color: var(--brand-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: .78rem;
  font-weight: 800;
  font-variant-caps: small-caps;
  line-height: 1;
  letter-spacing: .08em;
}

.site-brand { margin-bottom: 2rem; }
@media (max-width: 720px) { .brand-symbol { height: 2rem; } .brand-name-zh { font-size: 1.38rem; } .brand-name-en { font-size: .71rem; } }

@font-palette-values --cantomore-night {
  font-family: "CantoMore";
  base-palette: 0;
  override-colors:
    0 #75B9FFFF, 1 #D6A7FFFF, 2 #75D99AFF,
    3 #DDB47AFF, 4 #FF8B7AFF, 5 #FFFDF740;
}
.dark-font-card {
  background: #102b43;
  color: #fffdf7;
  padding: 1.5rem;
  border-radius: 1rem;
  font-palette: --cantomore-night;
}
.dark-ruby-card {
  background: #102b43;
  padding: 1.5rem;
  border-radius: 1rem;
  color: #fffdf7;
}
.lesson-card {
  padding: 1.25rem;
  background: #f0f7f4;
  border-radius: 1rem;
}
.lesson-card cantomore-text {
  --cantomore-character-size: 2rem;
  --cantomore-jyutping-size: .42em;
  --cantomore-character-color: #173f3b;
  --cantomore-onset-color: #1769aa;
  --cantomore-nucleus-color: #16835b;
  --cantomore-coda-color: #7b4ab5;
  --cantomore-tone-color: #a45514;
  --cantomore-highlight-color: #ffe08a;
}
.voice-settings label {
  display: flex;
  gap: .75rem;
  align-items: center;
  margin: .75rem 0;
}
.voice-settings input { min-width: 0; flex: 1; }
.voice-settings output { margin: 0; min-width: 2.5em; }
.api-buttons { display: flex; flex-wrap: wrap; gap: .5rem; }
.example-nav { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.5rem 0; }
.example-nav a { padding: .5rem .8rem; background: #fffaf0; border: 1px solid #d9d0bd; border-radius: 2rem; font-size: .875rem; text-decoration: none; }
.example-section { scroll-margin-top: 1rem; }
.example-guide pre { max-height: 34rem; overflow: auto; }
.example-preview label { line-height: 1.6; }
.example-preview select, .api-buttons button { font: inherit; padding: .65rem; border-radius: .5rem; border: 1px solid #b6a88d; background: #fffaf0; color: #172033; }
.example-preview input[type="checkbox"] { width: 1.1rem; height: 1.1rem; accent-color: #1769aa; }
.example-preview :is(select,button,input):focus-visible { outline: 3px solid #1769aa; outline-offset: 3px; }
.dark-font-card button, .dark-ruby-card button { background: #edf4f7; color: #102b43; border: 1px solid #8095a5; border-radius: .25rem; }
