:root {
  --bg: #f4f1e9;
  --surface: #fbfaf6;
  --card: #ffffff;
  --ink: #121313;
  --muted: #52514d;
  --border: #ddd8cc;
  --primary: #121313;
  --primary-hover: #2d2e2e;
  --accent: #a64424;
  --accent-soft: #f3e4dc;
  --sage-soft: #e2ebe4;
  --sand-soft: #efe7d5;
  --stone-soft: #e7e4dd;
  --radius: 20px;
  --radius-sm: 12px;
  --font-display: 'Bricolage Grotesque', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, canvas, video, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--ink); text-decoration: underline; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin: 0 0 16px;
}
h1 { font-size: 48px; font-weight: 700; }
h2 { font-size: 32px; font-weight: 700; }
h3 { font-size: 20px; font-weight: 600; }
p { margin: 0 0 16px; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* Editorial Borderless Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.03em;
}
.brand:hover { color: var(--ink); text-decoration: none; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.nav-link {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-link:hover { color: var(--ink); background: var(--stone-soft); text-decoration: none; }
.nav-link.is-active { color: var(--ink); background: var(--card); border: 1px solid var(--border); font-weight: 600; }
.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--card);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.header-cta:hover { background: var(--primary-hover); color: var(--card); text-decoration: none; }
.header-cta.is-active { background: var(--accent); color: var(--card); }
.nav-mobile-only { display: none; }
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--ink); border-radius: 2px; }

