/* SKIN "mission": an off-white drafting sheet with blueprint lines and a stitched circular mission patch around the orbit.
   Every selector is scoped under body.skin-mission; the tier reads as a classification band and the observation count is a stencilled readout. */

body.skin-mission {
  --paper: #f3efe1;
  --ink: #12305a;
  --grid: rgba(24, 86, 170, .10);
  --sans: "Bahnschrift", "DIN Alternate", "Franklin Gothic Medium", "Segoe UI", Arial, sans-serif;
  --mono: "Consolas", "Lucida Console", "Courier New", monospace;
  background-color: #154a8a;
  background-image:
    linear-gradient(rgba(255, 255, 255, .14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .14) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 96px 96px, 96px 96px, 16px 16px, 16px 16px;
  color: #eaf2ff;
  font-family: var(--sans);
}

/* ---------- card: a drafting sheet with a double border ---------- */
body.skin-mission .card {
  --tc: #6f7a87;    /* thread / band colour of the tier */
  --ti: #fff;       /* ink on the band */
  --glow: #c8d0da;  /* bright version of the tier colour, for lines on the dark patch */
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  height: 380px;
  min-width: 0;
  margin: 0;
  padding: 9px 9px 7px;
  color: var(--ink);
  font-family: var(--sans);
  text-align: left;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 12px 12px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 12px 12px,
    var(--paper);
  border: 1px solid var(--ink);
  border-radius: 3px;
  box-shadow:
    inset 0 0 0 3px var(--paper),
    inset 0 0 0 4px var(--ink),
    0 8px 18px rgba(0, 10, 30, .45);
  overflow: hidden;
}

/* ---------- classification colours: embroidery threads ---------- */
body.skin-mission .card.t-mythic    { --tc: #c4122f; --ti: #fff;    --glow: #ff7a8c; }
body.skin-mission .card.t-legendary { --tc: #e68a00; --ti: #12305a; --glow: #ffc15e; }
body.skin-mission .card.t-epic      { --tc: #6a3fb0; --ti: #fff;    --glow: #c0a4ff; }
body.skin-mission .card.t-rare      { --tc: #1f72c4; --ti: #fff;    --glow: #79c6ff; }
body.skin-mission .card.t-uncommon  { --tc: #2c8a5a; --ti: #fff;    --glow: #7be3a8; }
body.skin-mission .card.t-common    { --tc: #8c7a3e; --ti: #fff;    --glow: #e8d98f; }
body.skin-mission .card.t-control   { --tc: #6f7a87; --ti: #fff;    --glow: #c8d0da; }

/* ---------- drafting scale along the top edge ---------- */
body.skin-mission .card .rule {
  flex: 0 0 10px;
  box-sizing: border-box;
  height: 10px;
  margin: 0 0 4px;
  border-bottom: 1px solid var(--ink);
  background:
    repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 6px) 0 100% / 100% 4px no-repeat,
    repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 30px) 0 100% / 100% 9px no-repeat;
}

/* ---------- header: classification band with hazard-tape edges ---------- */
body.skin-mission .card header {
  flex: 0 0 28px;
  box-sizing: border-box;
  height: 28px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: 6px;
  margin: 0;
  padding: 0 7px;
  color: var(--ti);
  border: 1px solid var(--ink);
  background:
    repeating-linear-gradient(-45deg, var(--ink) 0 4px, transparent 4px 8px) 0 0 / 100% 4px no-repeat,
    repeating-linear-gradient(-45deg, var(--ink) 0 4px, transparent 4px 8px) 0 100% / 100% 4px no-repeat,
    var(--tc);
}

body.skin-mission .card header::before {
  content: "CLASS";
  padding-right: 6px;
  border-right: 1px solid currentColor;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 7px;
  line-height: 10px;
  letter-spacing: .22em;
  opacity: .9;
}

body.skin-mission .card .tier {
  padding-left: .32em;
  font-family: var(--sans);
  font-weight: 900;
  font-size: 13px;
  line-height: 1;
  letter-spacing: .32em;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
}

body.skin-mission .card .idx {
  padding-left: 6px;
  border-left: 1px solid currentColor;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 9px;
  line-height: 10px;
  letter-spacing: .05em;
  white-space: nowrap;
}

/* ---------- plot: centre lines plus a stitched circular patch ---------- */
body.skin-mission .card .plot {
  position: relative;
  flex: 1 1 0;
  min-height: 96px;
  margin: 5px 0 0;
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, rgba(18, 48, 90, .55) 0 9px, transparent 9px 12px, rgba(18, 48, 90, .55) 12px 14px, transparent 14px 17px) 0 50% / 100% 1px no-repeat,
    repeating-linear-gradient(0deg, rgba(18, 48, 90, .55) 0 9px, transparent 9px 12px, rgba(18, 48, 90, .55) 12px 14px, transparent 14px 17px) 50% 0 / 1px 100% no-repeat;
}

/* outer stitched edge, alternating tier thread and navy thread */
body.skin-mission .card .plot::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 0;
  height: min(146px, 96%);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: repeating-conic-gradient(var(--tc) 0 4deg, var(--ink) 4deg 8deg);
  box-shadow: 0 0 0 1px var(--paper), 0 0 0 2px var(--ink);
}

/* inner navy field with a faint blueprint grid */
body.skin-mission .card .plot::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  height: calc(min(146px, 96%) - 14px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    linear-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px) 0 0 / 12px 12px,
    linear-gradient(90deg, rgba(255, 255, 255, .08) 1px, transparent 1px) 0 0 / 12px 12px,
    radial-gradient(circle at 50% 50%, #17407a 0, #0c2850 100%);
  box-shadow:
    inset 0 0 0 1px rgba(243, 239, 225, .85),
    inset 0 0 0 3px #0c2850,
    inset 0 0 0 4px rgba(243, 239, 225, .35);
}

body.skin-mission .card .plot svg.orb {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: auto;
  height: calc(min(146px, 96%) - 18px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  overflow: hidden;
}

body.skin-mission .card .orb path,
body.skin-mission .card .orb circle,
body.skin-mission .card .orb line {
  vector-effect: non-scaling-stroke;
}

body.skin-mission .card .orb .ring {
  fill: none;
  stroke: rgba(243, 239, 225, .25);
  stroke-width: 1px;
}

body.skin-mission .card .orb .shadow {
  fill: none;
  stroke: rgba(160, 210, 255, .65);
  stroke-width: 1.5px;
  stroke-dasharray: 1 4;
  stroke-linecap: round;
}

body.skin-mission .card .orb .ghost {
  fill: none;
  stroke: rgba(243, 239, 225, .28);
  stroke-width: 1.2px;
}

body.skin-mission .card .orb .orbit {
  fill: none;
  stroke: var(--glow);
  stroke-width: 2.4px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.skin-mission .card .orb .qline {
  stroke: rgba(243, 239, 225, .75);
  stroke-width: 1px;
  stroke-dasharray: 3 2;
}

body.skin-mission .card .orb .sun {
  fill: #ffd23f;
  stroke: rgba(255, 210, 63, .4);
  stroke-width: 4px;
}

body.skin-mission .card .orb .body {
  fill: var(--paper);
  stroke: var(--glow);
  stroke-width: 2px;
}

/* ---------- name: title-block lines, stencil-spaced capitals ---------- */
body.skin-mission .card h2 {
  flex: 0 0 31px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 5px 0 0;
  padding: 0 4px;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  font-family: var(--sans);
  font-weight: 800;
  font-size: 12px;
  line-height: 1.1;
  letter-spacing: .14em;
  text-align: center;
  text-transform: uppercase;
  overflow: hidden;
}

/* ---------- the product: a stencilled readout ---------- */
body.skin-mission .card .count {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0 9px;
  margin: 0;
  padding: 5px 2px;
}

body.skin-mission .card .count b {
  padding: 0 1px 2px;
  border-bottom: 3px solid var(--tc);
  font-family: var(--sans);
  font-weight: 900;
  font-size: 66px;
  line-height: .86;
  letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

/* stencil bridge: a thin gap cut through the numerals */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  body.skin-mission .card .count b {
    background-image: linear-gradient(to bottom, var(--ink) 0 45%, transparent 45% 52%, var(--ink) 52% 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

body.skin-mission .card .count span {
  flex: 1 1 70px;
  box-sizing: border-box;
  max-width: 96px;
  padding-left: 7px;
  border-left: 3px solid var(--tc);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 8px;
  line-height: 1.35;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* ---------- elements: a four-column data table ---------- */
body.skin-mission .card .els {
  flex: 0 0 auto;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
  padding: 0;
  border: 1px solid var(--ink);
  background: rgba(255, 255, 255, .55);
}

body.skin-mission .card .els div {
  min-width: 0;
  text-align: center;
}

body.skin-mission .card .els div + div {
  border-left: 1px solid var(--ink);
}

body.skin-mission .card .els dt {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 8px;
  line-height: 12px;
  letter-spacing: .2em;
  text-align: center;
}

body.skin-mission .card .els dd {
  margin: 0;
  padding: 0 1px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 10px;
  line-height: 21px;
  letter-spacing: -.02em;
  white-space: nowrap;
  overflow: hidden;
}

/* ---------- footer: drawing-sheet source line ---------- */
body.skin-mission .card footer {
  flex: 0 0 auto;
  margin: 5px 0 0;
  padding-top: 3px;
  border-top: 1px dashed var(--ink);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 7px;
  line-height: 1;
  letter-spacing: .06em;
  text-align: center;
  white-space: nowrap;
  opacity: .8;
  overflow: hidden;
}
