/* Plain elements. Values come from tokens.css. */
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
       font: var(--text-base)/var(--leading) var(--font); }
main { max-width: 1600px; margin: 0 auto; padding: var(--space-6) var(--space-4) 64px; }
h1 { font-size: var(--text-2xl); margin: 0 0 var(--space-1); }
h2 { font-size: var(--text-xl); font-weight: 600; margin: 0; }
/* A view's title is focused when the view opens (router.js): not a control, so no ring. */
h1:focus { outline: none; }
a { color: var(--accent-text); }
a:hover { color: var(--text); }
input[type=text], input[type=date], input[type=search],
input[type=email], input[type=password], input[type=number], select { background: var(--field-bg); color: var(--text); border: 1px solid var(--field-border);
                   border-radius: var(--radius-md); padding: 4px var(--space-2); min-height: var(--control-h); font: inherit;
                   transition: border-color .15s, box-shadow .15s; }
input:hover, select:hover { border-color: var(--text); }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); background: var(--panel); }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); vertical-align: -3px; margin: 0 6px 0 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input:focus-visible, select:focus-visible { outline: none; }
input[type=checkbox]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: none; }
/* A field inside a styled <label> keeps body text, not the label's 12px/600. */
label > input:not([type=checkbox]), label > select { font-size: var(--text-base); font-weight: 400; color: var(--text); }
@media (max-width: 640px) { input, select { font-size: 16px; } }
button { background: var(--accent); color: var(--on-accent); border: 0; border-radius: var(--radius-md); padding: 4px 14px;
         min-height: var(--control-h); font: inherit; font-weight: 500; cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
table { border-collapse: collapse; width: 100%; min-width: 760px; }
th, td { border-bottom: 1px solid var(--border); padding: var(--cell-pad); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: var(--text-sm); white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tfoot td { font-weight: 600; border-bottom: 0; }
