:root {
  color-scheme: light;
  --paper: #f4f1e8;
  --paper-deep: #ebe5d7;
  --card: #fffdf7;
  --ink: #191914;
  --muted: #69685f;
  --line: #dcd5c5;
  --orange: #dc4d18;
  --orange-soft: #fae1d2;
  --green: #435b36;
  --green-soft: #dfe7d5;
  --blue: #275c8f;
  --blue-soft: #dce8f5;
  --gold: #9a6d21;
  --shadow: 0 22px 60px rgba(62, 53, 34, .08);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  min-height: 78px; padding: 12px max(24px, calc((100vw - 1240px) / 2));
  border-bottom: 1px solid rgba(220, 213, 197, .8);
  background: rgba(244, 241, 232, .9); backdrop-filter: blur(18px);
}
.brand { display: inline-flex; gap: 12px; align-items: center; text-decoration: none; }
.brand-mark { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; background: var(--orange); color: white; font: 700 25px/1 "Songti SC", STSong, serif; }
.brand strong, .brand small { display: block; }
.brand strong { font: 700 20px/1.25 "Songti SC", STSong, serif; letter-spacing: .04em; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 11px; letter-spacing: .06em; }
nav { display: flex; gap: 28px; color: #4f4e47; font-size: 14px; }
nav a { text-decoration: none; }
nav a:hover { color: var(--orange); }

main { width: min(1240px, calc(100% - 40px)); margin: 0 auto; }
.hero { display: grid; grid-template-columns: 1.35fr .85fr; gap: clamp(36px, 7vw, 88px); align-items: center; min-height: 700px; padding: 82px 0 78px; }
.eyebrow { margin: 0 0 14px; color: var(--orange); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 780px; margin-bottom: 28px; font: 700 clamp(46px, 6vw, 78px)/1.08 "Songti SC", STSong, serif; letter-spacing: -.045em; }
h1 em { color: var(--orange); font-style: normal; }
.intro { max-width: 720px; margin-bottom: 36px; color: var(--muted); font-size: 18px; line-height: 1.9; }
.live-facts { display: flex; flex-wrap: wrap; gap: 10px; }
.live-facts span { min-width: 138px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; color: var(--muted); font-size: 12px; background: rgba(255,253,247,.54); }
.live-facts b { display: block; margin-bottom: 4px; color: var(--ink); font-size: 20px; }

.test-card { padding: 28px; border: 1px solid #d9d0be; border-radius: 24px; background: var(--card); box-shadow: var(--shadow); }
.card-kicker { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; font-size: 13px; font-weight: 750; }
.status-dot { color: var(--green); font-weight: 650; }
.status-dot::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #6c8a53; box-shadow: 0 0 0 4px rgba(108,138,83,.12); }
label { display: block; margin: 20px 0 8px; font-size: 15px; font-weight: 750; }
select, .rank-input { width: 100%; border: 1px solid #cbc2ae; border-radius: 14px; background: #fff; color: var(--ink); }
select { height: 54px; padding: 0 14px; appearance: none; background-image: linear-gradient(45deg,transparent 50%,#666 50%),linear-gradient(135deg,#666 50%,transparent 50%); background-position: calc(100% - 20px) 23px,calc(100% - 15px) 23px; background-size: 5px 5px; background-repeat: no-repeat; }
.rank-input { display: flex; align-items: center; overflow: hidden; }
.rank-input input { width: 100%; height: 56px; padding: 0 14px; border: 0; outline: 0; color: var(--ink); font-size: 24px; font-weight: 800; background: transparent; }
.rank-input span { padding-right: 16px; color: var(--muted); }
select:focus, .rank-input:focus-within { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(220,77,24,.1); outline: 0; }
form small { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; }
.quick-ranks { display: grid; grid-template-columns: repeat(4,1fr); gap: 7px; margin-top: 10px; }
.quick-ranks button { height: 34px; border: 1px solid var(--line); border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; }
.quick-ranks button:hover { border-color: var(--orange); color: var(--orange); }
.primary-button { display: flex; width: 100%; height: 56px; align-items: center; justify-content: space-between; margin-top: 26px; padding: 0 18px; border: 0; border-radius: 14px; background: var(--orange); color: white; font-weight: 800; cursor: pointer; box-shadow: 0 12px 24px rgba(220,77,24,.2); }
.primary-button i { font-size: 22px; font-style: normal; }
.primary-button:disabled { cursor: wait; opacity: .68; }
.privacy-note { margin: 13px 4px 0; color: #777268; font-size: 11px; line-height: 1.65; }

.method-section { padding: 96px 0; border-top: 1px solid var(--line); }
.section-heading { display: flex; gap: 40px; align-items: end; justify-content: space-between; margin-bottom: 34px; }
.section-heading h2 { margin: 0; font: 700 clamp(30px,4vw,50px)/1.15 "Songti SC", STSong, serif; }
.section-heading > p { max-width: 560px; margin: 0; color: var(--muted); line-height: 1.8; }
.method-grid { display: grid; grid-template-columns: repeat(4,1fr); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: var(--card); }
.method-grid article { min-height: 240px; padding: 26px; border-right: 1px solid var(--line); }
.method-grid article:last-child { border-right: 0; }
.method-grid span { display: block; margin-bottom: 36px; color: var(--orange); font: 700 28px/1 "Songti SC", STSong, serif; }
.method-grid h3 { margin-bottom: 10px; font-size: 18px; }
.method-grid p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.75; }
.formula { display: flex; align-items: center; gap: 18px; margin-top: 18px; padding: 20px 24px; border-radius: 16px; background: #1d1d18; color: white; }
.formula span { color: #c8c4b9; font-size: 13px; }
.formula strong { font-size: clamp(15px,2vw,20px); letter-spacing: .02em; }

.result-shell { padding: 48px 0 30px; }
.result-hero { display: flex; justify-content: space-between; gap: 30px; align-items: end; padding: 40px; border-radius: 26px; background: #1d1d18; color: white; }
.result-hero h2 { margin-bottom: 12px; font: 700 clamp(32px,5vw,58px)/1.15 "Songti SC", STSong, serif; }
.result-hero p:last-child { max-width: 700px; margin: 0; color: #c8c5b9; line-height: 1.75; }
.result-count { min-width: 160px; text-align: right; }
.result-count strong { font: 700 66px/1 "Songti SC", STSong, serif; }
.result-count span { margin-left: 6px; color: #c8c5b9; }
.result-count small { display: block; width: max-content; margin: 12px 0 0 auto; padding: 6px 10px; border-radius: 99px; background: var(--green); color: white; }
.notice { margin: 16px 0; padding: 15px 18px; border: 1px solid #cabf9f; border-radius: 13px; background: #fff6d9; color: #5d4a18; line-height: 1.6; }
.notice.success { border-color: #bfcbae; background: #ecf2e5; color: #384b2e; }
.panel { margin-top: 18px; padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); }
.panel-head { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 24px; }
.panel-head h3 { margin: 0; font: 700 30px/1.2 "Songti SC", STSong, serif; }
.panel-head > p { margin: 0; color: var(--muted); }
.text-button { padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer; }
.decision-steps { display: grid; grid-template-columns: repeat(5,1fr); gap: 10px; }
.decision-step { padding: 18px; border-radius: 14px; background: var(--paper); }
.decision-step b { display: block; margin-bottom: 10px; color: var(--orange); font-size: 12px; }
.decision-step h4 { margin: 0 0 8px; font-size: 15px; }
.decision-step p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }

.capacity-bar { display: flex; min-height: 52px; margin: 8px 0 18px; overflow: hidden; border-radius: 12px; background: var(--paper-deep); }
.capacity-segment { display: flex; min-width: 3px; align-items: center; justify-content: center; padding: 0 4px; color: white; font-size: 11px; font-weight: 750; overflow: hidden; white-space: nowrap; }
.capacity-segment:nth-child(3n+1) { background: #9a5d33; }
.capacity-segment:nth-child(3n+2) { background: #566b48; }
.capacity-segment:nth-child(3n) { background: #3f6682; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { padding: 12px 10px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; text-align: right; }
th:first-child, td:first-child { text-align: left; }
td { padding: 12px 10px; border-bottom: 1px solid #ece7dc; text-align: right; }
tbody tr:last-child td { border-bottom: 0; }

.recommendations { padding: 84px 0 28px; }
.section-heading.compact { align-items: start; }
.group { margin-top: 18px; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: var(--card); }
.group-head { display: grid; grid-template-columns: 90px 1fr auto; gap: 20px; align-items: center; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.group-label { display: grid; width: 56px; height: 56px; place-items: center; border-radius: 50%; color: white; font: 800 22px/1 "Songti SC", STSong, serif; }
.group-reach .group-label { background: var(--orange); }
.group-match .group-label { background: var(--green); }
.group-safe .group-label { background: var(--blue); }
.group-head h3 { margin: 0 0 5px; font-size: 18px; }
.group-head p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.group-head strong { font-size: 25px; }
.school-row { border-bottom: 1px solid #e7e1d4; }
.school-row:last-child { border-bottom: 0; }
.school-summary { display: grid; grid-template-columns: 42px minmax(190px,1.2fr) minmax(110px,.7fr) 90px 100px 24px; gap: 14px; align-items: center; min-height: 82px; padding: 12px 24px; cursor: pointer; list-style: none; }
.school-summary::-webkit-details-marker { display: none; }
.school-summary:hover { background: #fbf8ef; }
.rank-number { color: #9a9589; font-size: 12px; }
.school-name strong { display: block; font-size: 16px; }
.school-name small, .school-major small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.school-major { color: #3f3e38; font-size: 13px; overflow: hidden; }
.tier-pill { display: inline-flex; width: max-content; padding: 5px 9px; border-radius: 99px; background: var(--paper-deep); font-size: 11px; }
.score { font: 800 22px/1 "Songti SC", STSong, serif; text-align: right; }
.score small { display: block; margin-top: 5px; color: var(--muted); font: 400 10px/1 sans-serif; }
.plan { text-align: right; font-size: 14px; font-weight: 750; }
.plan small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; font-weight: 400; }
.chevron { color: var(--muted); transition: transform .2s ease; }
details[open] .chevron { transform: rotate(90deg); }
.school-detail { padding: 0 24px 24px 80px; }
.detail-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; }
.detail-card { padding: 18px; border-radius: 14px; background: var(--paper); }
.detail-card h4 { margin: 0 0 14px; font-size: 13px; }
.score-parts { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.score-part { padding: 12px 8px; border-radius: 10px; background: var(--card); text-align: center; }
.score-part b { display: block; margin-bottom: 5px; font-size: 20px; }
.score-part span { color: var(--muted); font-size: 10px; }
.default-tag { display: inline-block; margin-top: 10px; color: #9b4f2b; font-size: 11px; }
.major-list { display: grid; gap: 7px; max-height: 250px; overflow: auto; }
.major-item { display: grid; grid-template-columns: 1fr 56px 56px; gap: 10px; padding-bottom: 7px; border-bottom: 1px solid #e4ddcf; font-size: 12px; }
.major-item:last-child { border-bottom: 0; }
.major-item span:nth-child(n+2) { text-align: right; }
.audit { margin-top: 14px; padding: 14px 16px; border-left: 3px solid var(--orange); background: #fffaf0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.inferred { color: #a14b24; font-weight: 750; }

.source-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.source-item { padding: 20px; border-radius: 14px; background: var(--paper); }
.source-item b { display: block; margin-bottom: 8px; }
.source-item p { margin: 0 0 14px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.source-item span { color: var(--orange); font-size: 12px; font-weight: 750; }
.source-notes { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.75; }

.empty-state { margin: 30px 0 100px; padding: 64px 20px; border: 1px dashed #bdb4a1; border-radius: 20px; text-align: center; }
.empty-state span { font: 700 28px/1.2 "Songti SC", STSong, serif; }
.empty-state p { max-width: 600px; margin: 12px auto 0; color: var(--muted); line-height: 1.7; }
.disclaimer { margin: 60px 0 90px; padding: 32px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.disclaimer h2 { font: 700 25px/1.2 "Songti SC", STSong, serif; }
.disclaimer p { margin: 0; color: var(--muted); line-height: 1.85; }
footer { display: flex; justify-content: space-between; gap: 20px; padding: 28px max(24px, calc((100vw - 1240px) / 2)); border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
footer a { text-decoration: none; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 50; max-width: 340px; padding: 13px 16px; border-radius: 12px; background: #1d1d18; color: white; box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 60px; }
  .test-card { max-width: 640px; }
  .method-grid { grid-template-columns: repeat(2,1fr); }
  .method-grid article:nth-child(2) { border-right: 0; }
  .method-grid article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .decision-steps { grid-template-columns: repeat(2,1fr); }
  .source-grid { grid-template-columns: 1fr; }
  .school-summary { grid-template-columns: 36px minmax(190px,1fr) 90px 80px 22px; }
  .school-major { display: none; }
}

@media (max-width: 680px) {
  main { width: min(100% - 24px,1240px); }
  .site-header { min-height: 68px; padding: 10px 14px; }
  .brand-mark { width: 38px; height: 38px; }
  .brand strong { font-size: 17px; }
  nav { display: none; }
  .hero { padding: 46px 0 60px; gap: 28px; }
  h1 { font-size: 42px; }
  .intro { font-size: 16px; }
  .live-facts { display: grid; grid-template-columns: repeat(3,1fr); }
  .live-facts span { min-width: 0; padding: 12px; }
  .live-facts b { font-size: 16px; }
  .test-card { padding: 20px; }
  .method-section { padding: 68px 0; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 16px; }
  .method-grid { grid-template-columns: 1fr; }
  .method-grid article { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .method-grid article:last-child { border-bottom: 0; }
  .method-grid span { margin-bottom: 22px; }
  .formula { align-items: start; flex-direction: column; gap: 8px; }
  .result-hero { align-items: start; flex-direction: column; padding: 26px; }
  .result-count { min-width: 0; text-align: left; }
  .result-count small { margin-left: 0; }
  .panel { padding: 20px; }
  .panel-head { align-items: start; flex-direction: column; }
  .decision-steps { grid-template-columns: 1fr; }
  .group-head { grid-template-columns: 58px 1fr auto; padding: 18px 14px; }
  .group-label { width: 48px; height: 48px; }
  .school-summary { grid-template-columns: 28px minmax(140px,1fr) 64px 18px; gap: 8px; padding: 12px 14px; }
  .school-summary .plan { display: none; }
  .school-name strong { font-size: 14px; }
  .score { font-size: 19px; }
  .school-detail { padding: 0 14px 18px; }
  .detail-grid { grid-template-columns: 1fr; }
  .score-parts { grid-template-columns: repeat(2,1fr); }
  .recommendations { padding-top: 64px; }
  footer { align-items: center; flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
