/* The app's tokens (lib/ui/tokens/star_colors.dart), light and dark. */
:root {
  --ground: #F7F1EA; --card: #FFFFFF; --stroke: #E7DCCD; --ink: #2B2118; --muted: #6B5A45;
  --mark: #C36A00; --on-mark: #FFFFFF; --action: #A85A00; --wrong: #C0392B; --good: #2F7A3D; --tint: #FFF6E6;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #1A1511; --card: #1F1914; --stroke: #3A3027; --ink: #F7EFE6; --muted: #CDBFAE;
    --mark: #C87C00; --on-mark: #1A1511; --action: #FFB547; --wrong: #FF9A8F; --good: #86CF89; --tint: #2E2217;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-variant-numeric: tabular-nums;
}
h1 { font-size: 26px; line-height: 1.2; margin: 0 0 8px; }
h2 { font-size: 17px; line-height: 1.3; margin: 0 0 12px; }
p { margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.gate { max-width: 380px; margin: 18vh auto 0; padding: 0 20px; text-align: center; }
.gate button { margin-top: 12px; }

.top { display: flex; align-items: center; gap: 14px; padding: 14px 24px; background: var(--card); border-bottom: 1px solid var(--stroke); }
.top .muted { flex: 1; font-size: 13px; }
.tabs { display: flex; gap: 2px; padding: 0 24px; background: var(--card); border-bottom: 1px solid var(--stroke); overflow-x: auto; }
.tab { background: none; border: 0; border-bottom: 3px solid transparent; color: var(--muted); font: inherit; padding: 10px 12px; cursor: pointer; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab[aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--mark); }
.page { max-width: 1120px; margin: 0 auto; padding: 22px 24px 60px; }

.intro { margin-bottom: 16px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.tile { background: var(--card); border: 1px solid var(--stroke); border-radius: 12px; padding: 14px 16px; }
.tile .label { color: var(--muted); font-size: 13px; }
.tile .value { font-size: 30px; font-weight: 600; line-height: 1.2; }
.tile .sub { color: var(--muted); font-size: 13px; }
.card { background: var(--card); border: 1px solid var(--stroke); border-radius: 12px; padding: 16px 18px; margin-bottom: 18px; }
.empty { color: var(--muted); padding: 28px 0; text-align: center; }

.bars { position: relative; display: flex; align-items: flex-end; height: 170px; gap: 2px; border-bottom: 1px solid var(--stroke); }
.bar { flex: 1 1 0; height: 100%; display: flex; align-items: flex-end; background: none; border: 0; padding: 0; cursor: default; }
.bar i { display: block; width: 100%; max-width: 30px; margin: 0 auto; min-height: 2px; height: calc(var(--v, 0) * 100%); background: var(--mark); border-radius: 4px 4px 0 0; }
.bar:hover i, .bar:focus-visible i { opacity: .78; }
.axis { display: flex; gap: 2px; margin-top: 6px; color: var(--muted); font-size: 12px; }
.axis span { flex: 1 1 0; text-align: center; white-space: nowrap; overflow: hidden; }
.peak { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
details { margin-top: 10px; }
summary { color: var(--muted); font-size: 13px; cursor: pointer; }

table { width: 100%; border-collapse: collapse; }
th { color: var(--muted); font-size: 13px; font-weight: 500; text-align: left; padding: 6px 10px 6px 0; border-bottom: 1px solid var(--stroke); }
td { padding: 8px 10px 8px 0; border-bottom: 1px solid var(--stroke); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
.bar-cell { padding-left: 12px; width: 34%; }
td.num, th.num { text-align: right; padding-right: 0; padding-left: 10px; white-space: nowrap; }
.meter { width: 100%; min-width: 80px; height: 8px; background: none; border-radius: 4px; }
.meter i { display: block; height: 100%; width: calc(var(--v, 0) * 100%); min-width: 2px; background: var(--mark); border-radius: 0 4px 4px 0; }

.tooltip { position: fixed; z-index: 5; pointer-events: none; background: var(--ink); color: var(--ground); font-size: 13px; padding: 6px 9px; border-radius: 6px; transform: translate(-50%, calc(-100% - 8px)); white-space: nowrap; }

button { font: inherit; }
.primary { background: var(--action); color: var(--ground); border: 0; border-radius: 8px; padding: 9px 16px; font-weight: 600; cursor: pointer; }
.secondary { background: none; color: var(--ink); border: 1px solid var(--stroke); border-radius: 8px; padding: 8px 14px; cursor: pointer; }
.quiet { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 4px 6px; }
.primary:disabled, .secondary:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }

label { display: block; color: var(--muted); font-size: 13px; margin-bottom: 4px; }
input, textarea, select {
  width: 100%; background: var(--ground); color: var(--ink); border: 1px solid var(--stroke); border-radius: 8px;
  padding: 8px 10px; font: inherit;
}
textarea { min-height: 96px; resize: vertical; }
.langs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 14px; }
.field { margin-bottom: 10px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 14px; }
.row .field { flex: 1 1 200px; margin: 0; }
.count { color: var(--muted); font-size: 12px; text-align: right; }
.message { min-height: 22px; font-size: 14px; margin-top: 8px; }
.message.bad { color: var(--wrong); }
.message.good { color: var(--good); }
.status { font-size: 13px; color: var(--muted); }
.status::before { content: "• "; }
.status.sent { color: var(--good); }
.status.failed { color: var(--wrong); }
