/* Carbon design tokens */

/* dawn */

:root,
[data-theme='dawn'] {
  color-scheme: light;

  --cds-background: #fff1e5;        /* FT: paper */
  --cds-background-hover: #f2dfce;  /* FT: wheat */
  --cds-layer-01: #f8e9dc;
  --cds-layer-02: #fff8f2;
  --cds-layer-03: #f2dfce;
  --cds-layer-hover-01: #f2dfce;
  --cds-field-01: #fff8f2;
  --cds-field-02: #fff1e5;

  --cds-border-subtle-01: #ecdccb;
  --cds-border-subtle-02: #e0cdb9;
  --cds-border-strong-01: #a4937f;
  --cds-border-inverse: #33302e;

  /* --- text --- */
  --cds-text-primary: #33302e;      /* FT: ink */
  --cds-text-secondary: #66605c;    /* FT: slate */
  --cds-text-placeholder: #776e64;
  --cds-text-helper: #6b635c;
  --cds-text-on-color: #ffffff;
  --cds-text-inverse: #fff1e5;
  --cds-text-error: #990f3d;

  /* --- icons --- */
  --cds-icon-primary: #33302e;
  --cds-icon-secondary: #66605c;
  --cds-icon-on-color: #ffffff;

  --cds-interactive: #990f3d;       /* FT: claret */
  --cds-link-primary: #990f3d;
  --cds-link-primary-hover: #7a0c31;
  --cds-link-visited: #63516f;
  --cds-focus: #990f3d;
  --cds-focus-inset: #fff1e5;
  --cds-button-primary: #990f3d;
  --cds-button-primary-hover: #7a0c31;
  --cds-button-primary-active: #5c0924;
  --cds-button-secondary: #0d7680;  /* FT: teal */
  --cds-button-secondary-hover: #0a5b63;
  --cds-button-secondary-active: #073f45;
  --cds-button-tertiary: #990f3d;
  --cds-button-tertiary-hover: #7a0c31;
  --cds-button-danger-primary: #990f3d;
  --cds-button-danger-hover: #7a0c31;
  --cds-button-disabled: #e8ddd0;
  --cds-support-error: #990f3d;
  --cds-support-error-inverse: #f2dfce;
  --cds-support-success: #0d7680;
  --cds-support-warning: #b45f16;
  --cds-support-info: #0f5499;      /* FT: oxford */
  --cds-support-info-inverse: #9cc8e9;

  --cds-overlay: rgba(51, 48, 46, 0.5);
  --cds-skeleton-background: #f2dfce;
  --cds-skeleton-element: #e6d5c3;

  --ll-moon: #9a5f14;
  --ll-moon-soft: rgba(154, 95, 20, 0.12);
  --ll-moon-line: rgba(154, 95, 20, 0.38);

  --ll-postmark: #0e7681;

  --ll-band: #fcd0b1;
  --ll-on-band: #33302e;
  --ll-on-band-2: rgba(51, 48, 46, 0.72);
  --ll-switch-ink: #624f42;
  --ll-switch-fill: #fcd0b1;
  --ll-switch-fill-hover: #ffffff;

  --ll-brand-ink: #0f5499;

  --ll-pad: #fff8f2;
  --ll-pad-letter: #fff8f2;
  --ll-envelope: #f8e9dc;
  --ll-envelope-flap: #fff8f2;
  --ll-envelope-line: #e0cdb9;
  --ll-envelope-line-strong: #a4937f;
  --ll-pad-hover: #fdf4ec;
  --ll-pad-line: #8d7c67;
  --ll-pad-rule: rgba(51, 48, 46, 0.11);
  --ll-pad-masthead: #a49a90;
  --ll-pad-masthead-rule: rgba(51, 48, 46, 0.22);

  /* the sheet the collection is shown on: paper, with the stamps printed on it in their own dark ink */
  --ll-stamp-sheet: #f3e8d8;
  --ll-stamp-sheet-ink: #33302e;
  --ll-stamp-sheet-muted: rgba(51, 48, 46, 0.62);
  --ll-stamp-sheet-line: rgba(51, 48, 46, 0.16);
}

/* twilight */

[data-theme='twilight'],
.ll-band--sky,

/* The stamp's own palette — a stamp is a printed thing, and the house rule is that it is dark
   wherever it appears: on the desk, in the picker, on an envelope, in either theme. */
.ll-stamp-slot:not(.ll-stamp-slot--blank) .ll-stamp__art,
.ll-picker__art,
/* The six premium plates are printed on their own coloured stock, and a coloured field is a dark
   ground wherever it appears — on the counter's sheet, in the picker, on the letter, in either
   theme — so each of them wears this palette too, or the ink would be dark on a dark plate. The
   class is on the plate itself, whatever element carries it at each site. */
