:root {
  --bg-paper: #f5efe3;
  --bg-mist: #f0e8d6;
  --ink: #11231d;
  --muted: #4c5c55;
  --line: rgba(17, 35, 29, 0.16);
  --surface: rgba(255, 252, 246, 0.86);
  --surface-strong: #fff8ee;
  --shadow-soft: 0 14px 28px rgba(17, 35, 29, 0.08);
  --shadow-card: 0 10px 22px rgba(17, 35, 29, 0.06);

  --throw: #c55425;
  --pin: #1e7b65;
  --arm-lock: #21639e;
  --choke: #7f2f2a;

  --hero-dark: #113127;
  --hero-mid: #1d5d4d;
  --hero-light: #d67c2e;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Barlow", "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg-paper), var(--bg-mist));
  min-height: 100vh;
}

.backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 8% 9%, rgba(198, 84, 37, 0.13), transparent 40%),
    radial-gradient(circle at 92% 13%, rgba(33, 99, 158, 0.1), transparent 37%),
    radial-gradient(circle at 90% 88%, rgba(30, 123, 101, 0.14), transparent 42%),
    repeating-linear-gradient(
      -22deg,
      rgba(17, 35, 29, 0.02) 0,
      rgba(17, 35, 29, 0.02) 1px,
      transparent 1px,
      transparent 12px
    );
  z-index: -1;
}

.page-shell {
  width: min(1200px, 100% - 1.1rem);
  margin: 0 auto;
  padding: 1rem 0 2.5rem;
}

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  color: #f9f2df;
  padding: 1rem 1rem 1.3rem;
  background: linear-gradient(136deg, var(--hero-mid), var(--hero-dark) 60%, #0f281f 100%);
  box-shadow: var(--shadow-soft);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(0.3px);
}

.hero::before {
  width: 220px;
  height: 220px;
  right: -90px;
  top: -120px;
  background: radial-gradient(circle, rgba(214, 124, 46, 0.7) 0%, rgba(214, 124, 46, 0) 68%);
}

.hero::after {
  width: 200px;
  height: 200px;
  left: -115px;
  bottom: -110px;
  background: radial-gradient(circle, rgba(33, 99, 158, 0.45) 0%, rgba(33, 99, 158, 0) 70%);
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  font-size: 0.74rem;
  letter-spacing: 0.09em;
  font-weight: 700;
  opacity: 0.86;
}

h1 {
  margin: 0.35rem 0 0;
  font: 700 2.1rem/0.95 "Cormorant Garamond", Georgia, serif;
  letter-spacing: 0.01em;
}

.lede {
  margin: 0.75rem 0 0;
  max-width: 38ch;
  color: rgba(249, 242, 223, 0.92);
  line-height: 1.36;
  font-size: 0.96rem;
}

.hero-stats {
  margin-top: 1.05rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.stat {
  border: 1px solid rgba(249, 242, 223, 0.22);
  border-radius: 13px;
  padding: 0.45rem 0.55rem;
  background: rgba(249, 242, 223, 0.08);
  backdrop-filter: blur(4px);
}

.stat .value {
  display: block;
  font: 700 1.02rem/1 "Cormorant Garamond", Georgia, serif;
}

.stat .label {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  opacity: 0.9;
}

.controls {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border-radius: 18px;
  background: rgba(255, 251, 243, 0.82);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-card);
}

.search-wrap {
  display: block;
}

.search-wrap span {
  display: block;
  font-weight: 600;
  font-size: 0.82rem;
  margin-bottom: 0.4rem;
  color: var(--muted);
}

