:root{
  --bg:#ffffff;
  --bg2:#fafafa;
  --fg:#111827;
  --muted:#6b7280;
  --border:#e5e7eb;
  --card:#ffffff;
  --shadow: 0 10px 35px rgba(0,0,0,0.07);
  --shadow2: 0 6px 18px rgba(0,0,0,0.06);
  --radius: 18px;
  --radius2: 14px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  color:var(--fg);
  background:
    radial-gradient(1200px 600px at 20% 0%, #ffffff 0%, #fbfbfb 45%, #f7f7f7 100%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

.wrap{
  max-width: 1120px;
  margin: 0 auto;
  padding: 26px 22px;
}

@media (max-width: 520px){
  .wrap{ padding: 22px 16px; }
}

.muted{ color:var(--muted); }
.small{ font-size: 12px; }

/* ===== Header / Brand ===== */
header.wrap{
  padding-top: 28px;
  padding-bottom: 10px;
}

.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  margin-bottom: 18px;
}

.brand{
  display:flex;
  gap:12px;
  align-items:center;
  text-decoration:none;
  color:inherit;
}

.mark{
  width:44px;
  height:44px;
  border:1px solid var(--border);
  border-radius: 16px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 900;
  letter-spacing: 0.3px;
  background: #fff;
  box-shadow: var(--shadow2);
}

.brandText{ line-height: 1.05; }
.brandName{
  font-weight: 900;
  letter-spacing: 0.2px;
  font-size: 14px;
}
.brandTag{
  font-size: 12px;
  margin-top: 3px;
}

.nav{ display:flex; gap:10px; align-items:center; }
.navLink{
  font-size: 13px;
  font-weight: 800;
  text-decoration:none;
  color:inherit;
  border:1px solid var(--border);
  padding: 9px 11px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.navLink:hover{
  transform: translateY(-1px);
  box-shadow: var(--shadow2);
}

.hero{
  padding: 8px 0 6px;
}
.hero h1{
  margin: 0 0 6px 0;
  font-size: 30px;
  letter-spacing: -0.4px;
}
.hero p{
  margin: 0;
  max-width: 70ch;
  line-height: 1.45;
  font-size: 14px;
}

/* ===== Layout / Cards ===== */
.grid{
  display:grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 18px;
  align-items:start;
}

@media (max-width: 920px){
  .grid{ grid-template-columns: 1fr; }
}

.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

h2{
  margin: 0 0 12px 0;
  font-size: 18px;
  letter-spacing: -0.1px;
}

h3.subhead{
  margin: 18px 0 8px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 800;
  letter-spacing: 0.2px;
}

.row{ margin: 12px 0; }
.label{
  display:block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 7px;
  font-weight: 700;
}

.hint{
  font-size: 12px;
  margin-top: 6px;
}

/* ===== Inputs ===== */
textarea{
  width:100%;
  min-height: 230px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12.6px;
  line-height: 1.4;
  resize: vertical;
  outline: none;
  transition: box-shadow 120ms ease, border-color 120ms ease;
}

textarea:focus{
  border-color: #d1d5db;
  box-shadow: 0 0 0 4px rgba(17,24,39,0.05);
}

input[type="file"]{
  width:100%;
  padding: 11px 12px;
  border: 1px dashed #d6dae1;
  border-radius: 14px;
  background:#fcfcfc;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

input[type="file"]:hover{
  border-color: #cfd4dc;
}

.sampleRow{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

select{
  padding: 10px 12px;
  border:1px solid var(--border);
  border-radius: 14px;
  background:#fff;
  font-weight: 800;
  font-size: 13px;
  min-width: 280px;
  outline:none;
  transition: box-shadow 120ms ease, border-color 120ms ease;
}
select:focus{
  border-color:#d1d5db;
  box-shadow: 0 0 0 4px rgba(17,24,39,0.05);
}

/* ===== Buttons ===== */
.actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.btn{
  border:1px solid var(--border);
  background:#fff;
  padding: 10px 12px;
  border-radius: 14px;
  cursor:pointer;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.1px;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}

.btn:hover{
  transform: translateY(-1px);
  box-shadow: var(--shadow2);
}

.btn:active{
  transform: translateY(0px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}

.btn.primary{
  border-color:#111827;
}

.btn.secondary{
  background:#fbfbfb;
}

.btn:disabled{
  opacity: 0.5;
  cursor:not-allowed;
  transform:none;
  box-shadow:none;
}

/* ===== Status / Notes ===== */
.status{
  padding: 10px 12px;
  border:1px solid var(--border);
  border-radius: 14px;
  background:#fcfcfc;
  font-size: 13px;
  line-height: 1.35;
}

.details{
  margin-top: 12px;
  border-top:1px solid var(--border);
  padding-top: 12px;
}

details summary{
  cursor:pointer;
  font-weight: 900;
  color: var(--muted);
}

details ul{
  margin: 10px 0 0 18px;
  padding: 0;
  line-height: 1.5;
  font-size: 13px;
  color: #374151;
}

code{
  background: #f3f4f6;
  border:1px solid #e5e7eb;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 12px;
}

/* ===== Metrics ===== */
.results{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

@media (max-width: 540px){
  .results{ grid-template-columns: 1fr; }
}

.metric{
  border:1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  background:#fff;
}

.metric .k{
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
  font-weight: 800;
  letter-spacing: 0.15px;
}

.metric .v{
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.1px;
}

/* ===== Table ===== */
.tableWrap{
  border:1px solid var(--border);
  border-radius: 14px;
  overflow:auto;
  max-height: 280px;
  background:#fff;
}

table{
  width:100%;
  border-collapse: collapse;
  font-size: 12.6px;
}

thead th{
  position: sticky;
  top:0;
  background:#fafafa;
  border-bottom:1px solid var(--border);
  padding: 10px 10px;
  text-align:left;
  font-weight: 900;
  color: #374151;
}

tbody td{
  border-bottom:1px solid var(--border);
  padding: 8px 10px;
  vertical-align: top;
  color: #111827;
}

tbody tr:hover td{
  background: #fcfcfc;
}

.right{ text-align:right; }

/* ===== Privacy Note ===== */
.privacyNote{
  margin-top: 12px;
  border:1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  background:#fcfcfc;
  font-size: 13px;
  line-height: 1.35;
}

/* ===== Footer ===== */
footer.wrap.footer{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 12px;
  border-top:1px solid var(--border);
  padding-top: 16px;
  margin-top: 22px;
  font-size: 12px;
}

.footerLeft, .footerRight{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap: 6px;
}

.footerLink{
  color:inherit;
  text-decoration:none;
  font-weight: 900;
}

.footerLink:hover{
  text-decoration: underline;
}

.dot{
  opacity:0.5;
  margin: 0 2px;
}
