@font-face {
  font-family: "Fraunces Variable";
  src: url("/fonts/fraunces-variable.woff2") format("woff2-variations");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces Variable";
  src: url("/fonts/fraunces-variable-italic.woff2") format("woff2-variations");
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("/fonts/manrope-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("/fonts/manrope-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("/fonts/manrope-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/jbmono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/jbmono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/jbmono-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #16130f;
  --bg-raised: #1e1a15;
  --bg-sunken: #100d0a;
  --line: #34301f;
  --line-soft: #221e17;
  --text: #ece4d6;
  --text-dim: #a99b85;
  --text-faint: #756a58;
  --brass: #c9a15a;
  --brass-soft: #8d764c;
  --rust: #bd5c34;
  --rust-soft: #7a4530;

  --font-display: "Fraunces Variable", ui-serif, Georgia, serif;
  --font-body: "Manrope", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --container: 780px;
  --container-wide: 980px;
  --radius: 3px;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 900px 500px at 12% -10%, rgba(201,161,90,0.07), transparent 60%);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; margin: 0; color: var(--text); }
p { margin: 0; }
a { color: inherit; }
button, input { font-family: inherit; color: inherit; }
.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}
:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

.site-header {
  border-bottom: 1px solid var(--line-soft);
}
.site-header .wrap {
  max-width: var(--container-wide);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 22px;
  padding-bottom: 22px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text);
  letter-spacing: 0.01em;
}
.brand-mark { width: 26px; height: 26px; color: var(--brass); flex-shrink: 0; }
.back-link {
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--text-dim);
  border-bottom: 1px solid transparent;
}
.back-link:hover { color: var(--brass); border-color: var(--brass-soft); }

.site-footer {
  margin: 120px auto 0;
  max-width: var(--container-wide);
  border-top: 1px solid var(--line-soft);
  padding: 56px 28px 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 32px;
}
.site-footer p {
  color: var(--text-faint);
  font-size: 0.92rem;
  max-width: 58ch;
}
.footer-divider {
  width: 200px;
  border: 0;
  border-top: 1px solid var(--line-soft);
}
.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-raised);
  border: 1px solid var(--line-soft);
  padding: 12px 24px;
  border-radius: var(--radius);
}
.inline-icon {
  width: 16px;
  height: 16px;
  opacity: 0.8;
}
.hidden-link {
  color: var(--brass);
  text-decoration: none;
  border-bottom: 1px dashed var(--brass-soft);
}
.hidden-link:hover {
  color: var(--text);
  border-color: var(--brass);
}
.site-footer span {
  color: var(--text-faint);
  padding: 0 8px;
}
.site-footer a {
  color: var(--text-dim);
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--brass);
}

.hero, .tool-header {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 72px 28px 48px;
}
.hero .wrap, .tool-header .wrap { padding: 0; max-width: 640px; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--rust);
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(2rem, 4.2vw, 2.9rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.tool-header h1 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); }
.lede {
  margin-top: 20px;
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 56ch;
}

.tool-rack { max-width: var(--container-wide); margin: 0 auto 100px; }
.tool-rack .wrap { padding: 0 28px; }
.tool-row {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 26px 18px;
  text-decoration: none;
  color: var(--text);
  border-top: 1px solid var(--line-soft);
  transition: background-color 120ms ease;
}
.tool-rack .wrap > a:last-child { border-bottom: 1px solid var(--line-soft); }
.tool-row:hover { background: var(--bg-raised); }
.tool-icon {
  width: 44px; height: 44px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--brass);
}
.tool-icon svg { width: 24px; height: 24px; }
.tool-copy { flex: 1; min-width: 0; }
.tool-title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 4px;
}
.tool-desc { display: block; color: var(--text-dim); font-size: 0.92rem; }
.tool-go {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px 12px;
  flex-shrink: 0;
}
.tool-row:hover .tool-go { color: var(--brass); border-color: var(--brass-soft); }