.ll-stamp--guitar,
.ll-stamp--balalaika,
.ll-stamp--piano,
.ll-stamp--trumpet,
.ll-stamp--snare,
.ll-stamp--saxophone {
  color-scheme: dark;
  color: var(--cds-text-primary);

  --cds-background: #1c1714;
  --cds-background-hover: #2b231e;
  --cds-layer-01: #241d19;
  --cds-layer-02: #2f2620;
  --cds-layer-03: #3b302a;
  --cds-layer-hover-01: #2b231e;
  --cds-field-01: #241d19;
  --cds-field-02: #2f2620;

  --cds-border-subtle-01: #3a2f28;
  --cds-border-subtle-02: #4b3e35;
  --cds-border-strong-01: #7a6759;
  --cds-border-inverse: #f6e7d6;

  --cds-text-primary: #f6e7d6;
  --cds-text-secondary: #dac5ae;
  --cds-text-placeholder: #a28d7c;
  --cds-text-helper: #bda893;
  --cds-text-on-color: #ffffff;
  --cds-text-inverse: #1c1714;
  --cds-text-error: #ff9d8b;

  /* --- icons --- */
  --cds-icon-primary: #f6e7d6;
  --cds-icon-secondary: #dac5ae;
  --cds-icon-on-color: #ffffff;

  --cds-interactive: #e9a63c;
  --cds-link-primary: #e9a63c;
  --cds-link-primary-hover: #f6c473;
  --cds-link-visited: #d9a9c7;
  --cds-focus: #f6e7d6;
  --cds-focus-inset: #1c1714;
  --cds-button-primary: #a84d1c;
  --cds-button-primary-hover: #8e3f14;
  --cds-button-primary-active: #6f300e;
  --cds-button-secondary: #7a6759;
  --cds-button-secondary-hover: #8d7a6a;
  --cds-button-secondary-active: #4b3e35;
  --cds-button-tertiary: #e9a63c;
  --cds-button-tertiary-hover: #f6c473;
  --cds-button-danger-primary: #b8321f;
  --cds-button-danger-hover: #9a2917;
  --cds-button-disabled: #4b3e35;
  --cds-support-error: #ff9d8b;
  --cds-support-error-inverse: #b8321f;
  --cds-support-success: #6fbf7f;
  --cds-support-warning: #e9a63c;
  --cds-support-info: #9fc3e8;
  --cds-support-info-inverse: #0f5499;

  --cds-overlay: rgba(28, 23, 20, 0.7);
  --cds-skeleton-background: #241d19;
  --cds-skeleton-element: #3b302a;

  --ll-moon: #f0c674;
  --ll-moon-soft: rgba(240, 198, 116, 0.16);
  --ll-moon-line: rgba(240, 198, 116, 0.5);

  --ll-postmark: #70bac2;

  --ll-band: #624f42;
  --ll-on-band: #f6e7d6;
  --ll-on-band-2: #dac5ae;
  --ll-switch-ink: #fcd0b1;
  --ll-switch-fill: #0f5499;
  --ll-switch-fill-hover: #624f42;

  --ll-brand-ink: #f6e7d6;

  --ll-pad: #1c1714;
  /* the letter's own paper: Oxford blue, drawn a quarter of the way to charcoal */
  --ll-pad-letter: #0e2a49;
  /* the envelope is its own stock: the same Oxford blue drawn a little further toward charcoal,
     with a flap a shade up from it and an ivory edge, so the paper, the fold and the rim are one
     object rather than a sheet in someone else's brown */
  --ll-envelope: #162f4a;
  --ll-envelope-flap: #1d3e60;
  --ll-envelope-line: rgba(246, 231, 214, 0.22);
  --ll-envelope-line-strong: rgba(246, 231, 214, 0.40);
  --ll-pad-hover: #241d19;
  --ll-pad-line: #8d7a6a;
  --ll-pad-rule: rgba(240, 198, 116, 0.18);
  --ll-pad-masthead: #635a51;
  --ll-pad-masthead-rule: rgba(240, 198, 116, 0.20);

  /* the sheet the collection is shown on here: not paper but a dark panel a step up from the modal,
     so the stamps stay dark things and the modal does not go white around them */
  --ll-stamp-sheet: #3b302a;
  --ll-stamp-sheet-ink: #f6e7d6;
  --ll-stamp-sheet-muted: #bda893;
  --ll-stamp-sheet-line: #4b3e35;
}

/* the sky */

:root {
  --ll-sky-ground: #101d3f;
  --ll-sky-glow: #22375f;
  --ll-sky-star: #f7f1e6;
  --ll-sky-moon: #f2cf8c;
}

