/*!
 * Learn the Tiles: ltt.css  (product design system, v1.1)
 * For a 55+ audience: 20px body minimum, 7:1 text contrast, big targets, light theme only.
 * No web fonts, no build step. Every class is prefixed "ltt-". See shared/demo.html for markup.
 * Contrast of every token pair is checked by: node shared/tools/contrast.mjs
 */

/* ============ 1. Tokens ============ */
:root {
  /* color: ground and ink */
  --ltt-paper: #FBF7EE;        /* warm off-white page ground */
  --ltt-surface: #FFFFFF;      /* cards, inputs */
  --ltt-sand: #F2EADA;         /* quiet panels, table header */
  --ltt-ink: #1B1A17;          /* near-black text */
  --ltt-ink-soft: #3A362E;     /* secondary text (still 7:1+; we never use light gray) */
  --ltt-line: #6F6553;         /* borders and dividers (3:1+ on paper) */

  /* color: brand (jade) and accent (lacquer red) */
  --ltt-brand: #09523B;
  --ltt-brand-hover: #07422F;
  --ltt-brand-tint: #E1EFE7;
  --ltt-on-brand: #FFFFFF;
  --ltt-accent: #8C1810;
  --ltt-accent-tint: #FBE6E1;
  --ltt-gold-tint: #FFF0C7;    /* callout "tip" ground */
  --ltt-link: #123F86;         /* deep blue links, always underlined */
  --ltt-focus: #1D4ED8;        /* focus ring, drawn outside the element on paper */
  --ltt-ribbon: #FFD84D;       /* mockup ribbon ground, ink text */
  --ltt-line-soft: #CFC4AE;    /* decorative dividers and card edges (cards also carry a shadow) */
  --ltt-warm: #7A4108;         /* "Not quite": clay/amber marker and border (never alarm red) */
  --ltt-warm-tint: #FBEBD2;    /* "Not quite" ground; ink text on it */

  /* the table: green felt for game scenes */
  --ltt-felt: #1D4D40;
  --ltt-felt-deep: #10332A;
  --ltt-on-felt: #FFFFFF;      /* text on felt, 7:1+ */
  --ltt-rack: #C9A86A;         /* wooden rack strip */
  --ltt-rack-deep: #8F6E36;

  /* card-line inks for reading practice lines (our own: plum, copper, teal; not the league's colors) */
  --ltt-ink-a: #5A2D82;        /* plum,   solid underline */
  --ltt-ink-b: #8A3A06;        /* copper, double underline */
  --ltt-ink-c: #0A5866;        /* teal,   dotted underline */
  --ltt-ink-n: #1B1A17;        /* neutral, no underline */

  /* type: system fonts only */
  --ltt-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --ltt-font-serif: Georgia, "Times New Roman", "Liberation Serif", serif;
  --ltt-font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Liberation Serif", serif; /* headings */
  --ltt-text: 1.25rem;         /* 20px: body minimum. Nothing in this system is smaller. */
  --ltt-text-lg: 1.5rem;       /* 24px: lead text, big labels */
  --ltt-h3: 1.75rem;           /* 28px */
  --ltt-h2: 2.125rem;          /* 34px */
  --ltt-h1: clamp(2.25rem, 1.7rem + 2.2vw, 3.25rem); /* 36 to 52px */
  --ltt-display: clamp(2.75rem, 2rem + 3vw, 4.25rem);
  --ltt-leading: 1.55;
  --ltt-leading-tight: 1.2;
  --ltt-measure: 38rem;        /* reading column, about 60 characters at 20px */

  /* space (4px base) */
  --ltt-s1: 0.25rem;
  --ltt-s2: 0.5rem;
  --ltt-s3: 0.75rem;
  --ltt-s4: 1rem;
  --ltt-s5: 1.5rem;
  --ltt-s6: 2rem;
  --ltt-s7: 3rem;
  --ltt-s8: 4.5rem;

  /* shape */
  --ltt-radius-sm: 8px;
  --ltt-radius: 14px;
  --ltt-radius-lg: 22px;
  --ltt-border: 2px;
  --ltt-shadow: 0 1px 2px rgba(27, 26, 23, 0.08), 0 6px 20px rgba(27, 26, 23, 0.07);
  --ltt-shadow-lift: 0 2px 4px rgba(27, 26, 23, 0.10), 0 10px 26px rgba(27, 26, 23, 0.12);
  --ltt-ease: 150ms cubic-bezier(0.2, 0.7, 0.3, 1); /* quick feedback; off under reduced motion */

  /* targets */
  --ltt-tap: 60px;             /* minimum height of anything you press */
}

