/**
 * Brand: Appholm (appholm.com), by Ether-X.
 *
 * Indigo on navy. The values are the console's own tokens
 * (XeoNote/appholm, control/internal/web/static/css/tokens.css; design pack
 * section 11), so the marketing site and the product read as one thing.
 *
 * The accent sits at a hue of 248 degrees: 26 clear of XeoNote's blue (222)
 * and 12 short of the Ether-X violet (260). It is two cuts of one colour:
 * #5847D6 carries white text on light, #9D8FFF carries navy text on dark.
 * Anything drawn on the action colour uses the text colour paired with it,
 * never a fixed white.
 *
 * The only warm element is the coral connector (#FF8A5B) in the mark. It is
 * never used as an interface colour and is never recoloured, so it appears
 * here only as the mark's own token.
 *
 * No shadows: depth comes from lightness (page, surface, raised).
 */

/* NOTE on selectors: brand overrides use `html:root` (and the two
 * data-theme forms) rather than bare `:root` so they beat the master token
 * defaults in base/type/common.css regardless of CSS bundle order, and beat
 * the `prefers-color-scheme` block in base.css, which scores (0,2,0). */

html:root {
  /* ------------------------------------------------------------------
     Holm Indigo, the Appholm ramp. 50, 200 to 700 and 900 are the
     console's tokens (tint, link hover, link, dark action, action, action
     hover, tint text, dark tint). 100 and 800 are interpolated to complete
     the ramp the shared components expect.
     ------------------------------------------------------------------ */
  --color-holm-50:  #F0EEFF; /* indigo tint (light) */
  --color-holm-100: #E2DEFF;
  --color-holm-200: #CFC8FF; /* link hover (dark) */
  --color-holm-300: #B4A9FF; /* link and focus (dark) */
  --color-holm-400: #9D8FFF; /* action and mark (dark) */
  --color-holm-500: #5847D6; /* Holm Indigo: action and mark (light), brand primary */
  --color-holm-600: #4535B8; /* action hover (light) */
  --color-holm-700: #35289E; /* text on tint (light) */
  --color-holm-800: #2A2177;
  --color-holm-900: #1E1A4F; /* indigo tint (dark) */

  --brand-50:  var(--color-holm-50);
  --brand-100: var(--color-holm-100);
  --brand-200: var(--color-holm-200);
  --brand-300: var(--color-holm-300);
  --brand-400: var(--color-holm-400);
  --brand-500: var(--color-holm-500);
  --brand-600: var(--color-holm-600);
  --brand-700: var(--color-holm-700);
  --brand-800: var(--color-holm-800);
  --brand-900: var(--color-holm-900);

  /* One rgb triple per cut for translucent washes and glows. */
  --brand-rgb: 88, 71, 214;
  --brand-rgb-on-dark: 157, 143, 255;

  --brand-gradient: linear-gradient(135deg, var(--brand-500), var(--brand-400));

  /* The mark: indigo figure, coral connector. */
  --mark-coral: #FF8A5B;

  /* ------------------------------------------------------------------
     Navy and paper: the console's page, surface, raised, border and text
     steps for each theme.
     ------------------------------------------------------------------ */
  --color-navy-950: #070D18; /* page */
  --color-navy-900: #0E1626; /* surface */
  --color-navy-800: #18233A; /* raised */
  --color-navy-750: #1A2538; /* border, subtle */
  --color-navy-700: #22304A; /* border */
  --color-navy-600: #32425F; /* border, strong */
  --color-navy-500: #4B5B78; /* dashed */
  --color-navy-ink: #08142A; /* text on the dark action colour */

  --color-mist-50:  #F5F7FC; /* text */
  --color-mist-200: #C6CEDD; /* text, soft */
  --color-mist-400: #8E9BB3; /* text, muted */

  --color-paper-0:   #FFFFFF; /* surface */
  --color-paper-50:  #F6F8FC; /* page */
  --color-paper-100: #EEF2F9; /* raised */
  --color-paper-150: #E6EBF3; /* border, subtle */
  --color-paper-200: #DDE3EE; /* border */
  --color-paper-300: #C3CCDC; /* border, strong */
  --color-paper-400: #8E9AB0; /* dashed */

  --color-ink-900: #0A1428; /* text */
  --color-ink-700: #2C3A52; /* text, soft */
  --color-ink-500: #4A5870; /* text, muted */
}

/* ------------------------------------------------------------------
   Light theme (the default): navy ink on paper, #5847D6 for action.
   ------------------------------------------------------------------ */
