﻿/* kc-v2 v1.5.7 -- base */
/*
 * kc-v2 component library -- shared base.
 *
 * This file holds everything that isn't owned by one specific component:
 * fonts, generic utilities, and layout primitives. Each component lives in
 * its own kc-v2-<component>.css (buttons, forms, alerts, badges, cards,
 * tables, pagination, accordion, tabs, navigation) -- see README.md for the
 * full file list and the class contract these all share.
 *
 * Conventions every kc-v2 file follows (see README.md for the full contract):
 *   1. Zero !important. Host neutralization, if ever needed, lives in a
 *      separate kc-v2-host-overrides.css that is NOT part of this contract.
 *   2. No unscoped bare element selectors (".kc-v2-table th" is fine; a bare "th" is not).
 *   3. No required wrapper root -- each container component ships its own descendant
 *      reset (".kc-v2-card *, .kc-v2-card *::before, .kc-v2-card *::after { box-sizing: border-box }").
 *   4. State hooks: native/ARIA attribute first ([aria-expanded], :disabled, [readonly]);
 *      "--modifier" classes for visual variants only.
 *   5. Declare every property at every state the host might target
 *      (:hover, :focus, :focus-visible, :active, :visited, [disabled], [readonly]).
 *   6. Never style a host-owned class name unscoped (e.g. ".validationMessage" must be
 *      ".kc-v2-field .validationMessage").
 *   7. Focus ring via outline, never box-shadow (box-shadow is discarded in forced-colors mode).
 *   8. Icons: inline SVG with fill="currentColor" / stroke="currentColor". No icon font.
 *   9. type="button" is mandatory on every non-submit <button class="kc-v2-btn">.
 *  10. logical properties (padding-inline, text-align: start) where free; physical for
 *      radius/shadow.
 *  11. An ELEMENT-QUALIFIED base rule ("input.kc-v2-input", "button.kc-v2-tag") must declare only
 *      properties that no "--modifier" owns. Qualifying raises specificity to (0,1,1), which
 *      outranks every (0,1,0) modifier of the same component -- so a colour set on the qualified
 *      base silently defeats all of its own variants. Qualify to win against a HOST rule; keep
 *      variant-owned properties (colour, fill, size) on the unqualified selector.
 *      Learned twice in KENT-44: "button.kc-v2-tag" set background-color and every Gross/Net/None
 *      tag measured the same ink-100 fill, and ".kc-v2-table__cell--total" lost its blue to
 *      ".kc-v2-table tfoot td". Neither is visible in a class-based assertion -- assert the
 *      computed value.
 *
 * Each component file's own @media (prefers-reduced-motion)/(forced-colors)/print
 * overrides live NEXT TO that component's base rules, not centralized here --
 * co-location keeps a component's full behavior (light styling + every
 * hardening pass) in one place. This file's own print rule below is the one
 * exception, since .kc-v2-no-print is a cross-cutting utility, not a component.
 *
 * Load order: kc-v2-tokens.css, then this file, then the component files (any
 * order among those is fine -- nothing here depends on another component
 * file's rules loading before or after it), all AFTER any host CSS (Bootstrap,
 * site-redesign.css, etc.) -- see README.md for why.
 */

