:root {
  color-scheme: light;
  --bg: #f5f7f9;
  --surface: #ffffff;
  --surface-soft: #eef3f1;
  --ink: #20252b;
  --muted: #63707d;
  --line: #dce3e8;
  --line-strong: #c7d1d8;
  --teal: #0f766e;
  --teal-soft: #d9f0ec;
  --coral: #df6d4f;
  --blue: #2f6fbe;
  --yellow: #b98118;
  --green: #2f7d4d;
  --shadow: 0 14px 36px rgba(31, 41, 55, 0.08);
  --radius: 8px;
  --sidebar: 280px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.08) 0, rgba(15, 118, 110, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(223, 109, 79, 0.06) 0, transparent 280px),
    var(--bg);
  background-size: 34px 100%, 100% 100%, auto;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 100vh;
  padding: 24px 18px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
}

.brand-mark {
  display: grid;
  grid-template-columns: repeat(2, 14px);
  gap: 4px;
  width: 40px;
  height: 40px;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(15, 118, 110, 0.1);
}

.brand-mark span {
  border-radius: 4px;
  background: var(--teal);
}

.brand-mark span:nth-child(2) {
  background: var(--coral);
}

.brand-mark span:nth-child(3) {
  background: var(--blue);
}

.brand-mark span:nth-child(4) {
  background: var(--yellow);
}

.brand strong {
  display: block;
  font-size: 18px;
  line-height: 1.2;
}

.brand small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.category-nav,
.sidebar-section {
  display: grid;
  gap: 8px;
}

.sidebar-section {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.sidebar-section h2 {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.category-button,
.scope-button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 7px 10px 7px 8px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--muted);
  background: transparent;
  text-align: left;
}

.scope-button {
  grid-template-columns: minmax(0, 1fr) auto;
}

.category-button:hover,
.scope-button:hover,
.category-button.is-active,
.scope-button.is-active {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--surface);
}

.category-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, currentColor 10%, #ffffff);
}

.category-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.category-name,
.scope-button {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-count {
  min-width: 28px;
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 12px;
  text-align: center;
}

.workspace {
  min-width: 0;
  padding: 24px clamp(18px, 3vw, 40px) 56px;
}

.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 16px;
  align-items: end;
  padding: 0 0 14px;
  background: linear-gradient(180deg, var(--bg) 72%, rgba(245, 247, 249, 0));
}

.search-wrap label,
.toolbar label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.search-box {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.search-key {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-left: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: #f8fafb;
  font-size: 13px;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 15px;
}

.search-box input::placeholder {
  color: #94a1ad;
}

.search-box button,
#resetFilters {
  min-height: 30px;
  margin-right: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: #f8fafb;
}

.search-box button:hover,
#resetFilters:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-items: end;
}

.toolbar select,
.segmented {
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
}

.toolbar select {
  min-width: 126px;
  padding: 0 12px;
  color: var(--ink);
}

.segmented {
  display: flex;
  padding: 4px;
}

.segmented button {
  min-width: 58px;
  min-height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
}

.segmented button.is-active {
  color: var(--surface);
  background: var(--teal);
}

/* ── Share button & popover ──────────────────────────────────── */
.share-wrap {
  position: relative;
}

#shareBtn {
  min-width: 58px;
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid var(--teal);
  border-radius: 6px;
  color: var(--teal);
  background: transparent;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

#shareBtn:hover {
  background: var(--teal);
  color: var(--surface);
}

.share-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 280px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 6px 24px rgba(0,0,0,.15);
}

.share-popover[hidden] {
  display: none;
}

#shareUrl {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--bg);
  color: var(--text);
  font-size: 12px;
  font-family: monospace;
  box-sizing: border-box;
}

.share-popover button {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--bg);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
}

.share-popover button:hover {
  background: var(--line);
}

/* ── Status band ─────────────────────────────────────────────── */
.status-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(3, minmax(104px, auto));
  gap: 10px;
  align-items: stretch;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.status-band h1 {
  margin: 0;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.12;
  letter-spacing: 0;
}

.metric {
  display: grid;
  align-content: center;
  min-height: 54px;
  padding: 8px 10px;
  border-left: 1px solid var(--line);
}

.metric strong {
  font-size: 22px;
  line-height: 1;
}

.metric span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.quick-lanes,
.ad-panel,
.tags-panel,
.forum-filter-panel,
.results-panel {
  margin-top: 20px;
}

.section-heading {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.section-heading h2 {
  margin: 0;
  font-size: 17px;
}

.section-heading span {
  color: var(--muted);
  font-size: 13px;
}

.pinned-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(104px, 1fr));
  gap: 8px;
}

