:root {
  --kai: "BiauKai", "DFKai-SB", "KaiTi", "STKaiti", "Noto Serif TC", serif;
  --ink: #b8ff70;
  --muted: #92ca69;
  --bg: #111713;
  --panel: #1b241d;
  --line: rgba(132, 192, 96, .3);
  --olive: #8be23f;
  --lime: #b8ff70;
  --rust: #a2f43b;
  --mono: var(--kai);
  --serif: var(--kai);
}

* {
  font-family: var(--kai) !important;
  font-weight: 700 !important;
}

html {
  background: var(--bg);
}

body {
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse at 12% 0%, rgba(111, 132, 88, .2), transparent 43%),
    linear-gradient(rgba(139, 226, 63, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 226, 63, .035) 1px, transparent 1px);
  background-size: auto, 38px 38px, 38px 38px;
  background-attachment: fixed;
  text-align: left;
}

a {
  color: var(--lime);
  text-decoration-color: rgba(139, 226, 63, .55);
}

a:hover {
  color: #e0ffb7;
  text-shadow: 0 0 8px rgba(139, 226, 63, .28);
}

header {
  border-bottom-color: var(--line);
  background: rgba(17, 23, 19, .95);
  box-shadow: 0 8px 26px rgba(0, 0, 0, .3);
}

.brand {
  color: var(--lime);
  text-shadow: none;
}

.mark {
  border-color: var(--olive);
  color: var(--lime);
  box-shadow: inset 0 0 10px rgba(139, 226, 63, .12);
}

nav a {
  color: var(--muted);
}

nav a:hover,
nav a:focus-visible {
  color: var(--lime);
}

.tag {
  color: var(--lime);
  border-color: rgba(139, 226, 63, .68);
  background: rgba(103, 123, 78, .16);
  box-shadow: inset 0 0 12px rgba(139, 226, 63, .06);
}

.eyebrow,
.kicker,
.badge {
  color: var(--olive);
  text-shadow: none;
}

.hero h1 {
  color: var(--lime);
  background: none;
  -webkit-text-fill-color: var(--lime);
  letter-spacing: .025em;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .45), 0 0 16px rgba(139, 226, 63, .22);
  filter: none;
  text-align: center;
}

.hero p,
.section-head p,
.part-panel p,
.note,
footer {
  color: var(--muted);
}

.hero-photo,
.part-figure {
  background: #171e18;
  border-color: var(--line);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .22), inset 0 0 20px rgba(139, 226, 63, .035);
}

.hero-photo figcaption {
  color: var(--ink);
  border: 1px solid var(--line);
  background: rgba(17, 23, 19, .9);
}

.quick {
  border-color: var(--line);
}

.quick div + div {
  border-left-color: var(--line);
}

.quick b,
.spec strong {
  color: var(--lime);
  text-shadow: none;
}

section {
  border-top-color: var(--line);
}

.section-head {
  justify-content: flex-start;
  text-align: left;
}

.section-head h2,
.part-panel h3,
.card h3 {
  color: var(--lime);
  background: none;
  -webkit-text-fill-color: var(--lime);
  text-shadow: none;
}

.section-head h2 {
  position: relative;
  display: block;
  width: max-content;
  max-width: 100%;
  margin-inline: 0;
  padding-bottom: 9px;
  letter-spacing: .035em;
}

.section-head h2::after {
  position: absolute;
  right: 12%;
  bottom: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--olive), rgba(139, 226, 63, .22) 70%, transparent);
  content: "";
}

.pin {
  color: #e0ffb7;
  background: rgba(105, 125, 80, .96);
  border-color: #a5dc55;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .4);
}

.pin:hover,
.pin[aria-pressed="true"] {
  background: var(--rust);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .45);
}

.part-panel,
.spec,
.card {
  background: linear-gradient(145deg, rgba(31, 41, 32, .98), rgba(21, 29, 23, .98));
  border-color: var(--line);
  box-shadow: 0 10px 25px rgba(0, 0, 0, .2), inset 0 1px rgba(221, 224, 197, .035);
}

