:root {
  --canvas: #f7f5ef;
  --surface: #eeeee7;
  --surface-strong: #e5e7de;
  --ink: #142019;
  --muted: #68716b;
  --line: #d9ddd4;
  --green: #1f6b3a;
  --green-dark: #17562e;
  --green-soft: #e6efe7;
  --danger: #9f3f32;
  --danger-soft: #f7e9e5;
  --sidebar: 292px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 760px; min-height: 640px; background: var(--canvas); }
body { margin: 0; min-height: 100vh; background: var(--canvas); }
button, input { font: inherit; }
button { color: inherit; }

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 34px 22px 28px;
  border-right: 1px solid var(--line);
  background: rgba(247, 245, 239, .94);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 10px 42px;
  color: var(--ink);
  font-size: 23px;
  font-weight: 760;
  letter-spacing: -.035em;
  text-decoration: none;
}

.brand img { border-radius: 11px; }
.nav-list { display: grid; gap: 6px; }

.nav-item {
  padding: 13px 16px;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 0 12px 12px 0;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  font-weight: 560;
  text-align: left;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.nav-item:hover { color: var(--ink); background: rgba(31, 107, 58, .055); }
.nav-item.is-active { color: var(--ink); border-left-color: var(--green); background: var(--surface); }
.nav-item:focus-visible, .button:focus-visible, .remove-button:focus-visible, input:focus-visible, .switch input:focus-visible + .switch-track {
  outline: 3px solid rgba(31, 107, 58, .24);
  outline-offset: 2px;
}

.privacy-note {
  margin-top: auto;
  padding: 24px 12px 0;
  border-top: 1px solid var(--line);
}

.privacy-note strong { display: block; font-size: 14px; }
.privacy-note p { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }

.main { width: 100%; max-width: 1120px; margin: 0 auto; padding: 48px 74px 46px; }
.panel { display: none; animation: enter .22s ease both; }
.panel.is-visible { display: block; }
@keyframes enter { from { opacity: 0; transform: translateY(4px); } }

.eyebrow {
  margin-bottom: 20px;
  color: var(--green);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1 { max-width: 780px; margin: 0; font-size: clamp(38px, 4vw, 58px); line-height: 1.04; letter-spacing: -.055em; }
h1 span { color: var(--green); }
h2 { margin: 0; font-size: 21px; letter-spacing: -.025em; }
p { color: var(--muted); }

.hero { display: flex; align-items: center; justify-content: space-between; gap: 48px; }
.hero p { max-width: 560px; margin: 14px 0 0; font-size: 17px; line-height: 1.55; }
.switch { flex: 0 0 auto; position: relative; display: block; }
.switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch-track {
  display: block;
  width: 76px;
  height: 42px;
  padding: 5px;
  border: 1px solid #c9cec6;
  border-radius: 99px;
  background: #d9ddd6;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
.switch-track::after {
  display: block;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 5px rgba(20, 32, 25, .18);
  content: "";
  transition: transform .2s ease;
}
.switch input:checked + .switch-track { border-color: var(--green); background: var(--green); }
.switch input:checked + .switch-track::after { transform: translateX(34px); }

.shortcut-row { display: flex; align-items: center; gap: 6px; margin-top: 22px; color: var(--muted); font-size: 13px; }
.shortcut-row span:last-child { margin-left: 7px; }
kbd, code { font-family: "SFMono-Regular", Consolas, monospace; }
kbd {
  min-width: 29px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-bottom-color: #bdc4ba;
  border-radius: 6px;
  background: #fbfaf6;
  color: #4b554e;
  font-size: 11px;
  text-align: center;
}
code { padding: 2px 5px; border-radius: 5px; background: var(--surface); color: #405047; font-size: .86em; }
.section-divider { height: 1px; margin: 22px 0; background: var(--line); }
.section-heading { display: flex; justify-content: space-between; gap: 24px; align-items: start; }
.section-heading p { margin: 7px 0 0; line-height: 1.55; }
.count { flex: 0 0 auto; padding: 6px 10px; border-radius: 99px; background: var(--green-soft); color: var(--green); font-size: 12px; font-weight: 680; }

.add-form { display: grid; grid-template-columns: 1fr auto; gap: 12px; margin-top: 18px; }
input[type="text"] {
  width: 100%;
  min-height: 48px;
  padding: 0 15px;
  border: 1px solid #cfd4cc;
  border-radius: 9px;
  background: #fbfaf6;
  color: var(--ink);
}
input[type="text"]::placeholder { color: #929a94; }
.field-error { min-height: 18px; margin: 7px 0 0; color: var(--danger); font-size: 12px; }

.button {
  min-height: 45px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-weight: 680;
  cursor: pointer;
  transition: transform .14s ease, background .14s ease, border-color .14s ease;
}
.button:active { transform: translateY(1px); }
.button-primary { background: var(--green); color: white; }
.button-primary:hover { background: var(--green-dark); }
.button-secondary { border-color: #cbd1c8; background: transparent; }
.button-secondary:hover { border-color: #aab4aa; background: var(--surface); }
.button-danger { border-color: #e5c3bc; background: var(--danger-soft); color: var(--danger); }

.site-list { margin-top: 12px; border-top: 1px solid var(--line); }
.site-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 46px; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.site-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.site-pattern { overflow: hidden; font-family: "SFMono-Regular", Consolas, monospace; font-size: 13px; font-weight: 570; text-overflow: ellipsis; white-space: nowrap; }
.site-type { color: var(--muted); font-size: 11px; }
.remove-button { padding: 7px 9px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; }
.remove-button:hover { background: var(--danger-soft); color: var(--danger); }
.empty-state { padding: 32px 16px; border-bottom: 1px solid var(--line); color: var(--muted); text-align: center; }
.empty-state strong { display: block; margin-bottom: 6px; color: var(--ink); }
.save-bar { display: flex; align-items: center; gap: 22px; margin-top: 20px; }
.save-bar span { color: var(--muted); font-size: 12px; }
.save-bar span.is-success { color: var(--green); font-weight: 650; }

.help-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin: 52px 0 34px; background: var(--line); }
.help-grid article { padding: 32px; background: var(--canvas); }
.help-grid h2 { margin-top: 22px; }
.help-grid p { line-height: 1.7; }
.step { color: var(--green); font-family: "SFMono-Regular", Consolas, monospace; font-size: 12px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 32px; margin-top: 52px; padding: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.settings-row p { margin: 8px 0 0; }
.about-copy { max-width: 650px; margin: 24px 0 44px; font-size: 18px; line-height: 1.7; }
.facts { margin: 0 0 36px; border-top: 1px solid var(--line); }
.facts div { display: flex; justify-content: space-between; padding: 17px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 650; }
.text-link { color: var(--green); font-weight: 680; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 900px) {
  :root { --sidebar: 220px; }
  .main { padding: 54px 42px; }
  .brand { margin-left: 4px; }
  .hero { align-items: start; }
}

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