:root {
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --blue-light: #eff6ff;
    --accent: #06b6d4;
    --accent-dark: #0891b2;
    --text: #0f172a;
    --text-secondary: #334155;
    --muted: #64748b;
    --white: #ffffff;
    --bg: #f8faff;
    --card-bg: #ffffff;
    --border: rgba(37,99,235,0.08);
    --border-strong: rgba(37,99,235,0.2);
    --shadow-sm: 0 2px 16px rgba(37,99,235,0.05);
    --shadow-md: 0 16px 40px rgba(37,99,235,0.12);
    --shadow-lg: 0 30px 60px rgba(37,99,235,0.18);
    --gradient-hero: linear-gradient(135deg, #eef2ff 0%, #e0f2fe 100%);
    --gradient-brand: linear-gradient(135deg, #2563eb, #06b6d4);
}

[data-theme="dark"] {
    --blue: #3b82f6;
    --blue-dark: #60a5fa;
    --blue-light: rgba(59,130,246,0.15);
    --accent: #22d3ee;
    --accent-dark: #06b6d4;
    --text: #f1f5f9;
    --text-secondary: #cbd5e1;
    --muted: #94a3b8;
    --white: #0f172a;
    --bg: #020617;
    --card-bg: #0f172a;
    --border: rgba(59,130,246,0.15);
    --border-strong: rgba(59,130,246,0.3);
    --shadow-sm: 0 2px 16px rgba(0,0,0,0.4);
    --shadow-md: 0 16px 40px rgba(0,0,0,0.5);
    --shadow-lg: 0 30px 60px rgba(0,0,0,0.6);
    --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --gradient-brand: linear-gradient(135deg, #3b82f6, #22d3ee);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Plus Jakarta Sans", sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
    line-height: 1.6;
}

.hero {
    position: relative;
    background: var(--gradient-hero);
    padding: 80px 20px 100px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.hero-bg-mesh {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(37,99,235,0.15), transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(6,182,212,0.15), transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(99,102,241,0.1), transparent 50%);
    animation: meshMove 15s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes meshMove {
    0% { transform: translate(0,0) scale(1); }
    50% { transform: translate(30px,-20px) scale(1.05); }
    100% { transform: translate(-20px,30px) scale(1.1); }
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    background: var(--gradient-brand);
    opacity: 0.08;
    filter: blur(40px);
    pointer-events: none;
}

.shape-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    left: 5%;
    animation: float1 12s ease-in-out infinite;
}

.shape-2 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 10%;
    animation: float2 10s ease-in-out infinite;
}

.shape-3 {
    width: 100px;
    height: 100px;
    top: 20%;
    right: 20%;
    animation: float3 8s ease-in-out infinite;
}

@keyframes float1 {
    0%,100% { transform:translate(0,0); }
    50% { transform:translate(30px,-30px); }
}

@keyframes float2 {
    0%,100% { transform:translate(0,0); }
    50% { transform:translate(-40px,20px); }
}

@keyframes float3 {
    0%,100% { transform:translate(0,0); }
    50% { transform:translate(20px,40px); }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 880px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--card-bg);
    border: 1px solid var(--border-strong);
    border-radius: 30px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--blue);
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    animation: fadeUp 0.6s ease 0.1s backwards;
}

.hero-badge .pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%,100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.4);
        opacity: 0.6;
    }
}

.hero h1 {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: 20px;
    color: var(--text);
    animation: fadeUp 0.6s ease 0.2s backwards;
}

.hero h1 .gradient-text {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.hero p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0 auto 36px;
    line-height: 1.7;
    font-weight: 500;
    animation: fadeUp 0.6s ease 0.3s backwards;
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 50px;
    animation: fadeUp 0.6s ease 0.4s backwards;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gradient-brand);
    color: white;
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(37,99,235,0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(37,99,235,0.4);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--card-bg);
    color: var(--text);
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    border: 1px solid var(--border-strong);
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: var(--blue-light);
    border-color: var(--blue);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    animation: fadeUp 0.6s ease 0.5s backwards;
}

.stat {
    text-align: center;
}

.stat-num {
    font-size: 36px;
    font-weight: 800;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.activity-strip {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.7;
}

.activity-strip .activity-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--blue-light);
    border-radius: 50%;
    margin-right: 8px;
    color: var(--blue);
    font-size: 12px;
    vertical-align: middle;
}

