/* Tick posts (EN + TH): ruler label, drawing/photo comparison and the
   host-use grouping. Soft Swiss: rounded card, pill controls, 12px
   tracked labels, theme tokens only (no hard-coded canvas colours). */
.tick-scale-label {
  margin-bottom: var(--space-2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--text-secondary);
}

.tick-compare {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: clamp(var(--space-4), 3vw, var(--space-5));
  margin: var(--space-5) 0 var(--space-3);
  background: var(--bg-card);
}
.tick-compare-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: var(--space-2);
}
.tick-compare-picker-wrap {
  display: grid;
  gap: var(--space-2);
  flex: 1 1 18rem;
  min-width: 0;
}
.tick-compare-picker-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--text-secondary);
}
.tick-compare-picker {
  position: relative;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.tick-compare-selected,
.tick-compare-stepper button {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--bg);
  color: var(--text-primary);
  font: inherit;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
/* global.css styles every <summary> as a small accent link with ⊕/⊖;
   the picker's summary is a field, so reset those here. */
.tick-compare .tick-compare-selected {
  display: block;
  position: relative;
  width: 100%;
  padding: 10px 44px 10px 18px;
  cursor: pointer;
  list-style: none;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
}
.tick-compare-selected::-webkit-details-marker { display: none; }
.tick-compare .tick-compare-selected::before { content: none; }
.tick-compare-selected::after {
  /* Same 1.75 round stroke as the .rd-arrow / .rd-ext icons. */
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  width: 14px;
  height: 14px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 6 8 10.5 12.5 6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 6 8 10.5 12.5 6'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: translateY(-50%);
  transition: transform 0.15s ease;
}
.tick-compare-picker[open] .tick-compare-selected::after { transform: translateY(-50%) rotate(180deg); }
.tick-compare-selected:hover,
.tick-compare-stepper button:not(:disabled):hover { border-color: var(--accent-border); }
.tick-compare-selected:focus-visible,
.tick-compare-stepper button:focus-visible,
.tick-compare-option:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.tick-compare-menu {
  position: absolute;
  z-index: 3;
  top: calc(100% + var(--space-1));
  left: 0;
  right: 0;
  max-height: 320px;
  overflow-y: auto;
  padding: var(--space-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-field);
  background: var(--bg);
  box-shadow: 0 12px 28px rgb(0 0 0 / 18%);
}
.tick-compare-option {
  display: block;
  width: 100%;
  min-height: 40px;
  padding: var(--space-2) var(--space-3);
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-primary);
  text-align: left;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}
.tick-compare-option:hover { background: var(--bg-card); }
.tick-compare-option[aria-current="true"] { background: var(--accent-muted); font-weight: 600; }

.tick-compare-stepper {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.tick-compare-stepper button {
  width: 44px;
  height: 44px;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
}
.tick-compare-stepper .rd-arrow { vertical-align: 0; }
.tick-compare-stepper button:disabled { opacity: 0.35; cursor: default; }
.tick-compare-stepper output {
  min-width: 3.4rem;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
}

/* Host-cycle line under the controls: replaces the repeated tick name. */
.tick-compare .tick-compare-host {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-4) 0 var(--space-3);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-secondary);
}
.tick-host-chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-control);
  background: var(--accent-muted);
  color: var(--accent-heading);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  white-space: nowrap;
}

.tick-compare-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}
.tick-compare .tick-compare-images figure { margin: 0; min-width: 0; }
/* Square frames on each image set's own canvas: the drawings sit on a pale
   blue square, the photos on white, so the frame edge disappears into the
   artwork instead of letterboxing it. Same in both themes; the artwork is
   fixed-colour. */
/* Doubled class: the blog's `.markdown-body a` (bottom-border underline)
   loads later at equal specificity and would erase the frame's bottom edge. */
.tick-compare .tick-compare-images a {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-field);
  background: #fff;
}
.tick-compare .tick-compare-images .tick-compare-drawing-link { background: rgb(231 238 250); }
.tick-compare .tick-compare-images a:hover { border-color: var(--accent-border); }
/* !important: the blog's `.markdown-body img { height: auto }` has equal
   specificity and loads later; without it, images squarer than the frame
   spill out over the caption. */
.tick-compare-images img { display: block; width: 100%; height: 100% !important; object-fit: contain; margin: 0 !important; border: 0 !important; border-radius: 0 !important; }
.tick-compare-images .tick-compare-soft-photo { gap: 4%; }
.tick-soft-crop {
  display: block;
  width: 46%;
  aspect-ratio: 6 / 5;
  flex: none;
  border-radius: 50%;
  background-image: url('/blog/ticks-and-travel-th/species/soft-photo.webp');
  background-size: 100% auto;
  background-repeat: no-repeat;
}
.tick-soft-crop-top { background-position: center top; }
.tick-soft-crop-bottom { background-position: center bottom; }
.tick-compare-images figcaption {
  margin-top: var(--space-2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--text-secondary);
  text-align: center;
}
@media (max-width: 540px) {
  .tick-compare-stepper { flex: 1 1 100%; justify-content: space-between; }
  .tick-compare-images { gap: var(--space-2); }
}

/* Host-use grouping (inside the folded section under the comparison). */
.tick-host-list { display: grid; gap: var(--space-4); margin: 0; }
.tick-host-list > div { display: grid; gap: var(--space-1); }
.tick-host-list dt { margin: 0 0 var(--space-1); }
.tick-host-list dd { margin: 0; font-size: 0.9rem; line-height: 1.6; }
.tick-host-list .tick-host-def { color: var(--text-secondary); }
/* Thai has no case, and tracking breaks up its vowel and tone marks. */
.tick-compare[data-lang="th"] .tick-host-chip,
.tick-compare[data-lang="th"] .tick-compare-picker-label,
.tick-compare[data-lang="th"] figcaption,
.tick-host-list:lang(th) .tick-host-chip,
.tick-scale-label:lang(th) { letter-spacing: 0; text-transform: none; }
.tick-compare[data-lang="th"] .tick-host-chip,
.tick-host-list:lang(th) .tick-host-chip { font-size: 13px; }
/* The host-use diagram, shown above its text restatement. Its own pale
   canvas reads as a plate on either theme; round it like the image frames. */
.markdown-body .tick-extra-figure .tick-host-figure { margin: 0 0 var(--space-5); }
.markdown-body .tick-host-figure img { border-radius: var(--radius-field); }
