/* Tessa Hart sample: "Berry sticker". Own brand, every rule scoped under .th (see tests/samples.test.js). */
:root {
  --th-blush: #fceff1;
  --th-plum: #3a1730;
  --th-berry: #9e2a5b;
  --th-mint: #9fe2c8;
  --th-card: #ffffff;
  --th-muted: #6a4a5f;
  --th-sans: 'Bricolage Grotesque', system-ui, sans-serif;
  --th-radius: 10px;
  --th-shadow: 3px 3px 0 var(--th-plum);
}

.th, .th *, .th *::before, .th *::after { box-sizing: border-box; }
.th [hidden] { display: none !important; }
.th { background: var(--th-blush); color: var(--th-plum); font: 400 17px/1.55 var(--th-sans); overflow-x: clip; }
.th h1, .th h2, .th h3, .th p, .th ul, .th dl, .th dd, .th dt, .th figure { margin: 0; }
.th h1, .th h2, .th h3 { font-family: var(--th-sans); font-weight: 800; color: var(--th-plum); line-height: 1.12; letter-spacing: -0.015em; }
.th h1 { font-size: clamp(34px, 9vw, 58px); margin-bottom: 16px; }
.th h2 { font-size: clamp(26px, 6vw, 38px); margin-bottom: 14px; }
.th h3 { font-size: 20px; margin-bottom: 8px; }
.th p + p { margin-top: 12px; }
.th mark { background: linear-gradient(transparent 60%, var(--th-mint) 60%); color: inherit; padding: 0 2px; }

.th .th-wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.th .th-narrow { max-width: 680px; }
.th .th-band { padding: 44px 0 56px; }
.th .th-lead { font-size: 19px; max-width: 30em; margin-bottom: 24px; }
.th .th-fine { font-size: 14px; color: var(--th-muted); margin-top: 14px; }
.th .th-meta { font-size: 14.5px; font-weight: 600; color: var(--th-muted); margin-top: 14px; }
.th .th-eyebrow { display: inline-block; background: var(--th-plum); color: var(--th-blush); font-size: 12.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; padding: 5px 12px; border-radius: 6px; margin-bottom: 18px; transform: rotate(-0.8deg); }
.th .th-kicker { font-size: 12.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--th-berry); margin-bottom: 8px; }
.th .th-link { color: var(--th-berry); font-weight: 600; text-underline-offset: 3px; }
.th .th-link:hover { color: var(--th-plum); }

.th .th-card { background: var(--th-card); border: 2px solid var(--th-plum); border-radius: var(--th-radius); box-shadow: var(--th-shadow); padding: 22px 20px; }

/* Header + footer */
.th .th-header { border-bottom: 2px solid var(--th-plum); background: var(--th-card); }
.th .th-header-in { padding-top: 12px; padding-bottom: 12px; }
.th .th-logo { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; font-weight: 800; font-size: 18px; line-height: 1.2; }
.th .th-logo small { grid-column: 2; font-size: 12.5px; font-weight: 600; color: var(--th-muted); }
.th .th-mark { grid-row: 1 / span 2; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 7px; background: var(--th-plum); color: var(--th-mint); font-size: 15px; font-weight: 800; letter-spacing: 0.02em; transform: rotate(-3deg); }
.th .th-footer { background: var(--th-plum); color: var(--th-blush); padding: 22px 0; font-size: 14px; text-align: center; }

/* Buttons */
.th .th-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 30px;
  background: var(--th-berry); color: #fff; border: 2px solid var(--th-plum); border-radius: var(--th-radius); cursor: pointer;
  font: 800 18px/1.2 var(--th-sans); text-decoration: none; text-align: center; box-shadow: var(--th-shadow);
  transition: transform 0.12s, box-shadow 0.12s;
}
@media (hover: hover) { .th .th-btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--th-plum); } }
.th .th-btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--th-plum); }
.th .th-btn:focus-visible, .th .th-ans:focus-visible, .th .th-back:focus-visible, .th .th-field input:focus-visible, .th .th-link:focus-visible { outline: 3px solid var(--th-berry); outline-offset: 3px; }
.th .th-optin .th-btn { width: 100%; }

/* Hero */
.th .th-hero { padding: 40px 0 44px; }
.th .th-hero-grid { display: grid; gap: 40px; align-items: center; }
.th .th-photo { width: 100%; aspect-ratio: 4 / 5; max-width: 340px; margin: 0 auto; background: var(--th-card); border: 2px solid var(--th-plum); border-radius: 6px; padding: 12px 12px 36px; box-shadow: 5px 5px 0 var(--th-plum); transform: rotate(-1deg); position: relative; }
.th .th-photo img { display: block; width: 100%; height: 100%; object-fit: cover; border: 2px solid var(--th-plum); }
.th .th-about { transform: rotate(0.5deg); }
.th .th-about p { max-width: 36em; }

