html,
body {
  height: -webkit-fill-available;
}

body {
  scrollbar-gutter: stable both-edges;
}

.content {
  overflow: visible;
  padding-block-end: 1.5rem;
}

.js-fi-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rlh;
  margin-block-end: 1.5rlh;
}

.js-fi-label,
.js-fi-inputs,
.js-fi-toggles,
.js-fitc {
  margin: 0;
  flex-basis: 100%;
}

.js-fi-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.js-fi-inputs {
  border: 1px solid #bbb;
  display: flex;
  justify-content: space-between;
  inline-size: min(100%, 50ch);
}

.js-fi-inputs:has(input:focus-visible) {
  outline: 3px solid #2491ff;
}

.js-fi-inputs button,
.js-fi-inputs input {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.js-fi {
  inline-size: min(100%, 50ch);
}

.js-fitc {
  border: 2px solid #15c;
  border-radius: 0.25rem;
  color: #15c;
  cursor: pointer;
  font-weight: 500;
  display: flex;
  gap: 0.33rem;
  align-items: center;
  justify-content: center;
  min-inline-size: 7ch;
  padding: 1ch;
  user-select: none;
}

.js-fitc svg {
  height: 1.5cap;
  width: 0;
  transition: width 0.66s linear(0, 0.009, 0.035 2.1%, 0.141, 0.281 6.7%, 0.723 12.9%, 0.938 16.7%, 1.017, 1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%, 1.051 39.6%, 1.017 43.1%, 0.991, 0.977 51%, 0.974 53.8%, 0.975 57.1%, 0.997 69.8%, 1.003 76.9%, 1.004 83.8%, 1);
  transform-origin: left center;
}

.js-fitc:has(:checked) svg {
  width: 0.88lh;
}

.entry-container {
  display: grid;
  gap: 1rlh;
}

.entry {
  container: entry / inline-size;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  border-radius: 0.25rem;
  display: grid;
  gap: 0.75rem 1rem;
  padding: 0.75rem;
}

.entry-text h2 {
  font-size: 1.1rem;
  margin-block-end: 0;
  text-wrap: pretty;
}

.entry a {
  background-image: none;
  display: inline-block;
  padding: 0.5rem;
}

.entry a::after {
  display: none;
}

.entry summary::-webkit-details-marker {
  display: none;
}

.entry a,
.entry summary {
  user-select: none;
}

.entry-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.entry-menu {
  margin: 0;
}

.entry-menu-button {
  color: #15c;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: inherit;
  gap: 0.25rlh;
  padding: 0.5rem;
}

.entry-menu-button::after {
  content: "";
  border: 0.35rem solid #0000;
  border-top: 0.4rem solid;
  border-bottom: 0;
}

.entry-menu[open] .entry-menu-button::after {
  border-bottom: 0.4rem solid;
  border-top: 0;
}

.entry-menu-links {
  background-color: #eee;
  border-radius: 0.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  margin: 0;
  list-style: none;
  padding-block: 0.15rlh;
  padding-inline: 0;
  position: absolute;
}

.entry-menu-links li {
  break-inside: avoid;
  margin: 0;
  padding: 0;
}

.entry-menu-links a {
  background-image: none;
  display: block;
  padding: 0.15rlh 0.75rlh;
}

.entry-menu-links::before {
  content: "";
  border: 0.35rem solid transparent;
  border-bottom: 0.4rem solid #eee;
  border-top: 0;
  position: absolute;
  top: -0.4rem;
  left: 30%;
}

.entry-button > a,
.entry-button .entry-menu-button {
  background-color: #15c;
  border-radius: 0.25rem;
  color: #fff;
  display: flex;
  inline-size: 100cqw;
  padding-inline: 0;
  text-align: center;
  justify-content: center;
}

.entry-button .entry-menu-links {
  margin-block-start: 0.5rem;
  position: relative;
}

.entry-button .entry-menu-links::before {
  left: 50%;
}

.entry-menu:has(li:nth-last-child(n + 5)) {
  flex-basis: 100%;
}

.entry-menu-links:has(li:nth-last-child(n + 5)) {
  columns: 2;
  position: relative;
}

.entry-menu-links:has(li:nth-last-child(n + 5))::before {
  left: 15%;
}

.button-popover {
  all: unset;
  color: #15c;
  cursor: pointer;
  font: inherit;
  vertical-align: text-top;
}

.button-close {
  all: unset;
  cursor: pointer;
  font-family: ui-monospace, monospace;
  font-size: 2rem;
  text-box: trim-both cap alphabetic;
}

.button-popover:hover,
.button-popover:focus {
  all: unset;
  color: #900;
  cursor: pointer;
  vertical-align: text-top;
}

.button-close:hover,
.button-close:focus {
  all: unset;
  cursor: pointer;
  font-family: ui-monospace, monospace;
  font-size: 2rem;
  text-box: trim-both cap alphabetic;
}

.button-popover:focus-visible,
.button-close:focus-visible {
  box-shadow: 0 0 0 3px #2491ff;
}

.dialog-popover {
  border: none;
  border-radius: 0.25rem;
  inline-size: min(100% - 2rem, 60ch);
  max-block-size: 75dvh;
  overscroll-behavior: contain;
  opacity: 0;
  padding: 1rlh;
  text-wrap: pretty;
  transform: translateY(1em);
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out,
    overlay 0.3s ease-in-out allow-discrete,
    display 0.3s ease-in-out allow-discrete;
}

.dialog-popover::backdrop {
  background-color: oklch(0 0 0 / 0);
  transition: display 0.3s allow-discrete, overlay 0.3s allow-discrete,
    background-color 0.3s;
}

.dialog-popover td {
  vertical-align: top;
}

.dialog-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rlh;
}

