/* Sadaqa Jariyah — hand-rolled stylesheet.
 *
 * Implements the Tailwind-style utility classes used in the v1 templates,
 * mapped onto the Garden warm-sand + sage palette from .thoughts/design/design-notes.md.
 *
 * No Tailwind CLI dependency — paste this file as static/styles.css and the
 * pages render with the intended visual treatment. Production deploys may
 * still build with the standalone Tailwind CLI per .thoughts/plan.md Phase 3,
 * but this stylesheet is the authoritative dev/test fallback so the site
 * never ships unstyled.
 */

@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=DM+Sans:wght@400;500;600;700&family=DM+Mono:wght@400;500&family=Noto+Naskh+Arabic:wght@400;500&display=swap");

:root {
  --bg: #F5EFE3;
  --bgCard: #FBF7EE;
  --bgSoft: #EFE8D8;
  --ink: #1F2A24;
  --inkSoft: #5C6660;
  --inkMute: #8B928C;
  --rule: #E2D9C5;
  --ruleSoft: #EBE3D1;
  --sage: #6B8E73;
  --sageDeep: #3F5D4A;
  --sageSoft: #D9E4D6;
  --clay: #C28E5C;
  --warnBg: #FBF1D6;
  --warnBorder: #E8D58A;
  --warnText: #6B5418;
  --warnHeading: #3F3208;
  --emerald-50: #ECFDF5;
  --emerald-700: #047857;
  --red-700: #B91C1C;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; }

/* =========================================================
 * Skip link & accessibility
 * ========================================================= */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.skip-link:focus,
.focus\:not-sr-only:focus {
  position: absolute;
  width: auto; height: auto;
  padding: .5rem .75rem;
  margin: 0;
  overflow: visible; clip: auto;
  white-space: normal;
  background: var(--bgCard);
  color: var(--ink);
  border-radius: 8px;
  outline: 2px solid var(--sageDeep);
  outline-offset: 2px;
  z-index: 100;
}
.skip-link { top: 8px; left: 8px; }

a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--sageDeep);
  outline-offset: 2px;
  border-radius: 4px;
}

.honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}

/* Registration intention-setting box — calm, sage-toned, contemplative.
 * Distinct from the warm-yellow caution palette so it doesn't read as a warning. */
.intention-box {
  background: var(--sageSoft);
  border: 1px solid var(--sageDeep);
  border-left-width: 4px;
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 28px;
  color: var(--ink);
}
.intention-eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--sageDeep);
}
.intention-body {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #2D3F33;
  font-family: "Fraunces", "DM Sans", serif;
  font-style: italic;
}

/* Persistent site-wide disclaimer banner — must render on every page so
 * visitors are framed before they read any profile. Warm-yellow caution
 * palette to match the per-profile cautions. */
.site-disclaimer {
  background: var(--warnBg);
  border-bottom: 1px solid var(--warnBorder);
  color: var(--warnText);
  padding: 10px 36px;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}
.site-disclaimer p { margin: 0; max-width: 980px; margin-left: auto; margin-right: auto; }
.site-disclaimer span[aria-hidden] { margin-right: 6px; }
@media (max-width: 640px) {
  .site-disclaimer { padding: 10px 16px; font-size: 12.5px; text-align: left; }
}

/* =========================================================
 * Layout primitives
 * ========================================================= */
.block { display: block; }
.inline { display: inline; }
.inline-block { display: inline-block; }
.inline-flex { display: inline-flex; }
.flex { display: flex; }
.grid { display: grid; }
.hidden { display: none; }

.flex-1 { flex: 1 1 0%; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.self-center { align-self: center; }

.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; }
.top-2 { top: .5rem; }
.top-5 { top: 1.25rem; }
.left-2 { left: .5rem; }

.overflow-hidden { overflow: hidden; }
.list-disc { list-style-type: disc; }

/* line-clamp */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.whitespace-pre-line { white-space: pre-line; }

/* =========================================================
 * Spacing scale (rem = 16px base)
 * ========================================================= */
