:root {
  --bg: #0d0b12;
  --surface: rgba(24, 19, 34, .92);
  --surface-2: #17121f;
  --surface-soft: #21172c;
  --white: #ffffff;
  --ink: #f8f7fb;
  --muted: #aaa4b5;
  --line: rgba(255,255,255,.10);
  --purple: #6f35a2;
  --purple-light: #9e62d2;
  --purple-deep: #3e1f5b;
  --green: #00a65a;
  --green-light: #29d67e;
  --green-deep: #006b3b;
  --success: #30d982;
  --warning-bg: rgba(245, 158, 11, .10);
  --warning-line: rgba(245, 158, 11, .35);
  --warning-ink: #ffd18a;
  --shadow: 0 24px 70px rgba(0,0,0,.34);
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 4%, rgba(111,53,162,.22), transparent 28rem),
    radial-gradient(circle at 92% 10%, rgba(0,166,90,.14), transparent 30rem),
    linear-gradient(180deg, #0c0911 0%, #110d17 46%, #0c0a10 100%);
}
button, input, a { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.page-glow {
  position: fixed;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  filter: blur(95px);
  opacity: .18;
  z-index: -1;
  pointer-events: none;
}
.page-glow-one { background: var(--purple); top: 20%; left: -220px; }
.page-glow-two { background: var(--green); top: 58%; right: -240px; }

.topbar {
  min-height: 88px;
  padding: 14px clamp(18px, 4vw, 54px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  background: rgba(9,7,13,.78);
  border-bottom: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand-wrap { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-logo {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(41,214,126,.70);
  box-shadow: 0 0 0 4px rgba(111,53,162,.20), 0 8px 26px rgba(0,0,0,.35);
}
.brand-copy { min-width: 0; }
.brand-school {
  color: var(--green-light);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .18em;
}
.topbar h1 {
  margin: 4px 0 0;
  color: white;
  font-size: clamp(.98rem, 2vw, 1.16rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.privacy-pill, .local-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  font-weight: 700;
  color: #d9d5df;
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.10);
}
.privacy-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-light);
  box-shadow: 0 0 0 5px rgba(41,214,126,.12);
}

.shell { width: min(1160px, calc(100% - 30px)); margin: 32px auto 50px; }
.card {
  background: linear-gradient(180deg, rgba(28,22,39,.96), rgba(19,15,27,.96));
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-card {
  position: relative;
  padding: clamp(28px, 5vw, 58px);
  display: grid;
  grid-template-columns: 1.35fr .72fr;
  gap: 44px;
  align-items: center;
  background:
    linear-gradient(120deg, rgba(26,18,37,.97), rgba(15,14,21,.97)),
    linear-gradient(90deg, rgba(111,53,162,.3), rgba(0,166,90,.2));
}
.hero-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--green), var(--purple-light), var(--green));
}
.hero-card::after {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(111,53,162,.20), transparent 67%);
  right: 120px;
  top: -110px;
  pointer-events: none;
}
.hero-copy { position: relative; z-index: 1; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: .66rem;
  font-weight: 900;
  letter-spacing: .13em;
  border: 1px solid transparent;
}
.badge-green { color: #92ffc5; background: rgba(0,166,90,.12); border-color: rgba(41,214,126,.22); }
.badge-purple { color: #dcb4ff; background: rgba(111,53,162,.16); border-color: rgba(158,98,210,.25); }
.hero h2 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(2.2rem, 5.5vw, 4.4rem);
  line-height: .98;
  letter-spacing: -.045em;
  color: white;
}
.hero h2 span {
  color: transparent;
  background: linear-gradient(90deg, #d7b2fa 5%, #72eda9 95%);
  -webkit-background-clip: text;
  background-clip: text;
}
.lede {
  color: #bbb5c5;
  max-width: 720px;
  line-height: 1.7;
  font-size: clamp(.98rem, 1.8vw, 1.1rem);
  margin: 22px 0 0;
}
.hero-trust {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 30px;
  max-width: 660px;
}
.hero-trust div {
  padding: 13px 14px;
  border: 1px solid rgba(255,255,255,.09);
  background: rgba(255,255,255,.035);
  border-radius: 15px;
}
.hero-trust strong { display: block; color: var(--green-light); font-size: .75rem; letter-spacing: .08em; }
.hero-trust span { display: block; color: white; margin-top: 4px; font-weight: 800; font-size: .88rem; }

.hero-logo-panel {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 330px;
}
.logo-halo {
  position: absolute;
  width: 92%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(41,214,126,.19), rgba(111,53,162,.13) 45%, transparent 68%);
  filter: blur(3px);
}
.hero-logo {
  position: relative;
  width: min(315px, 92%);
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,.12);
  box-shadow:
    0 0 0 8px rgba(0,166,90,.08),
    0 0 0 14px rgba(111,53,162,.07),
    0 30px 60px rgba(0,0,0,.42);
}
.hero-logo-caption {
  position: relative;
  margin-top: -14px;
  padding: 10px 18px;
  min-width: 210px;
  text-align: center;
  border-radius: 999px;
  background: rgba(13,11,18,.82);
  border: 1px solid rgba(255,255,255,.11);
  backdrop-filter: blur(12px);
}
.hero-logo-caption span { color: #aaa4b5; font-size: .72rem; }
.hero-logo-caption strong { display: block; color: white; margin-top: 2px; font-size: .88rem; }

.uploader-card { margin-top: 22px; padding: clamp(22px, 4vw, 36px); }
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 20px;
}
.eyebrow {
  margin: 0 0 7px;
  font-size: .69rem;
  letter-spacing: .16em;
  font-weight: 900;
  color: var(--green-light);
}
.section-heading h2, .result-header h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); color: white; }

