/* Shared interface for the report and server-rendered pages. */
:root {
  color-scheme: dark;
  --page: #0a0a0a;
  --surface: #18181b;
  --chip: #27272a;
  --chip-on: #c2410c;
  --ink: #ededed;
  --ink-2: #d4d4d8;
  --muted: #a1a1aa;
  --grid: #27272a;
  --axis: #3f3f46;
  --ring: #27272a;
  --series-1: #fb923c;
  --series-1-wash: #47280e;
  --up: #4ade80;
  --down: #fb7185;
  --accent: #fb923c;
  --other: #52525b;
  --hover-row: var(--page);
  --sel-row: #30271f;
  --tip-ink: #09090b;
  --table-head: #09090b;
}
* {
  box-sizing: border-box;
}
html {
  background: var(--page);
  scroll-padding-top: 24px;
}
body {
  margin: 0;
  color: var(--ink);
  font:
    15px / 1.65 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Noto Sans TC",
    "PingFang TC",
    sans-serif;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button,
input,
select,
textarea {
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--axis);
  border-radius: 8px;
}
button,
select {
  min-height: 38px;
  padding: 7px 12px;
}
button {
  cursor: pointer;
}
button:hover {
  border-color: var(--accent);
}
button:disabled,
select:disabled {
  cursor: default;
  opacity: 0.5;
}
input,
textarea {
  padding: 9px 12px;
}
input[type="checkbox"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}
textarea {
  width: 100%;
  max-width: 40rem;
  display: block;
  margin-top: 8px;
  resize: vertical;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
[hidden] {
  display: none;
}
.wrap {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}
h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}
h1 {
  font-size: 34px;
  line-height: 1.35;
  letter-spacing: -0.035em;
  margin: 8px 0;
  font-weight: 700;
}
h2 {
  font-size: 20px;
  line-height: 1.4;
}
h3 {
  font-size: 16px;
}
.dek {
  color: var(--ink-2);
  margin: 6px 0 0;
  max-width: 48em;
  font-size: 14px;
}
.note {
  font-size: 13px;
  color: var(--muted);
  margin: 6px 0 12px;
  max-width: 60em;
}
p.body {
  color: var(--ink-2);
  max-width: 52em;
}
.muted {
  color: var(--muted);
}
.up,
.delta.up {
  color: var(--up);
}
.down,
.delta.down {
  color: var(--down);
}
.delta {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-weight: 550;
}
.delta.na {
  color: var(--muted);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: 8px;
  left: 12px;
  transform: translateY(-150%);
  padding: 8px 16px;
  background: var(--surface);
  z-index: 50;
  border-radius: 6px;
}
.skip-link:focus {
  transform: none;
}
/* Navigation: primary reading destinations, with utilities in a menu. */
.site {
  background: var(--page);
  border-bottom: 1px solid var(--grid);
}
.site-inner {
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 44px;
}
.brand {
  display: inline-flex;
  flex: none;
  align-items: center;
  color: var(--ink);
}
.brand:hover {
  text-decoration: none;
}
.brand-logo {
  display: block;
  width: 182.9px;
  height: 54px;
  max-width: calc(100vw - 76px);
}
.site-nav {
  display: flex;
  gap: 26px;
  align-self: stretch;
  align-items: stretch;
}
.site-nav a {
  display: flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  padding: 2px 0 0;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}
.site-nav a:hover {
  color: var(--ink);
  text-decoration: none;
}
.site-nav a.on {
  color: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}