.part-list button {
  color: var(--muted);
  border-color: rgba(139, 226, 63, .25);
  background: rgba(105, 125, 80, .06);
}

.part-list button.active,
.part-list button:hover,
.part-list button:focus-visible {
  color: var(--lime);
  border-color: var(--olive);
  background: rgba(105, 125, 80, .18);
  box-shadow: inset 3px 0 var(--olive);
}

.spec,
.card,
.part-panel,
.hero-photo,
.part-figure {
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.card:hover,
.spec:hover {
  border-color: rgba(139, 226, 63, .58);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .28), inset 3px 0 rgba(139, 226, 63, .45);
}

.card .n,
.card .lead,
.card dt {
  color: var(--muted);
}

.card .n {
  letter-spacing: .1em;
  color: var(--rust);
}

.card h3 {
  letter-spacing: .025em;
}

.card dl div {
  border-top-color: rgba(132, 192, 96, .22);
}

.hint {
  color: var(--ink);
  border-left-color: var(--rust);
  background: rgba(105, 125, 80, .12);
}

footer {
  border-top-color: var(--line);
  background: rgba(17, 23, 19, .7);
}

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 450px;
  margin: 0 auto 24px;
}

.photo-gallery .photo-item {
  position: relative;
  width: 220px;
  max-width: 100%;
  min-width: 0;
  margin: 0 auto;
  padding: 5px;
  border: 1px solid var(--line);
  background: #171e18;
}

.photo-gallery .photo-item img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: contain;
}

.photo-gallery .photo-item figcaption {
  position: static;
  margin-top: 6px;
  padding: 3px 5px;
  border: 0;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.parts-index {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: parts;
}

.parts-index li {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-height: 52px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(31, 41, 32, .98), rgba(21, 29, 23, .98));
  box-shadow: inset 2px 0 rgba(139, 226, 63, .42);
  text-align: left;
}

.part-no {
  flex: 0 0 30px;
  color: var(--olive);
  font-variant-numeric: tabular-nums;
  text-shadow: none;
}

@media (max-width: 850px) {
  .parts-index {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .photo-gallery {
    grid-template-columns: 1fr;
  }

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

  .photo-gallery {
    max-width: 220px;
  }

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

  .spec.wide {
    grid-column: 1 / -1;
  }

  .spec small {
    font-size: 14px;
  }

  .quick small,
  nav a,
  .photo-gallery .photo-item figcaption,
  .accessory-photo figcaption,
  footer {
    font-size: 12px;
  }
}

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

.hero > div {
  max-width: 760px;
  margin-inline: auto;
}

.accessory-photo {
  width: 100%;
  max-width: 220px;
  margin: 12px auto 18px;
  padding: 5px;
  border: 1px solid var(--line);
  background: #171e18;
  box-shadow: 0 5px 14px rgba(0, 0, 0, .22);
}

.accessory-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: contain;
}

.accessory-photo figcaption {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  text-align: left;
}

.hero h1 {
  text-align: center;
}

.section-head h2,
.part-panel h3,
.card h3 {
  text-align: left;
}

.parts-index li {
  text-align: left;
}

.spec,
.card {
  text-align: left;
}

.spec {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: 4px 10px;
}

.spec > small:first-child {
  grid-column: 1;
  grid-row: 1;
}

.spec > strong {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  margin-top: 0;
  text-align: left;
}

.spec > small:last-child:not(:first-child) {
  grid-column: 2;
  grid-row: 2;
  text-align: left;
}

.card dl div {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  text-align: left;
}

.card dt {
  flex: 0 0 42%;
}

.card dd {
  flex: 1;
  text-align: left;
}

footer div {
  justify-content: flex-start;
}

.target-display {
  margin-top: 24px;
  text-align: left;
}

.target-display h3 {
  margin: 0 0 10px;
  color: var(--lime);
  font-size: 1.1rem;
  text-align: left;
}

