@import url('https://fonts.googleapis.com/css2?family=Khand:wght@400;600;700&family=Saira:wght@400;500;600&display=swap');
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  /* Velocity tokens */
  --bg: #0B0C09; --bg-card: #111309; --bg-inner: #15170d; --border: #2a2d1e;
  --primary: #C3F53B; --primary-h: #a8d932; --primary-dim: rgba(195,245,59,0.10);
  --text: #F4F7EC; --muted: #8a9070; --muted2: #b3bb98; --green: #C3F53B;
}
body { background: var(--bg); color: var(--text); font-family: 'Saira', sans-serif; line-height: 1.6; }

/* Velocity notched-panel motif */
.panel-notched,
.nav-cta, .calc-btn, .btn-primary, .share-btn, .badge,
.form-card, .results-card, .tool-card { clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px)); }

/* Brand rune (angular-F mark) */
.rune { width: 1em; height: 1em; display: inline-block; color: var(--primary); fill: currentColor; flex: none; }

nav { display: flex; align-items: center; justify-content: space-between; padding: 20px 40px; border-bottom: 1px solid var(--border); }
.logo { display: flex; align-items: center; gap: 11px; font-family: 'Khand', sans-serif; font-size: 24px; font-weight: 700; letter-spacing: 0.02em; color: var(--text); text-decoration: none; }
.logo span { color: var(--primary); font-style: italic; }
.logo-mark { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; background: var(--primary-dim); border: 1px solid rgba(195,245,59,0.4); clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px)); }
.logo-mark .rune { width: 19px; height: 19px; }
.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-links a:not(.nav-cta) { font-size: 14px; color: var(--muted); text-decoration: none; transition: color 0.15s; }
.nav-links a:not(.nav-cta):hover { color: var(--primary); }
.nav-cta { background: var(--primary); color: #0B0C09; border: none; padding: 10px 22px; font-family: 'Khand', sans-serif; font-size: 15px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; text-decoration: none; transition: background 0.15s; }
.nav-cta:hover { background: var(--primary-h); }

.hero { max-width: 720px; margin: 0 auto; text-align: center; padding: 60px 24px 40px; }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.breadcrumb a { color: var(--primary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.badge { display: inline-block; font-family: 'Khand', sans-serif; background: var(--primary-dim); color: var(--primary); border: 1px solid rgba(195,245,59,0.3); padding: 5px 16px; font-size: 14px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 20px; }
h1 { font-family: 'Khand', sans-serif; font-size: clamp(28px, 4.4vw, 46px); font-weight: 700; line-height: 1.05; letter-spacing: 0.01em; text-transform: uppercase; margin-bottom: 12px; }
h1 span { color: var(--primary); font-style: italic; }
.hero-sub { font-size: 16px; color: var(--muted2); max-width: 480px; margin: 0 auto; }

.calc-section { max-width: 620px; margin: 0 auto; padding: 0 24px 60px; }

.unit-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin-bottom: 20px; }
.unit-btn { padding: 8px 20px; font-size: 13px; font-weight: 600; border: none; background: transparent; color: var(--muted); cursor: pointer; transition: background 0.12s, color 0.12s; }
.unit-btn.active { background: var(--primary); color: #0B0C09; }

.form-card { background: var(--bg-card); border: 1px solid var(--border); padding: 28px; margin-bottom: 16px; }
.field { margin-bottom: 16px; }
.field:last-of-type { margin-bottom: 0; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--muted2); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.4px; }
.field input[type=number], .field select {
  width: 100%; background: var(--bg-inner); border: 1px solid var(--border);
  border-radius: 8px; padding: 11px 14px; font-size: 15px; color: var(--text);
  outline: none; transition: border-color 0.12s; -moz-appearance: textfield;
}
.field input[type=number]::-webkit-outer-spin-button,
.field input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.field input[type=number]:focus, .field select:focus { border-color: var(--primary); }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%238a9070' stroke-width='2' stroke-linecap='round' d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.sex-toggle { display: flex; gap: 10px; }
.sex-btn { flex: 1; padding: 11px; font-size: 14px; font-weight: 600; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-inner); color: var(--muted); cursor: pointer; transition: all 0.12s; }
.sex-btn.active { border-color: var(--primary); background: var(--primary-dim); color: var(--primary); }
.field-note { font-size: 12px; color: var(--muted); margin-top: 5px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row .field { margin-bottom: 0; }

.calc-btn { width: 100%; background: var(--primary); color: #0B0C09; border: none; padding: 14px; font-family: 'Khand', sans-serif; font-size: 17px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; margin-top: 20px; transition: background 0.15s; }
.calc-btn:hover { background: var(--primary-h); }

.validation-msg { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); border-radius: 8px; padding: 10px 14px; font-size: 13px; color: #f87171; margin-top: 12px; display: none; }

.results-card { background: var(--bg-card); border: 1px solid var(--primary); padding: 28px; display: none; }
.results-card.visible { display: block; }
.result-primary { text-align: center; margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.result-number { font-family: 'Khand', sans-serif; font-size: 60px; font-weight: 700; color: var(--primary); line-height: 1; }
.result-unit-label { font-size: 20px; color: var(--muted2); font-weight: 600; }
.result-desc { font-size: 14px; color: var(--muted); margin-top: 6px; }
.result-rows { display: flex; flex-direction: column; gap: 12px; }
.result-row { display: flex; justify-content: space-between; align-items: flex-start; font-size: 14px; }
.rr-label { color: var(--muted2); }
.rr-value { font-weight: 600; color: var(--text); text-align: right; max-width: 55%; }
.rr-value.small { font-size: 13px; font-weight: 400; color: var(--muted2); }
.disclaimer { font-size: 12px; color: var(--muted); margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); line-height: 1.65; }

.share-btn { width: 100%; background: transparent; border: 1px solid var(--border); color: var(--muted2); padding: 10px; font-size: 13px; font-weight: 600; cursor: pointer; margin-top: 16px; transition: all 0.12s; }
.share-btn:hover { border-color: var(--primary); color: var(--primary); }
.share-btn.copied { border-color: var(--green); color: var(--green); }

.range-bar-wrap { margin: 16px 0; }
.range-bar-track { height: 10px; border-radius: 5px; background: linear-gradient(to right, #f59e0b 0%, #22c55e 22%, #C3F53B 40%, #64748b 65%, #ef4444 100%); position: relative; }
.range-marker { position: absolute; top: -5px; width: 4px; height: 20px; background: #fff; border-radius: 2px; transform: translateX(-50%); box-shadow: 0 0 6px rgba(0,0,0,0.5); }
.range-bar-labels { display: flex; justify-content: space-between; margin-top: 6px; font-size: 10px; color: var(--muted); }

.cat-badge { display: inline-block; padding: 4px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; }

.score-row { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.score-circle { width: 72px; height: 72px; border-radius: 50%; border: 3px solid var(--primary); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800; flex-shrink: 0; }
.score-text { flex: 1; }
.score-label { font-size: 15px; font-weight: 700; }
.score-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }

.how-section { max-width: 620px; margin: 0 auto 60px; padding: 0 24px; }
.how-section h2 { font-family: 'Khand', sans-serif; font-size: 24px; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; margin-bottom: 20px; }
.how-steps { display: flex; flex-direction: column; gap: 14px; }
.how-step { display: flex; gap: 14px; align-items: flex-start; }
.step-num { width: 26px; height: 26px; border-radius: 50%; background: var(--primary-dim); border: 1px solid rgba(195,245,59,0.3); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--primary); flex-shrink: 0; margin-top: 2px; }
.step-text { font-size: 14px; color: var(--muted2); line-height: 1.7; }

.cta-section { text-align: center; padding: 60px 24px 80px; border-top: 1px solid var(--border); }
.cta-section h2 { font-family: 'Khand', sans-serif; font-size: 30px; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; margin-bottom: 10px; }
.cta-section p { font-size: 15px; color: var(--muted); margin-bottom: 28px; max-width: 380px; margin-left: auto; margin-right: auto; }
.btn-primary { background: var(--primary); color: #0B0C09; border: none; padding: 14px 32px; font-family: 'Khand', sans-serif; font-size: 17px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; text-decoration: none; display: inline-block; transition: background 0.15s; }
.btn-primary:hover { background: var(--primary-h); }

footer { border-top: 1px solid var(--border); text-align: center; padding: 32px 24px; font-size: 13px; color: var(--muted); }
footer a { color: var(--muted); text-decoration: none; transition: color 0.15s; }
footer a:hover { color: var(--primary); }

/* Tools index grid */
.tools-grid { max-width: 900px; margin: 0 auto; padding: 0 24px 80px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.tool-card { background: var(--bg-card); border: 1px solid var(--border); padding: 24px; text-decoration: none; transition: border-color 0.15s, transform 0.12s; display: flex; flex-direction: column; gap: 12px; }
.tool-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.tool-icon { width: 44px; height: 44px; background: var(--primary-dim); border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.tool-name { font-family: 'Khand', sans-serif; font-size: 18px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--text); }
.tool-desc { font-size: 13px; color: var(--muted); line-height: 1.6; flex: 1; }
.tool-link { font-family: 'Khand', sans-serif; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--primary); }

@media (max-width: 640px) {
  nav { padding: 16px 20px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .field-row { grid-template-columns: 1fr; }
  .result-number { font-size: 46px; }
  .tools-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 400px) {
  .tools-grid { grid-template-columns: 1fr; }
}
