/* The owner's design for the website as one stylesheet: its tokens as
   variables, its fonts, its type, and the classes every page shares.
   Every value is the design's own: the colours, spaces, radii, shadows
   and heights of tokens.json, and the values the thirteen web artboards
   add to them (their inline styles and <style> blocks). Nothing here
   styles an element by its tag, so a page looks the same until it uses
   these names. The landing page's and the account pages' stylesheets
   import this one first. */

/* The four families the artboards are set in, at the weights they load,
   each served by the service with its licence (SIL Open Font License). */
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/Inter-Regular.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/Inter-Medium.otf") format("opentype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/Inter-SemiBold.otf") format("opentype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/Geist-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/JetBrainsMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/JetBrainsMono-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/fonts/SpaceGrotesk.ttf") format("truetype");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  /* tokens.json, the light theme. */
  --ground: #f5f6f5;
  --surface: #ffffff;
  --control: #ffffff;
  --fill: #f5f6f5;
  --glass: rgba(255, 255, 255, 0.62);
  --glass-edge: rgba(255, 255, 255, 0.75);
  --glass-control: rgba(255, 255, 255, 0.62);
  --glass-control-edge: rgba(255, 255, 255, 0.75);
  --glow-a: rgba(63, 85, 217, 0.16);
  --glow-b: rgba(129, 146, 230, 0.2);
  --ink: #242728;
  --ink-muted: #596779;
  --line: #e2e7ee;
  --line-strong: #838c92;
  --inverse: #242728;
  --on-inverse: #ffffff;
  --inverse-muted: #c5cbce;
  --inverse-fill: #3a4042;
  --accent: #3f55d9;
  --on-accent: #ffffff;
  --accent-text: #3f55d9;
  --accent-on-inverse: #8192e6;
  --accent-soft: #e8ecfb;
  --accent-line: #aeb9f0;
  --focus: #3f55d9;
  --pulse: rgba(129, 146, 230, 0.55);
  --danger: #d13b40;
  --on-danger: #ffffff;
  --danger-text: #923e35;
  --wordmark: #252b2d;
  --wordmark-period: #5d74d8;
  /* Contact avatars only: one colour per contact, initials in on-avatar. */
  --avatar-peach: #f3cdb0;
  --avatar-teal: #bcddd8;
  --avatar-lilac: #d6cff0;
  --avatar-sand: #e9dfa9;
  --avatar-rose: #f0c9cf;
  --on-avatar: #242728;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --safe-top: 56px;
  --safe-bottom: 34px;
  --radius-sm: 14px;
  --radius-md: 18px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --radius-full: 999px;
  --shadow-glass: 0 8px 24px rgba(36, 39, 40, 0.06);
  --shadow-float: 0 10px 30px rgba(36, 39, 40, 0.12);
  --glass-blur: 24px;
  --glass-saturate: 180%;
  --control-sm: 44px;
  --control-md: 48px;
  --control-lg: 56px;
  --control-xl: 64px;

  /* The web artboards' own colours. */
  --page: #f3f2f8; /* the landing page's ground */
  --frame-ground: #f1f1f7; /* inside the account frame */
  --accent-headline: #4f64d4; /* the second line of a headline */
  --accent-deep: #2e3fa8; /* accent text on accent-soft */
  --lavender: #e8e5fa; /* the "You stay in charge" slab, the Plus card */
  --lilac: var(--avatar-lilac); /* the drawings' fill */
  --ink-body: #3b4250; /* body paragraphs on the landing page */
  --ink-muted-sign-in: #4a5568;
  /* Green is a status badge's: Connected, Active, Verified. */
  --status: #1e6b52;
  --status-soft: #e3f1ec;
  --tag-warm: #7a4a12; /* the Follow up tag */
  --tag-warm-soft: #fbebd3;
  --tag-quiet-soft: #eef0f2; /* the Expired badge, with ink-muted */
  --danger-soft: #f7e4e2; /* a failed delivery badge, with danger-text */
  --field: rgba(255, 255, 255, 0.85);
  --seg-track: rgba(36, 39, 40, 0.07);

  /* The landing page's slabs: the glow's place differs on each slab. */
  --slab-glow: #f4f3fc;
  --slab: linear-gradient(180deg, #e6e2f6 0%, #dcddf5 55%, #c8cff2 100%);

  /* The account pages' and sign-in's 24 px blue frame, and the panel
     inset in it. */
  --frame-width: 24px;
  --frame: radial-gradient(50% 60% at 10% 0%, rgba(129, 146, 230, 0.9), rgba(129, 146, 230, 0) 70%),
    linear-gradient(160deg, #3f55d9 0%, #1b2463 100%);
  --frame-sign-in: radial-gradient(50% 80% at 15% 0%, rgba(129, 146, 230, 0.9), rgba(129, 146, 230, 0) 70%),
    radial-gradient(40% 70% at 100% 100%, #2b3a9e, rgba(43, 58, 158, 0) 70%),
    linear-gradient(160deg, #3f55d9 0%, #1b2463 100%);
  --frame-panel: radial-gradient(45% 40% at 100% 0%, rgba(129, 146, 230, 0.28), rgba(129, 146, 230, 0) 70%),
    radial-gradient(40% 40% at 0% 100%, rgba(214, 207, 240, 0.6), rgba(214, 207, 240, 0) 70%),
    #f1f1f7;
  --frame-panel-edge: inset 0 0 0 1.5px rgba(255, 255, 255, 0.7);
  --shadow-frame: 0 30px 80px rgba(10, 16, 60, 0.35);

  /* Glass: the fill, the blur behind it, its inner edge and its shadow.
     The landing page's floating glass is a little clearer. */
  --glass-filter: blur(24px) saturate(180%);
  --glass-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75), 0 8px 24px rgba(36, 39, 40, 0.06);
  --glass-landing: rgba(255, 255, 255, 0.55);
  --glass-landing-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8), 0 10px 30px rgba(36, 39, 40, 0.1);

  /* The landing page's rules and leaders. */
  --rule: 1.5px solid #242728;
  --rule-dashed: 1.5px dashed #242728;

  /* The web's radii beside tokens.json's. */
  --radius-frame: 44px; /* slabs and the account frame */
  --radius-sign-in: 36px; /* the sign-in card */
  --radius-panel: 32px; /* account list and detail cards */
  --radius-dashboard: 30px; /* dashboard cards */
  --radius-text-area: 20px;

  /* The web's heights beside tokens.json's. */
  --control-chip: 40px; /* chips, sub-navigation, small buttons */
  --control-action: 52px; /* landing buttons and a page's main action */

  /* Type: the families, then each style as a font shorthand. */
  --font-sans: Inter, system-ui, sans-serif;
  --font-display: "Space Grotesk", Inter, system-ui, sans-serif;
  --font-brand: Geist, Inter, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  /* The web: body text, navigation, buttons. */
  --type-page-landing: 400 16px/1.5 var(--font-sans);
  --type-page-account: 400 15px/1.45 var(--font-sans);
  --type-nav: 500 15px/1.45 var(--font-sans);
  --type-button-landing: 600 16px/1.2 var(--font-sans);
  --type-button-account: 600 15px/1.2 var(--font-sans);
  --type-chip: 500 14px/1.2 var(--font-sans);
  /* Headlines: Space Grotesk 600, section heads 500, size per artboard. */
  --tracking-display: -0.02em; /* account pages */
  --tracking-display-landing: -0.03em; /* landing and sign-in */
  /* The wordmark, Geist 700. */
  --wordmark-landing: 700 23px/1 var(--font-brand);
  --tracking-wordmark-landing: -1.15px;
  --wordmark-account: 700 21px/1 var(--font-brand);
  --tracking-wordmark-account: -1px;
  --wordmark-footer: 700 26px/1 var(--font-brand);
  /* tokens.json's styles. */
  --type-numeral-xl: 600 72px/0.95 var(--font-display);
  --tracking-numeral-xl: -0.03em;
  --type-title-xl: 600 32px/1.1 var(--font-display);
  --tracking-title-xl: -0.02em;
  --type-numeral-lg: 600 28px/1.1 var(--font-display);
  --tracking-numeral-lg: -0.02em;
  --type-title-lg: 600 24px/1.15 var(--font-display);
  --tracking-title-lg: -0.01em;
  --type-title-md: 600 20px/1.2 var(--font-display);
  --tracking-title-md: -0.01em;
  --type-body-lg: 400 16px/1.4 var(--font-sans);
  --type-body: 400 15px/1.35 var(--font-sans);
  --type-body-strong: 600 15px/1.35 var(--font-sans);
  --type-button: 600 16px/1.2 var(--font-sans);
  --type-label: 600 13px/1.35 var(--font-sans);
  --type-caption: 400 13px/1.35 var(--font-sans);
  --type-micro: 400 12px/1.35 var(--font-sans);
  --type-tab: 500 11px/1.35 var(--font-sans);
  --type-wordmark: 700 22px/1 var(--font-brand);
  --tracking-wordmark: -1.1px;
}

/* tokens.json's call theme: the phone's call screen and what is drawn in
   its colours. A dark card on a light page takes `.dark` instead; a
   `.btn.light` on it is light either way. */
.theme-call {
  --ground: #1c1f20;
  --surface: #292d2e;
  --control: #2d3335;
  --fill: rgba(255, 255, 255, 0.1);
  --glass: rgba(255, 255, 255, 0.06);
  --glass-edge: rgba(255, 255, 255, 0.1);
  --glass-control: rgba(255, 255, 255, 0.1);
  --glass-control-edge: rgba(255, 255, 255, 0.16);
  --glow-a: rgba(63, 85, 217, 0.42);
  --glow-b: rgba(129, 146, 230, 0.2);
  --ink: #f5f6f5;
  --ink-muted: #a9b1b5;
  --line: #43494b;
  --line-strong: #7f888d;
  --inverse: #f5f6f5;
  --on-inverse: #242728;
  --inverse-muted: #596779;
  --inverse-fill: #e2e7ee;
  --accent-text: #8192e6;
  --accent-on-inverse: #3f55d9;
  --accent-soft: #262e52;
  --accent-line: #4a5aa8;
  --focus: #8192e6;
  --danger-text: #f1a9a5;
  --wordmark: #f5f6f5;
  --wordmark-period: #8192e6;
  --shadow-glass: 0 0 0 rgba(0, 0, 0, 0);
  --shadow-float: 0 0 0 rgba(0, 0, 0, 0);
  --glass-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  --rule: 1.5px solid #f5f6f5;
  --rule-dashed: 1.5px dashed #f5f6f5;
  color: var(--ink);
}

/* Type, by the artboards' own class names. */
.d {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: var(--tracking-display);
}
.m { color: var(--ink-muted); }
.mono { font-family: var(--font-mono); }
.lbl { font: var(--type-label); }

/* Glass. Where the device asks for less transparency, it is opaque. */
.g {
  background: var(--glass);
  backdrop-filter: var(--glass-filter);
  box-shadow: var(--glass-shadow);
}
.glass {
  background: var(--glass-landing);
  backdrop-filter: var(--glass-filter);
  box-shadow: var(--glass-landing-shadow);
}
@media (prefers-reduced-transparency: reduce) {
  .g, .glass { background: var(--surface); backdrop-filter: none; }
}

/* Fills the artboards name on their own. */
.dark { background: var(--inverse); color: var(--on-inverse); }
.acc { background: var(--accent); color: var(--on-accent); }
.out { background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); }

