:root {
  --bg: #f4f0e8;
  --ink: #21302b;
  --muted: #66756f;
  --line: #d8cfbe;
  --surface: rgba(255, 251, 244, 0.92);
  --accent: #8f9b34;
  --accent-deep: #56631b;
  --highlight: #c86432;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Lato, "Helvetica Neue", Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(200, 100, 50, 0.14), transparent 24rem),
    radial-gradient(circle at right 15%, rgba(143, 155, 52, 0.16), transparent 20rem),
    linear-gradient(180deg, #fbf8f2 0%, var(--bg) 100%);
}

a {
  color: var(--accent-deep);
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  padding: 1.25rem 1rem 0;
}

.site-menu.ui.menu {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 0.85rem 1rem;
  border-radius: 1.4rem;
  background: rgba(255, 250, 241, 0.86);
  border: 1px solid rgba(216, 207, 190, 0.9);
  box-shadow: 0 18px 45px rgba(33, 48, 43, 0.08);
  backdrop-filter: blur(16px);
}

.site-menu .item {
  color: var(--ink) !important;
}

.brand.item {
  display: flex !important;
  gap: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-deep), var(--highlight));
  color: #fff;
  font-size: 0.95rem;
}

.site-main {
  flex: 1;
  padding: 2rem 1rem 0;
}

.hero {
  padding: 2.75rem 0 2rem;
}

.hero-home {
  padding-top: 3.25rem;
}

.hero-grid {
  align-items: center;
}

.hero-sidecard {
  display: flex !important;
  justify-content: flex-end;
}

.hero-copy h1,
.hero h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 0.95;
  margin: 0.2rem 0 1rem;
  max-width: 11ch;
}

.hero.compact h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
}

.hero-lead,
.hero p:last-child,
.muted-copy,
.section-head p,
.progress-meta span,
.site-footer p,
.ui.card .description,
.ui.list > .item .description,
.option-card small {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--highlight);
  font-size: 0.78rem;
  font-weight: 700;
}

.hero-panel,
.surface-section,
.status-panel,
.category-card,
.tool-card,
.prose-panel {
  border-radius: 1.4rem !important;
  border: 1px solid rgba(216, 207, 190, 0.9) !important;
  background: var(--surface) !important;
  box-shadow: 0 18px 45px rgba(33, 48, 43, 0.08) !important;
}

.hero-panel {
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.95), rgba(247, 241, 229, 0.95)) !important;
}

.hero-stats.ui.statistics {
  margin-top: 1.5rem;
}

.hero-stats .statistic > .value {
  color: var(--accent-deep) !important;
  font-size: 2rem !important;
}

.section-block,
.surface-section,
.tool-layout,
.site-footer {
  margin-top: 2rem !important;
}

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

.category-grid.ui.cards > .card,
.ui.cards > .tool-card.card,
.ui.cards > .category-card.card,
.option-grid.ui.cards > .card {
  width: 100%;
}

.category-card .header a,
.tool-card .header {
  color: var(--ink);
}

.tool-card:hover,
.category-card:hover {
  transform: translateY(-2px);
  transition: transform 0.18s ease;
}

.tool-form {
  display: grid;
  gap: 1rem;
}

.tool-form textarea,
.tool-form input[type="text"],
.tool-form input[type="number"],
.tool-form input[type="date"],
.tool-form input[type="url"],
.tool-form input[type="file"],
.tool-form select {
  border-radius: 0.95rem !important;
  border-color: var(--line) !important;
  background: #fffdf8 !important;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hidden {
  display: none !important;
}

.tool-options {
  display: grid;
  gap: 1rem;
}

.option-card {
  background: rgba(251, 246, 234, 0.96) !important;
}

.option-card-checkbox input {
  width: 1.1rem;
  height: 1.1rem;
}

.video-inspector {
  margin-top: 0.5rem;
  border-radius: 1.1rem !important;
}

pre {
  white-space: pre-wrap;
  word-break: break-word;
  overflow: auto;
}

.result-panel {
  height: 100%;
}

.progress-panel {
  display: grid;
  gap: 0.6rem;
  margin: 1rem 0 1.25rem;
}

#job-progress.ui.progress {
  margin: 0;
}

#job-progress.ui.progress .bar {
  min-width: 0;
  background: linear-gradient(90deg, var(--highlight), #ebb04d);
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.result-actions {
  min-height: 1.5rem;
  margin-bottom: 0.75rem;
}

.result-link {
  color: var(--highlight);
  font-weight: 700;
}

.ad-slot {
  border-radius: 1.4rem;
  border: 1px dashed #b48653;
  background: rgba(255, 244, 220, 0.88);
  padding: 1.25rem;
}

.ad-gap {
  margin: 4rem 0;
}

.site-footer {
  padding: 2.5rem 0 3rem;
  color: var(--muted);
}

.footer-brand {
  font-weight: 800;
  color: var(--ink);
}

.ui.message,
.ui.segment {
  box-shadow: none;
}

@media (max-width: 767px) {
  .site-header {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .site-menu.ui.menu {
    padding: 0.65rem 0.5rem;
  }

  .site-menu .right.menu {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .hero {
    padding: 2rem 0 1.5rem;
  }

  .section-head,
  .progress-meta {
    align-items: flex-start;
    flex-direction: column;
  }
}
