/* Statement Analysis - public stylesheet */
:root {
  --bg: #f3f5f9;
  --surface: #ffffff;
  --text: #1f2933;
  --text-muted: #64748b;
  --primary: #1e3a8a;
  --primary-light: #3b82f6;
  --accent: #10b981;
  --warn: #f59e0b;
  --danger: #ef4444;
  --border: #e2e8f0;
  --shadow: 0 6px 24px rgba(15,33,72,.06);
  --radius: 12px;
}
*,*::before,*::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary-light); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--text-muted); }
small { color: var(--text-muted); }
img { max-width: 100%; height: auto; }
hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }
h1,h2,h3,h4 { color: #0f2148; line-height: 1.25; margin-top: 0; }
h1 { font-size: 32px; }
h2 { font-size: 24px; }
h3 { font-size: 18px; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.main { padding: 32px 20px 60px; min-height: 60vh; }

/* Header */
.site-header {
  background: white;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; }
.brand { display: flex; align-items: center; gap: 10px; color: #0f2148; font-weight: 700; font-size: 18px; }
.brand:hover { text-decoration: none; }
.brand .logo {
  width: 36px; height: 36px; border-radius: 8px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: white; font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.nav-links { display: flex; gap: 18px; align-items: center; }
.nav-links a { color: #334155; font-weight: 500; }
.nav-links a.muted { color: var(--text-muted); font-weight: 400; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: white;
  padding: 24px 0;
  color: var(--text-muted);
  font-size: 14px;
}
.site-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* Hero */
.hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  color: white;
  padding: 64px 20px 80px;
  text-align: center;
  border-radius: var(--radius);
  margin-bottom: 32px;
}
.hero h1 { color: white; font-size: 40px; margin-bottom: 14px; }
.hero p { font-size: 18px; opacity: .92; max-width: 640px; margin: 0 auto 24px; }
.hero .btn-primary { background: white; color: var(--primary); }
.hero .btn-primary:hover { background: #f1f5f9; }

/* Buttons */
.btn {
  display: inline-block; padding: 11px 20px; border-radius: 8px;
  background: #e2e8f0; color: #0f2148; font-weight: 600;
  border: none; cursor: pointer; text-decoration: none; font-size: 15px;
  transition: all .15s ease;
}
.btn:hover { background: #cbd5e1; text-decoration: none; }
.btn-primary { background: var(--primary-light); color: white; }
.btn-primary:hover { background: var(--primary); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; color: white; }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-link { background: none; color: var(--primary-light); padding: 0; }

/* Cards */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.card h2 { margin-top: 0; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: white;
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary-light);
}
.stat-card .label { color: var(--text-muted); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.stat-card .value { font-size: 26px; font-weight: 700; color: #0f2148; margin-top: 6px; }
.stat-card .sub { color: var(--text-muted); font-size: 13px; margin-top: 4px; }
.stat-card.accent  { border-left-color: var(--accent); }
.stat-card.warn    { border-left-color: var(--warn); }
.stat-card.danger  { border-left-color: var(--danger); }

/* How-it-works */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.step-card {
  background: white;
  padding: 22px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.step-card .num {
  display: inline-flex; width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary-light); color: white; font-weight: 700;
  align-items: center; justify-content: center; margin-bottom: 12px;
}

/* Forms */
form label {
  display: block;
  margin-bottom: 14px;
  font-weight: 500;
  color: #334155;
  font-size: 14px;
}
form label small { font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=url],
input[type=number], select, textarea {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 15px;
  margin-top: 6px;
  background: #fafbfc;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-light);
  background: white;
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
textarea { min-height: 100px; resize: vertical; }

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-weight: 500;
  font-size: 14px;
}
.alert-success { background: #d1fae5; color: #065f46; }
.alert-error   { background: #fee2e2; color: #991b1b; }
.alert-warning { background: #fef3c7; color: #92400e; }
.alert-info    { background: #dbeafe; color: #1e40af; }

/* Drag & drop upload */
.dropzone {
  border: 2px dashed #94a3b8;
  border-radius: var(--radius);
  padding: 56px 20px;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: all .15s ease;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary-light);
  background: #eff6ff;
}
.dropzone .icon {
  font-size: 48px;
  color: var(--primary-light);
  margin-bottom: 8px;
}
.dropzone .hint { color: var(--text-muted); font-size: 14px; margin-top: 4px; }
.dropzone input[type=file] { display: none; }
#progress {
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 16px;
  display: none;
}
#progress > div {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-light), var(--accent));
  width: 0%;
  transition: width .2s ease;
}

/* Tables */
.table {
  width: 100%;
  background: white;
  border-collapse: collapse;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.table th, .table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.table th {
  background: #f8fafc;
  font-weight: 600;
  color: #475569;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #fafbfc; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Badges */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.badge-blue   { background: #dbeafe; color: #1e40af; }
.badge-green  { background: #d1fae5; color: #065f46; }
.badge-orange { background: #fef3c7; color: #92400e; }
.badge-grey   { background: #e2e8f0; color: #475569; }
.badge-red    { background: #fee2e2; color: #991b1b; }

/* Plain summary callouts */
.plain-summary {
  background: linear-gradient(135deg, #eff6ff, #ede9fe);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 24px;
}
.plain-summary ul { padding-left: 20px; margin: 0; }
.plain-summary li { padding: 6px 0; font-size: 17px; color: #1e293b; }

/* Statement comparison view */
.statement-summary .summary-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.statement-summary .summary-head .pill {
  background: #eef2ff; color: #3730a3;
  padding: 4px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
}
.statement-summary .summary-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.statement-summary .summary-stats .stat {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}
.statement-summary .summary-stats .stat .label {
  font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-muted); font-weight: 600;
}
.statement-summary .summary-stats .stat .value {
  font-size: 22px; font-weight: 700; color: #0f2148; margin-top: 4px;
}
.statement-summary .summary-stats .stat .sub {
  font-size: 12px; color: var(--text-muted); margin-top: 2px;
}
.statement-summary .summary-stats .stat .sub .hint {
  display: inline-block;
  margin-left: 4px;
  font-style: italic;
  color: #94a3b8;
}
.pricing-equation {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 14px;
}
.pricing-equation strong { color: #0f2148; }
.analysis-note {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 13px;
}

.compare-table th.num, .compare-table td.num,
.fee-table th.num, .fee-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.compare-table td.current { color: #047857; font-weight: 600; }
.compare-table .row-total td, .fee-table .row-total td {
  font-weight: 700; background: #f1f5f9;
}
.fee-table { font-size: 13px; }
.grand-total {
  text-align: right; padding: 14px 4px 0; font-size: 16px;
}

/* Responsive */
@media (max-width: 700px) {
  .hero { padding: 40px 20px 50px; }
  .hero h1 { font-size: 28px; }
  h1 { font-size: 24px; }
  .nav-links { gap: 12px; font-size: 14px; }
  .brand-text { display: none; }
  .card { padding: 18px; }
  .stat-card .value { font-size: 22px; }
  .table th, .table td { padding: 10px 8px; font-size: 13px; }
  .statement-summary .summary-stats { grid-template-columns: 1fr 1fr; }
}