.quick-tile {
  display: grid;
  gap: 6px;
  min-height: 76px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.quick-tile:hover,
.site-card:hover,
.site-card:focus-within {
  border-color: var(--teal);
  box-shadow: 0 14px 28px rgba(15, 118, 110, 0.12);
  transform: translateY(-1px);
}

.quick-tile img,
.site-icon img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.quick-tile strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-tile span {
  color: var(--muted);
  font-size: 12px;
}

.ad-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ad-slot {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px dashed #cfd8df;
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.56);
}

.ad-slot span {
  padding: 2px 6px;
  border-radius: 999px;
  color: #7b6652;
  background: #f4eee6;
  font-size: 11px;
  line-height: 1.3;
}

.ad-slot strong {
  min-width: 0;
  overflow: hidden;
  color: #3f4852;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ad-slot small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.forum-filter-panel[hidden] {
  display: none;
}

.forum-filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-chip {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
}

.tag-chip:hover,
.tag-chip.is-active,
.forum-chip:hover,
.forum-chip.is-active {
  color: var(--ink);
  border-color: var(--teal);
  background: var(--teal-soft);
}

.forum-chip {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
}

.site-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(226px, 1fr));
  gap: 10px;
  overflow: visible;
}

.site-card {
  position: relative;
  z-index: 0;
  display: grid;
  min-height: 136px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  perspective: 900px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.site-card.is-flipped {
  min-height: 284px;
}

.site-card:hover,
.site-card:focus-within,
.site-card:has(.card-rating:hover),
.site-card:has(.card-rating:focus-visible) {
  z-index: 30;
}

.site-card.is-focused {
  outline: 3px solid rgba(15, 118, 110, 0.22);
  outline-offset: 2px;
}

.card-face {
  grid-area: 1 / 1;
  min-width: 0;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  transition: transform 220ms ease, opacity 160ms ease;
}

.card-front {
  display: grid;
}

.card-back {
  position: absolute;
  inset: 10px;
  opacity: 0;
  pointer-events: none;
  transform: rotateY(180deg);
}

.site-card.is-flipped .card-front {
  opacity: 0;
  pointer-events: none;
  transform: rotateY(-180deg);
}

.site-card.is-flipped .card-back {
  opacity: 1;
  pointer-events: auto;
  transform: rotateY(0);
}

.site-open {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: var(--radius);
}

.site-open:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.22);
  outline-offset: 2px;
}

