:root {
  --bg: #EEF1F0;
  --ink: #14231F;
  --accent: #D64933;
  --accent-ink: #7A2A17;
  --accent-2: #2E6F5E;
  --muted: #62716D;
  --line: #D7DDDA;
  --card-bg: #FFFFFF;
  --radius: 8px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

a { color: var(--accent-ink); }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  border-bottom: 1px solid var(--line);
}

.mark {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.browse-link {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.browse-link:hover { border-bottom-color: var(--muted); }

.app {
  max-width: 640px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.site-footer {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 24px 48px;
  color: var(--muted);
  font-size: 13px;
}

/* ---- Hero / address bar mock -------------------------------------- */

h1.hero-title {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(30px, 5vw, 42px);
  line-height: 1.15;
  margin: 0 0 14px;
  max-width: 20ch;
}

p.hero-sub {
  color: var(--muted);
  font-size: 17px;
  max-width: 46ch;
  margin: 0 0 32px;
}

.address-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 40px;
}

.address-bar .dots { display: flex; gap: 5px; flex-shrink: 0; }
.address-bar .dots span {
  width: 8px; height: 8px; border-radius: 50%; background: var(--line);
}

.address-bar .path {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.address-bar .path strong {
  color: var(--ink);
  font-weight: 500;
}

/* ---- Cards / steps -------------------------------------------------- */

.panel {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.panel + .panel { margin-top: 16px; }

.panel h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 20px;
  margin: 0 0 6px;
}

.panel .hint {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 20px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
}

input[type="text"], input[type="email"] {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  margin-bottom: 16px;
}
input:focus, button:focus, .dropzone:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.field-error {
  color: var(--accent-ink);
  font-size: 13px;
  margin: -12px 0 16px;
  display: none;
}

button {
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  padding: 11px 20px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
}

button.primary {
  background: var(--accent);
  color: #fff;
}
button.primary:hover { background: var(--accent-ink); }
button.primary:disabled { background: var(--line); color: var(--muted); cursor: not-allowed; }

button.secondary {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}
button.secondary:hover { border-color: var(--muted); }

button.danger {
  background: transparent;
  border: 1px solid #e4bdb2;
  color: var(--accent-ink);
}
button.danger:hover { background: #fbeeeb; }

.otp-input {
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: 6px;
  font-size: 22px;
  text-align: center;
}

.actions { display: flex; gap: 10px; margin-top: 4px; flex-wrap: wrap; }

.status-msg {
  font-size: 14px;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 6px;
  display: none;
}
.status-msg.show { display: block; }
.status-msg.ok { background: #e7f2ee; color: var(--accent-2); }
.status-msg.err { background: #fbeeeb; color: var(--accent-ink); }

/* ---- Dropzone -------------------------------------------------------- */

.dropzone {
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
  transition: border-color .15s, background .15s;
}
.dropzone.drag { border-color: var(--accent); background: #fdf3f0; }
.dropzone strong { color: var(--ink); }

.progress-track {
  height: 6px;
  background: var(--line);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 14px;
  display: none;
}
.progress-track.show { display: block; }
.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent-2);
  transition: width .15s;
}

/* ---- Dashboard --------------------------------------------------------- */

.live-url {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 15px;
  word-break: break-all;
  background: #f4f6f5;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 18px;
}

.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 100px;
}
.badge.active { background: #e7f2ee; color: var(--accent-2); }
.badge.inactive { background: #eee; color: var(--muted); }

.meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
  font-size: 13px;
  color: var(--muted);
  margin: 18px 0;
}
.meta-grid dt { margin: 0 0 2px; }
.meta-grid dd { margin: 0; color: var(--ink); font-family: 'IBM Plex Mono', monospace; }

/* ---- List / browse ----------------------------------------------------- */

.space-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.space-row:last-child { border-bottom: none; }
.space-row .slug {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
}
.space-row .updated { font-size: 12px; color: var(--muted); }

.empty {
  color: var(--muted);
  font-size: 14px;
  padding: 12px 0;
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}
.back-link:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
