:root {
  color-scheme: light;
  --ink: #17212f;
  --muted: #5c6675;
  --line: #dde4ee;
  --soft: #f5f7fa;
  --accent: #0b7a5a;
  --accent-dark: #075f47;
  --warn: #b54708;
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  margin: 0;
  color: var(--ink);
  background: #f8fafc;
  line-height: 1.6;
  overflow-x: hidden;
}

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

.topbar {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(16px);
}

.nav {
  max-width: 1120px;
  min-height: 64px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #000;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.brand-logo {
  width: 42px;
  height: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.nav-links a {
  color: inherit;
  text-decoration: none;
}

.hero {
  background: linear-gradient(180deg, #063b31 0%, #0b7a5a 72%, #f8fafc 72%, #f8fafc 100%);
  color: #fff;
}

.hero-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 44px 22px 40px;
}

.breadcrumb {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 14px;
  font-weight: 700;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
}

h1 {
  max-width: 820px;
  margin: 0 0 16px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.02;
}

.hero-copy {
  max-width: 680px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 22px 70px;
}

.tool-panel {
  margin-top: -4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 18px 45px rgba(23, 33, 47, 0.12);
  overflow: hidden;
}

.tool-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 420px);
}

.tool-form {
  padding: 22px;
  display: grid;
  gap: 13px;
}

.tool-preview {
  padding: 22px;
  border-left: 1px solid var(--line);
  background: #f7faf9;
  display: grid;
  align-content: start;
  gap: 12px;
}

.field {
  display: grid;
  gap: 7px;
}

label {
  font-size: 13px;
  color: #2f3b4a;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid #cfd8e3;
  border-radius: 7px;
  padding: 10px 11px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  outline: none;
}

textarea {
  min-height: 78px;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(11, 122, 90, 0.16);
}

.hint {
  color: var(--muted);
  font-size: 12px;
}

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

button,
.button {
  border: 1px solid transparent;
  border-radius: 7px;
  min-height: 42px;
  padding: 10px 12px;
  font: inherit;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

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

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

.secondary {
  background: #fff;
  color: var(--ink);
  border-color: #cfd8e3;
}

.secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.error {
  min-height: 20px;
  color: #b42318;
  font-size: 13px;
}

.qr-box {
  width: 240px;
  height: 240px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border: 1px dashed #b8c3d2;
  background: #fff;
}

.qr-box canvas,
.qr-box img {
  width: 220px !important;
  height: 220px !important;
  image-rendering: pixelated;
}

.qr-placeholder {
  padding: 18px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.intent-output {
  word-break: break-all;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid #d7dee9;
  border-radius: 7px;
  background: #fff;
  color: #344054;
  font: 12px ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

section {
  padding: 34px 0 0;
}

h2,
h3 {
  margin: 0 0 12px;
  line-height: 1.18;
}

h2 {
  font-size: 30px;
}

h3 {
  font-size: 18px;
}

.copy p {
  margin: 0 0 14px;
  color: var(--muted);
}

.card-grid,
.faq-list,
.related-grid {
  display: grid;
  gap: 12px;
}

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

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

.card,
details,
.related-link,
.notice {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 16px;
}

.card p,
details p,
.related-link p {
  margin: 0;
  color: var(--muted);
}

.article-figure {
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 16px;
}

.article-figure img {
  display: block;
  width: min(260px, 100%);
  height: auto;
  margin: 0 auto;
}

.article-figure figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.related-link {
  color: inherit;
  text-decoration: none;
}

.related-link strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}

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

.notice {
  border-left: 4px solid var(--warn);
  background: #fff8ed;
  color: #573b1a;
}

footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 24px 22px;
  text-align: center;
  font-size: 13px;
}

@media (max-width: 860px) {
  .tool-grid,
  .card-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .tool-preview {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 620px) {
  .nav {
    min-height: 58px;
    padding: 8px 16px;
    gap: 12px;
  }

  .brand {
    gap: 8px;
    font-size: 15px;
  }

  .brand-logo {
    width: 34px;
  }

  .nav-links {
    flex: 1;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 12px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
  }

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

  .hero-inner,
  main {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-inner {
    padding-top: 24px;
    padding-bottom: 28px;
  }

  .breadcrumb {
    margin-bottom: 12px;
  }

  h1 {
    font-size: 29px;
    line-height: 1.08;
  }

  h2 {
    font-size: 25px;
  }

  .actions {
    grid-template-columns: 1fr;
  }
}
