/*
 * The Theme Kit in Civic's look. The kit (themes/_shared/assets/css/kit.css) draws every block the theme has no
 * template for, and every module section; this file sets its tokens and the look of its parts, linked after kit.css, so
 * the values here win. How the stock blocks are composed by type (headings at the left under the flag, news as dated
 * notices, the call to action's stripe) is in theme.css, which knows each block's type.
 *
 * The look: a public notice board. Type is larger than the kit's own and plain; a card is a notice with a bar of the main
 * colour along its top; every symbol stands in a small square of the main colour, like a pictogram on a sign; a date
 * or a label is a tag; a button is a sign with an arrow; a field has a strong frame and a focus that cannot be missed.
 * Corners are only slightly rounded.
 *
 * Rules for this file: it loads nothing, no picture, font or address of any kind (the kit inlines it into module
 * previews; kit_components.test.php fails for one, and also for these words written in a comment);
 * colours only through the palette tokens the kit already reads (--text-primary, --surface, --primary, ...) or
 * color-mix() of them; weights only through the layout's --civic-heading-weight and --civic-body-strong.
 *
 * --kit-radius and --kit-button-radius are repeated in this theme's line of the shared button table
 * (themes/_shared/assets/css/resilience.css, --chrome-radius and --chrome-button-radius) so the cookie notice and the
 * phone action bar match the theme's own cards and buttons: theme-chrome.test.mjs compares the two. Change both.
 */

