/* v08 - Accessible & Ethical style, Marketplace / Directory pattern (ui-ux-pro-max output).
   Every value traces to the skill output; see NOTE.md. */
/* Live site (2026-11-25): no web fonts are loaded from other hosts. The skill's fonts are used when installed on
   the visitor's device; otherwise the system fallbacks below. */

:root {
  /* Colors: skill output table, verbatim */
  --color-primary: #1E3A5F;
  --color-on-primary: #FFFFFF;
  --color-secondary: #2563EB;
  --color-on-secondary: #FFFFFF;
  --color-accent: #16A34A;
  --color-on-accent: #000000;
  --color-background: #F8FAFC;
  --color-foreground: #0F172A;
  --color-card: #FFFFFF;
  --color-card-foreground: #0F172A;
  --color-muted: #E9EEF5;
  --color-muted-foreground: #475569;
  --color-border: #CBD5E1;
  --color-destructive: #DC2626;
  --color-on-destructive: #FFFFFF;
  --color-ring: #1E3A5F;

  /* Typography: skill output (EB Garamond / Lato) */
  --font-heading: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Lato', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;

  /* Type scale: quick-reference font-scale (12 14 16 18 24 32), plus 48 for the hero */
  --text-sm: 0.875rem;  /* 14 */
  --text-base: 1rem;    /* 16 */
  --text-lg: 1.125rem;  /* 18 */
  --text-xl: 1.5rem;    /* 24 */
  --text-2xl: 2rem;     /* 32 */
  --text-hero: 3rem;    /* 48 */

  /* Spacing: quick-reference spacing-scale (4pt / 8dp increments), standard density 16-64 */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;

  /* Style "Design System Variables" */
  --focus-ring: 3px;
  --touch-target: 44px;

  /* quick-reference container-width: max-w-6xl; line-length 65-75ch */
  --container: 72rem;
  --prose: 70ch;

  /* Logo center bar uses the accent */
  --accent: var(--color-accent);

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-foreground);
  font-family: var(--font-body);
  font-size: var(--text-lg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1 0 auto; }

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 var(--space-4); }
p:last-child { margin-bottom: 0; }

a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
a:hover { color: var(--color-secondary); }

/* Key Effects: clear focus rings (3-4px) */
:focus-visible {
  outline: var(--focus-ring) solid var(--color-ring);
  outline-offset: 2px;
}
.band :focus-visible { outline-color: var(--color-on-primary); }

/* Key Effects: skip links */
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 100;
  background: var(--color-primary);
  color: var(--color-on-primary);
  padding: var(--space-3) var(--space-4);
  border-radius: 6px;
}
.skip-link:focus { top: var(--space-4); color: var(--color-on-primary); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-4);
}
@media (min-width: 768px) { .container { padding: 0 var(--space-8); } }

/* ---------- Navbar ---------- */
.site-header {
  background: var(--color-card);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-6);
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--touch-target);
  color: var(--color-primary);
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 600;
  white-space: nowrap;
}
.brand:hover { color: var(--color-primary); }
.brand svg { flex: none; }
.brand-tld {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-muted-foreground);
  margin-left: 2px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
}
.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-2);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-list a {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch-target);
  padding: 0 var(--space-2);
  color: var(--color-foreground);
  font-size: var(--text-base);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}
.nav-list a:hover { color: var(--color-secondary); border-bottom-color: var(--color-border); }
/* Supplementary rule: navigation active state */
.nav-list a[aria-current="page"] {
  color: var(--color-primary);
  font-weight: 700;
  border-bottom-color: var(--color-secondary);
}