.activity-strip strong {
    color: var(--blue);
    font-weight: 700;
}

.mini-calc-section {
    padding: 80px 20px;
    background: var(--bg);
    position: relative;
}

.mini-calc-wrapper {
    max-width: 720px;
    margin: 0 auto;
}

.calc-eyebrow {
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}

.calc-title {
    font-size: clamp(26px, 3vw, 36px);
    font-weight: 800;
    text-align: center;
    color: var(--text);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.calc-subtitle {
    text-align: center;
    color: var(--muted);
    margin-bottom: 36px;
    font-size: 15px;
}

.calc-card {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 32px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.calc-card form {
    margin: 0;
}

.calc-row {
    display: grid;
    grid-template-columns: 2fr 1.2fr 1fr auto;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.calc-row-header {
    display: grid;
    grid-template-columns: 2fr 1.2fr 1fr auto;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-left: 4px;
}

.calc-field {
    min-width: 0;
}

.calc-field-label {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    display: block;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
}

.calc-input,
.calc-select {
    background: var(--bg);
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    font-weight: 500;
    transition: all 0.2s ease;
    width: 100%;
}

.calc-input:focus,
.calc-select:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px var(--blue-light);
}

.calc-input[aria-invalid="true"],
.calc-select[aria-invalid="true"] {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220,38,38,0.12);
}

.calc-remove {
    background: transparent;
    border: 1px solid var(--border-strong);
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 12px;
    cursor: pointer;
    color: var(--muted);
    font-size: 25px;
    line-height: 1;
    font-weight: 400;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calc-remove span {
    display: block;
    transform: translateY(-1px);
}

.calc-remove:hover {
    background: #fee2e2;
    border-color: #ef4444;
    color: #ef4444;
}

[data-theme="dark"] .calc-remove:hover {
    background: rgba(239,68,68,0.2);
}

.calc-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.calc-add {
    background: var(--blue-light);
    color: var(--blue);
    border: 1px dashed var(--border-strong);
    border-radius: 10px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 140px;
}

.calc-add:hover {
    background: var(--blue);
    color: white;
    border-style: solid;
}

.calc-calculate {
    background: var(--gradient-brand);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 12px 32px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 6px 20px rgba(37,99,235,0.3);
    transition: all 0.2s ease;
    flex: 2;
    min-width: 160px;
}

.calc-calculate:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(37,99,235,0.4);
}

.calc-help {
    margin-top: 16px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

.calc-error {
    margin-top: 16px;
    padding: 12px 14px;
    border: 1px solid rgba(220,38,38,0.35);
    border-radius: 10px;
    background: rgba(220,38,38,0.08);
    color: #b91c1c;
    font-size: 14px;
    font-weight: 700;
}

[data-theme="dark"] .calc-error {
    color: #fca5a5;
}

.calc-result {
    margin-top: 24px;
    padding: 28px;
    background: var(--gradient-hero);
    border-radius: 16px;
    text-align: center;
    border: 1px solid var(--border-strong);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
    display: none;
}

.calc-result.visible {
    opacity: 1;
    transform: translateY(0);
    display: block;
}

.calc-result-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.calc-result-value {
    font-size: 64px;
    font-weight: 800;
    line-height: 1;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    letter-spacing: -2px;
}

.calc-result-tier {
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 20px;
    background: white;
    margin-bottom: 12px;
}

[data-theme="dark"] .calc-result-tier {
    background: rgba(255,255,255,0.1);
}

.tier-excellent { color: #059669; }
.tier-good { color: #2563eb; }
.tier-average { color: #d97706; }
.tier-low { color: #dc2626; }

.calc-result-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--blue);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    margin-top: 8px;
}

.calc-result-link:hover {
    gap: 10px;
}

.calc-method {
    margin-top: 22px;
    padding: 20px;
    border: 1px solid var(--border-strong);
    border-radius: 16px;
    background: var(--blue-light);
}

.calc-method h3 {
    margin-bottom: 8px;
    color: var(--text);
    font-size: 16px;
}

.calc-method p {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.75;
}

.calc-method p + p {
    margin-top: 8px;
}

.reveal {
    opacity: 1;
    transform: none;
}

.js .reveal {
    opacity: 0;
    transform: translateY(40px);
    transition:
        opacity 0.8s cubic-bezier(0.16,1,0.3,1),
        transform 0.8s cubic-bezier(0.16,1,0.3,1);
}

.js .reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.about-section {
    background: var(--card-bg);
    padding: 80px 20px;
    border-bottom: 1px solid var(--border);
}

.about-wrap {
    max-width: 960px;
    margin: 0 auto;
    text-align: center;
}

.eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
    display: inline-block;
}

.section-title {
    font-size: clamp(26px,3.5vw,40px);
    font-weight: 800;
    color: var(--text);
    margin-bottom: 24px;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.about-wrap > p {
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.9;
    margin-bottom: 16px;
    font-weight: 500;
}

.about-points {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 16px;
    margin: 34px 0 24px;
    text-align: left;
}

.about-point {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 20px;
    border: 1px solid var(--border-strong);
    border-radius: 16px;
    background: var(--bg);
}

.about-point-icon,
.selector-icon {
    width: 46px;
    min-width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: var(--blue-light);
    color: var(--blue);
}

.about-point-icon svg,
.selector-icon svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.about-point h3 {
    margin-bottom: 6px;
    color: var(--text);
    font-size: 15px;
}

.about-point p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

.trust-note {
    max-width: 760px;
    margin: 26px auto 0;
    padding: 18px 20px;
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    background: var(--blue-light);
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.8;
    text-align: left;
}

.trust-note strong {
    color: var(--text);
}

.how-section {
    background: var(--bg);
    padding: 80px 20px;
    border-bottom: 1px solid var(--border);
}

.how-wrap {
    max-width: 1000px;
    margin: 0 auto;
}

.how-header {
    text-align: center;
    margin-bottom: 50px;
}

.how-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(240px,1fr));
    gap: 24px;
}

.how-card {
    background: var(--card-bg);
    padding: 32px 28px;
    border-radius: 20px;
    border: 1px solid var(--border);
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

.how-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.how-step {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-brand);
    color: white;
    font-size: 12px;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: 20px;
    letter-spacing: 1px;
}

.how-icon {
    width: 56px;
    height: 56px;
    background: var(--blue-light);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 16px auto 18px;
    color: var(--blue);
}

.how-icon svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.how-card h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text);
}

