details {
  border: var(--input-border-thickness) solid var(--color-input-border); /* >=3:1 border on white for SC 1.4.11 */
  border-radius: var(--container-border-radius);
}

details[open] {
  background-color: var(--color-surface-muted);
}

details>summary {
  padding: var(--space-2xs) var(--space-s);
  cursor: pointer;
}

details>div {
  padding: 0 var(--space-s) var(--space-2xs) var(--space-s);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-display);
  font-weight: var(--font-weight-display);
  line-height: 1.2;
}

h1 { font-size: var(--font-size-xl); }
h2,
h3,
h4,
h5 { font-size: var(--font-size-l); }
h6 { font-size: var(--font-size-m); }

@media (min-width: 48rem) {
  h1 { font-size: var(--font-size-2xl); }
}

a {
  color: var(--color-primary-link);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-thickness: 0.1em;
}

small {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-base);
}

strong {
  font-weight: var(--font-weight-bold);
}

label {
  display: flex;
  font-size: var(--font-size-s);
  align-items: center;
  font-family: var(--font-family-base);
  line-height: 1;
  gap: var(--space-3xs);
  color: var(--color-text-heading);
}

input[type="checkbox"] {
  accent-color: var(--color-primary);
}

/* The account list renders radios whenever a session picks one account rather
   than several — it sets the input's type from InputType, so grepping the
   templates for type="radio" finds nothing. */
input[type="radio"] {
  cursor: pointer;
  height: var(--space-s);
  width: var(--space-s);
  border: var(--input-border-thickness) solid var(--color-input-border);
  accent-color: var(--color-primary);
}

input[type="radio"]:checked {
  background-color: var(--color-primary);
}

body {
  font-family: var(--font-family-base);
  font-weight: var(--font-weight-base);
  line-height: 1.4;
  background-color: var(--color-canvas);
  print-color-adjust: exact;
  font-feature-settings: "liga" 1, "dlig" 1, "hlig" 1, "clig" 1, "calt" 1;
  font-variant-ligatures: normal;
  color: var(--color-text-body);
  font-size: var(--font-size-s);
}

blockquote {
  font-family: var(--font-family-base);
  font-weight: var(--font-weight-bold);
  flex-direction: column;
  margin: 0;
  display: flex;
  padding: var(--space-m) var(--space-l);
  font-size: var(--font-size-l);
}

/* Canonical text-input styling. Every text-like input and select shares one
   rule so they stay visually consistent; border thickness and radius come from
   the theme so banks can restyle them. An input type the flow does not render
   yet belongs on this list the moment it does.
 *
 * Height comes from --control-height, the token the buttons share, with borders
 * counted inside it because the reset sets box-sizing: border-box. max-height
 * pins it as well as height, so a flex parent cannot stretch them. */
input[type="text"],
input[type="number"],
input[type="search"],
select {
  border: var(--input-border-thickness) solid var(--color-input-border); /* >=3:1 border on white for SC 1.4.11 */
  border-radius: var(--input-border-radius);
  height: var(--control-height);
  max-height: var(--control-height);
  padding: var(--space-xs) var(--space-s);
  font-size: var(--font-size-s);
  font-family: var(--font-family-base);
  line-height: 1;
  color: var(--color-input-text);
  background-color: var(--color-input-background);
  accent-color: var(--color-primary);
}

::selection {
  color: var(--color-surface-muted);
  background-color: var(--color-primary);
}

ul {
  margin: 0;
  padding: 0;
}

input[type="checkbox"]:hover {
  background-color: var(--color-primary);
}

figure {
  align-items: center;
  flex-direction: column;
  gap: var(--space-2xs);
  width: 100%;
  display: flex;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-thickness: 0.1em;
}

ol {
  margin: 0;
  padding: 0;
}

::marker {
  color: var(--color-primary);
}

span {
  font-size: var(--font-size-xs);
  font-family: var(--font-family-base);
}

p {
  font-family: var(--font-family-base);
  font-weight: var(--font-weight-base);
  line-height: 1.4;
  font-size: var(--font-size-s);
}

img {
  object-fit: cover;
  shape-margin: 1rem;
  vertical-align: middle;
  width: 100%;
  height: auto;
  font-style: italic;
}

html {
  block-size: 100%;
}

:focus-visible {
  outline-offset: 2px;
  outline: 2px solid var(--color-accent);
}

input[type="checkbox"] {
  width: var(--space-s);
  height: var(--space-s);
}

input[type="checkbox"]:checked:hover {
  filter: brightness(1.1);
}

/* --control-height on the two filled buttons, borders included, which
   box-sizing: border-box in the reset already accounts for. .btn-text is
   shorter and sizes itself in components.css, from --text-button-height.
 *
 * max-height pins it as well as height: a button stretched by a row flex
   parent, or one whose label wraps, stays on the control height rather than
   growing past it. */
.primary,
.secondary {
  height: var(--control-height);
  max-height: var(--control-height);
  align-items: center;
  justify-content: center;
}

.primary {
  font-size: var(--font-size-s);
  font-family: var(--font-family-base);
  font-weight: var(--font-weight-button);
  line-height: 0.9;
  border-radius: var(--button-border-radius);
  cursor: pointer;
  padding: var(--space-xs) var(--space-m);
  border: var(--button-border-thickness) solid var(--color-primary-button-border);
  text-decoration: none;
  background-color: var(--color-primary-button-background);
  color: var(--color-primary-button-text);
  width: fit-content;
  display: inline-flex;
  transition: 0.2s ease-in-out;
}

.primary:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.primary:active {
  transform: scale(0.99) translateY(1px);
}

.primary:disabled {
  cursor: not-allowed;
  opacity: var(--button-disabled-opacity);
}

.primary:hover {
  text-decoration: none;
}

.secondary {
  border: var(--button-border-thickness) solid var(--color-secondary-button-border);
  width: fit-content;
  cursor: pointer;
  display: inline-flex;
  font-size: var(--font-size-s);
  border-radius: var(--button-border-radius);
  text-decoration: none;
  background-color: var(--color-secondary-button-background);
  color: var(--color-secondary-button-text);
  padding: var(--space-xs) var(--space-m);
  font-family: var(--font-family-base);
  font-weight: var(--font-weight-button);
  line-height: 0.9;
  transition: 0.2s ease-in-out;
}

.secondary:active {
  transform: scale(0.99) translateY(1px);
}

.secondary:disabled {
  cursor: not-allowed;
  opacity: var(--button-disabled-opacity);
}

.secondary:hover {
  text-decoration: none;
}
