:root {
  --bg:           #f7f7f4;
  --surface:      #ffffff;
  --surface-2:    #f1f1ed;
  --border:       #e4e5e7;
  --text:         #0d0f12;
  --text-2:       #545b66;
  --muted:        #8b93a1;
  --shadow:       0 10px 30px rgba(16,24,40,0.07);
  --sage:         #5a9e82;
  --sage-bg:      #edf6f1;
  --sage-border:  #c4dfd3;
  --danger:       #c94040;
  --danger-bg:    #fdf1f1;
  --danger-border:#f5c0c0;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-weight: 400;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  padding-top: 60px;
}

.spiral-bg { display: none; }

/* ── Nav ── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(247,247,244,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-logo svg { width: 26px; height: 26px; }

.nav-logo-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.nav-links { display: flex; align-items: center; gap: 24px; }

.nav-links a {
  font-size: 14px;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.18s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--text); }

.nav-cta {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--sage-border);
  background: var(--sage-bg);
  color: var(--sage) !important;
  font-weight: 500;
  font-size: 13px;
  transition: background 0.18s, border-color 0.18s !important;
}

.nav-cta:hover {
  background: #d8ede5;
  border-color: var(--sage);
}

/* ── Container ── */
.container {
  max-width: 740px;
  margin: 0 auto;
  padding: 56px 32px 80px;
  position: relative;
  z-index: 1;
}

/* ── Header ── */
header {
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

header h1 {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 8px;
}

header h1 em { font-style: italic; color: var(--sage); }

.subtitle {
  font-size: 16px;
  color: var(--text-2);
  line-height: 1.65;
}

.meta {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}

/* ── TOC ── */
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 28px;
  margin-bottom: 32px;
}

.toc-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.toc ol {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 24px;
  padding-left: 20px;
}

.toc a {
  font-size: 13px;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.18s;
}

.toc a:hover { color: var(--sage); }

/* ── Card ── */
.card {
  background: var(--sage-bg);
  border: 1px solid var(--sage-border);
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
  margin: 20px 0;
}

.card strong { color: var(--text); }

/* ── Warning ── */
.warning {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 32px;
}

.warning strong { color: var(--danger); }

/* ── Sections ── */
.section { margin-bottom: 40px; }

section {
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}

section:last-of-type { border-bottom: none; }

h2 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}

.num {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--sage);
  background: var(--sage-bg);
  border: 1px solid var(--sage-border);
  border-radius: 6px;
  padding: 2px 8px;
}

.section h2 { font-size: 19px; font-weight: 700; margin-bottom: 14px; color: var(--text); }

p { font-size: 15px; color: var(--text-2); margin-bottom: 12px; }
p:last-child { margin-bottom: 0; }

ul, ol {
  padding-left: 20px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

li { font-size: 15px; color: var(--text-2); }
li strong { color: var(--text); }

code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 7px;
  font-size: 13px;
  font-family: ui-monospace, monospace;
  color: var(--text);
}

/* ── Steps ── */
.step {
  display: flex;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.step:last-child { border-bottom: none; }

.step-num {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
}

.step-num.danger {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger);
}

.step-content h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.step-content p { font-size: 14px; margin: 0; }

/* ── Data table ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-top: 12px;
}

.data-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 12px 14px;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--surface-2); }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.badge-deleted {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}

/* ── Email / Contact box ── */
.email-box, .contact-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.email-box p, .contact-box p { font-size: 15px; color: var(--text-2); margin: 0; }

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  width: fit-content;
  transition: opacity 0.18s;
}

.btn:hover { opacity: 0.8; }

.note {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

.contact-box a {
  font-size: 16px;
  font-weight: 600;
  color: var(--sage);
  text-decoration: none;
}

.contact-box a:hover { text-decoration: underline; }

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13,15,18,0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px 32px 28px;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(16,24,40,0.14);
  transform: scale(0.95);
  transition: transform 0.2s;
}

.modal-overlay.active .modal { transform: scale(1); }

.modal-icon { font-size: 28px; margin-bottom: 12px; }

.modal h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  color: var(--text);
}

.modal p { font-size: 14px; color: var(--text-2); margin-bottom: 14px; }

.modal-checklist {
  list-style: none;
  padding: 0;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-checklist li {
  font-size: 14px;
  color: var(--text-2);
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--surface-2);
}

.modal-checklist li::before { content: "✕  "; color: var(--danger); font-size: 11px; }

.modal-final-warning {
  font-size: 13px;
  color: var(--danger);
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 20px;
}

.modal-actions { display: flex; gap: 10px; }

.btn-cancel {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}

.btn-cancel:hover { background: var(--border); color: var(--text); }

.btn-confirm-delete {
  flex: 1.4;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--danger-border);
  background: var(--danger-bg);
  color: var(--danger);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}

.btn-confirm-delete:hover { background: var(--danger); color: #fff; }

/* ── Utility ── */
.link-accent { color: var(--sage); text-decoration: underline; }
.text-danger  { color: var(--danger); }
.flex-gap     { display: flex; gap: 20px; }
.section-subheading {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 20px 0 8px;
}

/* ── Delete confirmation result ── */
.request-noted { border-color: var(--sage-border) !important; background: var(--sage-bg) !important; }
.request-noted-title { color: var(--sage); font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.request-noted-link  { color: var(--sage); text-decoration: underline; }
.note--spaced        { margin-top: 12px; }
.text-strong         { color: var(--text); font-weight: 600; }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding-top: 28px;
  margin-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

footer p { font-size: 13px; color: var(--muted); margin: 0; }
footer a  { color: var(--text-2); text-decoration: none; font-size: 13px; }
footer a:hover { color: var(--text); }

/* ── Responsive ── */
@media (max-width: 560px) {
  .nav-links { gap: 14px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .container { padding: 40px 20px 60px; }
}

@media (max-width: 520px) { .toc ol { grid-template-columns: 1fr; } }

@media (max-width: 480px) {
  .modal { padding: 28px 20px 20px; }
  .modal-actions { flex-direction: column-reverse; }
}
