@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@600;700;800&display=swap");

:root {
  --ink: #18211d;
  --muted: #66716b;
  --paper: #f7f8f4;
  --surface: #ffffff;
  --line: #dfe5df;
  --green: #176b4d;
  --green-dark: #0d4b35;
  --mint: #dff5e9;
  --lime: #dff36a;
  --shadow: 0 18px 50px rgba(25, 49, 38, 0.08);
  --radius: 22px;
  --content: 1160px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(223, 243, 106, 0.18), transparent 25rem),
    var(--paper);
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  padding: .7rem 1rem;
  border-radius: 10px;
  color: white;
  background: var(--green-dark);
}

.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(223, 229, 223, .8);
  background: rgba(247, 248, 244, .88);
  backdrop-filter: blur(16px);
}

.nav {
  width: min(calc(100% - 2rem), var(--content));
  height: 74px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .72rem;
  color: var(--ink);
  text-decoration: none;
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  letter-spacing: -.04em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: white;
  background: var(--green);
  box-shadow: inset 0 -4px 9px rgba(0,0,0,.16);
}

.brand-mark svg { width: 19px; }

.nav-links { display: flex; align-items: center; gap: .4rem; }
.nav-links a {
  padding: .55rem .8rem;
  border-radius: 10px;
  color: #4e5c55;
  text-decoration: none;
  font-size: .94rem;
  font-weight: 600;
}
.nav-links a:hover { color: var(--green-dark); background: #edf1ec; }

.container { width: min(calc(100% - 2rem), var(--content)); margin-inline: auto; }

.hero { padding: clamp(4.6rem, 10vw, 8rem) 0 clamp(3.6rem, 8vw, 6rem); text-align: center; }

.eyebrow {
  width: fit-content;
  margin: 0 auto 1.1rem;
  padding: .35rem .75rem;
  border: 1px solid #c7dfd0;
  border-radius: 99px;
  color: var(--green-dark);
  background: rgba(223, 245, 233, .7);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.hero h1, .tool-hero h1 {
  max-width: 860px;
  margin: 0 auto;
  font-family: "Manrope", sans-serif;
  font-size: clamp(2.7rem, 7vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: -.065em;
}

.hero h1 span { color: var(--green); position: relative; white-space: nowrap; }
.hero h1 span::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -.04em;
  right: -.04em;
  bottom: .08em;
  height: .18em;
  border-radius: 1rem;
  background: var(--lime);
  transform: rotate(-1deg);
}

.hero-copy { max-width: 630px; margin: 1.35rem auto 2rem; color: var(--muted); font-size: clamp(1rem, 2vw, 1.16rem); }

.search-shell {
  position: relative;
  max-width: 700px;
  margin: auto;
}

.search-shell svg {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  width: 21px;
  color: #77827c;
  transform: translateY(-50%);
  pointer-events: none;
}

.search-input {
  width: 100%;
  min-height: 64px;
  padding: 0 4.6rem 0 3.55rem;
  border: 1px solid #d8dfd9;
  border-radius: 18px;
  outline: none;
  color: var(--ink);
  background: rgba(255,255,255,.94);
  box-shadow: var(--shadow);
  transition: border-color .2s, box-shadow .2s;
}

.search-input:focus { border-color: #5da487; box-shadow: 0 0 0 4px rgba(23, 107, 77, .1), var(--shadow); }
.search-hint { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); padding: .22rem .48rem; border: 1px solid var(--line); border-radius: 7px; color: #87908b; background: #f6f7f4; font-size: .75rem; }

.trust-line { margin-top: 1rem; color: #7d8882; font-size: .84rem; }
.trust-line span { display: inline-flex; align-items: center; gap: .32rem; margin: 0 .5rem; }
.trust-line svg { width: 14px; color: var(--green); }

.catalog-section { padding: 0 0 6rem; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.45rem; }
.section-heading h2 { margin: 0; font-family: "Manrope", sans-serif; font-size: clamp(1.65rem, 3vw, 2.2rem); letter-spacing: -.045em; }
.section-heading p { margin: .35rem 0 0; color: var(--muted); }
.tool-count { flex: none; padding: .35rem .7rem; border-radius: 99px; color: var(--green-dark); background: var(--mint); font-size: .82rem; font-weight: 700; }

.filters { display: flex; gap: .55rem; margin-bottom: 1.5rem; overflow-x: auto; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filter-button {
  flex: none;
  padding: .48rem .85rem;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: #5c6862;
  background: rgba(255,255,255,.7);
  cursor: pointer;
  font-size: .86rem;
  font-weight: 600;
}
.filter-button:hover, .filter-button.active { border-color: var(--green); color: white; background: var(--green); }

.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.tool-card {
  min-height: 230px;
  padding: 1.45rem;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: inherit;
  background: rgba(255,255,255,.82);
  text-decoration: none;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.tool-card:hover { border-color: #b5cdbf; box-shadow: var(--shadow); transform: translateY(-4px); }
.tool-card-top { display: flex; align-items: start; justify-content: space-between; }
.tool-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; color: var(--green-dark); background: var(--mint); }
.tool-icon svg { width: 24px; }
.tool-arrow { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: #758079; background: #f0f3ef; transition: color .2s, transform .2s; }
.tool-card:hover .tool-arrow { color: white; background: var(--green); transform: rotate(-8deg); }
.tool-arrow svg { width: 16px; }
.tool-card h3 { margin: 1.4rem 0 .45rem; font-family: "Manrope", sans-serif; font-size: 1.15rem; letter-spacing: -.025em; }
.tool-card p { margin: 0; color: var(--muted); font-size: .93rem; line-height: 1.55; }
.tool-category { margin-top: auto; padding-top: 1rem; color: #748078; font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.empty-state { grid-column: 1 / -1; padding: 3rem 1rem; border: 1px dashed #c9d2cb; border-radius: var(--radius); color: var(--muted); text-align: center; }

.privacy-strip { margin-bottom: 6rem; padding: clamp(1.5rem, 4vw, 2.5rem); display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; overflow: hidden; border-radius: 28px; color: white; background: var(--green-dark); }
.privacy-strip h2 { margin: 0 0 .35rem; font-family: "Manrope", sans-serif; font-size: clamp(1.35rem, 3vw, 2rem); letter-spacing: -.04em; }
.privacy-strip p { max-width: 650px; margin: 0; color: #c5ded3; }
.privacy-badge { width: 72px; height: 72px; flex: none; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.16); border-radius: 20px; color: var(--lime); background: rgba(255,255,255,.07); transform: rotate(5deg); }
.privacy-badge svg { width: 35px; }

.site-footer { border-top: 1px solid var(--line); }
.footer-inner { min-height: 110px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; color: #728078; font-size: .88rem; }
.footer-inner p { margin: 0; }
.footer-links { display: flex; gap: 1rem; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--green); }

/* Shared tool page */
.breadcrumbs { display: flex; align-items: center; gap: .45rem; padding-top: 2rem; color: #738078; font-size: .88rem; }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { color: var(--green); }
.breadcrumbs svg { width: 14px; }
.tool-hero { padding: clamp(3rem, 7vw, 5rem) 0 2.4rem; text-align: center; }
.tool-hero .tool-icon { margin: 0 auto 1rem; }
.tool-hero h1 { max-width: 780px; font-size: clamp(2.35rem, 6vw, 4.35rem); }
.tool-hero > p { max-width: 650px; margin: 1rem auto 0; color: var(--muted); font-size: 1.06rem; }

.tool-workspace { margin-bottom: 4.5rem; padding: clamp(1rem, 3vw, 1.5rem); border: 1px solid var(--line); border-radius: 28px; background: rgba(255,255,255,.9); box-shadow: var(--shadow); }
.workspace-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.workspace-header h2 { margin: 0; font-family: "Manrope", sans-serif; font-size: 1.05rem; letter-spacing: -.02em; }
.workspace-status { display: flex; align-items: center; gap: .4rem; color: #77827c; font-size: .8rem; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #25a36f; box-shadow: 0 0 0 4px rgba(37,163,111,.12); }
.tool-textarea {
  width: 100%;
  min-height: 310px;
  resize: vertical;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
  color: var(--ink);
  background: #fafbf8;
  line-height: 1.7;
}
.tool-textarea:focus, .control-input:focus { border-color: #65a68b; box-shadow: 0 0 0 4px rgba(23,107,77,.09); }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin-top: .75rem; }
.stat { padding: 1rem; border-radius: 14px; background: #f1f5f0; }
.stat-value { display: block; font-family: "Manrope", sans-serif; font-size: 1.45rem; font-weight: 800; letter-spacing: -.04em; }
.stat-label { color: #738078; font-size: .78rem; }

.toolbar { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: .8rem; }
.button { min-height: 44px; padding: .55rem 1rem; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; border: 0; border-radius: 11px; color: white; background: var(--green); cursor: pointer; font-weight: 700; text-decoration: none; }
.button:hover { background: var(--green-dark); }
.button.secondary { border: 1px solid var(--line); color: var(--ink); background: white; }
.button.secondary:hover { border-color: #b4c4b9; background: #f4f6f2; }
.button svg { width: 17px; }
.button:focus-visible, .filter-button:focus-visible, a:focus-visible { outline: 3px solid rgba(23,107,77,.28); outline-offset: 3px; }

.json-layout { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.editor-panel { min-width: 0; }
.editor-label { display: block; margin: 0 0 .45rem .15rem; color: #627067; font-size: .8rem; font-weight: 700; }
.code-input { min-height: 420px; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .87rem; white-space: pre; }
.message { min-height: 1.5rem; margin: .55rem 0 0; color: #6b766f; font-size: .84rem; }
.message.error { color: #b23a32; }
.message.success { color: var(--green); }

.password-output { position: relative; margin-bottom: 1.3rem; }
.password-output input { width: 100%; min-height: 66px; padding: 0 4.2rem 0 1rem; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); background: #f8faf7; font-family: "SFMono-Regular", Consolas, monospace; font-size: clamp(.95rem, 3vw, 1.28rem); }
.copy-icon-button { position: absolute; right: .65rem; top: 50%; width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 10px; color: var(--green-dark); background: var(--mint); cursor: pointer; transform: translateY(-50%); }
.copy-icon-button svg { width: 19px; }
.control-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.5rem; }
.control-group { padding: 1rem; border: 1px solid var(--line); border-radius: 15px; background: #fafbf8; }
.control-label { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; font-weight: 700; }
.range-value { min-width: 2.2rem; padding: .15rem .5rem; border-radius: 7px; color: var(--green-dark); background: var(--mint); text-align: center; }
input[type="range"] { width: 100%; accent-color: var(--green); }
.check-list { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.check-option { display: flex; align-items: center; gap: .55rem; color: #536159; font-size: .91rem; cursor: pointer; }
.check-option input { width: 17px; height: 17px; accent-color: var(--green); }
.strength-row { display: flex; align-items: center; gap: .8rem; margin-top: 1rem; }
.strength-track { height: 7px; flex: 1; overflow: hidden; border-radius: 99px; background: #e8ece7; }
.strength-fill { width: 75%; height: 100%; border-radius: inherit; background: #2a9e70; transition: width .2s, background .2s; }
.strength-label { min-width: 3.5rem; color: #627067; font-size: .82rem; font-weight: 700; }

.seo-content { max-width: 800px; margin: 0 auto 6rem; }
.seo-content h2 { margin: 2.1rem 0 .6rem; font-family: "Manrope", sans-serif; font-size: 1.55rem; letter-spacing: -.035em; }
.seo-content p, .seo-content li { color: var(--muted); }
.seo-content li + li { margin-top: .4rem; }

.noscript { margin: 1rem auto; padding: .8rem 1rem; border-radius: 10px; color: #7c302b; background: #fee9e5; text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 760px) {
  .nav { height: 64px; }
  .nav-links a:not(.home-link) { display: none; }
  .hero { padding-top: 4rem; }
  .tool-grid { grid-template-columns: 1fr; }
  .tool-card { min-height: 205px; }
  .privacy-strip { align-items: flex-start; }
  .privacy-badge { width: 58px; height: 58px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .json-layout, .control-grid { grid-template-columns: 1fr; }
  .code-input { min-height: 300px; }
  .footer-inner { padding: 1.6rem 0; align-items: flex-start; flex-direction: column; }
}

@media (max-width: 440px) {
  .container, .nav { width: min(calc(100% - 1.25rem), var(--content)); }
  .brand-text { font-size: .95rem; }
  .hero h1 { font-size: 2.55rem; }
  .search-hint { display: none; }
  .search-input { padding-right: 1rem; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .privacy-badge { display: none; }
  .check-list { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