.kit-root {
  --kit-radius: 0.375rem;
  --kit-radius-sm: 0.25rem;
  --kit-button-radius: 0.25rem;
  --kit-input-radius: 0.25rem;
  --kit-media-radius: 0.375rem;
  --kit-chip-radius: 0.25rem;
  --kit-heading-weight: var(--civic-heading-weight, 700);
  --kit-heading-tracking: -0.01em;
  --kit-button-weight: var(--civic-body-strong, 700);
  --kit-button-transform: none;
  --kit-eyebrow-tracking: 0.01em;
  --kit-focus: var(--accent, #ffcc29);
  --kit-star: var(--accent-ink, #1d55a3);
  --kit-shadow: none;
  --kit-shadow-hover: 0 14px 30px -20px color-mix(in srgb, var(--text-primary, #0f1723) 45%, transparent);
  --kit-card-pad: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  --kit-gap-medium: clamp(1.25rem, 2vw, 1.75rem);
  --kit-gap-large: clamp(2rem, 1.5rem + 2vw, 3rem);
  --kit-gutter: clamp(1rem, 4vw, 2.5rem);
  --kit-width-normal: 75rem;
  --kit-width-narrow: 46rem;
  --kit-pad-normal: clamp(3.25rem, 2.5rem + 3.5vw, 6rem);
  --kit-pad-compact: clamp(2rem, 1.5rem + 2vw, 3.25rem);
  --kit-pad-spacious: clamp(4.5rem, 3rem + 6vw, 8rem);
  --kit-measure: 66ch;
  /* The edge under a button of the main colour (theme.css has the same for the theme's own buttons). */
  --civic-kit-edge: color-mix(in srgb, var(--kit-primary) 55%, #000000);
}

/* ------------------------------------------------------------------ Type */

/* Headings: bold and plain. Sizes are chosen for ordinary words at 320 px (a word of 14 letters fits the first heading
   there); the shared script is only the net for a longer one (cms/THEME_DEVELOPMENT.md, rule 1). A line height under
   about 1.1 cuts marks in a box that clips. */
.kit-heading {
  font-family: var(--font-heading, sans-serif);
  line-height: 1.12;
  text-wrap: balance;
}

.kit-heading--1 {
  font-size: clamp(2.125rem, 1.45rem + 2.9vw, 3.75rem);
  letter-spacing: -0.015em;
  line-height: 1.1;
}

.kit-heading--2 {
  font-size: clamp(1.75rem, 1.35rem + 1.75vw, 2.75rem);
  letter-spacing: -0.012em;
}

.kit-heading--3 {
  font-size: clamp(1.25rem, 1.15rem + 0.45vw, 1.5rem);
  line-height: 1.25;
}

.kit-heading--4 {
  font-size: 1.1875rem;
}

.kit-heading.kit-heading--long {
  font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
  letter-spacing: 0;
  line-height: 1.3;
}

/* Running text a step larger than the kit's own: 17 px, a lead line up to 21 px. */
.kit-text-block {
  font-size: 1.0625rem;
  line-height: 1.6;
}

.kit-text--lead {
  font-size: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
  line-height: 1.55;
}

.kit-text--small {
  font-size: 0.9375rem;
}

.kit-rich-text {
  font-size: 1.0625rem;
  line-height: 1.65;
}

.kit-card__body {
  font-size: 1rem;
}

.kit-list-item__body {
  font-size: 1rem;
}

/* Small labels above headings are tags: the body face's bold on a soft tint of the signal colour, never in capitals
   (capitals make long Lithuanian words much wider). */
.kit-eyebrow {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: var(--kit-radius-sm);
  background: var(--kit-soft);
  color: var(--kit-text);
  font-size: 0.9375rem;
  font-weight: var(--civic-body-strong, 700);
  letter-spacing: var(--kit-eyebrow-tracking);
  line-height: 1.35;
  text-transform: none;
}

/* A card's label (a date in a timeline, a post's category, a plan's Recommended) is a tag of the signal colour. */
.kit-card__eyebrow {
  align-self: flex-start;
  max-width: 100%;
  padding: 0.15rem 0.55rem;
  border-radius: var(--kit-radius-sm);
  background: var(--kit-accent);
  color: var(--kit-on-accent);
  font-size: 0.875rem;
  font-weight: var(--civic-body-strong, 700);
  letter-spacing: var(--kit-eyebrow-tracking);
  line-height: 1.4;
  text-transform: none;
}

/* Links are always underlined, and the line grows under the pointer. */
.kit-link,
.kit-rich-text a {
  color: var(--kit-accent-text);
  font-weight: var(--civic-body-strong, 700);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.kit-rich-text a {
  font-weight: inherit;
}

.kit-link:hover,
.kit-rich-text a:hover {
  text-decoration-thickness: 3px;
}

/* Focus that cannot be missed: the signal colour with a ring of the text colour round it, on a light page and on a band. */
.kit-root :focus-visible {
  outline: 3px solid var(--kit-focus);
  outline-offset: 0;
  box-shadow: 0 0 0 6px var(--kit-text);
}

.kit-card--linked .kit-card__link:focus-visible {
  box-shadow: none;
}

.kit-card--linked .kit-card__link:focus-visible::after {
  outline: 3px solid var(--kit-focus);
  outline-offset: 0;
  box-shadow: 0 0 0 6px var(--kit-text);
}

/* ------------------------------------------------------------------ Buttons */

/* A sign: at least 48 px tall, the label in bold, a button of the main colour standing a little proud of the page on its
   edge, with an arrow after its label. The arrow is its own piece beside the label, never a letter of it, so a long
   word and the arrow never break together. A label may take two lines. theme-chrome.test.mjs holds this shape and the
   shared notice's together. */
.kit-button {
  gap: 0.6rem;
  min-height: 3rem;
  padding: 0.7rem 1.35rem;
  border-width: 2px;
  font-size: 1.0625rem;
  line-height: 1.25;
}

.kit-button--primary {
  box-shadow: 0 3px 0 var(--civic-kit-edge);
}

.kit-button--primary:not(.kit-button--small)::after {
  content: "\2192";
  flex: none;
  font-family: var(--font-body, sans-serif);
  font-size: 1.15em;
  line-height: 1;
  transition: transform var(--kit-speed) ease;
}

.kit-button--primary:not(.kit-button--small):hover::after {
  transform: translateX(0.2rem);
}

.kit-button--primary:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--civic-kit-edge);
}

.kit-button--secondary {
  border-color: var(--kit-text);
  color: var(--kit-text);
}

.kit-button--secondary:hover {
  border-color: var(--kit-text);
  background: color-mix(in srgb, var(--kit-text) 8%, transparent);
  color: var(--kit-text);
}

.kit-button--ghost {
  color: var(--kit-accent-text);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* A small button (a row of review links, Next under a list of posts) has no arrow and is 44 px tall, the least a thumb
   needs on a phone (verify-theme-stress.mjs, button-small). */
.kit-button--small {
  min-height: 2.75rem;
  padding: 0.45rem 1rem;
  font-size: 1rem;
}

.kit-button-group {
  gap: 0.85rem 1rem;
}

/* ------------------------------------------------------------------ Cards */

/* A card is a notice: a sheet with a bar of the main colour along its top. On a band of the main colour the bar takes the
   band's text colour, as every colour role there does. */
.kit-card--surface,
.kit-card--outline {
  border: 1px solid var(--kit-line);
  border-top: 0.3125rem solid var(--kit-primary);
}

.kit-card--outline {
  border-color: var(--kit-line-strong);
  border-top-color: var(--kit-primary);
}

.kit-card__title {
  font-size: clamp(1.2rem, 1.1rem + 0.4vw, 1.375rem);
  line-height: 1.25;
}

/* A card that leads somewhere says so: its title is an underlined link, and the line grows under the pointer. */
.kit-card__link {
  color: var(--kit-accent-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.kit-card--linked:hover {
  border-inline-color: var(--kit-text);
  border-bottom-color: var(--kit-text);
}

.kit-card--linked:hover .kit-card__link {
  color: var(--kit-accent-text);
  text-decoration-thickness: 3px;
}

.kit-card__meta {
  font-size: 0.9375rem;
}

/* ------------------------------------------------------------------ Symbols */

/* A large symbol stands in a square of the main colour, like a pictogram on a sign. On a band of the main colour the
   square takes the band's text colour and the symbol the band's own, so it stays a pictogram there too. */
.kit-icon--large.kit-tone--accent {
  box-sizing: border-box;
  width: 3rem;
  height: 3rem;
  padding: 0.65rem;
  border-radius: var(--kit-radius-sm);
  background: var(--kit-primary);
  color: var(--kit-on-primary);
  stroke-width: 1.9;
}

/* Features on a phone stand as compact rows with the symbol beside the title (kit.css): a smaller square there. */
@media (max-width: 639.98px) {
  .kit-grid.kit-features .kit-icon--large.kit-tone--accent {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0.5rem;
  }
}

.kit-icon--medium.kit-tone--accent {
  color: var(--kit-accent-text);
}

.kit-list-item__icon {
  width: 1.35rem;
  height: 1.35rem;
}

/* ------------------------------------------------------------------ Steps and figures */

/* A step's number stands in a square of the main colour, like the number on a door. With a symbol the kit lets the
   symbol lead and sets the number as a small label over the title; both stay. */
.kit-steps .kit-card__eyebrow {
  display: grid;
  place-items: center;
  width: 3rem;
  min-width: 3rem;
  height: 3rem;
  margin-bottom: 0.6rem;
  padding: 0;
  border-radius: var(--kit-radius-sm);
  background: var(--kit-primary);
  color: var(--kit-on-primary);
  font-family: var(--font-heading, sans-serif);
  font-size: 1.375rem;
  font-variant-numeric: lining-nums tabular-nums;
  font-weight: var(--kit-heading-weight);
  letter-spacing: 0;
  line-height: 1;
}

/* With a symbol the number is the small label the kit makes it (its own rule is the stronger one); it only keeps none of
   the square's height. */
.kit-root .kit-steps .kit-card__content:has(> .kit-card__body > .kit-icon:first-child) > .kit-card__eyebrow {
  height: auto;
  margin-bottom: 0;
  font-size: 0.875rem;
}

.kit-steps .kit-card__title {
  font-size: clamp(1.2rem, 1.1rem + 0.4vw, 1.375rem);
}

/* Figures (stats_counter, a plan's price). From 1200 px five statistics stand in a row of about 200 px each: the sizes
   here hold "1500 m²" on one line there. Each figure stands under a small flag. */
.kit-stat {
  gap: 0.3rem;
}

.kit-stat::before {
  content: "";
  display: block;
  justify-self: inherit;
  width: 2.5rem;
  height: 0.3125rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(90deg, var(--kit-primary) 0 62%, var(--accent, #ffcc29) 62% 100%);
}

.kit-align--center > .kit-stat::before,
.kit-section--align-center .kit-stat::before {
  margin-inline: auto;
}

/* A figure under its symbol, or a price in a card, has its lead mark already: no flag there. */
.kit-stack:has(> .kit-icon) > .kit-stat::before,
.kit-card .kit-stat::before {
  display: none;
}

.kit-stat__value {
  font-size: clamp(2.1rem, 1.5rem + 1.6vw, 2.9rem);
  line-height: 1.1;
}

.kit-stat__suffix {
  color: var(--kit-text);
}

.kit-stat__label {
  color: var(--kit-text);
  font-size: 1rem;
  line-height: 1.45;
}

.kit-price__amount {
  font-variant-numeric: lining-nums tabular-nums;
}

/* ------------------------------------------------------------------ Questions, quotes, lists */

/* Questions: strong rows under a heavy line, each with its chevron in a ring. */
.kit-accordion {
  border-top: 2px solid var(--kit-text);
}

.kit-accordion__item {
  border-bottom: 1px solid var(--kit-line-strong);
}

.kit-accordion__title {
  gap: 1rem;
  padding: 1.15rem 0;
  font-family: var(--font-heading, sans-serif);
  font-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem);
  font-weight: var(--kit-heading-weight);
  line-height: 1.3;
}

.kit-accordion__title:hover {
  color: var(--kit-text);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.22em;
}

.kit-accordion__chevron {
  box-sizing: border-box;
  width: 2rem;
  height: 2rem;
  padding: 0.3rem;
  border: 2px solid currentColor;
  border-radius: 50%;
  color: var(--kit-text);
}

.kit-accordion__body {
  color: var(--kit-text);
  font-size: 1.0625rem;
}

/* A quotation is upright: the font palettes load no slanted letters, and a browser's own slant is a fake. A thick bar of
   the signal colour stands at its side. */
.kit-quote {
  padding-inline-start: 1.15rem;
  border-inline-start: 0.375rem solid var(--kit-accent);
}

.kit-quote__text {
  font-family: var(--font-body, sans-serif);
  font-size: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
  font-style: normal;
  line-height: 1.55;
}

.kit-quote__author {
  font-size: 1rem;
  font-weight: var(--civic-body-strong, 700);
}

.kit-quote__role {
  font-size: 0.9375rem;
}

.kit-list-item__title {
  font-weight: var(--civic-body-strong, 700);
}

a.kit-list-item__title {
  color: var(--kit-accent-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a.kit-list-item__title:hover {
  text-decoration-thickness: 3px;
}

.kit-list--menu .kit-list-item__meta {
  font-weight: var(--civic-body-strong, 700);
}

.kit-chip {
  font-size: 0.875rem;
  font-weight: var(--civic-body-strong, 700);
}

/* ------------------------------------------------------------------ Forms */

/* A field has a strong frame in the text colour, a bold label above it, and the focus ring of every control. */
.kit-field__label {
  color: var(--kit-text);
  font-size: 1rem;
  font-weight: var(--civic-body-strong, 700);
}

.kit-input {
  min-height: 3rem;
  border: 2px solid var(--kit-text);
  background: var(--kit-surface);
  font-size: 1.0625rem;
}

.kit-input:hover {
  border-color: var(--kit-text);
}

.kit-input:focus,
.kit-input:focus-visible {
  border-color: var(--kit-text);
  outline: 3px solid var(--kit-focus);
  outline-offset: 0;
  box-shadow: inset 0 0 0 2px var(--kit-text);
}

/* ------------------------------------------------------------------ Pictures and frames */

.kit-carousel__button,
.kit-slideshow__button {
  border-width: 2px;
  border-color: var(--kit-text);
  border-radius: var(--kit-radius-sm);
}

.kit-avatar {
  border-radius: 50%;
}