/* ============ 2. Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body.ltt, .ltt-page {
  margin: 0;
  background: var(--ltt-paper);
  color: var(--ltt-ink);
  font-family: var(--ltt-font);
  font-size: var(--ltt-text);
  line-height: var(--ltt-leading);
}
:where(.ltt-page) :where(img, svg) { max-width: 100%; height: auto; }
:where(.ltt-page) h1, .ltt-h1 { font-family: var(--ltt-font-display); font-size: var(--ltt-h1); line-height: 1.15; margin: 0 0 var(--ltt-s4); font-weight: 700; letter-spacing: -0.005em; }
:where(.ltt-page) h2, .ltt-h2 { font-family: var(--ltt-font-display); font-size: var(--ltt-h2); line-height: 1.2; margin: var(--ltt-s7) 0 var(--ltt-s4); font-weight: 700; }
:where(.ltt-page) h3, .ltt-h3 { font-size: var(--ltt-h3); line-height: 1.25; margin: var(--ltt-s6) 0 var(--ltt-s3); font-weight: 700; }
:where(.ltt-page) :where(p, ul, ol) { margin: 0 0 var(--ltt-s4); }
:where(.ltt-page) li { margin-bottom: var(--ltt-s2); }
:where(.ltt-page) strong { font-weight: 800; }
.ltt-display { font-family: var(--ltt-font-display); font-size: var(--ltt-display); line-height: 1.08; font-weight: 700; letter-spacing: -0.01em; text-wrap: balance; margin: 0 0 var(--ltt-s4); }
.ltt-lead { font-size: var(--ltt-text-lg); line-height: 1.5; color: var(--ltt-ink); }
.ltt-soft { color: var(--ltt-ink-soft); }
.ltt-center { text-align: center; }
.ltt-stack > * + * { margin-top: var(--ltt-s4); }
.ltt-stack-lg > * + * { margin-top: var(--ltt-s6); }
.ltt-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ltt-hr { border: 0; border-top: var(--ltt-border) solid var(--ltt-line); margin: var(--ltt-s6) 0; }

/* links: always underlined */
:where(.ltt-page) a, .ltt-link {
  color: var(--ltt-link);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}
:where(.ltt-page) a:hover, .ltt-link:hover { text-decoration-thickness: 4px; }

/* focus: big, blue, outside the element; never removed */
.ltt-page :focus:not(:focus-visible) { outline: none; }
.ltt-page :focus-visible, .ltt-focus-demo {
  outline: 4px solid var(--ltt-focus);
  outline-offset: 4px;
  border-radius: var(--ltt-radius-sm);
}

/* ============ 3. Page shell ============ */
.ltt-page { min-height: 100vh; display: flex; flex-direction: column; }
.ltt-main { flex: 1 0 auto; padding: var(--ltt-s6) 0 var(--ltt-s8); }
.ltt-column { width: 100%; max-width: calc(var(--ltt-measure) + 2 * var(--ltt-s5)); margin: 0 auto; padding: 0 var(--ltt-s5); }
.ltt-wide { width: 100%; max-width: 74rem; margin: 0 auto; padding: 0 var(--ltt-s5); }
.ltt-section { padding: var(--ltt-s7) 0; }
.ltt-section--sand { background: var(--ltt-sand); }

/* skip link */
.ltt-skip { position: absolute; left: var(--ltt-s4); top: -100px; background: var(--ltt-ink); color: #fff !important; padding: var(--ltt-s3) var(--ltt-s4); border-radius: var(--ltt-radius-sm); z-index: 200; }
.ltt-skip:focus { top: var(--ltt-s4); }

/* ============ 4. Header and footer ============ */
.ltt-header { background: var(--ltt-surface); border-bottom: 1px solid var(--ltt-line-soft); box-shadow: 0 1px 0 rgba(27, 26, 23, 0.03); }
.ltt-header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--ltt-s4); min-height: 76px; flex-wrap: wrap; padding-top: var(--ltt-s2); padding-bottom: var(--ltt-s2); }
.ltt-wordmark {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--ltt-font-display); font-size: 1.625rem; font-weight: 700; letter-spacing: 0;
  color: var(--ltt-ink) !important; text-decoration: none !important; min-height: 48px;
}
/* tiny tile glyph: a mini ivory tile with a jade back and a red dot */
.ltt-wordmark-tile {
  position: relative; display: inline-block; width: 26px; height: 34px; flex: none;
  background: #FFFDF5; border: 2px solid var(--ltt-ink); border-radius: 6px;
  box-shadow: 2px 3px 0 var(--ltt-brand);
}
.ltt-wordmark-tile::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px;
  border-radius: 50%; border: 3px solid var(--ltt-accent); background: #FFFDF5; box-sizing: border-box;
}
.ltt-header-link { font-size: var(--ltt-text); font-weight: 700; }
.ltt-back {
  display: inline-flex; align-items: center; gap: 0.4rem; min-height: 48px;
  font-weight: 700; color: var(--ltt-link);
}
.ltt-back::before { content: "\2190"; font-size: 1.3em; line-height: 1; display: inline-block; text-decoration: none; }
.ltt-back { text-decoration: none !important; }
.ltt-back > span, .ltt-back-text { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.18em; }

