/* Line & Net — Brand CSS */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300;9..144,400;9..144,500;9..144,600&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  --deep: #0B1D26;
  --ocean: #1A3A4A;
  --teal: #2D8C8C;
  --sea: #3AAFA9;
  --foam: #DEF2F1;
  --ember: #E8734A;
  --sand: #F5E6D3;
  --charcoal: #2B2D2E;
  --slate: #4A4E50;
  --grey: #6B7280;
  --silver: #9CA3AF;
  --cloud: #F3F4F6;
  --white: #FEFEFE;
  --red: #DC2626;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'DM Sans', -apple-system, sans-serif; color: var(--charcoal); background: #F9FAFB; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: 'Fraunces', Georgia, serif; font-weight: 400; }
a { color: var(--teal); text-decoration: none; }
button { cursor: pointer; font-family: inherit; }

/* Layout */
.container { max-width: 960px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 480px; margin: 0 auto; padding: 0 20px; }

/* Header */
.header { background: var(--deep); padding: 20px 20px 24px; position: sticky; top: 0; z-index: 50; }
.header-logo { display: flex; align-items: center; gap: 10px; }
.header-logo span { font-family: 'Fraunces', serif; font-size: 18px; font-weight: 600; color: var(--white); }
.header-logo .amp { color: var(--sea); }

/* Cards */
.card { background: var(--white); border: 1px solid #E5E7EB; border-radius: 12px; }
.card-padding { padding: 16px 20px; }

/* Buttons */
.btn { padding: 12px 20px; border-radius: 10px; border: none; font-size: 14px; font-weight: 600; transition: all 0.15s; display: inline-flex; align-items: center; gap: 8px; }
.btn-primary { background: var(--teal); color: var(--white); }
.btn-primary:hover { background: #257A7A; }
.btn-ember { background: var(--ember); color: var(--white); box-shadow: 0 4px 12px rgba(232,115,74,0.25); }
.btn-ember:hover { transform: translateY(-1px); }
.btn-outline { background: transparent; border: 1.5px solid #E5E7EB; color: var(--slate); }
.btn-outline:hover { border-color: var(--teal); color: var(--teal); }
.btn-dashed { background: rgba(45,140,140,0.04); border: 1.5px dashed var(--teal); color: var(--teal); }
.btn-dashed:hover { background: var(--foam); }
.btn-full { width: 100%; justify-content: center; padding: 16px; font-size: 16px; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-danger { background: transparent; border: 1.5px solid rgba(232,115,74,0.3); color: var(--ember); }

/* Form elements */
.input { width: 100%; padding: 12px 16px; border: 1.5px solid #E5E7EB; border-radius: 10px; font-family: inherit; font-size: 14px; color: var(--charcoal); outline: none; transition: all 0.2s; }
.input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(45,140,140,0.1); }
textarea.input { resize: vertical; min-height: 120px; line-height: 1.7; }

/* Labels */
.label { display: block; font-size: 12px; font-weight: 600; color: var(--silver); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; }
.label-dark { color: var(--charcoal); font-size: 13px; text-transform: none; letter-spacing: normal; }

/* Badges */
.badge { display: inline-flex; padding: 3px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.badge-teal { background: var(--foam); color: var(--teal); }
.badge-ember { background: #FDE8E0; color: var(--ember); }
.badge-red { background: #FEE2E2; color: var(--red); }
.badge-grey { background: var(--cloud); color: var(--grey); }

/* Chip selectors */
.chip { padding: 10px 18px; border-radius: 10px; border: 1.5px solid #E5E7EB; background: var(--white); font-size: 14px; font-weight: 500; color: var(--slate); transition: all 0.15s; }
.chip:hover { border-color: var(--teal); color: var(--teal); }
.chip.active { border-color: var(--teal); background: var(--foam); color: var(--teal); }
.chip-sm { padding: 8px 14px; font-size: 13px; border-radius: 8px; }

/* Category grid */
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cat-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 16px; text-align: center; font-weight: 500; font-size: 14px; }
.cat-btn:hover { border-color: var(--teal); background: var(--foam); color: var(--teal); }
.cat-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--cloud); display: flex; align-items: center; justify-content: center; }

/* Severity cards */
.sev-btn { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; transition: all 0.15s; }
.sev-btn.active { border-width: 2px; }
.sev-dot { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

/* Signal bars */
.signal-bar { height: 8px; border-radius: 4px; transition: width 0.5s ease; }
.signal-item { padding: 16px 20px; border-bottom: 1px solid #F3F4F6; cursor: pointer; transition: background 0.15s; }
.signal-item:hover { background: #FAFBFC; }
.signal-item:last-child { border-bottom: none; }

/* Tabs */
.tabs { display: flex; gap: 0; border-bottom: 1px solid #E5E7EB; margin-bottom: 20px; }
.tab { padding: 12px 20px; font-size: 14px; font-weight: 600; color: var(--silver); background: none; border: none; border-bottom: 2px solid transparent; transition: all 0.15s; }
.tab.active { color: var(--teal); border-bottom-color: var(--teal); }
.tab:hover { color: var(--slate); }

/* Progress steps */
.steps { display: flex; gap: 4px; }
.step-dot { width: 24px; height: 3px; border-radius: 2px; background: rgba(255,255,255,0.15); transition: background 0.3s; }
.step-dot.active { background: var(--sea); }

/* Modal / overlay */
.overlay { position: fixed; inset: 0; background: rgba(11,29,38,0.5); z-index: 200; display: flex; align-items: flex-end; justify-content: center; }
.modal { background: var(--white); border-radius: 20px 20px 0 0; width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; animation: slideUp 0.3s ease; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid #E5E7EB; }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px 32px; border-top: 1px solid #E5E7EB; display: flex; gap: 8px; }

/* Success animation */
.success-circle { width: 72px; height: 72px; border-radius: 50%; background: var(--foam); display: flex; align-items: center; justify-content: center; color: var(--teal); animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }

/* Bottom nav */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 100; background: var(--white); border-top: 1px solid #E5E7EB; display: flex; height: 60px; }
.nav-btn { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: none; background: transparent; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; color: var(--silver); transition: color 0.15s; }
.nav-btn.active { color: var(--teal); }

/* Utility */
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-16 { gap: 16px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-10 { margin-bottom: 10px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.text-grey { color: var(--grey); }
.text-silver { color: var(--silver); }
.text-teal { color: var(--teal); }
.text-ember { color: var(--ember); }
.hidden { display: none; }
.pb-80 { padding-bottom: 80px; }

@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes scaleIn { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
