/* Tipping Guide & Calculator (/tipping-guide/ and /tipping-guide/<country>/, generated by
   scripts/build-tipping-guide.mjs). Builds on site.css tokens, the shared tool components (.bm-section, .bvr-calc,
   .bvr-field, .col-select, .bvr-result, .bvr-headline, .bm-stats, .bvr-cards, .bm-faq, .col-note, .col-disclaimer,
   .col-crumbs, .card, .hc-related) and the layout helpers of css/jet-lag-calculator.css (.jl-intro, .jl-next).
   No inline styles anywhere (CSP). */

/* ---------- Calculator ---------- */
.tg-fields { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 14px; align-items: end; }
.tg-usual { margin: 12px 0 0; font-size: 13.5px; }
.tg-page .col-crumbs { margin-bottom: 14px; }

/* ---------- Result ---------- */
.tg-results { margin-top: 16px; }
.tg-results[hidden] { display: none; }
.tg-badge {
  display: inline-block; margin: 0 0 10px; padding: 4px 12px; border-radius: 999px;
  color: var(--on-lime); background: var(--lime); font-size: 12.5px; font-weight: 900; letter-spacing: .8px; text-transform: uppercase;
}
.tg-verdict { margin: 0 0 6px; color: var(--muted); font-size: 15.5px; font-weight: 700; }
.tg-result[data-culture="expected"] { border-inline-start-color: var(--amber); }
.tg-result[data-culture="expected"] .tg-badge { background: var(--amber); }
.tg-result[data-culture="optional"] .tg-badge, .tg-result[data-culture="none"] .tg-badge { color: var(--ink); background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.tg-result .bvr-headline { color: var(--lime); }
.tg-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tg-cards[hidden] { display: none; }
.tg-range { margin: 10px 0 0; font-size: 13.5px; }
.tg-range:empty { display: none; }
.tg-results > .col-note:last-child { font-size: 13.5px; }

/* ---------- Customs of the chosen country ---------- */
.tg-facts { margin-top: 16px; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.tg-facts h3 { margin: 0 0 12px; font-size: 20px; font-weight: 800; }
.tg-facts dl { display: grid; gap: 0; margin: 0; }
.tg-facts dl > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; padding: 11px 0; border-top: 1px solid var(--line); }
.tg-facts dt { color: var(--muted); font-size: 12.5px; font-weight: 800; letter-spacing: .9px; text-transform: uppercase; padding-top: 2px; }
.tg-facts dd { margin: 0; font-size: 15.5px; line-height: 1.55; }
.tg-note { margin: 12px 0 0; padding: 14px 18px; font-size: 15px; line-height: 1.55; background: rgba(198, 239, 60, 0.07); border: 1px solid rgba(198, 239, 60, 0.28); border-radius: 16px; }
.tg-note[hidden], .tg-more[hidden] { display: none; }
.tg-more { display: inline-block; margin-top: 14px; color: var(--lime); font-weight: 800; font-size: 15px; text-decoration: none; }
.tg-more::after { content: " →"; }
.tg-more:hover { text-decoration: underline; }
.tg-more:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }

/* ---------- Steps ---------- */
.tg-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: tg-step; }
.tg-steps li { counter-increment: tg-step; }
.tg-steps li::before {
  content: counter(tg-step); display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; margin-bottom: 12px;
  color: var(--on-lime); background: var(--lime); border-radius: 999px; font-size: 16px; font-weight: 900;
}
.tg-steps h3 { margin: 0 0 6px; font-size: 18px; font-weight: 800; }
.tg-steps p { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.6; }

