/* htw-style v1.2.0 · sha256 9c8b4a5a816b6e9d8c471ec0d570fc52527cf3684e071d1a3af5bad10413a460 · DO NOT EDIT: change HTW-Infra/htw-style and re-sync */
/* htw-style: htw.css. The HTW tokens and base styles, framework-agnostic.

   STYLE-GUIDE.md is the spec and says why each value is what it is. The tokens are copied
   from the HTW Design System (tokens/htw-ds-tokens.css); change a value there first.

   Load order: Bootstrap (if the app uses it), then this file, then htw-bootstrap.css.
   Element styles here sit inside :where(), so they have no specificity: they style a plain
   page, and any framework class still wins over them.

   Rules for this file: no @import, no web fonts, no url() except data:, no JavaScript.
   It must work under every app's strict CSP. Relative colour syntax always has a plain
   fallback in front of it. */

:root {
  --font-sans: Arial, "Helvetica Neue", Helvetica, "Liberation Sans", sans-serif;

  /* Colour: brand (DS tokens/colors.css) */
  --htw-blue: #0070C0;
  --htw-cyan: #009FE3;
  --htw-cyan-mid: #0091D6;
  --htw-navy: #05193A;
  --htw-blue-100: #E6F3FC;   /* --hover-tint */
  --htw-blue-200: #CADFF2;
  --htw-ink: #171717;
  --htw-slate: #5A6570;
  --htw-neutral-50: #F4F7F9;
  --htw-neutral-200: #E4EBF0;
  --htw-neutral-300: #D3DDE4;
  --htw-destructive: #E7000B;

  /* Colour: steps derived for states, not DS tokens */
  --htw-blue-600: #0063AA;          /* nav tab hover */
  --htw-blue-700: #005C9E;          /* pressed, current nav tab, link hover */
  --htw-destructive-text: #C10007;  /* danger as text, and the danger button's M */
  --htw-input-border: #8A96A3;      /* input and checkbox boundary, 3.01:1 */
  --htw-success: #157347;           /* the success button's M */
  --htw-warning: #FFC107;           /* the warning button's M */

  /* Colour: status as text, each on white or on its own tint, 4.5:1 or better (1.2.0) */
  --htw-success-text: #157347;
  --htw-success-tint: #E8F5EC;
  --htw-warning-text: #8A5A00;
  --htw-warning-tint: #FFF4D6;
  --htw-destructive-tint: #FDECEC;  /* text on it is --htw-destructive-text */
  --htw-info-text: #00668F;
  --htw-info-tint: #E5F5FC;

  /* Colour: charts (1.2.0). Five categorical series, every pair distinct for normal
     vision and deuteranopes. Not the DS's --chart-*, which are a blue ramp. */
  --chart-1: #009FE3;   /* HTW cyan */
  --chart-2: #EE6438;
  --chart-3: #6250D6;
  --chart-4: #1BAF7A;
  --chart-5: #DBA91B;

  /* Colour: divisions (HTW_Guidelines.pdf 2.7) and Cool Grey 8. Brand colours that name
     a division, not a chart palette: Residential and Rural look alike to deuteranopes. */
  --htw-residential: #F28E00;       /* Pantone 144 */
  --htw-rural: #9DC430;             /* Pantone 375 */
  --htw-commercial: #4A2178;        /* Pantone 268 */
  --htw-environmental: #E50052;     /* Pantone 206 */
  --htw-cool-grey-8: #8E9095;
  --htw-commercial-light: #7A5AA8;  /* a second Commercial series */
  --htw-environmental-light: #F06FA0; /* a second Environmental series */

  /* Shape (DS tokens/surfaces.css) */
  --radius: .625rem;         /* buttons */
  --radius-sm: 8px;          /* inputs, selects, dropdowns, nav tabs */
  --radius-md: 12px;         /* alerts */
  --radius-lg: 16px;         /* cards, panels, list groups */
  --radius-full: 999px;      /* badges */

  /* Elevation: navy-tinted, never black */
  --shadow-1: 0 1px 2px rgba(16,42,66,.10), 0 1px 3px 1px rgba(16,42,66,.06);
  --shadow-2: 0 1px 2px rgba(16,42,66,.10), 0 2px 6px 2px rgba(16,42,66,.07);
  --shadow-3: 0 1px 3px rgba(16,42,66,.10), 0 4px 8px 3px rgba(16,42,66,.07);

  /* Motion */
  --duration-fast: 150ms;
  --ease-standard: cubic-bezier(.2,0,0,1);
  --press-shift: 1px;
  --focus-ring: 0 0 0 2px #fff, 0 0 0 3.5px var(--htw-cyan-mid);
}

/* --- Base. The page is the DS panel grey; cards and inputs are white on it. */
:where(body) { margin: 0; font-family: var(--font-sans); font-size: 1rem; line-height: 1.5;
               color: var(--htw-ink); background: var(--htw-neutral-50); }