/* A button: 44 px on the account pages, 52 px on the landing page
   (`.btn.lg`), 48 or 40 px where an artboard sets it. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--control-sm);
  margin: 0;
  padding: 0 18px;
  border: 0;
  border-radius: var(--radius-full);
  box-sizing: border-box;
  background: transparent;
  color: inherit;
  font: var(--type-button-account);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}
.btn.lg { height: var(--control-action); padding: 0 26px; font: var(--type-button-landing); }
.btn.md { height: var(--control-md); }
.btn.sm { height: var(--control-chip); }
.btn.out-ink { box-shadow: inset 0 0 0 1.5px var(--ink); } /* the landing page's outlined button */
.btn.light { background: var(--ground); color: var(--ink); } /* on a dark card */
.theme-call .btn.light { background: var(--inverse); color: var(--on-inverse); }
.btn.clear { background: rgba(255, 255, 255, 0.1); color: #ffffff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16); } /* on a dark card */
.btn.link { height: var(--control-chip); text-decoration: underline; }
.btn.danger-text { color: var(--danger-text); text-decoration: underline; }

/* A chip: 40 px; selected, it is dark. Its ground is glass or a quiet fill. */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: var(--control-chip);
  margin: 0;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius-full);
  box-sizing: border-box;
  color: inherit;
  font: var(--type-chip);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.chip.quiet-fill { background: var(--frame-ground); }