/* spacing: the 2px grid */
:root {
  --cds-spacing-01: 0.125rem; /* 2px */
  --cds-spacing-02: 0.25rem;  /* 4px */
  --cds-spacing-03: 0.5rem;   /* 8px */
  --cds-spacing-04: 0.75rem;  /* 12px */
  --cds-spacing-05: 1rem;     /* 16px */
  --cds-spacing-06: 1.5rem;   /* 24px */
  --cds-spacing-07: 2rem;     /* 32px */
  --cds-spacing-08: 2.5rem;   /* 40px */
  --cds-spacing-09: 3rem;     /* 48px */
  --cds-spacing-10: 4rem;     /* 64px */
  --cds-spacing-11: 5rem;     /* 80px */
  --cds-spacing-12: 6rem;     /* 96px */
  --cds-spacing-13: 10rem;    /* 160px */

  /* Carbon: layout */
  --cds-layout-margin: 1rem;
  --cds-layout-gutter: 2rem;
  --cds-max-content: 66rem;
  --cds-max-prose: 40rem;

  --cds-duration-fast-01: 70ms;
  --cds-duration-fast-02: 110ms;
  --cds-duration-moderate-01: 150ms;
  --cds-duration-moderate-02: 240ms;
  --cds-duration-slow-01: 400ms;
  --cds-ease-productive: cubic-bezier(0.2, 0, 0.38, 0.9);
  --cds-ease-expressive: cubic-bezier(0.4, 0.14, 0.3, 1);
}

/* type scale (v11) */
:root {
  --cds-font-sans: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  --cds-font-mono: 'IBM Plex Mono', 'Menlo', 'Courier New', monospace;
  --cds-font-serif: 'IBM Plex Serif', Georgia, 'Times New Roman', serif;

  --cds-type-display-01: 300 2.625rem/1.19 var(--cds-font-sans);   /* 42 */
  --cds-type-display-02: 300 3.375rem/1.17 var(--cds-font-sans);   /* 54 */
  --cds-type-display-03: 300 4.75rem/1.14 var(--cds-font-sans);    /* 76 */
  --cds-type-heading-01: 600 0.875rem/1.43 var(--cds-font-sans);   /* 14 */
  --cds-type-heading-02: 600 1rem/1.5 var(--cds-font-sans);        /* 16 */
  --cds-type-heading-03: 400 1.25rem/1.4 var(--cds-font-sans);     /* 20 */
  --cds-type-heading-04: 400 1.75rem/1.29 var(--cds-font-sans);    /* 28 */
  --cds-type-heading-05: 400 2rem/1.25 var(--cds-font-sans);       /* 32 */
  --cds-type-heading-06: 400 2.625rem/1.19 var(--cds-font-sans);   /* 42 */
  --cds-type-body-01: 400 0.875rem/1.43 var(--cds-font-sans);      /* 14 */
  --cds-type-body-02: 400 1rem/1.5 var(--cds-font-sans);           /* 16 */
  --cds-type-label-01: 400 0.75rem/1.33 var(--cds-font-sans);      /* 12 */
  --cds-type-label-02: 400 0.875rem/1.29 var(--cds-font-sans);     /* 14 */
  --cds-type-helper-01: 400 0.75rem/1.33 var(--cds-font-sans);     /* 12 */
  --cds-type-code-01: 400 0.75rem/1.33 var(--cds-font-mono);       /* 12 */
  --cds-type-code-02: 400 0.875rem/1.43 var(--cds-font-mono);      /* 14 */

  --cds-type-tracking: 0.16px;
}

/* grid */
:root {
  --cds-grid-columns: 12;
}

/* rhythm */

:root {
  --ll-wrap: 84rem;
  --ll-measure: 32rem;
  --ll-sheet-w: calc(var(--ll-measure) + 3px + var(--ll-gap-lg) + var(--ll-gap-md));
  --ll-measure-wide: 44rem;
  --ll-measure-tight: 26rem;
  --ll-gutter: 1.375rem;

  --ll-y-hero: clamp(4rem, 12vw, 10rem);
  --ll-y-section: clamp(4.5rem, 8vw, 8rem);
  --ll-y-band: clamp(5rem, 11vw, 10rem);
  --ll-y-tight: clamp(2.5rem, 5vw, 4rem);

  --ll-gap-2xs: 0.5rem;
  --ll-gap-xs: 0.75rem;
  --ll-gap-sm: 1.125rem;
  --ll-gap-md: 1.75rem;
  --ll-gap-lg: 2.75rem;
  --ll-gap-xl: 4rem;
  --ll-gap-2xl: 6rem;

  --ll-letter-focus: #d9e8f6;

  --ll-tile-pad: clamp(1.5rem, 3vw, 2.5rem);
  --ll-radius: 0;
  --ll-moon-halo: 0 0 0 1px var(--ll-moon-line);
}
@media (min-width: 42rem) {
  :root { --ll-gutter: 2.25rem; }
}
@media (min-width: 66rem) {
  :root { --ll-gutter: 3.5rem; }
}
