/*
 * Date Idea Generator — three Alfred-style command bars, then a results grid.
 *
 * The form stays a readable column on a wide screen; the results use the full
 * wrap so three cards can sit in a row. Tailwind never scans public/, so this
 * file uses the semantic custom properties from src/styles/global.css directly.
 * Naming: .di-* (date ideas).
 */

.di-page {
  /* 4rem clears the fixed navbar (h-16 in Navbar.astro). */
  padding-top: calc(4rem + 1.25rem);
  padding-right: max(1rem, env(safe-area-inset-right, 0px));
  padding-bottom: calc(4rem + env(safe-area-inset-bottom, 0px));
  padding-left: max(1rem, env(safe-area-inset-left, 0px));
  min-height: 70vh;
  /* The tool paints above the footer, so an open list is never behind it. */
  position: relative;
  z-index: 1;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (min-width: 40rem) {
  .di-page {
    padding-top: calc(4rem + 2.5rem);
  }
}

/* The cookie notice is one row from `md` up, stacked on a phone. */
body:has(#cookie-banner:not([hidden])) .di-page {
  padding-bottom: calc(6rem + env(safe-area-inset-bottom, 0px));
}
@media (max-width: 48rem) {
  body:has(#cookie-banner:not([hidden])) .di-page {
    padding-bottom: calc(11rem + env(safe-area-inset-bottom, 0px));
  }
}

.di-wrap {
  max-width: 76rem;
  margin: 0 auto;
  /* How wide a line of text you are asked to type across. The three command
     bars keep to this; everything that is read rather than typed into — the
     folded search, the toolbar, the strip that stands in for the toolbar, the
     cards — takes the whole wrap, so the answer is as wide as the row of
     cards it belongs to. On a phone the cap is wider than the screen and none
     of it applies. */
  --di-col: 48rem;
}

#di-variant-b {
  width: 100%;
  margin-inline: auto;
}

.di-head {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 2rem;
}

.di-title {
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-fg-strong);
  margin: 0;
}

/* ---- the panels ---------------------------------------------------------- */

.di-variants {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.di-variant {
  min-width: 0;
  /* Dropdowns hang below the bars; nothing here may clip them, and the
     column is tall enough that the longest list (14 categories, 22rem) still
     ends above the footer before any results have arrived. */
  position: relative;
  min-height: 40rem;
}

/* ---- Variant B: the bar you are on, and the folded form ------------------ */

/* Dim what is in the row, not the bar. Opacity on .di-bar makes a compositor
   layer that some mobile browsers paint in DOM order, so bar 3 sat on top of
   bar 2's list even when bar 2 had z-index: 30 (the focus ring was there; the
   list was not). Search is never dimmed: once it is there it is the one thing
   left to press, and at half strength it looks switched off. */
.di-variant[data-variant="b"] .di-bar .di-bar-row > :not(.di-bar-btn),
.di-variant[data-variant="b"] .di-bar .di-under {
  opacity: 0.5;
}

.di-variant[data-variant="b"] .di-bar:focus-within .di-bar-row > *,
.di-variant[data-variant="b"] .di-bar:focus-within .di-under,
.di-variant[data-variant="b"] .di-bar:has(.di-drop:not([hidden])) .di-bar-row > *,
.di-variant[data-variant="b"] .di-bar:has(.di-drop:not([hidden])) .di-under {
  opacity: 1;
}

@media (hover: hover) and (pointer: fine) {
  .di-variant[data-variant="b"] .di-bar:hover .di-bar-row > *,
  .di-variant[data-variant="b"] .di-bar:hover .di-under {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .di-variant[data-variant="b"] .di-bar .di-bar-row > :not(.di-bar-btn),
  .di-variant[data-variant="b"] .di-bar .di-under {
    transition: opacity 140ms ease;
  }
}

/* The three bars, folded into one line after a search. */
.di-recap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.5rem;
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: var(--color-surface-raised);
  color: var(--color-fg-strong);
  font: inherit;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
}

.di-recap:hover {
  border-color: var(--color-border-strong);
}

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

.di-recap-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--color-surface-sunken);
  font-weight: 600;
  white-space: nowrap;
}

.di-recap-icon {
  font-size: 0.9em;
  line-height: 1;
}

.di-recap-edit {
  margin-left: auto;
  color: var(--color-link);
  font-size: 0.82rem;
  font-weight: 600;
}

.di-recap:hover .di-recap-edit {
  color: var(--color-link-hover);
}

/* ---- the bar ------------------------------------------------------------- */

.di-bars {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  position: relative;
  isolation: isolate;
  /* A bar you type a city into stays a readable column, and its list with it. */
  max-width: var(--di-col);
  margin-inline: auto;
}

/* Earlier bars stack above later ones, so a list that hangs down is never
   under the next bar. Focus still lifts the active one on top of both. */
