/* Stint base: what every page shares (the Floor), on top of tokens.css. The app light by default, marketing pages dark (theme.js). */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--line-strong) var(--bg); scroll-padding-top: calc(var(--nav-height) + var(--space-lg)); scroll-behavior: smooth; interpolate-size: allow-keywords; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: var(--text-md); line-height: var(--leading-body); font-feature-settings: "cv11", "ss01"; font-synthesis: none; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; caret-color: var(--accent); transition: background-color var(--dur-mid) var(--ease), color var(--dur-mid) var(--ease); }
::selection { background: var(--accent-soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); font-family: var(--font-display); font-weight: 700; line-height: var(--leading-snug); letter-spacing: var(--tracking-tight); overflow-wrap: break-word; min-width: 0; text-wrap: balance; }
h4, .app h2, .app h3 { font-family: var(--font-body); font-weight: 600; letter-spacing: 0; }
h1 { max-width: 22ch; } h2 { max-width: 30ch; } h3 { max-width: 40ch; }
p { margin: 0; text-wrap: pretty; }
img, video { max-width: 100%; height: auto; display: block; }
svg { display: block; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
code, pre, kbd { font-family: var(--font-mono); font-size: 0.92em; }
.num, td.num { font-variant-numeric: tabular-nums; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: calc(var(--container-narrow) + 2 * var(--gutter)); }
.container--prose { max-width: calc(var(--container-prose) + 2 * var(--gutter)); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--space-md); top: calc(-1 * var(--space-3xl)); z-index: var(--z-toast); padding: var(--space-xs) var(--space-md); background: var(--primary-bg); color: var(--primary-text); border-radius: var(--r-lg); text-decoration: none; font-weight: 600; }
.skip:focus-visible { top: var(--space-md); }
[data-slot] { position: relative; }
[data-slot] > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
[data-slot]:has(> img) > :not(img):not([data-keep]) { display: none !important; }

/* The brand phrase: one violet, on large text only. */
.t-brand { color: var(--accent); }

/* Controls (the reference's set): the violet primary, the bordered secondary, the ghost text action, the icon button,
   the split button, the danger action. All eight states. */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); min-height: var(--control-h); padding: 0 var(--space-md); border: 1px solid var(--primary-bg); border-radius: var(--r-sm); background: var(--primary-bg); color: var(--primary-text); font-weight: 600; font-size: var(--text-sm); line-height: 1; white-space: nowrap; text-decoration: none; cursor: pointer; transition: background-color var(--dur-short) var(--ease), border-color var(--dur-short) var(--ease), color var(--dur-short) var(--ease), transform var(--dur-short) var(--ease); }
.btn:hover { background: var(--primary-bg-hover); border-color: var(--primary-bg-hover); }
.btn:active { transform: scale(.98); }
.btn--lg { min-height: 48px; padding: 0 var(--space-lg); border-radius: var(--r-sm); font-size: var(--text-md); }
.btn--quiet { background: var(--quiet-bg); color: var(--ink); border-color: var(--line-strong); }
.btn--quiet:hover { background: var(--surface-2); border-color: var(--line-control); }
:root[data-surface="marketing"][data-theme="dark"] .btn--quiet { border-color: var(--brand-1); color: var(--ink); }
:root[data-surface="marketing"][data-theme="dark"] .btn--quiet:hover { background: var(--veil); border-color: var(--accent); }
.btn--icon { width: var(--control-h); padding: 0; background: var(--quiet-bg); color: var(--ink); border-color: var(--line-strong); }
.btn--icon:hover { background: var(--surface-2); border-color: var(--line-control); }
.btn-split { display: inline-flex; }
.btn-split > .btn:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.btn-split > .btn:last-child { width: 32px; padding: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; border-left-color: var(--split-line); }
.btn--ghost { background: transparent; color: var(--text); border-color: transparent; padding-inline: var(--space-sm); }
.btn--ghost:hover { background: var(--surface-2); border-color: transparent; color: var(--ink); }
.btn--ghost .chev { transition: transform var(--dur-short) var(--ease); }
.btn--ghost:hover .chev { transform: translateX(2px); }
.btn--danger { background: var(--danger-bg); color: var(--danger-text); border-color: var(--danger-bg); }
.btn--danger:hover { background: var(--danger-bg-hover); border-color: var(--danger-bg-hover); }
.btn--sm { min-height: var(--control-h-sm); padding: 0 var(--space-sm); font-size: var(--text-sm); border-radius: var(--r-sm); }
@media (pointer: coarse) { .btn--sm { min-height: 44px; } }
.btn svg { width: 1.05em; height: 1.05em; flex-shrink: 0; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn[aria-busy="true"] { cursor: progress; color: transparent; }
.btn[aria-busy="true"]::after { content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--primary-text); border-right-color: transparent; animation: spin 700ms linear infinite; }
.btn:is(.btn--quiet, .btn--ghost, .btn--icon)[aria-busy="true"]::after { border-color: var(--ink); border-right-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Chips and badges: state words only (listed, lead, confirmed, stated, proposed, due, kept out). Pills, as the
   reference's "beta" and "In App" badges. */
.chip, .badge { display: inline-flex; align-items: center; gap: var(--space-2xs); min-height: 22px; padding: 0 var(--space-xs); border-radius: var(--r-full); background: var(--neutral-bg); color: var(--neutral-text); font-size: var(--text-xs); font-weight: 500; line-height: 1.3; white-space: nowrap; }
.chip--ok, .badge--ok { background: var(--ok-bg); color: var(--ok-text); }
.chip--warn, .badge--warn { background: var(--warn-bg); color: var(--warn-text); }
.chip--err, .badge--err { background: var(--err-bg); color: var(--err-text); }
.badge--info { background: var(--info-bg); color: var(--info-text); }
.chip--brand, .badge--brand { background: var(--select); color: var(--select-text); }
.chip--count { min-width: 20px; min-height: 20px; padding: 0 var(--space-2xs); border-radius: var(--r-full); justify-content: center; background: var(--surface-3); color: var(--ink); font-variant-numeric: tabular-nums; }

/* The logo: "Stint.to", set tight and upright; the full stop is the one coloured mark, the point where you and your
   assistant meet. Its small form is "S." on an ink tile (app icon, favicon). */
.wordmark { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--ink); }
.wordmark__text { display: inline-flex; align-items: baseline; color: var(--ink); font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.04em; line-height: 1; }
.wordmark__dot { display: inline-block; width: 0.2em; height: 0.2em; margin: 0 0.05em 0 0.07em; border-radius: 50%; background: var(--brand-1); transform: translateY(0.01em); transition: transform var(--dur-mid) var(--ease-out); }
.wordmark:hover .wordmark__dot { transform: translateY(-0.12em) scale(1.15); }
.mark-s { display: inline-flex; align-items: baseline; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.04em; line-height: 1; color: var(--white); }
.mark-s i { display: inline-block; width: 0.22em; height: 0.22em; margin-left: 0.06em; border-radius: 50%; background: var(--brand-1); }

/* The theme toggle: a sun in the dark theme, a moon in the light one. */
.theme-toggle { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); cursor: pointer; transition: background-color var(--dur-micro) var(--ease), border-color var(--dur-micro) var(--ease); }
.theme-toggle:hover { border-color: var(--line-strong); background: var(--surface-2); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
@media (pointer: coarse) { .theme-toggle { width: 44px; height: 44px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .btn[aria-busy="true"]::after { animation: none; opacity: 0.5; }
}