.accessory-photo.reticle-photo {
  max-width: 220px;
}

.accessory-photo.target-paper {
  max-width: 320px;
  margin: 12px 0 0;
}

.accessory-photo.target-paper img {
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
}

.mnemonic {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 13px 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--olive);
  background: linear-gradient(135deg, rgba(105, 125, 80, .16), rgba(27, 36, 29, .82));
  color: var(--lime);
  font-size: clamp(22px, 4vw, 32px);
  letter-spacing: .12em;
  box-shadow: inset 0 1px rgba(221, 224, 197, .035);
}


/* Shared transparent 3:2 photo windows and centered site typography */
body {
  text-align: center;
}

nav {
  justify-content: center;
}

.brand,
nav a,
.hero > div,
.hero p,
.quick div {
  text-align: center;
}

.hero p {
  margin-inline: auto;
}

.quick div {
  padding-right: 12px;
  padding-left: 12px;
}

.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.section-head > div {
  width: 100%;
  text-align: center;
}

.section-head h2 {
  width: max-content;
  max-width: 100%;
  margin: 8px auto 0;
  text-align: center;
}

.section-head h2::after {
  right: auto;
  left: 50%;
  width: 76%;
  transform: translateX(-50%);
}

.section-head p {
  margin: 10px auto 0;
  text-align: center;
}

.photo-gallery {
  grid-template-columns: repeat(2, minmax(0, 280px));
  justify-content: center;
  max-width: 570px;
}

.photo-gallery .photo-item,
.accessory-photo.equipment-photo {
  width: 100%;
  max-width: 280px;
  margin: 12px auto 18px;
  padding: 5px;
  border: 1px solid var(--line);
  background: transparent;
  box-shadow: none;
}

.photo-frame {
  display: grid;
  width: 100%;
  aspect-ratio: 3 / 2;
  place-items: center;
  overflow: hidden;
  background: transparent;
}

.photo-frame img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: contain;
}

.photo-gallery .photo-item figcaption,
.accessory-photo figcaption {
  text-align: center;
}

.parts-index li {
  justify-content: center;
  text-align: center;
}

.part-no,
.part-panel,
.part-panel h3,
.part-panel p,
.part-list button,
.spec,
.spec small,
.spec strong,
.card,
.card .n,
.card h3,
.card .lead,
.card dt,
.card dd,
.hint,
.note {
  text-align: center;
}

.part-panel p {
  margin-inline: auto;
}

.spec > strong,
.spec > small:last-child:not(:first-child) {
  text-align: center;
}

.card dl div {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  align-items: start;
  justify-content: initial;
  gap: 8px;
  text-align: center;
}

.card dt,
.card dd {
  min-width: 0;
  text-align: center;
}