/* ---------- Countries by region ---------- */
.tg-sub { max-width: 760px; margin: 0 0 18px; color: var(--muted); font-size: 16.5px; line-height: 1.65; }
.tg-regions { display: grid; gap: 10px; }
.tg-region { background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.tg-region summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; font-size: 18px; font-weight: 800; cursor: pointer; list-style: none; border-radius: 18px; }
.tg-region summary::-webkit-details-marker { display: none; }
.tg-region summary:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.tg-region summary b { min-width: 34px; padding: 3px 10px; color: var(--on-lime); background: var(--lime); border-radius: 999px; font-size: 14px; font-weight: 900; text-align: center; font-variant-numeric: tabular-nums; }
.tg-region__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0 14px 14px; }
.tg-region__grid--flat { padding: 0; }
.tg-country {
  display: block; padding: 12px 14px; text-decoration: none;
  color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 14px;
  transition: border-color .15s ease, transform .15s ease;
}
.tg-region__grid--flat .tg-country { background: var(--card); }
.tg-country:hover { border-color: rgba(198, 239, 60, 0.65); transform: translateY(-1px); }
.tg-country:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.tg-country b { display: block; font-size: 15.5px; font-weight: 800; line-height: 1.3; }
.tg-country span { display: block; margin-top: 3px; color: var(--muted); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.tg-country[data-culture="expected"] span { color: var(--amber); }
.tg-all { margin: 16px 0 0; }
.tg-all a { color: var(--lime); font-weight: 800; text-decoration: none; }
.tg-all a:hover { text-decoration: underline; }

/* ---------- At a glance ---------- */
.tg-glance { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tg-glance__item { padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.tg-glance__item h3 { margin: 0 0 6px; font-size: 18px; font-weight: 800; }
.tg-glance__item h3 span { margin-inline-start: 6px; padding: 2px 9px; color: var(--on-lime); background: var(--lime); border-radius: 999px; font-size: 13px; font-weight: 900; }
.tg-glance__item[data-culture="expected"] h3 span { background: var(--amber); }
.tg-glance__item p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.tg-glance__item .tg-glance__where { margin-top: 10px; font-size: 14.5px; line-height: 1.7; }
.tg-glance__where a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.tg-glance__where a:hover { color: var(--lime); text-decoration-color: var(--lime); }

/* ---------- Sources ---------- */
.tg-sources__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 24px; margin: 0; padding: 0 20px 18px; }
.tg-sources__list > div { padding: 10px 0; border-top: 1px solid var(--line); min-width: 0; }
.tg-sources__list dt { margin-bottom: 4px; font-size: 15px; font-weight: 800; }
.tg-sources__list dd { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.tg-sources__page { max-width: 760px; margin: 0; padding-inline-start: 22px; color: var(--muted); font-size: 15.5px; line-height: 1.7; }
.tg-sources__page li { overflow-wrap: anywhere; }
.tg-sources__list a, .tg-sources__page a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.tg-sources__list a:hover, .tg-sources__page a:hover { color: var(--lime); text-decoration-color: var(--lime); }
.tg-sources__list a:focus-visible, .tg-sources__page a:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }

/* ---------- Guide ---------- */
.tg-guide h3 { margin: 26px 0 8px; font-size: 20px; font-weight: 800; }
.tg-guide ul { max-width: 760px; margin: 0; padding-inline-start: 22px; color: var(--muted); font-size: 16.5px; line-height: 1.65; }
.tg-guide li + li { margin-top: 6px; }
.tg-guide li b { color: var(--ink); }

@media (max-width: 900px) {
  .tg-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tg-field--country { grid-column: 1 / -1; }
  .tg-region__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tg-steps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .tg-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tg-fields > .bvr-field:nth-child(2) { grid-column: 1 / -1; }
  .tg-cards, .tg-glance, .tg-region__grid, .tg-sources__list { grid-template-columns: minmax(0, 1fr); }
  .tg-sources__list { padding: 0 16px 14px; }
  .tg-facts { padding: 16px; }
  .tg-facts dl > div { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .tg-region summary { padding: 14px 16px; }
  .tg-region__grid { padding: 0 10px 10px; }
  .tg-region__grid--flat { padding: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .tg-country { transition: none; }
  .tg-country:hover { transform: none; }
}
