/* pi-cac.click — Mezzo Ledger visual system (original) */
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;700;900&family=Syne:wght@600;700;800&display=swap");

:root {
  --ink: #152238;
  --ink-soft: #3a4a63;
  --fog: #f3f6fb;
  --sheet: #fafcff;
  --panel: rgba(255, 255, 255, 0.9);
  --signal: #e23d2a;
  --signal-deep: #b7281a;
  --cobalt: #2457ff;
  --cobalt-deep: #1739c9;
  --gold: #e8b84a;
  --mint: #2bb8a0;
  --line: rgba(21, 34, 56, 0.12);
  --soft: 0 14px 34px rgba(21, 34, 56, 0.08);
  --soft-hot: 0 18px 40px rgba(226, 61, 42, 0.14);
  --r: 6px;
  --max: 1080px;
  --topbar-h: 58px;
  --dock-h: 0px;
  --font-display: "Syne", "Noto Sans SC", sans-serif;
  --font-body: "Noto Sans SC", "IBM Plex Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(36, 87, 255, 0.06), transparent 38%),
    linear-gradient(300deg, rgba(226, 61, 42, 0.05), transparent 40%),
    linear-gradient(180deg, #eef2f9 0%, var(--fog) 36%, var(--sheet) 100%);
  line-height: 1.9;
  font-size: 16px;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.35;
  background:
    repeating-linear-gradient(
      -18deg,
      transparent,
      transparent 22px,
      rgba(21, 34, 56, 0.03) 22px,
      rgba(21, 34, 56, 0.03) 23px
    );
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--cobalt-deep);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--signal);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.28;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 0.7em;
}

h1 {
  font-size: clamp(1.9rem, 5.2vw, 2.9rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.45rem, 3.6vw, 2.05rem);
  font-weight: 700;
}

h3 {
  font-size: clamp(1.1rem, 2.6vw, 1.35rem);
  font-weight: 700;
}

p {
  margin: 0 0 1.05em;
  color: var(--ink-soft);
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Top promo — visible without scroll */
.promo-band {
  background: linear-gradient(90deg, #fff7f4, #f4f7ff);
  border-bottom: 1px solid var(--line);
  padding: 10px 0 6px;
}

#ads {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px 10px;
  background: transparent;
  margin: 0;
}

#ads > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 70px;
  box-sizing: border-box;
}

#ads img {
  width: 65px;
  height: 65px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(21, 34, 56, 0.12);
  transition: transform 180ms ease, box-shadow 180ms ease;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: #fff;
}

#ads a {
  display: inline-block;
  text-decoration: none;
  border-radius: 16px;
}

#ads img:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 22px rgba(21, 34, 56, 0.16);
}

#ads .caption {
  height: 15px;
  font-size: 11px;
  color: #666;
  text-align: center;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 4px;
}

/* Header */
.mezzo-bar {
  position: sticky;
  top: 0;
  z-index: 90;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  backdrop-filter: blur(14px);
  background: rgba(250, 252, 255, 0.86);
  border-bottom: 1px solid var(--line);
}

.mezzo-bar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 1.5rem, var(--max));
}

.brand-lock {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
}

.brand-lock img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: var(--soft);
}

.brand-lock strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.brand-lock span {
  display: block;
  font-size: 0.72rem;
  color: var(--ink-soft);
  font-weight: 500;
  margin-top: 1px;
}

.spine-nav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.spine-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 600;
  position: relative;
}

.spine-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--signal), var(--cobalt));
  transition: width 0.25s ease;
}

.spine-nav a:hover,
.spine-nav a.is-now {
  color: var(--ink);
}

.spine-nav a:hover::after,
.spine-nav a.is-now::after {
  width: 100%;
}

.nav-flip {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-direction: column;
}

.nav-flip i {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease;
}

