*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:    #4f46e5;
  --blue-d:  #4338ca;
  --blue-l:  #eef2ff;
  --green:   #059669;
  --green-l: #ecfdf5;
  --amber:   #d97706;
  --amber-l: #fffbeb;
  --red:     #dc2626;
  --red-l:   #fef2f2;
  --ink:     #0f172a;
  --ink-2:   #475569;
  --ink-3:   #94a3b8;
  --bg:      #f8fafc;
  --white:   #ffffff;
  --border:  #e2e8f0;
  --radius:  16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow:    0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,.04), 0 2px 4px rgba(0,0,0,.04);
  --shadow-l:  0 10px 25px rgba(0,0,0,.06), 0 4px 10px rgba(0,0,0,.04);
  --shadow-xl: 0 20px 50px rgba(0,0,0,.08), 0 8px 20px rgba(0,0,0,.04);
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.6;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}

a { color: var(--blue); text-decoration: none; transition: color .15s; }
a:hover { color: var(--blue-d); }

/* ══════════════════════════════════════════
   Nav
   ══════════════════════════════════════════ */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.85); backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem; height: 56px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-brand { font-weight: 700; font-size: .9375rem; color: var(--ink); letter-spacing: -.01em; }
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a { font-size: .875rem; color: var(--ink-2); font-weight: 500; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }

/* ══════════════════════════════════════════
   Layout
   ══════════════════════════════════════════ */
.container { max-width: 720px; margin: 0 auto; padding: 0 1.5rem; }

/* ══════════════════════════════════════════
   Hero
   ══════════════════════════════════════════ */
.hero { padding: 4rem 0 3rem; text-align: center; }
.hero h1 {
  font-size: clamp(1.5rem, 5vw, 2.25rem); font-weight: 800;
  line-height: 1.2; letter-spacing: -.025em; color: var(--ink);
  margin-bottom: 1rem;
}
.hero h1 em {
  background: linear-gradient(135deg, var(--blue) 0%, #7c3aed 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; font-style: normal;
}
.hero .sub {
  font-size: 1rem; color: var(--ink-2); max-width: 460px;
  margin: 0 auto 2.25rem; line-height: 1.75;
}

/* ══════════════════════════════════════════
   Buttons
   ══════════════════════════════════════════ */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: var(--blue); color: #fff;
  font-size: 1rem; font-weight: 600; letter-spacing: -.01em;
  padding: .875rem 2.25rem; border-radius: 12px;
  border: none; cursor: pointer;
  box-shadow: 0 4px 14px rgba(79,70,229,.3);
  transition: all .2s ease; text-decoration: none;
}
.btn-primary:hover {
  background: var(--blue-d); box-shadow: 0 6px 20px rgba(79,70,229,.4);
  transform: translateY(-1px); text-decoration: none; color: #fff;
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  background: var(--white); color: var(--blue);
  font-size: .9375rem; font-weight: 600;
  padding: .75rem 1.75rem; border-radius: 12px;
  border: 1.5px solid var(--border); cursor: pointer;
  transition: all .15s; text-decoration: none;
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover { background: var(--blue-l); border-color: var(--blue); text-decoration: none; }

/* ══════════════════════════════════════════
   Pain Cards
   ══════════════════════════════════════════ */
.pain-cards { display: flex; flex-direction: column; gap: .75rem; margin: 2.5rem 0; }
.pain-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem 1.5rem; display: flex; align-items: flex-start; gap: 1rem;
  box-shadow: var(--shadow); transition: box-shadow .2s, transform .2s;
}
.pain-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.pain-icon { font-size: 1.5rem; flex-shrink: 0; margin-top: .05rem; }
.pain-text { font-size: .9375rem; color: var(--ink-2); line-height: 1.65; }
.pain-text strong { color: var(--ink); font-weight: 600; }

/* ══════════════════════════════════════════
   About Strip
   ══════════════════════════════════════════ */
