/* /cursive-calligraphy/ only: style comparison, alphabet charts, and practice word links.
   Screen-only, layered on assets/site-ui.css. Font notices and desktop packages
   are listed in fonts/library/font-downloads.json. */
@font-face { font-family: "Pinyon Script"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/library/pinyon-script.woff2") format("woff2"); }
@font-face { font-family: "Ballet"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/library/ballet.woff2") format("woff2"); }
@font-face { font-family: "Sacramento"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/library/sacramento.woff2") format("woff2"); }
@font-face { font-family: "Kaushan Script"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/library/kaushan-script.woff2") format("woff2"); }
@font-face { font-family: "Pacifico"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/library/pacifico.woff2") format("woff2"); }
@font-face { font-family: "Petit Formal Script"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/library/petit-formal-script.woff2") format("woff2"); }
@font-face { font-family: "Great Vibes"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/library/great-vibes.woff2") format("woff2"); }
@font-face { font-family: "Italianno"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/library/italianno.woff2") format("woff2"); }
@font-face { font-family: "Parisienne"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/library/parisienne.woff2") format("woff2"); }
@font-face { font-family: "Beau Rivage"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/library/beau-rivage.woff2") format("woff2"); }
@font-face { font-family: "Carattere"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/library/carattere.woff2") format("woff2"); }
@font-face { font-family: "Felipa"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/library/felipa.woff2") format("woff2"); }
@font-face { font-family: "Bonheur Royale"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/library/bonheur-royale.woff2") format("woff2"); }
@font-face { font-family: "Monsieur La Doulaise"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/library/monsieur-la-doulaise.woff2") format("woff2"); }
@font-face { font-family: "Tangerine"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/library/tangerine.woff2") format("woff2"); }
@font-face { font-family: "Lovers Quarrel"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/library/lovers-quarrel.woff2") format("woff2"); }
@font-face { font-family: "Mea Culpa"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/library/mea-culpa.woff2") format("woff2"); }
@font-face { font-family: "Birthstone Bounce"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/library/birthstone-bounce.woff2") format("woff2"); }
@font-face { font-family: "Ruthie"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/library/ruthie.woff2") format("woff2"); }
@font-face { font-family: "Cedarville Cursive"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/library/cedarville-cursive.woff2") format("woff2"); }
@font-face { font-family: "Dancing Script"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/library/dancing-script.woff2") format("woff2"); }
@font-face { font-family: "WindSong"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/library/windsong.woff2") format("woff2"); }
@font-face { font-family: "Homemade Apple"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/library/homemade-apple.woff2") format("woff2"); }
@font-face { font-family: "Allison"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/library/allison.woff2") format("woff2"); }
@font-face { font-family: "Moon Dance"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/library/moon-dance.woff2") format("woff2"); }
@font-face { font-family: "Ms Madi"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/library/ms-madi.woff2") format("woff2"); }
@font-face { font-family: "Alex Brush"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/library/alex-brush.woff2") format("woff2"); }
@font-face { font-family: "Water Brush"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/library/water-brush.woff2") format("woff2"); }
@font-face { font-family: "Yellowtail"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/library/yellowtail.woff2") format("woff2"); }
@font-face { font-family: "Satisfy"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/library/satisfy.woff2") format("woff2"); }
@font-face { font-family: "Smooch"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/library/smooch.woff2") format("woff2"); }
@font-face { font-family: "Hurricane"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/library/hurricane.woff2") format("woff2"); }
@font-face { font-family: "Lobster"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/library/lobster.woff2") format("woff2"); }
@font-face { font-family: "Oleo Script Swash Caps"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/library/oleo-script-swash-caps.woff2") format("woff2"); }
@font-face { font-family: "Grand Hotel"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/library/grand-hotel.woff2") format("woff2"); }
@font-face { font-family: "Yesteryear"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/library/yesteryear.woff2") format("woff2"); }
@font-face { font-family: "Rochester"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/library/rochester.woff2") format("woff2"); }
@font-face { font-family: "Cookie"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/library/cookie.woff2") format("woff2"); }

@media screen {
  .calligraphy-page :is(#calligraphy-alphabet, #practice-sheet, .calligraphy-chart) { scroll-margin-top: 88px; }

  /* Alphabet charts: image beside its caption and actions, stacked on phones. */
  .calligraphy-charts { display: grid; gap: 28px; margin-top: 20px; }
  .calligraphy-chart { display: grid; grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); gap: 24px; align-items: start; margin: 0; padding-top: 24px; border-top: 2px dashed var(--line-soft, var(--line)); }
  .calligraphy-chart img { display: block; width: 100%; height: auto; border: 2px solid var(--ink); border-radius: 12px; background: #f7f2e8; box-shadow: var(--shadow, none); }
  .calligraphy-chart-info { display: grid; gap: 14px; align-content: start; }
  .calligraphy-chart-text { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.65; }
  .calligraphy-chart-text strong { display: block; margin-bottom: 4px; color: var(--ink); font: 800 20px/1.3 Inter, ui-sans-serif, system-ui, sans-serif; }
  .calligraphy-actions { display: flex; flex-wrap: wrap; gap: 8px; }
  .calligraphy-page .calligraphy-actions .secondary-button { width: auto; text-decoration: none; }

  /* Style comparison. The samples use the warm paper of the alphabet charts. */
  .calligraphy-sheet { display: grid; gap: 16px; }
  .calligraphy-field { display: grid; gap: 6px; }
  .calligraphy-field-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; }
  .calligraphy-field label, .calligraphy-styles legend { font-weight: 700; font-size: 15px; }
  .calligraphy-field label { margin: 0; }
  .calligraphy-field input { width: 100%; min-height: 44px; padding: 8px 12px; border: 2px solid var(--ink); border-radius: 10px; background: var(--surface); color: var(--ink); }
  .calligraphy-styles { min-inline-size: 0; margin: 0; padding: 0; border: 0; }
  .calligraphy-styles legend { margin-bottom: 8px; padding: 0; }
  .calligraphy-style-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
  .calligraphy-style {
    display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto 1fr; align-items: center; gap: 4px 6px;
    min-width: 0; min-height: 92px; margin: 0; padding: 8px 10px; border: 2px solid var(--ink); border-radius: 12px;
    background: #f7f2e8; box-shadow: var(--shadow-sm); color: var(--ink); cursor: pointer;
  }
  .calligraphy-style-choice { width: 14px; height: 14px; margin: 0; accent-color: var(--accent); }
  .calligraphy-style-name { font-size: 13px; font-weight: 700; line-height: 1.25; }
  .calligraphy-style-sample {
    grid-column: 1 / -1; min-width: 0; color: var(--ink); text-align: center; overflow-wrap: anywhere; white-space: pre-wrap;
    font: clamp(28px, 3vw, var(--calligraphy-preview-max, 46px))/1.55 var(--calligraphy-font, "Pinyon Script"), cursive;
  }
  .calligraphy-style:has(.calligraphy-style-choice:checked) { border-color: var(--accent); box-shadow: 2px 2px 0 var(--accent); color: var(--accent); }
  .calligraphy-style:has(.calligraphy-style-choice:focus-visible) { outline: 3px solid var(--highlight); outline-offset: 2px; }
  .calligraphy-more-styles { margin-top: 12px; border: 2px solid var(--ink); }
  .calligraphy-more-styles > summary { min-height: 44px; padding: 8px 12px; font-size: 14px; }
  .calligraphy-more-styles > summary > span:first-child { flex: none; }
  .calligraphy-more-selection { margin-inline-start: auto; color: var(--accent); font-size: 13px; text-align: end; }
  .calligraphy-style-filters:not([hidden]) { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 12px 12px; }
  .utility-ui .calligraphy-style-filters .small-button { padding: 6px 10px; font-size: 13px; }
  .utility-ui .calligraphy-style-filters .small-button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
  .calligraphy-style-group { padding: 0 12px 14px; }
  .calligraphy-style-group h3 { margin: 8px 0; font-size: 14px; }
  .calligraphy-style-filters:not([hidden]) ~ .calligraphy-style-group h3 { display: none; }
  .calligraphy-style-group .calligraphy-style-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .calligraphy-hint { margin: 0; color: var(--muted); font-size: 14px; }
  .calligraphy-hint.is-error { color: #a2361f; font-weight: 600; }
  .calligraphy-sheet-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
  .calligraphy-page .calligraphy-sheet-actions .secondary-button { width: auto; text-align: center; }
  .calligraphy-notes { max-width: 920px; }

  /* Practice words: the original card plus a separate trace-sheet link (no nested links). */
  .calligraphy-word { display: grid; align-content: start; }
  .calligraphy-word .feature { min-height: 0; }
  .calligraphy-trace-link { justify-self: start; display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-size: 14px; font-weight: 800; }

  @media (max-width: 760px) {
    .calligraphy-chart { grid-template-columns: minmax(0, 1fr); gap: 14px; padding-top: 18px; }
    .utility-ui.calligraphy-page .content-page { padding-top: 16px; gap: 16px; }
    .utility-ui.calligraphy-page .calligraphy-hero .eyebrow,
    .utility-ui.calligraphy-page .calligraphy-hero h1::after { display: none; }
    .utility-ui.calligraphy-page .calligraphy-hero h1 { margin-bottom: 8px; font-size: clamp(26px, 8vw, 32px); }
    .utility-ui.calligraphy-page .calligraphy-hero .lede { font-size: 15px; }
    .calligraphy-sheet { gap: 12px; }
    .calligraphy-style-grid, .calligraphy-style-group .calligraphy-style-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .calligraphy-style { min-height: 78px; padding: 6px 8px; }
    .calligraphy-style-sample { font-size: clamp(25px, 6vw, 36px); }
    .calligraphy-sheet-actions { gap: 8px; }
    .calligraphy-page .calligraphy-sheet-actions .secondary-button { padding-inline: 10px; }
  }
}
