:root {
    --bg-primary: #0A0A0A;
    --text-primary: #FAF8F2;
    --text-secondary: #A1A1AA;
    --text-tertiary: #6B6B74;
    --accent: #FBBF24;
    --accent-dim: rgba(251, 191, 36, 0.14);
    --border: rgba(255, 255, 255, 0.08);
    --pass: #34D399;
    --fail: #F87171;
    --font-sans: 'General Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body { font-family: var(--font-sans); background: var(--bg-primary); color: var(--text-primary); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
button, input { font-family: inherit; }

header { position: fixed; top: 20px; left: 0; right: 0; z-index: 100; display: flex; justify-content: center; }
.header-inner {
    display: flex; align-items: center; gap: 28px;
    background: rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 10px 40px -15px rgba(0, 0, 0, 0.6); border-radius: 999px; padding: 10px 14px 10px 10px;
}
.logo { width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, 0.1); color: var(--text-primary); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 15px; transition: transform .15s ease; }
.logo:hover { transform: scale(1.08); }
nav { display: flex; gap: 22px; align-items: center; }
nav a { font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-secondary); transition: color .15s ease, transform .15s ease; white-space: nowrap; display: inline-block; }
nav a:hover { color: var(--text-primary); transform: translateY(-1px); }
nav a.active { color: var(--text-primary); }
nav .nav-contact { background: var(--text-primary); color: var(--bg-primary); padding: 8px 16px; border-radius: 999px; font: inherit; font-weight: 600; border: none; cursor: pointer; transition: transform .15s ease; }
nav .nav-contact:hover { transform: scale(1.05); }
.nav-contact-group { position: relative; }
.nav-contact-panel { position: absolute; top: 100%; right: 0; margin-top: 10px; min-width: 150px; display: flex; flex-direction: column; gap: 2px; padding: 8px; background: rgba(22, 23, 26, 0.95); border: 1px solid var(--border); border-radius: 16px; opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-4px); transition: opacity .15s ease, transform .15s ease, visibility .15s; }
.nav-contact-group:hover .nav-contact-panel, .nav-contact-group:focus-within .nav-contact-panel { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); }
.nav-contact-panel a { padding: 8px 10px; border-radius: 10px; }
.nav-contact-panel a:hover { background: rgba(255,255,255,0.06); transform: none; }

.ct-wrap { max-width: 760px; margin: 0 auto; padding: 128px 24px 100px; }
.ct-back { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--text-secondary); margin-bottom: 28px; transition: color .2s; }
.ct-back:hover { color: var(--text-primary); }
.ct-back svg { width: 16px; height: 16px; }

.ct-hero { text-align: center; margin-bottom: 44px; }
.ct-eyebrow { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent); margin-bottom: 14px; display: inline-block; }
.ct-hero h1 { font-weight: 500; letter-spacing: -0.03em; font-size: clamp(2rem, 5vw, 2.8rem); margin-bottom: 16px; }
.ct-lede { font-size: 16px; line-height: 1.7; color: var(--text-secondary); max-width: 480px; margin: 0 auto; }

.ct-tool { background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border); border-radius: 20px; padding: 32px; }
.ct-pickers { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.ct-picker { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.ct-picker span { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-tertiary); }
.ct-swatch-row { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 12px; padding: 8px; }
.ct-swatch-row input[type="color"] { width: 40px; height: 40px; border: none; border-radius: 8px; padding: 0; background: none; cursor: pointer; flex-shrink: 0; }
.ct-swatch-row input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.ct-swatch-row input[type="color"]::-webkit-color-swatch { border: 1px solid rgba(255,255,255,0.15); border-radius: 8px; }
.ct-swatch-row input[type="text"] { flex: 1; min-width: 0; background: none; border: none; color: var(--text-primary); font-size: 15px; font-weight: 600; text-transform: uppercase; }
.ct-swatch-row input[type="text"]:focus { outline: none; }
.ct-swap { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.06); border: 1px solid var(--border); color: var(--text-primary); display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; margin-top: 20px; transition: all .2s ease; }
.ct-swap:hover { background: rgba(255,255,255,0.12); transform: rotate(180deg); }
.ct-swap svg { width: 18px; height: 18px; }

.ct-result { display: flex; align-items: stretch; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.ct-ratio-block { flex: 0 0 160px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 14px; padding: 20px; text-align: center; }
.ct-ratio { font-size: 40px; font-weight: 700; letter-spacing: -0.02em; color: var(--accent); line-height: 1; }
.ct-ratio-label { font-size: 12px; color: var(--text-tertiary); margin-top: 6px; }
.ct-preview { flex: 1; min-width: 220px; border-radius: 14px; padding: 24px; display: flex; flex-direction: column; gap: 10px; justify-content: center; transition: background-color .15s ease, color .15s ease; }
.ct-preview-large { font-size: 22px; font-weight: 600; }
.ct-preview-normal { font-size: 15px; line-height: 1.6; }

.ct-grades { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 8px; }
.ct-grade { display: flex; flex-direction: column; gap: 4px; background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.ct-grade-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.ct-grade-need { font-size: 11px; color: var(--text-tertiary); }
.ct-grade-pass { font-size: 12px; font-weight: 700; margin-top: 4px; }
.ct-grade.is-pass .ct-grade-pass { color: var(--pass); }
.ct-grade.is-fail .ct-grade-pass { color: var(--fail); }

.ct-suggest { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }
.ct-suggest p { font-size: 14px; color: var(--text-secondary); margin-bottom: 14px; }
.ct-suggest-row { display: flex; align-items: center; gap: 14px; }
.ct-suggest-swatch { width: 44px; height: 44px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.15); flex-shrink: 0; }
.ct-suggest-hex { font-size: 15px; font-weight: 600; text-transform: uppercase; color: var(--text-primary); flex: 1; }
.ct-suggest-use { background: var(--text-primary); color: var(--bg-primary); border: none; border-radius: 999px; padding: 10px 18px; font-size: 13px; font-weight: 600; cursor: pointer; transition: transform .15s ease; }
.ct-suggest-use:hover { transform: scale(1.03); }

.ct-faq { border-top: 1px solid var(--border); padding-top: 40px; margin-top: 56px; }
.ct-faq h2 { font-weight: 500; letter-spacing: -0.02em; font-size: 20px; margin-bottom: 20px; }
.ct-faq-item { padding: 18px 0; border-top: 1px solid var(--border); }
.ct-faq-item:first-of-type { border-top: none; }
.ct-faq-item h3 { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.ct-faq-item p { font-size: 14px; line-height: 1.7; color: var(--text-secondary); max-width: 620px; }

footer { border-top: 1px solid var(--border); margin-top: 24px; }
.footer-inner { max-width: 1040px; margin: 0 auto; padding: 40px 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-name { font-weight: 700; font-size: 14px; }
.footer-status { font-size: 13px; color: var(--text-tertiary); }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 13px; color: var(--text-secondary); }
.footer-links a:hover { color: var(--accent); }

@media (max-width: 768px) {
    .header-inner { gap: 14px; padding: 8px 10px 8px 8px; }
    nav { gap: 12px; }
    .ct-wrap { padding: 108px 20px 80px; }
    .ct-tool { padding: 22px; }
    .ct-pickers { flex-direction: column; align-items: stretch; }
    .ct-swap { align-self: center; margin-top: 0; transform: rotate(90deg); }
    .ct-swap:hover { transform: rotate(270deg); }
    .ct-grades { grid-template-columns: 1fr; }
    .footer-inner { flex-direction: column; text-align: center; }
}