.site-tools {
  margin-left: auto;
  display: flex;
  gap: 20px;
  align-items: center;
  font-size: 13px;
}
.site-tools .who {
  color: var(--muted);
}
.site-tools .who:empty {
  display: none;
}
.login-link {
  display: block;
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--ink-2);
  font-size: 14px;
  white-space: nowrap;
}
.login-link:hover {
  background: var(--chip);
  color: var(--ink);
  text-decoration: none;
}
/* The signed-in account: a round picture that opens a menu (as on tag.observe.tw). */
.account {
  position: relative;
  display: flex;
}
.account-button {
  display: flex;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  cursor: pointer;
}
.account-button:hover {
  box-shadow: 0 0 0 2px var(--series-1-wash);
}
.account-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.avatar {
  position: relative;
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: var(--size, 36px);
  height: var(--size, 36px);
  border-radius: 999px;
  overflow: hidden;
  background: var(--series-1-wash);
  color: var(--accent);
  font-size: calc(var(--size, 36px) * 0.4);
  font-weight: 500;
}
.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.account-menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 30;
  width: 240px;
  margin-top: 8px;
  padding: 8px;
  border: 1px solid var(--axis);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 24px rgb(0 0 0 / 0.5);
  font-size: 14px;
  text-align: left;
}
.account-menu[hidden] {
  display: none;
}
.account-who {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px;
}
.account-who > div {
  min-width: 0;
}
.account-who p {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-name {
  color: var(--ink);
  font-weight: 500;
}
.account-sub {
  color: var(--muted);
  font-size: 12px;
}
.account-who .account-role {
  margin-top: 4px;
}
.account-menu a,
.account-menu button {
  display: block;
  width: 100%;
  padding: 6px 8px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--ink-2);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.account-menu a:hover,
.account-menu button:hover {
  background: var(--chip);
  color: var(--ink);
  text-decoration: none;
}
.account-menu form {
  display: block;
}
.site-tools form {
  display: inline;
}
/* Every page: a title with one line on what it is for and its actions on the
   right, then one row of filters. */
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px 24px;
  padding: 0 0 20px;
}
main.wrap {
  padding-top: 24px;
}
.page-head h1 {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
}
.page-head .dek {
  max-width: 60rem;
}
.page-head .sep {
  margin: 0 8px;
}
.method-link {
  white-space: nowrap;
}
.page-head .dek {
  margin: 4px 0 0;
  color: var(--muted);
}
.page-head .dek .tags {
  margin-left: 12px;
  vertical-align: 1px;
}
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 14px;
  white-space: nowrap;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
}
.toolbar-form {
  display: contents;
}
.toolbar .search-field {
  flex: 1 1 260px;
}
.select-field {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding-left: 12px;
  border: 1px solid var(--axis);
  border-radius: 8px;
  background: var(--surface);
}
.select-field:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.select-field span {
  flex: none;
  font-size: 12px;
  color: var(--muted);
}
.select-field select {
  min-width: 0;
  max-width: 260px;
  min-height: 38px;
  padding: 7px 10px 7px 8px;
  border: 0;
  background: transparent;
}
.select-field select:focus-visible {
  outline: none;
}
.page-head + .block,
.toolbar + .block {
  padding-top: 0;
}
.results-line {
  margin: 0 0 10px;
  color: var(--ink-2);
  font-size: 13px;
}
.search-field {
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  min-width: 0;
  flex: 1;
  border: 1px solid var(--axis);
  border-radius: 8px;
  color: var(--muted);
}
.search-field:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.search-field svg {
  flex: none;
}
.search-field input {
  min-width: 0;
  width: 100%;
  height: 38px;
  padding: 8px 0;
  background: transparent;
  border: 0;
  outline: none;
}
.search-field input::-webkit-search-cancel-button {
  display: none;
}
.search-field button {
  flex: none;
  border: 0;
  padding: 0;
  min-height: 32px;
  width: 30px;
  color: var(--muted);
}
.search-field button:hover {
  color: var(--accent);
}
button[aria-pressed="true"] {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--sel-row);
}
button.quiet {
  color: var(--ink-2);
  border-color: var(--grid);
  font-size: 12px;
  white-space: nowrap;
  min-height: 32px;
  padding: 4px 10px;
}
button.primary {
  color: var(--surface);
  background: var(--accent);
  border-color: var(--accent);
  padding-inline: 20px;
  font-weight: 600;
}
/* Compact shared tables. Keep the columns readable at every screen width. */
.table-frame {
  position: relative;
  isolation: isolate;
  max-width: 100%;
  border: 1px solid var(--grid);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}