.source {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

footer div {
  justify-content: center;
  text-align: center;
}

.target-display,
.target-display h3 {
  text-align: center;
}

.accessory-photo.target-paper {
  margin-right: auto;
  margin-left: auto;
}

@media (max-width: 520px) {
  .photo-gallery {
    grid-template-columns: 1fr;
    max-width: 280px;
  }

  .photo-gallery .photo-item,
  .accessory-photo.equipment-photo {
    max-width: 280px;
  }
}


/* Compact, left-aligned, single-line part labels */
.parts-index li {
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
  padding: 7px 8px;
  text-align: left;
}

.part-no {
  flex: 0 0 22px;
  text-align: left;
}

.parts-index li > span:last-child {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  font-size: 10px;
  line-height: 1.3;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/* Compact, left-aligned specification rows with a centered divider */
.spec {
  position: relative;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 4px 18px;
  text-align: left;
}

.spec::before {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 50%;
  z-index: 1;
  width: 2px;
  background: var(--lime);
  box-shadow: 0 0 8px rgba(184, 255, 112, .72);
  content: "";
}

.spec > small:first-child,
.spec > strong,
.spec > small:last-child:not(:first-child) {
  min-width: 0;
  font-size: 10px;
  text-align: left;
}

.spec > strong {
  line-height: 1.4;
}


/* Larger single-line labels and values on the T112 specifications section */
.spec-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.spec > small:first-child,
.spec > strong,
.spec > small:last-child:not(:first-child) {
  overflow: hidden;
  font-size: 12px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 850px) {
  .spec-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .spec-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}


/* Give the specification value column enough room for full single-line text */
.spec-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.spec > strong,
.spec > small:last-child:not(:first-child) {
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

@media (max-width: 850px) {
  .spec-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .spec-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}


/* Unified type scale and line-height rhythm across the site */
:root {
  --type-caption: 11px;
  --type-compact: 12px;
  --type-body: 15px;
  --type-subheading: 22px;
  --leading-tight: 1.2;
  --leading-meta: 1.35;
  --leading-compact: 1.45;
  --leading-body: 1.6;
}

body {
  font-size: var(--type-body);
  line-height: var(--leading-body);
}

.hero h1 {
  line-height: 1.08;
}

.section-head h2 {
  font-size: clamp(30px, 4vw, 40px);
  line-height: var(--leading-tight);
}

.part-panel h3,
.card h3 {
  font-size: var(--type-subheading);
  line-height: 1.3;
}

.hero p,
.section-head p,
.part-panel p,
.card .lead {
  font-size: var(--type-body);
  line-height: var(--leading-body);
}

.parts-index li > span:last-child,
.part-no {
  font-size: var(--type-caption);
  line-height: var(--leading-compact);
}

.spec > small:first-child,
.spec > strong {
  font-size: var(--type-compact);
  line-height: var(--leading-compact);
}

.card dl div,
.hint,
.note {
  font-size: 13px;
  line-height: var(--leading-body);
}

.quick small,
nav a,
.tag,
.photo-gallery .photo-item figcaption,
.accessory-photo figcaption,
footer {
  font-size: var(--type-compact);
  line-height: var(--leading-meta);
}

.eyebrow,
.kicker,
.badge,
.card .n {
  font-size: var(--type-caption);
  line-height: var(--leading-meta);
}

.mnemonic {
  line-height: 1.35;
}

@media (max-width: 520px) {
  .spec > small:first-child,
  .spec > strong {
    font-size: clamp(10px, 3.2vw, 12px);
  }
}


/* White matte only for the two rifle overview photos */
.photo-gallery .photo-frame {
  background-color: #ffffff;
}


/* Clear, compact part inventories for the three accessory cards */
.component-list {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(105, 125, 80, .08);
  text-align: left;
}

.component-list h4 {
  margin: 0 0 10px;
  color: var(--lime);
  font-size: 15px;
  line-height: 1.4;
  text-align: left;
}

.component-list ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 16px;
  margin: 0;
  padding-left: 22px;
}

.component-list li {
  min-width: 0;
  padding-left: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.component-list li::marker {
  color: var(--olive);
}


/* Readable step-by-step troubleshooting mnemonic */
.troubleshooting-steps {
  display: grid;
  gap: 8px;
  max-width: 820px;
  margin: 20px auto 0;
  padding: 0;
  list-style: none;
}

.troubleshooting-steps li {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--olive);
  background: rgba(105, 125, 80, .09);
  text-align: left;
}

.troubleshooting-steps strong {
  color: var(--lime);
  text-align: left;
}

.troubleshooting-steps span {
  color: var(--ink);
  text-align: left;
}

@media (max-width: 520px) {
  .troubleshooting-steps li {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 8px;
    padding: 10px 11px;
  }
}


/* Keep accessory dimensions compact and on one line */
.card dl .dimension-row {
  grid-template-columns: minmax(0, .4fr) minmax(0, 1.6fr);
  align-items: center;
  gap: 4px;
}

.card dl .dimension-row dt,
.card dl .dimension-row dd {
  min-width: 0;
  font-size: clamp(8px, 2.4vw, 10px);
  line-height: 1.35;
  white-space: nowrap;
}