.di-bars > .di-bar:nth-child(1) { z-index: 3; }
.di-bars > .di-bar:nth-child(2) { z-index: 2; }
.di-bars > .di-bar:nth-child(3) { z-index: 1; }

.di-bar {
  position: relative;
  border-radius: 18px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-raised);
  background: color-mix(in srgb, var(--color-surface-raised) 84%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow:
    0 14px 40px rgb(0 0 0 / 0.1),
    0 1px 2px rgb(0 0 0 / 0.06),
    inset 0 1px 0 rgb(255 255 255 / 0.55);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.dark .di-bar {
  box-shadow:
    0 18px 48px rgb(0 0 0 / 0.55),
    0 1px 2px rgb(0 0 0 / 0.5),
    inset 0 1px 0 rgb(255 255 255 / 0.06);
}

/* Same specificity as the nth-child stack above, so this wins when focused. */
.di-bars > .di-bar:focus-within {
  z-index: 30;
  border-color: var(--color-focus);
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--color-focus) 18%, transparent),
    0 18px 48px rgb(0 0 0 / 0.14),
    inset 0 1px 0 rgb(255 255 255 / 0.55);
}

.di-bar.is-locked {
  background: color-mix(in srgb, var(--color-surface-alt) 88%, transparent);
}

.di-bar.is-busy .di-bar-icon {
  animation: di-pulse 1.1s ease-in-out infinite;
}

@keyframes di-pulse {
  50% { opacity: 0.35; }
}

.di-bar-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 3.9rem;
  min-width: 0;
  padding: 0.55rem 0.9rem 0.55rem 1rem;
}

.di-bar-num {
  flex: none;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-size: 0.85rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.di-bar.is-locked .di-bar-num {
  background: var(--color-success);
  color: var(--color-surface);
}

.di-bar-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  color: var(--color-fg-muted);
  font-size: 1.15rem;
  line-height: 1;
}

.di-bar-icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

.di-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  flex: 0 1 auto;
  min-width: 0;
}

.di-chips:empty {
  display: none;
}

.di-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: min(14rem, 100%);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--color-accent) 55%, var(--color-border));
  background: var(--color-accent-soft);
  color: var(--color-fg-strong);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transform-origin: left center;
}

.di-chip .di-chip-icon {
  font-size: 0.95rem;
}

.di-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (prefers-reduced-motion: no-preference) {
  .di-chip {
    animation: di-chip-in 0.32s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  }
}

@keyframes di-chip-in {
  from {
    opacity: 0;
    transform: translateY(5px) scale(0.72);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.di-input {
  flex: 1 1 6rem;
  /* w-full from global.css is 100% of the row, which plus the number and
     icon overflows the bar. auto + min-width 0 lets it take the leftover. */
  width: auto;
  min-width: 0;
  /* Reset of the site's base input recipe (global.css @layer base): the bar
     carries the border, background and focus state. */
  border: 0;
  border-radius: 0;
  box-shadow: none;
  --tw-ring-shadow: 0 0 #0000;
  outline: none;
  background: transparent;
  color: var(--color-fg-strong);
  font-family: inherit;
  font-size: 1.32rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  padding: 0.25rem 0;
}

.di-input::placeholder {
  color: var(--color-fg-muted);
  opacity: 0.85;
  font-weight: 400;
}

.di-input:disabled {
  opacity: 0.5;
}

.di-bar.is-locked .di-input {
  font-size: 1rem;
}

.di-kbd {
  flex: none;
  font-family: inherit;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--color-fg-muted);
  border: 1px solid var(--color-border-strong);
  border-radius: 0.35rem;
  padding: 0.1rem 0.42rem;
  white-space: nowrap;
}

.di-bar-btn {
  flex: none;
  border: 0;
  border-radius: 0.7rem;
  padding: 0.5rem 0.95rem;
  background: var(--color-accent);
  color: var(--color-on-accent);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.di-bar-btn:hover {
  background: var(--color-accent-hover);
}

.di-bar-btn:active {
  transform: scale(0.97);
}

.di-bar-btn:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.di-bar-btn[hidden] {
  display: none;
}

/* The line under a bar: the resolved date, a nudge, or an error. */
.di-under {
  padding: 0 1rem 0.65rem 3.2rem;
  font-size: 0.86rem;
  line-height: 1.4;
  color: var(--color-fg-muted);
  min-height: 0;
}

.di-under:empty {
  display: none;
}

.di-under.is-ok {
  color: var(--color-fg-strong);
  font-weight: 600;
}

.di-under.is-err {
  color: var(--color-danger);
}

.di-bar[data-numbered] .di-under {
  padding-left: 5.4rem;
}

/* ---- dropdown ------------------------------------------------------------ */

.di-drop {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  z-index: 40;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  border-radius: 14px;
  border: 1px solid var(--color-border);
  /* Solid, not glass: the list can sit over hint text, the bars below it or
     the footer, and every row has to stay legible. */
  background: var(--color-surface-raised);
  box-shadow: 0 22px 60px rgb(0 0 0 / 0.18), 0 2px 6px rgb(0 0 0 / 0.08);
  max-height: 22rem;
  overflow-y: auto;
}

.dark .di-drop {
  box-shadow: 0 26px 70px rgb(0 0 0 / 0.7), 0 2px 6px rgb(0 0 0 / 0.5);
}

.di-drop[hidden] {
  display: none;
}

@media (prefers-reduced-motion: no-preference) {
  .di-drop {
    animation: di-drop-in 0.16s ease-out both;
  }
}

@keyframes di-drop-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.di-opt {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.7rem;
  border-radius: 0.6rem;
  cursor: pointer;
  color: var(--color-fg);
}

.di-opt + .di-opt {
  margin-top: 1px;
}

.di-opt.is-active {
  background: var(--color-accent-soft);
}

.di-opt-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 0.5rem;
  background: var(--color-surface-sunken);
  font-size: 1.05rem;
  line-height: 1;
  color: var(--color-fg-muted);
}

.di-opt-icon svg {
  width: 1.05rem;
  height: 1.05rem;
}

.di-opt-text {
  flex: 1;
  min-width: 0;
}

.di-opt-label {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-fg-strong);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.di-opt-label em {
  font-style: normal;
  font-weight: 400;
  color: var(--color-fg-muted);
}

.di-opt-sub {
  display: block;
  font-size: 0.8rem;
  color: var(--color-fg-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.di-opt .di-kbd {
  opacity: 0;
}

.di-opt.is-active .di-kbd {
  opacity: 1;
}

.di-drop-empty {
  padding: 0.8rem 0.9rem;
  font-size: 0.9rem;
  color: var(--color-fg-muted);
}

/* ---- time slider (inside the step-2 dropdown) ------------------------------- */

.di-drop-panel {
  display: block;
  padding: 0.35rem 0.4rem 0.2rem;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid var(--color-border);
}

.di-time {
  padding: 0.35rem 0.5rem 0.2rem;
}

.di-time-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.45rem;
}

.di-time-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-fg-muted);
}

