:root {
  color-scheme: light;
  --ink: #172026;
  --muted: #64707a;
  --line: #d7dee5;
  --paper: #f8fafb;
  --panel: #ffffff;
  --accent: #0b7a75;
  --accent-dark: #075f5b;
  --warn: #b54708;
  --shadow: 0 16px 38px rgba(23, 32, 38, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  padding: 0 18px;
  background: rgba(248, 250, 251, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  font-size: 1.1rem;
  font-weight: 800;
  text-decoration: none;
}

.topbar nav a,
.back-link {
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: none;
}

.topbar nav {
  display: flex;
  flex: 1 1 auto;
  gap: 14px;
  justify-content: flex-end;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.topbar nav::-webkit-scrollbar {
  display: none;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 22px 16px 38px;
  border-top: 1px solid var(--line);
}

.footer a {
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: none;
}

.page {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 24px 16px 56px;
}

.narrow {
  width: min(720px, 100%);
}

.intro {
  padding: 20px 0 18px;
}

.search-panel {
  display: grid;
  gap: 8px;
  width: min(620px, 100%);
  margin-top: 18px;
}

.search-panel label {
  font-size: 0.9rem;
}

.search-panel input {
  min-height: 52px;
  padding: 12px 14px;
  background: #fff;
  border: 2px solid #b9c7d3;
  box-shadow: 0 10px 24px rgba(23, 32, 38, 0.06);
}

.search-panel input:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(11, 122, 117, 0.16);
}

.search-panel p {
  margin: 0;
  font-size: 0.92rem;
}

.search-chips,
.popular-grid,
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.search-chips button {
  min-height: 34px;
  padding: 0 11px;
  color: var(--accent-dark);
  background: #edf7f6;
  border: 1px solid #b8dedb;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 800;
}

.search-chips button:hover,
.search-chips button:focus {
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
}

.search-chips button:focus {
  outline: 3px solid rgba(11, 122, 117, 0.18);
  outline-offset: 2px;
}

.popular-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.popular-card {
  display: grid;
  gap: 6px;
  min-height: 96px;
  padding: 14px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
}

.popular-card span {
  font-weight: 800;
}

.popular-card small {
  color: var(--muted);
  line-height: 1.35;
}

.trust-strip {
  margin: 10px 0 6px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.trust-strip div {
  flex: 1 1 180px;
  display: grid;
  gap: 3px;
  min-width: 0;
}

.trust-strip strong {
  font-size: 0.94rem;
}

.trust-strip span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 10px;
  font-size: clamp(2rem, 8vw, 4rem);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  font-size: 1rem;
  margin: 22px 0 10px;
}

.section-heading,
.crumbs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-heading h2 {
  margin: 22px 0 10px;
}

.section-heading a,
.section-heading span,
.crumbs span {
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}

.crumbs {
  justify-content: flex-start;
  margin-bottom: 14px;
}

.category-intro {
  padding-bottom: 6px;
}

p {
  color: var(--muted);
  line-height: 1.65;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

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

.guide-card {
  display: grid;
  gap: 8px;
  min-height: 116px;
  padding: 16px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
}

.guide-card span {
  font-weight: 800;
}

.guide-card small {
  color: var(--muted);
  line-height: 1.4;
}

.inline-guides {
  margin-top: 10px;
}

.compact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tool-card {
  display: grid;
  align-content: start;
  gap: 7px;
  min-height: 132px;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(23, 32, 38, 0.03);
}

.tool-card span {
  overflow-wrap: anywhere;
  font-weight: 750;
  line-height: 1.2;
}

.tool-badge {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.73rem;
  font-style: normal;
  font-weight: 800;
}

.tool-badge.ready {
  color: #075f5b;
  background: #dff4f1;
}

.tool-badge.soon {
  color: #6b4f00;
  background: #fff3c4;
}

.tool-card small,
.limits,
.expires {
  color: var(--muted);
  line-height: 1.45;
}

.tool-card small {
  font-size: 0.84rem;
  overflow-wrap: anywhere;
}

.upload-panel {
  margin-top: 18px;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

form {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

textarea {
  min-height: 220px;
  resize: vertical;
  line-height: 1.5;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

button:hover,
.button:hover {
  background: var(--accent-dark);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.secondary {
  background: #fff;
  color: var(--accent-dark);
}

.secondary:hover {
  background: #edf7f6;
}

.limits {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

.alert {
  margin: 14px 0;
  padding: 12px;
  color: var(--warn);
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
}

.file-summary {
  margin-top: -4px;
  padding: 12px;
  background: #f4f8fa;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.file-summary p {
  margin: 0;
  font-size: 0.92rem;
}

.file-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.92rem;
}

.file-summary-head span {
  flex: 0 0 auto;
  color: var(--muted);
}

.file-summary ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.file-summary li {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 9px 10px;
  background: #fff;
  border: 1px solid #e1e8ee;
  border-radius: 7px;
}

.file-summary li span {
  overflow: hidden;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-summary li small {
  color: var(--muted);
}

.file-warning {
  margin-top: 10px;
  color: var(--warn);
  font-size: 0.9rem;
  font-weight: 700;
}

.coming-soon-panel {
  margin-top: 18px;
  padding: 14px;
  background: #fff9e6;
  border: 1px solid #f2d98d;
  border-radius: 8px;
}

.coming-soon-panel p {
  margin: 6px 0 0;
}

.notice-box {
  margin: 0 0 14px;
  padding: 12px;
  color: #6b4f00;
  background: #fff8db;
  border: 1px solid #f2d98d;
  border-radius: 8px;
  line-height: 1.45;
}

.engine-check {
  display: grid;
  gap: 4px;
  margin: 18px 0 14px;
  padding: 12px;
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.engine-check strong {
  font-size: 0.92rem;
}

.engine-check span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.engine-check.ok {
  background: #eefaf7;
  border-color: #afe2d8;
}

.engine-check.ok span {
  color: #075f5b;
}

.engine-check.missing {
  background: #fff7ed;
  border-color: #fed7aa;
}

.engine-check.missing span {
  color: var(--warn);
}

.seo-copy {
  margin-top: 18px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.seo-copy h2 {
  margin-top: 18px;
}

.seo-copy h2:first-child {
  margin-top: 0;
}

.seo-copy ol {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.55;
}

.faq-list {
  display: grid;
  gap: 8px;
}

.faq-list details {
  padding: 12px;
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 800;
}

.faq-list p {
  margin: 8px 0 0;
}

.article-copy h2 {
  margin: 24px 0 8px;
}

.article-copy ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.55;
}

.article-cta {
  margin-top: 22px;
}

.admin-page h2 {
  margin-top: 24px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.admin-grid div {
  display: grid;
  gap: 4px;
  padding: 14px;
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-grid strong {
  font-size: 1.3rem;
}

.admin-grid span {
  color: var(--muted);
  font-size: 0.9rem;
}

.admin-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding-left: 22px;
  color: var(--muted);
}

.admin-list a {
  color: var(--accent-dark);
  font-weight: 800;
  text-decoration: none;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.inline-check input {
  width: 18px;
  min-height: 18px;
}

.sitemap-copy h2 {
  margin: 22px 0 8px;
}

.sitemap-copy ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
}

.sitemap-copy a {
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
}

.engine-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.install-box {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding: 12px;
  background: #f4f8fa;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.install-box code {
  overflow-x: auto;
  padding: 10px;
  color: #0d2f2c;
  background: #ffffff;
  border: 1px solid #d6e3e1;
  border-radius: 7px;
  font-size: 0.86rem;
  white-space: nowrap;
}

.status-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.status-links a {
  color: var(--accent-dark);
  font-weight: 800;
  text-decoration: none;
}

.utility-panel {
  display: grid;
  gap: 14px;
}

.language-switch {
  display: inline-flex;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.language-switch a {
  padding: 5px 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
}

.language-switch a.active {
  color: #fff;
  background: var(--accent);
}

.option-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.option-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.option-row input {
  width: 18px;
  min-height: 18px;
}

.result-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.qr-result {
  display: grid;
  justify-items: start;
  gap: 12px;
  min-height: 90px;
  color: var(--muted);
}

.qr-result img {
  width: min(260px, 100%);
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.engine-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.engine-row div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.engine-row small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.engine-state {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.engine-state.ok {
  color: #075f5b;
  background: #dff4f1;
}

.engine-state.missing {
  color: #7a1f1f;
  background: #ffe1e1;
}

.progress-shell {
  width: 100%;
  height: 10px;
  overflow: hidden;
  background: #e8eef2;
  border-radius: 999px;
}

.progress-bar {
  width: 20%;
  height: 100%;
  background: var(--accent);
  transition: width 240ms ease;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.actions form {
  margin: 0;
}

.recommendations {
  margin-top: 18px;
}

.recommendation-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.recommendation-card {
  display: grid;
  gap: 5px;
  min-height: 86px;
  padding: 13px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
}

.recommendation-card span {
  font-weight: 800;
}

.recommendation-card small {
  color: var(--muted);
  line-height: 1.35;
}

@media (min-width: 760px) {
  .topbar {
    padding: 0 28px;
  }

  .page {
    padding-top: 38px;
  }

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

  .compact-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  }

  .tool-card {
    gap: 8px;
    min-height: 126px;
    padding: 16px;
  }

  .tool-card small {
    font-size: 0.9rem;
  }

  .upload-panel {
    padding: 28px;
  }

  .recommendation-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
