/* ============================================================================
Warm Paper / Ink — base layer: reset, typography, numerics.
Type scale is WARM_PAPER_INK_SPEC.md §3, verbatim.
========================================================================= */
*, *::before, *::after {
    box-sizing: border-box;
}
/* The hidden attribute always hides, even on components that set their own
   display (.field is display:flex). Without this, a field hidden by script
   stays on screen. It used to live only in platform.css. */
[hidden] {
    display: none !important;
}
html {
    -webkit-text-size-adjust: 100%;
}
body {
    margin: 0;
    font-family: Sora, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.55;
    color: var(--text);
    background: var(--page);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img, svg, video {
    max-width: 100%;
}
svg {
    display: block;
}
h1, h2, h3, h4, h5, h6, p, figure {
    margin: 0;
}
ul, ol {
    margin: 0;
    padding: 0;
    list-style: none;
}
a {
    color: inherit;
    text-decoration: none;
}
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
/* ---------------------------------------------------------------------------
Type scale — spec §3. Sora is wide, so headings carry negative tracking.
------------------------------------------------------------------------ */
.t-page-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -.03em;
    line-height: 1.25;
}
.t-card-head  {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -.01em;
}
.t-body       {
    font-size: 14px;
    font-weight: 400;
}
.t-cell       {
    font-size: 13px;
    font-weight: 400;
}
/* Uppercase micro-type: table headers and field labels share these metrics. */
.t-thead,
.t-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}
.t-label  {
    color: var(--muted);
}
.t-metric {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -.035em;
}
.t-badge  {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .02em;
}
.t-muted  {
    color: var(--muted);
}
.t-faint  {
    color: var(--faint);
}
/* ---------------------------------------------------------------------------
Numbers are the point of an ERP — spec §3.
Without tabular-nums, columns of figures do not line up.
------------------------------------------------------------------------ */
.amount,
td.numeric,
th.numeric,
.metric strong,
.t-metric {
    font-variant-numeric: tabular-nums;
    text-align: right;
}
/* ---------------------------------------------------------------------------
Layout primitives
------------------------------------------------------------------------ */
.stack   {
    display: flex;
    flex-direction: column;
    gap: var(--s4);
}
.row     {
    display: flex;
    align-items: center;
    gap: var(--s3);
}
.row--between {
    justify-content: space-between;
}
.spacer  {
    flex: 1 1 auto;
}
.grid    {
    display: grid;
    gap: var(--s4);
}
.grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 1100px) {
    .grid--4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .grid--3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 680px) {
    .grid--2, .grid--3, .grid--4 {
        grid-template-columns: minmax(0, 1fr);
    }
}
/* Screen-reader-only, for labels a sighted user gets from context. */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
