/*
 * Base stylesheet for every app screen. Lifted from the finished designs in ../design/
 * (A-Collections and A-Account). Screen-specific styles live in static/<feature>/.
 *
 * Green, amber and red are for status only. No inline styles anywhere: the content security
 * policy blocks them.
 */

/*
 * The wordmark's font: Outfit 700, self-hosted under /static/fonts (licence: fonts/OFL.txt), so
 * the content security policy's font-src 'self' covers it. It has its own family name so only
 * the wordmark uses it; every other heading keeps --font-heading as it was. The ?v= is the
 * file's content hash (src/views/assetHashes.ts in app/edge), so it is cached for a year; the
 * edge test test/node/wordmarkFont.test.ts fails if it no longer matches.
 */
@font-face {
  font-family: "Outfit Wordmark";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/outfit-latin-700-normal.woff2?v=5d5e3734089a7470") format("woff2");
}

:root {
  --ink: #1b1c22;
  --muted: #5e6170;
  --faint: #8a8da0;
  --hairline: #e4e5ec;
  --hairline-soft: #edeef3;
  --border-field: #d4d6e0;
  --border-control: #c9cbd6;
  --border-hover: #b9bccb;
  --surface: #ffffff;
  --surface-hover: #f6f6fb;
  --surface-tint: #f7f7fe;
  --surface-muted: #f1f1f6;

  --indigo: #4b4ded;
  --indigo-text: #3a3ccb;
  --indigo-hover: #2f31b8;
  --indigo-soft: #8f90f4;
  --indigo-ring: rgba(75, 77, 237, 0.16);
  --indigo-shadow: rgba(75, 77, 237, 0.25);

  --green: #1e7b46;
  --green-border: #cfe6d8;
  --amber: #a15c00;
  --amber-border: #ebd6b8;
  --red: #c2362b;
  --red-border: #f0c9c4;
  --red-tint: #fceeec;

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  --font-heading: "Outfit", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial,
    sans-serif;

  --font-wordmark: "Outfit Wordmark", "Outfit", "Inter", system-ui, -apple-system, "Segoe UI",
    Roboto, Arial, sans-serif;

  --radius-card: 22px;
  --radius-field: 18px;
  --radius-inner: 14px;
  --radius-pill: 999px;
  --control-height: 44px;
  --gutter: 32px;

  /* The logo, the same numbers as the sales site (app/site/static/css/base.css). */
  --logo-mark: 38px;
  --logo-name-size: 23px;
  --logo-name-weight: 700;
  --logo-gap: 10px;
  --logo-mark-phone: 30px;
  --logo-name-size-phone: 16px;
  --logo-gap-phone: 10px;
  --logo-foot-name-size: 18px;
  --logo-foot-name-weight: 700;
}

/* Reset and base ------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
}

a {
  color: var(--indigo-text);
}

a:hover {
  color: var(--indigo-hover);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 2px;
}

img {
  max-width: 100%;
  height: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Type scale ----------------------------------------------------------------------------- */

h1,
.title-1 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: 44px;
  line-height: 1.05;
  letter-spacing: -0.025em;
}

h2,
.title-2 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h3,
.title-3 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.25;
}

/* No stranded words (the owner, 2026-11-20: "avoid one to three words breaking to the next
   line"): headings and one-line labels balance their lines, paragraphs avoid a last line of one
   word, and a figure with its range ("237 to 2,759") never breaks apart. */
h1,
h2,
h3,
h4,
.title-1,
.title-2,
.title-3,
.label,
.card__label,
.btn,
.button,
.pill,
.mark,
dt {
  text-wrap: balance;
}

p,
li,
dd,
.caption {
  text-wrap: pretty;
}

.nobreak {
  white-space: nowrap;
}

/* A button or pill of two or three words never breaks between them (the owner, 2026-11-20:
   "avoid one to three words breaking to the next line"). A plain <button> is left to wrap: a
   term's name in the Terms panel is one, and may be long. */
.btn,
.button,
.pill {
  white-space: nowrap;
}

.figure {
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: 28px;
  line-height: 1.1;
}

.lead {
  margin: 0;
  max-width: 680px;
  color: var(--muted);
  font-size: 15px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 13px;
}

.caption {
  font-size: 12px;
  color: var(--muted);
}

.label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.strong {
  font-weight: 600;
}

/* App header ----------------------------------------------------------------------------- */

.app-header {
  border-bottom: 1px solid var(--hairline);
  padding: 0 var(--gutter);
}

.app-header__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 18px 0;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.crumbs__home {
  display: inline-flex;
  align-items: center;
  gap: var(--logo-gap);
  padding: 3px 0;
  color: var(--ink);
  text-decoration: none;
}

.app-header__mark {
  width: var(--logo-mark);
  height: var(--logo-mark);
}

.app-header__name {
  font-family: var(--font-wordmark);
  font-weight: var(--logo-name-weight);
  font-size: var(--logo-name-size);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.crumbs__link {
  padding: 10px 4px;
  color: var(--muted);
  text-decoration: none;
}

.crumbs__sep {
  color: var(--muted);
}

.crumbs__current {
  padding: 10px 4px;
  font-weight: 600;
}

.app-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.app-header__store {
  font-size: 13px;
  color: var(--muted);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-height);
  padding: 0 12px;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}

.nav-link:hover {
  color: var(--indigo-text);
}

/* Page layout ---------------------------------------------------------------------------- */

.page {
  max-width: 1360px;
  margin: 0 auto;
  padding: 32px var(--gutter) 64px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.page--narrow {
  max-width: 1240px;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.page-head__text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