.gap-1 { gap: .25rem; }
.gap-2 { gap: .5rem; }
.gap-3 { gap: .75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }
.gap-7 { gap: 1.75rem; }
.gap-8 { gap: 2rem; }
.gap-10 { gap: 2.5rem; }

.p-0 { padding: 0; }
.p-1 { padding: .25rem; }
.p-2 { padding: .5rem; }
.p-3 { padding: .75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.p-12 { padding: 3rem; }

.px-2 { padding-left: .5rem; padding-right: .5rem; }
.px-3 { padding-left: .75rem; padding-right: .75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-9 { padding-left: 2.25rem; padding-right: 2.25rem; }

.py-0\.5 { padding-top: .125rem; padding-bottom: .125rem; }
.py-1 { padding-top: .25rem; padding-bottom: .25rem; }
.py-1\.5 { padding-top: .375rem; padding-bottom: .375rem; }
.py-2 { padding-top: .5rem; padding-bottom: .5rem; }
.py-3 { padding-top: .75rem; padding-bottom: .75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }

.pt-3 { padding-top: .75rem; }
.pt-4 { padding-top: 1rem; }
.pb-3 { padding-bottom: .75rem; }
.pl-6 { padding-left: 1.5rem; }

.m-0 { margin: 0; }
.mx-auto { margin-left: auto; margin-right: auto; }
.my-6 { margin-top: 1.5rem; margin-bottom: 1.5rem; }
.mt-1 { margin-top: .25rem; }
.mt-2 { margin-top: .5rem; }
.mt-3 { margin-top: .75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-7 { margin-top: 1.75rem; }
.mt-8 { margin-top: 2rem; }
.mb-8 { margin-bottom: 2rem; }

/* Spacer between siblings — Tailwind's space-y-N, used implicitly via .space-y-* in form templates */
.space-y-2 > * + * { margin-top: .5rem; }
.space-y-3 > * + * { margin-top: .75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-5 > * + * { margin-top: 1.25rem; }

/* =========================================================
 * Sizing
 * ========================================================= */
.w-full { width: 100%; }
.w-\[6px\] { width: 6px; }
.w-\[68px\] { width: 68px; }
.w-\[380px\] { width: 380px; }
.w-11 { width: 2.75rem; }

.h-\[6px\] { height: 6px; }
.h-\[68px\] { height: 68px; }
.h-11 { height: 2.75rem; }

.min-w-\[180px\] { min-width: 180px; }
.min-w-\[220px\] { min-width: 220px; }

.max-w-full { max-width: 100%; }
.max-w-\[360px\] { max-width: 360px; }
.max-w-\[480px\] { max-width: 480px; }
.max-w-\[580px\] { max-width: 580px; }
.max-w-\[640px\] { max-width: 640px; }
.max-w-\[680px\] { max-width: 680px; }
.max-w-\[720px\] { max-width: 720px; }
.max-w-\[820px\] { max-width: 820px; }
.max-w-\[980px\] { max-width: 980px; }
.max-w-\[1080px\] { max-width: 1080px; }

/* =========================================================
 * Grid
 * ========================================================= */
.grid-cols-1 { grid-template-columns: minmax(0,1fr); }
.grid-cols-\[52px_1fr_220px_auto\] { grid-template-columns: 52px 1fr 220px auto; }
@media (min-width: 768px) {
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .md\:grid-cols-\[1fr_320px\] { grid-template-columns: 1fr 320px; }
}

/* =========================================================
 * Typography
 * ========================================================= */
.text-\[11\.5px\] { font-size: 11.5px; }
.text-\[12px\] { font-size: 12px; }
.text-\[12\.5px\] { font-size: 12.5px; }
.text-\[13px\] { font-size: 13px; }
.text-\[13\.5px\] { font-size: 13.5px; }
.text-\[14px\] { font-size: 14px; }
.text-\[14\.5px\] { font-size: 14.5px; }
.text-\[15px\] { font-size: 15px; }
.text-\[16px\] { font-size: 16px; }
.text-\[17px\] { font-size: 17px; }
.text-\[18px\] { font-size: 18px; }
.text-\[19px\] { font-size: 19px; }
.text-\[20px\] { font-size: 20px; }
.text-\[22px\] { font-size: 22px; }
.text-\[26px\] { font-size: 26px; }
.text-\[32px\] { font-size: 32px; line-height: 1.1; }
.text-\[34px\] { font-size: 34px; line-height: 1.1; }
.text-\[38px\] { font-size: 38px; line-height: 1.1; }
.text-\[40px\] { font-size: 40px; line-height: 1.05; }
.text-\[60px\] { font-size: 60px; line-height: 1.05; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-mono { font-family: "DM Mono", ui-monospace, SFMono-Regular, monospace; }
.italic { font-style: italic; }
.uppercase { text-transform: uppercase; }
.tracking-tight { letter-spacing: -0.02em; }
.tracking-widest { letter-spacing: 0.08em; }

.leading-\[1\.05\] { line-height: 1.05; }
.leading-\[1\.1\] { line-height: 1.1; }
.leading-\[1\.6\] { line-height: 1.6; }
.leading-tight { line-height: 1.2; }

/* =========================================================
 * Colors
 * ========================================================= */
.bg-bg { background: var(--bg); }
.bg-bgCard { background: var(--bgCard); }
.bg-bgSoft { background: var(--bgSoft); }
.bg-sage { background: var(--sage); }
.bg-sage-deep { background: var(--sageDeep); }
.bg-sage-soft { background: var(--sageSoft); }
.bg-emerald-50 { background: var(--emerald-50); }
.bg-transparent { background: transparent; }
.bg-\[\#FBF1D6\] { background: var(--warnBg); }

.text-ink { color: var(--ink); }
.text-inkSoft { color: var(--inkSoft); }
.text-inkMute { color: var(--inkMute); }
.text-bgCard { color: var(--bgCard); }
.text-bgCard\/70 { color: rgba(251,247,238,0.7); }
.text-sage-deep { color: var(--sageDeep); }
.text-sage-deep\/70 { color: rgba(63,93,74,0.7); }
.text-clay { color: var(--clay); }
.text-emerald-700 { color: var(--emerald-700); }
.text-red-700 { color: var(--red-700); }
.text-\[\#3F3208\] { color: var(--warnHeading); }
.text-\[\#6B5418\] { color: var(--warnText); }

.border { border: 1px solid var(--rule); }
.border-2 { border: 2px solid var(--rule); }
.border-rule { border-color: var(--rule); }
.border-ruleSoft { border-color: var(--ruleSoft); }
.border-sage-deep { border-color: var(--sageDeep); }
.border-bgCard\/40 { border-color: rgba(251,247,238,0.4); }
.border-\[\#E8D58A\] { border-color: var(--warnBorder); }
.border-t { border-top: 1px solid var(--rule); }
.border-b { border-bottom: 1px solid var(--rule); }
.border-dashed { border-style: dashed; }

/* =========================================================
 * Border radius
 * ========================================================= */
.rounded-md { border-radius: 6px; }
.rounded-full { border-radius: 9999px; }
.rounded-\[8px\] { border-radius: 8px; }
.rounded-\[10px\] { border-radius: 10px; }
.rounded-\[12px\] { border-radius: 12px; }
.rounded-\[14px\] { border-radius: 14px; }

/* =========================================================
 * Misc
 * ========================================================= */
.opacity-60 { opacity: 0.6; }
.outline-none { outline: none; }

/* Wordmark */
.wordmark { display: inline-flex; }
.wordmark-mark { flex: none; }

/* Site nav */
.site-nav {
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 36px;
  border-bottom: 1px solid var(--rule);
}
.nav-links a, .nav-links button {
  background: transparent;
  border: 0;
  color: var(--inkSoft);
  font-weight: 500;
  cursor: pointer;
}
.nav-links a:hover, .nav-links button:hover { color: var(--ink); text-decoration: none; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--bg);
  padding: 24px 36px;
  font-size: 12.5px;
  color: var(--inkMute);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 64px;
}
.site-footer a { color: var(--inkMute); }
.site-footer a:hover { color: var(--ink); }

/* Buttons (component shortcuts) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.15s ease;
}
.btn:hover { opacity: 0.9; text-decoration: none; }
.btn-primary { background: var(--sageDeep); color: var(--bgCard); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--rule); }
.btn-outline { background: transparent; }

/* Form inputs */
.form-input {
  font: inherit;
  background: var(--bgCard);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--ink);
  width: 100%;
}
.form-input:focus { outline: 2px solid var(--sageDeep); outline-offset: 1px; }
textarea.form-input { resize: vertical; min-height: 120px; }
select.form-input { padding-right: 2.5rem; appearance: auto; }
label { display: block; }

/* Live count pill */
.live-count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bgCard);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12.5px;
  color: var(--sageDeep);
  font-weight: 500;
}
.dot {
  width: 6px; height: 6px; border-radius: 999px; background: var(--sage);
}

/* Hero */
.hero {
  background: var(--bgSoft);
  padding: 64px 36px 56px;
  border-bottom: 1px solid var(--rule);
  text-align: center;
}
.hero h1 { font-weight: 600; letter-spacing: -0.035em; margin: 20px auto 0; max-width: 820px; }

/* Numbered cards on home */
.how { padding: 50px 36px 80px; }
.card {
  background: var(--bgCard);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 24px;
}

/* Directory */
.directory header h1 { font-size: 32px; font-weight: 600; letter-spacing: -0.025em; }
.search-input {
  background: var(--bgCard);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.search-input input { flex: 1; background: transparent; border: 0; outline: none; font-size: 14px; }
.clear-btn { background: transparent; border: 0; color: var(--sageDeep); font-weight: 500; cursor: pointer; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--rule);
  background: var(--bgCard);
  color: var(--inkSoft);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}
.chip:hover { color: var(--ink); text-decoration: none; }

.listing { background: var(--bgCard); border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; }
.row {
  display: grid;
  grid-template-columns: 52px 1fr 220px auto;
  gap: 18px;
  padding: 18px 20px;
  align-items: center;
}
.row + .row { border-top: 1px solid var(--ruleSoft); }
.avatar {
  width: 44px; height: 44px;
  background: var(--sageSoft);
  color: var(--sageDeep);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
}
.tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.tag {
  background: var(--sageSoft);
  color: var(--sageDeep);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 500;
}

.empty { padding: 60px; text-align: center; }
.empty p { font-style: italic; color: var(--inkSoft); font-size: 17px; font-family: "Fraunces", serif; }

.pagination { margin-top: 24px; display: flex; align-items: center; justify-content: space-between; font-size: 13px; }

/* Profile page */
.profile { padding: 32px 36px 64px; }
.crumb { font-size: 13px; color: var(--inkSoft); }
.profile-grid { display: grid; gap: 40px; align-items: start; margin-top: 24px; }
.col-left .header { display: flex; align-items: center; gap: 16px; }
.col-left .avatar { width: 68px; height: 68px; border-radius: 12px; font-size: 20px; }
.display-name { font-size: 34px; font-weight: 600; letter-spacing: -0.025em; display: flex; align-items: center; gap: 8px; }
.bio { font-size: 17px; line-height: 1.6; color: var(--inkSoft); margin-top: 24px; max-width: 580px; white-space: pre-line; }
.eyebrow { text-transform: uppercase; font-size: 11.5px; font-weight: 600; color: var(--inkMute); letter-spacing: 0.06em; }
.service-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.service-tags .tag { padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 500; }
.scheduling-note {
  background: var(--bgCard);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 13px;
  color: var(--inkSoft);
  margin-top: 32px;
  max-width: 580px;
}

.sticky-cta {
  position: sticky;
  top: 20px;
  background: var(--sageDeep);
  color: var(--bgCard);
  border-radius: 14px;
  padding: 24px;
}
.sticky-cta .eyebrow { color: var(--sageSoft); }
.sticky-cta .display-headline { font-weight: 600; font-size: 22px; letter-spacing: -0.02em; margin-top: 8px; color: var(--bgCard); }
.sticky-cta .btn-primary { background: var(--bgCard); color: var(--ink); width: 100%; padding: 14px; border-radius: 10px; font-size: 15px; font-weight: 600; margin-top: 18px; text-align: center; display: block; }

/* Consent gate (sits inside the dark sticky CTA card). */
.consent-block {
  margin-top: 18px;
  background: rgba(251, 247, 238, 0.08);
  border: 1px solid rgba(251, 247, 238, 0.25);
  border-radius: 10px;
  padding: 12px 14px;
}
.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  color: var(--bgCard);
  font-size: 12.5px;
  line-height: 1.45;
}
.consent-label input[type="checkbox"] {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--bgCard);
  cursor: pointer;
}
.consent-text { flex: 1; }

/* Schedule button locked state — visually disabled until consent is checked. */
.schedule-btn.is-locked {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.4);
}
.schedule-btn:not(.is-locked) {
  cursor: pointer;
  opacity: 1;
}

.schedule-hint {
  display: block;
  text-align: center;
  margin-top: 8px;
  font-size: 12px;
  color: rgba(251, 247, 238, 0.85);
  transition: color 120ms ease;
}
.schedule-hint.is-warning {
  color: #FBE7B0;
  font-weight: 500;
}
.schedule-hint.is-flash {
  animation: schedule-hint-flash 360ms ease;
}
@keyframes schedule-hint-flash {
  0% { transform: translateX(0); }
  20% { transform: translateX(-3px); color: #FFD27A; }
  40% { transform: translateX(3px); }
  60% { transform: translateX(-2px); }
  80% { transform: translateX(2px); }
  100% { transform: translateX(0); }
}
.sticky-cta .btn-outline {
  background: transparent;
  color: var(--bgCard);
  border: 1px solid rgba(251,247,238,0.4);
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  margin-top: 14px;
  text-align: center;
  display: block;
}
.sticky-cta p { color: rgba(251,247,238,0.7); font-size: 11.5px; margin-top: 8px; }

/* Cautions */
.caution-panel {
  background: var(--warnBg);
  border: 1px solid var(--warnBorder);
  color: var(--warnText);
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 16px;
  max-width: 580px;
  font-size: 13.5px;
  line-height: 1.55;
}
.caution-panel + .caution-panel { margin-top: 12px; }

/* Banner (warning palette) */
.banner-warning {
  background: var(--warnBg);
  border: 1px solid var(--warnBorder);
  border-radius: 10px;
  padding: 18px 20px;
  margin-top: 24px;
}
.banner-warning h2 { color: var(--warnHeading); font-weight: 600; font-size: 16px; margin: 0; }
.banner-warning p { color: var(--warnText); font-size: 14px; margin-top: 4px; }
.banner-warning a { color: var(--warnText); text-decoration: underline; }

/* Owner empty card */
.owner-empty-card {
  background: var(--bgCard);
  border: 2px dashed var(--rule);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  max-width: 480px;
  margin: 32px auto 0;
}

/* Verified badge pill */
.badge-verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--emerald-50);
  color: var(--emerald-700);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}

/* Login wrap */
.login-wrap {
  background: var(--bgSoft);
  padding: 64px 24px;
  display: flex;
  justify-content: center;
}
.login-card {
  width: 380px;
  max-width: 100%;
  background: var(--bgCard);
  border-radius: 14px;
  padding: 32px;
  border: 1px solid var(--rule);
}

/* Settings */
.settings { padding: 32px 36px 80px; }
.settings .url-preview {
  font-family: "DM Mono", monospace;
  font-size: 13px;
  color: var(--inkSoft);
  margin-top: 8px;
}
.settings .url-preview span { color: var(--sageDeep); }

.services-fieldset {
  margin-top: 16px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 22px 24px;
  background: var(--bgCard);
}
.services-fieldset legend { padding: 0 8px; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.services-help { font-size: 12.5px; color: var(--inkSoft); margin: 4px 0 18px; line-height: 1.5; }
.services-help strong { color: var(--ink); font-weight: 600; }

.formset-rows { display: flex; flex-direction: column; gap: 0; }
.formset-errors {
  background: var(--warnBg);
  border: 1px solid var(--warnBorder);
  color: var(--warnText);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 12px;
}

.service-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
}
.service-row + .service-row { border-top: 1px solid var(--ruleSoft); }

.service-row-fields {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(180px, 2fr);
  gap: 12px;
}
@media (max-width: 540px) {
  .service-row-fields { grid-template-columns: 1fr; }
}
.service-row-field { display: flex; flex-direction: column; }
.row-label { display: block; font-size: 12px; color: var(--inkSoft); margin-bottom: 4px; font-weight: 500; }
.service-row .form-input { padding: 9px 12px; font-size: 14px; }
.field-error { color: #B91C1C; font-size: 12.5px; margin-top: 4px; display: block; }

.service-row-remove {
  flex: none;
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--inkSoft);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 18px;
  margin-top: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: color 120ms ease, border-color 120ms ease, background 120ms ease;
}
.service-row-remove:hover {
  color: #B91C1C;
  border-color: #B91C1C;
  background: rgba(185, 28, 28, 0.05);
}
.service-row-remove:focus-visible {
  outline: 2px solid var(--sageDeep);
  outline-offset: 2px;
}

.service-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px dashed var(--sageDeep);
  color: var(--sageDeep);
  padding: 9px 16px;
  border-radius: 10px;
  margin-top: 14px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 120ms ease;
}
.service-add-btn:hover { background: var(--sageSoft); text-decoration: none; }
.service-add-btn[disabled],
.service-add-btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  background: transparent;
}
.service-add-btn span[aria-hidden] { font-size: 16px; line-height: 1; }

