/* === Reset === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* === Custom Properties (matches signup theme) === */
:root {
  --ink: #0e0d0b;
  --paper: #f5f2ec;
  --warm-mid: #e8e2d8;
  --accent: #c4622d;
  --accent-soft: #f0d5c8;
  --muted: #8a8278;
  --rule: rgba(14,13,11,0.12);
  --card: #ffffff;
}

/* === Base === */
html { background: var(--paper); color: var(--ink); }
body {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 300;
  line-height: 1.5;
  background: var(--paper);
  color: var(--ink);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

/* Grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul { list-style: none; }

/* === Header === */
#header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 16px;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 768px) {
  #header { height: 64px; padding: 0 24px; }
}

.wordmark {
  font-family: 'Playfair Display', serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--ink);
  transition: background 0.15s;
}
.icon-btn:hover { background: var(--warm-mid); }

/* Bell icon */
.bell-btn { position: relative; text-decoration: none; }
.bell-solid { display: none; }
.bell-btn.has-unread .bell-outline { display: none; }
.bell-btn.has-unread .bell-solid { display: block; }
.bell-badge {
  position: absolute;
  top: 4px; right: 4px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: 100px;
  background: var(--accent);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 9px;
  font-weight: 500;
  line-height: 16px;
  text-align: center;
}

/* Avatar circle */
.avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* === Slide-out Menu === */
.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.menu-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.slide-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 210;
  width: 280px;
  background: var(--card);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.slide-menu.open { transform: translateX(0); }

.slide-menu-header {
  display: flex;
  justify-content: flex-end;
  padding: 12px 16px;
}

.menu-list {
  flex: 1;
}
.menu-list li { border-bottom: 1px solid var(--rule); }
.menu-list a,
.menu-link-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0 20px;
  height: 52px;
  line-height: 52px;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: var(--ink);
  transition: background 0.15s;
}
.menu-list a:hover,
.menu-link-btn:hover { background: var(--warm-mid); }

.menu-footer {
  border-top: 1px solid var(--rule);
  padding: 4px 0;
}
.sign-out {
  color: var(--muted);
  padding: 0 20px;
  height: 52px;
  line-height: 52px;
  font-size: 16px;
  width: 100%;
  text-align: left;
}
.sign-out:hover { background: var(--warm-mid); }

/* === Standing Modal === */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--card);
  border: 1.5px solid var(--ink);
  padding: 32px 24px;
  width: calc(100% - 32px);
  max-width: 400px;
  text-align: center;
  transform: translateY(12px);
  transition: transform 0.25s ease;
}
.modal-overlay.open .modal-card { transform: translateY(0); }

.modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  font-weight: 400;
  margin-bottom: 20px;
}

.standing-pill {
  display: inline-block;
  padding: 6px 18px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.standing-pill.active   { background: var(--accent); color: #fff; }
.standing-pill.building { background: var(--muted);  color: #fff; }
.standing-pill.established { background: var(--ink); color: var(--paper); }

.standing-desc {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
}

.btn-close-modal {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 10px 24px;
  border: 1.5px solid var(--ink);
  transition: background 0.2s;
}
.btn-close-modal:hover {
  background: var(--ink);
  color: var(--paper);
}

/* === Main Content === */
#main {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

/* === Nasq Back Card === */
.nasq-card {
  background: var(--card);
  border: 1.5px solid var(--ink);
  padding: 28px 24px 20px;
  margin-bottom: 32px;
}

.nasq-balance-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 20px;
}
.nasq-number {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
}
.nasq-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

.nasq-progress-wrap { margin-bottom: 16px; }
.progress-track {
  height: 4px;
  background: var(--warm-mid);
  overflow: hidden;
  margin-bottom: 6px;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.6s ease;
}
.nasq-progress-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.nasq-action {
  text-align: right;
}
.text-link {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--accent);
  font-weight: 500;
  transition: opacity 0.15s;
}
.text-link:hover { opacity: 0.7; }

/* === Feed Section === */
.feed-section { margin-bottom: 28px; }

.section-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 12px;
}

.feed-list li {
  border-bottom: 1px solid var(--rule);
}
.feed-list li:first-child {
  border-top: 1px solid var(--rule);
}

.feed-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 0;
  color: var(--ink);
}
.feed-link {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  transition: opacity 0.15s;
}
.feed-link:hover { opacity: 0.7; }

.feed-creator {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}
.feed-dot {
  color: var(--muted);
  font-size: 10px;
  flex-shrink: 0;
}
.feed-vault {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.feed-pass {
  flex-shrink: 0;
  margin-left: auto;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: var(--accent);
  color: #fff;
  padding: 3px 10px;
  border-radius: 100px;
  white-space: nowrap;
}

.feed-empty {
  font-size: 13px;
  color: var(--muted);
  padding: 16px 0;
}

/* === Discovery Row === */
.discovery-row {
  display: flex;
  gap: 8px;
}

.btn-outline {
  flex: 1;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--ink);
  transition: background 0.2s, color 0.2s;
}
.btn-outline:hover {
  background: var(--ink);
  color: var(--paper);
}

/* === Creator Star === */
.star-btn {
  flex-shrink: 0;
  margin-left: auto;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.star-btn svg { width: 18px; height: 18px; }
.star-outline { color: var(--muted); transition: opacity 0.15s; }
.star-solid { color: var(--accent); display: none; }
.star-btn[aria-pressed="true"] .star-outline { display: none; }
.star-btn[aria-pressed="true"] .star-solid { display: block; }
.star-btn:hover .star-outline { opacity: 0.7; }


/* === Responsive === */
@media (min-width: 768px) {
  #main { padding: 32px 24px 60px; }
  .nasq-number { font-size: 3rem; }
}