.about-strip {
  background: linear-gradient(135deg, var(--blue-l) 0%, #f5f3ff 100%);
  border: 1px solid #c7d2fe; border-radius: var(--radius);
  padding: 1.5rem 1.75rem; margin: 2rem 0; box-shadow: var(--shadow);
}
.about-strip .label {
  font-size: .75rem; font-weight: 700; color: var(--blue);
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: .625rem;
}
.about-strip p { font-size: .9375rem; color: var(--ink-2); line-height: 1.75; }
.about-strip strong { color: var(--ink); font-weight: 600; }

/* ══════════════════════════════════════════
   Tool Page
   ══════════════════════════════════════════ */
.tool-header { padding: 2.5rem 0 2rem; text-align: center; }
.tool-header h1 {
  font-size: clamp(1.5rem, 5vw, 2.125rem); font-weight: 800;
  letter-spacing: -.025em; line-height: 1.2; margin-bottom: .875rem;
}
.tool-header h1 em {
  background: linear-gradient(135deg, var(--blue) 0%, #7c3aed 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; font-style: normal;
}
.tool-sub { font-size: .9375rem; color: var(--ink-2); line-height: 1.7; margin-bottom: 1.125rem; }

.kw-tags { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-bottom: 1rem; }
.kw-tags span {
  font-size: .75rem; font-weight: 600; color: var(--blue);
  background: var(--blue-l); padding: .25rem .75rem;
  border-radius: 100px; letter-spacing: .02em;
}

.trust-row {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .8125rem; color: var(--ink-2); font-weight: 500;
  background: var(--white); border: 1px solid var(--border);
  border-radius: 100px; padding: .35rem 1rem;
  box-shadow: var(--shadow-sm);
}
.trust-dot {
  width: 8px; height: 8px; background: var(--green); border-radius: 50%;
  flex-shrink: 0; box-shadow: 0 0 0 3px var(--green-l);
}

/* ══════════════════════════════════════════
   Form Card
   ══════════════════════════════════════════ */
.form-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.75rem;
  box-shadow: var(--shadow-md); margin-bottom: 1.5rem;
}

.field-group { margin-bottom: 1.625rem; }
.field-group:last-child { margin-bottom: 0; }
.field-label { font-size: .875rem; font-weight: 600; color: var(--ink); margin-bottom: .5rem; display: block; }
.field-hint { font-size: .8125rem; color: var(--ink-3); margin-bottom: .75rem; }

.input-row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.input-row .field-group { margin-bottom: 0; flex: 1; min-width: 120px; }

input[type="number"], input[type="text"] {
  width: 100%; padding: .75rem .9375rem;
  border: 1.5px solid var(--border); border-radius: 10px;
  font-size: .9375rem; color: var(--ink); background: var(--white);
  transition: border-color .15s, box-shadow .15s;
  -moz-appearance: textfield;
}
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }
input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(79,70,229,.1); }

.radio-group { display: flex; flex-direction: column; gap: .5rem; }
.radio-option {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1rem; border-radius: 10px;
  border: 1.5px solid var(--border); cursor: pointer;
  transition: all .15s; font-size: .9375rem; background: var(--white);
}
.radio-option:hover { border-color: var(--blue); background: var(--blue-l); }
.radio-option input[type="radio"] { accent-color: var(--blue); width: 16px; height: 16px; flex-shrink: 0; }
.radio-option.selected { border-color: var(--blue); background: var(--blue-l); box-shadow: 0 0 0 3px rgba(79,70,229,.08); }

/* ══════════════════════════════════════════
   Result
   ══════════════════════════════════════════ */
#result-section { display: none; }
.result-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  box-shadow: var(--shadow-md); margin-bottom: 1.5rem;
}
.result-title {
  font-size: 1rem; font-weight: 700; color: var(--ink);
  margin-bottom: 1.25rem; border-bottom: 1px solid var(--border);
  padding-bottom: .75rem;
}

.risk-badge {
  display: inline-flex; align-items: center; gap: .375rem;
  font-size: .875rem; font-weight: 700; padding: .3rem .875rem; border-radius: 100px;
}
.risk-low  { background: var(--green-l); color: var(--green); }
.risk-mid  { background: var(--amber-l); color: var(--amber); }
.risk-high { background: var(--red-l);   color: var(--red);   }

.result-body {
  font-size: .9375rem; color: var(--ink); line-height: 1.8;
  white-space: pre-wrap; word-break: break-word;
}
.result-body strong { color: var(--ink); }