.actions { display: flex; gap: 12px; padding-top: 16px; border-top: 1px solid var(--rule); margin-top: 24px; }
.actions .btn { padding: 12px 20px; }

/* Form errors */
.form-errors {
  background: var(--warnBg);
  border: 1px solid var(--warnBorder);
  color: var(--warnText);
  border-radius: 10px;
  padding: 12px;
  font-size: 13.5px;
}

.msg {
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 8px;
}
.msg-warning { background: var(--warnBg); border: 1px solid var(--warnBorder); color: var(--warnText); }
.msg-success { background: var(--sageSoft); color: var(--sageDeep); }
.msg-error { background: #fde2e2; color: #842029; border: 1px solid #f5c2c7; }

.messages { padding: 12px 36px; max-width: 980px; margin: 0 auto; }

/* Error pages */
.error-page { padding: 80px 36px; max-width: 680px; margin: 0 auto; text-align: center; }
.error-page h1 { font-size: 40px; font-weight: 600; margin-top: 12px; }

/* Privacy / Terms */
.prose { font-size: 14.5px; line-height: 1.6; color: var(--inkSoft); padding: 48px 36px 64px; max-width: 680px; margin: 0 auto; }
.prose h2 { color: var(--ink); font-size: 19px; font-weight: 600; margin: 0; letter-spacing: -0.02em; }
.prose .block-section { padding: 12px 0 22px; border-bottom: 1px solid var(--rule); margin-bottom: 22px; }
.prose .block-section:last-child { border-bottom: 0; }
.prose ul { padding-left: 24px; }

/* Hover utility classes already used */
.hover\:text-ink:hover { color: var(--ink); }

/* Responsive: collapse the sticky CTA into the flow on small screens */
@media (max-width: 767px) {
  .profile-grid { grid-template-columns: minmax(0,1fr) !important; }
  .sticky-cta { position: static; margin-top: 24px; }
  .row {
    grid-template-columns: 52px 1fr;
    grid-template-areas:
      "avatar info"
      "tags tags"
      "action action";
  }
  .row .avatar { grid-area: avatar; }
  .row .tags { grid-area: tags; }
  .row .action { grid-area: action; justify-self: end; }
  .nav-links { gap: 14px; }
  .hero h1 { font-size: 40px !important; }
}