.di-time-val {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-fg-strong);
  font-variant-numeric: tabular-nums;
}

.di-range {
  position: relative;
  height: 2rem;
  /* JS on the track drives both handles; native thumbs miss taps on iOS. */
  touch-action: none;
}

.di-range-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 6px;
  margin-top: -3px;
  border-radius: 999px;
  background: var(--color-border);
}

.di-range-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  background: var(--color-accent);
}

.di-range input[type="range"] {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  width: 100%;
  height: 2rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  --tw-ring-shadow: 0 0 #0000;
  -webkit-appearance: none;
  appearance: none;
  pointer-events: none;
}

.di-range input[type="range"]:focus {
  outline: none;
}

.di-range input[type="range"]::-webkit-slider-runnable-track {
  background: transparent;
  height: 2rem;
}

.di-range input[type="range"]::-moz-range-track {
  background: transparent;
}

.di-range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  pointer-events: none;
  width: 1.35rem;
  height: 1.35rem;
  margin-top: 0.325rem;
  border-radius: 999px;
  background: var(--color-surface-raised);
  border: 2px solid var(--color-fg-strong);
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.2);
  cursor: grab;
}

.di-range input[type="range"]::-moz-range-thumb {
  pointer-events: none;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: var(--color-surface-raised);
  border: 2px solid var(--color-fg-strong);
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.2);
  cursor: grab;
}