.card-front > :not(.site-open) {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.site-card .card-rating,
.site-card .pin-toggle,
.site-card .comment-panel,
.site-card .comment-panel button,
.site-card .comment-panel textarea {
  pointer-events: auto;
}

.card-top {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.site-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafb;
}

.site-title {
  min-width: 0;
}

.site-title strong {
  display: block;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-title span {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-rating {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: max-content;
  max-width: 100%;
  min-height: 16px;
  margin: -2px 0 7px;
  color: #a7b0b8;
  font-size: 11px;
  line-height: 1;
  pointer-events: auto;
  cursor: help;
}

.card-rating::after {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 100;
  width: min(300px, 68vw);
  padding: 9px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 30px rgba(31, 41, 55, 0.16);
  content: attr(data-tooltip);
  font-size: 12px;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 120ms ease, transform 120ms ease;
  white-space: normal;
}

.card-rating:hover::after,
.card-rating:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.card-rating .stars {
  display: inline-flex;
  gap: 1px;
  letter-spacing: 0;
}

.card-rating .stars span {
  display: inline;
  margin: 0;
  overflow: visible;
  color: #c7d1d8;
  font-size: 10px;
  line-height: 1;
}

.card-rating .stars .is-filled {
  color: #d49418;
}

.card-rating .rating-value {
  display: inline;
  margin: 0;
  overflow: visible;
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
}

.traffic-meta {
  display: block;
  min-width: 0;
  margin: -2px 0 7px;
  overflow: hidden;
  color: #7d8994;
  font-size: 11px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pin-toggle {
  min-width: 54px;
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #f8fafb;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}

.pin-toggle:hover,
.pin-toggle:focus-visible {
  color: var(--ink);
  border-color: var(--line-strong);
}

.pin-toggle.is-pinned {
  color: var(--teal);
  border-color: transparent;
  background: var(--teal-soft);
}

.card-front > p {
  display: -webkit-box;
  min-height: 38px;
  margin: 8px 0;
  overflow: hidden;
  color: #4a5661;
  font-size: 13px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.flip-hint {
  display: block;
  margin-top: 7px;
  color: #98a4af;
  font-size: 11px;
  line-height: 1.2;
}

.comment-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 9px;
  height: 100%;
}

.comment-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.comment-head strong {
  display: block;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comment-head small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.comment-head button,
.comment-form button,
.comment-actions button {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #f8fafb;
  font-size: 12px;
  font-weight: 700;
}

.comment-head button {
  min-width: 48px;
  min-height: 26px;
}

.comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 7px;
}

.comment-form textarea {
  width: 100%;
  min-width: 0;
  resize: none;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 7px 8px;
  color: var(--ink);
  background: #fbfcfd;
  font-size: 12px;
  line-height: 1.4;
  outline: 0;
}

.comment-form textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.comment-form button {
  min-height: 44px;
  color: #ffffff;
  border-color: transparent;
  background: var(--teal);
}

.comment-list {
  display: grid;
  align-content: start;
  gap: 7px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
}

.comment-empty {
  display: grid;
  place-items: center;
  min-height: 82px;
  border: 1px dashed var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: #fbfcfd;
  font-size: 12px;
  text-align: center;
}

.comment-item {
  display: grid;
  gap: 5px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfd;
}

.comment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
}

.comment-meta strong {
  color: #39434d;
  font-size: 11px;
}

.comment-item p {
  margin: 0;
  color: #4a5661;
  font-size: 12px;
  line-height: 1.45;
}

.comment-actions {
  display: flex;
  gap: 6px;
}

.comment-actions button {
  min-height: 24px;
  padding: 0 8px;
}

.comment-head button:hover,
.comment-actions button:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.card-tags span {
  max-width: 100%;
  padding: 3px 6px;
  border-radius: 999px;
  color: var(--muted);
  background: #f2f5f7;
  font-size: 11px;
  line-height: 1.25;
}

.category-pill {
  color: var(--green);
  background: #e7f2ea;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 220px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.empty-state strong {
  color: var(--ink);
  font-size: 18px;
}

.empty-state[hidden] {
  display: none;
}

.memory-tips {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
}

.memory-trigger {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(15, 118, 110, 0.32);
  border-radius: 999px;
  color: #ffffff;
  background: var(--teal);
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.2);
  font-size: 13px;
  font-weight: 800;
}

.memory-trigger:hover,
.memory-trigger:focus-visible {
  background: #0c625c;
}

.memory-card {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  display: grid;
  gap: 8px;
  width: min(326px, calc(100vw - 36px));
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 40px rgba(31, 41, 55, 0.16);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.memory-tips:hover .memory-card,
.memory-tips:focus-within .memory-card {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.memory-card strong {
  font-size: 14px;
  line-height: 1.25;
}

.memory-card span {
  color: #4a5661;
  font-size: 12px;
  line-height: 1.45;
}

.memory-card b {
  color: var(--teal);
  font-weight: 800;
}

body.compact .site-grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 8px;
}

body.compact .site-card {
  min-height: 118px;
  padding: 10px;
}

body.compact .site-card.is-flipped {
  min-height: 260px;
}

body.compact .card-front > p {
  min-height: 19px;
  margin: 7px 0;
  line-height: 1.45;
  -webkit-line-clamp: 1;
}

body.compact .card-rating {
  margin: -1px 0 6px;
}

body.compact .traffic-meta {
  margin: -2px 0 6px;
  font-size: 10px;
}

body.compact .site-icon {
  width: 32px;
  height: 32px;
}

body.compact .card-top {
  grid-template-columns: 32px minmax(0, 1fr) auto;
}

body.compact .card-tags span:nth-child(n + 4) {
  display: none;
}

@media (max-width: 1060px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .category-nav {
    grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  }

  .sidebar-section {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sidebar-section h2 {
    grid-column: 1 / -1;
  }

  .topbar {
    top: 0;
    grid-template-columns: 1fr;
  }

  .toolbar {
    justify-content: flex-start;
  }

  .pinned-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ad-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .workspace {
    padding: 16px 14px 40px;
  }

  .topbar {
    padding-bottom: 12px;
  }

  .search-box {
    grid-template-columns: 32px minmax(0, 1fr);
    min-height: 48px;
  }

  .search-box button {
    display: none;
  }

  .search-box input {
    font-size: 15px;
  }

  .status-band {
    grid-template-columns: repeat(3, 1fr);
    padding: 14px;
  }

  .status-band > div:first-child {
    grid-column: 1 / -1;
  }

  .metric {
    min-height: 58px;
    padding: 8px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .metric strong {
    font-size: 21px;
  }

  .pinned-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ad-panel {
    display: grid;
    grid-auto-columns: minmax(210px, 1fr);
    grid-auto-flow: column;
    grid-template-columns: none;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-grid {
    grid-template-columns: 1fr;
  }

  .memory-tips {
    right: 12px;
    bottom: 12px;
  }

  .memory-trigger {
    min-height: 34px;
    padding: 0 12px;
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
