:root {
  --swx-night: #060a10;
  --swx-ink: #0b111a;
  --swx-paper: #eee1c8;
  --swx-muted: #a99e8d;
  --swx-gold: #d9ad61;
  --swx-gold-bright: #f1d49a;
  --swx-line: rgba(217, 173, 97, .28);
  --swx-blue: #87a8c7;
}

.swx-section,
.swx-claim,
.swx-toast,
.swx-passport-next,
.swx-vault-panel,
.swx-review-tools {
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}

.swx-section *,
.swx-claim *,
.swx-toast *,
.swx-passport-next *,
.swx-vault-panel *,
.swx-review-tools * { box-sizing: border-box; }

.swx-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  padding: clamp(72px, 9vw, 132px) max(24px, calc((100vw - 1240px) / 2));
  color: var(--swx-paper);
  background:
    radial-gradient(circle at 12% 18%, rgba(115, 144, 170, .11), transparent 32%),
    radial-gradient(circle at 83% 78%, rgba(191, 139, 62, .10), transparent 34%),
    linear-gradient(145deg, #070b12, #0b121b 52%, #05080d);
  border-top: 1px solid var(--swx-line);
  border-bottom: 1px solid rgba(217, 173, 97, .15);
}

.swx-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .28;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent);
}

.swx-section__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 40px;
  max-width: 1180px;
  margin: 0 auto 42px;
}

.swx-kicker {
  margin: 0 0 12px;
  color: #bd8c4c;
  font: 700 10px/1.3 Arial, Helvetica, sans-serif;
  letter-spacing: .24em;
  text-transform: uppercase;
}

.swx-section h2,
.swx-section h3,
.swx-section h4 { color: var(--swx-paper); }

.swx-section h2 {
  max-width: 820px;
  margin: 0;
  font: 400 clamp(38px, 5.8vw, 72px)/.98 Georgia, "Times New Roman", serif;
  letter-spacing: -.045em;
}

.swx-section h2 em { color: var(--swx-gold); font-weight: 400; }

.swx-intro {
  max-width: 720px;
  margin: 18px 0 0;
  color: #b0a697;
  font-size: 16px;
  line-height: 1.7;
}

.swx-progress {
  min-width: 164px;
  padding: 18px 20px;
  border: 1px solid var(--swx-line);
  background: rgba(4, 7, 12, .58);
  text-align: center;
}

.swx-progress strong {
  display: block;
  color: var(--swx-gold-bright);
  font: 400 38px/1 Georgia, "Times New Roman", serif;
}

.swx-progress span {
  display: block;
  margin-top: 7px;
  color: #8f8678;
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.swx-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  max-width: 1180px;
  margin: 0 auto;
}

.swx-card {
  position: relative;
  min-height: 260px;
  padding: 22px 20px 20px;
  border: 1px solid rgba(217, 173, 97, .20);
  color: var(--swx-paper);
  background: linear-gradient(160deg, rgba(20, 29, 41, .92), rgba(4, 8, 13, .96));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.018), 0 18px 48px rgba(0,0,0,.16);
  text-align: left;
  cursor: pointer;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease, opacity .25s ease;
}

.swx-card:hover,
.swx-card:focus-visible {
  transform: translateY(-5px);
  border-color: rgba(241, 212, 154, .68);
  box-shadow: 0 22px 58px rgba(0,0,0,.32), 0 0 34px rgba(217,173,97,.08);
  outline: 2px solid transparent;
}

.swx-card[disabled],
.swx-card.is-locked {
  opacity: .42;
  filter: saturate(.3);
  cursor: not-allowed;
}

.swx-card[disabled]:hover,
.swx-card.is-locked:hover { transform: none; border-color: rgba(217,173,97,.20); }

.swx-card.is-recovered {
  border-color: rgba(241, 212, 154, .76);
  background:
    radial-gradient(circle at 50% 24%, rgba(217,173,97,.19), transparent 38%),
    linear-gradient(160deg, rgba(36, 35, 30, .96), rgba(8, 10, 12, .98));
  box-shadow: inset 0 0 24px rgba(217,173,97,.07), 0 0 32px rgba(217,173,97,.08);
}

.swx-card.is-recovered::after {
  content: "RECOVERED";
  position: absolute;
  right: 14px;
  top: 14px;
  color: var(--swx-gold-bright);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .16em;
}