.di-range input[type="range"]:focus-visible::-webkit-slider-thumb {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.di-range input[type="range"]:focus-visible::-moz-range-thumb {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.di-range-ends {
  display: flex;
  justify-content: space-between;
  margin-top: 0.15rem;
  font-size: 0.72rem;
  color: var(--color-fg-muted);
  font-variant-numeric: tabular-nums;
}

/* ---- hint line under a variant ---------------------------------------------- */

.di-keys {
  margin: 0.8rem 0 0;
  font-size: 0.78rem;
  color: var(--color-fg-muted);
  text-align: center;
}

.di-keys b {
  font-weight: 600;
  color: var(--color-fg);
}

@media (hover: none), (pointer: coarse) {
  .di-keys,
  .di-kbd {
    display: none;
  }

  .di-bar {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: var(--color-surface-raised);
  }

  .di-opt {
    min-height: 2.75rem;
    padding: 0.7rem 0.75rem;
  }

  .di-hide,
  .di-unhide,
  .di-view,
  .di-menu-btn,
  .di-card-btn,
  .di-bar-row .di-bar-btn {
    min-height: 2.75rem;
  }

  .di-hide,
  .di-unhide,
  .di-card-btn {
    min-width: 2.75rem;
  }

  .di-range,
  .di-range input[type="range"] {
    height: 2.75rem;
  }

  .di-range input[type="range"]::-webkit-slider-thumb,
  .di-range input[type="range"]::-moz-range-thumb {
    width: 1.75rem;
    height: 1.75rem;
  }

  .di-range input[type="range"]::-webkit-slider-thumb {
    margin-top: 0.5rem;
  }

  .di-price .di-range,
  .di-price .di-range input[type="range"] {
    height: 2.75rem;
  }

  /* iPad is wider than 40rem but still zooms any field under 16px. */
  .di-input,
  .di-select {
    font-size: 16px;
  }

  .di-card-top {
    padding-right: 6.3rem;
  }
}

/* In the bar, not over the next one. A hanging list was ending up under
   bar 3 on phones (Today and the activity row painted in the same slot). */
@media (hover: none), (pointer: coarse), (max-width: 40rem) {
  .di-drop,
  .dark .di-drop {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    position: static;
    top: auto;
    left: auto;
    right: auto;
    z-index: auto;
    margin: 0;
    padding: 0.3rem 0.35rem 0.55rem;
    border: 0;
    border-top: 1px solid var(--color-border);
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    max-height: min(22rem, 55vh);
  }

  /* In-flow lists grow the page, so the desktop spacer is wasted scroll. */
  .di-variant {
    min-height: 0;
  }
}

/* ---- results ----------------------------------------------------------------- */

.di-results {
  margin-top: 1.5rem;
}

.di-results:empty {
  display: none;
}

/* The spinner and its line sit in the middle of the strip: while it is the
   only thing on the page, a line hugging the far left edge reads as a stray
   caption rather than the page working. */
.di-status {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.7rem;
  /* The shape of the toolbar it is waiting to become: the same width, the
     same corners, the same height, drawn as an outline until there is
     something to put in it. */
  min-height: 3.3rem;
  margin: 0 0 0.25rem;
  padding: 0.7rem 0.9rem;
  border-radius: 14px;
  border: 1px dashed var(--color-border-strong);
  color: var(--color-fg-muted);
  font-size: 0.95rem;
}

.di-status.is-err {
  color: var(--color-danger);
  border-color: var(--color-danger);
  border-style: solid;
  background: var(--color-danger-bg);
}

.di-spinner {
  flex: none;
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  border: 2px solid var(--color-border-strong);
  border-top-color: var(--color-fg-strong);
  animation: di-spin 0.8s linear infinite;
}

@keyframes di-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .di-spinner { animation-duration: 2.4s; }
}

/* A text-styled button: "3 hidden · Show", "Clear filters". */
.di-linkbtn {
  border: 0;
  padding: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--color-link);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.di-linkbtn:hover {
  color: var(--color-link-hover);
}

.di-linkbtn:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---- sort and filter ------------------------------------------------------------- */

.di-tools {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.1rem;
  padding: 0.7rem 0.9rem;
  /* Room for the eye in the corner, which sits over the row. */
  padding-right: 3.2rem;
  margin: 0 0 0.25rem;
  border-radius: 14px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-alt);
  font-size: 0.84rem;
}

/* ---- bring back what was hidden ------------------------------------------ */

.di-unhide {
  position: absolute;
  top: 0.55rem;
  right: 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.28rem 0.4rem;
  border: 1px solid var(--color-border);
  border-radius: 0.55rem;
  background: var(--color-surface);
  color: var(--color-fg-muted);
  cursor: pointer;
  line-height: 1;
}

.di-unhide:hover {
  color: var(--color-fg-strong);
  border-color: var(--color-border-strong);
}

.di-unhide svg {
  width: 1rem;
  height: 1rem;
}

