:root {
  --bg: #FBF6EE;
  --bg-soft: #F3EBDD;
  --surface: #FFFFFF;
  --surface-soft: #FCF7EE;
  --border: #E8DEC9;
  --border-strong: #D9CBA9;
  --text: #2A2118;
  --text-muted: #7C6E5C;
  --text-faint: #A99A83;
  --green: #2F6B4F;
  --green-dark: #24523C;
  --green-soft: #E4EFE7;
  --gold: #B9772E;
  --gold-soft: #F3E3CB;
  --danger: #B4432F;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-card: 0 1px 2px rgba(42, 33, 24, 0.04), 0 10px 30px -12px rgba(42, 33, 24, 0.10);
  --font-display: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
html[data-theme="dark"] {
  --bg: #17130F;
  --bg-soft: #1D1812;
  --surface: #221C15;
  --surface-soft: #241E17;
  --border: #382E22;
  --border-strong: #4A3C2C;
  --text: #F1E7D8;
  --text-muted: #B4A48C;
  --text-faint: #85765F;
  --green: #5CA47F;
  --green-dark: #3E7B5C;
  --green-soft: #223226;
  --gold: #D9A15C;
  --gold-soft: #3A2C1B;
  --danger: #E17A61;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 20px 40px -20px rgba(0, 0, 0, 0.55);
}
* { box-sizing: border-box; }
html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}
a { color: inherit; }
.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: inline-block;
}
.icon-sm { width: 15px; height: 15px; }
.icon-lg { width: 34px; height: 34px; }
.icon-xl { width: 46px; height: 46px; color: var(--gold); }
.icon-feature { width: 26px; height: 26px; color: var(--green); }
.site-header {
  border-bottom: 1px solid var(--border);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { color: var(--gold); }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.brand-sub { font-size: 13px; color: var(--text-muted); }
.header-nav { display: flex; align-items: center; gap: 18px; }
.nav-link { font-size: 15px; color: var(--text-muted); text-decoration: none; }
.nav-link:hover { color: var(--text); }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  padding: 9px 16px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease;
}
.btn:hover { border-color: var(--green); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 7px 14px; font-size: 14px; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, transform .1s ease;
}
.icon-btn:hover { color: var(--green); border-color: var(--green); }
.icon-btn:active { transform: scale(0.94); }
#theme-toggle .icon-moon { display: none; }
html[data-theme="dark"] #theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] #theme-toggle .icon-moon { display: inline-block; }
.hero { padding: 56px 24px 8px; text-align: center; }
.hero-mark { margin-bottom: 14px; }
.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.15;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}
.hero-title .accent { color: var(--gold); }
.hero-sub {
  color: var(--text-muted);
  font-size: 17px;
  margin: 0 0 30px;
}
.tabs {
  display: flex;
  gap: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px;
  max-width: 720px;
  margin: 0 auto 22px;
}
.tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.tab .icon { width: 17px; height: 17px; }
.tab.is-active {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--green);
  box-shadow: var(--shadow-card);
}
.tab:not(.is-active):hover { color: var(--text); }
.generator-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 28px;
  max-width: 780px;
  margin: 0 auto;
  text-align: left;
}
.pw-field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.pw-field-label { font-size: 14px; font-weight: 600; color: var(--text-muted); }
.pw-display {
  position: relative;
  background: var(--gold-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 60px 22px 22px;
  min-height: 76px;
  display: flex;
  align-items: center;
}
.pw-output {
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: clamp(20px, 3.5vw, 28px);
  word-break: break-all;
  letter-spacing: 0.01em;
}
.pw-copy {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--surface);
}
.copy-toast {
  margin: 8px 2px 0;
  font-size: 14px;
  color: var(--green);
  opacity: 0;
  transition: opacity .2s ease;
  height: 16px;
}
.copy-toast.is-visible { opacity: 1; }
.strength-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0 26px;
}
.strength-track {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: var(--bg-soft);
  overflow: hidden;
}
.strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--danger);
  transition: width .3s ease, background .3s ease;
}
.strength-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--green);
  white-space: nowrap;
}
.icon-check-badge { width: 17px; height: 17px; }
.weak-note {
  display: none;
  align-items: center;
  gap: 10px;
  background: #FDF0E6;
  border: 1px solid #E8DEC9;
  border-left: 4px solid var(--danger);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  margin: 0 0 22px;
}
.weak-note.is-visible { display: flex; }
html[data-theme="dark"] .weak-note {
  background: #2A2218;
  border-color: #4A3C2C;
}
.pw-copy:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.panel { display: none; }
.panel.is-active { display: block; }
.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.options-grid-single { grid-template-columns: 1fr; }
.option-col { display: flex; flex-direction: column; gap: 12px; }
.option-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 4px;
}
.option-col .option-title:first-child { margin-top: 0; }
.slider-row { display: flex; align-items: center; gap: 14px; }
input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 999px;
  background: var(--border-strong);
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 1px var(--border-strong);
  cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 1px var(--border-strong);
  cursor: pointer;
}
.slider-value {
  min-width: 34px;
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 6px 4px;
}
.slider-scale {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-faint);
  margin-top: -4px;
}
.select-input {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
  font-family: inherit;
}
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  cursor: pointer;
  user-select: none;
}
.checkbox-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.checkbox-box {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  flex-shrink: 0;
  transition: background .15s ease, border-color .15s ease;
}
.checkbox-box .icon { width: 13px; height: 13px; }
.checkbox-row input:checked + .checkbox-box {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.checkbox-row input:focus-visible + .checkbox-box {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}
.info-dot {
  margin-left: auto;
  color: var(--text-faint);
  display: inline-flex;
  cursor: help;
  position: relative;
}
.info-dot:hover::after,
.info-dot:focus-visible::after {
  content: attr(data-tip);
  position: absolute;
  right: 0;
  bottom: 26px;
  width: 200px;
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 8px;
  line-height: 1.4;
  z-index: 5;
}
.hint-text { font-size: 14px; color: var(--text-faint); margin: 4px 0 0; line-height: 1.5; }
.status-line {
  text-align: center;
  min-height: 20px;
  color: var(--danger);
  font-size: 14px;
  margin-top: 14px;
}
.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 64px 24px;
  text-align: center;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px 18px;
}
.feature h3 {
  font-family: var(--font-display);
  font-size: 17px;
  margin: 14px 0 8px;
}
.feature p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}
.faq { padding: 8px 24px 70px; max-width: 780px; }
.faq-title {
  text-align: center;
  font-family: var(--font-display);
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 26px;
}
.faq-orn { color: var(--gold); font-size: 15px; }
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px 20px;
}
.faq-item summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon { color: var(--text-faint); transition: transform .2s ease; }
.faq-item[open] summary .icon { transform: rotate(180deg); }
.faq-item p {
  margin: 0 0 18px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
}
.footer-inner {
  padding: 40px 24px 48px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-muted);
}
.footer-inner .icon-lg { color: var(--gold); margin-bottom: 10px; }
.footer-name { font-family: var(--font-display); font-weight: 700; color: var(--text); margin: 0 0 2px; font-size: 17px; }
.footer-tag { font-size: 14px; margin: 0 0 6px; }
.footer-jawa { font-size: 17px; margin: 0; color: var(--text-faint); }
@media (max-width: 860px) {
  .features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .header-row { padding: 14px 18px; }
  .brand-sub { display: none; }
  .nav-link { display: none; }
  .hero { padding: 36px 16px 4px; }
  .tabs { flex-direction: column; }
  .tab { justify-content: flex-start; }
  .generator-card { padding: 20px; border-radius: var(--radius-md); }
  .pw-display { padding: 18px 52px 18px 16px; }
  .options-grid { grid-template-columns: 1fr; gap: 22px; }
  .features { grid-template-columns: 1fr; padding: 44px 18px; }
  .faq { padding: 4px 18px 50px; }
}
