:root {
  color-scheme: dark;
  --bg: #070b14;
  --panel: #0f172a;
  --stroke: rgba(148, 163, 184, 0.25);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --radius: 14px;
  --font: "DM Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  background: radial-gradient(1200px 600px at 10% -10%, rgba(56, 189, 248, 0.12), transparent),
    radial-gradient(900px 500px at 90% 0%, rgba(167, 139, 250, 0.12), transparent), var(--bg);
  color: var(--text);
}

a {
  color: var(--accent);
}

.layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 28px;
  padding: 28px clamp(18px, 3vw, 40px) 48px;
  max-width: 1680px;
  margin: 0 auto;
}

.showcase-topline {
  grid-column: 1 / -1;
  margin: 0 0 10px;
  font-size: clamp(1.28rem, 2.6vw, 1.7rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #f8fafc;
  text-align: center;
  font-family: "Segoe UI", Tahoma, "Arial Unicode MS", "Noto Sans Arabic", sans-serif;
}

@media (max-width: 1080px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .sidebar__sticky {
    position: relative !important;
    top: auto !important;
  }
}

.hero {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 28px;
  padding: clamp(20px, 3vw, 32px);
  border-radius: calc(var(--radius) + 6px);
  border: 1px solid var(--stroke);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(17, 28, 51, 0.82));
  box-shadow: 0 40px 120px rgba(2, 6, 23, 0.65);
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
  }
}

.eyebrow {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0 0 8px;
}

h1 {
  font-size: clamp(1.85rem, 3vw, 2.55rem);
  line-height: 1.05;
  margin: 0 0 14px;
}

.lede {
  margin: 0 0 18px;
  color: #cbd5e1;
  line-height: 1.55;
  max-width: 62ch;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

.stats div {
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: rgba(2, 6, 23, 0.35);
}

.stats dt {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.stats dd {
  margin: 6px 0 0;
  font-family: var(--mono);
  font-size: 1.35rem;
  font-weight: 600;
}

.hero__actions .check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  color: #cbd5e1;
  font-size: 0.95rem;
}

.hero__actions input {
  margin-top: 4px;
}

.hero__actions strong {
  color: var(--text);
}

.hint {
  margin: 8px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.hero__panel {
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: rgba(2, 6, 23, 0.35);
  padding: 18px 20px;
}

.hero__panel h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
}

.bullets {
  margin: 0;
  padding-left: 18px;
  color: #cbd5e1;
  line-height: 1.55;
}

.bullets li {
  margin-bottom: 8px;
}

.fine {
  margin: 14px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
}

.sidebar__sticky {
  position: sticky;
  top: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field__label {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

input[type="search"],
select {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: var(--panel);
  color: var(--text);
  padding: 11px 12px;
  font: inherit;
}

.row--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cats {
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: rgba(15, 23, 42, 0.65);
  padding: 12px;
}

.cats__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}

.linkish {
  border: none;
  background: none;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.cats__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: min(52vh, 520px);
  overflow: auto;
  padding-right: 4px;
}

.cat {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
}

.cat:hover {
  border-color: rgba(148, 163, 184, 0.25);
  background: rgba(2, 6, 23, 0.35);
}

.cat[data-active="true"] {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.08);
}

.cat span:last-child {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.main {
  min-width: 0;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.toolbar--bottom {
  margin-top: 22px;
  margin-bottom: 0;
}

.toolbar__meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.pager {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.pager button {
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: var(--panel);
  color: var(--text);
  padding: 8px 12px;
  cursor: pointer;
  font: inherit;
}

.pager button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pager .page-indicator {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
  padding: 0 6px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 16px;
}

.card {
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: rgba(15, 23, 42, 0.72);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 280px;
}

.card__frame {
  flex: 1;
  background: repeating-linear-gradient(
      135deg,
      rgba(148, 163, 184, 0.06) 0,
      rgba(148, 163, 184, 0.06) 1px,
      transparent 1px,
      transparent 10px
    ),
    #050914;
  border-bottom: 1px solid var(--stroke);
}

.card__frame iframe {
  width: 100%;
  height: 220px;
  border: 0;
  display: block;
  background: transparent;
}

.card__body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card__title {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.25;
  word-break: break-word;
}

.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: var(--muted);
}

.tag--tw {
  border-color: rgba(167, 139, 250, 0.55);
  color: #ddd6fe;
}

.card__meta {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

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

.btn {
  border-radius: 10px;
  border: 1px solid rgba(56, 189, 248, 0.55);
  background: rgba(56, 189, 248, 0.14);
  color: var(--text);
  padding: 7px 11px;
  font: inherit;
  cursor: pointer;
}

.btn:hover {
  background: rgba(56, 189, 248, 0.22);
}

.btn.ghost {
  border-color: var(--stroke);
  background: rgba(2, 6, 23, 0.35);
}

.modal {
  width: min(1100px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  border: none;
  padding: 0;
  border-radius: calc(var(--radius) + 4px);
  background: transparent;
  color: inherit;
}

.modal::backdrop {
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(6px);
}

.modal__inner {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(17, 28, 51, 0.96));
  border: 1px solid var(--stroke);
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  box-shadow: 0 40px 140px rgba(2, 6, 23, 0.85);
}

.modal__bar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--stroke);
  align-items: flex-start;
}

.modal__eyebrow {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.modal__bar h3 {
  margin: 4px 0 0;
  font-size: 1.15rem;
}

.modal__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.modal__preview iframe {
  width: 100%;
  height: min(72vh, 720px);
  border: 0;
  background: #050914;
}