/* ---------------------------------------------------------------------------
 * Fonts
 * Self-hosted, subset to latin + latin-ext (unsubsetted Montserrat also carries
 * Cyrillic and Vietnamese, ~5x the bytes for nothing on this site).
 * Variable font (weight 400-800 in a single file per subset) confirmed to carry the
 * 'tnum' OpenType feature (spike 0.2) -- font-variant-numeric: tabular-nums works.
 * ------------------------------------------------------------------------- */

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/montserrat-variable-latin.woff2") format("woff2-variations"),
       url("fonts/montserrat-variable-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/montserrat-variable-latin-ext.woff2") format("woff2-variations"),
       url("fonts/montserrat-variable-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------------------------------------------------------------------------
 * Utilities
 * ------------------------------------------------------------------------- */

.kc-v2-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.kc-v2-skip-link {
  position: absolute;
  top: -1000px;
  left: 0;
  z-index: var(--kc-v2-z-tooltip);
  padding: var(--kc-v2-space-2) var(--kc-v2-space-3);
  background-color: var(--kc-v2-blue);
  color: var(--kc-v2-white);
  font-family: var(--kc-v2-font-family);
  font-size: var(--kc-v2-body-size);
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 var(--kc-v2-radius-sm) 0;
}

.kc-v2-skip-link:visited {
  color: var(--kc-v2-white);
}

.kc-v2-skip-link:focus,
.kc-v2-skip-link:focus-visible {
  top: 0;
  outline: var(--kc-v2-focus-ring-width) solid var(--kc-v2-focus-ring-color);
  outline-offset: 2px;
}

/* .kc-v2-no-print is a hook a page applies to anything it wants hidden from a
   printed page, alongside whatever each component's own print rule already
   hides -- kc-v2 doesn't assume its own chrome components are the only things
   a page ever wants to keep off paper. */
@media print {
  .kc-v2-no-print {
    display: none;
  }
}

/* ---------------------------------------------------------------------------
 * Layout primitives
 * A minimal alternative to Bootstrap's grid so a converted screen is not forced to
 * keep col-xs-* forever. Fluid widths -- the page shell may stay fixed-width, but
 * these primitives themselves do not assume one.
 * ------------------------------------------------------------------------- */

/* margin: 0 covers the stack's OWN outer margin, not just its children's. A stack is often a <ul>
   (or <p>, <dl>), and every host has an opinion about those: UA `1em 0`, Bootstrap `0 0 10px`. So
   the space *around* a stack was host-determined even after its inner gaps were fixed. No-op when
   the stack is a <div>, which has no UA margin. KENT-44 audit. */
.kc-v2-stack {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  max-width: 100%;
  margin: 0;
}

/* A stack owns the spacing between its children, via `gap`. A child that brings its own
   block margin -- a host's `p { margin-bottom: 10px }`, a UA default on a heading -- would
   add to that gap, so the result would depend on which element the page happened to choose
   rather than on the stack's declared spacing. Zeroed here so `gap` is the single source.
   Physical properties rather than `margin-block`, for the older engines these public pages
   still see.

   A component that declares its own margin still wins: kc-v2-base.css always loads before
   the component files (README, Loading order), so e.g. .kc-v2-helper-text's 4px margin-top
   -- the deliberate tight relationship between a note and the thing it annotates -- is
   applied after this and survives. */
/* The inline margins are zeroed too, not just the block ones. Community.css ships a bare
   `li { margin-left: 20px }` that applies DIRECTLY to the child, so a <ul class="kc-v2-stack">
   was indenting its items by 20px on every Community page -- the same failure mode KENT-59 fixed
   for the header/footer lists, reaching a different component. margin-left is not an inherited
   property, so nothing on the parent could have opposed it. Measured, KENT-44 audit. */
.kc-v2-stack > * {
  box-sizing: border-box;
  margin-top: 0;
  margin-bottom: 0;
  margin-left: 0;
  margin-right: 0;
}

.kc-v2-stack--gap-1 { gap: var(--kc-v2-space-1); }
.kc-v2-stack--gap-2 { gap: var(--kc-v2-space-2); }
.kc-v2-stack--gap-3 { gap: var(--kc-v2-space-3); }
.kc-v2-stack--gap-4 { gap: var(--kc-v2-space-4); }
.kc-v2-stack--gap-5 { gap: var(--kc-v2-space-5); }
.kc-v2-stack--gap-6 { gap: var(--kc-v2-space-6); }

/* Alignment along the stack's main axis -- on a --row stack this right-aligns a Back/Next pair
   (KENT-44 1.2.0). A modifier on the existing component rather than a standalone utility class, so
   there is one way to lay out a row of controls. */
.kc-v2-stack--end   { justify-content: flex-end; }
.kc-v2-stack--between { justify-content: space-between; }

/* Cross-axis: children of a column stack keep their content width instead of stretching. */
.kc-v2-stack--align-start { align-items: flex-start; }

.kc-v2-stack--row {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
}

.kc-v2-grid {
  display: grid;
  box-sizing: border-box;
  max-width: 100%;
  gap: var(--kc-v2-space-3);
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
}

.kc-v2-grid > * {
  box-sizing: border-box;
  min-width: 0;
}

.kc-v2-grid--gap-2 { gap: var(--kc-v2-space-2); }
.kc-v2-grid--gap-4 { gap: var(--kc-v2-space-4); }

/* Each item takes its natural height instead of stretching to the tallest (KENT-44 1.2.0).
   The default `stretch` is right for cards that should read as a matched set; it is wrong when one
   item is much taller than the others -- the annual return's summary trio put ~400px of empty white
   inside the ACCOUNT card to match the length of the instructions beside it. */
.kc-v2-grid--top { align-items: start; }

/* Wrapping card grid.
 *
 * The base .kc-v2-grid uses minmax(0, 1fr), which means auto-fit never actually wraps --
 * a 1fr track always "fits", so N items always land on one row however narrow the
 * viewport. That is right for a fixed set of equal columns and wrong for a variable
 * number of cards, which is what the Community home page has: three cards are always
 * shown and four more are behind app settings, so the count ranges from 3 to 7.
 *
 * 320px is chosen so a desktop content column (~1240px) yields three across, matching the
 * Figma landing page, then degrades to two and one. min(100%, 320px) rather than a bare
 * 320px: below the track minimum, a bare value makes the track overflow its container
 * instead of shrinking, which is the classic auto-fit horizontal-scroll bug.
 */
/* No align-items override: the default `stretch` is what makes every card in a row share
   the tallest one's height, which is how the Figma landing page draws them. An earlier
   version set `start`, which shrank each card to its own content and left the row edges
   ragged whenever one card had an extra line (the File Taxes card's "Forgot Account #?"). */
.kc-v2-grid--cards {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

/* ---------------------------------------------------------------------------
 * Two-column page layout (KENT-44 1.2.0)
 *
 * The base .kc-v2-grid uses minmax(0, 1fr), which never wraps -- a 1fr track always "fits", so
 * two children stay side by side however narrow the viewport. This uses the same
 * minmax(min(100%, N), 1fr) trick as .kc-v2-grid--cards: two columns while there is room for
 * 420px each, one column below that, with no media query. min() is what stops the 420px floor
 * from itself overflowing a 375px screen.
 * ------------------------------------------------------------------------- */
.kc-v2-grid--2col {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  align-items: start;
}

/* ---------------------------------------------------------------------------
 * Text primitives
 *
 * These exist because a bare <p> or <ul> on a Community page inherits site.css's body type and
 * Bootstrap's paragraph margins -- so unstyled copy inside an otherwise-converted screen renders
 * at 12.5px Segoe UI next to 14px Montserrat. Declaring them keeps a converted page's text under
 * the library's control without the page reaching for a host class.
 * ------------------------------------------------------------------------- */

/* A page-level intro line, e.g. "Please complete the following screens." */
/* Page title (1.5.0, KENT-56).
 *
 * The --kc-v2-h1-* tokens have existed since 1.0.0 with nothing consuming them: Home builds its
 * hierarchy from card titles, and Annual and Quarterly use a bare `<h2 id="pageTitle">` whose size
 * comes from the host's site.css. The Business License Application frame (node 100:545) is the first
 * to show a real page-level title, so this is the class that finally spends those tokens.
 *
 * Declares color explicitly: site.css styles bare `h1` and would otherwise supply it. */
.kc-v2-page-title {
  margin: 0;
  color: var(--kc-v2-ink-900);
  font-family: var(--kc-v2-font-family);
  font-size: var(--kc-v2-h1-size);
  font-weight: var(--kc-v2-h1-weight);
  line-height: var(--kc-v2-h1-line-height);
  letter-spacing: var(--kc-v2-h1-letter-spacing);
}

/* 38px with -0.8px tracking is set for a desktop measure; at 375px it costs two lines and crowds
   everything under it. Stepped to the h2 scale, which still reads as the page's largest text. */
@media (max-width: 640px) {
  .kc-v2-page-title {
    font-size: var(--kc-v2-h2-size);
    line-height: var(--kc-v2-h2-line-height);
    letter-spacing: var(--kc-v2-h2-letter-spacing);
  }
}

.kc-v2-lede {
  margin: 0 0 var(--kc-v2-space-4);
  color: var(--kc-v2-ink-600);
  font-family: var(--kc-v2-font-family);
  font-size: 14px;
  line-height: 20px;
}

/* Running body copy -- the instructions/notes cards. Paragraph spacing comes from the parent
   stack's gap, so margins are zeroed here rather than fought with per-paragraph rules. */
.kc-v2-prose {
  color: var(--kc-v2-ink-600);
  font-family: var(--kc-v2-font-family);
  font-size: 13px;
  line-height: 19px;
}
.kc-v2-prose p {
  margin: 0;
}
.kc-v2-prose strong { color: var(--kc-v2-ink-800); font-weight: 700; }

/* A list that KEEPS its markers, unlike the chrome lists navigation.css resets. Needed because
   .kc-v2-stack zeroes margin-left on its children (to defeat Community.css's bare
   `li { margin-left: 20px }`), which also removes the indent a bulleted list needs -- so a
   genuine bullet list cannot just be a stack. padding-inline-start supplies the indent instead,
   which is not a property any host li rule here touches. */
.kc-v2-bullets {
  margin: 0;
  padding-inline-start: 18px;
  list-style: disc outside;
  color: var(--kc-v2-ink-600);
  font-family: var(--kc-v2-font-family);
  font-size: 13px;
  line-height: 19px;
}
.kc-v2-bullets li {
  margin: 0 0 var(--kc-v2-space-1);
  padding: 0;
  list-style: disc outside;
}

/* Indents a group of sub-options under the checkbox that governs them, so the dependency is
   visible rather than implied by order alone. */
.kc-v2-indent {
  padding-inline-start: 30px;
}

/* ---------------------------------------------------------------------------
 * Section header (KENT-44 1.2.0)
 *
 * A heading, an optional counter, and optional trailing actions on one line -- "City Fees ·
 * 18 jurisdictions" above the annual-return earnings grid.
 *
 * Wraps rather than shrinking the heading, and the actions group keeps its own row when it does, so
 * the same failure mode as the site header (the only shrinkable item absorbing all the pressure)
 * cannot recur here.
 * ------------------------------------------------------------------------- */
.kc-v2-section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--kc-v2-space-3);
  margin: 0;
}
.kc-v2-section-header__title {
  margin: 0;
  color: var(--kc-v2-ink-800);
  font-family: var(--kc-v2-font-family);
  font-size: var(--kc-v2-h3-size);
  font-weight: var(--kc-v2-h3-weight);
  line-height: var(--kc-v2-h3-line-height);
}
.kc-v2-section-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--kc-v2-space-2);
  margin-left: auto;
}