@media (max-width: 820px) {
  .nav-flip {
    display: flex;
  }

  .spine-nav {
    position: absolute;
    top: var(--topbar-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--line);
    padding: 0.4rem 0;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  .spine-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .spine-nav a {
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid rgba(21, 34, 56, 0.06);
  }
}

/* Sticky dock under header */
.signal-dock {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--topbar-h);
  z-index: 85;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(21, 34, 56, 0.08);
  transform: translateY(-110%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s ease, opacity 0.28s ease;
  padding: 8px 0 6px;
}

.signal-dock.is-live {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.dock-grid {
  width: min(100% - 1rem, var(--max));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 6px;
  justify-items: center;
}

@media (min-width: 900px) {
  .dock-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
}

.dock-grid a {
  text-decoration: none;
  color: var(--ink-soft);
  text-align: center;
  width: 100%;
  max-width: 72px;
}

.dock-grid img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  margin: 0 auto 3px;
  box-shadow: 0 4px 12px rgba(21, 34, 56, 0.12);
  object-fit: cover;
}

.dock-grid span {
  display: block;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dock-slot {
  height: 0;
  transition: height 0.28s ease;
}

body.dock-open .dock-slot {
  height: var(--dock-h);
}

body.has-promo .mezzo-bar {
  top: 0;
}

/* Hero — diagonal ribbon, no download CTA */
.ledger-hero {
  position: relative;
  isolation: isolate;
  padding: clamp(2.2rem, 6vw, 4.2rem) 0 clamp(2.4rem, 5vw, 3.6rem);
  overflow: hidden;
}

.ledger-hero::before {
  content: "";
  position: absolute;
  inset: -10% -5% auto;
  height: 78%;
  background:
    linear-gradient(115deg, rgba(36, 87, 255, 0.16), rgba(226, 61, 42, 0.12) 48%, rgba(232, 184, 74, 0.18));
  clip-path: polygon(0 0, 100% 0, 100% 68%, 0 100%);
  z-index: -1;
}

.hero-grid {
  display: grid;
  gap: 1.6rem;
  align-items: end;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cobalt-deep);
  margin-bottom: 0.85rem;
}

.hero-kicker::before {
  content: "";
  width: 28px;
  height: 3px;
  background: var(--signal);
}

.ledger-hero h1 {
  margin-bottom: 0.55em;
  max-width: 14ch;
}

.hero-lead {
  font-size: 1.05rem;
  max-width: 36em;
  color: var(--ink);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.4rem;
}

.hero-meta span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
}

.hero-mark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(4.5rem, 16vw, 8.5rem);
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 2px rgba(21, 34, 56, 0.14);
  user-select: none;
  text-align: right;
}

/* Sections */
.chapter {
  padding: clamp(2rem, 5vw, 3.4rem) 0;
}

.chapter-head {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1.35rem;
  max-width: 46em;
}

.chapter-no {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--signal);
}

.split-lane {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

@media (min-width: 860px) {
  .split-lane {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 2.2rem;
  }

  .split-lane.reverse {
    grid-template-columns: 0.85fr 1.15fr;
  }

  .split-lane.reverse .lane-copy {
    order: 2;
  }
}

.shot-frame {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--soft-hot);
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: #fff;
  transform: rotate(-1.2deg);
  transition: transform 0.35s ease;
}

.shot-frame:hover {
  transform: rotate(0deg) translateY(-4px);
}

.shot-frame.tilt-r {
  transform: rotate(1.4deg);
}

.shot-frame.tilt-r:hover {
  transform: rotate(0deg) translateY(-4px);
}

.shot-frame img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: top center;
  max-height: 520px;
}

@media (min-width: 860px) {
  .shot-frame img {
    max-height: 560px;
  }
}

/* Feature tiles — interaction containers */
.tile-board {
  display: grid;
  gap: 1rem;
}

@media (min-width: 720px) {
  .tile-board {
    grid-template-columns: repeat(3, 1fr);
  }
}

.tile {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.15rem 1.15rem 1.25rem;
  box-shadow: var(--soft);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.tile:hover {
  transform: translateY(-4px);
  border-color: rgba(36, 87, 255, 0.28);
}

.tile b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
  color: var(--ink);
}

.tile p {
  margin: 0;
  font-size: 0.95rem;
}

/* Path timeline */
.path-rail {
  position: relative;
  display: grid;
  gap: 1.2rem;
  padding-left: 1.4rem;
}

.path-rail::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 0.3rem;
  bottom: 0.3rem;
  width: 2px;
  background: linear-gradient(180deg, var(--cobalt), var(--signal), var(--gold));
}

.path-node {
  position: relative;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.15rem;
}

.path-node::before {
  content: "";
  position: absolute;
  left: -1.28rem;
  top: 1.2rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 4px rgba(226, 61, 42, 0.15);
}