.ltt-footer { background: var(--ltt-sand); border-top: 1px solid var(--ltt-line-soft); padding: var(--ltt-s6) 0; color: var(--ltt-ink); }
.ltt-footer p { margin: 0 0 var(--ltt-s3); }
.ltt-footer-links { display: flex; flex-wrap: wrap; gap: var(--ltt-s2) var(--ltt-s5); list-style: none; padding: 0; margin: 0 0 var(--ltt-s4); }

/* ============ 5. Buttons ============ */
.ltt-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: var(--ltt-tap); padding: 0.75rem 1.75rem;
  font: inherit; font-size: 1.375rem; font-weight: 800; line-height: 1.2; text-align: center; text-wrap: balance;
  border: 2px solid transparent; border-radius: var(--ltt-radius);
  cursor: pointer; text-decoration: none !important;
  transition: background-color var(--ltt-ease), border-color var(--ltt-ease), box-shadow var(--ltt-ease), transform var(--ltt-ease);
}
.ltt-btn:active { transform: translateY(2px); }
.ltt-btn--primary { background: var(--ltt-brand); color: var(--ltt-on-brand) !important; border-color: var(--ltt-brand); box-shadow: 0 3px 0 var(--ltt-felt-deep), 0 6px 14px rgba(9, 82, 59, 0.18); }
.ltt-btn--primary:hover { background: var(--ltt-brand-hover); }
.ltt-btn--primary:active { box-shadow: 0 1px 0 var(--ltt-felt-deep), 0 2px 6px rgba(9, 82, 59, 0.18); }
.ltt-btn--secondary { background: var(--ltt-surface); color: var(--ltt-brand) !important; border-color: var(--ltt-brand); box-shadow: 0 2px 0 rgba(9, 82, 59, 0.25); }
.ltt-btn--secondary:hover { background: var(--ltt-brand-tint); }
.ltt-btn--secondary:active { box-shadow: none; }
.ltt-btn--quiet { background: transparent; color: var(--ltt-link) !important; border-color: transparent; text-decoration: underline !important; text-underline-offset: 0.18em; font-weight: 700; }
.ltt-btn--quiet:hover { background: var(--ltt-sand); }
.ltt-btn--block { display: flex; width: 100%; }
.ltt-btn[disabled], .ltt-btn[aria-disabled="true"] { background: var(--ltt-sand); color: var(--ltt-ink-soft) !important; border-color: var(--ltt-line); box-shadow: none; cursor: not-allowed; transform: none; }
.ltt-btn-row { display: flex; flex-wrap: wrap; gap: var(--ltt-s4); align-items: center; margin: var(--ltt-s5) 0; }
@media (max-width: 599.98px) {
  /* labels up to about 22 characters stay on one line on a 390px phone */
  .ltt-btn { display: flex; width: 100%; padding: 0.75rem 1rem; font-size: 1.3125rem; }
  .ltt-btn-row { flex-direction: column; align-items: stretch; }
}