/* A plain count beside a heading -- "18 jurisdictions". Distinct from .kc-v2-counter, which is a
   filled pill for a badge-style number; this is quiet supporting text. */
.kc-v2-count-note {
  color: var(--kc-v2-ink-500);
  font-family: var(--kc-v2-font-family);
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
}

/* Inline monospace for a machine-generated value the reader may need to quote back -- a confirmation
   number, an account reference, a support email (KENT-44 1.2.0).
 *
 * Exists because the completion view styled a BARE `code` element selector inline, which applied to
 * every <code> on the page rather than the one it was written for. Scoped as a class instead, per
 * contract rule 2. */
.kc-v2-code {
  padding: 1px 6px;
  border-radius: var(--kc-v2-radius-sm);
  background-color: var(--kc-v2-ink-100);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95em;
  color: var(--kc-v2-ink-800);
  overflow-wrap: anywhere;
}

/* Card grid used as a standalone page SECTION (KENT-44 1.3.0).
 *
 * A .kc-v2-grid--cards normally sits inside a .kc-v2-stack, which supplies the gap to whatever
 * follows. The Annual summary band (#annualHeaderDisplay) does not: it is rendered by its own
 * partial and the step content below it lives in a sibling container with a different parent, so no
 * shared stack gap applies and the two sat flush -- measured 0.0px on the confirmation step. */