.chip.soft { background: var(--accent-soft); color: var(--accent-deep); font-weight: 600; }
.chip.on, .chip[aria-current="page"], .chip:has(input:checked) {
  background: var(--inverse);
  color: var(--on-inverse);
  font-weight: 600;
}

/* A field: a 48 px pill; a text area keeps 20 px corners. */
.field {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: var(--control-md);
  margin: 0;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius-full);
  box-sizing: border-box;
  background: var(--field);
  box-shadow: inset 0 0 0 1px var(--line);
  color: inherit;
  font: inherit;
  font-size: 15px;
  appearance: none;
}
.ta {
  width: 100%;
  margin: 0;
  padding: 12px 16px;
  border: 0;
  border-radius: var(--radius-text-area);
  box-sizing: border-box;
  background: var(--field);
  box-shadow: inset 0 0 0 1px var(--line);
  color: inherit;
  font: inherit;
  font-size: 15px;
  line-height: 1.45;
  resize: none;
}

/* A switch: 52 by 32 with a 24 px knob, or 44 by 26 with a 20 px knob
   (`.sw.sm`). On, it is accent; off, line-strong. It is a checkbox
   (`<input type="checkbox" role="switch" class="sw">`) or, drawn, a
   span with `.on`. */
.sw {
  flex: none;
  width: 52px;
  height: 32px;
  margin: 0;
  border: 0;
  border-radius: var(--radius-full);
  box-sizing: border-box;
  background: radial-gradient(circle closest-side, var(--surface) 96%, transparent) left 4px center / 24px 24px no-repeat,
    var(--line-strong);
  appearance: none;
  cursor: pointer;
}
.sw.on, .sw:checked {
  background-color: var(--accent);
  background-position: right 4px center;
}
.sw.sm { width: 44px; height: 26px; background-size: 20px 20px; background-position: left 3px center; }
.sw.sm.on, .sw.sm:checked { background-position: right 3px center; }

