.reddit-trends-page {
  overflow-x: hidden;
  background:
    radial-gradient(circle at 10% 8%, rgba(217, 239, 158, .36), transparent 30%),
    radial-gradient(circle at 90% 18%, rgba(35, 102, 77, .16), transparent 32%),
    var(--paper);
}

.reddit-trends-page .site-header { z-index: 80; }

.trend-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.trend-header-button {
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.trend-save-button {
  color: var(--ink);
  background: var(--lime);
}

.trend-header-button:disabled,
.trend-mobile-action-buttons button:disabled {
  opacity: .55;
  cursor: wait;
}

.reddit-trends-page .reveal {
  opacity: 1;
  transform: none;
}

.trend-hero {
  min-height: 560px;
  padding: 58px 0 72px;
  display: grid;
  grid-template-columns: 1.04fr .76fr;
  gap: 34px;
  align-items: center;
}

.trend-hero h1 {
  max-width: 800px;
  margin: 22px 0;
  font-size: clamp(50px, 7vw, 96px);
  line-height: 1.01;
  letter-spacing: -.08em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.trend-hero-copy > p {
  max-width: 690px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.9;
}

.trend-hero-actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.trend-mobile-action-buttons {
  display: none;
}

.trend-live-card {
  padding: 30px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(17, 21, 17, .12);
  border-radius: 30px;
  background: #132119;
  color: white;
  box-shadow: 0 30px 80px rgba(17, 32, 22, .18);
}

.trend-live-card > * {
  position: relative;
  z-index: 1;
}

.trend-live-card::after {
  content: "";
  position: absolute;
  right: -90px;
  top: -90px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(217, 239, 158, .16);
  box-shadow: 0 0 0 60px rgba(217, 239, 158, .05);
}

.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
  padding: 7px 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .1);
  color: var(--lime);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
}

.live-dot i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #95ff66;
  box-shadow: 0 0 0 6px rgba(149, 255, 102, .12);
}

.trend-live-card small {
  display: block;
  margin-top: 54px;
  color: rgba(255, 255, 255, .5);
  font-size: 11px;
  letter-spacing: .12em;
}

.trend-live-card h2 {
  margin: 10px 0 12px;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -.04em;
}

.trend-live-card p {
  margin: 0;
  color: rgba(255, 255, 255, .66);
  line-height: 1.8;
}

.trend-live-card .trend-sync-note {
  color: var(--lime);
  font-size: 12px;
  font-weight: 800;
}

.trend-live-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.trend-live-grid div {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 18px;
  background: rgba(255, 255, 255, .06);
}

.trend-live-grid b {
  display: block;
  font-size: 25px;
  color: var(--lime);
}

.trend-live-grid span {
  color: rgba(255, 255, 255, .55);
  font-size: 12px;
}

.trend-board { padding-bottom: 58px; }

.trend-top-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.hot-card {
  min-height: 220px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(17, 21, 17, .1);
  border-radius: 26px;
  background: rgba(255, 255, 255, .6);
  box-shadow: 0 18px 60px rgba(21, 35, 26, .08);
}

.hot-card:first-child {
  background: #d9ef9e;
}

.hot-card::after {
  content: "";
  position: absolute;
  right: -42px;
  top: -42px;
  width: 130px;
  height: 130px;
  border: 1px solid rgba(17, 21, 17, .08);
  border-radius: 50%;
}

.hot-card small {
  color: rgba(17, 21, 17, .48);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .14em;
}

.hot-card h3 {
  margin: 34px 0 4px;
  font-size: 42px;
  letter-spacing: -.06em;
}