.how-card p {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.7;
}

.tools-section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.tools-header {
    text-align: center;
    margin-bottom: 40px;
}

.tools-intro {
    max-width: 720px;
    margin: -16px auto 32px;
    color: var(--text-secondary);
    text-align: center;
    font-size: 15px;
    line-height: 1.8;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(280px,1fr));
    gap: 20px;
}

.recommended-grid {
    grid-template-columns: repeat(3,minmax(0,1fr));
}

.tool-card {
    background: var(--card-bg);
    border-radius: 18px;
    padding: 28px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        border-color 0.3s ease;
    position: relative;
    opacity: 1;
    transform: none;
    cursor: default;
}

.recommended-grid .tool-card {
    display: flex;
    flex-direction: column;
    min-height: 280px;
}

.js .tool-card {
    opacity: 0;
    transform: translateY(20px);
}

.js .tool-card.visible {
    animation: cardIn 0.5s ease forwards;
}

@keyframes cardIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 18px;
    padding: 1.5px;
    background: var(--gradient-brand);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.tool-icon {
    width: 52px;
    height: 52px;
    background: var(--blue-light);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    transition: transform 0.3s ease;
    color: var(--blue);
}

.tool-icon svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tool-card:hover .tool-icon {
    transform: scale(1.1) rotate(-5deg);
}

.tool-card h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.tool-card p {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 20px;
    font-weight: 500;
    min-height: 64px;
}

.recommended-grid .tool-card p {
    flex: 1;
    min-height: 68px;
}

.tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--blue);
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    transition: background 0.2s ease, gap 0.2s ease;
    min-height: 44px;
}

.tool-btn:hover {
    background: var(--blue-dark);
    gap: 10px;
}

.tool-btn::after {
    content: "→";
}

.recommended-grid .class-rank-card {
    grid-column: 2;
}

.tools-footer {
    margin-top: 34px;
    text-align: center;
}

.selector-section {
    padding: 88px 20px;
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.selector-wrap {
    max-width: 1100px;
    margin: 0 auto;
}

.selector-header {
    max-width: 780px;
    margin: 0 auto 38px;
    text-align: center;
}

.selector-header p {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.8;
}

.selector-grid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 16px;
}

.selector-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--bg);
    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.selector-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-sm);
}

.selector-card h3 {
    margin-bottom: 7px;
    color: var(--text);
    font-size: 16px;
    line-height: 1.35;
}

