/*
 * Costa Desk design tokens (docs/design/README.md). Every colour, size and radius of
 * components.css comes from here; no component carries a literal value.
 *
 * Palette (six brand values): night #0f2a2c, sea #0f5563, gold #dca54a, sand #f4f0e8,
 * ink #12201f, urgent #8f2f1c. Every other colour is a tint, a line or a text shade of these,
 * or a status colour (green) the boards need for "connected".
 * Type: Fraunces (display: titles, wordmark) and Instrument Sans (everything else).
 * Scale: 12, 13, 14, 15, 16, 19, 26, 32, 38 px. Spacing: 4, 8, 12, 16, 24, 32, 48, 64 px.
 * Radii: sm 8, md 12, lg 16, pill. Elevation: raised (urgent card), pop (banner, toast, dialog).
 * Breakpoints (a media query cannot read a custom property, so these literals repeat in
 * components.css): 40rem (640px) tables become cards and dialogs become sheets;
 * 48rem (768px) wider gutters.
 */

/* Fonts are vendored (static/fonts, SIL OFL): nothing loads from another origin. */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/fraunces-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/fraunces-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/fraunces-latin-wght-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/fraunces-latin-ext-wght-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/instrument-sans-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Brand colour */
  --color-night: #0f2a2c;
  --color-sea: #0f5563;
  --color-sea-deep: #0a4350;
  --color-sea-tint: #e3eff0;
  --color-gold: #dca54a;
  --color-gold-on-light: #c9963f;
  --color-gold-ink: #8a6420;
  --color-gold-tint: rgba(220, 165, 74, 0.16);
  --color-gold-line: rgba(220, 165, 74, 0.55);
  --color-sand: #f4f0e8;
  --color-ink: #12201f;
  --color-text: #44504e;
  --color-muted: #5e6967;
  --color-line: #e3dccf;
  --color-line-strong: #c9c2b5;
  --color-line-soft: #f0ebe1;
  --color-sand-deep: #ebe5d9;
  --color-stone: #ebe8e2;
  --color-placeholder: #6b7472;
  --color-control-edge: #7b8381; /* 3:1 on white and sand: field borders, switch track */
  --color-white: #ffffff;
  --color-scrim: rgba(15, 42, 44, 0.6);

  /* Assisted fields (filled by the assistant) and the review panel */
  --color-sea-line: #9cc3c9;
  --color-gold-pale: #e9d3a8;

  /* Connected, working */
  --color-green: #1d6b3a;
  --color-green-tint: #e1f0e6;

  /* Colour on the night surfaces */
  --color-on-night: #d9e2df;
  --color-on-night-strong: #ffffff;
  --color-night-hover: rgba(255, 255, 255, 0.08);
  --color-night-rule: rgba(255, 255, 255, 0.22);

  /* Urgency (bands, chips, badges) */
  --color-urgent: #8f2f1c;
  --color-urgent-tint: #f7e4df;
  --color-urgent-line: #e6c3b9;
  --color-badge: #b3361f;
  --color-today: #7a5718;
  --color-today-tint: #f6ecd9;

  /* Type */
  --font-display: "Fraunces", Georgia, serif;
  --font-text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --text-2xs: 0.75rem; /* 12px: tab labels */
  --text-xs: 0.8125rem; /* 13px: timestamps, meta */
  --text-sm: 0.875rem; /* 14px */
  --text-md: 0.9375rem; /* 15px: phone body */
  --text-base: 1rem; /* 16px */
  --text-lg: 1.1875rem; /* 19px */
  --text-xl: 1.625rem; /* 26px */
  --text-2xl: 2rem; /* 32px: phone titles */
  --text-3xl: 2.375rem; /* 38px: desktop titles */
  --text-wordmark: 1.75rem; /* "Desk" beside the logo mark */
  --text-4xl: 2.5rem;
  --tracking-brand: 0.14em;
  --text-display: clamp(2.125rem, 9vw, 3.25rem);
  --leading-tight: 1.1;
  --leading-snug: 1.3;
  --leading-body: 1.5;
  --measure: 38rem; /* line length under 80 characters */

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;

  /* Radii */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-pill: 999px;

  /* Elevation */
  --shadow-raised: 0 4px 14px rgba(143, 47, 28, 0.08);
  --shadow-pop: 0 10px 30px rgba(18, 32, 31, 0.28);
  --shadow-thumb: 0 1px 3px rgba(18, 32, 31, 0.25);

  /* Sizes */
  --tap: 2.75rem; /* 44px: the smallest target */
  --tap-large: 3.5rem; /* 56px: the main action of a phone screen */
  --tap-wide: 3.25rem; /* 52px: a button that fills the width */
  --tabbar-height: 3.75rem;
  --avatar: 2.25rem;
  --avatar-md: 2.625rem; /* 42px: client lists */
  --avatar-lg: 3.25rem; /* 52px: account header */
  --hairline: 1px;
  --stroke: 2px;
  --field-height: 3.125rem; /* 50px: text input and select */
  --field-area: 6rem;
  --chip-height: 1.625rem; /* 26px */
  --count-size: 1.375rem;
  --source-size: 2.375rem; /* 38px: source icon tile */
  --switch-row: 3.25rem;
  --switch-width: 3.25rem;
  --switch-height: 2rem;
  --switch-thumb: 1.625rem;
  --check-size: 1.5rem;
  --spinner: 1rem;
  --icon-tile: 3.5rem; /* the circle above an empty state */
  --skeleton-line: 0.875rem;
  --dialog-max: 28rem;
  --kit-column: 19rem; /* the /dev/kit page */
  --kit-column-narrow: 11rem;
  --toast-max: 32rem;
  --opacity-soft: 0.8;
  --logo-width: 18.75rem;
  --lockup-rule: 4.8rem;
  --login-pane: 26rem;
  --lead-max: 27.5rem;
  --form-max: 25rem;
  --page-max: 85rem;
  --panel-max: 32rem;
  --side-column: 25rem; /* the side column of the client card */

  /* Layers */
  --z-tabs: 2;
  --z-skip: 10;
  --z-toast: 20;

  /* Focus and motion */
  --focus-color: var(--color-sea);
  --focus-ring: 3px solid var(--focus-color);
  --focus-offset: 2px;
  --duration: 150ms;
  --ease: ease-out;
  --pulse-duration: 1.4s;
  --spin-duration: 0.8s;
}
