:root {
  --color-bg: #f5f7fb;
  --color-bg-alt: #ffffff;
  --color-primary: #2563eb;
  --color-primary-soft: #dbeafe;
  --color-accent: #10b981;
  --color-text: #111827;
  --color-text-muted: #6b7280;
  --color-border: #e5e7eb;
  --radius-lg: 16px;
  --radius-md: 10px;
  --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

/* Layout helpers */

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header / Nav */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  color: var(--color-primary);
}

.main-nav {
  position: relative;
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1rem;
}

.nav-menu a {
  font-size: 0.95rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  color: var(--color-text-muted);
}

.nav-menu a:hover {
  background: var(--color-primary-soft);
  color: var(--color-primary);
  text-decoration: none;
}

.nav-menu a.active {
  background: var(--color-primary);
  color: #ffffff;
}

/* Mobile nav toggle */

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
}

/* Hero */

.hero {
  padding: 3rem 0 2.5rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.3fr);
  gap: 2rem;
  align-items: center;
}

.hero-text h1 {
  font-size: clamp(2rem, 3vw, 2.5rem);
  margin: 0 0 1rem;
}

.hero-text p {
  margin: 0 0 1rem;
  color: var(--color-text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1rem 0;
}

.hero-note {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.hero-card {
  background: #ffffff;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.hero-card h2 {
  margin-top: 0;
}

.hero-tools-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.hero-tools-list li {
  font-size: 0.95rem;
  padding: 0.25rem 0;
}

/* Sections */

.section {
  padding: 2.5rem 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section.slim {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.section-title {
  margin-top: 0;
  font-size: 1.6rem;
}

.section-subtitle {
  margin: 0.25rem 0 1.5rem;
  color: var(--color-text-muted);
}

/* Cards, grids */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
}

.tool-card,
.info-card {
  background: #ffffff;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.tool-card h3,
.info-card h3 {
  margin-top: 0;
  font-size: 1.05rem;
}

.tool-card p,
.info-card p {
  font-size: 0.93rem;
  color: var(--color-text-muted);
}

.highlight-card {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-soft);
}

.link {
  font-size: 0.9rem;
  color: var(--color-primary);
}

.link.strong {
  font-weight: 600;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: var(--color-primary);
  color: #ffffff;
}

.btn-primary:hover {
  filter: brightness(1.05);
  text-decoration: none;
}

.btn-secondary {
  background: #ffffff;
  border-color: var(--color-border);
  color: var(--color-text);
}

.btn-secondary:hover {
  background: var(--color-primary-soft);
  text-decoration: none;
}

.btn-outline {
  background: #ffffff;
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary-soft);
  text-decoration: none;
}

.btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
}

.btn.full-width {
  width: 100%;
}

.btn.disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
}

/* FAQ preview */

.faq-preview details {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
}

.faq-preview summary {
  cursor: pointer;
  font-weight: 500;
}

.faq-preview p {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* Tool layout */

.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.6fr);
  gap: 1.5rem;
  align-items: flex-start;
  margin-top: 1.5rem;
}

.tool-panel {
  background: #ffffff;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.tool-panel-title {
  margin-top: 0;
  font-size: 1.1rem;
}

.drop-area {
  margin: 0.75rem 0 1rem;
  padding: 1.5rem 1rem;
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-md);
  text-align: center;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  background: #f9fafb;
}

.drop-area.dragover {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.tool-settings {
  margin-top: 1.25rem;
}

.slider-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}

.hint {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 0.4rem;
}

.file-list {
  border-radius: var(--radius-md);
  border: 1px dashed var(--color-border);
  padding: 0.75rem 0.75rem 0.25rem;
  max-height: 260px;
  overflow-y: auto;
  background: #f9fafb;
}

.file-list.empty {
  text-align: center;
  padding: 1rem;
}

.file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  padding: 0.35rem 0.25rem;
}

.file-item + .file-item {
  border-top: 1px solid var(--color-border);
}

.file-name {
  flex: 1;
  margin-right: 0.5rem;
  word-break: break-all;
}

.file-meta {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.tool-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.status-message {
  margin-top: 0.75rem;
  font-size: 0.88rem;
}

.status-message.error {
  color: #b91c1c;
}

.status-message.success {
  color: var(--color-accent);
}

/* Bulleted list */

.bullets {
  list-style: disc;
  padding-left: 1.25rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--color-border);
  background: #ffffff;
  margin-top: 2rem;
  padding: 1.5rem 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-logo {
  margin-bottom: 0.25rem;
}

.footer-text {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.85rem;
}

.footer-links a {
  color: var(--color-text-muted);
}

.footer-links a:hover {
  color: var(--color-primary);
}

.footer-bottom {
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

/* Simple content pages (about, faq, etc.) */

.page-content {
  background: #ffffff;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  margin-top: 1.5rem;
}

.page-content h1,
.page-content h2 {
  margin-top: 0;
}

.page-content p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

/* Responsive */

@media (max-width: 780px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .tool-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-inner {
    align-items: flex-start;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-menu {
    position: absolute;
    top: 60px;
    right: 0;
    background: #ffffff;
    flex-direction: column;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    min-width: 180px;
    display: none;
  }

  .nav-menu.open {
    display: flex;
  }
}
