/* Shared cartoon bubble theme. This layer changes presentation only.
   Lesson state, receipts, source evidence, media, and print visibility stay intact. */
:root {
  --bubble-ink: #121212;
  --bubble-blue: #399be6;
  --bubble-yellow: #ffd65a;
  --bubble-paper: #fffaf0;
  --bubble-art: url('/bubble-art/tax.svg');
  --bubble-fill: #ffd65a;
}
body.ai-page, body.ai-hub-page { --bubble-art: url('/bubble-art/ai.svg'); --bubble-fill: #e3f2ff; }
body.teacher-page { --bubble-art: url('/bubble-art/teachers.svg'); --bubble-fill: #e3f2ff; }
body.money-page, body.finance-page { --bubble-art: url('/bubble-art/money.svg'); }
body.income-guide { --bubble-art: url('/bubble-art/income.svg'); }
body.student-page { --bubble-art: url('/bubble-art/sales.svg'); }
body[data-topic="sales-tax"] { --bubble-art: url('/bubble-art/sales.svg'); }
body[data-topic="vat"] { --bubble-art: url('/bubble-art/vat.svg'); }
body.tracker-site { --bubble-art: url('/bubble-art/tracker.svg'); --bubble-fill: #e3f2ff; }

/* Rounded paper panels echo the homepage bubbles without constraining reading. */
body :is(.paper,.course-content,.course-map,.location-picker,.tracker-hero,.tracker-workspace,.app-info-intro,.app-info-card) {
  border-radius: 30px;
}
body :is(.guide-start,.guide-lesson,.guide-reference,.guide-practice,.guide-extra,.ai-path,.finance-tax-hub,.money-tax-hub) {
  border-radius: 25px;
}
body :is(.ai-intro,.ai-activity,.teacher-menu,.teacher-panel,.money-menu,.money-panel,.swipe-intro,.swipe-card,.app-info-intro,.app-info-card) {
  box-shadow: 6px 6px 0 var(--bubble-ink);
}
body .center-copy { border-radius: 30px; }

/* Topic artwork stays decorative; the existing heading remains the accessible name. */
:is(.ai-intro,.teacher-menu,.guide-hero,.guide-start,.ai-hub-intro,.tracker-hero,.app-info-intro,.ai-path) > .eyebrow,
.guide-hero > div > .eyebrow {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
:is(.ai-intro,.teacher-menu,.guide-hero,.guide-start,.ai-hub-intro,.tracker-hero,.app-info-intro,.ai-path) > .eyebrow::before,
.guide-hero > div > .eyebrow::before {
  content: '';
  flex: 0 0 66px;
  width: 66px;
  height: 66px;
  border: 3px solid var(--bubble-ink);
  border-radius: 50%;
  box-shadow: 3px 3px 0 var(--bubble-ink);
  background: var(--bubble-art) center / 90% no-repeat var(--bubble-fill);
}
.ai-hub-page .ai-path-teachers { --bubble-art: url('/bubble-art/teachers.svg'); }
.ai-hub-page .ai-path-students { --bubble-art: url('/bubble-art/students.svg'); }
.finance-page #tax { --bubble-art: url('/bubble-art/tax.svg'); }
.finance-tax-links a[href="/income-tax/"] { --bubble-art: url('/bubble-art/income.svg'); }
.finance-tax-links a[href="/sales-tax/"] { --bubble-art: url('/bubble-art/sales.svg'); }
.finance-tax-links a[href="/vat/"] { --bubble-art: url('/bubble-art/vat.svg'); }
.finance-tax-links a[href="/tax-tracker/"] { --bubble-art: url('/bubble-art/tracker.svg'); }

/* Capsule actions keep the site's instant pressed-button feedback. */
body :is(.btn,.teacher-complete-control,.student-back,.page-back,.app-contact button),
body .quiz .btn, body .quiz button.btn {
  border-radius: 999px;
  min-height: 48px;
  white-space: normal;
  max-width: 100%;
  overflow-wrap: anywhere;
}
body :is(.ai-progress a,.teacher-progress a,.money-progress a,.student-lesson-top a,.student-more a,.student-next a) {
  border: 2px solid var(--bubble-ink);
  border-radius: 999px;
  background: #fff4c5;
  padding: 7px 14px;
  min-height: 44px;
  line-height: 1.4;
  text-decoration: none;
  box-shadow: 2px 2px 0 var(--bubble-ink);
  max-width: 100%;
}
body :is(.ai-progress a,.teacher-progress a,.money-progress a,.student-lesson-top a,.student-more a,.student-next a):hover {
  background: #ffe48c;
  box-shadow: 1px 1px 0 var(--bubble-ink);
}

/* Round/workshop pickers become bubble tiles with readable labels outside the art. */
body :is(.ai-lesson-list,.teacher-step-list,.swipe-topics) { gap: 14px; }
body :is(.ai-lesson-list a,.teacher-step-list a,.swipe-topics a,.course-map .quiz-link,.finance-tax-links a) {
  display: grid;
  grid-template-columns: 48px minmax(0,1fr);
  align-items: center;
  align-content: center;
  gap: 4px 14px;
  border: 2px solid var(--bubble-ink);
  border-radius: 25px;
  min-height: 88px;
  padding: 14px;
  max-width: 100%;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  text-decoration: none;
}
body :is(.ai-lesson-list a,.teacher-step-list a,.swipe-topics a,.course-map .quiz-link,.finance-tax-links a)::before {
  content: '';
  grid-column: 1;
  grid-row: 1 / span 3;
  align-self: center;
  width: 46px;
  height: 46px;
  border: 2px solid var(--bubble-ink);
  border-radius: 50%;
  box-shadow: 2px 2px 0 var(--bubble-ink);
  background: var(--bubble-art) center / 92% no-repeat var(--bubble-fill);
}
body :is(.ai-lesson-list a,.teacher-step-list a,.swipe-topics a,.course-map .quiz-link,.finance-tax-links a) > * {
  grid-column: 2;
  min-width: 0;
  white-space: normal;
}
body :is(.ai-lesson-list a,.teacher-step-list a,.swipe-topics a,.course-map .quiz-link,.finance-tax-links a):hover {
  box-shadow: 3px 3px 0 var(--bubble-ink);
}
.ai-lesson-list a:nth-child(1) { --bubble-art: url('/bubble-art/tax.svg'); --bubble-fill: #ffd65a; }
.ai-lesson-list a:nth-child(2) { --bubble-art: url('/bubble-art/ai.svg'); --bubble-fill: #e3f2ff; }
.ai-lesson-list a:nth-child(3) { --bubble-art: url('/bubble-art/students.svg'); --bubble-fill: #ffd65a; }
.ai-lesson-list a:nth-child(4) { --bubble-art: url('/bubble-art/tracker.svg'); --bubble-fill: #e3f2ff; }
.ai-lesson-list a:nth-child(5) { --bubble-art: url('/bubble-art/income.svg'); --bubble-fill: #ffd65a; }
body .money-list a { border-radius: 25px; padding: 14px; gap: 12px; }
body .money-number { border-radius: 50%; min-width: 42px; min-height: 42px; box-shadow: 2px 2px 0 var(--bubble-ink); }
body .money-sticker, body .teacher-meta span, body .pill { border-radius: 999px; }

/* Native details still manage disclosure and keyboard state. */
body :is(.ai-round-menu,.teacher-menu-options) { border-top: 0; padding-top: 8px; }
body :is(.ai-round-menu,.teacher-menu-options) > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  list-style: none;
  background: #fff4c5;
  border: 2px solid var(--bubble-ink);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--bubble-ink);
  min-height: 52px;
  padding: 10px 18px;
  margin-bottom: 14px;
}
body :is(.ai-round-menu,.teacher-menu-options) > summary::-webkit-details-marker { display: none; }
body :is(.ai-round-menu,.teacher-menu-options) > summary::after {
  content: '';
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--bubble-ink);
  border-bottom: 2px solid var(--bubble-ink);
  transform: rotate(45deg);
  margin-right: 3px;
}
body :is(.ai-round-menu,.teacher-menu-options)[open] > summary::after { transform: rotate(225deg); }

/* Short amounts can be real circles; sentence-length answers stay spacious. */
body :is(.ai-choices button,.teacher-choices button,.teacher-call-choices label,.money-choices button,.swipe-answers button,.tax-choices button,.ai-audit-choice),
body .quiz .choice {
  border-radius: 22px;
  min-height: 48px;
  max-width: 100%;
  padding: 12px 16px;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
}
body :is(.ai-receipt-answer button,#catch .ai-transfer .ai-choices button,#paycheck .money-choices button,#challenge .money-choices button) {
  width: clamp(64px,17vw,84px);
  min-width: 64px;
  min-height: 64px;
  aspect-ratio: 1;
  flex: 0 0 auto;
  border-radius: 50%;
  text-align: center;
  padding: 8px;
  font-size: 1.15rem;
  line-height: 1.25;
  box-shadow: 3px 3px 0 var(--bubble-ink);
}
body :is(.ai-receipt-answer button,#catch .ai-transfer .ai-choices button,#paycheck .money-choices button,#challenge .money-choices button)[aria-pressed="true"] {
  box-shadow: inset 0 0 0 2px var(--bubble-ink), 3px 3px 0 var(--bubble-ink);
}
body :is(.ai-receipt-answer,.ai-transfer .ai-choices,.money-choices) { gap: 12px; }
body :is(.ai-message,.money-chat-message) { border-radius: 24px 24px 24px 5px; }
body :is(.ai-reply,.money-chat-thought) { border-radius: 24px 24px 5px 24px; }
body :is(.ai-example,.ai-filter-board,.teacher-mode,.teacher-task,.teacher-claim,.teacher-call,.money-budget,.money-plan) { border-radius: 22px; }
body :is(.ai-status,.money-feedback,.teacher-feedback):not(:empty) { border-radius: 20px; }

/* Receipts, evidence, and media retain their document shapes and full dimensions. */
body :is(.ai-shop-receipt,.ai-receipt,.tax-slip,.money-paystub,.teacher-source,.teacher-prompt,.table-container) { border-radius: 8px; }
body :is(textarea,video) { border-radius: 10px; }
body :is(.ai-takeaway,.money-reflect,.teacher-evidence,.teacher-outcomes) { border-radius: 18px; }

/* Paint navigation bubbles without increasing the shared header's layout size. */
.nav .topics-nav .nav-parent { border-radius: 999px; background: #fff4c5; }
.nav .topics-nav .nav-group[data-active] > .nav-parent { background: #ffd65a; }
.nav .topics-nav .nav-disclosure > summary { border-radius: 50%; }
.nav .topics-nav :is(.nav-submenu,.nav-tax-links) { border-radius: 20px; }
.nav .topics-nav .nav-submenu a, .nav .topics-nav .nav-tax-disclosure > summary { border-radius: 14px; }

/* Hubs, support, and the tracker share the same rounded controls. */
body :is(.app-info-nav a,.app-contact button,.topic-chips button,.saved-button,.view-nav button,.tracker-subnav button,.export,.load-more,.primary,.secondary,.live-examples button) { border-radius: 999px; }
body :is(.news-card,.live-result,.country-card,.empty) { border-radius: 22px; }
body :is(.tracker-search input,.tracker-site select,.location-picker select,.guide-selector select) { border-radius: 999px; }

@media (max-width:650px) {
  body :is(.paper,.course-content,.course-map,.location-picker,.tracker-hero,.tracker-workspace,.app-info-intro,.app-info-card) { border-radius: 25px; }
  body :is(.ai-intro,.ai-activity,.teacher-menu,.teacher-panel,.money-menu,.money-panel,.swipe-intro,.swipe-card,.app-info-intro,.app-info-card) { box-shadow: 4px 4px 0 var(--bubble-ink); }
  :is(.ai-intro,.teacher-menu,.guide-hero,.guide-start,.ai-hub-intro,.tracker-hero,.app-info-intro,.ai-path) > .eyebrow,
  .guide-hero > div > .eyebrow { gap: 13px; }
  :is(.ai-intro,.teacher-menu,.guide-hero,.guide-start,.ai-hub-intro,.tracker-hero,.app-info-intro,.ai-path) > .eyebrow::before,
  .guide-hero > div > .eyebrow::before { flex-basis: 56px; width: 56px; height: 56px; }
  body :is(.ai-lesson-list a,.teacher-step-list a,.swipe-topics a,.course-map .quiz-link,.finance-tax-links a) { grid-template-columns: 42px minmax(0,1fr); gap: 3px 12px; padding: 12px; border-radius: 22px; }
  body :is(.ai-lesson-list a,.teacher-step-list a,.swipe-topics a,.course-map .quiz-link,.finance-tax-links a)::before { width: 40px; height: 40px; }
  body .money-list a { padding: 12px; gap: 10px; }
  body .quiz .choice { border-radius: 18px; }
}
@media (prefers-reduced-motion:reduce) {
  :is(.paper,.btn,.ai-choices button,.teacher-choices button,.money-choices button) { transition: none; animation: none; }
}
@media print {
  :is(.ai-intro,.teacher-menu,.guide-hero,.guide-start,.ai-hub-intro,.tracker-hero,.app-info-intro,.ai-path) > .eyebrow::before,
  .guide-hero > div > .eyebrow::before,
  body :is(.ai-lesson-list a,.teacher-step-list a,.swipe-topics a,.course-map .quiz-link,.finance-tax-links a)::before { display: none; }
  body :is(.ai-lesson-list a,.teacher-step-list a,.swipe-topics a,.course-map .quiz-link,.finance-tax-links a) { grid-template-columns: minmax(0,1fr); }
  body :is(.ai-lesson-list a,.teacher-step-list a,.swipe-topics a,.course-map .quiz-link,.finance-tax-links a) > * { grid-column: 1; }
  body :is(.paper,.course-content,.course-map,.location-picker) { box-shadow: none; border-radius: 8px; }
}
