/* PaperclipGo — Stylesheet */
:root {
  --bg-color: #f6f7f3;
  --card-bg: #ffffff;
  --text-primary: #191c1b;
  --text-secondary: #58605d;
  --text-muted: #7c8582;
  --border-color: #e1e4dc;
  --border-subtle: #eeefe9;
  --primary-green: #00764e;
  --primary-hover: #00603f;
  --primary-light: #e8f5ee;
  --danger-red: #c93434;
  --danger-light: #fbeeed;
  --success-green: #15803d;
  --warning-amber: #b45309;
  --warning-light: #fef3c7;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Newsreader', Georgia, serif;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding: 24px 16px 60px;
}

.site-wrapper {
  max-width: 820px;
  margin: 0 auto;
}

/* Site Header */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 28px;
}

.brand-logo {
  text-decoration: none;
  font-size: 1.45rem;
  font-family: var(--font-serif);
  letter-spacing: -0.02em;
}

.brand-crypto {
  color: var(--text-primary);
  font-weight: 500;
}

.brand-portfolio {
  color: var(--primary-green);
  font-weight: 700;
  margin-left: 2px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
}

.badge-neutral .badge-dot { background: var(--warning-amber); }
.badge-fear { background: var(--danger-light); color: var(--danger-red); border-color: #f7cfcf; }
.badge-fear .badge-dot { background: var(--danger-red); }
.badge-greed { background: var(--primary-light); color: var(--primary-green); border-color: #c7ead7; }
.badge-greed .badge-dot { background: var(--primary-green); }

/* No-JS Card */
.noscript-card {
  background: #fff8eb;
  border: 1px solid #fed7aa;
  color: #9a3412;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}
.noscript-card h3 {
  margin-bottom: 6px;
  font-size: 1rem;
}

/* Hero Section */
.hero-section {
  text-align: center;
  margin-bottom: 30px;
}

.hero-title {
  font-size: 2.15rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.25;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto 24px;
  line-height: 1.55;
}

/* 3-Step Guided Onboarding */
.how-it-works {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  max-width: 680px;
  margin: 0 auto;
  box-shadow: var(--shadow-sm);
}

.step-item {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-green);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-text strong {
  display: block;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.step-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.step-arrow {
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 300;
}

/* Status Notice Bar */
.price-status-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: var(--radius-sm);
  margin-bottom: 22px;
}

.pulse-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary-green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

/* Demo Banner */
.demo-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  font-size: 0.88rem;
  gap: 12px;
}

.demo-tag {
  background: #22c55e;
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 4px;
  margin-right: 6px;
}

.btn-clear-demo {
  background: white;
  border: 1px solid #86efac;
  color: #15803d;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
}
.btn-clear-demo:hover {
  background: #dcfce7;
}

/* Card Containers */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.card-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-row {
  display: flex;
  gap: 16px;
}

.col-half {
  flex: 1;
}

input[type="text"],
input[type="number"] {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  color: var(--text-primary);
  background: #fafbfa;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
}

input[type="text"]:focus,
input[type="number"]:focus {
  outline: none;
  border-color: var(--primary-green);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(0, 118, 78, 0.12);
}

.search-input-wrapper {
  position: relative;
}

.spinner {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-color);
  border-top-color: var(--primary-green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: translateY(-50%) rotate(360deg); }
}

/* Dropdown */
.search-dropdown {
  position: absolute;
  z-index: 100;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-top: 4px;
  width: 100%;
  max-height: 240px;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
  list-style: none;
}

.search-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.1s;
}
.search-item:last-child { border-bottom: none; }
.search-item:hover, .search-item.active { background: #f4f6f3; }

.search-item-info {
  display: flex;
  align-items: center;
  gap: 8px;
}
.search-item-name { font-weight: 600; font-size: 0.9rem; }
.search-item-symbol { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; }
.search-item-rank { font-size: 0.75rem; background: #eaeee8; padding: 2px 6px; border-radius: 4px; color: var(--text-secondary); }
.search-item-price { font-weight: 600; font-size: 0.88rem; color: var(--text-primary); }

.unit-price-preview {
  background: #f7f9f6;
  border: 1px dashed var(--border-color);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn-primary {
  background: var(--primary-green);
  color: #ffffff;
  width: 100%;
}
.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}
.btn-primary:disabled {
  background: #d4dad6;
  cursor: not-allowed;
}

.btn-text-danger {
  background: none;
  border: none;
  color: var(--danger-red);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
}
.btn-text-danger:hover {
  text-decoration: underline;
}

.feedback-msg {
  margin-top: 10px;
  font-size: 0.84rem;
  color: var(--primary-green);
  font-weight: 500;
}

/* Summary Card */
.summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.summary-header .card-title { margin-bottom: 0; }

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.metric-item {
  display: flex;
  flex-direction: column;
}

.metric-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.metric-value {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.text-positive { color: var(--success-green); }
.text-negative { color: var(--danger-red); }

/* Plain English Boxes */
.plain-english-box {
  background: #fbfcf9;
  border-left: 3px solid var(--primary-green);
  padding: 12px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Holdings Table */
.table-responsive {
  overflow-x: auto;
}

.holdings-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.holdings-table th {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.holdings-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.holdings-table input.inline-input {
  width: 90px;
  padding: 6px 8px;
  font-size: 0.85rem;
  background: #fafafa;
}

.btn-remove-row {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px;
}
.btn-remove-row:hover {
  color: var(--danger-red);
}

/* Scenario Simulator */
.scenario-header {
  margin-bottom: 20px;
}

.slider-control-container {
  margin-bottom: 24px;
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

input[type="range"] {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: #e2e6e1;
  outline: none;
  accent-color: var(--primary-green);
  cursor: pointer;
}

.percentage-input-wrapper {
  position: relative;
  width: 86px;
  flex-shrink: 0;
}

.percentage-input-wrapper input {
  padding-right: 24px;
  text-align: right;
  font-weight: 700;
}

.percent-symbol {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
}

.preset-buttons-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-preset {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  background: #ffffff;
  cursor: pointer;
  transition: all 0.1s;
}

.btn-preset-reset { background: #f0f2ee; color: var(--text-primary); }
.btn-preset-down { color: var(--danger-red); }
.btn-preset-down:hover { background: var(--danger-light); border-color: #f7cfcf; }
.btn-preset-up { color: var(--success-green); }
.btn-preset-up:hover { background: var(--primary-light); border-color: #c7ead7; }

.scenario-results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 16px;
  background: #f7f9f6;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.scenario-metric-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  font-weight: 600;
  display: block;
}

.scenario-metric-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
}

.scenario-english-box {
  border-left-color: #10b981;
}

/* Accordion (Show the Math) */
.math-details summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
}
.math-details summary::-webkit-details-marker { display: none; }

.math-body {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.math-body ul {
  margin-top: 10px;
  padding-left: 20px;
}

.math-body li {
  margin-bottom: 6px;
}

.math-body code {
  background: #eef1ec;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.85rem;
}

/* Trust Footer */
.trust-footer {
  text-align: center;
  padding: 24px 20px 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

.trust-footer h4 {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.disclaimer-note {
  font-size: 0.75rem;
  margin-top: 8px;
  color: var(--text-muted);
}

/* Responsive Breakpoints */
@media (max-width: 680px) {
  .hero-title { font-size: 1.7rem; }
  .how-it-works { flex-direction: column; align-items: flex-start; gap: 8px; }
  .step-arrow { display: none; }
  .form-row { flex-direction: column; gap: 14px; }
  .metrics-grid { grid-template-columns: 1fr; gap: 12px; }
  .scenario-results-grid { grid-template-columns: 1fr; gap: 12px; }
  .demo-banner { flex-direction: column; align-items: flex-start; }
}