.path-node h3 {
  margin-bottom: 0.4em;
}

.path-node p:last-child {
  margin-bottom: 0;
}

/* Quote strip */
.quote-band {
  margin: 0.5rem 0 1.5rem;
  padding: 1.2rem 1.4rem;
  border-left: 4px solid var(--cobalt);
  background: linear-gradient(90deg, rgba(36, 87, 255, 0.08), transparent);
  border-radius: 0 12px 12px 0;
}

.quote-band p {
  margin: 0;
  color: var(--ink);
  font-weight: 500;
}

/* Mosaic */
.mosaic {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 760px) {
  .mosaic {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }
}

.mosaic figure {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--soft);
}

.mosaic img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top;
}

.mosaic figcaption {
  font-size: 0.78rem;
  padding: 0.55rem 0.7rem 0.7rem;
  color: var(--ink-soft);
}

/* FAQ */
.faq-list details {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 0.75rem;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  float: right;
  color: var(--signal);
  font-family: var(--font-display);
}

.faq-list details[open] summary::after {
  content: "–";
}

.faq-list details p {
  margin: 0.75rem 0 0.15rem;
}

/* Breadcrumb */
.crumbs {
  padding: 1rem 0 0.2rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.crumbs a {
  text-decoration: none;
  font-weight: 600;
}

.crumbs span {
  margin: 0 0.35rem;
  opacity: 0.5;
}

/* Legal pages */
.legal-sheet {
  padding: 1.2rem 0 3rem;
}

.legal-sheet .panel {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(1.2rem, 3vw, 2rem);
  box-shadow: var(--soft);
}

.legal-sheet h2 {
  margin-top: 1.6rem;
}

.legal-sheet ul {
  padding-left: 1.2rem;
  color: var(--ink-soft);
}

.legal-sheet li {
  margin-bottom: 0.45rem;
}

/* Error pages */
.err-stage {
  min-height: 58vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 2rem 0 3rem;
}

.err-stage .code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 14vw, 7rem);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(120deg, var(--signal), var(--cobalt));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.3rem;
}

.err-stage a.back-link {
  display: inline-block;
  margin-top: 1.2rem;
  text-decoration: none;
  background: var(--ink);
  color: #fff;
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  font-weight: 700;
}

.err-stage a.back-link:hover {
  background: var(--signal);
  color: #fff;
}

/* Footer */
.mezzo-foot {
  margin-top: 1rem;
  padding: 2rem 0 2.4rem;
  background: #121a2b;
  color: rgba(255, 255, 255, 0.78);
}

.mezzo-foot a {
  color: #fff;
  text-decoration: none;
}

.mezzo-foot a:hover {
  color: var(--gold);
}

.foot-grid {
  display: grid;
  gap: 1.4rem;
}

@media (min-width: 760px) {
  .foot-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.mezzo-foot h3 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 0.7rem;
}

.mezzo-foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mezzo-foot li {
  margin-bottom: 0.45rem;
}

.mezzo-foot p {
  color: rgba(255, 255, 255, 0.7);
}

.foot-copy {
  margin-top: 1.6rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;
}

/* Motion */
.rise {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.rise.is-shown {
  opacity: 1;
  transform: translateY(0);
}

.pulse-line {
  height: 3px;
  width: 72px;
  background: linear-gradient(90deg, var(--signal), var(--cobalt), var(--gold));
  border-radius: 99px;
  margin: 0.4rem 0 1rem;
  animation: glide 2.8s ease-in-out infinite;
}

@keyframes glide {
  0%,
  100% {
    transform: scaleX(1);
    opacity: 0.85;
  }
  50% {
    transform: scaleX(1.35);
    opacity: 1;
  }
}

.float-soft {
  animation: floaty 5.5s ease-in-out infinite;
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0) rotate(-1.2deg);
  }
  50% {
    transform: translateY(-8px) rotate(-0.4deg);
  }
}

/* Text-dense helpers */
.dense p {
  text-align: justify;
  text-justify: inter-ideograph;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0.4rem;
}

.chip-row span {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: rgba(36, 87, 255, 0.08);
  color: var(--cobalt-deep);
  border: 1px solid rgba(36, 87, 255, 0.14);
}
