:root {
  --ink: #17211f;
  --ink-soft: #33413d;
  --muted: #5f6d68;
  --paper: rgba(248, 250, 247, 0.84);
  --line: rgba(67, 82, 77, 0.2);
  --line-strong: rgba(47, 66, 60, 0.34);
  --white: #ffffff;
  --teal: #16766d;
  --teal-dark: #0c514a;
  --teal-soft: #dff2ed;
  --amber: #a86010;
  --amber-soft: #fff0d7;
  --red: #9d3d3d;
  --red-soft: #f9e5e2;
  --blue: #356c8c;
  --shadow: 0 22px 70px rgba(4, 14, 11, 0.3);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background: #111b18;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button {
  color: inherit;
  font: inherit;
}

button:focus-visible,
a:focus-visible,
.guide-content:focus-visible {
  outline: 3px solid #f1b84b;
  outline-offset: 3px;
}

svg {
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.guide-app {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.guide-backdrop,
.guide-scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.guide-backdrop {
  object-fit: cover;
  object-position: 38% center;
}

.guide-scrim {
  background: rgba(7, 16, 13, 0.42);
  box-shadow: inset 0 130px 150px rgba(3, 10, 8, 0.34), inset 0 -180px 180px rgba(3, 10, 8, 0.48);
}

.guide-topbar {
  position: absolute;
  z-index: 20;
  top: 0;
  right: 0;
  left: 0;
  display: grid;
  min-height: 68px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 10px 22px;
  color: var(--white);
  background: rgba(8, 17, 14, 0.34);
  box-shadow: 0 14px 32px rgba(6, 14, 12, 0.12);
}

.guide-back,
.guide-brand {
  color: inherit;
  text-decoration: none;
}

.guide-back {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  justify-self: start;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 4px;
  background: rgba(14, 28, 24, 0.56);
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(12px);
}

.guide-back svg {
  width: 18px;
  height: 18px;
}

.guide-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: center;
}

.guide-brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 4px;
  background: rgba(18, 101, 92, 0.82);
  font-weight: 800;
}

.guide-brand strong,
.guide-brand small {
  display: block;
}

.guide-brand strong {
  font-size: 14px;
}

.guide-brand small {
  margin-top: 1px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 10px;
}

.guide-counts {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  justify-self: end;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 4px;
  background: rgba(14, 28, 24, 0.56);
  color: rgba(255, 255, 255, 0.76);
  font-size: 11px;
  backdrop-filter: blur(12px);
}

.guide-counts strong {
  color: var(--white);
  font-size: 14px;
}

.guide-counts b {
  color: rgba(255, 255, 255, 0.42);
}

.guide-panel {
  position: absolute;
  z-index: 10;
  top: 84px;
  right: 24px;
  bottom: 22px;
  left: 24px;
  width: min(1120px, calc(100vw - 48px));
  margin: 0 auto;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 30px 34px 44px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
  scrollbar-color: rgba(62, 84, 77, 0.38) transparent;
  scrollbar-width: thin;
  backdrop-filter: blur(30px) saturate(0.84);
}

.guide-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.guide-eyebrow,
.section-heading p,
.catalog-heading > div > p {
  margin: 0 0 7px;
  color: var(--teal-dark);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.guide-intro h1 {
  max-width: 780px;
  margin: 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(29px, 3.4vw, 46px);
  font-weight: 600;
  line-height: 1.14;
}

.guide-intro > div:first-child > p:last-child {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.catalog-summary {
  display: grid;
  grid-template-columns: repeat(3, 76px);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--line);
}

.catalog-summary span {
  display: grid;
  min-height: 76px;
  place-content: center;
  background: rgba(255, 255, 255, 0.56);
  text-align: center;
}

.catalog-summary strong,
.catalog-summary small {
  display: block;
}

.catalog-summary strong {
  color: var(--teal-dark);
  font-family: Georgia, serif;
  font-size: 25px;
}

.catalog-summary small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.guide-tabs {
  position: sticky;
  z-index: 4;
  top: -30px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin: 0 -34px 28px;
  padding: 12px 34px;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 248, 244, 0.94);
  backdrop-filter: blur(18px);
}

.guide-tabs button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.guide-tabs button:hover {
  color: var(--teal-dark);
  background: rgba(223, 242, 237, 0.52);
}

.guide-tabs button.is-active {
  border-color: rgba(22, 118, 109, 0.28);
  color: var(--teal-dark);
  background: var(--teal-soft);
}

.guide-tabs svg {
  width: 17px;
  height: 17px;
}

.guide-content {
  min-height: 300px;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 13px;
}

.section-heading h2,
.catalog-heading h2 {
  margin: 0;
  font-size: clamp(22px, 2.5vw, 32px);
  line-height: 1.25;
}

.fact-band {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  padding: 14px 16px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.42);
}

.fact-band small,
.fact-band strong,
.fact-band em {
  display: block;
}

.fact-band small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.fact-band strong {
  margin-top: 4px;
  font-family: Georgia, serif;
  font-size: 19px;
}