.selector-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.selector-card a {
    color: var(--blue);
    font-weight: 700;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.selector-note {
    margin-top: 24px;
    padding: 18px 20px;
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    background: var(--blue-light);
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.75;
}

.selector-note strong {
    color: var(--text);
}

.standards-section {
    padding: 88px 20px;
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.standards-wrap {
    max-width: 1100px;
    margin: 0 auto;
}

.standards-header {
    max-width: 780px;
    margin: 0 auto 42px;
    text-align: center;
}

.standards-header > p {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.8;
}

.standards-grid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 20px;
}

.standard-card {
    display: grid;
    grid-template-columns: 52px minmax(0,1fr);
    gap: 18px;
    align-items: start;
    background: var(--bg);
    border: 1px solid var(--border-strong);
    border-radius: 18px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.standard-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-brand);
    color: white;
    box-shadow: 0 10px 24px rgba(37,99,235,0.22);
}

.standard-icon svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.standard-card h3 {
    font-size: 17px;
    line-height: 1.35;
    margin-bottom: 8px;
}

.standard-card p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.75;
}

.review-panel {
    margin-top: 24px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    padding: 20px 22px;
    border-radius: 16px;
    background: var(--blue-light);
    border: 1px solid var(--border-strong);
}

.review-panel p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
}

.review-panel strong {
    color: var(--text);
}

.review-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.review-links a {
    color: var(--blue);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.review-links a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.why-section {
    padding: 80px 20px;
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.why-wrap {
    max-width: 1100px;
    margin: 0 auto;
}

.why-header {
    text-align: center;
    margin-bottom: 50px;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(240px,1fr));
    gap: 24px;
}

.why-card {
    text-align: center;
    padding: 24px;
}

.why-icon {
    width: 64px;
    height: 64px;
    background: var(--gradient-brand);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    box-shadow: 0 12px 30px rgba(37,99,235,0.3);
    color: #ffffff;
}

.why-icon svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.why-card h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text);
}

.why-card p {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.7;
}

.faq-section {
    background: var(--bg);
    padding: 80px 20px;
    border-bottom: 1px solid var(--border);
}

.faq-wrap {
    max-width: 800px;
    margin: 0 auto;
}

.faq-header {
    text-align: center;
    margin-bottom: 40px;
}

.faq-intro {
    max-width: 680px;
    margin: -10px auto 0;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.75;
}

.faq-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-bottom: 12px;
    overflow: clip;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--border-strong);
}

.faq-question {
    padding: 20px 24px;
    font-weight: 700;
    font-size: 15px;
    color: var(--text);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: color 0.2s ease;
    list-style: none;
    min-height: 64px;
}

.faq-question:hover {
    color: var(--blue);
}

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

.faq-question::after {
    content: "+";
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--blue-light);
    color: var(--blue);
    font-size: 16px;
    font-weight: 800;
    transition: transform 0.25s ease;
}

.faq-item[open] .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: none;
    overflow: visible;
}

.faq-answer-inner {
    padding: 16px 24px 20px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
    border-top: 1px solid var(--border);
}

.cta-section {
    background: var(--gradient-brand);
    padding: 80px 20px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.15), transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(255,255,255,0.1), transparent 50%);
    pointer-events: none;
}