.hot-card p {
  min-height: 42px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.hot-stats {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hot-stats span {
  padding: 8px 10px;
  border-radius: 99px;
  background: rgba(17, 21, 17, .06);
  font-size: 12px;
  font-weight: 800;
}

.trend-console {
  padding-top: 18px;
  padding-bottom: 88px;
}

.trend-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
}

.trend-toolbar h2 {
  margin: 10px 0 0;
  font-size: clamp(36px, 5vw, 68px);
  line-height: 1.05;
  letter-spacing: -.07em;
}

.trend-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.trend-controls input {
  width: min(360px, 68vw);
  padding: 13px 15px;
  border: 1px solid rgba(17, 21, 17, .12);
  border-radius: 14px;
  background: rgba(255, 255, 255, .76);
  color: var(--ink);
  outline: none;
}

.trend-controls button,
.trend-tabs button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.trend-controls button {
  padding: 13px 16px;
  border-radius: 14px;
  background: var(--ink);
  color: white;
  font-size: 12px;
  font-weight: 900;
}

.trend-tabs {
  margin: 28px 0 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.trend-tabs button {
  padding: 10px 13px;
  border-radius: 999px;
  background: rgba(17, 21, 17, .06);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.trend-tabs button.active {
  background: #15231a;
  color: var(--lime);
}

.trend-table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid rgba(17, 21, 17, .1);
  border-radius: 26px;
  background: rgba(255, 255, 255, .62);
  box-shadow: 0 18px 55px rgba(20, 32, 23, .08);
}

.trend-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

.trend-table th {
  padding: 16px 18px;
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  background: #f4f1e8;
  color: rgba(17, 21, 17, .56);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.trend-table td {
  padding: 17px 18px;
  border-top: 1px solid rgba(17, 21, 17, .08);
  color: var(--ink);
  font-size: 14px;
}

.trend-table tr:hover td {
  background: rgba(217, 239, 158, .12);
}

.ticker-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 8px 11px;
  border-radius: 12px;
  background: #15231a;
  color: var(--lime);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: .08em;
}

.company-name {
  display: block;
  max-width: 320px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.num-cell {
  font-variant-numeric: tabular-nums;
  font-weight: 850;
}

.change-up { color: #17784b !important; }
.change-down { color: #b54437 !important; }
.change-flat { color: rgba(17, 21, 17, .48) !important; }

.heatbar {
  width: 150px;
  height: 9px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(17, 21, 17, .08);
}

.heatbar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d9ef9e, #2f6f4c);
}

.trend-empty-row td {
  padding: 34px 18px;
  text-align: center;
  color: var(--muted);
}

.trend-method {
  padding-bottom: 110px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.method-card {
  padding: 24px;
  border: 1px solid rgba(17, 21, 17, .1);
  border-radius: 24px;
  background: rgba(255, 255, 255, .58);
}

.method-card span {
  color: rgba(17, 21, 17, .36);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .16em;
}

.method-card h3 {
  margin: 28px 0 10px;
  font-size: 20px;
}

.method-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
  font-size: 13px;
}

.trend-bookmark-dialog {
  width: min(440px, calc(100% - 28px));
  padding: 32px;
  position: fixed;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 26px;
  color: white;
  background: linear-gradient(145deg, #17271f, #0e1511);
  box-shadow: 0 35px 100px rgba(8, 18, 12, .4);
}

.trend-bookmark-dialog::backdrop {
  background: rgba(9, 15, 11, .58);
  backdrop-filter: blur(7px);
}

.trend-bookmark-dialog > span {
  color: var(--lime);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .17em;
}

.trend-bookmark-dialog h2 {
  margin: 10px 0 12px;
  font-size: 30px;
  letter-spacing: -.05em;
}

.trend-bookmark-dialog p {
  margin: 0;
  color: rgba(255, 255, 255, .68);
  font-size: 14px;
  line-height: 1.8;
}

.trend-bookmark-dialog > div {
  margin-top: 24px;
  display: grid;
  gap: 9px;
}

.trend-bookmark-dialog > div button {
  min-height: 46px;
  border: 0;
  border-radius: 13px;
  color: var(--ink);
  background: var(--lime);
  font: 800 13px/1 inherit;
  cursor: pointer;
}

.trend-bookmark-dialog > div button:last-child {
  color: white;
  background: rgba(255, 255, 255, .1);
}

.trend-dialog-close {
  width: 36px;
  height: 36px;
  position: absolute;
  top: 14px;
  right: 14px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: rgba(255, 255, 255, .08);
  font: 300 24px/1 inherit;
  cursor: pointer;
}

.trend-export-progress {
  min-width: 250px;
  padding: 18px 20px;
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 1000;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 18px;
  color: white;
  background: #132019;
  box-shadow: 0 24px 60px rgba(8, 18, 12, .3);
  text-align: center;
}

.trend-export-progress[hidden] {
  display: none;
}

.trend-export-progress > span {
  width: 28px;
  height: 28px;
  margin: 0 auto 9px;
  display: block;
  border: 3px solid rgba(255, 255, 255, .15);
  border-top-color: var(--lime);
  border-radius: 50%;
  animation: trend-spin .8s linear infinite;
}

.trend-export-progress b,
.trend-export-progress small {
  display: block;
}

.trend-export-progress small {
  margin-top: 5px;
  color: rgba(255, 255, 255, .48);
  font-size: 10px;
}

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

@media (max-width: 980px) {
  .trend-hero { grid-template-columns: 1fr; min-height: auto; padding-top: 44px; }
  .trend-top-grid { grid-template-columns: 1fr 1fr; }
  .trend-toolbar { display: block; }
  .trend-controls { margin-top: 20px; justify-content: flex-start; }
  .trend-method { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1120px) {
  .trend-header-actions {
    display: none;
  }

  .trend-mobile-action-buttons {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .trend-mobile-action-buttons button {
    min-height: 46px;
    border: 0;
    border-radius: 13px;
    color: white;
    background: var(--ink);
    font: 800 12px/1 inherit;
  }

  .trend-mobile-action-buttons button:last-child {
    color: var(--ink);
    background: var(--lime);
  }
}

@media (max-width: 720px) {
  .trend-hero {
    padding-top: 26px;
    padding-bottom: 46px;
    gap: 22px;
  }

  .trend-hero h1 {
    margin: 16px 0;
    font-size: clamp(34px, 9.8vw, 40px);
    line-height: 1.08;
    letter-spacing: -.035em;
    word-break: break-all;
  }

  .trend-hero-copy > p {
    font-size: 15px;
    line-height: 1.78;
  }

  .trend-hero-actions {
    margin-top: 22px;
  }

  .trend-live-card {
    padding: 22px;
    border-radius: 24px;
  }

  .trend-live-card small {
    margin-top: 28px;
  }

  .trend-live-grid { grid-template-columns: 1fr; }
  .trend-top-grid { grid-template-columns: 1fr; }
  .trend-method { grid-template-columns: 1fr; }
  .trend-controls input { width: 100%; }

  .trend-toolbar h2 {
    font-size: 40px;
  }

  .trend-controls {
    display: grid;
    grid-template-columns: 1fr;
  }

  .trend-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .trend-tabs::-webkit-scrollbar {
    display: none;
  }

  .trend-tabs button {
    white-space: nowrap;
  }

  .trend-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .trend-table,
  .trend-table tbody,
  .trend-table tr,
  .trend-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .trend-table {
    border-collapse: separate;
    border-spacing: 0 12px;
  }

  .trend-table thead {
    display: none;
  }

  .trend-table tr {
    padding: 16px;
    border: 1px solid rgba(17, 21, 17, .1);
    border-radius: 22px;
    background: rgba(255, 255, 255, .7);
    box-shadow: 0 14px 40px rgba(20, 32, 23, .07);
  }

  .trend-table td {
    display: block;
    padding: 9px 0;
    border-top: 0;
    font-size: 13px;
  }

  .trend-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 5px;
    color: rgba(17, 21, 17, .42);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
  }

  .trend-table td > * {
    min-width: 0;
    text-align: left;
  }

  .company-name {
    max-width: 100%;
    text-align: left;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
  }

  .heatbar {
    width: 100%;
    max-width: 160px;
  }

  .trend-method {
    padding-bottom: 70px;
  }
}

.trend-export-stage {
  width: 960px;
  padding: 38px;
  position: fixed;
  left: -12000px;
  top: 0;
  z-index: -1;
  color: var(--ink);
  background:
    radial-gradient(circle at 1px 1px, rgba(17, 21, 17, .035) 1px, transparent 0) 0 0 / 13px 13px,
    #f7f5ef;
}

.trend-export-header {
  margin-bottom: 18px;
  padding: 25px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-radius: 26px;
  color: white;
  background: linear-gradient(135deg, #101a15, #20382a 62%, #0f1713);
}

.trend-export-identity {
  display: flex;
  align-items: center;
  gap: 18px;
}

.trend-export-identity > img {
  width: 86px;
  height: 86px;
  border: 3px solid rgba(255, 255, 255, .16);
  border-radius: 22px;
  object-fit: cover;
}

.trend-export-identity span,
.trend-export-section > span {
  color: var(--lime);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .16em;
}

.trend-export-identity h1 {
  margin: 7px 0;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -.045em;
}

.trend-export-identity p {
  margin: 0;
  color: rgba(255, 255, 255, .62);
  font-size: 12px;
}

.trend-export-qr {
  flex: 0 0 auto;
  padding: 10px;
  border-radius: 16px;
  color: #152019;
  background: white;
  text-align: center;
}

.trend-export-qr canvas,
.trend-export-qr img {
  width: 96px !important;
  height: 96px !important;
  display: block;
}

.trend-export-qr small {
  margin-top: 6px;
  display: block;
  font-size: 9px;
  font-weight: 900;
}

.trend-export-summary {
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.trend-export-summary > div {
  padding: 18px;
  border: 1px solid rgba(17, 21, 17, .08);
  border-radius: 18px;
  background: rgba(255, 255, 255, .72);
}

.trend-export-summary small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.trend-export-summary b {
  margin-top: 7px;
  display: block;
  color: var(--green);
  font-size: 25px;
}

.trend-export-section {
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid rgba(17, 21, 17, .08);
  border-radius: 24px;
  background: rgba(255, 255, 255, .7);
}

.trend-export-section > span {
  color: var(--green);
}

.trend-export-section > h2 {
  margin: 8px 0 18px;
  font-size: 32px;
  letter-spacing: -.05em;
}

.trend-export-section > p {
  margin: -8px 0 18px;
  color: var(--muted);
  font-size: 12px;
}

.trend-export-stage .trend-top-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.trend-export-stage .hot-card {
  min-height: 190px;
}

.trend-export-stage .trend-table-wrap {
  overflow: hidden;
  border-radius: 18px;
  box-shadow: none;
}

.trend-export-stage .trend-table {
  width: 100%;
  min-width: 0;
  display: table;
  border-collapse: collapse;
}

.trend-export-stage .trend-table thead {
  display: table-header-group;
}

.trend-export-stage .trend-table tbody {
  display: table-row-group;
}

.trend-export-stage .trend-table tr {
  display: table-row;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.trend-export-stage .trend-table th,
.trend-export-stage .trend-table td {
  width: auto;
  min-width: 0;
  display: table-cell;
  padding: 11px 9px;
  border-top: 1px solid rgba(17, 21, 17, .08);
  font-size: 11px;
  text-align: left;
}

.trend-export-stage .trend-table th {
  position: static;
}

.trend-export-stage .trend-table td::before {
  display: none;
  content: none;
}

.trend-export-stage .ticker-pill {
  min-width: 50px;
  padding: 6px 8px;
  font-size: 10px;
}

.trend-export-stage .company-name {
  max-width: 180px;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.trend-export-stage .heatbar {
  width: 90px;
}

.trend-export-footer {
  margin-top: 20px;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-radius: 18px;
  color: white;
  background: #17221c;
}

.trend-export-footer b {
  color: var(--lime);
}

.trend-export-footer span,
.trend-export-footer p {
  margin: 0;
  font-size: 11px;
}

.trend-export-footer p {
  color: rgba(255, 255, 255, .55);
}

@media (max-width: 720px) {
  .trend-hero h1 {
    max-width: 100%;
    font-size: clamp(39px, 11.5vw, 50px);
    line-height: 1.04;
    word-break: keep-all;
    overflow-wrap: normal;
  }

  .trend-hero-copy > p {
    font-size: 14px;
    line-height: 1.8;
  }

  .trend-hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .trend-hero-actions .button,
  .trend-hero-actions button {
    width: 100%;
    min-height: 48px;
    padding-inline: 10px;
  }

  .trend-toolbar input,
  .trend-toolbar select {
    min-height: 48px;
    font-size: 16px;
  }

  .trend-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .trend-sync-card,
  .trend-panel,
  .trend-table-wrap {
    border-radius: 20px;
  }
}