/* Questions */
.th .th-qband { padding-top: 28px; }
.th .th-qwrap { max-width: 640px; }
.th:not(.th-js) .th-progress, .th:not(.th-js) .th-backrow { visibility: hidden; }
.th .th-progress-text { font-size: 13px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 10px; }
.th .th-bar { height: 14px; background: var(--th-card); border: 2px solid var(--th-plum); border-radius: 99px; overflow: hidden; margin-bottom: 22px; }
.th .th-bar i { display: block; height: 100%; background: var(--th-berry); transition: width 0.3s; }
.th .th-qcard { transform: rotate(-0.4deg); padding: 24px 18px 22px; }
.th:not(.th-js) .th-q + .th-q { margin-top: 28px; padding-top: 24px; border-top: 2px dashed var(--th-plum); }
.th .th-qtitle { font-size: clamp(23px, 5.6vw, 30px); margin-bottom: 20px; }
.th .th-qtitle:focus { outline: none; }
.th .th-answers { display: grid; gap: 12px; }
.th .th-ans {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 10px 14px; text-align: left;
  background: var(--th-card); color: var(--th-plum); border: 2px solid var(--th-plum); border-radius: var(--th-radius);
  box-shadow: var(--th-shadow); cursor: pointer; font: 600 16.5px/1.35 var(--th-sans);
  transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
}
.th .th-ans:nth-child(odd) { transform: rotate(-0.5deg); }
.th .th-ans:nth-child(even) { transform: rotate(0.4deg); }
.th .th-ans b { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; background: var(--th-plum); color: var(--th-blush); border-radius: 5px; font-size: 14px; font-weight: 800; }
@media (hover: hover) { .th .th-ans:hover { background: #f3fbf7; transform: translate(-1px, -1px) rotate(0); box-shadow: 4px 4px 0 var(--th-plum); } }
.th .th-ans:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--th-plum); }
.th .th-ans[aria-pressed="true"] { background: var(--th-mint); }
.th .th-backrow { min-height: 52px; padding-top: 16px; }
.th .th-back { min-height: 40px; padding: 0 4px; background: none; border: 0; color: var(--th-berry); font: 700 16px/1 var(--th-sans); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.th .th-back:hover { color: var(--th-plum); }

/* Result */
.th .th-resband { padding-top: 36px; }
.th .th-reshead { margin-bottom: 8px; }
.th .th-resultcard { transform: rotate(-0.3deg); }
.th .th-type-head { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.th .th-type-mark { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; background: var(--th-mint); border: 2px solid var(--th-plum); border-radius: 8px; box-shadow: var(--th-shadow); transform: rotate(-3deg); }
.th .th-type-tag { font-size: clamp(20px, 4.6vw, 24px); margin: 0; }
.th .th-facts { display: grid; gap: 12px; }
.th .th-fact { padding: 12px 14px; border: 2px solid var(--th-plum); border-radius: 8px; background: var(--th-blush); }
.th .th-fact dt { font-size: 12.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--th-berry); margin-bottom: 4px; }
.th .th-fact--gift { background: var(--th-mint); }
.th .th-fact--gift dt { color: var(--th-plum); }
.th .th-fact--try { background: var(--th-card); border-style: dashed; }
.th .th-optin { margin-top: 36px; transform: rotate(0.4deg); background: #fff7d6; }
.th .th-optin h3 { font-size: 22px; }
.th .th-optin-fields { display: grid; gap: 12px; margin: 18px 0; }
.th .th-field { display: grid; gap: 6px; }
.th .th-field span { font-size: 13px; font-weight: 800; letter-spacing: 0.04em; }
.th .th-field input { width: 100%; min-height: 50px; padding: 0 14px; border: 2px solid var(--th-plum); border-radius: 8px; background: var(--th-card); color: var(--th-plum); font: 400 16px/1 var(--th-sans); }

@media (min-width: 760px) {
  .th .th-hero { padding: 64px 0; }
  .th .th-hero-grid { grid-template-columns: 1.25fr 1fr; gap: 56px; }
  .th .th-qcard { padding: 32px 30px 30px; }
  .th .th-ans { font-size: 17.5px; }
  .th .th-card { padding: 28px 28px; }
  .th .th-facts { grid-template-columns: 1fr 1fr; }
  .th .th-optin-fields { grid-template-columns: 1fr 1fr; }
}

/* Emails */
.th .th-mailband { padding-top: 36px; }
.th .th-mailwrap { max-width: 920px; }
.th .th-mailgrid { display: grid; gap: 22px; align-items: start; }
.th:not(.th-js) .th-inbox { display: none; }
.th:not(.th-js) .th-mail + .th-mail { margin-top: 22px; }
.th .th-inbox { list-style: none; padding: 0; display: grid; gap: 12px; }
.th .th-mailrow {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 10px 12px; text-align: left;
  background: var(--th-card); color: var(--th-plum); border: 2px solid var(--th-plum); border-radius: var(--th-radius);
  box-shadow: var(--th-shadow); cursor: pointer; font: 400 15px/1.35 var(--th-sans); transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
}
.th .th-inbox li:nth-child(odd) .th-mailrow { transform: rotate(-0.4deg); }
.th .th-inbox li:nth-child(even) .th-mailrow { transform: rotate(0.3deg); }
@media (hover: hover) { .th .th-mailrow:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--th-plum); } }
.th .th-mailrow[aria-pressed="true"] { background: var(--th-mint); }
.th .th-mailrow:focus-visible { outline: 3px solid var(--th-berry); outline-offset: 3px; }
.th .th-mailrow-text { display: grid; gap: 2px; min-width: 0; }
.th .th-mailrow-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.th .th-mailrow-top em { font-style: normal; font-weight: 800; color: var(--th-berry); text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; }
.th .th-mailrow[aria-pressed="true"] .th-mailrow-top em { color: var(--th-plum); }
.th .th-mailrow-subject { font-weight: 600; font-size: 16px; overflow-wrap: anywhere; }
.th .th-avatar { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 2px solid var(--th-plum); border-radius: 6px; background: repeating-linear-gradient(135deg, var(--th-mint) 0 7px, #b8ecd8 7px 14px); color: var(--th-plum); font-size: 14px; font-weight: 800; }
.th .th-avatar--lg { width: 48px; height: 48px; font-size: 16px; }
.th .th-avatar { overflow: hidden; }
.th .th-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.th .th-mail { transform: rotate(0.3deg); }
.th .th-mail p + p, .th .th-mail p + ul, .th .th-mail ul + p { margin-top: 12px; }
.th .th-mailhead { display: flex; gap: 12px; align-items: center; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 2px dashed var(--th-plum); }
.th .th-mailhead p + p { margin-top: 0; }
.th .th-mailfrom { font-size: 15px; overflow-wrap: anywhere; }
.th .th-mailto { font-size: 13.5px; color: var(--th-muted); }
.th .th-mailsubject { font-size: clamp(21px, 5vw, 26px); margin-bottom: 14px; }
.th .th-mailpoints { padding: 0; list-style: none; display: grid; gap: 8px; }
.th .th-mailpoints li, .th .th-ticks li { position: relative; padding-left: 24px; }
.th .th-mailpoints li::before, .th .th-ticks li::before { content: ''; position: absolute; left: 0; top: 0.5em; width: 11px; height: 11px; background: var(--th-plum); border-radius: 2px; transform: rotate(-6deg); }
.th .th-mail .th-btn { width: 100%; }

/* Book + booked */
.th .th-bookband, .th .th-bookedband { padding-top: 36px; }
.th .th-callinfo { transform: rotate(-0.3deg); margin-bottom: 26px; }
.th .th-callwho { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; font-weight: 700; }
.th .th-callcols { display: grid; gap: 22px; }
.th .th-ticks { padding: 0; list-style: none; display: grid; gap: 8px; }
.th .th-ticks--no li::before { background: var(--th-berry); }
.th .th-bookform { transform: rotate(0.3deg); }
.th .th-bookfields { display: grid; gap: 14px; margin-bottom: 22px; }
.th .th-slots { border: 0; padding: 0; margin: 0 0 24px; min-width: 0; }
.th .th-slots legend { padding: 0; font-size: 13px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--th-berry); margin-bottom: 10px; }
.th .th-slotlist { display: grid; gap: 10px; }
.th .th-slot { position: relative; display: block; cursor: pointer; }
.th .th-slot input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.th .th-slot span { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 14px; background: var(--th-card); border: 2px solid var(--th-plum); border-radius: 8px; box-shadow: 2px 2px 0 var(--th-plum); font-weight: 600; }
.th .th-slot span::before { content: ''; flex: none; width: 18px; height: 18px; border: 2px solid var(--th-plum); border-radius: 4px; background: var(--th-card); }
.th .th-slot input:checked + span { background: var(--th-mint); }
.th .th-slot input:checked + span::before { background: var(--th-plum); box-shadow: inset 0 0 0 3px var(--th-mint); }
.th .th-slot input:focus-visible + span { outline: 3px solid var(--th-berry); outline-offset: 3px; }
.th .th-bookform .th-btn { width: 100%; }
.th .th-confirm { transform: rotate(-0.4deg); background: #fff7d6; }
.th .th-confirm .th-lead { margin-bottom: 16px; }
.th .th-btn--ghost { background: var(--th-card); color: var(--th-plum); }
.th .th-think, .th .th-expect { margin-top: 26px; }
.th .th-think { transform: rotate(0.4deg); background: var(--th-mint); }
.th .th-expect { transform: rotate(-0.3deg); }
.th .th-finish { margin-top: 32px; text-align: center; }
.th .th-finish .th-btn { width: 100%; max-width: 360px; }

@media (min-width: 760px) {
  .th .th-mailgrid { grid-template-columns: 300px 1fr; gap: 32px; }
  .th .th-callcols { grid-template-columns: 1fr 1fr; }
  .th .th-slotlist { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .th .th-btn, .th .th-ans, .th .th-bar i, .th .th-mailrow { transition: none; }
}