.table-frame::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 40px;
  background: linear-gradient(to right, transparent, #09090b80);
  pointer-events: none;
  z-index: 6;
  opacity: 0;
}
.table-frame[data-scroll-x="start"]::after,
.table-frame[data-scroll-x="middle"]::after {
  opacity: 1;
}
.scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-color: var(--axis) var(--surface);
  scrollbar-width: thin;
}
.scroll:focus-visible {
  outline-offset: -3px;
}
table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: 14px;
  line-height: 20px;
  font-variant-numeric: tabular-nums;
}
th,
td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--grid);
  white-space: nowrap;
  text-align: right;
  vertical-align: middle;
  background: var(--surface);
}
tbody tr:last-child td {
  border-bottom: 0;
}
th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  background: var(--table-head);
}
.table-head-follow {
  position: relative;
  z-index: 5;
  transform: translateY(var(--head-offset, 0px));
}
th button {
  padding: 0;
  font: inherit;
  color: inherit;
  min-height: 24px;
  background: transparent;
  border: 0;
  white-space: nowrap;
}
th button:hover {
  color: var(--ink);
}
th .arrow {
  margin-left: 4px;
  color: var(--muted);
  font-size: 11px;
}
th .arrow.active {
  color: var(--accent);
}
td.l,
th.l {
  text-align: left;
}
td.rank,
th.rank,
.table-rank {
  text-align: center;
  padding-inline: 4px;
  width: 40px;
  min-width: 40px;
  max-width: 40px;
  color: var(--muted);
}
.table-rank,
.table-lead {
  position: sticky;
  left: 0;
  z-index: 2;
}
.with-rank .table-lead {
  left: 40px;
}
.table-lead-box {
  display: block;
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.scroll[data-scroll-x="middle"] .table-lead,
.scroll[data-scroll-x="end"] .table-lead {
  box-shadow: 6px 0 8px -6px #000000cc;
}
tbody tr[data-site] {
  cursor: pointer;
}
tbody tr:hover td {
  background: var(--hover-row);
}
tbody tr.hl td {
  background: var(--sel-row);
}
.site-identity {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
}
/* The site icon sits on a tile with the name's first letter, which shows where there is no icon. */
.favicon {
  position: relative;
  flex: none;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-right: -2px;
  border-radius: 4px;
  overflow: hidden;
  background: hsl(var(--hue, 0) 30% 24%);
  color: hsl(var(--hue, 0) 60% 82%);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}
.favicon::before {
  content: attr(data-letter);
}
.favicon img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--surface);
}
.page-head .dek .favicon {
  margin-right: 8px;
  vertical-align: -3px;
}
.site-name {
  font-weight: 500;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  max-width: 100%;
  flex-shrink: 0;
}
button.site-name {
  font: inherit;
  font-weight: 500;
  background: transparent;
  border: 0;
  padding: 0;
  min-height: 0;
  text-align: left;
  white-space: nowrap;
}
.site-name:hover {
  color: var(--accent);
}
.site-identity.stacked {
  align-items: center;
}
.site-lines {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.site-lines .site-domain {
  line-height: 14px;
}
.site-domain {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 3;
}
.tag {
  display: inline-block;
  flex-shrink: 0;
  font-size: 10px;
  line-height: 16px;
  color: var(--muted);
  background: var(--page);
  border: 1px solid var(--grid);
  border-radius: 4px;
  padding: 0 4px;
  margin-left: 6px;
  font-weight: 400;
}
.site-identity .tag {
  margin-left: 0;
}
.tag.untracked {
  border-style: dashed;
}
/* Similarity bar on the discover page: filled share of 100%. */
.grade {
  display: inline-block;
  width: 56px;
  height: 6px;
  margin-right: 6px;
  border-radius: 3px;
  background: var(--axis);
  vertical-align: middle;
  overflow: hidden;
}
.grade i {
  display: block;
  height: 100%;
  background: var(--series-1);
}
/* Tags stay on the row's one line. Table cells scroll independently. */
.tags {
  display: inline-flex;
  gap: 4px;
  max-width: 260px;
  overflow: hidden;
  white-space: nowrap;
}
.tags .tag {
  margin-left: 0;
}
/* A site as its logo alone (logoChip); .sm for table cells. */
.logos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}
.logo-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--axis);
  border-radius: 10px;
  background: var(--surface);
}
a.logo-chip:hover {
  border-color: var(--accent);
}
.logo-chip.untracked {
  border-style: dashed;
  border-color: var(--other);
}
.logo-chip .favicon,
.page-head .dek .logo-chip .favicon {
  width: 28px;
  height: 28px;
  margin: 0;
  border-radius: 6px;
  font-size: 14px;
}
.logos.sm {
  flex-wrap: nowrap;
  gap: 6px;
  margin: 0;
}
.logos.sm .logo-chip {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}
.logos.sm .logo-chip .favicon {
  width: 20px;
  height: 20px;
  font-size: 11px;
}
.with-logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.with-logo .favicon {
  margin-right: 0;
}
.page-head .dek .tag {
  font-size: 14px;
  line-height: 20px;
}
td .tags {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--muted) transparent;
}
td .tags:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.radar {
  color: var(--ink-2);
  font-size: 12px;
}
.ranking-table {
  min-width: 640px;
}
.estimate {
  cursor: help;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}
.ranking-table .traffic-cell {
  font-weight: 500;
}
.unit {
  margin-left: 1px;
  font-size: 0.85em;
  font-weight: 400;
  color: var(--muted);
}
.trend-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}
.trend-cell .delta {
  min-width: 64px;
}
.spark-cell {
  display: inline-flex;
  width: 64px;
  height: 24px;
  flex: 0 0 64px;
}
.spark-cell .line {
  stroke-width: 1.5;
}
.empty {
  text-align: center;
  color: var(--muted);
  padding: 48px 18px;
  white-space: normal;
}
.empty strong {
  display: block;
  color: var(--ink-2);
  font-weight: 600;
  font-size: 16px;
}
.empty p {
  margin: 8px 0 16px;
  font-size: 13px;
}
.loading-state {
  padding: 64px 20px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}
.loading-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  border-radius: 100%;
  background: var(--accent);
}
.data-stamp {
  text-align: right;
  color: var(--muted);
  font-size: 11px;
  margin: 14px 0 0;
}
/* Ranking history stays visible below the table. */
.trajectory {
  border-width: 1px 0 0;
  border-radius: 0;
  padding: 0;
  margin: 0;
}
.trajectory {
  padding-bottom: 16px;
}
/* Server-rendered views and forms. */
section.block {
  padding: 24px 0 8px;
}
section.block > h2,
section.block > header h2 {
  font-size: 20px;
  margin: 0 0 12px;
}
section.block > header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
section.block h2 small {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 10px;
}

/* Summary cards and the section pills follow tag.observe.tw/media/. */
.subnav {
  display: flex;
  width: fit-content;
  max-width: 100%;
  gap: 4px;
  padding: 4px;
  margin: 0 0 20px;
  border-radius: 8px;
  background: var(--surface);
  overflow-x: auto;
}
.subnav a {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}
.subnav a:hover {
  color: var(--ink);
  text-decoration: none;
}
.subnav a[aria-current="page"] {
  background: #3f3f46;
  color: #fff;
  font-weight: 500;
}
.chip-rows {
  margin: 0 0 20px;
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
}
.chip-filter,
.chip-more,
.tag-vote-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 4px 12px;
  border: 0;
  border-radius: 999px;
  background: var(--chip);
  color: var(--ink-2);
  font-size: 14px;
  line-height: 20px;
  white-space: nowrap;
}
.chip-filter span {
  color: var(--muted);
}
.chip-filter:hover,
.chip-more:hover {
  color: #fff;
  text-decoration: none;
}
.chip-filter[aria-current="true"],
.chip-filter[aria-pressed="true"],
.tag-vote-chip.selected {
  background: var(--chip-on);
  color: #fff;
}
.chip-filter[aria-current="true"] span,
.chip-filter[aria-pressed="true"] span {
  color: #ffffffcc;
}
.chip-filter.excluded,
.tag-vote-chip.excluded {
  background: #7f1d1d;
  color: #fecaca;
}
.chip-filter.excluded span {
  color: #fecacacc;
}
.chip-note {
  align-self: center;
  margin-left: 6px;
  font-size: 12px;
  color: var(--muted);
}
.chip-more {
  display: none;
  background: transparent;
  color: var(--accent);
}
.js .chip-more {
  display: inline-flex;
}
.js .chip-row:not(.open) > .extra {
  display: none;
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin: 0 0 20px;
}
.stats > div {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--grid);
  border-radius: 12px;
  padding: 16px;
}
.stats span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.stats b {
  display: block;
  margin-top: 4px;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}
