/* Cobito · guide pages (/spanish/ordering-food, /spanish/practice, /spanish/mexican-vs-spain-spanish) — builder 2.
   Loaded after pages.css: same header, fonts, colors, signpost, Cobito panel and footer. One reading column,
   one living element per page: the café walk, the 5-phrase drill, the two-column comparison. */

.page.gd { grid-template-columns: minmax(0, 720px); justify-content: center; }
.gd .body section { margin-top: 56px; }
.gd .body h3 { font-size: 18px; font-weight: 800; line-height: 1.3; }
.gd .body h3 + * { margin-top: 8px; }
.gd .body ul + p, .gd .body ol + p, .gd .body table + p, .gd .gd-scroll + p { margin-top: 14px; }
.gd .notes { margin-top: 14px !important; }

/* phrase lines: Spanish — English, ▶ only where a voice exists */
.ln { margin-top: 6px; }
.ln + .ln { margin-top: 10px; }
.ln b[lang] { font-weight: 700; }
.ln .play-i { margin: -12px 0 -10px -2px; }
.ln-more { white-space: nowrap; }

/* tables on paper */
.gd-scroll { overflow-x: auto; margin-top: 14px; border-radius: 4px; background: var(--card) var(--noise); box-shadow: 0 0 0 1px var(--line), 0 3px 0 var(--edge); }
.gd-table { width: 100%; border-collapse: collapse; font-size: 17px; line-height: 1.45; }
.gd-table th, .gd-table td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.gd-table thead th { font: 700 14px/1.2 var(--display); color: var(--ink-2); background: rgba(242, 216, 162, .45); }
.gd-table tbody tr:last-child > * { border-bottom: 0; }
.gd-table tbody th { font-weight: 700; }
.gd-table .play-i { margin: -12px -8px -12px 0; }
.gd-table .muted { color: var(--ink-2); font-size: 15px; }

/* numbered list on paper dots */
.gd-ol { counter-reset: s; }
.gd-ol > li { position: relative; padding-left: 46px; min-height: 34px; counter-increment: s; }
.gd-ol > li + li { margin-top: 14px; }
.gd-ol > li::before { content: counter(s); position: absolute; left: 0; top: -1px; width: 32px; height: 32px; display: grid; place-items: center; font: 800 15px/1 var(--display); background: var(--manila) var(--noise); border-radius: 50%; box-shadow: inset 0 -2px 0 rgba(122, 77, 42, .25); }

/* single paper-town scene card */
.scene-fig { margin: 18px 0 0; border-radius: 6px; overflow: hidden; background: var(--card) var(--noise); box-shadow: 0 0 0 1px var(--line), 0 4px 0 var(--edge); }
.scene-fig img { display: block; width: 100%; height: auto; }
.scene-fig figcaption { padding: 10px 14px; font-size: 15px; line-height: 1.45; color: var(--ink-2); border-top: 1px solid var(--line); }

