 /* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface2: #22263a;
  --border: #2e3350;
  --accent: #4f8ef7;
  --accent-dark: #3a6fd8;
  --text: #e8eaf0;
  --text-muted: #8b90a8;
  --success: #3ecf8e;
  --warning: #f5a623;
  --danger: #f45b5b;
  --radius: 10px;
  --font: 'Segoe UI', system-ui, sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Header ── */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 18px 24px;
  position: relative;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}

.logo span {
  color: var(--accent);
}

nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-toggle {
  display: none;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  padding: 6px 12px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover {
  color: var(--text);
  background: var(--surface2);
}

.nav-link.active {
  color: var(--accent);
  background: rgba(79, 142, 247, 0.1);
}

/* ── Main ── */
main {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* ── Hero ── */
.hero {
  margin-bottom: 40px;
}

.hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 620px;
}

/* ── Calculator Wrapper ── */
.calculator-wrapper {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ── Form ── */
#calc-form {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.form-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.form-section h2 {
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
  margin-bottom: 22px;
}

.optional-label {
  font-size: 0.8rem;
  font-weight: 400;
  text-transform: none;
  color: var(--text-muted);
  letter-spacing: 0;
}

.field {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.field:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.field.highlight {
  background: rgba(79, 142, 247, 0.06);
  border-radius: 8px;
  padding: 12px;
  margin-top: 8px;
  border-bottom: none;
  border: 1px solid rgba(79, 142, 247, 0.3);
}

.field label {
  font-size: 0.95rem;
  color: var(--text);
}

.field input {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 1rem;
  font-family: var(--font);
  padding: 9px 12px;
  width: 100%;
  transition: border-color 0.2s;
}

.field input:focus {
  outline: none;
  border-color: var(--accent);
}

.hint {
  grid-column: 2 / 3;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: -4px;
}

/* ── Calculate Button ── */
#calc-btn,
#pricing-btn,
#simulator-btn,
#inventory-btn,
#compare-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 1.1rem;
  font-weight: 700;
  font-family: var(--font);
  padding: 16px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  width: 100%;
}

#calc-btn:hover,
#pricing-btn:hover,
#simulator-btn:hover,
#inventory-btn:hover,
#compare-btn:hover { background: var(--accent-dark); }

#calc-btn:active,
#pricing-btn:active,
#simulator-btn:active,
#inventory-btn:active,
#compare-btn:active { transform: scale(0.99); }
.form-tip {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ── Results ── */
.results {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.results h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}

.result-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.highlight-card {
  border-color: var(--accent);
  background: rgba(79, 142, 247, 0.08);
  grid-column: span 2;
  align-items: center;
  text-align: center;
}

.result-label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.result-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}

.result-value.large {
  font-size: 3rem;
  color: var(--accent);
}
.result-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 2px;
}
/* Risk rating colors applied via JS */
.risk-low    { color: var(--success); }
.risk-mod    { color: #a8d97f; }
.risk-high   { color: var(--warning); }
.risk-very   { color: var(--danger); }

/* ── Scenarios ── */
.scenarios {
  margin-bottom: 28px;
}

.scenarios h3 {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.scenario-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
}

.scenario-row .orders {
  font-weight: 600;
  font-size: 0.95rem;
}

.scenario-row .profit {
  font-weight: 700;
  font-size: 1rem;
}

.profit.positive { color: var(--success); }
.profit.negative { color: var(--danger); }

/* ── Reset Button ── */
#reset-btn,
#pricing-reset-btn,
#simulator-reset-btn,
#inventory-reset-btn,
#compare-reset-btn {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: var(--font);
  padding: 12px;
  cursor: pointer;
  width: 100%;
  transition: border-color 0.2s, color 0.2s;
}

#reset-btn:hover,
#pricing-reset-btn:hover,
#simulator-reset-btn:hover,
#inventory-reset-btn:hover,
#compare-reset-btn:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

/* ── Hidden ── */
.hidden { display: none; }

/* ── Footer ── */
footer {
  text-align: center;
  padding: 32px 24px;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}