/* Tactile Pill Buttons */
.btn-primary, .btn-outline, .btn-accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  text-decoration: none;
}
.btn-primary { background: var(--primary); color: var(--card); border: 1px solid var(--primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--card); text-decoration: none; }
.btn-outline { background: var(--card); color: var(--ink); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--ink); color: var(--ink); text-decoration: none; }
.btn-outline[data-gf-liked], .btn-outline[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.btn-accent { background: var(--accent); color: var(--card); border: 1px solid var(--accent); }
.btn-accent:hover { background: var(--primary); border-color: var(--primary); color: var(--card); text-decoration: none; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Hero */
.hero-tool { padding: 36px 0 40px; }
.page-hero { padding: 48px 0 36px; border-bottom: 1px solid var(--border); background: var(--bg); }
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.breadcrumb-center { justify-content: center; margin-bottom: 12px; }
.hero-head { text-align: center; max-width: 760px; margin: 0 auto 32px; }
.hero-kicker, .section-kicker {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}
.hero-head h1 { margin-bottom: 14px; }
.hero-lead { font-size: 18px; color: var(--muted); max-width: 60ch; margin: 0 auto; }
.page-hero .hero-lead { margin: 0; }
.legal-meta { font-size: 14px; color: var(--muted); margin: 0; }

/* Studio Instrument Stage */
.tool-stage {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.fsl-app { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: 28px; align-items: stretch; }
.fsl-stage-col { display: flex; flex-direction: column; gap: 16px; }
.fsl-dropzone {
  position: relative;
  border: 1.5px dashed var(--border);
  border-radius: 16px;
  background: var(--card);
  min-height: 390px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.fsl-dropzone.is-dragover { border-color: var(--accent); background: var(--accent-soft); }
.fsl-dropzone.has-result { border-style: solid; border-color: var(--ink); padding: 14px; background: var(--ink); }
.fsl-empty-state { max-width: 380px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.fsl-caliper-icon {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.fsl-empty-title { font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); margin: 0; }
.fsl-empty-sub { font-size: 14px; color: var(--muted); margin: 0; }
.fsl-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 8px; }
.fsl-photo-tips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.fsl-photo-tips span strong { color: var(--ink); display: block; font-size: 13px; margin-bottom: 2px; }
.fsl-canvas-wrap { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.fsl-canvas { max-width: 100%; max-height: 460px; border-radius: 10px; object-fit: contain; }
.fsl-video { width: 100%; max-height: 360px; border-radius: 10px; background: var(--ink); object-fit: cover; }
.fsl-cam-controls, .fsl-overlay-toggles { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; width: 100%; }
.fsl-toggle-chip {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.fsl-toggle-chip.is-on { background: var(--accent); border-color: var(--accent); color: var(--card); }
.fsl-status {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  background: var(--sand-soft);
  color: var(--ink);
  border: 1px solid var(--border);
}
.fsl-status.is-error { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }


/* Results & Editorial Specimen Panel */
.fsl-result-col { display: flex; flex-direction: column; gap: 16px; }
.fsl-placeholder-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.specimen-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.specimen-head h2 { font-size: 18px; margin: 0; }
.specimen-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
}
.specimen-diagram {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.specimen-diagram svg { width: 100%; height: auto; }
.fsl-preview-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.fsl-preview-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.fsl-preview-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.fsl-preview-list span { color: var(--muted); }
.fsl-preview-list strong { color: var(--ink); font-weight: 600; text-align: right; }

.fsl-score-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 20px; }
.fsl-score-top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.fsl-score-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.fsl-score-big { font-family: var(--font-display); font-size: 48px; font-weight: 700; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.fsl-score-big small { font-size: 18px; color: var(--muted); font-weight: 600; }
.fsl-tier-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}
.fsl-summary-text { font-size: 14px; color: var(--muted); margin: 0; }
.fsl-metrics-grid { display: flex; flex-direction: column; gap: 10px; }
.fsl-metric-row { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 16px; }
.fsl-metric-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.fsl-metric-name { font-size: 14px; font-weight: 600; color: var(--ink); }
.fsl-metric-val { font-size: 14px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.fsl-bar-track { width: 100%; height: 6px; border-radius: 999px; background: var(--stone-soft); overflow: hidden; margin-bottom: 6px; }
.fsl-bar-fill { height: 100%; border-radius: 999px; background: var(--primary); transition: width 0.35s ease; }
.fsl-bar-fill.is-accent { background: var(--accent); }
.fsl-metric-note { font-size: 12px; color: var(--muted); margin: 0; }
.fsl-result-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Engage bar */
.engage-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.engage-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.count-badge { font-variant-numeric: tabular-nums; font-weight: 700; }
.share-toast { font-size: 14px; color: var(--accent); font-weight: 600; }
.report-nudge { font-size: 14px; font-weight: 600; color: var(--ink); }

/* Sections & Editorial Rhythm */
.section { padding: 64px 0; }
.section-tools { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head-split {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 32px;
}
.section-head-split h2 { margin: 0; }
.section-head { margin-bottom: 24px; max-width: 680px; }
.section-sub { color: var(--muted); max-width: 44ch; margin: 0; font-size: 15px; }

/* Muted Editorial Icon Tiles (Skillry-inspired warmth & restraint) */
.tools-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.tool-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  color: var(--ink);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.tool-card:hover { border-color: var(--ink); transform: translateY(-2px); text-decoration: none; color: var(--ink); }
.tool-card.is-current { border-color: var(--ink); background: var(--bg); }
.tool-tile {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tone-terracotta { background: var(--accent-soft); }
.tone-sage { background: var(--sage-soft); }
.tone-sand { background: var(--sand-soft); }
.tone-clay { background: var(--accent-soft); }
.tone-stone { background: var(--stone-soft); }
.tool-card h3 { font-size: 17px; margin: 0; }
.tool-card p { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.5; }

/* Hairline-divided Editorial Spec List (no repetitive boxes!) */
.spec-layout { display: grid; grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr); gap: 48px; align-items: start; }
.spec-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--border); }
.spec-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}
.spec-num { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--accent); }
.spec-item h3 { font-size: 18px; margin-bottom: 6px; }
.spec-item p { font-size: 15px; color: var(--muted); margin: 0; }

/* Editorial Prose */
.section-editorial { background: var(--surface); border-top: 1px solid var(--border); }
.editorial-wrap { max-width: 780px; }
.prose { width: 100%; max-width: 100%; }
.prose h2 { margin-top: 40px; font-size: 28px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 28px; font-size: 20px; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 18px; }
.prose li { margin-bottom: 8px; }
.prose table { width: 100%; border-collapse: collapse; margin: 28px 0; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; font-size: 14px; }
.prose th, .prose td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.prose th { background: var(--bg); font-weight: 600; color: var(--ink); }
.prose blockquote { margin: 28px 0; padding: 18px 22px; background: var(--bg); border-left: 3px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.prose blockquote p:last-child { margin-bottom: 0; }

/* FAQ - Clean Editorial Accordion */
.section-faq { border-top: 1px solid var(--border); }
.faq-wrap { max-width: 780px; }
.faq-list { border-top: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary {
  cursor: pointer;
  padding: 20px 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  color: var(--ink);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 22px; color: var(--accent); font-weight: 600; }
.faq-item[open] summary::after { content: '−'; }
.faq-a { padding: 0 0 20px; color: var(--muted); max-width: 66ch; }
.faq-a p:last-child { margin-bottom: 0; }

/* Comments */
.section-comments { background: var(--surface); border-top: 1px solid var(--border); }
.comments-wrap { max-width: 780px; }
.comments-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.comments-count-wrap { font-size: 14px; color: var(--muted); }
.comment-form { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 20px; margin-bottom: 24px; display: flex; flex-direction: column; gap: 12px; }
.form-row { display: flex; gap: 12px; align-items: center; }
.comment-form input, .comment-form textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; font-family: var(--font-body); font-size: 15px; color: var(--ink); background: var(--surface); }
.form-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.comment-msg { font-size: 14px; color: var(--accent); }
.reply-banner { font-size: 14px; color: var(--accent); font-weight: 600; }
.comments-empty { font-size: 14px; color: var(--muted); display: none; }
.comments-list[data-gf-empty] .comments-empty { display: block; }
.comment-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px; margin-bottom: 12px; }
.comment-card[data-gf-owner] { border-color: var(--accent); background: var(--accent-soft); }
.comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 8px; }
.comment-meta time { color: var(--muted); font-size: 12px; }
.owner-badge { background: var(--primary); color: var(--card); font-size: 12px; padding: 2px 10px; border-radius: 999px; font-weight: 600; }
.reply-target { color: var(--accent); font-size: 13px; font-weight: 600; }
.comment-body { margin: 0 0 8px; }
.comment-reply-btn { background: none; border: 0; padding: 0; color: var(--accent); font-size: 13px; font-weight: 600; cursor: pointer; }
.comment-replies { margin-top: 12px; padding-left: 16px; border-left: 2px solid var(--border); }

/* Footer */
.site-footer { background: var(--ink); color: var(--bg); padding: 56px 0 28px; }
.site-footer a { color: var(--bg); }
.site-footer a:hover { color: var(--accent-soft); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); gap: 36px; padding-bottom: 36px; border-bottom: 1px solid var(--muted); }
.footer-brand .brand-name { color: var(--card); font-size: 20px; }
.footer-tagline { color: var(--border); font-size: 14px; margin: 8px 0 12px; }
.footer-disclaimer { color: var(--border); font-size: 12px; line-height: 1.55; max-width: 48ch; margin: 0; }
.footer-heading { color: var(--card); font-size: 15px; margin-bottom: 12px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.footer-bottom { padding-top: 24px; font-size: 13px; color: var(--border); }
.footer-bottom p { margin: 0; }
.notfound-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

@media (max-width: 960px) {
  .fsl-app, .spec-layout, .footer-grid { grid-template-columns: 1fr; }
  .section-head-split { flex-direction: column; align-items: flex-start; gap: 12px; }
  .tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .header-cta { display: none; }
  .nav-mobile-only { display: block; }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  h1 { font-size: 32px; }
  h2 { font-size: 26px; }
  .hero-tool { padding: 24px 0 32px; }
  .hero-head { text-align: left; }
  .breadcrumb-center { justify-content: flex-start; }
  .hero-lead { margin: 0; font-size: 16px; }
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px 16px;
    flex-direction: column;
    align-items: stretch;
  }
  .site-nav.is-open { display: flex; }
  .tool-stage { padding: 16px; }
  .fsl-dropzone { min-height: 280px; padding: 20px; }
  .fsl-photo-tips { grid-template-columns: 1fr; }
  .fsl-actions .btn-primary, .fsl-actions .btn-outline,
  .fsl-result-actions .btn-primary, .fsl-result-actions .btn-outline { width: 100%; }
  .tools-grid { grid-template-columns: 1fr; }
  .prose table { display: block; overflow-x: auto; }
}