.cursor::after { content: '▌'; animation: blink .7s step-end infinite; color: var(--blue); }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* ══════════════════════════════════════════
   Lawyer CTA
   ══════════════════════════════════════════ */
.lawyer-cta {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-radius: var(--radius); padding: 1.75rem;
  color: #fff; text-align: center; margin-bottom: 1.5rem;
  box-shadow: var(--shadow-l);
}
.lawyer-cta h3 { font-size: 1.0625rem; font-weight: 700; margin-bottom: .375rem; color: #fff; }
.lawyer-cta p { font-size: .8125rem; margin-bottom: 1.25rem; line-height: 1.6; }
.btn-white {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  background: #fff; color: #0f172a;
  font-size: .9375rem; font-weight: 600;
  padding: .75rem 1.75rem; border-radius: 10px;
  border: none; cursor: pointer; text-decoration: none;
  transition: all .15s; box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.btn-white:hover { opacity: .92; text-decoration: none; transform: translateY(-1px); }

/* ══════════════════════════════════════════
   Disclaimer
   ══════════════════════════════════════════ */
.disclaimer {
  font-size: .8125rem; color: var(--ink-3); text-align: center;
  padding: 1rem 0 2rem; line-height: 1.6;
}

/* ══════════════════════════════════════════
   Loading
   ══════════════════════════════════════════ */
.spinner {
  width: 22px; height: 22px; border: 2.5px solid var(--border);
  border-top-color: var(--blue); border-radius: 50%;
  animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-row { display: flex; align-items: center; gap: .75rem; color: var(--ink-2); font-size: .9375rem; padding: .5rem 0; }

/* ══════════════════════════════════════════
   Footer
   ══════════════════════════════════════════ */
footer {
  border-top: 1px solid var(--border); padding: 2.5rem 0 2rem;
  margin-top: 3rem; background: var(--white);
}
.footer-disclaimer { font-size: .8125rem; color: var(--ink-3); text-align: center; line-height: 1.8; margin-bottom: 1.5rem; }
.footer-nav { display: flex; justify-content: center; gap: 2rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.footer-nav a { font-size: .875rem; color: var(--ink-2); font-weight: 500; }
.footer-nav a:hover { color: var(--ink); text-decoration: none; }
.footer-copy { text-align: center; font-size: .8125rem; color: var(--ink-3); }

/* ══════════════════════════════════════════
   About Page
   ══════════════════════════════════════════ */
.about-section { padding: 2rem 0; }
.about-section h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 1rem; letter-spacing: -.01em; }
.about-section p { font-size: .9375rem; color: var(--ink-2); line-height: 1.8; margin-bottom: 1rem; }
.about-section ul { padding-left: 1.25rem; margin-bottom: 1rem; }
.about-section li { font-size: .9375rem; color: var(--ink-2); line-height: 1.8; margin-bottom: .25rem; }

.contact-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem 1.5rem;
  display: flex; gap: 1rem; align-items: flex-start;
  margin-bottom: .75rem; box-shadow: var(--shadow);
  transition: box-shadow .2s;
}
.contact-card:hover { box-shadow: var(--shadow-md); }
.contact-icon { font-size: 1.5rem; flex-shrink: 0; }
.contact-info .name { font-weight: 600; font-size: .9375rem; margin-bottom: .25rem; }
.contact-info .desc { font-size: .875rem; color: var(--ink-2); line-height: 1.6; }

/* ══════════════════════════════════════════
   Report Layout
   ══════════════════════════════════════════ */
.report-hero {
  display: flex; gap: 1.75rem; align-items: flex-start;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.75rem;
  box-shadow: var(--shadow-md); margin-bottom: 1rem;
  flex-wrap: wrap;
}
.report-hero-left { flex: 1; min-width: 200px; }
.report-hero-right { display: flex; flex-direction: column; align-items: center; }
.report-label {
  font-size: .75rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-3); font-weight: 600;
}
.penalty-range { margin-top: .25rem; }

.report-section {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow); margin-bottom: 1rem;
  transition: box-shadow .2s;
}
.report-section:hover { box-shadow: var(--shadow-md); }
.section-title { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; color: var(--ink); letter-spacing: -.01em; }

