/* =========================================
   NONDEFAULT — GLOBAL STYLE SYSTEM V1.3
   Calm Intelligence Dark Theme
   Tool Form Controls Scoped (CRITICAL FIX)
   ========================================= */

/* ===== RESET ===== */

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

html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
  background: #0f1115;
  color: #e7e9ee;
  line-height: 1.55;
}

/* ===== TOKENS ===== */

:root {

  /* Background */
  --bg-main: #0f1115;
  --bg-elev-1: rgba(255,255,255,0.04);
  --bg-elev-2: rgba(255,255,255,0.06);
  --bg-elev-3: rgba(255,255,255,0.08);

  /* Borders */
  --border-soft: rgba(255,255,255,0.08);
  --border-mid: rgba(255,255,255,0.12);

  /* Text */
  --text-main: #e7e9ee;
  --text-muted: rgba(231,233,238,0.70);
  --text-soft: rgba(231,233,238,0.55);

  /* Accent */
  --accent-main: #46b478;
  --accent-soft: rgba(70,180,120,0.20);
  --accent-border: rgba(70,180,120,0.40);

  /* Pressure Colors */
  --pressure-high: #ff6b6b;
  --pressure-mid: #ffb454;
  --pressure-low: #7bd88f;

  /* Layout */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;

  --shadow-soft: 0 12px 40px rgba(0,0,0,0.35);
}

/* ===== LAYOUT ===== */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 22px;
}

/* ===== NAV ===== */

.site-header {
  border-bottom: 1px solid var(--border-soft);
  background: rgba(15,17,21,0.75);
  backdrop-filter: blur(10px);
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
}

.brand {
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--text-main);
}

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

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14px;
}

.nav-links a:hover {
  color: var(--text-main);
}

/* ===== HERO ===== */

.hero {
  padding: 70px 0 40px;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}

.hero p {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 20px;
}

/* ===== BUTTONS ===== */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 13px 18px;
  border-radius: var(--radius-md);

  background: var(--accent-soft);
  border: 1px solid var(--accent-border);

  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;

  transition: all 0.18s ease;
}

.btn-primary:hover {
  background: rgba(70,180,120,0.28);
  transform: translateY(-1px);
}

/* ===== PANELS ===== */

.panel {
  background: var(--bg-elev-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.panel h3 {
  margin-top: 0;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

/* ===== CARDS ===== */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width: 900px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--bg-elev-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 16px;
}

.card h4 {
  margin: 0 0 6px;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

/* ===== DESTINATION CHIPS ===== */

.chip-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.chip {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: rgba(255,255,255,0.03);
  text-decoration: none;
  color: var(--text-main);
  font-size: 13px;
}

.chip:hover {
  background: rgba(255,255,255,0.06);
}

/* ===== PRESSURE BADGES ===== */

.pressure-high { color: var(--pressure-high); }
.pressure-mid { color: var(--pressure-mid); }
.pressure-low { color: var(--pressure-low); }

/* ===== TOOL RESULT AREA ===== */

.result-box {
  background: var(--bg-elev-2);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-top: 24px;
}

/* ===== FOOTER ===== */

footer {
  border-top: 1px solid var(--border-soft);
  margin-top: 60px;
  padding: 30px 0;
  font-size: 13px;
  color: var(--text-soft);
}

/* ===== MOBILE ===== */

@media (max-width: 600px) {
  .hero { padding-top: 50px; }
  .hero h1 { font-size: 34px; }
}

/* =========================================
   TOOL FORM CONTROLS (SCOPED — IMPORTANT)
   Prevents global UX damage
   ========================================= */

.tool select,
.tool input,
.tool textarea {

  background: #141821;
  color: #e7e9ee;

  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;

  padding: 10px 12px;
  font-size: 15px;
}

/* Dropdown options */
.tool select option {
  background: #141821;
  color: #e7e9ee;
}

/* Focus */
.tool select:focus,
.tool input:focus,
.tool textarea:focus {
  outline: none;
  border-color: rgba(70,180,120,0.5);
  box-shadow: 0 0 0 2px rgba(70,180,120,0.15);
}

/* Disabled */
.tool select:disabled {
  opacity: 0.5;
}

/* Autofill fix */
.tool input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #141821 inset;
  -webkit-text-fill-color: #e7e9ee;
}

/* Custom arrow */
.tool select {
  appearance: none;

  background-image:
    linear-gradient(45deg, transparent 50%, #e7e9ee 50%),
    linear-gradient(135deg, #e7e9ee 50%, transparent 50%);

  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);

  background-size: 6px 6px;
  background-repeat: no-repeat;

  padding-right: 36px;
}