.kc-v2-grid--section {
  margin-bottom: var(--kc-v2-space-4);
}

/* Same, at the top -- for a section that follows a page heading. */
.kc-v2-grid--section-top {
  margin-top: var(--kc-v2-space-4);
}

/* The stack counterpart (1.5.4, KENT-69). .kc-v2-page-title is deliberately margin:0 -- the
   surrounding layout owns its spacing -- and a page whose first section is a grid gets that from
   --grid--section-top. A page whose first section is a STACK had no equivalent, so its heading sat
   flush against the first card with nothing between them. */
.kc-v2-stack--section-top {
  margin-top: var(--kc-v2-space-4);
}

/* ---------------------------------------------------------------------------
 * Section divider (1.5.6, KENT-58 QA)
 *
 * A rule between two sections INSIDE one card. The Annual filing card holds a read-only
 * definition list and then the editable address fields, and the seam between those two was the
 * only boundary on the card with no line -- the definition rows draw one between every pair, so
 * the sections ran together while the facts above them were neatly separated.
 *
 * Same 1px ink-100 as .kc-v2-definition-row, deliberately: a heavier or darker rule here would
 * read as a different kind of boundary than the ones directly above it.
 *
 * <hr> rather than a <div>: it is a thematic break, which is what the element means, and it is
 * announced as a separator rather than as an anonymous empty box. The UA border is reset because
 * an <hr> draws an inset 3D groove by default, and this beats Bootstrap's own `hr` rule (0,0,1)
 * whose 20px margins would otherwise be the spacing.
 *
 * space-3, matching the definition rows' own vertical padding, so the break sits on the rhythm
 * the list already established rather than introducing a second one.
 *
 * NO `display` DECLARATION, on purpose. An <hr> is already block, so `hidden` keeps working here
 * without the [hidden] guard every other component in this library needs (README point 12).
 * ------------------------------------------------------------------------- */
.kc-v2-divider {
  height: 0;
  margin: var(--kc-v2-space-3) 0;
  border: 0;
  border-top: 1px solid var(--kc-v2-ink-100);
}