/* Cases */
.cases-list { display: flex; flex-direction: column; gap: .75rem; }
.case-item {
  background: #f8fafc; border-left: 3px solid var(--blue);
  border-radius: 0 10px 10px 0; padding: .75rem 1rem;
  font-size: .875rem; color: var(--ink-2); line-height: 1.65;
}

/* Defenses */
.defense-list { display: flex; flex-direction: column; gap: .75rem; }
.defense-card {
  background: var(--green-l); border: 1px solid #a7f3d0;
  border-radius: 12px; padding: .875rem 1.125rem;
}
.defense-title { font-weight: 700; font-size: .9rem; color: #065f46; margin-bottom: .3rem; }
.defense-desc { font-size: .875rem; color: var(--ink-2); line-height: 1.65; }

/* Plans */
.plans-grid { display: flex; flex-direction: column; gap: .875rem; }
.plan-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden; box-shadow: var(--shadow);
  transition: box-shadow .2s;
}
.plan-card:hover { box-shadow: var(--shadow-md); }
.plan-header {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1.125rem; font-weight: 700; font-size: .9375rem;
  border-left: 4px solid; border-bottom: 1px solid var(--border);
  background: #fafafa;
}
.plan-tag {
  color: white; font-size: .7rem; font-weight: 700;
  padding: .2rem .625rem; border-radius: 999px; white-space: nowrap;
  letter-spacing: .02em;
}
.plan-body { padding: 1rem 1.125rem; font-size: .9rem; color: var(--ink-2); line-height: 1.75; }

/* ── Shimmer button ── */
.btn-shimmer {
  position: relative;
  overflow: hidden;
  font-size: 1.125rem !important;
  padding: 1.125rem 2rem !important;
  max-width: 420px !important;
  background: linear-gradient(135deg, var(--blue) 0%, #6366f1 100%) !important;
  box-shadow: 0 4px 20px rgba(79,70,229,.4) !important;
  animation: shimmer-glow 2s ease-in-out infinite;
}
.btn-shimmer::after {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent);
  animation: shimmer-slide 2.5s ease-in-out infinite;
}
.btn-shimmer:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 30px rgba(79,70,229,.5) !important;
}
@keyframes shimmer-slide {
  0% { left: -100%; }
  40%, 60% { left: 120%; }
  100% { left: 120%; }
}
@keyframes shimmer-glow {
  0%, 100% { box-shadow: 0 4px 20px rgba(79,70,229,.4); }
  50% { box-shadow: 0 6px 28px rgba(99,102,241,.55); }
}


/* ══════════════════════════════════════════
   Print / PDF export
   ══════════════════════════════════════════ */
@media print {
  nav, footer, .btn-primary, .btn-secondary, .btn-white, .btn-shimmer,
  .lawyer-cta, .disclaimer, #pay-modal, #pay-modal-bg,
  .spinner, .trust-row, .kw-tags {
    display: none !important;
  }
  body { background: #fff; color: #000; font-size: 13px; }
  .container { max-width: 100%; padding: 0; }
  .report-hero, .report-section, .plan-card, .defense-card, .case-item {
    box-shadow: none !important; border: 1px solid #ddd !important;
    page-break-inside: avoid;
  }
  .report-hero { flex-direction: row !important; }
  canvas { max-width: 180px; max-height: 180px; }
  h1, h2, h3, .section-title { color: #000 !important; }
  .report-label { color: #666 !important; }
  #report { display: block !important; }
  @page { margin: 1.5cm; }
}


/* ══════════════════════════════════════════
   Responsive
   ══════════════════════════════════════════ */
@media (max-width: 640px) {
  .hero { padding: 2.5rem 0 2rem; }
  .form-card { padding: 1.25rem; }
  .input-row { flex-direction: column; }
  .input-row .field-group { width: 100%; }
  .report-hero { flex-direction: column; padding: 1.25rem; }
  .report-hero-right { width: 100%; align-items: center; }
  .report-section { padding: 1.25rem; }
  .container { padding: 0 1rem; }
  nav { padding: 0 1rem; }
}