.fact-band em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.concept-icon {
  display: inline-grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 6px;
}

.concept-icon svg {
  width: 22px;
  height: 22px;
}

.concept-icon.is-neutral,
.concept-icon.is-fact {
  color: var(--teal-dark);
  background: var(--teal-soft);
}

.concept-icon.is-destination {
  color: var(--blue);
  background: #e3edf5;
}

.frame-loss { color: #a94b3b; background: #f8e7e1; }
.frame-blame { color: #9a5c16; background: #f9ecd8; }
.frame-threat { color: #92374a; background: #f7e4e8; }
.frame-helplessness { color: #5a6964; background: #e7ece9; }
.frame-identity { color: #355f86; background: #e3edf5; }
.frame-rejection { color: #91445f; background: #f6e5eb; }
.move-acknowledge { color: #16766d; background: #dff2ed; }
.move-priority { color: #2f6b58; background: #e1f2e8; }
.move-specify { color: #356c8c; background: #e3edf5; }
.move-redefine { color: #746126; background: #f3edd3; }
.move-time { color: #67538c; background: #ebe5f4; }
.move-next { color: #276b54; background: #dff0e8; }
.move-boundary { color: #8a4f2f; background: #f4e6dc; }

.lens-lab {
  margin-top: 22px;
}

.lens-prompt {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.frame-window {
  position: relative;
  display: grid;
  width: 58px;
  height: 48px;
  place-items: center;
  color: var(--teal-dark);
}

.frame-window::before,
.frame-window::after {
  position: absolute;
  width: 19px;
  height: 19px;
  border-color: var(--amber);
  content: "";
}

.frame-window::before {
  top: 0;
  left: 0;
  border-top: 2px solid;
  border-left: 2px solid;
}

.frame-window::after {
  right: 0;
  bottom: 0;
  border-right: 2px solid;
  border-bottom: 2px solid;
}

.frame-window svg {
  width: 24px;
  height: 24px;
}

.lens-prompt small,
.lens-prompt strong {
  display: block;
}

.lens-prompt small {
  color: var(--amber);
  font-size: 9px;
  font-weight: 800;
}

.lens-prompt strong {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 13px;
}

.lens-selector {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
  margin-top: 13px;
}

.lens-button {
  display: grid;
  min-height: 82px;
  place-items: center;
  gap: 6px;
  padding: 8px 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.48);
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.lens-button:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.76);
}

.lens-button.is-active {
  border-color: rgba(22, 118, 109, 0.55);
  background: rgba(223, 242, 237, 0.82);
  box-shadow: inset 0 -3px 0 var(--teal);
}

.lens-button .concept-icon {
  width: 38px;
  height: 38px;
}

.lens-button .concept-icon svg {
  width: 19px;
  height: 19px;
}

.shift-path {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr) 28px minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
  margin-top: 24px;
  padding: 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.34);
}

.shift-path > svg {
  width: 19px;
  align-self: center;
  justify-self: center;
  color: var(--muted);
}

.path-node {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 7px;
}

.path-node small,
.path-node strong,
.path-node em {
  display: block;
}

.path-node small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
}

.path-node strong {
  margin-top: 2px;
  font-size: 12px;
}

.path-node em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  line-height: 1.4;
}

.meaning-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 24px;
  background: var(--line);
}

.meaning-side {
  min-width: 0;
  padding: 18px;
  background: rgba(255, 255, 255, 0.58);
}

.meaning-side.is-old {
  border-top: 3px solid var(--red);
}

.meaning-side.is-new {
  border-top: 3px solid var(--teal);
}

.meaning-side small,
.meaning-side strong,
.meaning-side em {
  display: block;
}

.meaning-side small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.meaning-side strong {
  margin-top: 7px;
  font-family: Georgia, serif;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.35;
}

.meaning-side em {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.meaning-side p {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.55;
}

.principle-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.principle-strip > span {
  position: relative;
  display: grid;
  min-height: 96px;
  align-content: center;
  padding: 14px 18px 14px 48px;
}

.principle-strip > span + span {
  border-left: 1px solid var(--line);
}

.principle-strip b {
  position: absolute;
  top: 14px;
  left: 14px;
  color: rgba(22, 118, 109, 0.38);
  font-family: Georgia, serif;
  font-size: 19px;
}

.principle-strip small,
.principle-strip strong {
  display: block;
}

.principle-strip small {
  color: var(--teal-dark);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.principle-strip strong {
  margin-top: 5px;
  font-size: 12px;
}

.boundary-note,
.taxonomy-note {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 11px;
  margin-top: 24px;
  padding: 15px 17px;
  border-left: 4px solid var(--amber);
  background: rgba(255, 240, 215, 0.72);
}

.boundary-note > svg,
.taxonomy-note > svg {
  width: 21px;
  height: 21px;
  color: var(--amber);
}

.boundary-note strong {
  font-size: 12px;
}

.boundary-note p,
.taxonomy-note p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.6;
}

.taxonomy-note p {
  margin-top: 0;
}

.taxonomy-note p strong {
  margin-right: 6px;
}

.catalog-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
  align-items: end;
  gap: 36px;
  margin-bottom: 22px;
}

.catalog-heading > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.concept-grid {
  display: grid;
  gap: 12px;
}

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

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

.concept-card {
  display: flex;
  min-width: 0;
  min-height: 290px;
  flex-direction: column;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.52);
}

.concept-card header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.concept-card header small,
.concept-card header h3 {
  display: block;
}

.concept-card header small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.concept-card header h3 {
  margin: 3px 0 0;
  font-size: 18px;
}

.concept-visual {
  margin: 16px 0 0;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 750;
}

.concept-definition {
  min-height: 44px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.concept-card blockquote {
  margin: 16px 0 0;
  padding: 13px 0 13px 13px;
  border-left: 3px solid var(--line-strong);
}

.concept-card blockquote strong,
.concept-card blockquote span {
  display: block;
}

.concept-card blockquote strong {
  font-family: Georgia, serif;
  font-size: 15px;
  line-height: 1.42;
}

.concept-card blockquote span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.concept-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.concept-card footer small {
  color: var(--muted);
  font-size: 9px;
}

.concept-card footer span {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.concept-card footer b {
  padding: 4px 6px;
  border-radius: 3px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  font-size: 9px;
}

.move-card {
  min-height: 260px;
}

.move-card blockquote {
  margin-top: auto;
}

@media (max-width: 900px) {
  .guide-panel {
    right: 14px;
    left: 14px;
    width: calc(100vw - 28px);
  }

  .guide-intro {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .catalog-summary {
    width: fit-content;
  }

  .lens-selector {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .shift-path {
    grid-template-columns: 1fr;
  }

  .shift-path > svg {
    transform: rotate(90deg);
  }

  .path-node {
    width: min(100%, 560px);
    margin: 0 auto;
  }

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

@media (max-width: 640px) {
  .guide-topbar {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    padding: 8px 10px;
  }

  .guide-back {
    width: 44px;
    padding: 0;
    justify-content: center;
  }

  .guide-back span,
  .guide-brand > span:last-child {
    display: none;
  }

  .guide-brand-mark {
    width: 38px;
    height: 38px;
  }

  .guide-counts {
    padding: 0 8px;
    font-size: 9px;
  }

  .guide-counts strong {
    font-size: 12px;
  }

  .guide-panel {
    top: 70px;
    right: 7px;
    bottom: 7px;
    left: 7px;
    width: calc(100vw - 14px);
    padding: 21px 16px 32px;
  }

  .guide-intro h1 {
    font-size: 29px;
  }

  .guide-intro > div:first-child > p:last-child {
    font-size: 13px;
  }

  .catalog-summary {
    width: 100%;
    grid-template-columns: repeat(3, 1fr);
  }

  .catalog-summary span {
    min-height: 68px;
  }

  .guide-tabs {
    top: -21px;
    margin: 0 -16px 24px;
    padding: 10px 16px;
  }

  .guide-tabs button {
    min-height: 48px;
    gap: 5px;
    font-size: 10px;
  }

  .guide-tabs svg {
    width: 15px;
    height: 15px;
  }

  .fact-band {
    grid-template-columns: 44px minmax(0, 1fr);
    padding: 13px 8px;
  }

  .fact-band strong {
    font-size: 17px;
  }

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

  .lens-button {
    grid-template-columns: 38px minmax(0, 1fr);
    min-height: 58px;
    justify-items: start;
    padding: 8px 10px;
    text-align: left;
  }

  .shift-path {
    padding: 10px;
  }

  .meaning-compare,
  .principle-strip,
  .catalog-heading,
  .frame-grid,
  .move-grid {
    grid-template-columns: 1fr;
  }

  .principle-strip > span {
    min-height: 78px;
  }

  .principle-strip > span + span {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .catalog-heading {
    gap: 10px;
  }

  .concept-card,
  .move-card {
    min-height: 0;
  }

  .concept-definition {
    min-height: 0;
  }
}

@media (max-height: 500px) and (min-width: 600px) {
  .guide-topbar {
    min-height: 60px;
    padding-top: 7px;
    padding-bottom: 7px;
  }

  .guide-panel {
    top: 66px;
    bottom: 8px;
    padding: 16px 24px 28px;
  }

  .guide-intro {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    padding-bottom: 13px;
  }

  .guide-intro h1 {
    font-size: 28px;
  }

  .guide-intro > div:first-child > p:last-child {
    display: none;
  }

  .catalog-summary {
    grid-template-columns: repeat(3, 66px);
  }

  .catalog-summary span {
    min-height: 58px;
  }

  .catalog-summary strong {
    font-size: 21px;
  }

  .guide-tabs {
    top: -16px;
    margin: 0 -24px 16px;
    padding: 7px 24px;
  }

  .guide-tabs button {
    min-height: 40px;
  }

  .fact-band {
    margin-top: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
