:root {
  color-scheme: dark;
  --ink: #f2efe6;
  --muted: #b7bbb7;
  --line: #32383a;
  --panel: #171b1e;
  --panel-soft: #202629;
  --page: #101315;
  --accent: #6de1d1;
  --accent-ink: #092b27;
  --danger: #ff9d89;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: Geist, Inter, ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
}
button, input, select { font: inherit; }
a { color: inherit; text-underline-offset: 0.2em; }
a:hover { color: var(--accent); }

.tools-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(16, 19, 21, 0.96);
}
.tools-nav,
.tools-main,
.tools-footer-inner {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}
.tools-nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.tools-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 720;
  text-decoration: none;
}
.tools-brand img { width: 34px; height: 34px; }
.tools-links { display: flex; align-items: center; gap: 22px; font-size: 0.92rem; }
.tools-button,
.tool-submit,
.copy-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
  font-weight: 760;
  text-decoration: none;
}
.tools-button { padding: 0 18px; }
.tools-button:hover,
.tool-submit:hover,
.copy-button:hover { background: transparent; color: var(--accent); }

.tools-main { padding: 72px 0 96px; }
.tools-hero { max-width: 850px; margin-bottom: 58px; }
.tools-kicker,
.eyebrow,
.field-label,
.result-label {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
h1, h2, h3 { line-height: 1.12; text-wrap: balance; }
h1 {
  margin: 14px 0 20px;
  font-family: var(--serif);
  font-size: clamp(3rem, 8vw, 6.2rem);
  font-weight: 400;
  letter-spacing: -0.035em;
}
.tool-page h1 { font-size: clamp(2.8rem, 7vw, 5.4rem); }
.tools-deck { max-width: 740px; margin: 0; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.3rem); }

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.tool-card {
  min-height: 270px;
  padding: 32px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  text-decoration: none;
}
.tool-card:hover { background: var(--panel-soft); color: var(--ink); }
.tool-card h2 { margin: 44px 0 14px; font-family: var(--serif); font-size: 2.3rem; font-weight: 400; }
.tool-card p { margin: 0; color: var(--muted); }

.generator-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  border: 1px solid var(--line);
  background: var(--panel);
}
.generator-form,
.generator-result { padding: clamp(24px, 4vw, 42px); }
.generator-form { border-right: 1px solid var(--line); }
.field { margin-bottom: 22px; }
.field-label { display: block; margin-bottom: 8px; }
.field-help { display: block; margin-top: 7px; color: var(--muted); font-size: 0.82rem; }
input,
select {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #42494c;
  border-radius: 0;
  outline: none;
  background: #0c0f10;
  color: var(--ink);
}
input:focus,
select:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(109, 225, 209, 0.18); }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tool-submit { width: 100%; margin-top: 8px; padding: 0 20px; }
.generator-result { display: flex; min-height: 560px; flex-direction: column; }
.result-label { margin: 0 0 16px; }
.prompt-result {
  flex: 1;
  margin: 0;
  padding: 24px;
  border: 1px solid var(--line);
  background: #0c0f10;
  color: #e5e4dc;
  font-family: var(--mono);
  font-size: 0.94rem;
  line-height: 1.72;
  white-space: pre-wrap;
}
.result-actions { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.copy-button { min-width: 130px; padding: 0 18px; }
.copy-status { min-height: 1.5em; color: var(--muted); font-size: 0.86rem; }
.privacy-note { margin: 15px 0 0; color: var(--muted); font-size: 0.8rem; }
.reset-button {
  display: block;
  margin: 14px auto 0;
  padding: 2px 4px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.reset-button:hover { color: var(--accent); }

.explain-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 64px;
  margin-top: 74px;
}
.explain-copy h2,
.faq h2 { margin: 0 0 18px; font-family: var(--serif); font-size: clamp(2rem, 4vw, 3rem); font-weight: 400; }
.explain-copy h3 { margin: 34px 0 10px; font-size: 1.16rem; }
.explain-copy p,
.explain-copy li,
.faq p { color: #d7d8d3; }
.explain-copy ul { padding-left: 1.25rem; }
.faq { border-top: 1px solid var(--line); padding-top: 18px; }
.faq details { border-bottom: 1px solid var(--line); padding: 15px 0; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { margin-bottom: 4px; }
.product-cta { margin-top: 72px; padding: clamp(28px, 5vw, 44px); background: var(--ink); color: #101315; }
.product-cta h2 { margin: 0 0 12px; font-family: var(--serif); font-size: clamp(2.1rem, 4vw, 3.2rem); font-weight: 400; }
.product-cta p { max-width: 680px; color: #323638; }
.product-cta .tools-button { border-color: #101315; background: #101315; color: var(--ink); }
.product-cta .tools-button:hover { background: transparent; color: #101315; }

.tools-footer { border-top: 1px solid var(--line); padding: 38px 0; color: var(--muted); }
.tools-footer-inner { display: flex; justify-content: space-between; gap: 24px; }
.tools-footer a { color: var(--ink); }

@media (max-width: 820px) {
  .tools-links > a:not(.tools-button) { display: none; }
  .tool-grid,
  .generator-shell,
  .explain-grid { grid-template-columns: 1fr; }
  .generator-form { border-right: 0; border-bottom: 1px solid var(--line); }
  .generator-result { min-height: 440px; }
  .tools-main { padding-top: 48px; }
}

@media (max-width: 520px) {
  .tools-nav, .tools-main, .tools-footer-inner { width: min(100% - 28px, 1120px); }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .tools-footer-inner { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
