:root {
  --color-paper: #f4f1e8;
  --color-paper-deep: #ece7d9;
  --color-ink: #1c1b18;
  --color-ink-soft: #6b665b;
  --color-line: #d9d3c3;
  --color-accent: #d8442a;
  --color-accent-deep: #b0331d;
  --color-mark: #e0a92e;
  --font-display: Inter, Noto Sans TC, sans-serif;
  --font-body: Inter, Noto Sans TC, sans-serif;
  --font-mono: Inter, Noto Sans TC, sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

.tool-intro {
  max-width: 64ch;
  margin-block: 24px 16px;
  color: #6b665b;
}

.query-bar {
  position: sticky;
  top: 0;
  z-index: 2;
  padding-block: 16px;
  background: #f4f1e8;
  border-bottom: 1px solid #d9d3c3;
}

.search-input {
  width: 100%;
  max-width: 360px;
  font-family: "Inter", "Noto Sans TC", sans-serif;
  font-size: 1rem;
  padding: 8px 16px;
  margin-bottom: 16px;
  color: #1c1b18;
  background: #ece7d9;
  border: 1px solid #d9d3c3;
  border-radius: 2px;
  transition: border-color 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.search-input::placeholder {
  color: #6b665b;
}
.search-input:focus {
  outline: none;
  border-color: #d8442a;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  font-family: "Inter", "Noto Sans TC", sans-serif;
  font-size: 1rem;
  letter-spacing: 0.04em;
  padding: 4px 16px;
  border: 1px solid #d9d3c3;
  border-radius: 2px;
  color: #6b665b;
  background: transparent;
  cursor: pointer;
  transition: color 0.4s cubic-bezier(0.22, 0.61, 0.36, 1), border-color 0.4s cubic-bezier(0.22, 0.61, 0.36, 1), background-color 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.filter-chip:hover {
  color: #1c1b18;
  border-color: #1c1b18;
}
.filter-chip.is-active {
  color: #f4f1e8;
  background: #d8442a;
  border-color: #d8442a;
}

.result-count {
  font-family: "Inter", "Noto Sans TC", sans-serif;
  font-size: 1rem;
  color: #6b665b;
  margin-block: 16px 8px;
}

.table-wrap {
  overflow-x: auto;
}

.device-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  white-space: nowrap;
}
.device-table th, .device-table td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid #d9d3c3;
}

.device-table thead th {
  font-family: "Inter", "Noto Sans TC", sans-serif;
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: #6b665b;
  border-bottom: 1.5px solid #1c1b18;
  user-select: none;
}
.device-table thead th.is-sortable {
  cursor: pointer;
  transition: color 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.device-table thead th.is-sortable:hover {
  color: #1c1b18;
}
.device-table thead th.is-sorted {
  color: #d8442a;
}

.th-arrow {
  display: inline-block;
  width: 1em;
  margin-left: 4px;
  color: #d8442a;
}

.th-copy {
  width: 1px;
}

.device-table tbody tr {
  cursor: pointer;
  transition: background-color 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.device-table tbody tr:hover {
  background: #ece7d9;
}
.device-table tbody tr.is-copied {
  background: color-mix(in srgb, #d8442a 10%, #f4f1e8);
}

.cell-name {
  font-weight: 500;
}

.cell-mono {
  font-family: "Inter", "Noto Sans TC", sans-serif;
  font-variant-numeric: tabular-nums;
}

.cell-accent {
  color: #d8442a;
}

.cat-pill {
  display: inline-block;
  font-family: "Inter", "Noto Sans TC", sans-serif;
  font-size: 1rem;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border: 1px solid #d9d3c3;
  border-radius: 2px;
  color: #6b665b;
}

.cat-mobile {
  border-color: #d8442a;
  color: #d8442a;
}

.cat-tablet {
  border-color: #e0a92e;
  color: color-mix(in srgb, #e0a92e 70%, #1c1b18);
}

.cat-desktop {
  border-color: #1c1b18;
  color: #1c1b18;
}

.cell-copy {
  text-align: right;
}

.copy-hint {
  font-family: "Inter", "Noto Sans TC", sans-serif;
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: #6b665b;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.22, 0.61, 0.36, 1), color 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.device-table tbody tr:hover .copy-hint {
  opacity: 1;
}

.device-table tbody tr.is-copied .copy-hint {
  opacity: 1;
  color: #d8442a;
}

.empty-state {
  padding-block: 64px !important;
  text-align: center;
  color: #6b665b;
  white-space: normal;
}

.bp-intro {
  max-width: 64ch;
  margin-bottom: 40px;
  font-size: 1rem;
  color: #6b665b;
}

.bp-scale {
  position: relative;
  height: 120px;
  margin-bottom: 64px;
  border-top: 1.5px solid #1c1b18;
}

.bp-tick {
  position: absolute;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 16px;
  border-left: 1px solid #d9d3c3;
  padding-left: 8px;
}
.bp-tick::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 8px;
  height: 1px;
  background: #d8442a;
}

.bp-name {
  font-family: "Inter", "Noto Sans TC", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #d8442a;
}

.bp-min {
  font-family: "Inter", "Noto Sans TC", sans-serif;
  font-size: 1rem;
  color: #1c1b18;
}

.bp-label {
  font-size: 1rem;
  color: #6b665b;
  max-width: 12ch;
  white-space: normal;
  line-height: 1.3;
}

@media (max-width: 640px) {
  .bp-scale {
    height: auto;
    border-top: 0;
  }
  .bp-tick {
    position: static;
    flex-direction: row;
    align-items: baseline;
    gap: 16px;
    padding: 8px 0 8px 16px;
    border-left: 1.5px solid #1c1b18;
  }
  .bp-tick::before {
    display: none;
  }
  .bp-label {
    max-width: none;
  }
}