.swx-card__number {
  display: block;
  color: #846d4e;
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.swx-card__mark {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin: 28px 0 20px;
  border: 1px solid rgba(217,173,97,.38);
  border-radius: 50%;
  color: var(--swx-gold);
  background: rgba(217,173,97,.045);
  font: 30px/1 Georgia, "Times New Roman", serif;
  box-shadow: inset 0 0 18px rgba(217,173,97,.08);
}

.swx-card.is-recovered .swx-card__mark {
  color: #fff0c8;
  background: rgba(217,173,97,.16);
  box-shadow: inset 0 0 22px rgba(217,173,97,.17), 0 0 30px rgba(217,173,97,.14);
}

.swx-card strong {
  display: block;
  color: var(--swx-paper);
  font: 400 20px/1.16 Georgia, "Times New Roman", serif;
}

.swx-card small {
  display: block;
  margin-top: 10px;
  color: #91897e;
  font-size: 12px;
  line-height: 1.55;
}

.swx-detail {
  max-width: 1180px;
  margin: 18px auto 0;
  padding: 25px 28px;
  border-left: 2px solid var(--swx-gold);
  color: #b8afa1;
  background: rgba(3, 6, 10, .64);
  line-height: 1.7;
}

.swx-detail strong { color: var(--swx-gold-bright); }

.swx-completion {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  max-width: 1180px;
  margin: 26px auto 0;
  padding: 24px 26px;
  border: 1px solid rgba(217,173,97,.38);
  background: linear-gradient(100deg, rgba(217,173,97,.10), rgba(7,11,17,.78));
}

.swx-completion[hidden] { display: none; }
.swx-completion__mark { color: var(--swx-gold-bright); font: 42px/1 Georgia, serif; }
.swx-completion h3 { margin: 0 0 5px; font: 400 24px/1.1 Georgia, serif; }
.swx-completion p { margin: 0; color: #a9a092; font-size: 13px; line-height: 1.55; }
.swx-actions { display: flex; flex-wrap: wrap; gap: 9px; justify-content: flex-end; }

.swx-button,
.swx-actions button,
.swx-actions a,
.swx-filter {
  appearance: none;
  min-height: 42px;
  padding: 11px 16px;
  border: 1px solid rgba(217,173,97,.45);
  border-radius: 0;
  color: var(--swx-paper);
  background: rgba(5,9,14,.74);
  font: 700 10px/1 Arial, Helvetica, sans-serif;
  letter-spacing: .10em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}

.swx-button:hover,
.swx-button:focus-visible,
.swx-actions button:hover,
.swx-actions button:focus-visible,
.swx-actions a:hover,
.swx-actions a:focus-visible,
.swx-filter:hover,
.swx-filter:focus-visible,
.swx-filter.is-active {
  color: #130d05;
  border-color: var(--swx-gold-bright);
  background: var(--swx-gold-bright);
  transform: translateY(-1px);
  outline: 2px solid transparent;
}

.swx-reflection {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .7fr);
  gap: 22px;
  align-items: stretch;
}

.swx-reflection__copy,
.swx-reflection__action {
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid var(--swx-line);
  background: rgba(4, 8, 13, .62);
}

.swx-reflection h3 { margin: 0 0 12px; font: 400 30px/1.1 Georgia, serif; }
.swx-reflection p { color: #aba296; line-height: 1.7; }
.swx-reflection label { display: block; margin-bottom: 9px; color: #b99257; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.swx-reflection textarea {
  width: 100%;
  min-height: 116px;
  resize: vertical;
  padding: 15px;
  border: 1px solid rgba(217,173,97,.35);
  color: #eee1c8;
  background: rgba(0,0,0,.24);
  font: 15px/1.5 Georgia, serif;
}
.swx-reflection textarea:focus { outline: 2px solid var(--swx-gold); outline-offset: 2px; }

.swx-choice-grid { display: grid; gap: 10px; }
.swx-choice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(217,173,97,.22);
  color: #c9bead;
  background: rgba(0,0,0,.16);
  cursor: pointer;
}
.swx-choice:has(input:checked) { border-color: var(--swx-gold); background: rgba(217,173,97,.09); }
.swx-choice input { accent-color: #d9ad61; margin-top: 3px; }
.swx-choice strong { display: block; color: var(--swx-paper); font-size: 13px; }
.swx-choice small { display: block; margin-top: 4px; color: #908779; line-height: 1.4; }

.swx-echo-orbit {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 260px;
  border: 1px solid var(--swx-line);
  background: radial-gradient(circle, rgba(217,173,97,.12), transparent 58%);
}
.swx-echo-orbit::before,
.swx-echo-orbit::after {
  content: "";
  position: absolute;
  width: 172px;
  height: 172px;
  border: 1px solid rgba(217,173,97,.23);
  border-radius: 50%;
}
.swx-echo-orbit::after { width: 230px; height: 230px; border-style: dashed; }
.swx-echo-orbit .swx-button { position: relative; z-index: 2; }

.swx-etsuko-seal {
  display: grid;
  grid-template-columns: minmax(260px, .62fr) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 84px);
  align-items: center;
  max-width: 1080px;
  margin: 0 auto;
}
.swx-etsuko-card {
  position: relative;
  aspect-ratio: 4 / 5;
  border: 1px solid rgba(217,173,97,.35);
  background:
    radial-gradient(circle at 50% 35%, rgba(156,45,52,.20), transparent 38%),
    linear-gradient(160deg, #10151c, #030507);
  box-shadow: 0 30px 80px rgba(0,0,0,.42), inset 0 0 0 7px rgba(255,255,255,.012);
}
.swx-etsuko-card::before {
  content: "";
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(217,173,97,.24);
  background: linear-gradient(135deg, transparent 49.6%, rgba(217,173,97,.14) 50%, transparent 50.4%);
}
.swx-etsuko-card::after {
  content: "封";
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  transform: translate(-50%, -50%) rotate(-4deg);
  border: 2px solid rgba(179,56,62,.72);
  color: #cb6e72;
  font: 44px/1 serif;
}
.swx-etsuko-card.is-marked { border-color: var(--swx-gold-bright); box-shadow: 0 30px 80px rgba(0,0,0,.46), 0 0 44px rgba(217,173,97,.13); }

.swx-study-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  max-width: 1180px;
  margin: 0 auto;
}
.swx-study-object {
  min-height: 220px;
  padding: 22px 17px;
  border: 1px solid var(--swx-line);
  color: var(--swx-paper);
  background: rgba(5,9,14,.72);
  text-align: left;
  cursor: pointer;
}
.swx-study-object:hover,
.swx-study-object:focus-visible,
.swx-study-object.is-open { border-color: var(--swx-gold-bright); background: rgba(217,173,97,.08); outline: 2px solid transparent; }
.swx-study-object span { display: block; margin-bottom: 24px; color: var(--swx-gold); font: 32px/1 Georgia, serif; }
.swx-study-object strong { display: block; font: 400 18px/1.15 Georgia, serif; }
.swx-study-object small { display: block; margin-top: 9px; color: #918779; line-height: 1.5; }

.swx-review-tools {
  max-width: 1180px;
  margin: 0 auto 30px;
  padding: 18px;
  border: 1px solid rgba(217,173,97,.25);
  color: #d9cdb9;
  background: rgba(5,9,14,.82);
}
.swx-review-tools__row { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.swx-review-tools__row > span { margin-right: auto; color: #a79b89; font-size: 12px; }
.swx-review-share {
  margin-top: 14px;
  border-color: rgba(217,173,97,.32) !important;
  color: #d9ad61 !important;
  background: transparent !important;
}
.swx-is-filtered { display: none !important; }

/* The live Passport was too subtle about earned versus unclaimed seals. */
.swp-toast { display: none !important; }
.swp-seal { opacity: .62 !important; filter: saturate(.45) !important; border-style: dashed !important; }
.swp-seal .swp-seal__state {
  padding: 5px 8px !important;
  border: 1px solid rgba(157,148,137,.25) !important;
  color: #776f65 !important;
  background: rgba(0,0,0,.20) !important;
  font-weight: 800 !important;
  letter-spacing: .12em !important;
}
.swp-seal.is-earned {
  opacity: 1 !important;
  filter: none !important;
  border-style: solid !important;
  border-color: rgba(241,209,149,.78) !important;
  background: radial-gradient(circle at 18% 40%, rgba(221,176,97,.18), transparent 40%), rgba(12,15,18,.94) !important;
  box-shadow: inset 0 0 24px rgba(221,176,97,.08), 0 0 28px rgba(221,176,97,.09) !important;
}
.swp-seal.is-earned .swp-seal__state {
  border-color: rgba(241,209,149,.72) !important;
  color: #241706 !important;
  background: var(--swx-gold-bright) !important;
  box-shadow: 0 0 20px rgba(241,209,149,.14) !important;
}
.swp-seal.is-earned .swp-seal__mark { transform: scale(1.06); box-shadow: 0 0 34px rgba(221,176,97,.25) !important; }

.swx-passport-next {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin: 0 62px 28px;
  padding: 18px 20px;
  border: 1px solid rgba(241,209,149,.42);
  color: #e8dbc3;
  background: linear-gradient(90deg, rgba(221,176,97,.13), rgba(4,8,13,.48));
}
.swx-passport-next__mark { color: var(--swx-gold-bright); font: 30px/1 Georgia, serif; }
.swx-passport-next small { display: block; color: #a17a47; font-size: 9px; letter-spacing: .16em; text-transform: uppercase; }
.swx-passport-next strong { display: block; margin-top: 4px; color: #eee1c8; font: 400 18px/1.2 Georgia, serif; }

.swx-claim {
  position: fixed;
  z-index: 900;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  width: min(680px, calc(100vw - 32px));
  padding: 24px;
  transform: translate(-50%, 140%);
  opacity: 0;
  border: 1px solid rgba(241,209,149,.76);
  color: var(--swx-paper);
  background:
    radial-gradient(circle at 12% 30%, rgba(217,173,97,.22), transparent 35%),
    linear-gradient(140deg, rgba(19,25,33,.99), rgba(4,7,11,.99));
  box-shadow: 0 30px 90px rgba(0,0,0,.64), 0 0 44px rgba(217,173,97,.12);
  transition: transform .38s ease, opacity .3s ease;
}
.swx-claim.is-visible { transform: translate(-50%, 0); opacity: 1; }
.swx-claim__head { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
.swx-claim__mark { display: grid; place-items: center; width: 62px; height: 62px; border: 1px solid var(--swx-gold); border-radius: 50%; color: var(--swx-gold-bright); background: rgba(217,173,97,.12); font: 28px/1 Georgia, serif; box-shadow: 0 0 30px rgba(217,173,97,.16); }
.swx-claim small { color: #bc8c4d; font-size: 9px; letter-spacing: .18em; text-transform: uppercase; }
.swx-claim h2 { margin: 5px 0 0; color: #f0e2c7; font: 400 26px/1.06 Georgia, serif; }
.swx-claim p { margin: 16px 0; color: #aba294; font-size: 14px; line-height: 1.55; }
.swx-claim__actions { display: flex; flex-wrap: wrap; gap: 9px; }
.swx-claim__close { position: absolute; right: 12px; top: 12px; width: 34px; height: 34px; border: 0; color: #b9aa91; background: transparent; font-size: 22px; cursor: pointer; }

.swx-toast {
  position: fixed;
  z-index: 880;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  max-width: min(420px, calc(100vw - 36px));
  padding: 15px 18px;
  transform: translateY(30px);
  opacity: 0;
  border: 1px solid rgba(217,173,97,.48);
  color: #eaddc5;
  background: rgba(5,9,14,.96);
  box-shadow: 0 18px 50px rgba(0,0,0,.45);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.swx-toast.is-visible { transform: translateY(0); opacity: 1; }
.swx-toast small { display: block; color: #aa7f48; font-size: 9px; letter-spacing: .15em; text-transform: uppercase; }
.swx-toast strong { display: block; margin-top: 4px; font: 400 17px/1.2 Georgia, serif; }

.swx-vault-panel { color: #e8dbc3; }
.swx-vault-panel .swx-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.swx-vault-panel .swx-card { min-height: 190px; padding: 16px; cursor: default; }
.swx-vault-panel .swx-card:hover { transform: none; }
.swx-vault-panel .swx-card__mark { width: 50px; height: 50px; margin: 18px 0 14px; font-size: 22px; }
.swx-vault-family { padding: 28px 0; border-bottom: 1px solid rgba(217,173,97,.18); }
.swx-vault-family:last-child { border-bottom: 0; }
.swx-vault-family__head { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 18px; }
.swx-vault-family h4 { margin: 0; color: #eee1c8; font: 400 27px/1.1 Georgia, serif; }
.swx-vault-family p { max-width: 700px; margin: 7px 0 0; color: #9f9689; line-height: 1.55; }
.swx-vault-family a { color: #e2b66e; }

@media (max-width: 980px) {
  .swx-grid, .swx-study-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .swx-grid > :last-child:nth-child(odd), .swx-study-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .swx-section__head { grid-template-columns: 1fr; }
  .swx-progress { justify-self: start; }
  .swx-reflection { grid-template-columns: 1fr; }
  .swx-completion { grid-template-columns: auto 1fr; }
  .swx-completion .swx-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .swx-passport-next { margin-inline: 24px; }
  .swx-vault-panel .swx-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 620px) {
  .swx-section { padding-inline: 18px; }
  .swx-grid, .swx-study-grid, .swx-vault-panel .swx-grid { grid-template-columns: 1fr; }
  .swx-grid > :last-child:nth-child(odd), .swx-study-grid > :last-child:nth-child(odd) { grid-column: auto; }
  .swx-card { min-height: 210px; }
  .swx-etsuko-seal { grid-template-columns: 1fr; }
  .swx-etsuko-card { max-width: 330px; width: 100%; margin: 0 auto; }
  .swx-passport-next { grid-template-columns: auto 1fr; margin-inline: 14px; }
  .swx-passport-next .swx-button { grid-column: 1 / -1; text-align: center; }
  .swx-claim { padding: 20px; }
  .swx-claim h2 { font-size: 23px; }
  .swx-vault-family__head { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  .swx-card,
  .swx-button,
  .swx-actions button,
  .swx-actions a,
  .swx-filter,
  .swx-claim,
  .swx-toast { transition: none !important; }
  .swx-card:hover,
  .swx-button:hover,
  .swx-actions button:hover,
  .swx-actions a:hover,
  .swx-filter:hover { transform: none !important; }
}