.drop-zone {
  position: relative;
  border: 1.5px dashed rgba(158,98,210,.46);
  border-radius: 22px;
  padding: 44px 22px;
  text-align: center;
  cursor: pointer;
  transition: .22s ease;
  background:
    radial-gradient(circle at 50% -20%, rgba(111,53,162,.14), transparent 45%),
    rgba(255,255,255,.025);
}
.drop-zone::after {
  content: "";
  position: absolute;
  inset: 8px;
  pointer-events: none;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.025);
}
.drop-zone:hover, .drop-zone.dragging, .drop-zone:focus-visible {
  border-color: var(--green-light);
  background:
    radial-gradient(circle at 50% -20%, rgba(0,166,90,.18), transparent 46%),
    rgba(255,255,255,.04);
  outline: none;
  transform: translateY(-1px);
}
.upload-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  color: #aef8cf;
  background: linear-gradient(145deg, rgba(0,166,90,.18), rgba(111,53,162,.20));
  border: 1px solid rgba(41,214,126,.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07);
}
.drop-zone h3 { margin: 0 0 7px; color: white; font-size: clamp(1.12rem, 2vw, 1.3rem); }
.drop-zone p { margin: 0 0 20px; color: var(--muted); }

.button {
  border: 0;
  border-radius: 13px;
  padding: 12px 17px;
  font-weight: 850;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  text-decoration: none;
  transition: .16s ease;
  min-height: 46px;
}
.button:disabled { opacity: .38; cursor: not-allowed; transform: none !important; }
.button.primary {
  color: white;
  background: linear-gradient(110deg, var(--green-deep), var(--green), #12bb6b);
  box-shadow: 0 12px 28px rgba(0,166,90,.18), inset 0 1px 0 rgba(255,255,255,.14);
}
.button.primary:not(:disabled):hover { transform: translateY(-2px); filter: brightness(1.06); }
.button.secondary {
  color: #f4f0f8;
  background: rgba(255,255,255,.065);
  border: 1px solid rgba(255,255,255,.10);
}
.button.secondary:hover { background: rgba(255,255,255,.10); transform: translateY(-1px); }

.action-row { display: flex; justify-content: center; margin-top: 21px; }
.translate-button { min-width: min(320px, 100%); font-size: 1rem; padding-inline: 23px; }
.file-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  margin-top: 15px;
  border-radius: 15px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
}
.file-summary-left { display: flex; align-items: center; min-width: 0; gap: 12px; }
.file-icon {
  flex: 0 0 auto;
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, var(--purple), var(--purple-deep));
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .05em;
}
.file-summary strong, .file-summary span { display: block; overflow: hidden; text-overflow: ellipsis; }
.file-summary strong { white-space: nowrap; color: white; }
.file-summary span { color: var(--muted); font-size: .81rem; margin-top: 3px; }
.text-button { border: 0; background: transparent; color: #b883e5; font-weight: 850; cursor: pointer; white-space: nowrap; }
.text-button:hover { color: #d7b2fa; }

.status {
  margin-top: 22px;
  padding: 19px;
  border-radius: 16px;
  background: rgba(255,255,255,.035);
  border: 1px solid var(--line);
}
.status-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.status-top strong { color: white; }
#statusPercent { color: var(--green-light); font-weight: 850; }
.status p { color: var(--muted); margin: 8px 0 0; font-size: .9rem; }
.progress-track { height: 9px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: 12px; }
.progress-bar { width: 0%; height: 100%; background: linear-gradient(90deg, var(--purple-light), var(--green-light)); transition: width .25s ease; border-radius: inherit; }
.warning { margin-top: 18px; padding: 15px 17px; border-radius: 13px; background: var(--warning-bg); border: 1px solid var(--warning-line); color: var(--warning-ink); line-height: 1.55; }

.result-card { margin-top: 22px; padding: clamp(22px, 3.5vw, 32px); }
.result-card::before { content: ""; display: block; height: 3px; margin: -32px -32px 27px; background: linear-gradient(90deg, var(--green), var(--purple-light)); }
.result-header { display: flex; justify-content: space-between; gap: 22px; align-items: flex-end; margin-bottom: 18px; }
.result-header p:not(.eyebrow) { color: var(--muted); margin: 8px 0 0; }
.success-eyebrow { color: var(--success); }
.result-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
#pdfPreview {
  width: 100%;
  min-height: 720px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 17px;
  background: #e9edf3;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.10);
}

.support-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 22px; }
.mini-card {
  padding: 20px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 13px;
  border-radius: 20px;
  box-shadow: 0 14px 34px rgba(0,0,0,.20);
}
.mini-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 900;
}
.mini-icon.green { color: #a7ffd0; background: rgba(0,166,90,.13); border: 1px solid rgba(41,214,126,.20); }
.mini-icon.purple { color: #e0bbff; background: rgba(111,53,162,.18); border: 1px solid rgba(158,98,210,.22); }
.mini-card h3 { color: white; margin: 1px 0 7px; font-size: .98rem; }
.mini-card p { color: var(--muted); line-height: 1.52; margin: 0; font-size: .86rem; }

footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  color: #7f7988;
  font-size: .8rem;
  padding: 0 16px 34px;
}
footer img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; opacity: .75; }
.hidden { display: none !important; }

@media (max-width: 860px) {
  .hero-card { grid-template-columns: 1fr; gap: 26px; }
  .hero-logo-panel { min-height: auto; padding-top: 4px; }
  .hero-logo { width: min(245px, 72vw); }
  .support-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .topbar { min-height: 74px; padding-inline: 15px; }
  .brand-logo { width: 48px; height: 48px; }
  .brand-school { font-size: .58rem; }
  .topbar h1 { font-size: .92rem; }
  .privacy-pill { display: none; }
  .shell { width: min(100% - 18px, 1160px); margin-top: 16px; }
  .hero-card, .uploader-card, .result-card { border-radius: 20px; }
  .hero-card { padding: 27px 21px 30px; }
  .hero h2 { font-size: clamp(2rem, 12vw, 3.1rem); }
  .hero-trust { grid-template-columns: repeat(2, 1fr); }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .local-chip { font-size: .76rem; }
  .drop-zone { padding: 34px 16px; }
  .file-summary { align-items: flex-start; }
  .result-header { align-items: flex-start; flex-direction: column; }
  .result-actions { justify-content: flex-start; width: 100%; }
  .result-actions .button { flex: 1 1 100%; }
  #pdfPreview { min-height: 540px; }
  footer { align-items: flex-start; }
}