.stats b small {
  margin-left: 6px;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}
.stats b .delta {
  font-size: inherit;
}
.stats > div > small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.chart-box {
  background: var(--surface);
  border: 1px solid var(--grid);
  border-radius: 10px;
  padding: 20px 18px 12px;
}
.chart-box h3 {
  margin: 0;
  font-size: 14px;
}
.chart-box .note {
  margin: 0 0 8px;
}
svg .dot.sheet {
  fill: var(--surface);
  stroke: var(--series-1);
  stroke-width: 1.5;
}
svg .hit {
  fill: transparent;
  cursor: crosshair;
}
.flash {
  border-left: 3px solid var(--accent);
  background: var(--surface);
  padding: 14px 18px;
  margin: 16px 0;
  border-radius: 0 8px 8px 0;
  font-size: 14px;
}
form.inline {
  display: inline;
}
.form {
  background: var(--surface);
  border: 1px solid var(--grid);
  border-radius: 12px;
  padding: 24px;
  margin: 16px 0 0;
  max-width: 48rem;
}
.form .row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  margin-top: 18px;
  font-size: 14px;
}
.form label {
  font-size: 14px;
  color: var(--ink-2);
  max-width: 100%;
}
.form input {
  max-width: 100%;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0;
}
/* Tags pages: a cloud sized by cumulative visits or site count, and chips. */
.cloud {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 18px;
  padding: 20px 22px;
  border: 1px solid var(--grid);
  border-radius: 12px;
  line-height: 1.25;
}
.cloud a {
  --k: var(--v);
  font-size: calc(13px + var(--k) * 26px);
  font-weight: calc(400 + var(--k) * 300);
  color: color-mix(in srgb, var(--accent) calc(var(--k) * 100%), var(--muted));
  white-space: nowrap;
  transition: font-size 0.2s;
}
.cloud[data-by="sites"] a {
  --k: var(--s);
}
.cloud a small {
  margin-left: 2px;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  vertical-align: super;
}
.cloud a:hover {
  color: var(--ink);
  text-decoration: none;
}
.seg {
  display: inline-flex;
}
.seg button {
  min-height: 30px;
  padding: 2px 12px;
  font-size: 12px;
  border-radius: 0;
}
.seg button:first-child {
  border-radius: 6px 0 0 6px;
}
.seg button:last-child {
  margin-left: -1px;
  border-radius: 0 6px 6px 0;
}
.chips a {
  font-size: 13px;
  border: 1px solid var(--grid);
  border-radius: 999px;
  padding: 4px 12px;
  color: var(--ink-2);
}
.chips a:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}
.chips a small {
  margin-left: 6px;
  color: var(--muted);
}
.links-inline {
  display: inline-flex;
  gap: 16px;
}
.leaders {
  display: block;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
}
.leaders a {
  color: var(--ink-2);
}
.stats b a {
  color: inherit;
}
.stats b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* API documentation, laid out like tag.observe.tw/api/: content with a sticky outline on the right. */
.doc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -8px 0 8px;
}
.doc-links a {
  padding: 4px 12px;
  border: 1px solid var(--axis);
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 14px;
}
.doc-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}
.doc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 48px;
  align-items: start;
}
.doc-toc {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 8px 0 8px 14px;
  border-left: 1px solid var(--grid);
  font-size: 13px;
}
.doc-toc p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
}
.doc-toc a {
  display: block;
  padding: 3px 0;
  color: var(--ink-2);
}
.doc-toc a.sub {
  padding-left: 12px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.doc-toc a:hover {
  color: var(--accent);
  text-decoration: none;
}
.doc-main code,
.doc-main pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}
.doc-main :not(pre) > code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--chip);
  color: var(--ink);
  overflow-wrap: anywhere;
}
.doc-main pre {
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid var(--grid);
  border-radius: 8px;
  background: var(--surface);
  overflow-x: auto;
  line-height: 1.6;
}
.doc-rules {
  margin: 0;
  padding-left: 1.2em;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.9;
}
.doc-endpoint {
  padding: 18px 0 14px;
  border-top: 1px solid var(--grid);
  scroll-margin-top: 16px;
}
.doc-endpoint h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  font-size: 16px;
}
.doc-endpoint .method {
  padding: 1px 8px;
  border-radius: 4px;
  background: #14532d;
  color: #bbf7d0;
  font-size: 12px;
  font-weight: 700;
}
.doc-endpoint .path {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-wrap: anywhere;
}
.doc-summary {
  margin: 0 0 6px;
  color: var(--ink);
}
.doc-table {
  width: 100%;
  margin: 8px 0 12px;
  border: 1px solid var(--grid);
  border-radius: 8px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  font-size: 13px;
}
.doc-table th,
.doc-table td {
  padding: 7px 10px;
  text-align: left;
  vertical-align: top;
  white-space: normal;
}
.doc-table td:first-child {
  white-space: nowrap;
}
.doc-table td small {
  margin-left: 6px;
  color: var(--muted);
}
.doc-example a {
  font-size: 13px;
}
.doc-fields {
  margin-top: 10px;
}
.doc-fields summary {
  cursor: pointer;
  color: var(--ink-2);
  font-size: 14px;
}
.doc-fields summary span {
  margin-left: 8px;
  color: var(--muted);
  font-size: 12px;
}
@media (max-width: 900px) {
  .doc-layout {
    grid-template-columns: 1fr;
  }
  .doc-toc {
    display: none;
  }
}
/* The method note opens on demand; the footer holds the secondary pages. */
details.method {
  margin-top: 40px;
  border-top: 1px solid var(--grid);
  font-size: 13px;
  color: var(--muted);
}
details.method summary {
  cursor: pointer;
  padding: 16px 0;
  color: var(--ink-2);
  font-weight: 600;
}
details.method p {
  max-width: 65em;
  line-height: 1.9;
  margin: 0 0 12px;
}
details.method h3 {
  margin: 20px 0 6px;
  font-size: 13px;
  color: var(--ink-2);
}
details.method ul {
  max-width: 65em;
  line-height: 1.9;
  margin: 0 0 12px;
  padding-left: 20px;
}
details.method[open] {
  padding-bottom: 12px;
}
.site-footer {
  margin-top: 24px;
  background: #111113;
  border-top: 1px solid var(--grid);
  font-size: 14px;
  color: var(--muted);
}
.footer-main {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px 48px;
  padding: 40px 0 32px;
}
.footer-about {
  max-width: 26rem;
}
.footer-about p {
  margin: 14px 0 0;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 28px 64px;
}
.footer-nav h2 {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}
.footer-nav a {
  display: block;
  padding: 4px 0;
  color: var(--muted);
}
.footer-nav a:hover,
.footer-nav a.on {
  color: var(--accent);
  text-decoration: none;
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 18px 0 28px;
  border-top: 1px solid var(--grid);
  font-size: 12px;
}
.footer-bottom a {
  color: var(--muted);
}
/* Long tables show 50 rows; 「瀏覽更多」 then keeps adding rows while scrolling. */
.table-more {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  font-size: 12px;
  color: var(--muted);
}
.table-more[hidden] {
  display: none;
}
.table-more button {
  min-height: 34px;
  padding: 5px 16px;
  font-size: 13px;
}
.chart-narrow {
  display: none;
}

