:root{
  --bg:#ffffff;
  --fg:#1a1a1a;
  --muted:#6b7280;
  --card:#ffffff;
  --accent:#3b82f6;
  --add-bg:#f0f9f0;
  --add-bd:#22c55e;
  --del-bg:#fef2f2;
  --del-bd:#ef4444;
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family:system-ui,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
  background:linear-gradient(180deg,#f8fafc,#f1f5f9);
  color:var(--fg);
  line-height:1.35;
}
header{
  max-width:980px;
  margin:32px auto 16px;
  padding:0;
}
main{
  max-width:980px;
  margin:12px auto 48px;
  padding:0;
}
.card-container{padding:0 16px}
.logo{
  display:flex;
  align-items:center;
  gap:16px;
  background:var(--card);
  border:1px solid #e5e7eb;
  padding:16px 24px;
  border-radius:16px;
  box-shadow:0 10px 25px rgba(15,23,42,.08);
  width:100%;
  flex-wrap:wrap;
}
.logo-brand{
  display:inline-flex;
  align-items:center;
  gap:16px;
  text-decoration:none;
  color:inherit;
  flex:1 1 auto;
  min-width:260px;
}
.logo img{
  width:64px;
  height:64px;
  object-fit:cover;
  border-radius:14px;
  box-shadow:0 8px 16px rgba(15,23,42,.12);
  border:4px solid rgba(255,255,255,.9);
}
.logo-text h1{
  margin:0;
  font-size:clamp(22px,2.6vw,30px);
  color:#111827;
  font-weight:600;
}
.logo-text p{
  margin:4px 0 0;
  font-size:15px;
  color:#4b5563;
}
.logo-links{
  display:flex;
  gap:16px;
  font-size:14px;
  align-items:center;
}
.logo-links a{
  color:#2563eb;
  text-decoration:none;
  font-weight:600;
}
.logo-links a:hover,
.logo-links a.active{
  text-decoration:underline;
}
.hero{
  max-width:980px;
  margin:24px auto 16px;
  padding:36px 32px;
  background:#fff;
  border-radius:18px;
  border:1px solid #e5e7eb;
  display:flex;
  gap:32px;
  align-items:center;
  flex-wrap:wrap;
  box-shadow:0 10px 30px rgba(15,23,42,.08);
  position:relative;
  overflow:hidden;
}
.hero::before{
  content:'';
  position:absolute;
  inset:0;
  border-radius:18px;
  border:2px solid rgba(59,130,246,.15);
  pointer-events:none;
}
.hero::after{
  content:'';
  position:absolute;
  top:0;
  left:0;
  width:6px;
  height:100%;
  background:linear-gradient(180deg,#3b82f6,#6366f1);
  border-radius:18px 0 0 18px;
}
.hero-content{flex:1 1 300px}
.hero-content h2{
  margin:0 0 8px;
  font-size:clamp(18px,2vw,24px);
  color:#111827;
  font-weight:600;
}
.hero-content p{
  margin:0 0 16px;
  color:#4b5563;
  font-size:15px;
  line-height:1.45;
}
.hero-pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 10px;
  border-radius:999px;
  background:rgba(59,130,246,.12);
  color:#1d4ed8;
  font-size:13px;
  font-weight:600;
  margin-bottom:12px;
}
.hero-content ul{
  margin:0;
  padding:0;
  list-style:none;
  display:grid;
  gap:10px;
}
.hero-content li{
  display:flex;
  align-items:flex-start;
  gap:10px;
  color:#1f2937;
  font-size:14px;
  line-height:1.4;
}
.hero-content li::before{
  content:'';
  width:10px;
  height:10px;
  border-radius:50%;
  background:linear-gradient(180deg,#3b82f6,#6366f1);
  margin-top:5px;
}
.hero-image{
  flex:1 1 260px;
  min-width:240px;
  text-align:center;
  position:relative;
}
.hero-image::after{
  content:'';
  position:absolute;
  inset:10%;
  background:radial-gradient(circle at 50% 20%,rgba(99,102,241,.25),rgba(99,102,241,0));
  filter:blur(8px);
  z-index:-1;
}
.hero-image img{
  max-width:100%;
  height:auto;
  border-radius:16px;
  box-shadow:0 25px 55px rgba(15,23,42,.25);
  border:8px solid rgba(255,255,255,.9);
}
.card{
  background:var(--card);
  border:1px solid #e5e7eb;
  border-radius:14px;
  box-shadow:0 10px 30px rgba(0,0,0,.08);
  overflow:hidden;
}
.uploader{display:grid;gap:12px;padding:16px;border-bottom:1px solid #e5e7eb}
.row{display:flex;gap:12px;flex-wrap:wrap}
input[type=file]{
  flex:1 1 260px;
  padding:10px;
  background:#f9fafb;
  color:var(--fg);
  border:1px dashed #d1d5db;
  border-radius:10px;
}
button{
  background:var(--accent);
  color:#fff;
  border:0;
  padding:10px 14px;
  border-radius:10px;
  cursor:pointer;
  font-weight:600;
}
.toolbar{
  display:flex;
  gap:8px;
  align-items:center;
  padding:12px 16px;
}
.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:13px;
  color:var(--muted);
}
.dot{width:10px;height:10px;border-radius:50%}
.dot.add{background:var(--add-bd)}
.dot.del{background:var(--del-bd)}
.status{
  margin-left:auto;
  font-size:13px;
  color:var(--muted);
  display:flex;
  align-items:center;
  gap:8px;
}
.spinner{
  width:16px;
  height:16px;
  border:2px solid #e5e7eb;
  border-top-color:var(--accent);
  border-radius:50%;
  animation:spin .8s linear infinite;
  display:none;
}
@keyframes spin{to{transform:rotate(360deg)}}
.table-wrap{overflow:auto}
table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  min-width:700px;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:13px;
}
thead th{
  position:sticky;
  top:0;
  background:#f8fafc;
  z-index:1;
  text-align:left;
  padding:10px 12px;
  border-bottom:1px solid #e5e7eb;
}
tbody td{
  vertical-align:top;
  padding:0;
  border-bottom:1px solid #f3f4f6;
}
.cell{
  padding:10px 12px;
  white-space:pre-wrap;
  word-break:break-word;
}
.del{background:var(--del-bg);border-left:3px solid var(--del-bd)}
.add{background:var(--add-bg);border-left:3px solid var(--add-bd)}
.empty{color:#000;font-style:italic}
details.hraw{border-top:1px solid #e5e7eb}
details.hraw summary{cursor:pointer;padding:12px 16px;color:var(--muted)}
pre.raw{margin:0;padding:16px;background:#f8fafc;color:#374151;white-space:pre-wrap}
.field-analysis{border-top:1px solid #e5e7eb;padding:12px 16px 16px}
.field-analysis-title{margin:0 0 4px;font-size:16px;font-weight:600;color:var(--fg)}
.field-columns{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
.field-column{background:#f9fafb;border:1px solid #e5e7eb;border-radius:12px;padding:12px}
.field-column h4{margin:0 0 8px;font-size:15px;font-weight:600;color:var(--fg)}
.field-list{list-style:none;margin:0;padding:0}
.field-list li{margin:0 0 6px;padding:6px 8px;border:1px solid #e5e7eb;border-radius:10px;background:#fff;font-size:13px;color:#111827}
.field-list li:last-child{margin-bottom:0}
.field-list .empty{border:none;background:none;padding:0;font-style:italic;color:var(--muted)}
.fieldnote{margin:0 0 12px;color:var(--muted);font-size:13px}
.field-block{background:#fff;border:1px solid #e5e7eb;border-radius:10px;padding:10px;box-shadow:inset 0 1px 0 rgba(255,255,255,.4);display:flex;flex-direction:column;gap:6px}
.field-title{font-weight:600;color:#111827;font-size:14px}
.field-line{display:flex;gap:8px;font-size:13px;line-height:1.35}
.field-key{color:#6b7280;flex:0 0 130px;font-weight:500}
.field-value{flex:1;color:#111827}
.field-line.diff .field-value{font-weight:600;color:#b91c1c}
.cell.add .field-line.diff .field-value{color:#15803d}
.field-line.empty{font-style:italic;color:#9ca3af}
#verapdf-output{font-size:14px;color:#111827;line-height:1.45}
#verapdf-output h2,
#verapdf-output h3{margin:0 0 12px;font-weight:600;color:#111827}
#verapdf-output p{margin:0 0 10px}
#verapdf-output table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  margin:8px 0;
  border:1px solid #e5e7eb;
  border-radius:10px;
  overflow:hidden;
  font-size:13px;
}
#verapdf-output th{
  background:#f8fafc;
  text-align:left;
  padding:8px 10px;
  border-bottom:1px solid #e5e7eb;
}
#verapdf-output td{
  padding:8px 10px;
  border-bottom:1px solid #f3f4f6;
}
#verapdf-output tr:last-child td{border-bottom:none}
#verapdf-output .section{margin-top:16px;padding-top:8px;border-top:1px solid #e5e7eb}
.page-card{
  padding:32px 24px;
  background:var(--card);
  border-radius:16px;
  border:1px solid #e5e7eb;
  box-shadow:0 10px 30px rgba(0,0,0,.08);
}
.page-card h1{margin-top:0}
.page-card h2{margin-top:2rem;font-size:1.2rem}
.page-card a{color:#3b82f6;word-break:break-all}
.page-card ul{padding-left:18px}
@media (max-width:640px){
  header,
  main{padding:0 16px}
  .hero{margin:16px auto;padding:28px 20px}
  .field-line{flex-direction:column;gap:2px}
  .field-key{flex:none}
  .logo-links{width:100%;justify-content:flex-end}
}