/* Pattern: Navbar CTA ('List your item') = Recruiting, set apart */
.nav-cta {
  display: flex;
  align-items: center;
  padding-left: var(--space-4);
  border-left: 1px solid var(--color-border);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch-target);
  padding: 0 var(--space-6);
  border: 2px solid var(--color-accent);
  border-radius: 6px;
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
}
.button:hover {
  color: var(--color-on-accent);
  background: color-mix(in srgb, var(--color-accent) 85%, #000000);
  border-color: color-mix(in srgb, var(--color-accent) 85%, #000000);
}
.button[aria-current="page"] {
  background: var(--color-card);
  color: var(--color-primary);
  border-color: var(--color-accent);
}

/* ---------- Hero / page header band ---------- */
.band {
  background: var(--color-primary);
  color: var(--color-on-primary);
}
.hero { padding: var(--space-16) 0; }
.hero h1 { font-size: var(--text-hero); font-weight: 600; }
/* Page names (except the main page) are headings for screen readers only: no added visible text */
.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;
}

/* ---------- Sections ---------- */
.section { padding: var(--space-12) 0; }
.section-muted { background: var(--color-muted); }

/* Pattern: Categories (directory) */
.directory {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (min-width: 768px) { .directory { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .directory { grid-template-columns: repeat(7, minmax(0, 1fr)); } }

.directory a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  height: 100%;
  min-height: 112px;
  padding: var(--space-4);
  background: var(--color-card);
  color: var(--color-primary);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-weight: 700;
  font-size: var(--text-base);
  line-height: 1.3;
  text-decoration: none;
}
.directory a:hover { border-color: var(--color-secondary); color: var(--color-secondary); }
/* "Categories: Visual icons" slot, neutral placeholder (no imagery) */
.icon-slot {
  width: var(--touch-target);
  height: var(--touch-target);
  flex: none;
  border-radius: 6px;
  background: var(--color-muted);
  border: 1px solid var(--color-border);
}

/* Pattern: Featured Listings / listing cards */
.listings {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-6);
  align-items: start;
}
@media (min-width: 1024px) { .listings-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.card {
  background: var(--color-card);
  color: var(--color-card-foreground);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: var(--space-6);
  max-width: var(--prose);
}
@media (min-width: 768px) { .card { padding: var(--space-8); } }
.listings .card { max-width: none; }
.listings .card > * { max-width: var(--prose); }

.card h2 {
  font-size: var(--text-xl);
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}
.card h2 + ul { margin-top: 0; }

.stack { display: grid; gap: var(--space-6); }

.meta {
  display: block;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-muted-foreground);
  margin-bottom: var(--space-2);
}

.card ul {
  margin: 0 0 var(--space-4);
  padding-left: 1.25em;
}
.card ul:last-child { margin-bottom: 0; }
.card li { margin-bottom: var(--space-2); }
.card li::marker { color: var(--color-primary); }

/* Pattern: CTA (Become a host/seller) band */
.cta { padding: var(--space-12) 0; }
.cta-inner { max-width: var(--prose); }
.cta h2 { font-size: var(--text-2xl); margin-bottom: var(--space-4); }

/* ---------- Form ---------- */
.form { display: grid; gap: var(--space-6); }
.field { display: grid; gap: var(--space-2); }
.field label { font-weight: 700; font-size: var(--text-base); }
.field input,
.field textarea {
  width: 100%;
  min-height: var(--touch-target);
  padding: var(--space-3);
  border: 1px solid var(--color-muted-foreground);
  border-radius: 6px;
  background: var(--color-card);
  color: var(--color-foreground);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.5;
}
.field textarea { resize: vertical; min-height: 160px; }
.field input:hover,
.field textarea:hover { border-color: var(--color-primary); }
.form .button { justify-self: start; }

.form-status:empty { display: none; }
.form-status {
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  border-radius: 6px;
  background: var(--color-muted);
  color: var(--color-foreground);
  font-size: var(--text-base);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-card);
  border-top: 1px solid var(--color-border);
  padding: var(--space-6) 0;
}

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

@media (max-width: 767px) {
  .hero { padding: var(--space-12) 0; }
  .hero h1 { font-size: 2.5rem; }
  .section, .cta { padding: var(--space-8) 0; }
  .nav-cta { padding-left: 0; border-left: 0; }
}

