:root {
  /* colour */
  --wc-color-surface: #0A0F1E;
  --wc-color-surface-raised: #121A30;
  --wc-color-line: rgba(255,255,255,0.12);
  --wc-color-text: #F3F6FC;
  --wc-color-text-muted: #9AA7BD;
  --wc-color-accent: #08DDBD;
  --wc-color-on-accent: #0A0F1E;
  --wc-color-brand: #0057B8;
  --wc-color-positive: #34D399;
  --wc-color-negative: #F87171;
  --wc-color-scrim: rgba(5,8,16,0.64);
  --wc-color-team: var(--wc-color-accent); /* set at card load from host config team_color */
  /* The scratch foil and its gold, as colours rather than literals, so a theme can restyle them (K-THM-06) */
  --wc-color-foil-light: #E9ECF1;
  --wc-color-foil-mid: #B8BEC8;
  --wc-color-foil-dark: #A7AEBA;
  --wc-color-foil-ink: #5B6472;
  --wc-color-gold-light: #F5D78E;
  --wc-color-gold-dark: #C99A2E;
  --wc-color-gold-edge: #A9801F;
  --wc-color-gold-bright: #F7DD8F;
  --wc-color-gold-mid: #D9A93A;
  --wc-color-gold-deep: #B9862A;
  --wc-color-gold-glint: #FBE7A8;
  --wc-color-gold-ink: #6B4A0E;
  --wc-color-glint: #FFFFFF; /* a light tint, drawn at low opacity */
  --wc-color-shade: #000000; /* a dark tint, drawn at low opacity */
  /* presence glyph (HUB-23): later, not FWV */
  --wc-presence-venue: #F3F6FC;
  --wc-presence-home: #9AA7BD;
  --wc-presence-eligible: #FFB547;
  --wc-presence-unconfirmed: #9AA7BD;
  /* containers */
  --wc-container-bg: rgba(255,255,255,0.06);
  --wc-container-border: rgba(255,255,255,0.12);
  --wc-container-label: #9AA7BD;
  /* type */
  --wc-font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wc-font-size-xs: 12px;
  --wc-font-size-s: 14px;
  --wc-font-size-m: 16px;
  --wc-font-size-l: 20px;
  --wc-font-size-xl: 28px;
  --wc-font-weight-regular: 400;
  --wc-font-weight-bold: 700;
  --wc-line-height-tight: 1.2;
  --wc-line-height-base: 1.45;
  /* spacing */
  --wc-space-1: 4px;
  --wc-space-2: 8px;
  --wc-space-3: 12px;
  --wc-space-4: 16px;
  --wc-space-5: 24px;
  --wc-space-6: 32px;
  /* radius */
  --wc-radius-s: 8px;
  --wc-radius-m: 12px;
  --wc-radius-l: 20px;
  --wc-radius-full: 999px;
  /* anchor and frame */
  --wc-anchor-size: 28px; /* the FRS mark's height; its width follows the artwork */
  --wc-anchor-mark-glow: drop-shadow(1px 0 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 1px 0 #fff) drop-shadow(0 -1px 0 #fff) drop-shadow(0 0 8px rgba(255,255,255,0.28)); /* a thin white outline, then a soft halo: the black mark stands out on dark surfaces */
  --wc-anchor-dim-opacity: 0.4;
  --wc-anchor-hit: 44px;
  --wc-frame-bar-height: 52px;
  /* motion */
  --wc-motion-fast: 150ms;
  --wc-motion-base: 300ms;
  --wc-motion-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  /* elevation */
  --wc-shadow-raised: 0 8px 24px rgba(0,0,0,0.4);
  --wc-shadow-sheet: none; /* the sheet's own edge; Plain separates it with the scrim, so none */
  /* material (K-THM-02): what a surface is made of. These defaults are the Plain theme; a theme overrides them whole */
  --wc-rule: 1px solid var(--wc-color-line); /* a hairline: the frame bar, a toast, a payoff */
  --wc-divider: 1px solid var(--wc-color-line); /* between rows and sections */
  --wc-edge-bare: 0; /* the border of a surface that has none by default: the sheet, the break card, the stat card */
  --wc-fill-raised: var(--wc-color-surface-raised); /* a raised surface's background */
  --wc-fill-feature: linear-gradient(135deg, var(--wc-color-team), var(--wc-color-surface-raised)); /* the hero and the experience tile */
  --wc-fill-hero: var(--wc-fill-feature); /* the Welcome hero alone */
  --wc-fill-pill: color-mix(in srgb, var(--wc-color-surface-raised) 88%, transparent); /* the compact frame's anchor */
  --wc-blur: blur(12px); /* backdrop-filter behind the compact anchor */
  --wc-numerals: normal; /* font-variant-numeric */
  --wc-label-tracking: normal; /* letter-spacing on labels and captions */
  --wc-radius-button: var(--wc-radius-full);
  --wc-anim-sheet: wc-slide; /* keyframes: the sheet comes in */
  --wc-anim-panel: wc-rise; /* keyframes: the payoff and the break card come in */
  --wc-anim-toast: wc-toast; /* keyframes: a toast comes and goes */
}

/* Theme 1, Plain: the Kit's look before themes. It overrides nothing: every value is the default in ../styles/tokens.css. */
:root[data-theme="plain"] {
}

/* Theme 2, Ticket Stock (build list 4.3). Opaque and matte where Plain is glass: no blur and no translucency in a surface,
   crisp hairline rules, tighter corners, perforated dividers, tabular numerals, a thin gradient stripe and short mechanical motion.
   It keeps the dark ground and the team-to-brand gradient, so it reads as the same family as L2. */
:root[data-theme="ticket-stock"] {
  /* colour: solid ground, solid stock, a solid rule colour */
  --wc-color-surface: #0A0F1E;
  --wc-color-surface-raised: #151D34;
  --wc-color-line: #38456A;
  --wc-color-text: #F6F7FB;
  --wc-color-text-muted: #A9B4C9;
  --wc-color-scrim: transparent; /* no scrim: a sheet or dialog stands on its own rule and shadow, and the page behind stays visible */
  --wc-container-bg: #101830;
  --wc-container-border: #38456A;
  --wc-container-label: #A9B4C9;

  /* corners */
  --wc-radius-s: 2px;
  --wc-radius-m: 3px;
  --wc-radius-l: 4px;
  --wc-radius-button: 4px;

  /* edges */
  --wc-rule: 1px solid var(--wc-color-line);
  --wc-divider: 2px dotted var(--wc-color-line); /* the perforation between sections */
  --wc-edge-bare: 1px solid var(--wc-color-line);
  --wc-shadow-raised: 0 3px 0 #04070F; /* a hard offset, no blur */
  --wc-shadow-sheet: 0 -3px 0 #04070F; /* the sheet's hard offset, cast upward */
  --wc-anchor-mark-glow: drop-shadow(1px 0 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 1px 0 #fff) drop-shadow(0 -1px 0 #fff); /* the outline only, no halo */

  /* material: solid fills, and the gradient only as a stripe along the top edge */
  --wc-fill-raised: linear-gradient(90deg, var(--wc-color-team), var(--wc-color-brand)) top / 100% 3px no-repeat, var(--wc-color-surface-raised);
  --wc-fill-feature: linear-gradient(90deg, var(--wc-color-team), var(--wc-color-brand)) top / 100% 4px no-repeat, var(--wc-color-surface-raised);
  --wc-fill-hero: linear-gradient(135deg, var(--wc-color-team), var(--wc-color-surface-raised)); /* the one gradient fill: the Welcome hero */
  --wc-fill-pill: var(--wc-color-surface-raised);
  --wc-blur: none;

  /* numbers and labels */
  --wc-numerals: tabular-nums;
  --wc-label-tracking: 0.06em;

  /* motion: short and mechanical */
  --wc-motion-fast: 90ms;
  --wc-motion-base: 180ms;
  --wc-motion-ease: cubic-bezier(0.6, 0, 0.2, 1);
  --wc-anim-sheet: wc-slide;
  --wc-anim-panel: wc-tear;
  --wc-anim-toast: wc-toast-snap;
}