.search-wrap input {
  width: 100%;
  border: 1px solid rgba(17, 35, 29, 0.24);
  border-radius: 13px;
  padding: 0.68rem 0.78rem;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 1rem;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.search-wrap input:focus {
  border-color: rgba(17, 35, 29, 0.58);
  box-shadow: 0 0 0 3px rgba(33, 99, 158, 0.14);
}

.type-filters {
  margin-top: 0.65rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.type-filter {
  border: 1px solid rgba(17, 35, 29, 0.18);
  border-radius: 999px;
  padding: 0.47rem 0.72rem;
  font-size: 0.86rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  cursor: pointer;
}

.type-filter .count {
  font-weight: 700;
  margin-left: 0.22rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1rem;
}

.type-filter.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff6eb;
}

.view-actions {
  margin-top: 0.6rem;
  display: flex;
  gap: 0.45rem;
}

.view-actions button {
  flex: 1;
  border: 1px solid rgba(17, 35, 29, 0.2);
  border-radius: 11px;
  padding: 0.48rem 0.64rem;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.technique-list {
  margin-top: 0.85rem;
  display: grid;
  gap: 0.65rem;
}

.technique-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent, var(--ink));
  border-radius: 18px;
  box-shadow: var(--shadow-card);
  overflow: clip;
  animation: rise 360ms ease both;
}

.technique-card[data-type="throw"] {
  --accent: var(--throw);
}

.technique-card[data-type="pin"] {
  --accent: var(--pin);
}

.technique-card[data-type="arm-lock"] {
  --accent: var(--arm-lock);
}

.technique-card[data-type="choke"] {
  --accent: var(--choke);
}

.technique-card details {
  width: 100%;
}

.technique-card summary {
  list-style: none;
  cursor: pointer;
  padding: 0.64rem 0.66rem 0.75rem;
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  gap: 0.62rem;
  align-items: start;
}

.technique-card summary::-webkit-details-marker {
  display: none;
}

.index {
  display: inline-grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.83rem;
  color: #fffaf2;
  background: var(--accent, var(--ink));
  margin-top: 0.08rem;
}

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

.name {
  margin: 0;
  font: 700 1.34rem/0.98 "Cormorant Garamond", Georgia, serif;
  letter-spacing: 0.005em;
}

.translated {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.badge-group {
  margin-top: 0.52rem;
  display: flex;
  gap: 0.38rem;
  flex-wrap: wrap;
}

.badge {
  border-radius: 999px;
  border: 1px solid rgba(17, 35, 29, 0.15);
  padding: 0.16rem 0.54rem;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.72);
}

.badge.broad {
  border-color: color-mix(in srgb, var(--accent, var(--ink)) 60%, transparent);
  color: color-mix(in srgb, var(--accent, var(--ink)) 90%, #111);
}

.detail-body {
  padding: 0 0.76rem 0.85rem 3.66rem;
  border-top: 1px solid rgba(17, 35, 29, 0.09);
}

.detail-body section {
  margin-top: 0.62rem;
}

.detail-body h3 {
  margin: 0;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.detail-body p {
  margin: 0.27rem 0 0;
  line-height: 1.36;
  font-size: 0.94rem;
}

.combos {
  margin: 0.34rem 0 0;
  padding-left: 1.14rem;
}

.combos li {
  margin: 0.16rem 0;
  line-height: 1.34;
}

.video-link {
  margin-top: 0.72rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--accent, var(--ink));
}

.video-link::after {
  content: "->";
  transform: translateX(0);
  transition: transform 170ms ease;
}

.video-link:hover::after,
.video-link:focus-visible::after {
  transform: translateX(2px);
}

.empty-state {
  text-align: center;
  padding: 1.2rem 0.75rem;
  border: 1px dashed rgba(17, 35, 29, 0.26);
  border-radius: 16px;
  color: var(--muted);
  background: rgba(255, 252, 246, 0.6);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 760px) {
  .page-shell {
    width: min(1200px, 100% - 1.8rem);
    padding-top: 1.3rem;
  }

  .hero {
    padding: 1.5rem 1.5rem 1.65rem;
  }

  h1 {
    font-size: 3rem;
    max-width: 11ch;
  }

  .hero-stats {
    width: min(620px, 100%);
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .controls {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: end;
    position: sticky;
    top: 0.7rem;
    z-index: 4;
  }

  .type-filters {
    margin-top: 0.6rem;
  }

  .view-actions {
    margin-top: 0;
    min-width: 210px;
  }

  .technique-list {
    margin-top: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }
}

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