.di-unhide-n {
  font-size: 0.7rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

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

/* ---- list or map ---------------------------------------------------------- */

.di-views {
  display: inline-flex;
  gap: 0.2rem;
  padding: 0.18rem;
  border-radius: 0.6rem;
  background: var(--color-surface-sunken);
  border: 1px solid var(--color-border);
}

.di-view {
  padding: 0.25rem 0.7rem;
  border: 0;
  border-radius: 0.45rem;
  background: transparent;
  color: var(--color-fg-muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.di-view:hover {
  color: var(--color-fg-strong);
}

.di-view.is-on {
  background: var(--color-fg-strong);
  color: var(--color-surface);
}

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

.di-map {
  height: 30rem;
  margin-top: 0.6rem;
  border-radius: 14px;
  border: 1px solid var(--color-border);
  overflow: hidden;
  /* Leaflet paints its own tiles; this only shows before they arrive. */
  background: var(--color-surface-sunken);
}

@media (max-width: 640px) {
  .di-map {
    height: 22rem;
  }
}
@media (min-width: 60rem) {
  .di-map {
    height: 36rem;
  }
}

/* Pins carry the category's emoji rather than Leaflet's marker images. */
.di-pin {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  border: 2px solid var(--color-surface);
  background: var(--color-surface-raised);
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.28);
  font-size: 1rem;
  line-height: 1;
}

.di-pin-icon {
  line-height: 1;
}

.di-pin-rank {
  position: absolute;
  top: -0.35rem;
  right: -0.35rem;
  min-width: 1.1rem;
  padding: 0 0.2rem;
  border-radius: 999px;
  background: var(--color-fg-strong);
  color: var(--color-surface);
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.15rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ---- Show / Type dropdowns ------------------------------------------------ */

.di-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.di-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 16rem;
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--color-border-strong);
  border-radius: 0.55rem;
  background: var(--color-surface);
  color: var(--color-fg-strong);
  font: inherit;
  font-size: 0.84rem;
  cursor: pointer;
}

.di-menu-btn.is-on {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}

.di-menu-btn:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.di-menu-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.di-menu-chev {
  flex: none;
  width: 0.9rem;
  height: 0.9rem;
  color: var(--color-fg-muted);
}

.di-menu-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.35rem);
  left: 0;
  min-width: 14rem;
  max-width: min(22rem, calc(100vw - 2rem));
  max-height: 18rem;
  overflow-y: auto;
  padding: 0.35rem;
  border: 1px solid var(--color-border);
  border-radius: 0.7rem;
  background: var(--color-surface);
  box-shadow: 0 12px 28px rgb(0 0 0 / 0.13);
}

.di-menu-opt {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.32rem 0.45rem;
  border-radius: 0.45rem;
  /* The base layer styles every <label> as block/text-sm-6/medium. */
  font-size: 0.84rem;
  font-weight: 400;
  line-height: 1.35;
  cursor: pointer;
}

.di-menu-opt:hover {
  background: var(--color-surface-sunken);
}

.di-menu-opt input[type="checkbox"] {
  /* Reset of the site's base input recipe (global.css @layer base), which is
     written for text fields: w-full plus px-4 py-3 blew the checkbox out to
     the width of the row and pushed the label off the panel. */
  flex: none;
  width: 0.95rem;
  height: 0.95rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border-radius: 0.2rem;
  box-shadow: none;
  --tw-ring-shadow: 0 0 #0000;
  accent-color: var(--color-accent);
}

.di-menu-opt-label {
  flex: 1 1 auto;
  min-width: 0;
}

.di-menu-n {
  flex: none;
  color: var(--color-fg-muted);
  font-variant-numeric: tabular-nums;
}

.di-menu-clear {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.35rem;
  border: 0;
  border-top: 1px solid var(--color-border);
  border-radius: 0;
  background: transparent;
  color: var(--color-link);
  font: inherit;
  font-size: 0.8rem;
  text-align: left;
  cursor: pointer;
}

.di-menu-clear:hover {
  color: var(--color-link-hover);
}

/* ---- walk time: the starting point, and the distance on every card -------- */

/* The control reuses the Show / Type button, with the walking figure in it. */
.di-origin-facet .di-menu-btn > svg {
  flex: none;
  width: 0.95rem;
  height: 0.95rem;
  color: var(--color-fg-muted);
}

.di-origin-facet .di-menu-btn.is-on > svg {
  color: var(--color-accent);
}

.di-origin-clear {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 1.4rem;
  height: 1.4rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--color-fg-muted);
  cursor: pointer;
}

.di-origin-clear svg {
  width: 0.8rem;
  height: 0.8rem;
}

.di-origin-clear:hover {
  background: var(--color-surface-sunken);
  color: var(--color-fg-strong);
}

.di-origin-clear:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

/* The corner of a card: the source stamp, then how far away it is. */
.di-foot-right {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.di-travel {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  white-space: nowrap;
}

.di-travel-bit {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
}

.di-travel-icon {
  flex: none;
  width: 0.95rem;
  height: 0.95rem;
}

/* ---- the window that asks where you are starting from --------------------- */

.di-origin {
  width: min(44rem, calc(100vw - 2rem));
  max-height: calc(100vh - 3rem);
  padding: 0;
  border: 1px solid var(--color-border-strong);
  border-radius: 18px;
  background: var(--color-surface-raised);
  color: var(--color-fg);
  box-shadow: 0 30px 80px rgb(0 0 0 / 0.35);
}

.di-origin::backdrop {
  background: rgb(0 0 0 / 0.55);
}

.di-origin-box {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.1rem 1.15rem 1.15rem;
}

.di-origin-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-fg-strong);
}

.di-origin-hint,
.di-origin-note,
.di-origin-at {
  margin: 0;
  font-size: 0.82rem;
  color: var(--color-fg-muted);
}