/* A segmented control: a 4 px track with 36 px segments; the chosen one
   is white and lifted. `.seg.tabs` is the glass tab bar: 40 px tabs, the
   chosen one dark. */
.seg {
  display: flex;
  padding: 4px;
  border-radius: var(--radius-full);
  background: var(--seg-track);
}
.seg > * {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.seg > .on, .seg > [aria-checked="true"], .seg > [aria-current="page"], .seg > :has(input:checked) {
  background: var(--surface);
  box-shadow: 0 2px 6px rgba(36, 39, 40, 0.1);
  font-weight: 600;
}
.seg.tabs { display: inline-flex; gap: 2px; background: var(--glass); backdrop-filter: var(--glass-filter); box-shadow: var(--glass-shadow); }
.seg.tabs > * { flex: none; height: var(--control-chip); padding: 0 16px; }
.seg.tabs > .on, .seg.tabs > [aria-selected="true"], .seg.tabs > [aria-current="page"], .seg.tabs > :has(input:checked) {
  background: var(--inverse);
  color: var(--on-inverse);
  box-shadow: none;
}

/* A tag: 26 px; `.sm` 24 px (a call's row), `.lg` 28 px (a connection's
   status). */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--radius-full);
  box-sizing: border-box;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.tag.sm { height: 24px; padding: 0 9px; }
.tag.lg { height: 28px; padding: 0 12px; font-size: 13px; }
.tag.outline { box-shadow: inset 0 0 0 1.5px var(--ink); }
.tag.status { background: var(--status-soft); color: var(--status); }
.tag.warm { background: var(--tag-warm-soft); color: var(--tag-warm); }
.tag.expired { background: var(--tag-quiet-soft); color: var(--ink-muted); }
.tag.failed { background: var(--danger-soft); color: var(--danger-text); }

/* Keyboard focus, as tokens.json draws it. */
:is(.btn, .chip, .field, .ta, .sw, .seg > *):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