/* ---------- ordering-food: the café walk (sticky stage; Dale moves as the steps scroll past) ---------- */
.walk { position: relative; margin-top: 18px; }
.cafe { position: relative; z-index: 3; height: 250px; overflow: hidden; border-radius: 6px; background: #F6E7C9; box-shadow: 0 0 0 1px var(--line), 0 4px 0 var(--edge); }
.js .cafe { position: sticky; top: 8px; }
.cafe-back { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.cafe-gav { position: absolute; left: var(--gx, 55%); bottom: -2%; height: 74%; width: auto; aspect-ratio: 1; }
.cafe-dale { position: absolute; left: var(--x, 2%); bottom: 1%; height: 60%; aspect-ratio: 1; transition: left .7s cubic-bezier(.3, 1.1, .5, 1); }
.cafe-dale img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .2s; }
.cafe-dale img.p1 { opacity: 1; }
.cafe[data-step] .cafe-dale img.p1 { opacity: 0; }
.cafe[data-step="1"] .cafe-dale img.p1, .cafe[data-step="2"] .cafe-dale img.p2, .cafe[data-step="3"] .cafe-dale img.p3,
.cafe[data-step="4"] .cafe-dale img.p4, .cafe[data-step="5"] .cafe-dale img.p5, .cafe[data-step="6"] .cafe-dale img.p6,
.cafe[data-step="7"] .cafe-dale img.p1 { opacity: 1; }
.cafe[data-step="1"] { --x: 1%; } .cafe[data-step="2"] { --x: 19%; } .cafe[data-step="3"] { --x: 35%; }
.cafe[data-step="4"] { --x: 22%; } .cafe[data-step="5"] { --x: 22%; } .cafe[data-step="6"] { --x: 77%; } .cafe[data-step="7"] { --x: 3%; }
.cafe[data-step="7"] .cafe-dale img.p1 { transform: scaleX(-1); }
.walk-steps h3 { scroll-margin-top: 290px; }
.walk-steps > div { padding-top: 26px; }
.walk-steps > div:first-child { padding-top: 22px; }

/* ---------- drills (practice + play the visit) ---------- */
.drill { margin-top: 16px; }
.drill-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; border: 0; padding: 0; margin: 0; min-width: 0; }
.drill-pick label { position: relative; display: block; min-height: 44px; padding: 12px 12px 12px 42px; border-radius: 5px; cursor: pointer; background: var(--card) var(--noise); box-shadow: 0 0 0 1px var(--line), 0 3px 0 var(--edge); line-height: 1.35; }
.drill-pick label b { display: block; font: 800 16px/1.2 var(--display); }
.drill-pick label span { display: block; margin-top: 2px; font-size: 15px; color: var(--ink-2); }
.drill-pick input { position: absolute; left: 14px; top: 15px; width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.drill-pick label:has(input:checked) { background-color: var(--manila); box-shadow: 0 0 0 2px var(--accent), 0 3px 0 var(--edge); }
.drill-start { margin-top: 14px; }
.drill-stage { margin-top: 4px; }
.drill-count { font: 700 14px/1 var(--display); color: var(--ink-2); letter-spacing: .06em; }
.drill-card { position: relative; margin-top: 8px; padding: 16px; border-radius: 6px; background: var(--manila) var(--noise); box-shadow: 0 0 0 1px rgba(122, 77, 42, .25), 0 4px 0 rgba(122, 77, 42, .3); }
.drill-pic { width: 100%; max-width: 480px; height: auto; border-radius: 4px; margin: 0 auto 8px; box-shadow: 0 0 0 1px rgba(122, 77, 42, .2); }
.drill-say { font-size: 17px; }
.drill-say b { font-weight: 700; }
.drill-prompt { margin-top: 6px; font: 800 18px/1.3 var(--display); }
.drill-form { margin-top: 8px; }
.drill-form.shake .demo-line { animation: shake .4s ease; }
.drill-mic { margin-top: 12px; }
.drill-mic .mic-note { font-size: 14px; }
.drill .hint { margin-top: 12px; font-size: 17px; }
.drill .hint mark { background: #FFD27A; color: var(--ink); border-radius: 2px; padding: 0 1px; }
.drill-said { font-weight: 700; letter-spacing: .03em; }
.drill-note { display: block; margin-top: 6px; font-size: 16px; color: var(--ink-2); }
.drill-ok { font: 800 17px/1.3 var(--display); color: #1E7A4F; }
.drill-after { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.drill-after:empty { display: none; }
.drill-sum { font: 800 19px/1.3 var(--display); }
.drill-list { margin-top: 10px !important; }
.drill-list li { padding: 8px 0; border-top: 1px solid rgba(122, 77, 42, .2); }
.drill-list li span { font-weight: 700; }
.drill-again { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.drill-play { margin-top: 14px; }
.drill-play .drill-pic { max-width: 170px; margin: 0 0 6px; }
.js .nojs-sets { display: none; }
.nojs-sets h3 { margin-top: 22px; }
.nojs-sets li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.nojs-sets audio { display: block; width: 100%; max-width: 300px; height: 40px; margin-top: 6px; }
.nojs-sets summary { min-height: 44px; display: inline-flex; align-items: center; cursor: pointer; font: 700 15px/1.2 var(--display); color: var(--accent); }

/* ---------- mexican vs spain: two columns with a paper divider ---------- */
.vs { margin-top: 16px; }
.vs-head, .vs-row { display: grid; grid-template-columns: 1fr 22px 1fr; }
.vs-head { position: sticky; top: 0; z-index: 2; padding: 8px 0; background: var(--paper) var(--noise); font: 800 15px/1.2 var(--display); letter-spacing: .04em; text-transform: uppercase; }
.vs-head span:first-child { color: #1E7A4F; } .vs-head span:last-child { color: #B23A2E; text-align: right; }
.vs-row { position: relative; }
.vs-row::before { content: ""; grid-column: 2; grid-row: 1; justify-self: center; width: 8px; background: var(--manila) var(--noise); box-shadow: inset 1px 0 0 rgba(122, 77, 42, .25), inset -1px 0 0 rgba(122, 77, 42, .25); clip-path: polygon(0 0, 100% 0, 80% 20%, 100% 40%, 75% 60%, 100% 80%, 85% 100%, 0 100%, 20% 80%, 0 60%, 25% 40%, 0 20%); }
.vs-mx, .vs-es { padding: 12px 4px 14px; border-bottom: 1px solid var(--line); }
.vs-mx { grid-column: 1; grid-row: 1; padding-right: 10px; }
.vs-es { grid-column: 3; grid-row: 1; padding-left: 10px; color: var(--ink-2); }
.vs-mx b, .vs-es b { display: block; font-weight: 700; font-size: 18px; color: var(--ink); }
.vs-es b { font-weight: 400; font-style: italic; color: var(--ink-2); }
.vs-en { font-size: 15px; color: var(--ink-2); }
.vs-k { font-style: normal; font-weight: 700; }
.vs .play-i { margin: -6px 0 -10px -8px; }

@media (max-width: 759px) {
  .gd-vs thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .gd-vs, .gd-vs tbody, .gd-vs tr, .gd-vs th, .gd-vs td { display: block; }
  .gd-vs tr { padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .gd-vs tbody tr:last-child { border-bottom: 0; }
  .gd-table.gd-vs th, .gd-table.gd-vs td { padding: 2px 0; border: 0; }
  .gd-vs th { font-family: var(--display); font-size: 15px; padding-bottom: 4px; }
  .gd-vs td::before { content: attr(data-k) ": "; font-weight: 700; color: var(--ink-2); }
  .gd-vs td.vs-none { display: none; }
  .gd-table { font-size: 15px; }
  .gd-table th, .gd-table td { padding: 9px 10px; }
  .cafe { height: 168px; }
  .walk-steps h3 { scroll-margin-top: 200px; }
  .drill-pick { grid-template-columns: 1fr 1fr; gap: 8px; }
  .drill-pick label { padding: 10px 8px 10px 36px; }
  .drill-pick label b { font-size: 15px; }
  .drill-pick label span { font-size: 14px; }
  .drill-pick input { left: 11px; top: 13px; }
  .drill-card { padding: 12px; }
  .vs-head, .vs-row { grid-template-columns: 1fr 16px 1fr; }
  .vs-mx b, .vs-es b { font-size: 16px; }
  .vs-head { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .js .cafe { position: relative; top: 0; }
}