.col-number {
  inline-size: 12ch;
}

.dialog-popover:popover-open {
  opacity: 1;
  transform: translateY(0);
}

.dialog-popover:popover-open::backdrop {
  background-color: oklch(0 0 0 / 0.7);
}

@starting-style {
  .dialog-popover:popover-open {
    opacity: 0;
    transform: translateY(-1em);
  }

  .dialog-popover:popover-open::backdrop {
    background-color: okclh(0 0 0 / 0);
  }
}

body:has(:popover-open) {
  overflow: hidden;
}

[hidden] {
  display: none;
}

@media (width>=45em) {
  .js-fi-container {
    row-gap: 0.5rlh;
  }

  .js-fi-label,
  .js-fi-inputs {
    flex-basis: 50%;
  }

  .js-fi-toggles,
  .js-fitc {
    flex-basis: max-content;
    padding-block: 0;
  }

  .entry {
    grid-template-columns: 2.5fr 0.5fr;
  }

  .entry-links *,
  .entry-button * {
    font-size: 0.9rem;
  }

  .entry-button {
    position: relative;
  }

  .entry-button .entry-menu-links {
    position: absolute;
    inset-inline-end: 0;
    inline-size: 100%;
    z-index: 99;
  }

  html[lang="es"] .entry-button .entry-menu-links {
    inset-inline-end: -1.5rem;
    inline-size: max-content;
  }

  .entry-button > a,
  .entry-button .entry-menu-button {
    inline-size: fit-content;
    min-inline-size: 25ch;
  }

  .entry-menu-links::before {
    left: 40%;
  }

  html[lang="es"] .entry-menu-links::before {
    left: 50%;
  }

  .entry-menu:has(li:nth-last-child(n + 5)) {
    flex-basis: auto;
  }

  .entry-menu-links:has(li:nth-last-child(n + 5)) {
    position: absolute;
    width: auto;
  }

  .entry-links .entry-menu-button::before,
  .entry-links .more-info::before {
    content: "";
    display: inline-block;
    block-size: 1.5cap;
    inline-size: 1.5cap;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16.749" height="16.06" viewBox="-0.375 -0.375 16.749 16.06"><path fill="none" stroke="%23EA4C3A" stroke-width=".75" stroke-linejoin="round" stroke-miterlimit="10" d="M8.067.207c.335.145.26.366.15 1.4-.115 1.074-.492 3.027-1.22 4.946-.73 1.92-1.814 3.805-2.758 5.202-.943 1.396-1.75 2.304-2.366 2.827-.618.522-1.044.66-1.323.71-.276.048-.402 0-.477-.14-.075-.14-.1-.374-.037-.65.063-.282.213-.607.64-1.024.43-.42 1.134-.93 2.116-1.408.98-.477 2.24-.92 3.272-1.22a23.117 23.117 0 0 1 2.54-.593 19.01 19.01 0 0 1 1.9-.268 10.74 10.74 0 0 1 3.34.254c.48.114.88.256 1.23.478.355.22.655.523.806.86.153.338.153.71.026.978-.126.268-.378.433-.667.523a1.67 1.67 0 0 1-1.007 0c-.39-.117-.846-.372-1.323-.71-.478-.337-.98-.755-1.635-1.407S9.813 9.428 9.133 8.57C8.456 7.706 7.9 6.87 7.52 6.16a9.06 9.06 0 0 1-.74-1.874A9.82 9.82 0 0 1 6.44 2.6c-.05-.525-.025-.99.025-1.36.05-.373.127-.65.252-.838s.303-.28.428-.325c.125-.05.203-.05.277-.06.075-.01.15-.035.266 0 .11.032.258.12.38.19z" vector-effect="non-scaling-stroke"/></svg>');
    background-repeat: no-repeat;
    background-size: 100%;
  }

  .entry-links .more-info::before {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%230f65ef"><path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0M5.496 6.033h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286a.237.237 0 0 0 .241.247m2.325 6.443c.61 0 1.029-.394 1.029-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94 0 .533.425.927 1.01.927z" vector-effect="non-scaling-stroke" /></svg>');
    margin-right: 0.25rlh;
  }
}

@media (width>=65em) {
  .js-fi-label,
  .js-fi-inputs {
    flex-basis: 55%;
  }
}

@media (hover: hover) {
  .entry-button > a:hover,
  .entry-button .entry-menu-button:hover {
    background-color: color-mix(in oklch, #15c, black 5%);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  :after,
  :before {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (scripting: none) {
  .js-fi-label,
  .js-fi-inputs {
    display: none;
  }
}

@media print {
  .js-fi-container {
    display: none;
  }

  .entry:not(:first-child) {
    border-top: 1px solid #bbb;
  }
}