.footer-disclaimer {
  font-size: 0.78rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 8px auto 0;
  line-height: 1.5;
  opacity: 0.7;
}
/* ── Compare Grid ── */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.compare-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.compare-stat:last-child { border-bottom: none; }

.highlight-stat {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  border-bottom: none;
}

/* ── Verdict ── */
.verdict-card {
  background: rgba(79, 142, 247, 0.08);
  border: 1px solid rgba(79, 142, 247, 0.3);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-top: 8px;
}

.verdict-text {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
}
/* ── About Page ── */
.about-wrapper {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.about-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.about-section h2 {
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
  margin-bottom: 16px;
}

.about-section p {
  color: var(--text);
  font-size: 0.97rem;
  line-height: 1.7;
  margin-bottom: 12px;
}

.about-section p:last-child { margin-bottom: 0; }

/* ── Tools List ── */
.tools-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tool-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}

.tool-card:hover {
  border-color: var(--accent);
  background: rgba(79, 142, 247, 0.06);
}

.tool-name {
  font-weight: 700;
  font-size: 0.97rem;
  color: var(--accent);
}

.tool-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ── FAQ ── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
}

.faq-item summary {
  font-weight: 600;
  font-size: 0.97rem;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: 300;
}

.faq-item[open] summary::after { content: '−'; }

.faq-item p {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}
/* ── Landing Hero ── */
.landing-hero {
  text-align: center;
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}

.landing-hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.15;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 580px;
  margin: 0 auto 28px;
  line-height: 1.7;
}

.tool-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.pill {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 16px;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(79, 142, 247, 0.08);
}

.pill.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(79, 142, 247, 0.1);
}
/* ── Results Actions ── */
.results-actions {
  display: flex;
  gap: 12px;
}

.results-actions button { flex: 1; }

#copy-btn,
#pricing-copy-btn,
#simulator-copy-btn,
#inventory-copy-btn,
#compare-copy-btn {
  background: var(--surface2);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font);
  padding: 12px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

#copy-btn:hover,
#pricing-copy-btn:hover,
#simulator-copy-btn:hover,
#inventory-copy-btn:hover,
#compare-copy-btn:hover {
  background: rgba(79, 142, 247, 0.12);
}

/* ── Tips Panel ── */
.tips-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
}

.tips-panel summary {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  padding: 16px 20px;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
}

.tips-panel summary::-webkit-details-marker { display: none; }

.tips-panel summary::after {
  content: '+';
  margin-left: auto;
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: 300;
}

.tips-panel[open] summary::after { content: '−'; }

.tips-panel[open] summary {
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.tips-panel ul {
  list-style: none;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tips-panel li {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  padding-left: 14px;
  border-left: 2px solid var(--accent);
}

.tips-panel li strong {
  color: var(--text);
}
/* ── Feedback Form ── */
.feedback-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.feedback-field:last-of-type { border-bottom: none; }

.feedback-field label {
  font-size: 0.9rem;
  color: var(--text);
}

.feedback-field input,
.feedback-field select,
.feedback-field textarea {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--font);
  padding: 9px 12px;
  width: 100%;
  transition: border-color 0.2s;
}

.feedback-field input:focus,
.feedback-field select:focus,
.feedback-field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.feedback-field textarea { resize: vertical; min-height: 100px; }

.feedback-field select option { background: var(--surface2); }

#feedback-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font);
  padding: 14px;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
  margin-top: 16px;
}

#feedback-btn:hover { background: var(--accent-dark); }
#feedback-btn:disabled { opacity: 0.6; cursor: not-allowed; }
/* ── Responsive ── */
@media (max-width: 768px) {
  .hero h1 { font-size: 1.7rem; }
  .field { grid-template-columns: 1fr; }
  .hint { grid-column: 1; }
  .result-grid { grid-template-columns: 1fr; }
  .highlight-card { grid-column: span 1; }
  nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 57px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
    gap: 4px;
    z-index: 100;
  }

  nav.open { display: flex; }

  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 101;
  }

  .nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.2s;
  }
  .compare-grid { grid-template-columns: 1fr; }
  .landing-hero h1 { font-size: 2rem; }
  .landing-hero { padding: 32px 0 28px; }
}