/* ============ 6. Forms ============ */
.ltt-field { margin: 0 0 var(--ltt-s5); }
.ltt-label { display: block; font-size: var(--ltt-text-lg); font-weight: 800; line-height: 1.3; margin: 0 0 var(--ltt-s2); }
.ltt-hint { display: block; color: var(--ltt-ink-soft); margin: 0 0 var(--ltt-s2); }
.ltt-input, .ltt-select, .ltt-textarea {
  display: block; width: 100%; min-height: var(--ltt-tap);
  padding: 0.6rem 1rem; font: inherit; font-size: var(--ltt-text); color: var(--ltt-ink);
  background: var(--ltt-surface); border: 2px solid var(--ltt-line); border-radius: var(--ltt-radius-sm);
  box-shadow: inset 0 1px 2px rgba(27, 26, 23, 0.06);
  transition: border-color var(--ltt-ease), box-shadow var(--ltt-ease);
}
.ltt-textarea { min-height: 8rem; }
.ltt-input:focus-visible, .ltt-select:focus-visible, .ltt-textarea:focus-visible { border-color: var(--ltt-ink); }
.ltt-field.is-error .ltt-input { border-color: var(--ltt-accent); box-shadow: inset 0 0 0 1px var(--ltt-accent); }
.ltt-error { display: flex; gap: 0.5rem; align-items: flex-start; color: var(--ltt-accent); font-weight: 700; margin: var(--ltt-s2) 0 0; }
.ltt-error::before { content: "!"; flex: none; display: inline-grid; place-items: center; width: 1.6em; height: 1.6em; border-radius: 50%; background: var(--ltt-accent); color: #fff; font-weight: 900; line-height: 1; }
.ltt-check { display: flex; gap: var(--ltt-s3); align-items: flex-start; min-height: var(--ltt-tap); padding: var(--ltt-s3) 0; cursor: pointer; }
.ltt-check input { width: 32px; height: 32px; margin: 0.1rem 0 0; flex: none; accent-color: var(--ltt-brand); }

/* ============ 7. Choice buttons (one-tap answers) ============ */
/* Markup: <div class="ltt-choices" role="group" aria-label="..."><button class="ltt-choice" aria-pressed="false">5 Dot</button>...</div>
   States: aria-pressed="true" or .is-selected (your pick), .is-correct, .is-wrong (alias .is-not-quite).
   Every state changes a marker that sits in reserved space on the left (dot, check, curved arrow) and the
   checked states add a word tab ("Correct", "Not quite") on the top edge. Nothing moves or grows on select. */
.ltt-choices { display: grid; gap: var(--ltt-s5); grid-template-columns: 1fr; margin: var(--ltt-s5) 0; }
@media (min-width: 600px) { .ltt-choices--2col { grid-template-columns: 1fr 1fr; } }
.ltt-choice {
  position: relative; display: flex; align-items: center; gap: var(--ltt-s4);
  width: 100%; min-height: 76px; padding: var(--ltt-s3) var(--ltt-s5) var(--ltt-s3) 4.25rem;
  font: inherit; font-size: var(--ltt-text-lg); font-weight: 700; text-align: left; color: var(--ltt-ink);
  background: var(--ltt-surface); border: 2px solid var(--ltt-line); border-radius: var(--ltt-radius);
  box-shadow: var(--ltt-shadow); cursor: pointer;
  transition: background-color var(--ltt-ease), border-color var(--ltt-ease), box-shadow var(--ltt-ease), transform var(--ltt-ease);
}
.ltt-choice:hover { background: #FFFDF8; box-shadow: var(--ltt-shadow-lift); }
.ltt-choice:active { transform: translateY(1px); box-shadow: 0 1px 2px rgba(27, 26, 23, 0.1); }
.ltt-choice-text { flex: 1 1 auto; }
.ltt-choice-tile { flex: none; display: inline-flex; }
/* the marker: an empty ring in reserved space on the left */
.ltt-choice::before {
  content: ""; position: absolute; left: 1.25rem; top: 50%; width: 30px; height: 30px; margin-top: -15px;
  border-radius: 50%; border: 2px solid var(--ltt-line); background: var(--ltt-surface) center / 20px 20px no-repeat;
  box-sizing: border-box; transition: background-color var(--ltt-ease), border-color var(--ltt-ease), box-shadow var(--ltt-ease);
}
/* the word tab on the top edge (absolutely placed: never changes the button's size) */
.ltt-choice::after {
  position: absolute; top: 0; right: 1rem; transform: translateY(-55%);
  font-size: var(--ltt-text); font-weight: 800; line-height: 1.2;
  padding: 0.2rem 0.8rem; border-radius: 999px;
}
.ltt-choice[aria-pressed="true"], .ltt-choice.is-selected { border-color: var(--ltt-ink); background: var(--ltt-sand); box-shadow: inset 0 0 0 1px var(--ltt-ink), var(--ltt-shadow); }
.ltt-choice[aria-pressed="true"]::before, .ltt-choice.is-selected::before { border-color: var(--ltt-ink); background-color: var(--ltt-ink); box-shadow: inset 0 0 0 5px var(--ltt-surface); }
.ltt-choice.is-correct { border-color: var(--ltt-brand); background: var(--ltt-brand-tint); box-shadow: inset 0 0 0 1px var(--ltt-brand), var(--ltt-shadow); }
.ltt-choice.is-correct::before { border-color: var(--ltt-brand); background-color: var(--ltt-brand); box-shadow: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.ltt-choice.is-correct::after { content: "Correct"; background: var(--ltt-brand); color: var(--ltt-on-brand); }
.ltt-choice.is-wrong, .ltt-choice.is-not-quite { border-color: var(--ltt-warm); background: var(--ltt-warm-tint); box-shadow: inset 0 0 0 1px var(--ltt-warm), var(--ltt-shadow); }
.ltt-choice.is-wrong::before, .ltt-choice.is-not-quite::before { border-color: var(--ltt-warm); background-color: var(--ltt-warm); box-shadow: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18.5 13.5A7 7 0 1 1 16 7'/%3E%3Cpath d='M16.5 2.8V7.6H11.7'/%3E%3C/svg%3E"); }
.ltt-choice.is-wrong::after, .ltt-choice.is-not-quite::after { content: "Not quite"; background: var(--ltt-warm); color: var(--ltt-on-brand); }

/* feedback line under the choices; put the words in the markup too (screen readers) */
.ltt-feedback {
  display: flex; gap: var(--ltt-s3); align-items: flex-start; padding: var(--ltt-s4) var(--ltt-s5);
  border-radius: var(--ltt-radius); border: 2px solid; font-size: var(--ltt-text-lg); font-weight: 700; margin: var(--ltt-s4) 0;
  animation: ltt-rise 150ms cubic-bezier(0.2, 0.7, 0.3, 1);
}
.ltt-feedback::before { content: ""; flex: none; width: 32px; height: 32px; margin-top: 0.05em; border-radius: 50%; background: center / 22px 22px no-repeat; }
.ltt-feedback--correct { background: var(--ltt-brand-tint); border-color: var(--ltt-brand); color: var(--ltt-ink); }
.ltt-feedback--correct::before { background-color: var(--ltt-brand);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.ltt-feedback--wrong, .ltt-feedback--not-quite { background: var(--ltt-warm-tint); border-color: var(--ltt-warm); color: var(--ltt-ink); }
.ltt-feedback--wrong::before, .ltt-feedback--not-quite::before { background-color: var(--ltt-warm);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18.5 13.5A7 7 0 1 1 16 7'/%3E%3Cpath d='M16.5 2.8V7.6H11.7'/%3E%3C/svg%3E"); }
@keyframes ltt-rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ============ 8. Card, callout ============ */
.ltt-card { background: var(--ltt-surface); border: 1px solid var(--ltt-line-soft); border-radius: var(--ltt-radius-lg); padding: var(--ltt-s5); box-shadow: var(--ltt-shadow); }
.ltt-card > :first-child, .ltt-callout > :first-child, .ltt-price > :first-child { margin-top: 0; }
.ltt-card > :last-child { margin-bottom: 0; }
.ltt-card-title { font-size: var(--ltt-h3); font-weight: 800; line-height: 1.25; margin: 0 0 var(--ltt-s3); }
.ltt-cards { display: grid; gap: var(--ltt-s5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }

.ltt-callout { border-left: 6px solid var(--ltt-brand); background: var(--ltt-brand-tint); padding: var(--ltt-s4) var(--ltt-s5); border-radius: 4px var(--ltt-radius) var(--ltt-radius) 4px; margin: var(--ltt-s5) 0; }
.ltt-callout > :last-child { margin-bottom: 0; }
.ltt-callout-title { display: block; font-weight: 800; font-size: var(--ltt-text-lg); margin: 0 0 var(--ltt-s2); }
.ltt-callout--tip { border-left-color: #8A5A00; background: var(--ltt-gold-tint); }
.ltt-callout--warn { border-left-color: var(--ltt-accent); background: var(--ltt-accent-tint); }
.ltt-callout--plain { border-left-color: var(--ltt-ink); background: var(--ltt-sand); }

/* ============ 9. Step progress ============ */
/* Markup: <div class="ltt-progress"><p class="ltt-progress-label">Step 3 of 10</p>
            <div class="ltt-progress-bar" role="progressbar" aria-valuemin="1" aria-valuemax="10" aria-valuenow="3" aria-label="Step 3 of 10"><span style="width:30%"></span></div></div> */
.ltt-progress { margin: 0 0 var(--ltt-s5); }
.ltt-progress-label { font-weight: 800; font-size: var(--ltt-text); margin: 0 0 var(--ltt-s2); }
.ltt-progress-bar { height: 16px; background: var(--ltt-surface); border: 2px solid var(--ltt-line); border-radius: 999px; overflow: hidden; }
.ltt-progress-bar > span { display: block; height: 100%; background: var(--ltt-brand); border-radius: 999px; transition: width 300ms ease; }

/* ============ 10. Tiles ============ */
/* Use LTTTiles.svg()/el() inside these wrappers. */
.ltt-tile { display: inline-flex; flex-direction: column; align-items: center; gap: var(--ltt-s2); margin: 0; }
.ltt-tile svg { display: block; height: auto; }
.ltt-tile-grid svg, .ltt-tile-row svg { max-width: none; flex: none; } /* labelled SVGs are wider than the tile; never squash them */
.ltt-tile-name { font-size: var(--ltt-text); font-weight: 700; line-height: 1.25; text-align: center; }
.ltt-tile-row { display: flex; flex-wrap: wrap; gap: var(--ltt-s3); align-items: flex-end; margin: var(--ltt-s4) 0; }
.ltt-tile-row--tight { gap: 4px; }
.ltt-tile-grid { display: grid; gap: var(--ltt-s5) var(--ltt-s4); grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); justify-items: center; align-items: start; margin: var(--ltt-s5) 0; }
.ltt-tile-big svg { width: min(220px, 60vw); }

/* ============ 11. Table ============ */
.ltt-table-wrap { overflow-x: auto; margin: var(--ltt-s5) 0; border: 1px solid var(--ltt-line-soft); box-shadow: var(--ltt-shadow); border-radius: var(--ltt-radius); background: var(--ltt-surface); }
.ltt-table { width: 100%; border-collapse: collapse; font-size: var(--ltt-text); }
.ltt-table caption { text-align: left; font-weight: 800; padding: var(--ltt-s3) var(--ltt-s4); }
.ltt-table th, .ltt-table td { text-align: left; vertical-align: top; padding: 0.85rem 1rem; border-bottom: 1px solid var(--ltt-line-soft); }
.ltt-table thead th { background: var(--ltt-sand); font-weight: 800; border-bottom: 2px solid var(--ltt-line); }
.ltt-table tbody tr:last-child > * { border-bottom: 0; }
.ltt-table .ltt-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ============ 12. Price box ============ */
.ltt-price { background: var(--ltt-surface); border: 2px solid var(--ltt-brand); box-shadow: inset 0 6px 0 var(--ltt-brand), var(--ltt-shadow); border-radius: var(--ltt-radius-lg); padding: calc(var(--ltt-s5) + 6px) var(--ltt-s5) var(--ltt-s5); }
.ltt-price-name { font-family: var(--ltt-font-display); font-size: var(--ltt-h3); font-weight: 700; margin: 0 0 var(--ltt-s2); }
.ltt-price-amount { font-size: clamp(3rem, 2.4rem + 2.5vw, 4rem); font-weight: 900; line-height: 1; margin: var(--ltt-s3) 0 var(--ltt-s2); letter-spacing: -0.02em; }
.ltt-price-amount small { font-size: var(--ltt-text-lg); font-weight: 700; letter-spacing: 0; }
.ltt-price-per { font-size: var(--ltt-text-lg); font-weight: 700; color: var(--ltt-brand); margin: 0 0 var(--ltt-s4); }
.ltt-price-list { list-style: none; padding: 0; margin: var(--ltt-s4) 0 var(--ltt-s5); }
.ltt-price-list li { position: relative; padding-left: 2.2rem; margin-bottom: var(--ltt-s3); }
.ltt-price-list li::before { content: "\2713"; position: absolute; left: 0; top: 0; font-weight: 900; color: var(--ltt-brand); font-size: 1.2em; line-height: 1.3; }
.ltt-price-note { color: var(--ltt-ink-soft); margin: var(--ltt-s4) 0 0; }

/* ============ 13. FAQ ============ */
.ltt-faq { border-top: 1px solid var(--ltt-line); margin: var(--ltt-s5) 0; }
.ltt-faq details { border-bottom: 1px solid var(--ltt-line); }
.ltt-faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--ltt-s4);
  min-height: var(--ltt-tap); padding: var(--ltt-s4) 0; cursor: pointer; list-style: none;
  font-size: var(--ltt-text-lg); font-weight: 800; line-height: 1.3;
}
.ltt-faq summary::-webkit-details-marker { display: none; }
.ltt-faq summary::after { content: "+"; flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border: 2px solid var(--ltt-ink); border-radius: 50%; font-size: 1.5rem; font-weight: 700; line-height: 1; transition: background-color var(--ltt-ease); }
.ltt-faq summary:hover::after { background: var(--ltt-sand); }
.ltt-faq details[open] summary::after { content: "\2212"; }
.ltt-faq details > :not(summary) { margin: 0 0 var(--ltt-s5); }

/* ============ 14. Mockup ribbon ============ */
/* Put first in <body>: <div class="ltt-ribbon" role="note">Mockup. Nothing here is live and no payment is taken.</div>
   It stays fixed at the top of the screen and takes up its own space (no content is hidden under it). */
.ltt-ribbon {
  position: sticky; top: 0; z-index: 100;
  background: var(--ltt-ribbon); color: var(--ltt-ink);
  border-bottom: 2px solid var(--ltt-ink);
  font-size: 1.125rem; font-weight: 800; line-height: 1.3; text-align: center; text-wrap: balance;
  padding: 0.5rem var(--ltt-s4);
  background-image: repeating-linear-gradient(-45deg, transparent 0 18px, rgba(27, 26, 23, 0.05) 18px 26px);
}
/* phones: a slim strip, two lines at most (the one place type drops below 20px: it is a notice, not content) */
@media (max-width: 599.98px) { .ltt-ribbon { font-size: 1rem; line-height: 1.25; padding: 0.3rem 0.75rem; } }

/* ============ 15. Small helpers ============ */
.ltt-badge { display: inline-block; font-size: var(--ltt-text); font-weight: 800; padding: 0.1rem 0.7rem; border-radius: 999px; border: 2px solid currentColor; }
.ltt-steps { counter-reset: ltt-step; list-style: none; padding: 0; margin: var(--ltt-s5) 0; }
.ltt-steps > li { counter-increment: ltt-step; position: relative; padding-left: 3.6rem; min-height: 2.8rem; margin-bottom: var(--ltt-s4); }
.ltt-steps > li::before { content: counter(ltt-step); position: absolute; left: 0; top: -0.1rem; width: 2.6rem; height: 2.6rem; display: grid; place-items: center; border-radius: 50%; background: var(--ltt-brand); color: var(--ltt-on-brand); font-weight: 900; }
.ltt-swatch { display: grid; grid-template-columns: 64px 1fr; gap: var(--ltt-s3); align-items: center; }
.ltt-swatch > span:first-child { width: 64px; height: 64px; border-radius: var(--ltt-radius-sm); border: 2px solid var(--ltt-ink); }
.ltt-code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace; font-size: 1.05em; background: var(--ltt-sand); padding: 0.05em 0.35em; border-radius: 6px; word-break: break-word; }
pre.ltt-code { display: block; padding: var(--ltt-s4); overflow-x: auto; white-space: pre-wrap; border: 2px solid var(--ltt-line); }

/* ============ 15b. Tappable tiles ============ */
/* <button class="ltt-tile-btn" type="button" aria-pressed="false" aria-label="5 Dot">LTTTiles.svg("5D",{size:72})</button>
   Lifts on hover/focus, presses down, and when selected (aria-pressed="true" or .is-selected) rises and gets a ring
   plus a marker bar under it, so selection never relies on motion or color alone. Inherits currentColor for the ring,
   so it works on paper (ink ring) and on .ltt-felt (white ring). */
.ltt-tile-btn {
  position: relative; display: inline-flex; flex: none; padding: 4px; margin: 0;
  background: none; border: 0; border-radius: 12px; cursor: pointer; color: var(--ltt-ink);
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--ltt-ease), filter var(--ltt-ease), box-shadow var(--ltt-ease);
}
.ltt-tile-btn svg { display: block; pointer-events: none; }
.ltt-tile-btn:hover, .ltt-tile-btn:focus-visible { transform: translateY(-6px); filter: drop-shadow(0 8px 8px rgba(0, 0, 0, 0.18)); }
.ltt-tile-btn:active { transform: translateY(-1px); filter: none; }
.ltt-tile-btn::after {
  content: ""; position: absolute; left: 22%; right: 22%; bottom: -10px; height: 5px; border-radius: 3px;
  background: currentColor; opacity: 0; transition: opacity var(--ltt-ease);
}
.ltt-tile-btn[aria-pressed="true"], .ltt-tile-btn.is-selected { transform: translateY(-12px); box-shadow: 0 0 0 3px currentColor; }
.ltt-tile-btn[aria-pressed="true"]::after, .ltt-tile-btn.is-selected::after { opacity: 1; bottom: -22px; }
.ltt-tile-btn[disabled] { cursor: default; opacity: 0.55; transform: none; filter: none; }
.ltt-page .ltt-tile-btn:focus-visible { outline-offset: 2px; }

/* ============ 15c. Table surface: felt and rack ============ */
.ltt-felt {
  position: relative; color: var(--ltt-on-felt);
  background-color: var(--ltt-felt);
  background-image:
    radial-gradient(ellipse at 50% 45%, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0) 55%),
    radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0) 55%, rgba(16, 51, 42, 0.85) 100%);
  border-radius: var(--ltt-radius-lg); padding: var(--ltt-s5);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25), inset 0 2px 16px rgba(0, 0, 0, 0.25);
}
.ltt-felt :where(h1, h2, h3, p, li, strong) { color: var(--ltt-on-felt); }
.ltt-felt :where(a) { color: var(--ltt-on-felt); }
.ltt-felt .ltt-tile-btn { color: var(--ltt-on-felt); }
.ltt-page .ltt-felt :focus-visible { outline-color: var(--ltt-ribbon); }
.ltt-felt-label { display: inline-block; font-weight: 800; font-size: var(--ltt-text); margin: 0 0 var(--ltt-s3); }

