/* Tomich polish v2043: restrained visual system and responsive content primitives */
:root { --tomich-ink:#102951; --tomich-muted:#60738d; --tomich-line:#dce6f1; --tomich-blue:#17539a; --tomich-red:#d52234; }

/* Exam score table: one calm rounded surface, with status kept as plain text. */
.penalty-points-prose .tm-table-scroll,
.penalty-points-prose .tm-prose > div:has(> table) { overflow-x:auto; border-radius:18px; box-shadow:0 12px 32px rgba(16,41,81,.08); margin:1.75rem 0 2.25rem; }
.penalty-points-prose table, .tm-prose table { width:100%; border-collapse:separate; border-spacing:0; border:1px solid var(--tomich-line); border-radius:18px; overflow:hidden; background:#fff; margin:0; }
.penalty-points-prose th, .penalty-points-prose td, .tm-prose th, .tm-prose td { border:0; border-bottom:1px solid #e8eef5; padding:15px 18px; }
.penalty-points-prose tr:last-child td, .tm-prose tr:last-child td { border-bottom:0; }
.penalty-points-prose th, .tm-prose th { background:#f1f5fa; color:var(--tomich-ink); }
.penalty-points-prose p.tomich-exam-status { color:var(--tomich-muted); font-size:1rem; line-height:1.7; margin:.25rem 0 1rem; }
.penalty-points-prose p.tomich-exam-status strong { font-weight:600; color:inherit; }
.penalty-points-prose p.tomich-exam-status strong:first-child { color:#197447; }
.penalty-points-prose p.tomich-exam-status strong:last-child { color:#a63b46; }

/* Images from routes, documents and articles are intentional gallery items. */
.tm-prose img, .official-prose img, .article-prose img { border-radius:16px; background:#f1f5f9; box-shadow:0 8px 22px rgba(16,41,81,.08); cursor:zoom-in; transition:transform .22s ease, box-shadow .22s ease; }
.tm-prose img:hover, .official-prose img:hover, .article-prose img:hover { transform:translateY(-2px); box-shadow:0 14px 30px rgba(16,41,81,.14); }
.tm-photo-link { box-shadow:0 6px 18px rgba(16,41,81,.07); }
.tm-photo-link:focus-visible, .tm-prose img:focus-visible { outline:3px solid #4d8bd5; outline-offset:4px; }
.tomich-lightbox { position:fixed; inset:0; z-index:9999; display:grid; place-items:center; padding:clamp(16px,4vw,48px); background:rgba(7,20,39,.88); opacity:0; pointer-events:none; transition:opacity .2s ease; }
.tomich-lightbox.is-open { opacity:1; pointer-events:auto; }
.tomich-lightbox img { max-width:min(1200px,94vw); max-height:88vh; width:auto; height:auto; object-fit:contain; border-radius:14px; box-shadow:0 20px 70px rgba(0,0,0,.4); }
.tomich-lightbox__close { position:absolute; top:18px; right:22px; width:44px; height:44px; border:1px solid rgba(255,255,255,.35); border-radius:50%; color:#fff; font-size:28px; line-height:1; cursor:pointer; }
.tomich-lightbox__caption { position:absolute; bottom:16px; left:50%; transform:translateX(-50%); max-width:80vw; color:#dce8f7; font-size:.9rem; text-align:center; }

/* History: more breathing room and a cleaner editorial timeline. */
.tm-timeline { max-width:980px; margin:2.5rem auto 0; }
.tm-timeline::before { background:linear-gradient(#b8cbe2,#dce6f1); width:2px; }
.tm-event { padding-bottom:56px; }
.tm-event-dot { box-shadow:0 0 0 6px #fff, 0 0 0 8px #b8cbe2; background:var(--tomich-red); }
.tm-event-body { border:1px solid var(--tomich-line); border-radius:20px; background:#fff; box-shadow:0 12px 30px rgba(16,41,81,.07); padding:26px; }
.tm-event-body.has-photo { align-items:start; }
.tm-event-photo { border-radius:14px; overflow:hidden; }
.tm-event-photo img { height:220px; object-fit:cover; }
.tm-event h2 { color:var(--tomich-ink); }

/* The home animation should add depth, not compete with the CTA. */
.tomich-hero-energy-platform__ring { opacity:.38; animation-duration:16s; }
.tomich-hero-energy-platform__sweep { opacity:.22; animation-duration:10s; }
.tomich-hero-particle { opacity:.45; animation-duration:8s; }
.tomich-hero-particle--trail { opacity:.3; }
.tomich-hero-gift-glow__blue, .tomich-hero-gift-glow__red { opacity:.34; filter:blur(18px); }
.tomich-hero-car-shell { filter:drop-shadow(0 22px 22px rgba(6,25,55,.22)); }
@media (prefers-reduced-motion:reduce) { .tomich-hero-energy-platform__ring, .tomich-hero-energy-platform__sweep, .tomich-hero-particle { animation:none!important; } }

@media (max-width:640px) {
 .penalty-points-prose table, .tm-prose table { min-width:680px; }
 .penalty-points-prose .tm-table-scroll, .penalty-points-prose .tm-prose > div:has(> table) { margin-inline:-4px; }
 .tm-event-body { padding:20px; border-radius:16px; }
 .tm-event-photo img { height:auto; max-height:240px; }
}
body.tomich-lightbox-open { overflow:hidden; }
/* Hidden content is also redirected by JS; this keeps old direct links out of navigation. */
.tomich-removed-route { display:none!important; }
/* Review platforms use supplied brand assets instead of text marks. */
.tomich-review-link__icon img { width:100%; height:100%; object-fit:contain; padding:8px; }
#reviews .tomich-review-link__icon { overflow:hidden; }
#reviews p:empty { display:none; }

/* Masters: keep the intro copy visible even if reversible reveal misses the section edge. */
main > #masters { content-visibility:visible!important; contain-intrinsic-size:auto!important; }
#masters .container > .reveal:first-child {
  opacity:1!important;
  visibility:visible!important;
  transform:none!important;
  filter:none!important;
}
#masters .container > .reveal:first-child :where(span,h2,p) {
  opacity:1!important;
  visibility:visible!important;
}
