:root {
  color-scheme: dark;
  --bg: #050606;
  --panel: #090c0d;
  --panel-strong: #0f1415;
  --line: rgba(226, 255, 244, 0.14);
  --line-strong: rgba(187, 255, 42, 0.55);
  --text: #f7faf3;
  --muted: #aab6b0;
  --green: #bbff2a;
  --red: #ff6262;
  --amber: #ffc857;
  --blue: #4f9cff;
  --font: "Avenir Next", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
}

a {
  color: inherit;
}

p,
h1,
h2 {
  margin: 0;
}

button,
select,
input,
textarea {
  font: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.layoffs-shell,
.site-legal-footer {
  width: min(1120px, calc(100% - 22px));
  margin: 0 auto;
}

.layoffs-shell {
  display: grid;
  gap: 10px;
  padding: 10px 0 28px;
}

.trend-card,
.summary-card,
.controls-card,
.source-caveat {
  border: 1px solid var(--line);
  background: var(--panel);
}

.eyebrow,
.controls-card label > span,
.summary-card span {
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  line-height: 1.2;
  text-transform: uppercase;
}

.timeline-card-head p,
.summary-card strong {
  color: var(--muted);
}

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

.summary-card:first-child {
  grid-column: 1 / -1;
}

.summary-card {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px;
}

.summary-card strong {
  overflow: hidden;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.controls-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
}

.controls-card label:first-child,
.toggle-control {
  grid-column: 1 / -1;
}

.controls-card label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.source-caveat {
  padding: 10px 12px;
}

.source-caveat p {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.35;
}

.source-caveat strong {
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-right: 6px;
  text-transform: uppercase;
}

.controls-card select,
.controls-card input[type="search"] {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 0 10px;
  background: #050707;
  color: var(--text);
  outline: none;
}

.controls-card input[type="search"]::placeholder {
  color: rgba(170, 182, 176, 0.72);
}

.controls-card select:focus,
.controls-card input[type="search"]:focus {
  border-color: var(--line-strong);
}

.toggle-control {
  align-items: center;
  grid-template-columns: auto 1fr;
  min-height: 44px;
  border: 1px solid var(--line);
  padding: 0 10px;
  background: #050707;
}

.toggle-control input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.toggle-control span {
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.trend-card,
.timeline-card {
  min-width: 0;
}

.trend-card {
  overflow: hidden;
}

.timeline-card {
  justify-self: start;
  width: min(1440px, calc(100vw - 32px));
  margin-left: calc(50% - min(720px, calc(50vw - 16px)));
  background: transparent;
}

.timeline-card-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 12px;
}

.timeline-card > .timeline-card-head {
  border-bottom: 0;
  padding: 8px 0 10px;
}

.timeline-card-head h2 {
  font-size: 1.2rem;
  line-height: 1;
}

.timeline-card-head p:last-child {
  flex: 0 0 auto;
  font-size: 0.82rem;
  text-align: right;
}

.timeline-meta {
  display: grid;
  gap: 2px;
  justify-items: end;
  min-width: 92px;
}

.timeline-meta p {
  text-align: right;
}

.timeline-hint {
  color: rgba(187, 255, 42, 0.82);
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.trend-chart {
  width: 100%;
  height: 188px;
}

.timeline-list {
  display: grid;
  gap: 4px;
  width: 100%;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.timeline-load-more {
  width: 100%;
  min-height: 48px;
  margin-top: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: rgba(187, 255, 42, 0.08);
  color: var(--green);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.timeline-load-more:hover,
.timeline-load-more:focus-visible {
  background: var(--green);
  color: #071007;
  outline: none;
}

.timeline-row {
  --event-color: var(--green);
  border: 1px solid rgba(226, 255, 244, 0.11);
  background: rgba(226, 255, 244, 0.035);
}

.timeline-row:nth-child(even) {
  background: rgba(226, 255, 244, 0.055);
}

.timeline-row.is-open {
  border-color: var(--event-color);
  background:
    linear-gradient(90deg, rgba(187, 255, 42, 0.06), transparent 38%),
    rgba(226, 255, 244, 0.055);
}

.timeline-row-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 14px;
  width: 100%;
  border: 0;
  border-left: 4px solid var(--event-color);
  border-radius: 0;
  padding: 8px 10px 8px 12px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.timeline-row-button:hover,
.timeline-row-button:focus-visible {
  background: rgba(187, 255, 42, 0.045);
  outline: 1px solid var(--event-color);
  outline-offset: -1px;
}

.timeline-row-main,
.timeline-row-meta,
.timeline-row-impact {
  min-width: 0;
}

.timeline-row-date {
  display: block;
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.15;
  text-transform: uppercase;
}

.timeline-row-title {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.16;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-row-meta,
.timeline-row-impact small,
.timeline-detail dd {
  color: var(--muted);
}

.timeline-row-meta {
  display: block;
  overflow: hidden;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-row-impact {
  display: grid;
  gap: 4px;
  justify-items: end;
  min-width: 96px;
}

.timeline-row-impact strong {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.1;
  max-width: min(270px, 34vw);
  text-align: right;
  white-space: normal;
}

.timeline-row-impact small {
  font-family: var(--mono);
  font-size: 0.56rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.timeline-impact-bar {
  width: min(150px, 24vw);
  height: 3px;
  background: rgba(226, 255, 244, 0.11);
}

.timeline-impact-bar span {
  display: block;
  width: var(--impact-width, 12%);
  height: 100%;
  background: var(--event-color);
}

.timeline-detail {
  border-top: 1px solid rgba(226, 255, 244, 0.1);
  padding: 10px 12px 12px 16px;
}

.timeline-detail[hidden] {
  display: none;
}

.timeline-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  margin: 0 0 10px;
}

.timeline-detail dt {
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-transform: uppercase;
}

.timeline-detail dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.25;
}

.timeline-detail-note {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.35;
}

.timeline-source-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid var(--line-strong);
  padding: 0 10px;
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.timeline-source-link:hover,
.timeline-source-link:focus-visible {
  background: rgba(187, 255, 42, 0.1);
  outline: none;
}

.timeline-empty {
  border: 1px dashed var(--line);
  padding: 36px 12px;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 800;
  text-align: center;
}

.site-legal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  justify-content: center;
  padding: 22px 0 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-legal-footer a {
  color: inherit;
  text-decoration: none;
}

.site-legal-footer a:hover,
.site-legal-footer a:focus-visible {
  color: var(--green);
  outline: none;
}

@media (min-width: 680px) {
  .layoffs-shell,
  .site-legal-footer {
    width: min(1120px, calc(100% - 48px));
  }

  .layoffs-shell {
    gap: 12px;
    padding-top: 14px;
  }

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

  .summary-card:first-child {
    grid-column: auto;
  }

  .controls-card {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
  }

  .controls-card label:first-child,
  .toggle-control {
    grid-column: auto;
  }

  .trend-chart {
    height: 240px;
  }

}

@media (min-width: 960px) {
  .controls-card {
    grid-template-columns: minmax(220px, 1fr) 0.85fr 0.7fr 1.1fr auto;
  }
}

@media (max-width: 460px) {
  .brand-copy strong {
    max-width: 190px;
  }

  .timeline-card-head {
    align-items: end;
    flex-direction: row;
    padding: 10px;
  }

  .timeline-card-head p:last-child {
    text-align: right;
  }

  .trend-card .timeline-card-head {
    align-items: start;
    flex-direction: column;
  }

  .trend-card .timeline-card-head p:last-child {
    text-align: left;
  }

  .timeline-card-head h2 {
    font-size: 1.05rem;
  }

  .timeline-meta {
    min-width: 84px;
  }

  .timeline-hint {
    font-size: 0.56rem;
  }

  .timeline-row-button {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    padding: 8px 9px 8px 10px;
  }

  .timeline-row-impact {
    justify-items: stretch;
  }

  .timeline-row-impact strong {
    max-width: none;
    text-align: left;
  }

  .timeline-impact-bar {
    width: 100%;
  }

  .timeline-detail {
    padding: 9px 10px 11px 14px;
  }

  .timeline-detail-grid {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .timeline-source-link {
    width: 100%;
  }
}
