:root {
  --r-blue: #2f55f0;
  --r-violet: #7b4dff;
  --r-gold: #ffb21a;
  --r-ink: #0c1330;
  --r-muted: #6e7892;
  --r-line: #e0e4ef;
  --r-bg: #f1f3fa;
  --r-surface: #ffffff;
  --r-soft: #e9eeff;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink, var(--r-ink));
  background:
    radial-gradient(62% 45% at 95% 0%, rgba(123, 77, 255, .11), transparent 60%),
    radial-gradient(50% 42% at 0% 100%, rgba(47, 85, 240, .07), transparent 65%),
    var(--bg, var(--r-bg));
  font-family: "Avenir Next", "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 1, "ss01" 1;
}
button, a { font: inherit; }
button { cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--r-blue); outline-offset: 3px; }
::selection { color: var(--r-ink); background: var(--r-gold); }

.report-shell {
  width: min(1240px, calc(100% - 64px));
  margin: 0 auto;
  padding: 26px 0 34px;
}

/* ---------- Header ---------- */
.report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 34px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}
.brand-mark {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  padding: 3px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--r-blue), var(--r-violet));
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(20, 33, 105, .16);
}
.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 11px;
  background: #fff;
}
.brand-mark span {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.04em;
}
.brand-copy { display: flex; flex-direction: column; min-width: 0; }
.brand-copy b { color: var(--ink, var(--r-ink)); font-size: 17px; font-weight: 600; letter-spacing: .01em; line-height: 1.2; }
.brand-copy small { margin-top: 4px; color: #818ba5; font-size: 8px; font-weight: 600; letter-spacing: .22em; }
.site-nav {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  padding: 3px;
  background: rgba(255, 255, 255, .52);
  border: 1px solid var(--r-line);
  border-radius: 9px;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  height: 27px;
  padding: 0 10px;
  color: #7c87a0;
  border-radius: 6px;
  font-size: 9px;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--r-blue); background: #fff; }
.site-nav a.is-active { color: #f5f7ff; background: linear-gradient(135deg, var(--r-blue), var(--r-violet)); }
.head-actions { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.viewer-chip {
  max-width: 92px;
  overflow: hidden;
  color: #7c87a0;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.logout-btn {
  height: 33px;
  padding: 0 10px;
  color: #7c87a0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 9px;
}
.logout-btn:hover { color: #b45540; background: #fff; border-color: var(--r-line); }
.period-select { position: relative; display: inline-flex; align-items: center; }
.period-dot { position: absolute; left: 12px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: var(--r-gold); box-shadow: 0 0 0 4px rgba(255, 178, 26, .12); pointer-events: none; }
.period-chip {
  display: inline-flex;
  align-items: center;
  height: 31px;
  padding: 0 27px 0 25px;
  color: #3e4a6a;
  background: rgba(255, 255, 255, .66);
  border: 1px solid var(--r-line);
  border-radius: 99px;
  font-size: 10px;
  font-weight: 550;
  white-space: nowrap;
}
.period-chip {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  outline: none;
}
.period-chip:hover { border-color: #c8d1e5; background: #fff; }
.period-chip:focus { border-color: #9fb0ec; box-shadow: 0 0 0 3px rgba(47,85,240,.08); }
.print-btn, .admin-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 33px;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.print-btn {
  color: #fff;
  background: var(--r-ink);
  border: 1px solid var(--r-ink);
}
.print-btn:hover { background: #1c2b55; }
.admin-link { color: #75809a; border: 1px solid transparent; }
.admin-link:hover { color: var(--r-blue); background: #fff; border-color: var(--r-line); }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(345px, .84fr);
  gap: 22px;
  align-items: stretch;
}
.hero-copy {
  position: relative;
  padding: 26px 0 20px;
}
.eyebrow {
  margin: 0 0 17px;
  color: #8c96ad;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: .2em;
}
.eyebrow .sep { margin: 0 5px; color: #bcc4d7; }
.hero h1 {
  margin: 0;
  color: var(--ink, var(--r-ink));
  font-size: clamp(50px, 6.1vw, 80px);
  font-weight: 560;
  letter-spacing: -.075em;
  line-height: 1.02;
}
.hero h1 .dot { color: var(--r-blue); }
.hero-sub {
  margin: 16px 0 0;
  color: #3e4a6a;
  font-size: 15px;
  font-weight: 550;
}
.hero-lede {
  max-width: 480px;
  margin: 10px 0 0;
  color: var(--muted, var(--r-muted));
  font-size: 12px;
  line-height: 1.7;
}
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 22px;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  color: #5f6c8a;
  background: rgba(255, 255, 255, .62);
  border: 1px solid var(--r-line);
  border-radius: 7px;
  font-size: 9.5px;
}
.hero-tag::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--r-violet);
}
.hero-money {
  position: relative;
  min-height: 258px;
  padding: 28px 28px 23px;
  overflow: hidden;
  color: #f5f7ff;
  background:
    radial-gradient(110% 110% at 100% 0%, #4256c5 0%, transparent 52%),
    linear-gradient(145deg, #151d4a 0%, #070d26 70%);
  border: 1px solid #1f2b5c;
  border-radius: 25px;
  box-shadow: 0 20px 48px rgba(17, 24, 63, .17);
}
.hero-money::before {
  content: "";
  position: absolute;
  right: -72px;
  bottom: -120px;
  width: 290px;
  height: 290px;
  border: 1px solid rgba(123, 77, 255, .18);
  border-radius: 50%;
  box-shadow: 0 0 0 36px rgba(123, 77, 255, .035), 0 0 0 74px rgba(47, 85, 240, .025);
}
.hero-money::after {
  content: "";
  position: absolute;
  right: 28px;
  top: 26px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--r-gold);
  box-shadow: 0 0 0 6px rgba(255, 178, 26, .1);
}
.money-label { position: relative; z-index: 1; margin: 0; color: #9eaad0; font-size: 11px; letter-spacing: .02em; }
.money-value {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  margin-top: 17px;
  color: #f7f9ff;
  font-size: clamp(45px, 4.3vw, 57px);
  font-weight: 500;
  letter-spacing: -.065em;
  line-height: 1;
}
.money-value .currency { margin-right: 3px; color: #93a8ff; font-size: 24px; letter-spacing: 0; }
.money-value .unit { margin-left: 7px; color: #aab6d8; font-size: 14px; letter-spacing: 0; }
.money-sub { position: relative; z-index: 1; margin: 11px 0 0; color: #a7b3d4; font-size: 11px; }
.money-sub b { color: #eef2ff; font-weight: 550; }
.money-rate {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 12px;
  margin-top: auto;
  padding-top: 23px;
  color: #7f8dae;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: 8px;
}
.money-rate b { color: #c9d6ff; font-weight: 500; }
.hero-money { display: flex; flex-direction: column; }

/* ---------- KPI ---------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-top: 18px;
}
.kpi-card {
  position: relative;
  min-height: 166px;
  padding: 19px 19px 16px;
  overflow: hidden;
  background: var(--surface, var(--r-surface));
  border: 1px solid var(--r-line);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(25, 34, 61, .035);
}
.kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 19px;
  right: 19px;
  height: 2px;
  background: linear-gradient(90deg, var(--r-blue), var(--r-violet));
  opacity: .7;
}
.kpi-card:nth-child(2)::before { background: linear-gradient(90deg, var(--r-violet), #b9c6ff); }
.kpi-card:nth-child(3)::before { background: linear-gradient(90deg, var(--r-blue), #9cb2ff); }
.kpi-card:nth-child(4)::before { background: linear-gradient(90deg, var(--r-gold), #ffd67f); }
.kpi-label { display: block; color: #7e89a2; font-size: 10px; }
.kpi-value {
  display: flex;
  align-items: baseline;
  margin-top: 15px;
  color: var(--ink, var(--r-ink));
  font-size: clamp(26px, 2.5vw, 33px);
  font-weight: 520;
  letter-spacing: -.045em;
  line-height: 1;
}
.kpi-value small { margin-left: 4px; color: #8791a9; font-size: 10px; font-weight: 500; letter-spacing: 0; }
.kpi-value .accent { color: var(--r-blue); }
.kpi-note { margin: 13px 0 0; color: #8f98ae; font-size: 9px; line-height: 1.5; }
.kpi-note strong { color: #52607e; font-weight: 600; }
.kpi-progress { height: 4px; margin-top: 14px; overflow: hidden; background: #e8ecf6; border-radius: 4px; }
.kpi-progress i { display: block; height: 100%; min-width: 2px; background: linear-gradient(90deg, var(--r-blue), var(--r-violet)); border-radius: inherit; }

/* ---------- Finance focus ---------- */
.finance-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 13px;
  margin-top: 13px;
}
.finance-card {
  position: relative;
  padding: 18px 19px 16px;
  overflow: hidden;
  background: var(--surface, var(--r-surface));
  border: 1px solid var(--r-line);
  border-radius: 17px;
}
.finance-card::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 0;
  width: 24px;
  height: 2px;
  background: var(--r-gold);
}
.finance-card:nth-child(2)::before { background: var(--r-blue); }
.finance-card:nth-child(3)::before { background: var(--r-violet); }
.finance-card > span { display: block; color: #818ca5; font-size: 9px; }
.finance-card > b { display: block; margin-top: 10px; color: var(--ink, var(--r-ink)); font-size: 26px; font-weight: 520; letter-spacing: -.045em; line-height: 1; }
.finance-card > small { display: block; margin-top: 8px; color: #9aa3b8; font-size: 8px; }
@media (max-width: 640px) {
  .finance-strip { gap: 8px; margin-top: 9px; }
  .finance-card { padding: 13px 12px; border-radius: 14px; }
  .finance-card::before { left: 12px; }
  .finance-card > b { font-size: 20px; }
  .finance-card > small { font-size: 7px; }
}

/* ---------- Goal / insight ---------- */
.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.34fr) minmax(330px, .66fr);
  gap: 13px;
  margin-top: 13px;
}
.goal-card, .read-card, .note-card, .method-card {
  padding: 23px;
  background: var(--surface, var(--r-surface));
  border: 1px solid var(--r-line);
  border-radius: 20px;
  box-shadow: 0 10px 24px rgba(25, 34, 61, .035);
}
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.kicker { margin: 0 0 6px; color: #969fb6; font-size: 8px; font-weight: 650; letter-spacing: .18em; }
.card-title { margin: 0; color: var(--ink, var(--r-ink)); font-size: 16px; font-weight: 600; letter-spacing: -.02em; }
.card-meta { color: #8f99b0; font-size: 9px; }
.goal-headline {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 23px;
}
.goal-headline strong {
  color: var(--ink, var(--r-ink));
  font-size: 39px;
  font-weight: 540;
  letter-spacing: -.06em;
  line-height: 1;
}
.goal-headline span { color: #7f8aa3; font-size: 10px; }
.target-bar { position: relative; height: 10px; margin-top: 25px; overflow: hidden; background: #e9edf7; border-radius: 99px; }
.target-bar i { display: block; height: 100%; min-width: 4px; background: linear-gradient(90deg, var(--r-blue), var(--r-violet)); border-radius: inherit; }
.target-scale { display: flex; justify-content: space-between; margin-top: 8px; color: #9aa3b9; font-size: 8px; }
.target-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 22px; }
.target-stat { padding-top: 12px; border-top: 1px solid #edf0f8; }
.target-stat span { display: block; color: #929cb2; font-size: 8.5px; }
.target-stat b { display: block; margin-top: 4px; color: #39455f; font-size: 12px; font-weight: 600; }
.target-stat b.gold { color: #ad7a0d; }

.read-card {
  background:
    radial-gradient(100% 100% at 100% 0%, rgba(255, 178, 26, .16), transparent 50%),
    linear-gradient(140deg, #e9eeff, #f5f4ff);
  border-color: #dce3f7;
}
.read-card .kicker { color: #6875a6; }
.read-card .card-title { color: #1d2a52; }
.insights { margin: 19px 0 0; padding: 0; list-style: none; counter-reset: insight; }
.insights li {
  position: relative;
  padding: 0 0 15px 28px;
  color: #4b5877;
  font-size: 10px;
  line-height: 1.7;
  counter-increment: insight;
}
.insights li + li { padding-top: 14px; border-top: 1px solid rgba(78, 96, 154, .12); }
.insights li:last-child { padding-bottom: 0; }
.insights li::before {
  content: "0" counter(insight);
  position: absolute;
  left: 0;
  top: 1px;
  color: #6678b4;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .08em;
}
.insights li + li::before { top: 15px; }
.insights b { color: #1b2850; font-weight: 600; }

/* ---------- Notes / method ---------- */
.bottom-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 13px;
  margin-top: 13px;
}
.note-card { position: relative; overflow: hidden; }
.note-card::after {
  content: "“";
  position: absolute;
  right: 20px;
  top: 12px;
  color: #e5e9f8;
  font-family: Georgia, serif;
  font-size: 76px;
  line-height: 1;
}
.note-text {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 18px 0 0;
  color: #3c4866;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.65;
  letter-spacing: -.015em;
}
.note-source { margin: 15px 0 0; color: #929cb2; font-size: 9px; }
.method-card { background: #f8f9fe; }
.method-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin: 18px 0 0; }
.method-item { display: flex; flex-direction: column; gap: 3px; }
.method-item span { color: #9ba4b9; font-size: 8px; }
.method-item b { color: #53607d; font-size: 9.5px; font-weight: 550; }
.method-note { margin: 17px 0 0; padding-top: 14px; color: #8c96ad; border-top: 1px solid #e9edf6; font-size: 8.5px; line-height: 1.6; }

/* ---------- Footer ---------- */
.report-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 25px 2px 0;
  color: #9aa3b8;
  font-size: 8px;
}
.report-footer b { color: #74809a; font-weight: 500; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; }
  .hero-copy { padding-bottom: 4px; }
  .hero-money { min-height: 230px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split-grid, .bottom-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .report-shell { width: calc(100% - 30px); padding-top: 16px; }
  .report-head { align-items: flex-start; padding-bottom: 23px; }
  .brand-mark { width: 42px; height: 42px; flex-basis: 42px; border-radius: 12px; }
  .brand-copy b { font-size: 15px; }
  .brand-copy small { font-size: 7px; }
  .head-actions { gap: 4px; }
  .print-btn { height: 30px; padding: 0 9px; font-size: 9px; }
  .viewer-chip { display: none; }
  .logout-btn { display: inline-flex; height: 30px; padding: 0 7px; font-size: 9px; }
  .site-nav { order: 4; width: 100%; margin: 10px 0 0; }
  .site-nav a { flex: 1; justify-content: center; }
  .report-head { flex-wrap: wrap; }
  .period-chip { height: 29px; padding: 0 22px 0 20px; font-size: 9px; }
  .period-dot { left: 9px; }
  .hero h1 { font-size: clamp(44px, 13vw, 59px); }
  .hero-lede { font-size: 11px; }
  .hero-tags { gap: 5px; margin-top: 18px; }
  .hero-tag { height: 26px; padding: 0 8px; font-size: 8.5px; }
  .hero-money { min-height: 220px; padding: 22px 20px 18px; border-radius: 21px; }
  .money-value { font-size: 47px; }
  .money-rate { padding-top: 17px; font-size: 7.5px; }
  .kpi-grid { gap: 9px; margin-top: 11px; }
  .kpi-card { min-height: 148px; padding: 15px 14px 13px; border-radius: 15px; }
  .kpi-card::before { left: 14px; right: 14px; }
  .kpi-value { margin-top: 12px; font-size: 25px; }
  .kpi-label { font-size: 9px; }
  .kpi-note { margin-top: 10px; font-size: 8px; }
  .goal-card, .read-card, .note-card, .method-card { padding: 18px 16px; border-radius: 17px; }
  .goal-headline { margin-top: 18px; }
  .goal-headline strong { font-size: 33px; }
  .target-stats { gap: 7px; margin-top: 17px; }
  .target-stat b { font-size: 10px; }
  .note-text { font-size: 13px; }
  .method-list { gap: 10px; }
  .report-footer { flex-direction: column; gap: 4px; padding-top: 21px; }
}

@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body { background: #fff; }
  .report-shell { width: 100%; padding: 0; }
  .head-actions { display: none; }
  .report-head { padding-bottom: 16px; }
  .hero { grid-template-columns: 1.2fr .8fr; }
  .hero h1 { font-size: 52px; }
  .kpi-grid { grid-template-columns: repeat(4, 1fr); }
  .split-grid { grid-template-columns: 1.34fr .66fr; }
  .bottom-grid { grid-template-columns: 1.2fr .8fr; }
  .kpi-card, .goal-card, .read-card, .note-card, .method-card { box-shadow: none; break-inside: avoid; }
  .hero-money { box-shadow: none; }
}


.finance-strip.is-single { display: block; }
.finance-strip.is-single .finance-card {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 14px 19px;
}
.finance-strip.is-single .finance-card::before { top: 50%; transform: translateY(-50%); }
.finance-strip.is-single .finance-card > span { font-size: 9px; }
.finance-strip.is-single .finance-card > b { margin: 0; font-size: 24px; }
.finance-strip.is-single .finance-card > small { margin: 0 0 0 auto; font-size: 8px; }
@media (max-width: 640px) {
  .finance-strip.is-single .finance-card { flex-wrap: wrap; gap: 5px 9px; }
  .finance-strip.is-single .finance-card > b { font-size: 21px; }
  .finance-strip.is-single .finance-card > small { width: 100%; margin-left: 0; }
}
.money-label span { margin-left: 5px; color: #7483a8; font-size: 8px; letter-spacing: .02em; }
