/* === Tokens === */
:root {
  --c-primary: #6c5ce7;
  --c-primary-hover: #5a4bd6;
  --c-ink: #1a1a2e;
  --c-body: #333;
  --c-muted: #6b6b7b;
  --c-hint: #c8c0d8;
  --c-label: #9b8fce;
  --c-border: #f0eef5;
  --c-border-hover: #d8d4e8;
  --c-bg: #f8f7fb;
  --c-card: #fff;
  --c-selected-bg: #f8f6ff;
  --c-edit-bg: #fffde6;
  --r-card: 14px;
  --r-option: 10px;
  --r-pill: 20px;
  --r-btn: 10px;
  --font: 'Figtree', system-ui, sans-serif;
  --font-mono: 'SF Mono', Monaco, monospace;
}

/* === Reset === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font); background: var(--c-bg); color: var(--c-ink); padding: 40px 20px 120px; }

/* === Layout === */
.container { max-width: 680px; margin: 0 auto; }
h1 { font-size: 24px; font-weight: 600; margin-bottom: 4px; }
.subtitle { font-size: 13px; color: #888; margin-bottom: 40px; }

/* === Section === */
.section { background: var(--c-card); border-radius: var(--r-card); padding: 24px; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.section-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--c-label); margin-bottom: 4px; }
.section-title { font-size: 17px; font-weight: 700; color: var(--c-ink); margin-bottom: 16px; }

/* === Selectable (shared border/hover/selected) === */
.selectable { border: 2px solid var(--c-border); border-radius: var(--r-option); cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.selectable:hover { border-color: var(--c-border-hover); background: #fdfcff; }
.selectable.selected { border-color: var(--c-primary); background: var(--c-selected-bg); }

/* === Radio option === */
.option { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; margin-bottom: 10px; }
.option input[type="radio"] { margin-top: 3px; accent-color: var(--c-primary); flex-shrink: 0; }
.option-num { font-size: 12px; font-weight: 700; color: #b0a8c8; min-width: 18px; margin-top: 1px; }
.option-text { flex: 1; font-size: 14px; line-height: 1.5; color: var(--c-body); outline: none; }
.option-text:focus { background: var(--c-edit-bg); border-radius: 4px; padding: 2px 4px; margin: -2px -4px; }
.edit-hint { font-size: 10px; color: var(--c-hint); margin-top: 2px; display: none; }
.option:hover .edit-hint { display: block; }

/* === Feedback === */
.feedback-toggle { font-size: 12px; color: var(--c-label); cursor: pointer; margin-top: 8px; display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.feedback-toggle:hover { color: var(--c-primary); }
.feedback-area { margin-top: 10px; display: none; }
.feedback-area.open { display: block; }
.feedback-input { width: 100%; border: 1px solid #e8e4f0; border-radius: 8px; padding: 10px 12px; font-family: var(--font); font-size: 13px; resize: vertical; min-height: 60px; outline: none; }
.feedback-input:focus { border-color: var(--c-primary); }
.feedback-input::placeholder { color: var(--c-hint); }

/* === FAQ sets === */
.faq-set { padding: 14px; margin-bottom: 10px; }
.faq-set-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.faq-set-header input[type="radio"] { accent-color: var(--c-primary); }
.faq-set-label { font-size: 13px; font-weight: 700; color: var(--c-ink); }
.faq-item { padding: 6px 0 6px 28px; border-top: 1px solid #f5f3f8; }
.faq-item:first-of-type { border-top: none; }
.faq-q { font-size: 13px; font-weight: 600; color: var(--c-body); }
.faq-a { font-size: 12px; color: var(--c-muted); line-height: 1.4; margin-top: 2px; }

/* === Category pills === */
.cat-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-pill { padding: 8px 16px; border-radius: var(--r-pill); font-size: 13px; font-weight: 600; color: #555; }
.cat-pill.selected { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.cat-pill input { display: none; }

/* === Related tips === */
.related-option { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 10px; }
.related-option input[type="checkbox"] { accent-color: var(--c-primary); flex-shrink: 0; }
.related-title { font-size: 14px; font-weight: 600; color: var(--c-body); }
.related-sub { font-size: 12px; color: var(--c-muted); margin-top: 2px; }

/* === Buttons === */
.btn { padding: 10px 24px; border-radius: var(--r-btn); font-family: var(--font); font-size: 14px; font-weight: 700; cursor: pointer; border: none; transition: all 0.15s; }
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-hover); }
.btn-secondary { background: var(--c-border); color: #555; }
.btn-secondary:hover { background: var(--c-border-hover); }

/* === Bottom bar === */
.bottom-bar { position: fixed; bottom: 0; left: 0; right: 0; background: var(--c-card); border-top: 1px solid #eee; padding: 16px 20px; display: flex; justify-content: center; gap: 12px; z-index: 100; }

/* === Modal === */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 200; align-items: center; justify-content: center; }
.modal-overlay.open { display: flex; }
.modal { background: var(--c-card); border-radius: 16px; padding: 28px; max-width: 600px; width: 90%; max-height: 80vh; overflow-y: auto; }
.modal h2 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.modal-sub { font-size: 13px; color: #888; margin-bottom: 16px; }
.modal pre { background: var(--c-bg); padding: 16px; border-radius: var(--r-option); font-size: 12px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; font-family: var(--font-mono); }
.modal-actions { display: flex; gap: 10px; margin-top: 16px; }