:where(p, li, figcaption, .htw-card) { text-wrap: pretty; }
:where(h1, h2, h3, h4, h5, h6) { font-weight: 700; line-height: 1.2; text-wrap: balance; }
:where(a) { color: var(--htw-blue); text-decoration: underline; text-underline-offset: 2px; }
:where(a):hover { color: var(--htw-blue-700); }
:where(summary) { cursor: pointer; }
/* Keyboard focus: a cyan-mid ring (3.49:1 on white), never the DS cyan (2.97:1). */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--htw-cyan-mid); outline-offset: 2px; }

/* --- Tables. Header xs bold slate, hairline rows, tabular figures. */
:where(table) { border-collapse: collapse; font-variant-numeric: tabular-nums; }
:where(th, td) { padding: .5rem; text-align: left; border-bottom: 1px solid var(--htw-neutral-200); }
:where(thead th) { font-size: .75rem; font-weight: 700; color: var(--htw-slate); }
:where(tbody tr:hover > *) { background: var(--htw-neutral-50); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* --- Forms, for pages without a framework. Put the label above the field in a
   .htw-label; a bare <label> is left alone so checkbox labels stay regular weight. */
.htw-label { display: block; margin-bottom: .25rem; font-weight: 700; }
.htw-hint { display: block; margin-top: .25rem; font-size: .875rem; color: var(--htw-slate); }
.htw-error { display: block; margin-top: .25rem; font-size: .875rem; font-weight: 700;
             color: var(--htw-destructive-text); }
:where(input:not([type=checkbox], [type=radio], [type=submit], [type=button], [type=reset]),
       select, textarea) {
  font: inherit; color: var(--htw-ink); background: #fff;
  border: 1px solid var(--htw-input-border); border-radius: var(--radius-sm);
  padding: .375rem .75rem; }
:where(input, select, textarea):focus-visible {
  outline: 0; border-color: var(--htw-cyan-mid); box-shadow: 0 0 0 3px rgba(0,145,214,.25); }
:where(input, select, textarea)[aria-invalid=true] { border-color: var(--htw-destructive); }
:where(input[type=checkbox], input[type=radio]) { accent-color: var(--htw-blue); }
::placeholder { color: var(--htw-slate); opacity: 1; }

/* --- Surfaces, for pages without a framework. */
.htw-container { max-width: 1200px; margin: 1.5rem auto; padding-inline: 1rem; }
.htw-card { background: #fff; border: 1px solid var(--htw-neutral-200);
            border-radius: var(--radius-lg); box-shadow: var(--shadow-1); padding: 1rem; }
.htw-badge { display: inline-block; padding: .25em .6em; font-size: .75em; font-weight: 700;
             line-height: 1; border-radius: var(--radius-full); font-variant-numeric: tabular-nums;
             color: #fff; background: var(--htw-blue); }

/* --- Buttons, for pages without Bootstrap. The same recipe as htw-bootstrap.css; the
   style guide's "button rule" is the spec.

   .htw-btn alone is the DS "outline" (everyday actions). A filled variant sets only its
   main colour M (--btn-base), its flat fallback and hover (--btn-flat, --btn-flat-hover)
   and its label colour. A browser without relative colour syntax drops the gradient and
   the glow (their declarations are invalid there) and draws the flat colour. */
.htw-btn { display: inline-flex; align-items: center; justify-content: center; gap: .375rem;
  min-height: 2.25rem; padding: .5rem .875rem; box-sizing: border-box;
  font: 700 .875rem/1.25 var(--font-sans); text-decoration: none; white-space: nowrap;
  color: var(--htw-ink); background-color: #fff;
  border: 1px solid var(--htw-neutral-300); border-radius: var(--radius); cursor: pointer;
  transition: color var(--duration-fast) var(--ease-standard),
              background-color var(--duration-fast) var(--ease-standard),
              border-color var(--duration-fast) var(--ease-standard),
              box-shadow var(--duration-fast) var(--ease-standard),
              translate var(--duration-fast) var(--ease-standard); }
.htw-btn:hover { color: var(--htw-blue-700); background-color: var(--htw-blue-100);
                 border-color: var(--htw-blue-200); }
.htw-btn:active { color: var(--htw-navy); background-color: var(--htw-blue-200);
                  translate: 0 var(--press-shift); box-shadow: inset 0 2px 4px #0004; }
.htw-btn:focus-visible { outline: 0; box-shadow: var(--focus-ring); }
.htw-btn:disabled, .htw-btn[aria-disabled=true] { opacity: .65; pointer-events: none;
                                                   translate: none; box-shadow: none; }
.htw-btn-sm { min-height: 2rem; padding: .375rem .75rem; font-size: .75rem; }
.htw-btn-lg { min-height: 2.75rem; padding: .625rem 1.125rem; font-size: 1rem; }

/* A round button with only an icon (1.2.0). Add it to a .htw-btn of any variant. It has
   no visible text, so it needs an aria-label. Its size is layout: an app may set
   --btn-icon-size, and nothing else. */
.htw-btn-icon { --btn-icon-size: 2.25rem; inline-size: var(--btn-icon-size);
  block-size: var(--btn-icon-size); min-height: 0; padding: 0; border-radius: var(--radius-full); }
.htw-btn-icon.htw-btn-sm { --btn-icon-size: 2rem; }
.htw-btn-icon.htw-btn-lg { --btn-icon-size: 2.75rem; }
.htw-btn-icon > svg { inline-size: 55%; block-size: 55%; flex: none; }

.htw-btn-outline { color: var(--htw-blue); border-color: var(--htw-blue); }
.htw-btn-outline:hover { color: var(--htw-blue-700); border-color: var(--htw-blue); }
.htw-btn-outline:active { color: #fff; background-color: var(--htw-blue); border-color: var(--htw-blue); }
.htw-btn-outline-danger { color: var(--htw-destructive-text); border-color: var(--htw-destructive); }
.htw-btn-outline-danger:hover { color: #fff; background-color: var(--htw-destructive);
                                border-color: var(--htw-destructive); }
.htw-btn-outline-danger:active { color: #fff; background-color: var(--htw-destructive-text);
                                 border-color: var(--htw-destructive-text); }

/* THE button rule: top = M + .045 L (chroma x.93), bottom = M - .045 L, glow = bottom at
   60%; white highlight 35%, black edge 20%, black contact 40%; hover is M - .05 L. */
.htw-btn-primary, .htw-btn-secondary, .htw-btn-success,
.htw-btn-danger, .htw-btn-warning, .htw-btn-info {
  --btn-bg: var(--btn-base);
  --btn-raise: inset 0 1px 0 #ffffff59, inset 0 -2px 0 #0003, 0 1px 2px #0006,
               0 8px 24px -6px oklch(from var(--btn-bg) calc(l - .045) c h / .6);
  color: var(--btn-label); background-color: var(--btn-flat); border-color: transparent;
  background-origin: border-box;
  background-image: linear-gradient(oklch(from var(--btn-bg) calc(l + .045) calc(c * .93) h),
                                    oklch(from var(--btn-bg) calc(l - .045) c h));
  box-shadow: var(--btn-raise);
}
.htw-btn-primary:hover, .htw-btn-secondary:hover, .htw-btn-success:hover,
.htw-btn-danger:hover, .htw-btn-warning:hover, .htw-btn-info:hover,
.htw-btn-primary[aria-pressed=true], .htw-btn-secondary[aria-pressed=true],
.htw-btn-success[aria-pressed=true], .htw-btn-danger[aria-pressed=true],
.htw-btn-warning[aria-pressed=true], .htw-btn-info[aria-pressed=true] {
  --btn-bg: oklch(from var(--btn-base) calc(l - .05) c h);
  color: var(--btn-label); background-color: var(--btn-flat-hover); border-color: transparent; }
.htw-btn-primary:active, .htw-btn-secondary:active, .htw-btn-success:active,
.htw-btn-danger:active, .htw-btn-warning:active, .htw-btn-info:active {
  color: var(--btn-label); background-color: var(--btn-flat-hover); box-shadow: inset 0 2px 4px #0004; }
.htw-btn-primary:focus-visible, .htw-btn-secondary:focus-visible, .htw-btn-success:focus-visible,
.htw-btn-danger:focus-visible, .htw-btn-warning:focus-visible, .htw-btn-info:focus-visible {
  box-shadow: var(--focus-ring), var(--btn-raise); }

.htw-btn-primary   { --btn-base: var(--htw-blue);  --btn-flat: #0070C0; --btn-flat-hover: #0061B0; --btn-label: #fff; }
.htw-btn-secondary { --btn-base: var(--htw-slate); --btn-flat: #5A6570; --btn-flat-hover: #4C5762; --btn-label: #fff; }
.htw-btn-success   { --btn-base: var(--htw-success); --btn-flat: #157347; --btn-flat-hover: #006439; --btn-label: #fff; }
.htw-btn-danger    { --btn-base: var(--htw-destructive-text); --btn-flat: #C10007; --btn-flat-hover: #AF0000; --btn-label: #fff; }
.htw-btn-warning   { --btn-base: var(--htw-warning); --btn-flat: #FFC107; --btn-flat-hover: #EEB100; --btn-label: #000; }
.htw-btn-info      { --btn-base: var(--htw-cyan);  --btn-flat: #009FE3; --btn-flat-hover: #008FD2; --btn-label: #000; }

@media (prefers-reduced-motion: reduce) {
  .htw-btn { transition: none; }
}