html:root,
html:root[data-theme='light'] {
  --bg-page:     var(--color-paper-50);
  --bg-surface:  var(--color-paper-0);
  --bg-elevated: var(--color-paper-0);
  --bg-muted:    var(--color-paper-100);
  --bg-subtle:   var(--color-paper-100);
  --bg-inverse:  var(--color-navy-950);

  --text-primary:     var(--color-ink-900);
  --text-heading:     var(--color-ink-900);
  --text-body:        var(--color-ink-700);
  --text-secondary:   var(--color-ink-500);
  --text-placeholder: var(--color-ink-500);
  --text-disabled:    var(--color-paper-400);
  --text-inverse:     var(--color-paper-0);
  --text-link:        var(--brand-500);
  --text-link-hover:  var(--brand-600);

  --border-default: var(--color-paper-200);
  --border-strong:  var(--color-paper-300);
  --border-subtle:  var(--color-paper-150);
  --border-focus:   var(--brand-500);

  --interactive-primary:       var(--brand-500);
  --interactive-primary-hover: var(--brand-600);
  --interactive-primary-text:  var(--color-paper-0);
  --interactive-ghost:         var(--brand-500);
  --interactive-ghost-hover:   var(--brand-50);

  --tint-bg:   var(--brand-50);
  --tint-text: var(--brand-700);

  --gradient-brand-subtle: linear-gradient(180deg, var(--color-paper-50), var(--brand-50));

  /* Status pills: words always, colour as well (never colour alone). */
  --status-good-bg:        #ECFDF5;
  --status-good-text:      #047857;
  --status-review-bg:      #FBF0D9;
  --status-review-text:    #6B4500;
  --status-attention-bg:   #FEF2F2;
  --status-attention-text: #B91C1C;
  --status-neutral-bg:     var(--color-paper-100);
  --status-neutral-text:   var(--color-ink-700);

  --eyebrow-color: var(--brand-500);
  --emphasis-ink:  var(--brand-500);
}

/* ------------------------------------------------------------------
   Dark theme, and the navy band. `.band-navy` is a section that stays
   dark in both themes (the header, heroes and the closing band), so it
   takes the dark values wherever it appears.
   ------------------------------------------------------------------ */
html:root[data-theme='dark'],
.band-navy {
  --bg-page:     var(--color-navy-950);
  --bg-surface:  var(--color-navy-900);
  --bg-elevated: var(--color-navy-800);
  --bg-muted:    var(--color-navy-800);
  --bg-subtle:   var(--color-navy-900);
  --bg-inverse:  var(--color-paper-50);

  --text-primary:     var(--color-mist-50);
  --text-heading:     var(--color-mist-50);
  --text-body:        var(--color-mist-200);
  --text-secondary:   var(--color-mist-400);
  --text-placeholder: var(--color-mist-400);
  --text-disabled:    var(--color-navy-500);
  --text-inverse:     var(--color-ink-900);
  --text-link:        var(--brand-300);
  --text-link-hover:  var(--brand-200);

  --border-default: var(--color-navy-700);
  --border-strong:  var(--color-navy-600);
  --border-subtle:  var(--color-navy-750);
  --border-focus:   var(--brand-300);

  --interactive-primary:       var(--brand-400);
  --interactive-primary-hover: var(--brand-300);
  --interactive-primary-text:  var(--color-navy-ink);
  --interactive-ghost:         var(--brand-300);
  --interactive-ghost-hover:   var(--color-navy-800);

  --tint-bg:   var(--brand-900);
  --tint-text: #D2CCFF;

  --gradient-brand-subtle: linear-gradient(180deg, var(--color-navy-950), var(--color-navy-900));

  --status-good-bg:        #052E22;
  --status-good-text:      #6EE7B7;
  --status-review-bg:      #2B1F06;
  --status-review-text:    #FCD34D;
  --status-attention-bg:   #2A0F12;
  --status-attention-text: #FCA5A5;
  --status-neutral-bg:     var(--color-navy-800);
  --status-neutral-text:   var(--color-mist-200);

  --eyebrow-color: var(--brand-300);
  --emphasis-ink:  var(--brand-400);
}

/* ------------------------------------------------------------------
   Personality: a calm, left-aligned hero on navy, Plus Jakarta Sans 700
   headings, radius 8 for buttons and 12 for cards, no shadows.
   ------------------------------------------------------------------ */
html:root {
  --hero-align: left;
  --hero-content-margin: 0;
  --hero-cta-justify: flex-start;
  --hero-pad-top: var(--space-16);
  --hero-pad-bottom: var(--space-20);
  --hero-heading-size: clamp(2.25rem, 4vw, 3.25rem);
  --hero-heading-max: 21ch;
  --hero-sub-max: 46ch;

  --display-weight: var(--font-weight-bold);
  --display-leading: 1.08;
  --display-tracking: -0.02em;

  --section-rhythm: var(--space-20);
  --radius-btn: var(--radius-lg);   /* 8 */
  --radius-card: var(--radius-xl);  /* 12 */
  /* The shared blocks draw their inputs and buttons at --radius-md (6 in
     the master tokens). Appholm's controls are 8, in the product and here. */
  --radius-md: 8px;

  --btn-shadow: none;
  --btn-shadow-hover: none;
  --card-shadow: none;

  --eyebrow-font: var(--font-body);

  /* Emphasised heading spans take the accent as a flat colour, not a
     gradient. The shared Emphasis component paints through a gradient, so
     the flat colour is given as a one-stop gradient. */
  --emphasis-gradient: linear-gradient(var(--emphasis-ink), var(--emphasis-ink));
}