/* v08b: the page buttons on every page; the current page marked; content grouped by meaning */
.section-dir { padding: var(--space-8) 0; }
.directory a[aria-current="page"] { border-color: var(--color-primary); box-shadow: inset 0 -3px 0 var(--color-secondary); }
.col { display: grid; gap: var(--space-6); align-content: start; }
.stack-logic { display: grid; gap: var(--space-6); }
.card-lead { border-left: 4px solid var(--color-primary); }
.stack-logic > .card { max-width: none; }

/* ---------- Live site additions (2026-11-25): footer legal links, working contact form, legal pages ---------- */

/* Footer: the brand, then the three legal links in one row (wrapping on narrow screens) */
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-6);
}
.footer-legal ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-4);
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-legal a {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch-target);
  color: var(--color-primary);
  font-size: var(--text-base);
}
.footer-legal a:hover { color: var(--color-secondary); }
.footer-legal a[aria-current="page"] { font-weight: 700; }

/* Contact form */
.field-note { font-weight: 400; color: var(--color-muted-foreground); }
.field-error {
  margin: 0;
  color: var(--color-destructive);
  font-size: var(--text-base);
  font-weight: 700;
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border: 2px solid var(--color-destructive); }
.form-submit { display: grid; gap: var(--space-3); justify-items: start; }
.form-note { margin: 0; font-size: var(--text-base); color: var(--color-muted-foreground); }
.form .button[disabled] { cursor: progress; }
.form-status-success { border-left-color: var(--color-accent); }
.form-status-error { border-left-color: var(--color-destructive); }
/* Hidden field for automated senders: out of sight, out of the tab order, hidden from screen readers */
.hp-field {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Legal pages */
.legal { max-width: var(--prose); overflow-wrap: anywhere; }
.legal h1 {
  font-size: var(--text-2xl);
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}
.legal h2 {
  font-size: var(--text-xl);
  color: var(--color-primary);
  margin: var(--space-8) 0 var(--space-4);
  scroll-margin-top: var(--space-4);
}
.legal h3 {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 700;
  margin: var(--space-6) 0 var(--space-3);
}
.legal .doc-meta { color: var(--color-muted-foreground); font-size: var(--text-base); }
.legal .doc-meta p { margin: 0; }
.legal ul { margin: 0 0 var(--space-4); padding-left: 1.25em; }
.legal li { margin-bottom: var(--space-2); }
.legal hr { border: 0; border-top: 1px solid var(--color-border); margin: var(--space-8) 0; }
.legal code { font-size: 0.95em; }
.toc {
  margin: var(--space-6) 0;
  padding: var(--space-4) var(--space-6);
  background: var(--color-muted);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}
.toc h2 { margin: 0 0 var(--space-2); font-size: var(--text-lg); }
.toc ol { margin: 0; padding-left: 0; list-style: none; }
.toc li { margin: 0; }
.toc a { display: inline-flex; align-items: center; min-height: var(--touch-target); }

/* Tables: rows read as label/value cards below 640px, so nothing scrolls sideways */
.legal table { width: 100%; border-collapse: collapse; margin: 0 0 var(--space-6); font-size: var(--text-base); }
.legal th, .legal td { text-align: left; vertical-align: top; padding: var(--space-3); border: 1px solid var(--color-border); }
.legal thead th { background: var(--color-muted); color: var(--color-foreground); }
@media (max-width: 639px) {
  .legal table, .legal tbody, .legal tr, .legal td { display: block; width: 100%; }
  .legal thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .legal tr { border: 1px solid var(--color-border); border-radius: 6px; margin-bottom: var(--space-3); }
  .legal td { border: 0; border-bottom: 1px solid var(--color-border); padding: var(--space-2) var(--space-3); }
  .legal tr td:last-child { border-bottom: 0; }
  .legal td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-weight: 700;
    color: var(--color-muted-foreground);
    font-size: var(--text-sm);
  }
}