.di-origin-at {
  color: var(--color-fg-strong);
  font-weight: 600;
}

.di-origin-search {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.di-origin-input {
  flex: 1 1 14rem;
  min-width: 0;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--color-border-strong);
  border-radius: 0.6rem;
  background: var(--color-surface);
  color: var(--color-fg-strong);
  font: inherit;
  font-size: 0.92rem;
}

.di-origin-input:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 1px;
}

.di-origin-find,
.di-origin-here,
.di-origin-cancel {
  flex: none;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--color-border-strong);
  border-radius: 0.6rem;
  background: var(--color-surface);
  color: var(--color-fg-strong);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}

.di-origin-find:hover,
.di-origin-here:hover,
.di-origin-cancel:hover {
  border-color: var(--color-fg-muted);
}

.di-origin-find:disabled,
.di-origin-here:disabled {
  opacity: 0.5;
  cursor: progress;
}

.di-origin-find:focus-visible,
.di-origin-here:focus-visible,
.di-origin-cancel:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

/* What the search found: a short list, each one a place you can start from. */
.di-origin-hits {
  margin: 0;
  padding: 0.25rem;
  list-style: none;
  max-height: 11rem;
  overflow-y: auto;
  border: 1px solid var(--color-border);
  border-radius: 0.7rem;
  background: var(--color-surface);
}

.di-origin-hits[hidden] {
  display: none;
}

.di-origin-hit {
  display: block;
  width: 100%;
  padding: 0.45rem 0.55rem;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--color-fg);
  font: inherit;
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
}

.di-origin-hit:hover {
  background: var(--color-accent-soft);
}

.di-origin-hit:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: -2px;
}

.di-origin-map {
  height: 18rem;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  overflow: hidden;
  background: var(--color-surface-sunken);
}

/* No Leaflet, no map: the dialog still works by address, and says so. */
.di-origin-map.is-dead {
  display: grid;
  place-items: center;
  height: auto;
  min-height: 5rem;
  padding: 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-fg-muted);
}

/* The pin you are moving: a dot, not a teardrop, because it marks a point
   rather than pointing at one. */
.di-origin-pin {
  border-radius: 999px;
  background: var(--color-accent);
  border: 3px solid rgb(255 255 255 / 0.95);
  box-shadow: 0 0 0 2px rgb(0 0 0 / 0.3);
  cursor: grab;
}

.di-origin-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

@media (max-width: 640px) {
  .di-origin-map {
    height: 13rem;
  }

  .di-origin-find,
  .di-origin-here {
    flex: 1 1 auto;
  }
}

/* ---- price range ---------------------------------------------------------- */

.di-price {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.di-price-box {
  width: 12rem;
}

/* The shared .di-range track, at toolbar height. */
.di-price .di-range,
.di-price .di-range input[type="range"] {
  height: 1.6rem;
}

.di-price-val {
  min-width: 4.5rem;
  color: var(--color-fg-strong);
  font-weight: 600;
  white-space: nowrap;
}

.di-price.is-on .di-price-val {
  color: var(--color-accent);
}

.di-facet-name {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-fg-muted);
  margin-right: 0.15rem;
}

.di-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.di-select {
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--color-fg-strong);
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border-strong);
  border-radius: 0.55rem;
  padding: 0.3rem 1.7rem 0.3rem 0.6rem;
  box-shadow: none;
  --tw-ring-shadow: 0 0 #0000;
  cursor: pointer;
  /* Override global input { width: 100% } so Sort does not eat the toolbar. */
  width: auto;
  max-width: 100%;
}

.di-select:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 1px;
}

.di-showing {
  margin: 0.4rem 0 0;
  font-size: 0.8rem;
  color: var(--color-fg-muted);
}

.di-group {
  margin-top: 1.25rem;
}

.di-group-title {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0 0 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--color-fg-muted);
}

.di-group-title .di-count {
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

/* Three across, and fewer as the column narrows. auto-fill with a floor keeps
   a row of two from stretching into two half-page cards. */
.di-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 0.85rem;
  align-items: stretch;
}

