/* Care Symbol Decoder — Stylesheet */
:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --surface-alt: #f3efe8;
  --text: #2c2825;
  --text-muted: #6b6560;
  --text-light: #9a948e;
  --accent: #c4652a;
  --accent-hover: #a85320;
  --accent-light: #fff3eb;
  --border: #e5e0d8;
  --border-dark: #d0c8bc;
  --success: #3a8a5c;
  --danger: #c0392b;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.10);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
  --max-width: 1200px;
  --header-h: 64px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

.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; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 1.1rem;
  white-space: nowrap;
}
.logo:hover { text-decoration: none; color: var(--text); }
.logo-icon { color: var(--accent); flex-shrink: 0; }
.main-nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.main-nav a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.main-nav a:hover { background: var(--surface-alt); color: var(--text); text-decoration: none; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.2s; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.15s;
  text-decoration: none;
  line-height: 1.3;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-dark); }
.btn-secondary:hover { background: var(--surface-alt); color: var(--text); }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 80px 20px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.hero-content { max-width: 640px; position: relative; z-index: 2; }
.hero h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.2;
  margin-bottom: 16px;
  color: var(--text);
}
.hero-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 520px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-symbols { position: absolute; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; z-index: 1; }
.floating-symbol {
  position: absolute;
  left: var(--x);
  top: var(--y);
  color: var(--accent);
  opacity: 0.12;
  animation: float 8s ease-in-out infinite;
  animation-delay: var(--d);
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

/* Sections */
section { padding: 60px 20px; }
.section-header { max-width: var(--max-width); margin: 0 auto 32px; }
.section-header h2 { font-size: 1.6rem; margin-bottom: 8px; }
.section-header p { color: var(--text-muted); font-size: 1.05rem; }

/* Quick Decoder */
.quick-decoder { max-width: var(--max-width); margin: 0 auto; }
.decoder-input-wrap {
  display: flex;
  gap: 12px;
  max-width: 700px;
  margin: 0 auto 24px;
}
.decoder-input {
  flex: 1;
  padding: 14px 18px;
  border: 2px solid var(--border-dark);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: var(--font);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s;
}
.decoder-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(196,101,42,0.15); }
.decoder-results { max-width: 700px; margin: 0 auto; }
.decoder-empty { text-align: center; color: var(--text-light); padding: 32px; background: var(--surface-alt); border-radius: var(--radius); }

/* Symbol Browser */
.symbol-browser { max-width: var(--max-width); margin: 0 auto; }
.browser-layout { display: grid; grid-template-columns: 200px 1fr; gap: 32px; }
.category-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: calc(var(--header-h) + 20px);
  align-self: start;
}
.cat-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: none;
  background: none;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font);
  color: var(--text-muted);
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
}
.cat-btn:hover { background: var(--surface-alt); color: var(--text); }
.cat-btn.active { background: var(--accent-light); color: var(--accent); font-weight: 600; }
.cat-icon { font-size: 1.1rem; }

.symbol-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.symbol-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.symbol-card:hover { box-shadow: var(--shadow); border-color: var(--border-dark); }
.symbol-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
.symbol-svg { flex-shrink: 0; }
.symbol-name { font-weight: 600; font-size: 0.95rem; }
.symbol-detail { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 10px; }
.symbol-consequence {
  font-size: 0.82rem;
  padding: 8px 12px;
  background: #fef2f2;
  border-radius: var(--radius-sm);
  color: var(--danger);
  border-left: 3px solid var(--danger);
}
.symbol-consequence::before { content: "If ignored: "; font-weight: 600; }

/* Fabric Reference */
.fabric-reference { max-width: var(--max-width); margin: 0 auto; }
.fabric-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.fabric-tab {
  padding: 10px 20px;
  border: 2px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font);
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s;
}
.fabric-tab:hover { border-color: var(--border-dark); color: var(--text); }
.fabric-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.fabric-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.fabric-panel h3 { margin-bottom: 8px; font-size: 1.2rem; }
.fabric-panel p { color: var(--text-muted); margin-bottom: 20px; }
.fabric-symbols { display: flex; flex-wrap: wrap; gap: 12px; }
.fabric-symbol-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--surface-alt);
  border-radius: 20px;
  font-size: 0.85rem;
  border: 1px solid var(--border);
}

/* Print Section */
.print-section { max-width: var(--max-width); margin: 0 auto; }
.print-actions { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.print-card {
  background: var(--surface);
  border: 2px solid var(--border-dark);
  border-radius: var(--radius);
  padding: 32px;
}
.print-card h3 { text-align: center; margin-bottom: 24px; font-size: 1.3rem; }
.print-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.print-item {
  text-align: center;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.print-item svg { margin-bottom: 8px; }
.print-item-name { font-size: 0.8rem; font-weight: 600; }
.print-footer { text-align: center; font-size: 0.75rem; color: var(--text-light); }

/* Guide Content */
.guide-content { max-width: var(--max-width); margin: 0 auto; }
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.guide-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.guide-card h3 { font-size: 1.05rem; margin-bottom: 10px; color: var(--accent); }
.guide-card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.7; }

/* FAQ */
.faq-section { max-width: var(--max-width); margin: 0 auto; }
.faq-list { max-width: 800px; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%;
  text-align: left;
  padding: 18px 0;
  background: none;
  border: none;
  font-size: 1rem;
  font-family: var(--font);
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-q::after { content: "+"; font-size: 1.3rem; color: var(--accent); flex-shrink: 0; transition: transform 0.2s; }
.faq-q[aria-expanded="true"]::after { content: "−"; }
.faq-a { padding: 0 0 18px; font-size: 0.9rem; color: var(--text-muted); line-height: 1.7; }

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 40px 20px;
  margin-top: 40px;
}
.footer-inner { max-width: var(--max-width); margin: 0 auto; }
.footer-brand { margin-bottom: 20px; }
.footer-brand p { color: var(--text-light); font-size: 0.85rem; margin-top: 4px; }
.footer-nav { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 16px; }
.footer-nav a { font-size: 0.85rem; color: var(--text-muted); }
.footer-note { font-size: 0.78rem; color: var(--text-light); }

/* Print styles */
@media print {
  .site-header, .hero-symbols, .quick-decoder, .symbol-browser, .fabric-reference, .print-actions, .guide-content, .faq-section, .site-footer, .nav-toggle { display: none !important; }
  .print-section { display: block !important; }
  .print-card { border: 2px solid #333; }
  body { background: #fff; }
}

/* Responsive */
@media (max-width: 768px) {
  .main-nav { display: none; }
  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px 20px;
    box-shadow: var(--shadow-lg);
  }
  .nav-toggle { display: flex; margin-left: auto; }
  .hero { padding: 48px 20px; }
  .hero h1 { font-size: 1.7rem; }
  .browser-layout { grid-template-columns: 1fr; }
  .category-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .cat-btn { flex: 1; min-width: 120px; justify-content: center; }
  .decoder-input-wrap { flex-direction: column; }
  .symbol-grid { grid-template-columns: 1fr; }
  .guide-grid { grid-template-columns: 1fr; }
  section { padding: 40px 16px; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; }
  .fabric-tabs { flex-direction: column; }
  .fabric-tab { text-align: center; }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