.ltt-rack {
  display: flex; flex-wrap: nowrap; align-items: flex-end; gap: 4px;
  padding: 10px 12px 16px; margin: var(--ltt-s4) 0;
  overflow-x: auto; overscroll-behavior-x: contain;
  background: linear-gradient(180deg, #D8BB80 0%, var(--ltt-rack) 55%, var(--ltt-rack-deep) 100%);
  border-radius: 10px;
  box-shadow: inset 0 -7px 0 var(--ltt-rack-deep), inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 6px 14px rgba(0, 0, 0, 0.22);
}
.ltt-rack > * { flex: none; }
.ltt-rack .ltt-tile-btn[aria-pressed="true"], .ltt-rack .ltt-tile-btn.is-selected { transform: translateY(-10px); }
.ltt-rack .ltt-tile-btn::after { display: none; } /* the rack has no room below; the ring and lift carry the state */
.ltt-rack-gap { width: 14px; }

/* ============ 15d. Card line (reading practice lines) ============ */
/* For OUR OWN practice hands only (never copy a league card line).
   <p class="ltt-line" aria-label="...plain reading...">
     <span class="ltt-line-group ltt-ink-n">FF</span> <span class="ltt-line-group ltt-ink-a">111</span>
     <span class="ltt-line-group ltt-ink-b">222</span> <span class="ltt-line-group ltt-ink-c">333</span>
     <span class="ltt-line-note">(Any three suits)</span> <span class="ltt-line-mark">C</span> <span class="ltt-line-value">30</span></p>
   Each ink has its own underline (a solid, b double, c dotted, n none), so the groups never rely on color alone. */
.ltt-ink-a { color: var(--ltt-ink-a); }
.ltt-ink-b { color: var(--ltt-ink-b); }
.ltt-ink-c { color: var(--ltt-ink-c); }
.ltt-ink-n { color: var(--ltt-ink-n); }
.ltt-line {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35em 0.75em;
  margin: var(--ltt-s4) 0; padding: var(--ltt-s4) var(--ltt-s5);
  background: var(--ltt-surface); border: 1px solid var(--ltt-line-soft); border-radius: var(--ltt-radius);
  box-shadow: var(--ltt-shadow);
  font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem); font-weight: 800; line-height: 1.5;
  letter-spacing: 0.06em; font-variant-numeric: tabular-nums;
}
.ltt-line-group { white-space: nowrap; text-decoration-line: underline; text-decoration-thickness: 3px; text-underline-offset: 0.2em; text-decoration-skip-ink: none; }
.ltt-line-group.ltt-ink-a { text-decoration-style: solid; }
.ltt-line-group.ltt-ink-b { text-decoration-style: double; text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
.ltt-line-group.ltt-ink-c { text-decoration-style: dotted; text-decoration-thickness: 4px; }
.ltt-line-group.ltt-ink-n { text-decoration-line: none; }
.ltt-line-note { font-size: var(--ltt-text); font-weight: 600; letter-spacing: 0; color: var(--ltt-ink-soft); }
.ltt-line-end { margin-left: auto; display: inline-flex; align-items: baseline; gap: 0.6rem; }
.ltt-line-mark {
  display: inline-grid; place-items: center; min-width: 2rem; height: 2rem; padding: 0 0.3rem; align-self: center;
  border: 2px solid var(--ltt-ink); border-radius: 6px; font-size: var(--ltt-text); font-weight: 800; letter-spacing: 0; color: var(--ltt-ink);
}
.ltt-line-value { font-size: var(--ltt-text-lg); font-weight: 800; letter-spacing: 0; color: var(--ltt-ink); }
/* legend for the inks */
.ltt-line-key { display: flex; flex-wrap: wrap; gap: var(--ltt-s2) var(--ltt-s5); list-style: none; padding: 0; margin: var(--ltt-s3) 0; }
.ltt-line-key li { margin: 0; font-weight: 700; }
.ltt-line-key .ltt-line-group { font-size: 1.375rem; letter-spacing: 0.04em; margin-right: 0.4rem; }

/* ============ 16. Motion ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .ltt-btn:active, .ltt-choice:active { transform: none; }
  .ltt-tile-btn, .ltt-tile-btn:hover, .ltt-tile-btn:focus-visible, .ltt-tile-btn:active,
  .ltt-tile-btn[aria-pressed="true"], .ltt-tile-btn.is-selected { transform: none !important; }
  .ltt-feedback { animation: none; }
}

/* ============ 17. Print (the Table Host Kit) ============ */
/* Letter pages, large type. Wrap each page in <section class="ltt-print-page">.
   Helpers: .ltt-break-before, .ltt-break-after, .ltt-avoid-break, .ltt-no-print, .ltt-print-only */
.ltt-print-only { display: none; }
@page { size: letter; margin: 0.6in; }
@media print {
  :root { --ltt-text: 14pt; --ltt-text-lg: 17pt; --ltt-h3: 20pt; --ltt-h2: 26pt; --ltt-h1: 34pt; --ltt-display: 40pt; }
  html, body.ltt, .ltt-page { background: #fff !important; }
  body.ltt, .ltt-page { font-size: 14pt; line-height: 1.45; min-height: 0; display: block; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .ltt-ribbon, .ltt-no-print, .ltt-skip, .ltt-btn, .ltt-back { display: none !important; }
  .ltt-print-only { display: block; }
  .ltt-main { padding: 0; }
  .ltt-column, .ltt-wide { max-width: none; padding: 0; }
  .ltt-card, .ltt-price { box-shadow: none; }
  .ltt-print-page { break-after: page; page-break-after: always; }
  .ltt-print-page:last-child { break-after: auto; page-break-after: auto; }
  .ltt-break-before { break-before: page; page-break-before: always; }
  .ltt-break-after { break-after: page; page-break-after: always; }
  .ltt-avoid-break, .ltt-card, .ltt-callout, .ltt-tile, .ltt-table tr, .ltt-faq details { break-inside: avoid; page-break-inside: avoid; }
  :where(.ltt-page) a { color: var(--ltt-ink); }
  .ltt-print-url::after { content: " (" attr(href) ")"; font-weight: 400; }
  .ltt-faq details > :not(summary) { display: block; }
  .ltt-tile-grid { grid-template-columns: repeat(6, 1fr); gap: 10pt 8pt; }
  h1, h2, h3 { break-after: avoid; page-break-after: avoid; }
}
