/* Only what the kit doesn't cover: the sign artwork sits on the theme surface, uncropped. */
/* Every sign sits in the same square; --d (from the server, utils.sign_scale) sizes its
   longer side so triangles, circles, plates and posts look equally heavy. */
.sign-art {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  border-radius: var(--tma-r-inner);
  background: var(--tma-surface);
  overflow: hidden;
}
.sign-art img { width: calc(var(--d, .8) * 100%); height: calc(var(--d, .8) * 100%); object-fit: contain; }
.sign-art.is-hero { width: min(260px, 66vw); margin: var(--tma-s2) auto var(--tma-s4); }
.tma-scroll-x .tma-chip { white-space: nowrap; }
.sign-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: var(--tma-s3); }
.sign-tile { display: grid; align-content: start; gap: var(--tma-s1); color: inherit; text-decoration: none; }
.sign-tile__name { font-size: var(--tma-fs-footnote, .8125rem); line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sign-status { font-size: .75rem; color: var(--tma-hint); }
.sign-status.is-mastered { color: var(--tma-success, #31b545); }

/* Answers: full-width rows; the result is said in words, colour only repeats it. */
.quiz-options { display: grid; gap: var(--tma-s2); margin-top: var(--tma-gap-section); }
.quiz-option {
  min-height: var(--tma-row); padding: var(--tma-s3) var(--tma-s4); text-align: start;
  border: 0; border-radius: var(--tma-r-inner); background: var(--tma-surface); color: var(--tma-text);
  font: inherit; line-height: 1.3; cursor: pointer; transition: background var(--tma-dur-short) var(--tma-ease);
}
.quiz-option:active { transform: scale(.98); }
.quiz-option:disabled { cursor: default; transform: none; }
.quiz-option.is-picked { background: var(--tma-tonal); }
.quiz-option.is-correct { background: var(--tma-success-tint); color: var(--tma-success); }
.quiz-option.is-wrong { background: var(--tma-danger-tint); color: var(--tma-danger); }
.quiz-mark { font-weight: 600; }
.exam-top { display: flex; align-items: center; justify-content: space-between; gap: var(--tma-s3); margin: var(--tma-s2) 0; }
.exam-top .tma-chip { font-variant-numeric: tabular-nums; }
.exam-pass { color: var(--tma-success); }
.result-thumb { flex: 0 0 48px; width: 48px; }
.result-thumb .sign-art { border-radius: 10px; }
/* Dark theme: black parts of signs (chevrons, frames, symbols) need a lighter plate to stay visible. */
:root[data-tma-scheme="dark"] .sign-art { background: color-mix(in srgb, var(--tma-surface) 80%, #fff); }

/* Situation scenes (scene.ts): derived from the theme; literal colours only where the real
   world fixes them (white road markings, amber hazard lights, grass). */
:root {
  --scene-grass: color-mix(in srgb, #6fa55a 38%, var(--tma-bg));
  --scene-road: color-mix(in srgb, var(--tma-text) 52%, var(--tma-bg));
  --scene-line: #fff; --scene-zebra: #fff; --scene-hazard: #f2a900;
  --scene-you: var(--tma-accent);
  --scene-car: color-mix(in srgb, #e39b2d 85%, var(--tma-text));
  --scene-glass: color-mix(in srgb, var(--tma-bg) 75%, transparent);
  --scene-outline: var(--tma-text); --scene-person: var(--tma-text); --scene-label: var(--tma-text);
}
.scene-box { margin: var(--tma-s2) auto 0; width: min(320px, 86vw); border-radius: var(--tma-r-inner); overflow: hidden; }
.scene { display: block; width: 100%; height: auto; }
.topic-icon { display: grid; place-items: center; flex: 0 0 36px; height: 36px; border-radius: 10px; background: var(--tma-tonal); color: var(--tma-accent-text); }
.profile-card { gap: var(--tma-s3); }
.profile-head { display: flex; align-items: center; gap: var(--tma-s3); }
.profile-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: 0 0 64px; }
.profile-avatar.is-initials { display: grid; place-items: center; background: var(--tma-tonal); color: var(--tma-accent-text); font-weight: 700; font-size: 1.25rem; }
.profile-toggle { display: flex; align-items: center; justify-content: space-between; gap: var(--tma-s3); min-height: var(--tma-row); }

/* the kit gives the tab bar display:flex, which beats [hidden] */
.tma-tabbar[hidden] { display: none; }