.cta-wrap {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.cta-section h2 {
    font-size: clamp(28px,4vw,44px);
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.cta-section p {
    font-size: 17px;
    opacity: 0.95;
    margin-bottom: 32px;
    line-height: 1.7;
}

.cta-section .btn-primary {
    background: white;
    color: var(--blue);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.cta-section .btn-primary:hover {
    background: #f0f9ff;
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    top: 50%;
    left: 50%;
    pointer-events: none;
    z-index: 9999;
    animation: confettiFall 1.5s ease-out forwards;
}

@keyframes confettiFall {
    to {
        transform: translate(var(--x),var(--y)) rotate(720deg);
        opacity: 0;
    }
}

button,
input,
select,
summary {
    font: inherit;
}

button,
summary {
    -webkit-tap-highlight-color: transparent;
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

@media (max-width: 900px) {
    .about-points,
    .recommended-grid {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }

    .recommended-grid .class-rank-card {
        grid-column: auto;
    }
}

@media (max-width: 768px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .hero {
        padding: 56px 16px 64px;
        min-height: auto;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-badge {
        max-width: 100%;
        padding: 7px 14px;
        font-size: 12px;
        line-height: 1.3;
        margin-bottom: 22px;
    }

    .hero h1 {
        font-size: clamp(34px,9vw,44px);
        line-height: 1.12;
        letter-spacing: -1.2px;
        margin-bottom: 18px;
    }

    .hero p {
        font-size: 17px;
        line-height: 1.65;
        max-width: 100%;
        margin-bottom: 30px;
    }

    .hero-cta {
        width: 100%;
        gap: 12px;
        margin-bottom: 42px;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 320px;
        justify-content: center;
        padding: 15px 20px;
        font-size: 15px;
        border-radius: 12px;
    }

    .hero-stats {
        gap: 18px;
    }

    .stat {
        min-width: 88px;
    }

    .stat-num {
        font-size: 28px;
    }

    .stat-label {
        font-size: 11px;
        letter-spacing: 0.7px;
    }

    .floating-shape {
        display: none;
    }

    .calc-row,
    .calc-row-header {
        grid-template-columns: 1fr 1.2fr 0.8fr auto;
    }
}

@media (max-width: 760px) {
    .standards-section {
        padding: 72px 16px;
    }

    .standards-grid {
        grid-template-columns: 1fr;
    }

    .standard-card {
        grid-template-columns: 46px minmax(0,1fr);
        padding: 20px;
    }

    .standard-icon {
        width: 46px;
        height: 46px;
    }

    .review-panel {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .calc-row {
        grid-template-columns: minmax(0,1fr) minmax(92px,0.72fr) 44px;
        gap: 10px;
        align-items: end;
        margin-bottom: 22px;
        padding-bottom: 22px;
        border-bottom: 1px solid var(--border);
    }

    .calc-row:last-child {
        margin-bottom: 0;
    }

    .calc-row .calc-field:first-child {
        grid-column: 1 / -1;
    }

    .calc-row-header {
        display: none;
    }

    .calc-field-label {
        position: static !important;
        width: auto !important;
        height: auto !important;
        padding: 0 !important;
        margin: 0 0 6px !important;
        overflow: visible !important;
        clip: auto !important;
        white-space: normal !important;
    }

    .calc-remove {
        grid-column: 3;
        width: 44px;
        min-width: 44px;
        height: 46px;
        min-height: 46px;
        align-self: end;
    }

    .about-points,
    .recommended-grid,
    .selector-grid {
        grid-template-columns: 1fr;
    }

    .recommended-grid .class-rank-card {
        grid-column: auto;
    }

    .recommended-grid .tool-card {
        min-height: 0;
    }

    .recommended-grid .tool-card p,
    .tool-card p {
        min-height: 0;
    }

    .selector-section {
        padding: 72px 16px;
    }

    .selector-card {
        padding: 18px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 50px 16px 58px;
    }

    .hero-badge {
        font-size: 12px;
        padding: 7px 13px;
    }

    .hero h1 {
        font-size: clamp(32px,10vw,39px);
        line-height: 1.13;
        letter-spacing: -1.1px;
    }

    .hero p {
        font-size: 16px;
        line-height: 1.65;
    }

    .btn-primary,
    .btn-secondary {
        max-width: 100%;
    }

    .hero-stats {
        display: grid;
        grid-template-columns: repeat(3,1fr);
        gap: 10px;
        width: 100%;
    }

    .stat {
        min-width: 0;
    }

    .stat-num {
        font-size: 24px;
    }

    .stat-label {
        font-size: 10px;
    }

    .activity-strip {
        padding: 14px 16px;
        font-size: 13px;
        line-height: 1.6;
    }

    .mini-calc-section,
    .about-section,
    .how-section,
    .tools-section,
    .why-section,
    .faq-section,
    .cta-section {
        padding-left: 16px;
        padding-right: 16px;
    }

    .calc-card {
        padding: 24px 16px;
        border-radius: 22px;
    }

    .calc-actions {
        flex-direction: column;
    }

    .calc-add,
    .calc-calculate {
        width: 100%;
        min-width: 0;
    }

    .calc-result-value {
        font-size: 52px;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 380px) {
    .hero h1 {
        font-size: 30px;
    }

    .hero p {
        font-size: 15.5px;
    }

    .calc-row {
        grid-template-columns: minmax(0,1fr) 82px 42px;
        gap: 8px;
    }

    .calc-remove {
        width: 42px;
        min-width: 42px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