/* Charts */
svg.chart {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
svg .gridline {
  stroke: var(--grid);
  stroke-width: 1;
}
svg .baseline {
  stroke: var(--axis);
  stroke-width: 1;
}
svg .tick {
  fill: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
svg .line {
  fill: none;
  stroke: var(--series-1);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
svg .dot {
  fill: var(--series-1);
  stroke: var(--surface);
  stroke-width: 2;
}
svg .gapmark {
  stroke: var(--axis);
  stroke-width: 1;
  stroke-dasharray: 2 3;
}
svg .band {
  fill: var(--series-1-wash);
  opacity: 0.55;
}
svg .from {
  fill: var(--surface);
  stroke: var(--series-1);
  stroke-width: 1.5;
}
svg .cross {
  stroke: var(--ink-2);
  stroke-width: 1;
}
.spark {
  width: 64px;
  height: 24px;
}
.tip {
  position: fixed;
  z-index: 40;
  pointer-events: none;
  background: var(--ink);
  color: var(--tip-ink);
  font-size: 12px;
  line-height: 1.5;
  padding: 6px 9px;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transition: opacity 0.08s;
  max-width: 240px;
}
.tip.show {
  opacity: 1;
}
.tip b {
  font-weight: 600;
}

/* The site card (SITE_CARD_SCRIPT), after tag.observe.tw's media hover card. */
.site-card {
  position: fixed;
  z-index: 100;
  pointer-events: none;
  box-sizing: border-box;
  min-width: 160px;
  max-width: min(288px, calc(100vw - 24px));
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--axis);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 8px 28px rgb(0 0 0 / 0.4);
  font-size: 12px;
  line-height: 1.5;
  text-align: left;
}
.site-card[hidden] {
  display: none;
}
.site-card strong {
  font-size: 16px;
  overflow-wrap: anywhere;
}
.site-card .muted,
.site-card .note {
  color: var(--muted);
  margin: 0;
  overflow-wrap: anywhere;
}
.site-card.tapped {
  pointer-events: auto;
}
.site-card .go {
  display: block;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--grid);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}
.site-card .go:active {
  background: var(--axis);
}

/* Rank trajectory (排名軌跡) */
.bump {
  margin: 6px 0 22px;
  position: relative;
}
.bump .bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: center;
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.bump .bar h3 {
  font-size: 16px;
  margin: 0;
  color: var(--ink);
}
.bump .seg {
  display: inline-flex;
}
.bump .seg button {
  border-radius: 0;
  padding: 2px 10px;
  font-size: 13px;
}
.bump .seg button:first-child {
  border-radius: 6px 0 0 6px;
}
.bump .seg button:last-child {
  border-radius: 0 6px 6px 0;
  margin-left: -1px;
}
.bump .seg button[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
  position: relative;
}
.bump .note {
  font-size: 12px;
  color: var(--muted);
  margin: 4px 0 0;
}
.bump svg {
  display: block;
  width: 100%;
  height: auto;
  touch-action: pan-y;
}
.bump .bl path {
  fill: none;
  stroke: var(--other);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.bump .bl circle {
  fill: var(--other);
  stroke: var(--surface);
  stroke-width: 1.5;
}
.bump .bl.on path {
  stroke: var(--series-1);
  stroke-width: 2.5;
}
.bump .bl.on circle {
  fill: var(--series-1);
}
.bump .bl.dim {
  opacity: 0.3;
}
.bump .bl.hov path {
  stroke: var(--ink-2);
}
.bump .bl.hov circle {
  fill: var(--ink-2);
}
.bump .bl.on.hov path {
  stroke: var(--series-1);
}
.bump .bl.on.hov circle {
  fill: var(--series-1);
}
.bump .bl {
  cursor: pointer;
}
.bump text.end {
  font-size: 12px;
  fill: var(--ink-2);
}
.bump text.end.on {
  fill: var(--ink);
  font-weight: 600;
}
.bump .tick {
  fill: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 800px) {
  .wrap {
    padding-inline: 24px;
  }
  .site-inner {
    gap: 26px;
  }
  .site-nav {
    gap: 18px;
  }
}
@media (max-width: 1040px) {
  .site-inner {
    flex-wrap: wrap;
    min-height: auto;
    gap: 0;
    padding-top: 10px;
  }
  .site-tools {
    order: 1;
    gap: 16px;
  }
  .site-nav {
    order: 2;
    width: 100%;
    gap: 26px;
    height: 42px;
    margin-top: 4px;
    overflow-x: auto;
    scrollbar-width: thin;
  }
  .site-nav a {
    flex: none;
    font-size: 13px;
  }
  .site-tools .who small {
    max-width: 100px;
  }
}
@media (max-width: 640px) {
  .wrap {
    padding-inline: 16px;
  }
  h1 {
    font-size: 28px;
  }
  .page-head {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 0 14px;
  }
  main.wrap {
    padding-top: 16px;
  }
  .page-head h1 {
    font-size: 24px;
  }
  .toolbar .search-field {
    flex-basis: 100%;
  }
  .select-field {
    flex: 1 1 calc(50% - 5px);
    min-width: 0;
  }
  .select-field select {
    flex: 1;
    width: 100%;
  }
  th,
  td {
    padding-inline: 8px;
  }
  th.rank,
  td.rank {
    padding-inline: 4px;
  }
  .table-lead-box {
    width: 152px;
    max-width: 152px;
    transition: max-width 0.2s;
  }
  .scroll[data-compact-lead="true"][data-scroll-x="middle"] .table-lead-box,
  .scroll[data-compact-lead="true"][data-scroll-x="end"] .table-lead-box {
    max-width: 88px;
  }
  .scroll[data-compact-lead="true"][data-scroll-x="middle"] .table-lead-extra,
  .scroll[data-compact-lead="true"][data-scroll-x="end"] .table-lead-extra {
    display: none;
  }
  .ranking-table .name-cell {
    width: auto;
  }
  .data-stamp {
    font-size: 10px;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .stats > div {
    padding: 15px;
  }
  .stats b {
    font-size: 22px;
  }
  .charts {
    grid-template-columns: 1fr;
  }
  .chart-wide {
    display: none;
  }
  .chart-narrow {
    display: block;
  }
  .form {
    padding: 18px;
  }
  .form .row {
    flex-direction: column;
    align-items: flex-start;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cloud a,
  .tip,
  .table-lead-box {
    transition: none;
  }
}
.report-main:focus {
  outline: none;
}

.bulk-form textarea {
  display: block;
  width: 100%;
  margin-top: 8px;
}
/* A site's pages (data, name and tags, manual entries) as tabs under its title. */
/* Forms: one labelled field per block, its hint underneath. */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 22px;
  min-width: 0;
}
.field > label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.field small {
  font-size: 12px;
  color: var(--muted);
}
.field input,
.field select {
  width: 100%;
  max-width: 100%;
}
.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0 18px;
}
.input-unit {
  display: flex;
  align-items: center;
  gap: 8px;
}
.input-unit span {
  color: var(--muted);
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}
.edit-form {
  max-width: 44rem;
}
.form.manual-form {
  width: 100%;
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.manual-form .field-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 28px;
}
.manual-form .manual-basics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.manual-form input,
.manual-form select,
.manual-form textarea {
  background: transparent;
}
.manual-form h3 {
  margin: 18px 0;
}
.manual-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 28px;
}
.manual-form .manual-breakdowns {
  border: 0;
}
.callout.manual-status,
.callout.manual-status.warn {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
@media (max-width: 1000px) {
  .manual-form .field-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .manual-form .field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .manual-detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 480px) {
  .manual-form .field-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.callout {
  margin: 0 0 8px;
  padding: 12px 16px;
  border: 1px solid var(--grid);
  border-radius: 10px;
  font-size: 14px;
  color: var(--ink-2);
}
.callout.warn {
  border-color: #7c2d12;
  background: #1c1007;
}
.callout b {
  color: var(--ink);
}
.steps {
  margin: 0 0 16px;
  padding-left: 1.4em;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.9;
}
/* Tag controls share the ranking pills; selected is orange, negative is red. */
.form.edit-form {
  max-width: 48rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.edit-form .edit-name {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
}
.edit-form input,
.tag-toolbar input,
.tag-propose input,
.tag-editor textarea {
  border: 0;
  border-bottom: 1px solid var(--axis);
  border-radius: 0;
  background: transparent;
  padding: 9px 0;
}
.tag-editor textarea[hidden] {
  display: none;
}
.tag-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
}
.tag-toolbar input {
  flex: 1;
  min-width: 0;
}
.tag-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 0;
}
.tag-text-button,
.tag-votes button[aria-pressed],
.edit-form .tag-save {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 6px 0;
  min-height: 40px;
  color: var(--ink-2);
}
.tag-options .tag-option {
  max-width: 100%;
  white-space: normal;
  text-align: left;
}
.tag-option .tag-label {
  color: inherit;
  overflow-wrap: anywhere;
}
.edit-form .tag-save {
  background: transparent;
  color: var(--accent);
  font-weight: 600;
}
.tag-text-button:hover,
.tag-save:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}
.tag-check {
  color: inherit;
}
.tag-check:empty {
  display: none;
}
.tag-option[aria-pressed="true"] .tag-check {
  color: inherit;
}
.tag-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 20px;
  font-size: 12px;
}
.tag-foot .note {
  margin: 0;
}
.tag-foot button {
  font-size: 12px;
}
.tag-help {
  color: var(--muted);
  font-size: 12px;
  margin-top: 12px;
  max-width: 48rem;
}
.tag-help summary {
  cursor: pointer;
  width: fit-content;
}
.tag-help p {
  line-height: 1.8;
}
.edit-form .form-actions {
  border-top: 1px solid var(--grid);
  padding-top: 10px;
  justify-content: space-between;
  font-size: 13px;
}
#tags {
  max-width: none;
}
.tag-votes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 8px 0 12px;
  padding: 0;
}
.tag-votes .tag-vote-chip {
  flex-wrap: wrap;
  max-width: 100%;
  gap: 6px 12px;
  white-space: normal;
}
.tag-identity {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.tag-name {
  color: inherit;
  overflow-wrap: anywhere;
}
.tag-identity small {
  font-size: 11px;
  color: var(--muted);
}
.tag-vote-actions,
.tag-vote-actions form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.tag-votes button[aria-pressed] {
  font-size: 12px;
  white-space: nowrap;
  min-height: 28px;
  padding: 0 2px;
  color: inherit;
}
.tag-votes button[aria-pressed="true"] {
  font-weight: 700;
}
.tag-vote-chip.selected .tag-identity small,
.tag-vote-chip.excluded .tag-identity small,
.tag-vote-chip.selected .tag-tally,
.tag-vote-chip.excluded .tag-tally {
  color: inherit;
}
.tag-votes button:focus-visible,
.tag-option:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.tag-votes button b {
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  margin-left: 4px;
}
.tag-tally {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.tag-tally span {
  margin: 0 5px;
  color: var(--axis);
}
.tag-propose {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 28rem;
}
.tag-propose input {
  flex: 1;
  min-width: 0;
}
.tag-propose button {
  white-space: nowrap;
}
.tag-feedback {
  font-size: 13px;
  margin: 0;
  color: var(--accent);
}
.tag-feedback:empty {
  display: none;
}
.tag-feedback[role="alert"] {
  color: var(--down);
}
.tag-instruction {
  margin: 4px 0;
}
@media (max-width: 560px) {
  .tag-votes li {
    gap: 8px;
  }
  .tag-vote-actions,
  .tag-vote-actions form {
    gap: 12px;
  }
  .tag-options {
    gap: 6px;
  }
  .tag-options .tag-option,
  .tag-votes button[aria-pressed],
  .tag-text-button {
    min-height: 44px;
  }
  .edit-form .edit-name {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
  }
}
/* Shares as labelled bars (similarwebSection): name and meaning, bar, percentage, visits it stands for. */
.share-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.share-list li {
  display: grid;
  grid-template-columns: minmax(120px, 1.3fr) minmax(60px, 2fr) 56px 72px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.share-list li.zero {
  opacity: 0.45;
}
.share-name small {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
.share-bar {
  height: 8px;
  border-radius: 4px;
  background: var(--page);
  overflow: hidden;
}
.share-bar i {
  display: block;
  height: 100%;
  background: var(--accent);
}
.share-list b {
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.share-visits {
  text-align: right;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 640px) {
  .share-list li {
    grid-template-columns: 1fr 52px 64px;
  }
  .share-bar {
    grid-column: 1 / -1;
    order: 2;
  }
}
/* Small multiples of traffic channels (channelTiles): one chart per channel, two or three per row. */
.channel-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.channel-tile h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}
.channel-tile h3 b {
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}
.channel-tile h3 .delta {
  font-size: 12px;
  font-weight: 400;
}
.channel-tile.zero {
  opacity: 0.5;
}
.shift {
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}
/* A switch of plain links (toggle): the label, then the choices as one segmented control. */
.seg {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 40px;
  padding: 3px;
  border: 1px solid var(--grid);
  border-radius: 8px;
  background: var(--surface);
  font-size: 13px;
  white-space: nowrap;
}
.seg span {
  padding: 0 8px 0 6px;
  color: var(--muted);
  font-size: 12px;
}
.seg a {
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 0 12px;
  border-radius: 6px;
  color: var(--ink-2);
}
.seg a:hover {
  color: var(--ink);
  text-decoration: none;
}
.seg a[aria-current="true"] {
  background: #3f3f46;
  color: #fff;
  font-weight: 500;
}
.table-note {
  margin-top: 12px;
}

/* The site page's 網站技術 block: categories beside their technologies. */
.tech-list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 16px;
  margin: 0 0 12px;
}
.tech-list dt {
  color: var(--muted);
}
.tech-list dd {
  margin: 0;
}
.tech-list .tags {
  flex-wrap: wrap;
  max-width: none;
  white-space: normal;
}

/* Optional platform lists stay flat, grouped by month and denominator. */
.manual-breakdowns,
.platform-month {
  border-top: 1px solid var(--grid);
  padding: 14px 0;
}
.manual-breakdowns summary,
.platform-month summary {
  cursor: pointer;
  color: var(--ink-2);
}
.manual-breakdowns > .note {
  margin: 12px 0 20px;
}
.breakdown-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin: 18px 0;
  font-size: 13px;
  color: var(--muted);
}
.breakdown-totals b {
  color: var(--ink);
  margin-left: 8px;
  font-weight: 500;
}
.breakdown-list {
  margin: 22px 0;
  max-width: 48rem;
}
.breakdown-list h3 {
  margin-bottom: 4px;
}
.breakdown-list .note {
  margin: 0 0 8px;
}

.subnav[aria-label="網站頁面"] {
  background: transparent;
  border-radius: 0;
  padding: 0;
  gap: 20px;
}
.subnav[aria-label="網站頁面"] a {
  background: transparent;
  border-radius: 0;
  padding: 0;
}
.subnav[aria-label="網站頁面"] a[aria-current="page"] {
  background: transparent;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
}

/* Linked tag choices elsewhere use the same filled capsule as the filters. */
a.tag,
.chips a,
.cloud a {
  border: 0;
  border-radius: 999px;
  background: var(--chip);
  color: var(--ink-2);
  padding: 4px 12px;
}
a.tag:hover,
.chips a:hover,
.cloud a:hover {
  color: #fff;
  text-decoration: none;
}

/* One or two lines of what a similar site is, under its name. */
.site-blurb {
  margin: 4px 0 0;
  max-width: 560px;
  color: var(--muted);
  font-size: 13px;
  line-height: 19px;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tag.clue {
  color: var(--accent);
  border-color: var(--series-1-wash);
}

/* Technology exploration: a catalog and a separate, immediately visible result page. */
.tech-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin: 24px 0 12px;
  color: var(--muted);
}
.tech-filters {
  display: grid;
  gap: 8px;
  padding: 12px 0;
  border-block: 1px solid var(--grid);
}
.tech-filters > div {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.tech-filter-label {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
}
.tech-filters .chip-row {
  margin: 0;
  min-width: 0;
}
.tech-results {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.tech-results p {
  margin: 0;
  color: var(--muted);
}
.tech-search {
  flex: 0 1 360px;
  width: 100%;
}
.tech-search input {
  width: 100%;
}
.tech-selection {
  border-left: 3px solid var(--accent);
  padding: 4px 20px;
  margin-bottom: 24px;
}
.tech-selection > span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}
.tech-selection strong {
  display: block;
  font-size: 26px;
  overflow-wrap: anywhere;
}
.tech-selection p {
  margin: 8px 0;
}
#tech-sites .tags {
  width: clamp(240px, 45vw, 720px);
  max-width: none;
  vertical-align: middle;
}
#tech-sites .tag {
  padding: 2px 10px;
}
#tech-sites .tech-selected {
  border: 0;
  border-radius: 999px;
  background: var(--sel-row);
  color: var(--accent);
}
@media (max-width: 600px) {
  .tech-search {
    flex-basis: 100%;
  }
  .tech-selection {
    padding-left: 14px;
  }
}
.tech-catalog {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 24px;
  list-style: none;
  padding: 0;
  margin: 8px 0 24px;
}
.tech-catalog li {
  min-width: 0;
  border-bottom: 1px solid var(--grid);
}
.tech-catalog .tech-name {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 8px;
  color: var(--ink-2);
  border-radius: 4px;
  line-height: 20px;
}
.tech-catalog .tech-name:hover {
  background: var(--surface);
  color: var(--accent);
  text-decoration: none;
}
.tech-item-label {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 500;
}
.tech-catalog small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 16px;
}
.tech-item-count {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.tech-sort {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}
@media (max-width: 1000px) {
  .tech-catalog {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 16px;
  }
}
@media (max-width: 600px) {
  .tech-catalog {
    grid-template-columns: minmax(0, 1fr);
  }
}