@media (max-width: 60rem) {
  .di-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 40rem) {
  .di-cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .di-title {
    font-size: 1.6rem;
  }

  .di-head {
    margin-bottom: 1.25rem;
  }

  .di-input {
    font-size: 16px; /* iOS zooms the page when a focused field is smaller. */
  }

  .di-select {
    font-size: 1rem;
    min-height: 2.75rem;
  }

  /* Chips, a field and Search do not fit one line on a phone. Search stays on
     the chips' line, at the end where the ↵ would be, and the field drops to
     a line of its own under the chips. */
  .di-bar-row:has(> .di-bar-btn:not([hidden])) {
    flex-wrap: wrap;
  }

  /* The chips take what that line has left and wrap inside it, so a second
     chip, or a narrow phone, never pushes Search down a line. */
  .di-bar-row:has(> .di-bar-btn:not([hidden])) > .di-chips {
    flex: 1 1 0;
  }

  .di-bar-row:has(> .di-bar-btn:not([hidden])) > .di-input {
    order: 1;
    flex-basis: 100%;
    /* The number, the icon and the two gaps after them. */
    margin-left: calc(1.75rem + 1.6rem + 2 * 0.6rem);
  }

  .di-tools {
    flex-direction: column;
    align-items: stretch;
    gap: 0.7rem;
    padding: 0.75rem 0.8rem;
    padding-right: 0.8rem;
  }

  .di-unhide {
    position: static;
    align-self: flex-end;
  }

  .di-views,
  .di-sort,
  .di-menu,
  .di-price {
    width: 100%;
  }

  .di-views {
    display: flex;
  }

  .di-view {
    flex: 1;
  }

  .di-price-box {
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
  }

  .di-menu-btn {
    max-width: none;
    flex: 1;
    min-height: 2.75rem;
  }

  .di-menu-panel {
    position: static;
    min-width: 0;
    max-width: none;
    max-height: 14rem;
    margin-top: 0.35rem;
  }

  .di-recap-chip {
    white-space: normal;
    max-width: 100%;
  }

  .di-range-ends span:nth-child(2),
  .di-range-ends span:nth-child(3) {
    display: none;
  }
}

/* The picture the page named for itself. A fixed ratio so a row of three
   lines up whatever shape the sources send, and a tinted ground so a slow or
   transparent image does not flash white on a dark page. */
.di-shot {
  display: grid;
  place-items: center;
  margin: -0.95rem -1.05rem 0.85rem;
  border-radius: 15px 15px 0 0;
  overflow: hidden;
  background: var(--color-surface-sunken);
  aspect-ratio: 16 / 9;
}

/* The category's mark, showing only where there is no picture over it. */
.di-shot-mark {
  grid-area: 1 / 1;
  font-size: 1.6rem;
  opacity: 0.35;
  line-height: 1;
}

.di-shot img {
  grid-area: 1 / 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Whose picture it is. Wikimedia photographs and map tiles are lent under
   licences that ask to be named, and the name belongs on the picture rather
   than in a note at the foot of a page nobody reads. Small, in its own shade,
   out of the way of the picture. */
.di-shot-credit {
  grid-area: 1 / 1;
  align-self: end;
  justify-self: stretch;
  padding: 0.9rem 0.5rem 0.25rem;
  background: linear-gradient(transparent, rgb(0 0 0 / 0.55));
  color: rgb(255 255 255 / 0.82);
  font-size: 0.66rem;
  line-height: 1.2;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.di-card {
  position: relative;
  border-radius: 16px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-raised);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.08);
  transition: box-shadow 0.12s, transform 0.12s, border-color 0.12s, opacity 0.12s;
}

.dark .di-card {
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.5);
}

.di-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0.95rem 1.05rem 0.9rem;
  border-radius: inherit;
  color: inherit;
  text-decoration: none;
}

/* Every card is the same height, so every part of one is given a height
   rather than merely capped at one: two lines of title, one of meta, three of
   summary, one row of tags. Short text leaves the rest of its lines blank,
   which is the price of a row that lines up — and past those lines a card is a
   teaser for the page it links to, not the page itself.
   `em` so each block tracks its own font-size; the line counts below are that
   block's line-height multiplied out. */
.di-card-title,
.di-card-meta,
.di-card-sum {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.di-card-title {
  -webkit-line-clamp: 2;
  height: 2.6em; /* 2 × 1.3 */
}

.di-card-meta {
  -webkit-line-clamp: 1;
  height: 1.4em; /* 1 × 1.4 */
}

.di-card-sum {
  -webkit-line-clamp: 3;
  height: 4.5em; /* 3 × 1.5 */
}

.di-card-tags {
  height: 1.55rem;
  overflow: hidden;
}

/* Whatever slack the row leaves goes above the link line, so the foot of
   every card lines up across the row. */
.di-card-foot {
  margin-top: auto;
}

.di-card:has(a.di-card-link:hover) {
  border-color: var(--color-border-strong);
  box-shadow: 0 6px 18px rgb(0 0 0 / 0.14);
}

a.di-card-link:hover {
  text-decoration: none;
}

a.di-card-link:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: no-preference) {
  .di-card:has(a.di-card-link:hover) {
    transform: translateY(-2px);
  }

  .di-card {
    animation: di-card-in 0.28s ease-out both;
  }

  .di-card.is-leaving {
    animation: di-card-out 0.22s ease-in both;
    pointer-events: none;
  }
}

@keyframes di-card-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes di-card-out {
  to {
    opacity: 0;
    transform: translateX(14px) scale(0.98);
  }
}

