:root {
  --ink: #183129;
  --muted: #68766f;
  --green: #1d7457;
  --green-dark: #15513f;
  --green-soft: #e8f3ed;
  --blue: #397aa8;
  --coral: #ed765f;
  --paper: #f7faf7;
  --white: #ffffff;
  --line: #dfe7e2;
  --shadow: 0 18px 50px rgba(24, 49, 41, .11);
  --radius: 8px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body { margin: 0; min-height: 100%; color: var(--ink); background: var(--paper); font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif; letter-spacing: 0; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.student-shell { width: min(100%, 760px); min-height: 100vh; margin: 0 auto; background: var(--white); box-shadow: 0 0 60px rgba(24,49,41,.06); }
.topbar { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; color: white; background: var(--green); font-weight: 800; }
.brand > span:last-child { display: grid; gap: 1px; }
.brand strong { font-size: 15px; }
.brand small { color: var(--muted); font-size: 10px; }
.privacy-pill { padding: 7px 10px; border: 1px solid var(--line); color: var(--muted); font-size: 12px; border-radius: 999px; }
.record-entry { min-height: 36px; padding: 0 12px; color: var(--green-dark); border: 1px solid #bed4c9; border-radius: 6px; background: white; font-size: 12px; font-weight: 700; }

.progress-wrap { padding: 18px 20px 0; }
.progress-meta { display: flex; justify-content: space-between; margin-bottom: 8px; color: var(--muted); font-size: 12px; }
.progress-track { height: 4px; overflow: hidden; border-radius: 999px; background: #e8eeea; }
.progress-track span { display: block; width: 25%; height: 100%; background: var(--green); transition: width .25s ease; }

#app { min-height: calc(100vh - 130px); }
.landing-page { background: #f5f8f6; }
.landing-page .student-shell { background: #f5f8f6; }
.landing-page .topbar { background: rgba(255,255,255,.96); }
.landing-page .site-footer { background: #f5f8f6; }
.hero { position: relative; min-height: calc(100svh - 112px); overflow: hidden; color: var(--ink); border-bottom: 1px solid #dbe5df; background: #f5f8f6; isolation: isolate; }
.hero::before { content: ""; position: absolute; z-index: 0; top: 238px; right: -128px; width: 230px; height: 230px; border: 1px solid #dce8e2; border-radius: 50%; }
.hero::after { content: ""; position: absolute; z-index: 0; top: 290px; right: 66px; width: 1px; height: 120px; background: #dce8e2; }
.hero-top-copy { position: relative; z-index: 1; padding: 38px 22px 0; }
.hero-kicker { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; color: #527066; font-size: 11px; font-weight: 700; letter-spacing: 0; }
.hero-kicker i { width: 7px; height: 7px; background: #26956a; box-shadow: 0 0 0 5px rgba(38,149,106,.1); animation: livePulse 1.8s ease-out infinite; }
.hero h1 { max-width: 650px; margin: 0; line-height: 1; letter-spacing: 0; }
.hero h1 .ai-title { display: flex; align-items: baseline; gap: 11px; }
.hero h1 .ai-title b { color: #316ed0; font-family: Arial, sans-serif; font-size: 58px; font-weight: 900; }
.hero h1 .ai-title span { color: #15362b; font-size: 47px; font-weight: 800; }
.hero h1 em { display: block; margin-top: 16px; color: #29483d; font-size: 25px; font-style: normal; font-weight: 700; line-height: 1.35; letter-spacing: 0; }
.hero-top-copy > p { max-width: 620px; margin: 14px 0 0; color: #687a73; line-height: 1.75; font-size: 14px; }
.concern-list { display: grid; gap: 8px; margin-top: 19px; }
.concern-list span { display: grid; grid-template-columns: 25px minmax(0, 1fr); align-items: center; color: #405b51; font-size: 13px; line-height: 1.5; }
.concern-list i { color: #c75f4d; font-family: Arial, sans-serif; font-size: 9px; font-style: normal; font-weight: 800; }
.ai-summary { position: relative; z-index: 1; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; margin: 31px 22px 0; padding: 16px 0; border-top: 1px solid #cfddd6; border-bottom: 1px solid #cfddd6; }
.ai-summary-mark { width: 42px; height: 42px; display: grid; place-items: center; color: white; border-radius: 6px; background: #316ed0; font-family: Arial, sans-serif; font-size: 13px; font-weight: 900; }
.ai-summary > div { min-width: 0; display: grid; gap: 4px; }
.ai-summary strong { font-size: 15px; }
.ai-summary small { color: #71827b; font-size: 11px; overflow-wrap: anywhere; }
.ai-status { display: flex; align-items: center; gap: 6px; color: #2c7a5e; font-family: Arial, sans-serif; font-size: 9px; font-weight: 800; }
.ai-status i { width: 7px; height: 7px; border-radius: 50%; background: #37a779; animation: livePulse 1.8s ease-out infinite; }
.hero-content { position: relative; z-index: 1; width: 100%; padding: 21px 22px 24px; }
.hero-action { max-width: 720px; }

.primary-btn, .secondary-btn, .choice-btn { min-height: 50px; border: 0; border-radius: var(--radius); font-weight: 700; }
.primary-btn { width: 100%; padding: 0 20px; color: white; background: var(--green); box-shadow: 0 10px 24px rgba(29,116,87,.25); }
.primary-btn:hover { background: var(--green-dark); }
.primary-btn.light { color: var(--green-dark); background: white; box-shadow: none; }
.secondary-btn { padding: 0 18px; color: var(--green); border: 1px solid #bcd5c8; background: white; }
.text-btn { border: 0; color: var(--muted); background: transparent; }
.hero .primary-btn { min-height: 56px; font-size: 15px; }
.button-ai { display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none; color: #285fb5; border-radius: 5px; background: #e8f0ff; font-family: Arial, sans-serif; font-size: 11px; font-weight: 900; }
.process-flow { display: grid; grid-template-columns: 1fr 18px 1fr 18px 1fr; align-items: center; padding: 5px 0 18px; color: #78958a; }
.process-flow span { min-width: 0; display: grid; gap: 2px; text-align: center; }
.process-flow b { color: #3974bd; font-size: 10px; }
.process-flow strong { color: #29483d; font-size: 13px; }
.process-flow small { color: #7a8b84; font-size: 9px; white-space: nowrap; }
.process-flow > i { position: relative; height: 1px; background: #b8c9c1; }
.process-flow > i::after { content: ""; position: absolute; top: -2px; right: 0; width: 5px; height: 5px; border-top: 1px solid #849c91; border-right: 1px solid #849c91; transform: rotate(45deg); }
.hero-start { min-height: 64px !important; display: flex; align-items: center; gap: 12px; margin-top: 17px; padding: 10px 13px 10px 14px; border: 1px solid #174e3d; background: #123f32; box-shadow: 0 14px 28px rgba(19,70,54,.18); }
.hero-start:hover { background: #0d352a; }
.button-copy { min-width: 0; flex: 1; display: grid; gap: 3px; text-align: left; }
.button-copy b { color: white; font-size: 15px; }
.button-copy small { color: #a9c8bc; font-size: 9px; font-weight: 500; }
.button-arrow { width: 34px; height: 34px; display: grid; place-items: center; flex: none; color: #d7e8e1; border: 1px solid #3b6a5a; border-radius: 50%; font-size: 17px; transition: transform .2s ease; }
.hero-start:hover .button-arrow { transform: translateX(2px); }
.hero-privacy { margin: 10px 0 0; color: #819089; font-size: 9px; text-align: center; }
.saved-record-link { width: 100%; min-height: 42px; margin-top: 9px; color: var(--green-dark); border: 1px solid #c8d9d0; border-radius: 6px; background: rgba(255,255,255,.7); font-size: 11px; font-weight: 700; }

.question-page { min-height: calc(100vh - 130px); padding: 28px 20px 24px; background: #f7faf7; }
.question-head { margin-bottom: 24px; }
.step-kicker { display: block; margin-bottom: 8px; color: var(--green); font-size: 12px; font-weight: 800; }
.question-head h1 { margin: 0 0 10px; font-size: 26px; line-height: 1.3; }
.question-head p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.form-grid { display: grid; gap: 18px; }
.field-label, .stack-form label { display: grid; gap: 8px; font-size: 14px; font-weight: 700; }
.field-label small { color: var(--muted); font-size: 12px; font-weight: 400; }
input, select { width: 100%; height: 50px; padding: 0 14px; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); outline: 0; background: white; }
input:focus, select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(29,116,87,.1); }
.segment { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.segment.three { grid-template-columns: repeat(3, 1fr); }
.segment label { position: relative; }
.segment input { position: absolute; opacity: 0; pointer-events: none; }
.segment span { min-height: 48px; display: grid; place-items: center; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); font-size: 14px; text-align: center; }
.segment input:checked + span { color: var(--green-dark); border-color: var(--green); background: var(--green-soft); font-weight: 700; }
.segment span b, .segment span small { display: block; }
.segment span small { margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 400; }
.segment input:checked + span small { color: #4d6e61; }
.question-list { display: grid; gap: 14px; }
.question-card { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.question-card p { margin: 0 0 13px; font-size: 15px; font-weight: 700; line-height: 1.5; }
.question-card .segment span { min-height: 42px; font-size: 13px; }
.choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.choice-grid label { position: relative; min-width: 0; }
.choice-grid input { position: absolute; opacity: 0; pointer-events: none; }
.choice-grid span { min-height: 44px; height: 100%; display: grid; place-items: center; padding: 8px 6px; color: var(--muted); border: 1px solid var(--line); border-radius: var(--radius); background: white; font-size: 12px; line-height: 1.35; text-align: center; overflow-wrap: anywhere; }
.choice-grid input:checked + span { color: var(--green-dark); border-color: var(--green); background: var(--green-soft); font-weight: 700; }
.choice-grid.wide { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-actions { display: flex; gap: 10px; margin-top: 26px; }
.form-actions .primary-btn { flex: 1; }
.form-actions .secondary-btn { width: 92px; }
.privacy-note { display: flex; gap: 10px; padding: 13px 14px; color: #4c695e; background: var(--green-soft); border-radius: var(--radius); font-size: 12px; line-height: 1.6; }
.privacy-note b { flex: none; }
.contact-panel { display: grid; gap: 17px; padding: 18px; border: 1px solid #bcd2c7; border-radius: var(--radius); background: #edf6f1; }
.contact-panel h2 { margin: 0 0 7px; font-size: 20px; }
.contact-panel h2 small { display: inline-block; margin-left: 5px; padding: 3px 5px; color: #4d6e61; border: 1px solid #b7cec2; border-radius: 4px; font-size: 9px; vertical-align: middle; }
.contact-panel p { margin: 0; color: #5d7168; font-size: 12px; line-height: 1.7; }
.contact-panel .step-kicker { margin-bottom: 5px; font-size: 10px; }
.contact-panel .field-label { gap: 7px; }
.contact-panel input { background: white; }
.consent-check { display: flex; align-items: flex-start; gap: 10px; padding: 13px 14px; color: #294d40; border: 1px solid #b7cec2; border-radius: 6px; background: white; font-size: 12px; font-weight: 700; line-height: 1.5; cursor: pointer; }
.consent-check input { width: 17px; height: 17px; flex: none; margin: 1px 0 0; accent-color: var(--green); }
.contact-field input:disabled { color: #839088; border-color: #d6dfda; background: #e5ebe7; cursor: not-allowed; }
.contact-privacy { display: flex; align-items: center; gap: 8px; color: #557066; font-size: 10px; }
.contact-privacy i { width: 8px; height: 8px; flex: none; background: #3aa374; box-shadow: 0 0 0 4px rgba(58,163,116,.12); }

.result-page { min-height: calc(100vh - 72px); padding: 28px 20px 38px; background: #f6faf7; }
.result-badge { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 20px; color: var(--green); font-size: 12px; font-weight: 800; }
.result-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #47a477; box-shadow: 0 0 0 5px #dff1e7; }
.persona-panel { padding: 24px; color: white; background: var(--green-dark); border-radius: var(--radius); }
.persona-panel small { color: #b8d8ca; }
.persona-panel h1 { margin: 8px 0 12px; font-size: 32px; }
.persona-panel p { margin: 0; color: #e1eee8; line-height: 1.7; font-size: 14px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tag { padding: 6px 9px; border-radius: 4px; color: var(--green-dark); background: #e3f1e9; font-size: 12px; font-weight: 700; }
.persona-panel .tag { color: white; background: rgba(255,255,255,.12); }
.result-section { margin-top: 22px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.result-section h2 { margin: 0 0 12px; font-size: 17px; }
.result-section p { margin: 0; color: var(--muted); line-height: 1.7; font-size: 13px; }
.match-code { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 15px 0; padding: 14px; background: #f0f5f2; border-radius: 6px; }
.match-code strong { font-size: 18px; letter-spacing: .08em; }
.copy-btn { flex: none; padding: 7px 10px; color: var(--green); border: 1px solid #bdd4c8; border-radius: 5px; background: white; font-size: 12px; }
.wechat-box { margin-top: 18px; padding: 18px; border-left: 4px solid var(--coral); background: #fff7f4; }
.wechat-box strong { display: block; margin-bottom: 6px; font-size: 18px; }
.wechat-box span { color: #765950; font-size: 13px; }
.result-qr-section { margin-top: 28px; }
.result-qr-section > header { margin-bottom: 14px; }
.result-qr-section h2 { margin: 0 0 8px; font-size: 20px; }
.result-qr-section > header p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.claim-gate { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px; padding: 22px; color: white; border-radius: var(--radius); background: #15372c; box-shadow: 0 16px 34px rgba(15,55,43,.14); }
.claim-gate small { color: #a9cabc; font-size: 10px; }
.claim-gate h3 { margin: 5px 0 7px; font-size: 19px; }
.claim-gate p { max-width: 520px; margin: 0; color: #d6e5df; font-size: 12px; line-height: 1.7; }
.claim-gate .primary-btn { width: auto; min-width: 156px; box-shadow: none; }
.claim-revealed { animation: revealClaim .35s ease both; }
.share-guide { margin-top: 14px; padding: 20px; border-top: 2px solid var(--green); background: white; }
.share-guide h3 { margin: 5px 0 7px; font-size: 18px; }
.share-guide > p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.share-script { margin: 14px 0 12px; padding: 14px; color: #365247; border-left: 3px solid var(--green); background: #f1f6f3; font-size: 12px; line-height: 1.75; }
.share-guide .secondary-btn { width: 100%; }
.campaign-section { display: grid; grid-template-columns: minmax(180px, .72fr) minmax(0, 1.28fr); gap: 22px; align-items: center; margin-top: 14px; padding: 20px; border: 1px solid #efc5be; border-radius: var(--radius); background: #fff9f7; }
.campaign-visual img { display: block; width: 100%; border-radius: 5px; }
.campaign-label { display: inline-block; padding: 5px 8px; color: #a63b30; border-radius: 4px; background: #ffe2dc; font-size: 10px; font-weight: 800; }
.campaign-copy h3 { margin: 9px 0 8px; font-size: 20px; }
.campaign-copy > p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.campaign-copy ol { margin: 14px 0; padding-left: 20px; color: #533b36; font-size: 12px; line-height: 1.8; }
.campaign-copy li + li { margin-top: 4px; }
.campaign-copy .primary-btn { width: 100%; background: #dc5548; box-shadow: 0 10px 22px rgba(220,85,72,.16); }
.campaign-copy > small { display: block; margin-top: 9px; color: #8b716c; font-size: 9px; line-height: 1.6; text-align: center; }
@keyframes revealClaim { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.qr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.qr-card { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.qr-card-primary { border-color: #b9d7c8; box-shadow: 0 12px 30px rgba(29,116,87,.08); }
.qr-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.qr-card-head > span { width: 28px; height: 28px; display: grid; place-items: center; flex: none; color: white; border-radius: 5px; background: var(--green); font-size: 10px; font-weight: 800; }
.qr-card-head > div { min-width: 0; }
.qr-card-head strong, .qr-card-head small { display: block; }
.qr-card-head strong { font-size: 14px; }
.qr-card-head small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.qr-media { width: min(100%, 236px); aspect-ratio: 1; margin: 0 auto; overflow: hidden; border: 1px solid #edf0ee; border-radius: 6px; background: white; }
.qr-media img { width: 100%; height: 100%; display: block; object-fit: contain; }
.wechat-qr img { object-fit: cover; object-position: center 56%; }
.qr-card p { min-height: 44px; margin: 12px 0; color: var(--muted); font-size: 11px; line-height: 1.65; text-align: center; }
.qr-card p b { color: var(--ink); }
.qr-card .primary-btn { min-height: 44px; box-shadow: none; font-size: 13px; }

.site-footer { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px; color: #829088; border-top: 1px solid var(--line); font-size: 11px; }
.site-footer a { color: #6a7b73; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 24px; transform: translate(-50%, 20px); max-width: calc(100vw - 40px); padding: 10px 15px; color: white; background: #163a2e; border-radius: 6px; opacity: 0; pointer-events: none; transition: .2s ease; font-size: 13px; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Admin */
.admin-body { background: #eef3ef; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: #15372c; }
.login-panel { width: min(100%, 420px); padding: 28px; background: white; border-radius: var(--radius); box-shadow: var(--shadow); }
.login-copy { margin: 48px 0 28px; }
.login-copy h1 { margin: 0 0 10px; font-size: 30px; }
.login-copy p { margin: 0; color: var(--muted); line-height: 1.7; font-size: 14px; }
.stack-form { display: grid; gap: 16px; }
.form-hint { margin: -4px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 224px minmax(0, 1fr); }
.admin-sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 24px 18px; color: white; background: #15372c; }
.brand-light small { color: #a9c2b8; }
.admin-nav { display: grid; gap: 7px; margin-top: 52px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 13px 12px; color: #b8ccc4; border: 0; border-radius: 6px; background: transparent; text-align: left; }
.nav-item span { color: #7fa092; font-size: 10px; }
.nav-item.active { color: white; background: rgba(255,255,255,.1); }
.sidebar-foot { margin-top: auto; color: #9db7ad; font-size: 11px; }
.live-dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #6ed29d; }
.admin-main { min-width: 0; padding: 32px clamp(20px, 4vw, 56px) 60px; }
.admin-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 28px; }
.admin-header h1 { margin: 0; font-size: 28px; }
.backend-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; padding: 10px 12px; color: #365247; border: 1px solid #c8d9d0; border-radius: 6px; background: #f7fbf8; font-size: 11px; }
.backend-status span { display: inline-flex; align-items: center; gap: 7px; }
.backend-status i { width: 7px; height: 7px; border-radius: 50%; background: #35a56f; box-shadow: 0 0 0 4px rgba(53,165,111,.12); }
.backend-status .ai-online { color: #176143; font-weight: 700; }
.backend-status .ai-fallback { color: #87671c; font-weight: 700; }
.dedupe-policy { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; padding: 12px 14px; color: #365247; border-left: 3px solid var(--green); background: #edf6f1; }
.dedupe-policy > div { display: grid; gap: 3px; }
.dedupe-policy strong { font-size: 11px; }
.dedupe-policy span { color: #60736a; font-size: 10px; line-height: 1.6; }
.dedupe-policy em { flex: none; color: var(--green); font-size: 10px; font-style: normal; font-weight: 800; }
.loading-state { padding: 60px 20px; color: var(--muted); text-align: center; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.stat-card span { color: var(--muted); font-size: 12px; }
.stat-card strong { display: block; margin-top: 10px; font-size: 26px; }
.duplicate-alert { margin-bottom: 18px; padding: 18px; border: 1px solid #e6c3ba; border-left: 4px solid #cb6654; border-radius: var(--radius); background: #fff8f5; }
.duplicate-alert-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.duplicate-alert-badge { display: inline-flex; padding: 5px 8px; color: #9a4235; border-radius: 4px; background: #fbe4de; font-size: 10px; font-weight: 800; }
.duplicate-alert h2 { margin: 9px 0 4px; font-size: 17px; }
.duplicate-alert p { margin: 0; color: #765d56; font-size: 11px; line-height: 1.7; }
.duplicate-alert-head > strong { flex: none; padding-top: 4px; color: #9a4235; font-size: 13px; }
.duplicate-name-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-height: 250px; margin-top: 14px; overflow-y: auto; }
.duplicate-name-button { min-width: 0; padding: 11px 12px; color: var(--ink); border: 1px solid #ebd3cc; border-radius: 6px; background: white; text-align: left; }
.duplicate-name-button:hover { border-color: #d89789; background: #fffdfc; }
.duplicate-name-button span { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.duplicate-name-button b { min-width: 0; overflow-wrap: anywhere; }
.duplicate-name-button em { flex: none; color: #9a4235; font-size: 10px; font-style: normal; font-weight: 800; }
.duplicate-name-button small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; overflow-wrap: anywhere; }
.admin-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.admin-toolbar input, .admin-toolbar select { width: auto; min-width: 160px; height: 42px; }
.admin-toolbar input { flex: 1; }
.data-panel { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.table-head, .student-row { display: grid; grid-template-columns: 1.3fr 1fr .6fr .7fr 1fr .8fr 100px; gap: 12px; align-items: center; padding: 13px 16px; }
.table-head { color: var(--muted); background: #f4f7f5; font-size: 11px; font-weight: 700; }
.student-row { min-height: 72px; border-top: 1px solid #edf1ee; font-size: 13px; }
.student-row:hover { background: #fbfdfb; }
.student-row.archived { color: #7b8580; background: #f7f7f7; }
.student-row.archived .student-main strong { text-decoration: line-through; }
.student-main > div { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.student-main strong { display: block; margin-bottom: 4px; }
.student-main em { padding: 3px 5px; color: #9a4235; border-radius: 3px; background: #ffede8; font-size: 8px; font-style: normal; font-weight: 800; }
.student-main small { color: var(--muted); }
.status { display: inline-flex; width: fit-content; padding: 5px 8px; border-radius: 4px; color: #52645c; background: #eef2ef; font-size: 11px; }
.status.added { color: #28628a; background: #e7f2f9; }
.status.recommended { color: #7c5e20; background: #fff3d8; }
.status.matched { color: #176143; background: #def2e7; }
.status.archived { color: #87483f; background: #f5e5e2; }
.row-action { padding: 8px 10px; color: var(--green); border: 1px solid #c6d9cf; border-radius: 5px; background: white; font-size: 12px; }
.empty-state { padding: 44px 20px; color: var(--muted); text-align: center; }
.settings-panel { max-width: 640px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.settings-panel h2 { margin: 0 0 8px; font-size: 19px; }
.settings-panel > p { margin: 0 0 24px; color: var(--muted); line-height: 1.7; font-size: 13px; }
.settings-panel .primary-btn { width: auto; min-width: 140px; }
.setting-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.setting-toggle-row > div { min-width: 0; }
.setting-toggle-row h2 { margin-top: 7px; }
.setting-toggle-row p { max-width: 510px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.75; }
.switch-control { position: relative; flex: none; display: block; width: 52px; height: 30px; cursor: pointer; }
.switch-control input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch-track { display: block; width: 52px; height: 30px; border: 1px solid #bacbc2; border-radius: 15px; background: #dfe8e3; transition: background .18s ease, border-color .18s ease; }
.switch-track::after { content: ""; display: block; width: 24px; height: 24px; margin: 2px; border-radius: 50%; background: white; box-shadow: 0 2px 7px rgba(20, 51, 41, .22); transition: transform .18s ease; }
.switch-control input:checked + .switch-track { border-color: var(--green); background: var(--green); }
.switch-control input:checked + .switch-track::after { transform: translateX(22px); }
.switch-control input:focus-visible + .switch-track { outline: 3px solid rgba(45, 117, 86, .2); outline-offset: 2px; }
.switch-control input:disabled + .switch-track { opacity: .55; cursor: wait; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.setting-state { display: flex; align-items: center; gap: 8px; margin-top: 18px; padding: 10px 12px; color: #6b756f; background: #f2f5f3; font-size: 11px; }
.setting-state i { width: 8px; height: 8px; border-radius: 50%; background: #87928c; }
.setting-state.enabled { color: #176143; background: #eaf5ef; }
.setting-state.enabled i { background: #2b8a60; }
.danger-panel { border-color: #e4c9c2; }
.danger-panel .secondary-btn { color: #8a3528; border-color: #d8aaa0; }
.detail-dialog { width: min(920px, calc(100vw - 32px)); max-height: calc(100vh - 40px); padding: 0; border: 0; border-radius: var(--radius); box-shadow: 0 28px 80px rgba(9,27,21,.25); }
.detail-dialog::backdrop { background: rgba(12,31,25,.58); }
.dialog-head { position: sticky; z-index: 2; top: 0; display: flex; justify-content: space-between; gap: 20px; padding: 22px 24px; border-bottom: 1px solid var(--line); background: white; }
.dialog-head h2 { margin: 0 0 5px; font-size: 22px; }
.dialog-head p { margin: 0; color: var(--muted); font-size: 12px; }
.dialog-head-actions { display: flex; align-items: center; gap: 8px; }
.icon-close { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 6px; background: white; font-size: 20px; }
.dialog-body { padding: 22px 24px 28px; background: #f7faf8; }
.detail-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 20px; }
.detail-chip { padding: 13px; border: 1px solid var(--line); border-radius: 6px; background: white; }
.detail-chip span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; }
.detail-chip strong { font-size: 13px; }
.student-contact { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; padding: 14px 16px; border-left: 4px solid var(--green); background: #edf6f1; }
.student-contact > div { min-width: 0; display: grid; gap: 3px; }
.student-contact span { color: var(--muted); font-size: 10px; }
.student-contact strong { font-size: 17px; overflow-wrap: anywhere; }
.student-contact small { color: #60736a; font-size: 9px; line-height: 1.5; }
.student-contact .secondary-btn { min-height: 40px; flex: none; }
.questionnaire-section { margin-bottom: 24px; }
.questionnaire-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.questionnaire-head .eyebrow { margin-bottom: 4px; }
.questionnaire-head strong { display: block; font-size: 13px; }
.questionnaire-head > small { color: var(--muted); font-size: 10px; }
.answer-groups { display: grid; gap: 8px; }
.answer-group { overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: white; }
.answer-group summary { display: flex; align-items: center; justify-content: space-between; min-height: 46px; padding: 0 14px; color: var(--ink); list-style: none; font-size: 12px; font-weight: 800; cursor: pointer; }
.answer-group summary::-webkit-details-marker { display: none; }
.answer-group summary span { display: flex; align-items: center; gap: 7px; }
.answer-group summary small { color: var(--muted); font-size: 9px; font-weight: 500; }
.answer-group summary::after { content: "+"; color: var(--green); font-size: 18px; font-weight: 400; }
.answer-group[open] summary { border-bottom: 1px solid var(--line); }
.answer-group[open] summary::after { content: "−"; }
.answer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; padding: 4px 14px 12px; }
.answer-row { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px; padding: 10px 0; border-bottom: 1px solid #edf1ef; }
.answer-row span { color: #66776f; font-size: 10px; line-height: 1.55; }
.answer-row strong { max-width: 118px; color: #173e31; font-size: 10px; line-height: 1.55; text-align: right; overflow-wrap: anywhere; }
.group-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 0 0 12px; }
.group-heading .eyebrow { margin-bottom: 4px; }
.group-heading strong { font-size: 13px; }
.group-heading small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; font-weight: 500; }
.group-type { flex: none; padding: 6px 9px; color: var(--green-dark); border: 1px solid #bed6ca; border-radius: 4px; background: white; font-size: 11px; font-weight: 700; }
.ai-match-panel { margin-top: 14px; padding: 16px; border: 1px solid #cbdcd3; border-radius: var(--radius); background: #f0f6f3; }
.ai-match-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.ai-match-head > div { display: flex; align-items: center; gap: 8px; }
.ai-match-head .secondary-btn { min-height: 38px; height: 38px; }
.ai-badge { display: grid; place-items: center; width: 28px; height: 28px; color: white; border-radius: 5px; background: var(--green); font-size: 11px; font-weight: 800; }
.ai-analysis { margin-top: 12px; padding-top: 12px; border-top: 1px solid #d7e4dd; }
.ai-analysis p { margin: 0; color: #465f55; font-size: 12px; line-height: 1.75; }
.ai-mode { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; color: var(--green); font-size: 10px; font-weight: 800; }
.ai-mode small { color: var(--muted); font-weight: 500; }
.ai-analysis-block { padding: 12px; border-radius: 5px; background: white; }
.ai-analysis-block > strong, .ai-analysis-columns strong, .ai-message > strong { display: block; margin-bottom: 5px; color: var(--ink); font-size: 11px; }
.ai-analysis-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.ai-analysis-columns > div { padding: 12px; border-radius: 5px; background: #e5f3eb; }
.ai-analysis-columns > div.risk { background: #fff0e9; }
.ai-analysis-columns ul { margin: 0; padding-left: 18px; color: #465f55; font-size: 12px; line-height: 1.7; }
.ai-message { margin-top: 8px; padding: 12px; border: 1px dashed #bfd2c8; border-radius: 5px; background: white; }
.ai-message .text-btn { margin-top: 8px; color: var(--green); font-size: 11px; font-weight: 700; }
.match-list { display: grid; gap: 12px; }
.match-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.match-card.group-recommended { border-color: #9fc8b4; box-shadow: inset 3px 0 0 var(--green); }
.match-card.candidate-unavailable { opacity: .68; }
.match-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.match-card-head > div:first-child { min-width: 0; }
.match-rank { color: var(--green); font-size: 11px; font-weight: 800; }
.match-person { font-size: 18px; font-weight: 800; }
.match-person + small { color: var(--muted); font-size: 9px; }
.match-score { color: var(--green); font-size: 24px; font-weight: 800; }
.score-breakdown { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.score-breakdown div { padding: 10px; color: var(--muted); background: #f3f6f4; border-radius: 5px; font-size: 11px; }
.score-breakdown b { display: block; margin-top: 3px; color: var(--ink); font-size: 13px; }
.score-breakdown small { display: block; margin-top: 3px; color: #74877f; font-size: 8px; }
.priority-score-warning { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; padding: 10px 12px; color: #864236; border-left: 3px solid #c85f4d; background: #fff0ec; }
.priority-score-warning strong { font-size: 11px; }
.priority-score-warning span { font-size: 9px; line-height: 1.5; text-align: right; }
.match-card.priority-conflict { border-color: #dfaaa0; }
.match-card.priority-conflict .match-score { color: #a84d3e; }
.reason-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.reason-box { padding: 12px; border-radius: 5px; background: #edf6f1; font-size: 12px; line-height: 1.6; }
.reason-box.risk { background: #fff3ef; }
.reason-box strong { display: block; margin-bottom: 3px; }
.candidate-card-actions { display: flex; justify-content: flex-end; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.candidate-card-actions .secondary-btn { width: auto; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.dialog-actions button, .dialog-actions select { width: auto; height: 38px; min-height: 38px; }
.delete-record-btn, .restore-record-btn { min-height: 38px; padding: 0 13px; border-radius: 6px; font-size: 11px; font-weight: 800; }
.delete-record-btn { color: #913d31; border: 1px solid #d8aaa2; background: #fff7f5; }
.restore-record-btn { color: #176143; border: 1px solid #a9cfbc; background: #eef8f2; }
.archived-notice { display: grid; gap: 4px; margin-bottom: 16px; padding: 13px 15px; border-left: 4px solid #b75b4d; color: #753f37; background: #fff0ed; }
.archived-notice strong { font-size: 13px; }
.archived-notice span { font-size: 10px; }
.duplicate-detail-notice { display: grid; gap: 5px; margin-bottom: 16px; padding: 13px 15px; border-left: 4px solid #cb6654; color: #753f37; background: #fff0ed; }
.duplicate-detail-notice strong { font-size: 13px; }
.duplicate-detail-notice span { font-size: 10px; line-height: 1.6; }
.duplicate-detail-notice > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.duplicate-detail-notice button { padding: 6px 8px; color: #753f37; border: 1px solid #ddb6ae; border-radius: 4px; background: white; font-size: 9px; }
.duplicate-detail-notice button:disabled { color: #8e7772; background: #f3e5e1; cursor: default; }

.credential-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 18px 0 8px; }
.credential-grid.single { grid-template-columns: 1fr; }
.credential-grid > div { min-width: 0; padding: 13px; border: 1px solid #c9ddd3; border-radius: 6px; background: #f7fbf9; }
.credential-grid small { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; }
.credential-grid strong { font-family: Consolas, monospace; font-size: 15px; overflow-wrap: anywhere; }
.credential-warning { margin: 0 0 16px !important; color: #8a5b25 !important; font-size: 11px !important; }

.record-lookup { min-height: calc(100vh - 130px); padding: 42px 20px 50px; background: #f7faf7; }
.record-lookup > header { margin-bottom: 28px; }
.record-lookup h1 { margin: 0 0 10px; font-size: 28px; line-height: 1.3; }
.record-lookup header p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.record-lookup .stack-form { display: grid; gap: 15px; padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.record-lookup .stack-form .secondary-btn { width: 100%; }
.legacy-record-note { margin-top: 14px; padding: 15px 16px; border-left: 3px solid #d2a34c; background: #fff9ed; }
.legacy-record-note strong { font-size: 12px; }
.legacy-record-note p { margin: 5px 0 0; color: #74664c; font-size: 11px; line-height: 1.7; }
.record-recovery { display: grid; grid-template-columns: minmax(0, 1fr) 104px; align-items: center; gap: 14px; }
.record-recovery img { width: 104px; height: 104px; object-fit: cover; border: 5px solid white; }

.record-page { padding-bottom: 40px; background: #f5f8f6; }
.record-hero { padding: 34px 22px 26px; color: white; background: #143d31; }
.record-hero .step-kicker { color: #8fd4b5; }
.record-hero h1 { margin: 0 0 8px; font-size: 28px; line-height: 1.3; }
.record-hero > p { margin: 0; color: #bfd2c9; font-size: 13px; }
.record-code-line { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 17px; }
.record-code-line span { padding: 6px 8px; border: 1px solid #3e6558; border-radius: 4px; color: #dce9e3; font-family: Consolas, monospace; font-size: 10px; }
.record-stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); background: white; }
.record-stat-grid > div { min-width: 0; padding: 17px 10px; border-right: 1px solid var(--line); text-align: center; }
.record-stat-grid > div:last-child { border-right: 0; }
.record-stat-grid span, .record-stat-grid small { display: block; color: var(--muted); font-size: 9px; }
.record-stat-grid strong { display: block; margin: 6px 0 4px; font-size: 19px; overflow-wrap: anywhere; }
.record-stat-grid small { line-height: 1.4; }
.record-section { padding: 30px 20px; border-bottom: 1px solid var(--line); background: white; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin-bottom: 10px; }
.section-heading .step-kicker { margin-bottom: 4px; }
.section-heading h2 { margin: 0; font-size: 21px; }
.section-heading > small { flex: none; color: var(--muted); font-size: 9px; }
.section-heading .compact { flex: none; }
.section-intro { margin: 0 0 18px; color: var(--muted); font-size: 11px; line-height: 1.75; }
.student-ai-panel { margin-bottom: 16px; padding: 14px; border: 1px solid #bfd6ca; border-radius: 7px; background: #f0f7f3; }
.student-ai-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.student-ai-head > div { display: flex; align-items: center; gap: 9px; min-width: 0; }
.student-ai-head strong, .student-ai-head small { display: block; }
.student-ai-head strong { font-size: 12px; }
.student-ai-head small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.student-ai-head button { width: auto; flex: none; }
#studentAiAnalysis { margin-top: 12px; padding-top: 12px; border-top: 1px solid #d5e4dc; }
.student-ai-empty { display: grid; gap: 4px; padding: 11px; border-radius: 5px; background: white; }
.student-ai-empty strong { font-size: 11px; }
.student-ai-empty p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.student-ai-meta { display: flex; justify-content: space-between; gap: 10px; color: var(--green); font-size: 9px; font-weight: 800; }
.student-ai-meta small { color: var(--muted); font-weight: 500; }
.student-ai-result h3 { margin: 9px 0; font-size: 13px; line-height: 1.65; }
.student-ai-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.student-ai-columns > div { padding: 10px; border-radius: 5px; background: white; }
.student-ai-columns strong { font-size: 10px; }
.student-ai-columns ul { margin: 6px 0 0; padding-left: 16px; color: #52685f; font-size: 9px; line-height: 1.65; }
.student-ai-loading { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 10px; }
.student-ai-loading i { width: 14px; height: 14px; border: 2px solid #c7dbd1; border-top-color: var(--green); border-radius: 50%; animation: ai-spin .8s linear infinite; }
.student-ai-loading p { margin: 0; }
@keyframes ai-spin { to { transform: rotate(360deg); } }
.public-match-list { display: grid; gap: 10px; }
.public-match-card { padding: 15px; border: 1px solid var(--line); border-radius: 7px; background: #fbfdfc; }
.public-match-card.recommended { border-color: #9bc8b3; background: #f2f9f5; }
.public-match-card.name-revealed { box-shadow: inset 3px 0 0 #2f7f5c; }
.public-match-card.priority-conflict { border-color: #dfaaa0; background: #fffaf8; }
.public-match-card.priority-conflict header > b { color: #a84d3e; }
.public-match-card.unavailable { opacity: .72; }
.public-match-card header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.public-match-card header > div { min-width: 0; display: grid; gap: 4px; }
.public-match-card header span { color: var(--green); font-size: 9px; font-weight: 800; }
.public-match-card header strong { font-size: 15px; }
.name-reveal-note { color: #2f7f5c !important; font-size: 8px !important; font-weight: 700 !important; }
.public-match-card header > b { flex: none; color: var(--green); font-size: 27px; }
.public-match-card header > b small { font-size: 11px; }
.mini-score { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 13px 0 9px; }
.mini-score span { min-width: 0; padding: 8px; color: var(--muted); border-radius: 4px; background: white; font-size: 9px; line-height: 1.5; }
.mini-score b { display: block; color: var(--ink); font-size: 11px; }
.mini-score small { display: block; margin-top: 2px; color: #72857d; font-size: 7px; }
.match-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.match-notes p { margin: 0; padding: 9px; color: #476057; border-radius: 4px; background: #e8f4ed; font-size: 10px; line-height: 1.6; }
.match-notes p.risk { color: #795a4d; background: #fff1eb; }
.match-notes strong { display: block; margin-bottom: 2px; color: var(--ink); }
.record-empty { padding: 26px 18px; border: 1px dashed #c5d6cd; text-align: center; }
.record-empty strong { font-size: 14px; }
.record-empty p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.record-basic { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 17px 0 12px; border: 1px solid var(--line); background: var(--line); }
.record-basic span { min-width: 0; padding: 11px; background: #fbfdfc; font-size: 11px; overflow-wrap: anywhere; }
.record-basic small { display: block; margin-bottom: 4px; color: var(--muted); font-size: 9px; }
.record-answer-group { border-bottom: 1px solid var(--line); }
.record-answer-group summary { display: flex; align-items: center; justify-content: space-between; min-height: 46px; list-style: none; cursor: pointer; font-size: 12px; font-weight: 800; }
.record-answer-group summary::-webkit-details-marker { display: none; }
.record-answer-group summary small { color: var(--muted); font-size: 9px; font-weight: 500; }
.record-answer-group summary::after { content: "+"; margin-left: 8px; color: var(--green); font-size: 18px; }
.record-answer-group[open] summary::after { content: "−"; }
.record-answer-group summary span { flex: 1; }
.record-answer-group > div { padding-bottom: 8px; }
.record-answer-group p { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; margin: 0; padding: 9px 0; border-top: 1px solid #edf1ef; font-size: 10px; line-height: 1.55; }
.record-answer-group p span { color: var(--muted); }
.record-answer-group p strong { max-width: 130px; text-align: right; overflow-wrap: anywhere; }
.compact { width: auto; min-height: 38px; height: 38px; padding: 0 12px; font-size: 11px; }
.identity-warning { margin: 14px 20px; padding: 16px; border-left: 3px solid #d2a34c; background: #fff9ed; }
.identity-warning strong { font-size: 13px; }
.identity-warning p { margin: 5px 0 11px; color: #74664c; font-size: 10px; line-height: 1.7; }
.record-contact { margin-top: 14px; padding: 28px 20px; color: white; background: #173f33; }
.record-contact > div:first-child > span { color: #8fd4b5; font-size: 10px; font-weight: 800; }
.record-contact h2 { margin: 6px 0 8px; font-size: 20px; }
.record-contact > div:first-child > p { margin: 0 0 18px; color: #bcd1c7; font-size: 11px; line-height: 1.7; }
.record-contact #recordQr { margin-top: 18px; text-align: center; }
.record-contact #recordQr img { width: min(100%, 260px); display: block; margin: 0 auto; border: 8px solid white; }
.record-contact #recordQr p { margin: 10px 0 0; color: #c8dbd2; font-size: 10px; }
.record-freshman-guide { display: grid; grid-template-columns: minmax(0, 1fr) 148px; align-items: center; gap: 20px; margin-top: 1px; padding: 24px 20px; color: #183b31; background: #eef6f2; }
.record-guide-copy span { color: var(--green); font-size: 9px; font-weight: 800; }
.record-guide-copy h2 { margin: 6px 0 8px; font-size: 20px; }
.record-guide-copy p { margin: 0; color: #52695f; font-size: 11px; line-height: 1.75; }
.record-guide-copy small { display: block; margin-top: 12px; color: #75877f; font-size: 9px; }
.record-guide-qr { padding: 8px; background: white; box-shadow: 0 8px 24px rgba(25, 67, 53, .09); }
.record-guide-qr img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; }
.record-actions { display: grid; grid-template-columns: .8fr 1.2fr; gap: 8px; padding: 16px 20px 0; }

.student-access { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: -10px 0 20px; padding: 14px 16px; border-left: 4px solid #467bb1; background: #edf4fb; }
.student-access > div { min-width: 0; display: grid; gap: 3px; }
.student-access span { color: var(--muted); font-size: 10px; }
.student-access strong { font-size: 15px; }
.student-access small { color: #60717e; font-size: 9px; line-height: 1.5; }
.student-access .secondary-btn { min-height: 40px; flex: none; color: #285f91; border-color: #b9cee1; }
.admin-edit-form { display: grid; gap: 15px; }
.admin-edit-form > label, .admin-edit-basic label, .admin-edit-group label { display: grid; gap: 6px; color: var(--ink); font-size: 11px; font-weight: 700; }
.admin-edit-basic { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.admin-consent { display: flex !important; align-items: center; grid-template-columns: auto 1fr; padding: 12px; border: 1px solid var(--line); background: white; }
.admin-consent input { width: 18px; height: 18px; }
.admin-edit-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 16px; border: 1px solid var(--line); background: white; }
.admin-edit-group legend { padding: 0 6px; color: var(--green); font-size: 12px; font-weight: 800; }
.admin-edit-group label span { min-height: 34px; color: var(--muted); line-height: 1.5; }
.backup-panel { border-color: #bfd8cc; }

@media (max-width: 760px) {
  .hero h1 .ai-title { font-size: 44px; }
  .hero h1 em { font-size: 25px; }
  .admin-shell { display: block; }
  .admin-sidebar { position: static; width: 100%; height: auto; padding: 16px 18px; flex-direction: row; align-items: center; gap: 14px; }
  .admin-sidebar .brand small, .sidebar-foot { display: none; }
  .admin-nav { display: flex; margin: 0 0 0 auto; }
  .nav-item { padding: 10px; }
  .nav-item span { display: none; }
  .admin-main { padding: 24px 16px 50px; }
  .backend-status { align-items: flex-start; flex-direction: column; }
  .dedupe-policy { align-items: flex-start; flex-direction: column; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .duplicate-name-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .table-head { display: none; }
  .student-row { grid-template-columns: 1fr auto; gap: 10px; padding: 15px; }
  .student-row > :nth-child(2), .student-row > :nth-child(3), .student-row > :nth-child(5) { display: none; }
  .student-row .status { grid-column: 1; }
  .student-row .row-action { grid-column: 2; grid-row: 1 / span 2; }
  .detail-summary { grid-template-columns: repeat(2, 1fr); }
  .student-contact { align-items: stretch; flex-direction: column; }
  .student-contact .secondary-btn { width: 100%; }
  .student-access { align-items: stretch; flex-direction: column; }
  .student-access .secondary-btn { width: 100%; }
  .admin-edit-group { grid-template-columns: 1fr; }
  .answer-grid { grid-template-columns: 1fr; }
  .reason-grid { grid-template-columns: 1fr; }
  .ai-analysis-columns { grid-template-columns: 1fr; }
  .dialog-head { align-items: flex-start; }
  .dialog-head-actions { flex-direction: column-reverse; align-items: flex-end; }
}

@media (max-width: 560px) {
  .priority-score-warning { align-items: flex-start; flex-direction: column; }
  .priority-score-warning span { text-align: left; }
  .claim-gate { grid-template-columns: 1fr; padding: 20px; }
  .claim-gate .primary-btn { width: 100%; }
  .campaign-section { grid-template-columns: 1fr; padding: 18px; }
  .campaign-visual { width: min(100%, 280px); margin: 0 auto; }
  .qr-grid { grid-template-columns: 1fr; }
  .qr-card { padding: 18px; }
  .qr-media { width: min(100%, 260px); }
  .qr-card p { min-height: 0; }
  .record-stat-grid { grid-template-columns: 1fr 1fr; }
  .record-stat-grid > div:nth-child(2) { border-right: 0; }
  .record-stat-grid > div:last-child { grid-column: 1 / -1; border-top: 1px solid var(--line); }
  .match-notes { grid-template-columns: 1fr; }
  .record-basic { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-edit-basic { grid-template-columns: 1fr; }
  .student-ai-head { align-items: stretch; flex-direction: column; }
  .student-ai-head button { width: 100%; }
  .student-ai-columns { grid-template-columns: 1fr; }
  .record-freshman-guide { grid-template-columns: minmax(0, 1fr) 116px; gap: 14px; }
}

@media (max-width: 420px) {
  .duplicate-alert-head { display: grid; gap: 8px; }
  .duplicate-name-list { grid-template-columns: 1fr; }
  .hero::before { top: 250px; right: -150px; }
  .hero h1 .ai-title { gap: 9px; }
  .hero h1 .ai-title b { font-size: 48px; }
  .hero h1 .ai-title span { font-size: 40px; }
  .hero h1 em { font-size: 22px; }
  .hero-top-copy > p { font-size: 12px; }
  .segment.three { grid-template-columns: 1fr; }
  .segment.three span { min-height: 42px; }
  .admin-sidebar .brand > span:last-child { display: none; }
  .admin-nav { margin-left: auto; }
  .nav-item { font-size: 12px; }
  .score-breakdown { grid-template-columns: 1fr; }
  .choice-grid, .choice-grid.wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .credential-grid, .mini-score { grid-template-columns: 1fr; }
  .record-recovery { grid-template-columns: minmax(0, 1fr) 88px; }
  .record-recovery img { width: 88px; height: 88px; }
}

@media (max-width: 760px) and (max-height: 740px) {
  .hero-top-copy { padding-top: 18px; }
  .hero-kicker { margin-bottom: 8px; }
  .hero h1 .ai-title { gap: 8px; }
  .hero h1 .ai-title b { font-size: 45px; }
  .hero h1 .ai-title span { font-size: 37px; }
  .hero h1 em { margin-top: 7px; font-size: 20px; }
  .hero-top-copy > p { margin-top: 9px; font-size: 12px; line-height: 1.55; }
  .concern-list { gap: 5px; margin-top: 10px; }
  .concern-list span { font-size: 12px; }
  .ai-summary { margin-top: 15px; padding: 10px 0; }
  .ai-summary-mark { width: 36px; height: 36px; }
  .ai-summary small { display: none; }
  .hero-content { padding-top: 14px; padding-bottom: 14px; }
  .process-flow { padding: 3px 0 12px; }
  .process-flow small { display: none; }
  .hero .primary-btn { min-height: 52px; }
  .hero-privacy { margin-top: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
  .hero-kicker i, .ai-status i { animation: none !important; }
}

@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(131,231,179,.55); } 70% { box-shadow: 0 0 0 7px rgba(131,231,179,0); } 100% { box-shadow: 0 0 0 0 rgba(131,231,179,0); } }
