:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --ink: #17202a;
  --muted: #5d6876;
  --line: #dfe5ec;
  --brand: #0f766e;
  --brand-dark: #115e59;
  --accent: #b45309;
  --danger: #b42318;
  --success: #137333;
  --shadow: 0 18px 45px rgba(23, 32, 42, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

a {
  color: var(--brand-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem clamp(1rem, 4vw, 3rem);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 0.82rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--ink);
  font-weight: 650;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 0.55rem 0.8rem;
}

.page-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.hero,
.tool-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 2rem;
  align-items: center;
  padding: clamp(2rem, 5vw, 4.5rem) 0 2rem;
}

.hero h1,
.tool-hero h1 {
  max-width: 780px;
  margin: 0 0 1rem;
  font-size: clamp(2.1rem, 5vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.hero p,
.tool-hero p {
  max-width: 740px;
  color: var(--muted);
  font-size: 1.08rem;
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--accent);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.hero-panel,
.trust-list,
.result-panel,
.upload-panel,
.faq-panel,
.contact-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-panel,
.trust-list {
  display: grid;
  gap: 0.75rem;
  padding: 1.2rem;
}

.hero-panel span,
.trust-list span {
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  font-weight: 700;
}

.tool-search {
  display: grid;
  gap: 0.45rem;
  max-width: 620px;
  margin-top: 1.5rem;
}

.tool-search label,
.field span {
  font-weight: 750;
}

.tool-search input,
.field input,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0.85rem 1rem;
}

.tool-section {
  padding: 2rem 0;
}

.tool-section.compact {
  padding-top: 0;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: end;
  margin-bottom: 1rem;
}

.section-heading h2,
.content-band h2,
.article-layout h2,
.legal-page h2,
.faq-panel h2 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.2;
}

.section-heading p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
}

.tool-card {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 0.55rem;
  min-height: 172px;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}

.tool-card:hover {
  text-decoration: none;
  border-color: rgba(15, 118, 110, 0.45);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.tool-icon {
  display: inline-grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 8px;
  background: #e6f4f1;
  color: var(--brand-dark);
  font-weight: 800;
}

.tool-title {
  font-weight: 800;
}

.tool-desc {
  color: var(--muted);
  font-size: 0.94rem;
}

.content-band,
.legal-page {
  margin: 2rem 0;
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 1.25rem;
  align-items: start;
  margin: 1rem 0 2rem;
}

.upload-panel,
.result-panel {
  padding: 1rem;
}

.drop-zone {
  display: grid;
  gap: 0.7rem;
  min-height: 240px;
  align-content: center;
  justify-items: center;
  text-align: center;
  border: 2px dashed #b8c5d1;
  border-radius: 8px;
  padding: 1.5rem;
  background: #fbfcfd;
}

.drop-zone.is-dragover {
  border-color: var(--brand);
  background: #edfdf9;
}

.drop-zone label,
.primary-button,
.download-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  padding: 0.75rem 1.1rem;
  font-weight: 800;
  cursor: pointer;
}

.drop-zone input[type="file"] {
  width: 1px;
  height: 1px;
  opacity: 0;
  position: absolute;
}

.drop-zone p,
.drop-zone output,
.field small,
.message small {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.primary-button {
  width: 100%;
  margin-top: 1rem;
}

.download-button:hover,
.primary-button:hover,
.drop-zone label:hover {
  background: var(--brand-dark);
  text-decoration: none;
}

.message {
  display: grid;
  gap: 0.6rem;
  padding: 1rem;
  border-radius: 8px;
}

.message.error {
  color: var(--danger);
  background: #fff2f0;
}

.message.success {
  color: var(--success);
  background: #eef8f0;
}

.message.neutral {
  background: #f7f9fb;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 1.25rem;
  align-items: start;
}

.article-layout article,
.faq-panel {
  padding: clamp(1rem, 3vw, 1.5rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.article-layout article h2:not(:first-child) {
  margin-top: 1.5rem;
}

details {
  border-top: 1px solid var(--line);
  padding: 0.85rem 0;
}

summary {
  cursor: pointer;
  font-weight: 750;
}

.contact-box {
  display: grid;
  gap: 0.25rem;
  padding: 1rem;
  margin: 1rem 0;
}

.site-footer {
  padding: 2rem clamp(1rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
  background: #111827;
  color: #d7dde6;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 1.5rem;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.site-footer h2 {
  margin: 0 0 0.6rem;
  font-size: 1rem;
}

.site-footer a {
  display: block;
  color: #d7f7f1;
  margin: 0.3rem 0;
}

.footer-copy {
  width: min(1180px, 100%);
  margin: 1.5rem auto 0;
  color: #aeb8c6;
}

[hidden] {
  display: none !important;
}

@media (max-width: 820px) {
  .site-header {
    align-items: flex-start;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: 4.6rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: grid;
  }

  .hero,
  .tool-hero,
  .workspace,
  .article-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: grid;
    gap: 0.5rem;
  }
}