/* Calendar and the eye sit over the top-right corner, outside the link. */
.di-card-tools {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  gap: 0.25rem;
}

.di-card:has(.di-cal-menu:not([hidden])) {
  z-index: 6;
}

.di-card-btn {
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  border: 0;
  border-radius: 0.55rem;
  background: transparent;
  color: var(--color-fg-muted);
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.12s, background 0.12s, color 0.12s;
}

.di-card-btn svg {
  width: 1.1rem;
  height: 1.1rem;
}

.di-card:hover .di-card-btn,
.di-card-btn:focus-visible,
.di-cal-btn[aria-expanded="true"] {
  opacity: 1;
}

/* Over a photo the muted grey disappears, so on a card with a picture the
   buttons get a dark disc to sit on, in both themes. */
.di-card:has(.di-shot img) .di-card-btn {
  background: rgb(0 0 0 / 0.45);
  color: #fff;
  opacity: 0.75;
}

.di-card:has(.di-shot img):hover .di-card-btn,
.di-card:has(.di-shot img) .di-card-btn:focus-visible,
.di-card:has(.di-shot img) .di-cal-btn[aria-expanded="true"] {
  background: rgb(0 0 0 / 0.65);
  opacity: 1;
}

.di-card-btn:hover {
  background: var(--color-surface-sunken);
  color: var(--color-fg-strong);
}

.di-card-btn:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 1px;
}

@media (hover: none), (pointer: coarse) {
  .di-card-btn {
    opacity: 0.8;
  }
}

.di-cal {
  position: relative;
}

.di-cal-menu {
  position: absolute;
  z-index: 4;
  top: calc(100% + 0.3rem);
  right: 0;
  min-width: 11.5rem;
  padding: 0.3rem;
  border: 1px solid var(--color-border);
  border-radius: 0.7rem;
  background: var(--color-surface);
  box-shadow: 0 12px 28px rgb(0 0 0 / 0.13);
}

.di-cal-menu button,
.di-cal-menu a {
  display: block;
  width: 100%;
  padding: 0.5rem 0.7rem;
  border: 0;
  border-radius: 0.45rem;
  background: transparent;
  color: var(--color-fg-strong);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.di-cal-menu button:hover,
.di-cal-menu a:hover,
.di-cal-menu button:focus-visible,
.di-cal-menu a:focus-visible {
  background: var(--color-surface-sunken);
}

.di-cal-menu a:focus-visible,
.di-cal-menu button:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 1px;
}

@media (hover: none), (pointer: coarse) {
  .di-cal-menu button,
  .di-cal-menu a {
    min-height: 2.75rem;
  }
}

.di-card.is-hidden {
  opacity: 0.55;
  border-style: dashed;
}

.di-card.is-hidden .di-hide {
  opacity: 1;
  color: var(--color-fg-strong);
}

.di-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
  padding-right: 4.6rem;
}

.di-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--color-surface-sunken);
  color: var(--color-fg-muted);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.di-tag.is-curated {
  background: var(--color-accent-soft);
  color: var(--color-fg-strong);
}

/* Ranked answers ("All") only: the place this one took, ahead of what it is. */
.di-card-lead {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.di-rank {
  display: inline-grid;
  place-items: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.35rem;
  border-radius: 0.45rem;
  background: var(--color-fg-strong);
  color: var(--color-surface);
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.di-when {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--color-fg-strong);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.di-card-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-fg-strong);
}

.di-card-meta {
  margin: 0.25rem 0 0;
  font-size: 0.86rem;
  color: var(--color-fg-muted);
  line-height: 1.4;
}

.di-card-meta b {
  font-weight: 600;
  color: var(--color-fg);
}

.di-card-sum {
  margin: 0.45rem 0 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--color-fg);
}

.di-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding-top: 0.6rem;
  font-size: 0.8rem;
  color: var(--color-fg-muted);
}

.di-card-foot .di-link {
  color: var(--color-link);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

a.di-card-link:hover .di-link {
  color: var(--color-link-hover);
  text-decoration: underline;
}

.di-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0.5rem 0 0;
}

.di-ctag {
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  font-size: 0.72rem;
  color: var(--color-fg-muted);
  text-transform: lowercase;
}

.di-empty {
  padding: 1.6rem 1.2rem;
  border-radius: 14px;
  border: 1px dashed var(--color-border-strong);
  text-align: center;
  color: var(--color-fg-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.di-empty b {
  color: var(--color-fg-strong);
  font-weight: 600;
}

.di-note {
  margin: 0.8rem 0 0;
  font-size: 0.82rem;
  color: var(--color-fg-muted);
}

.di-credit {
  max-width: 48rem;
  margin: 3rem auto 0;
  text-align: center;
  font-size: 0.78rem;
  color: var(--color-fg-muted);
}

.di-credit a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.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;
}
