/* @raha/tokens — the element base of the original for a system without an older reset:

   the reboot (MIT) + the template's element rules + the original's vendor-overrides

   element rules — every rule whose selector names no class and no id, in the original's load order.

   LAYERED (`@layer base`) since the older reset is gone: a utility (`tw:mb-0`) beats these element rules without `!`. While a system still
   loads an unlayered reset of its own it must not load this file. */

@layer base {
  *, *::before, *::after {
    box-sizing: border-box;
  }

  @media (prefers-reduced-motion: no-preference) {
    :root {
      scroll-behavior: smooth;
    }
  }

  body {
    margin: 0;
    font-family: var(--raha-body-font-family);
    font-size: var(--raha-body-font-size);
    font-weight: var(--raha-body-font-weight);
    line-height: var(--raha-body-line-height);
    color: var(--raha-body-color);
    text-align: var(--raha-body-text-align);
    background-color: var(--raha-body-bg);
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  }

  hr {
    margin: 1rem 0;
    color: inherit;
    border: 0;
    border-top: var(--raha-border-width) solid;
    opacity: 0.2;
  }

  h6, h5, h4, h3, h2, h1 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--raha-heading-color);
  }

  h1 {
    font-size: calc(1.34375rem + 1.125vw);
  }

  @media (min-width: 1200px) {
    h1 {
      font-size: 2.1875rem;
    }
  }

  h2 {
    font-size: calc(1.3rem + 0.6vw);
  }

  @media (min-width: 1200px) {
    h2 {
      font-size: 1.75rem;
    }
  }

  h3 {
    font-size: calc(1.278125rem + 0.3375vw);
  }

  @media (min-width: 1200px) {
    h3 {
      font-size: 1.53125rem;
    }
  }

  h4 {
    font-size: calc(1.25625rem + 0.075vw);
  }

  @media (min-width: 1200px) {
    h4 {
      font-size: 1.3125rem;
    }
  }

  h5 {
    font-size: 1.09375rem;
  }

  h6 {
    font-size: 0.875rem;
  }

  p {
    margin-top: 0;
    margin-bottom: 1rem;
  }

  abbr[title] {
    text-decoration: underline dotted;
    cursor: help;
    text-decoration-skip-ink: none;
  }

  address {
    margin-bottom: 1rem;
    font-style: normal;
    line-height: inherit;
  }

  ol, ul {
    padding-right: 2rem;
  }

  ol, ul, dl {
    margin-top: 0;
    margin-bottom: 1rem;
  }

  ol ol, ul ul, ol ul, ul ol {
    margin-bottom: 0;
  }

  dt {
    font-weight: 500;
  }

  dd {
    margin-bottom: 0.5rem;
    margin-right: 0;
  }

  blockquote {
    margin: 0 0 1rem;
  }

  b, strong {
    font-weight: bolder;
  }

  small {
    font-size: 0.875em;
  }

  mark {
    padding: 0.1875em;
    color: var(--raha-highlight-color);
    background-color: var(--raha-highlight-bg);
  }

  sub, sup {
    position: relative;
    font-size: 0.75em;
    line-height: 0;
    vertical-align: baseline;
  }

  sub {
    bottom: -0.25em;
  }

  sup {
    top: -0.5em;
  }

  a {
    color: rgba(var(--raha-link-color-rgb), var(--raha-link-opacity, 1));
    text-decoration: none;
  }

  a:hover {
    --raha-link-color-rgb: var(--raha-link-hover-color-rgb);
  }

  a:not([href]):not([class]), a:not([href]):not([class]):hover {
    color: inherit;
    text-decoration: none;
  }

  pre, code, kbd, samp {
    font-family: var(--raha-font-monospace);
    font-size: 1em;
  }

  pre {
    display: block;
    margin-top: 0;
    margin-bottom: 1rem;
    overflow: auto;
    font-size: 0.875em;
  }

  pre code {
    font-size: inherit;
    color: inherit;
    word-break: normal;
  }

  code {
    font-size: 0.875em;
    color: var(--raha-code-color);
    word-wrap: break-word;
  }

  a > code {
    color: inherit;
  }

  kbd {
    padding: 0.1875rem 0.375rem;
    font-size: 0.875em;
    color: var(--raha-body-bg);
    background-color: var(--raha-body-color);
    border-radius: 0.25rem;
  }

  kbd kbd {
    padding: 0;
    font-size: 1em;
  }

  figure {
    margin: 0 0 1rem;
  }

  img, svg {
    vertical-align: middle;
  }

  table {
    caption-side: bottom;
    border-collapse: collapse;
  }

  caption {
    padding-top: 10px;
    padding-bottom: 10px;
    color: var(--raha-secondary-color);
    text-align: right;
  }

  th {
    text-align: inherit;
    text-align: -webkit-match-parent;
  }

  thead, tbody, tfoot, tr, td, th {
    border-color: inherit;
    border-style: solid;
    border-width: 0;
  }

  label {
    display: inline-block;
  }

  button {
    border-radius: 0;
  }

  button:focus:not(:focus-visible) {
    outline: 0;
  }

  input, button, select, optgroup, textarea {
    margin: 0;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
  }

  button, select {
    text-transform: none;
  }

  [role=button] {
    cursor: pointer;
  }

  select {
    word-wrap: normal;
  }

  select:disabled {
    opacity: 1;
  }

  [list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator {
    display: none !important;
  }

  button, [type=button], [type=reset], [type=submit] {
    -webkit-appearance: button;
  }

  button:not(:disabled), [type=button]:not(:disabled), [type=reset]:not(:disabled), [type=submit]:not(:disabled) {
    cursor: pointer;
  }

  ::-moz-focus-inner {
    padding: 0;
    border-style: none;
  }

  textarea {
    resize: vertical;
  }

  fieldset {
    min-width: 0;
    padding: 0;
    margin: 0;
    border: 0;
  }

  legend {
    float: right;
    width: 100%;
    padding: 0;
    margin-bottom: 0.5rem;
    line-height: inherit;
    font-size: calc(1.275rem + 0.3vw);
  }

  @media (min-width: 1200px) {
    legend {
      font-size: 1.5rem;
    }
  }

  legend + * {
    clear: right;
  }

  ::-webkit-datetime-edit-fields-wrapper, ::-webkit-datetime-edit-text, ::-webkit-datetime-edit-minute, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-year-field {
    padding: 0;
  }

  ::-webkit-inner-spin-button {
    height: auto;
  }

  [type=search] {
    -webkit-appearance: textfield;
    outline-offset: -2px;
  }

  [type=search]::-webkit-search-cancel-button {
    cursor: pointer;
    filter: grayscale(1);
  }

  [type="tel"], [type="url"], [type="email"], [type="number"] {
    direction: ltr;
  }

  ::-webkit-search-decoration {
    -webkit-appearance: none;
  }

  ::-webkit-color-swatch-wrapper {
    padding: 0;
  }

  ::file-selector-button {
    font: inherit;
    -webkit-appearance: button;
  }

  output {
    display: inline-block;
  }

  iframe {
    border: 0;
  }

  summary {
    display: list-item;
    cursor: pointer;
  }

  progress {
    vertical-align: baseline;
  }

  [hidden] {
    display: none !important;
  }

  body {
    background-color: var(--custom-body-bg);
  }

  code {
    background-color: rgba(214, 51, 132, 0.1);
    border-radius: 4px;
    padding: 2px;
  }

  ::selection {
    background-color: var(--raha-primary);
    color: #fff;
  }

  b, strong {
    font-weight: 700;
  }

  th {
    font-weight: 600;
  }

  table > :is(thead, tbody, tfoot) > tr > :is(th, td) {
    text-align: center;
  }

  html {
    -webkit-tap-highlight-color: transparent;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  a, [role="button"], [role="tab"] {
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
  }

  @media (pointer: coarse) {
    input, textarea, select {
      font-size: 16px;
    }
  }

  html, body {
    overscroll-behavior: none;
  }

  input, textarea, select {
    caret-color: var(--raha-primary);
  }

  input[type="checkbox"], input[type="radio"], input[type="range"], progress {
    accent-color: var(--raha-primary);
  }

  ::selection {
    background-color: var(--raha-primary);
    color: #fff;
  }

  ::-moz-selection {
    background-color: var(--raha-primary);
    color: #fff;
  }

  @supports (padding-top: env(safe-area-inset-top)) {
    body {
      padding-left: env(safe-area-inset-left, 0px);
      padding-right: env(safe-area-inset-right, 0px);
    }
  }

  a:focus-visible, button:focus-visible, [role="button"]:focus-visible, [role="tab"]:focus-visible, [role="menuitem"]:focus-visible, [tabindex]:focus-visible {
    outline: 2px solid var(--raha-primary) !important;
    outline-offset: 2px;
  }

  i[class*="fi-"] {
    display: inline-flex;
    vertical-align: -1px;
  }

  @media (prefers-reduced-motion: no-preference) {
    html {
      scroll-behavior: smooth;
    }
  }
}