.tool-body { max-width: var(--container-wide); margin: 0 auto 100px; }
.tool-body .wrap { padding: 0 28px; max-width: 640px; }
.tool-panel { display: flex; flex-direction: column; gap: 26px; }
.tool-note {
  color: var(--text-faint);
  font-size: 0.87rem;
  line-height: 1.6;
  border-left: 2px solid var(--line);
  padding-left: 16px;
}
.tool-note code {
  font-family: var(--font-mono);
  background: var(--bg-sunken);
  padding: 1px 5px;
  border-radius: 2px;
  font-size: 0.85em;
}

.btn-primary, .btn-ghost {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: var(--radius);
  padding: 12px 20px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
.btn-primary {
  background: var(--brass);
  color: #17130d;
  border-color: var(--brass);
}
.btn-primary:hover { background: #dab671; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--brass-soft); color: var(--brass); }

input[type="text"] {
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--text);
  font-size: 0.95rem;
  width: 100%;
}
input[type="text"]:focus { border-color: var(--brass-soft); }

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 2px;
  background: var(--line);
  margin: 14px 0 22px;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--brass);
  cursor: pointer;
  border: 2px solid var(--bg);
}
input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--brass);
  cursor: pointer;
  border: 2px solid var(--bg);
}

.controls { display: flex; flex-direction: column; gap: 6px; }
.control-row {
  display: flex; align-items: baseline; justify-content: space-between;
  font-size: 0.88rem;
  color: var(--text-dim);
  margin-bottom: 2px;
}
.control-row output {
  font-family: var(--font-mono);
  color: var(--brass);
}

.checks { display: flex; flex-direction: column; gap: 12px; margin: 8px 0 22px; }
.check {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.92rem;
  cursor: pointer;
}
.check input { accent-color: var(--brass); width: 16px; height: 16px; }
.check-sample {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-left: auto;
}

.pw-output {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px;
}
.pw-value {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  word-break: break-all;
  flex: 1;
  color: var(--brass);
}
.hint { font-size: 0.82rem; color: var(--text-faint); margin-top: -14px; }
.pw-strength { display: flex; align-items: center; gap: 12px; }
.pw-strength-bar {
  flex: 1; height: 4px;
  background: var(--line-soft);
  border-radius: 2px;
  overflow: hidden;
}
.pw-strength-bar span {
  display: block; height: 100%; width: 0%;
  background: var(--rust);
  transition: width 160ms ease, background-color 160ms ease;
}
.pw-strength-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  min-width: 6ch;
  text-align: right;
}

.avatar-stage { display: flex; justify-content: center; padding: 12px 0 6px; }
.avatar-preview {
  width: 176px; height: 176px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-sunken);
}
.avatar-preview svg { display: block; width: 100%; height: 100%; }
.avatar-input-row { display: flex; gap: 10px; }
.avatar-input-row input { flex: 1; }
.avatar-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

.theme-picker { display: flex; gap: 8px; margin: 6px 0 20px; flex-wrap: wrap; }
.theme-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-dim);
  border-radius: var(--radius);
  padding: 9px 16px;
  font-size: 0.88rem;
  cursor: pointer;
}
.theme-btn:hover { border-color: var(--brass-soft); color: var(--text); }
.theme-btn.is-active {
  border-color: var(--brass);
  color: var(--brass);
  background: rgba(201,161,90,0.08);
}
.lorem-output-wrap { position: relative; margin-top: 6px; }
.lorem-copy-btn { position: absolute; top: 14px; right: 14px; padding: 8px 14px; font-size: 0.8rem; }
.lorem-output {
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  padding-top: 56px;
  min-height: 140px;
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.7;
}
.lorem-output p { margin-bottom: 1em; }
.lorem-output p:last-child { margin-bottom: 0; }

@media (max-width: 600px) {
  .hero, .tool-header { padding: 48px 20px 36px; }
  .tool-row { gap: 14px; padding: 20px 12px; }
  .tool-go { display: none; }
  .pw-value { font-size: 1rem; }
  .avatar-preview { width: 148px; height: 148px; }
}