.page-agency main,
.page-tools main { padding-bottom: 80px; }

.mod-hero { padding: 48px 0 28px; }
.mod-hero h1 { font-size: clamp(32px, 5vw, 52px); margin: 12px 0; }
.mod-hero p { color: var(--text-muted); max-width: 680px; }

.agency-hero { padding: 56px 0 28px; }
.agency-hero h1 {
    font-size: clamp(34px, 5.4vw, 58px);
    margin: 12px 0 16px;
    max-width: 16ch;
    text-wrap: balance;
}
.agency-lead {
    color: var(--text-secondary);
    font-size: 18px;
    max-width: 640px;
    margin: 0 0 24px;
}
.agency-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
    gap: 28px;
    align-items: center;
}
.hero-cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.agency-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    padding: 28px;
    margin: 0;
}
.agency-stats dt {
    font-size: 28px;
    font-weight: 800;
    color: #67E8F9;
}
.agency-stats dd { margin: 4px 0 0; color: var(--text-muted); font-size: 14px; }

.glass-panel {
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: var(--shadow-card);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
}

.mod-section { padding: 56px 0 8px; }
.mod-head { max-width: 720px; margin-bottom: 28px; }
.mod-head h2 { font-size: clamp(26px, 3vw, 40px); margin: 10px 0; }
.mod-head p { color: var(--text-muted); margin: 0; }

.mod-grid,
.svc-grid,
.case-grid,
.price-grid,
.process-grid {
    display: grid;
    gap: 20px;
    padding-bottom: 24px;
}
.mod-grid,
.svc-grid,
.case-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.price-grid,
.process-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.price-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.mod-card,
.svc-card,
.case-card,
.price-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 220px;
    padding: 22px;
    color: inherit;
}
.svc-card { min-height: 240px; }
.svc-card:hover,
.mod-card:hover {
    border-color: rgba(103, 232, 249, 0.28);
    transform: translateY(-3px);
}
.mod-card h2, .mod-card h3,
.svc-card h3, .case-card h3, .price-card h3 { margin: 0; font-size: 20px; }
.mod-card p, .svc-card p, .case-card p, .price-card p { margin: 0; color: var(--text-muted); }
.mod-meta { color: #67E8F9; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.mod-price { font-weight: 800; color: var(--text-primary); margin-top: auto; }

.svc-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.28), rgba(6, 182, 212, 0.18));
    color: #67E8F9;
    font-size: 20px;
}

.process-grid { list-style: none; margin: 0; padding: 0 0 24px; }
.process-grid li { padding: 22px; }
.process-num {
    display: block;
    font-family: var(--font-code);
    color: #67E8F9;
    font-weight: 800;
    margin-bottom: 10px;
}
.process-grid h3 { margin: 0 0 8px; }

.stack-wall {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0;
    padding: 0 0 24px;
}
.stack-wall li {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    min-height: 48px;
}
.stack-wall i { color: #67E8F9; }

.price-card ul { margin: 0 0 16px; padding-left: 18px; color: var(--text-muted); }
.price-amt { font-size: 28px; font-weight: 800; color: var(--text-primary); }
.price-card.is-featured { border-color: rgba(103, 232, 249, 0.35); box-shadow: var(--shadow-glow); }
.price-card .btn-primary { margin-top: auto; justify-content: center; }

.prose-card { padding: 28px 32px; }
.prose-card h2 { margin-top: 0; }
.prose-card ul { color: var(--text-secondary); }
.service-aside { padding: 28px; }
.crumb { display: flex; gap: 8px; color: var(--text-muted); font-size: 14px; margin: 10px 0; }
.crumb a { color: #67E8F9; }

.hire-band {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 28px;
    padding: 28px 0 72px;
    align-items: start;
}
.hire-band h2 { font-size: clamp(28px, 3vw, 40px); margin: 10px 0; }
.hire-band-copy p { color: var(--text-muted); }
.hire-points { color: var(--text-secondary); padding-left: 18px; }
.hire-direct { display: flex; flex-direction: column; gap: 6px; }
.hire-direct a { color: #67E8F9; }
.hire-form { display: grid; gap: 16px; padding: 26px; }
.float-field { position: relative; }
.float-field input,
.float-field textarea,
.float-field select {
    width: 100%;
    min-height: 58px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.045);
    color: #F8FAFC;
    padding: 24px 16px 10px;
    outline: none;
    appearance: none;
}
.float-field textarea { min-height: 132px; resize: vertical; padding-top: 28px; }
.float-field select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2367E8F9' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}
.float-field label {
    position: absolute;
    left: 16px;
    top: 18px;
    margin: 0;
    color: #E2E8F0;
    font-size: 15px;
    font-weight: 650;
    letter-spacing: -0.01em;
    pointer-events: none;
    transition: top 0.16s ease, font-size 0.16s ease, color 0.16s ease;
}
.float-field input:focus,
.float-field textarea:focus,
.float-field select:focus {
    border-color: rgba(103, 232, 249, 0.55);
    box-shadow: var(--focus-ring);
    background: rgba(37, 99, 235, 0.08);
}
.float-field input:focus + label,
.float-field input:not(:placeholder-shown) + label,
.float-field textarea:focus + label,
.float-field textarea:not(:placeholder-shown) + label,
.float-field.is-floated label,
.float-field select:focus + label {
    top: 7px;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #67E8F9;
}
.float-field.is-invalid input,
.float-field.is-invalid textarea,
.float-field.is-invalid select { border-color: #f87171; }
.hire-fineprint { color: var(--text-muted); font-size: 13px; margin: 0; }

.reco-banner {
    display: inline-flex;
    gap: 8px;
    padding: 10px 14px;
    border-radius: var(--radius-pill);
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.28);
    color: #6ee7b7;
}
.reco-banner a { color: inherit; font-weight: 800; }

.tool-status {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: start;
    margin: 0 0 18px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.55;
}
.tool-status span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(37, 99, 235, 0.55);
}
.tool-status-live span { background: rgba(16, 185, 129, 0.55); }
.tool-status-fallback span { background: rgba(245, 158, 11, 0.6); }
.tool-status-wait span { background: rgba(148, 163, 184, 0.35); }
.tool-unavailable {
    display: grid;
    gap: 12px;
    justify-items: start;
    padding: 28px;
}
.tool-unavailable h2 { margin: 0; }
.tool-unavailable p { margin: 0; color: var(--text-secondary); line-height: 1.6; }
.tool-wrap { position: relative; max-width: 720px; }
.tool-stage { display: grid; gap: 16px; padding: 28px; }
.dropzone {
    min-height: 240px;
    border: 1.5px dashed rgba(103, 232, 249, 0.35);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.03);
    display: grid;
    place-items: center;
    text-align: center;
    padding: 32px;
    color: var(--text-muted);
    cursor: pointer;
}
.dropzone:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.dropzone.is-over { border-color: #67E8F9; background: rgba(37, 99, 235, 0.12); }
.drop-file { margin: 8px 0 0; color: var(--text-primary); font-weight: 700; }

.format-pills {
    border: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.format-pills legend { font-weight: 800; width: 100%; margin-bottom: 6px; }
.format-pills label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
}

.tool-overlay,
.tool-success {
    text-align: center;
    padding: 40px 24px;
}
.tool-overlay {
    position: absolute;
    inset: 0;
    border-radius: 22px;
    background: rgba(11, 15, 25, 0.72);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    z-index: 2;
}
.tool-overlay[hidden],
.tool-success[hidden] { display: none; }
.tool-overlay-sub { color: var(--text-muted); margin: 0; }
.tool-spinner {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid rgba(103, 232, 249, 0.2);
    border-top-color: #67E8F9;
    animation: seh-spin 0.8s linear infinite;
}
@keyframes seh-spin { to { transform: rotate(360deg); } }
.tool-success { display: grid; gap: 12px; justify-items: center; }

.test-search {
    position: relative;
    max-width: 560px;
    margin-top: 8px;
}
.test-search i { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: #67E8F9; }
.test-search input {
    width: 100%;
    min-height: 54px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    padding: 0 20px 0 46px;
}
.filters-bar { padding: 8px 0 0; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.filter-label { color: #67E8F9; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; margin-right: 6px; }
.chip {
    min-height: 44px;
    padding: 8px 14px;
    touch-action: manipulation;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    cursor: pointer;
}
.chip.active, .type-grid .is-active { border-color: rgba(103, 232, 249, 0.4); color: #fff; background: rgba(37, 99, 235, 0.18); }
.type-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; padding-bottom: 8px; }
.empty-state { padding: 22px; color: var(--text-muted); }
.test-card .btn-primary { margin-top: auto; justify-content: center; }

.page-quiz .seh-chat,
.page-quiz .footer,
.page-quiz .cookie-banner { display: none !important; }
.quiz-app { width: min(760px, calc(100% - 32px)); margin: 0 auto; padding: 24px 0 80px; }
.quiz-chrome {
    position: sticky;
    top: 76px;
    z-index: 20;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px 16px;
    padding: 16px 18px;
    margin-bottom: 20px;
    align-items: center;
}
.quiz-chrome h1 { font-size: 18px; margin: 4px 0 0; }
.quiz-timer {
    font-family: var(--font-code);
    font-weight: 800;
    color: #67E8F9;
    font-size: 22px;
    margin: 0;
}
.quiz-progress-label { margin: 0; color: var(--text-muted); font-size: 13px; font-weight: 700; }
.quiz-progress { grid-column: 1 / -1; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.quiz-progress span { display: block; height: 100%; width: 10%; background: var(--gradient-main); transition: width 0.2s ease; }
.quiz-slide { padding: 28px; margin-bottom: 18px; }
.quiz-slide[hidden] { display: none; }
.quiz-slide legend { font-size: 13px; font-weight: 800; color: #67E8F9; text-transform: uppercase; letter-spacing: 0.06em; }
.quiz-prompt { font-size: clamp(20px, 3vw, 28px); font-weight: 700; line-height: 1.45; margin: 12px 0 22px; color: #fff; }
.quiz-prompt p { margin: 0 0 12px; color: #fff; font-weight: 700; line-height: 1.45; }
.quiz-prompt p:last-child { margin-bottom: 0; }
.quiz-options { display: grid; gap: 12px; }
.quiz-opt {
    display: flex;
    gap: 14px;
    align-items: center;
    min-height: 56px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
}
.quiz-opt:hover { border-color: rgba(103, 232, 249, 0.35); background: rgba(37, 99, 235, 0.1); }
.quiz-opt:has(input:checked),
.quiz-opt.is-selected { border-color: #67E8F9; background: rgba(6, 182, 212, 0.12); box-shadow: var(--focus-ring); }
.quiz-opt input { position: absolute; opacity: 0; pointer-events: none; }
.quiz-opt-key {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-weight: 800;
    background: rgba(103, 232, 249, 0.12);
    color: #67E8F9;
    flex-shrink: 0;
}
.quiz-nav { display: flex; flex-wrap: wrap; gap: 12px; }
.quiz-nav .btn-primary, .quiz-nav .btn-secondary { min-height: 48px; }
.quiz-empty { padding: 24px; }
.quiz-slide textarea {
    width: 100%;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    padding: 12px;
}

.result-hero { display: grid; gap: 20px; }
.result-score { display: flex; gap: 20px; align-items: center; padding: 22px; max-width: 460px; }
.result-ring { width: 88px; height: 88px; transform: rotate(-90deg); }
.ring-bg, .ring-fg { fill: none; stroke-width: 8; }
.ring-bg { stroke: rgba(255, 255, 255, 0.08); }
.ring-fg { stroke: #67E8F9; stroke-linecap: round; stroke-dasharray: 251.2; }
.result-split { display: flex; gap: 24px; margin: 0; }
.result-split dt { font-size: 28px; font-weight: 800; color: #67E8F9; }
.result-split dd { margin: 0; color: var(--text-muted); }
.review-list { list-style: none; display: grid; gap: 14px; padding: 0; }
.review-item { padding: 20px; }
.review-item.is-ok { border-color: rgba(52, 211, 153, 0.35); }
.review-item.is-bad { border-color: rgba(248, 113, 113, 0.35); }
.review-q { color: #fff; font-weight: 700; font-size: 1.15rem; line-height: 1.45; margin: 0 0 12px; }
.review-q p { margin: 0 0 10px; color: #fff; font-weight: 700; }
.review-given, .review-correct { margin: 0 0 8px; color: #cbd5e1; line-height: 1.6; }
.review-explain { color: #94A3B8; line-height: 1.6; margin-top: 8px; }

@media (max-width: 1024px) {
    .agency-hero-grid,
    .hire-band,
    .mod-grid,
    .svc-grid,
    .case-grid,
    .price-grid,
    .process-grid,
    .type-grid { grid-template-columns: 1fr; }
    .agency-hero h1 { max-width: none; }
    .quiz-chrome { top: 64px; grid-template-columns: 1fr auto; }
    .quiz-chrome h1 { font-size: 16px; }
}

@media (max-width: 640px) {
    .quiz-app { width: calc(100% - 24px); padding-bottom: 120px; }
    .quiz-chrome { position: static; top: auto; padding: 12px 14px; }
    .quiz-prompt { font-size: 18px; line-height: 1.45; overflow-wrap: anywhere; }
    .quiz-opt { min-height: 52px; font-size: 16px; }
    .quiz-opt-text { overflow-wrap: anywhere; }
    .quiz-timer { font-size: 18px; }
    .result-score { flex-direction: column; align-items: flex-start; }
    .result-split { flex-wrap: wrap; }
}

.paper-wrap { padding: 28px 0 72px; }
.paper-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.paper-sheet {
    width: min(860px, calc(100% - 24px));
    margin: 0 auto;
    padding: 36px 32px 28px;
    border-radius: 18px;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
}
.paper-kicker { margin: 0 0 8px; color: #67e8f9; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.paper-sheet h1 { margin: 0 0 10px; color: #fff; font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.2; }
.paper-head p { color: #94A3B8; line-height: 1.6; }
.paper-section + .paper-section {
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.paper-section h2 {
    margin: 0 0 18px;
    color: #fff;
    font-size: 1.45rem;
    line-height: 1.2;
}
.paper-section h2::after {
    content: "";
    display: block;
    width: 64px;
    height: 3px;
    margin-top: 8px;
    border-radius: 99px;
    background: linear-gradient(90deg, #22d3ee, #2563eb);
}
.paper-items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 16px;
    counter-reset: paper;
}
.paper-item {
    position: relative;
    padding: 18px 18px 16px 52px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
}
.paper-item::before {
    counter-increment: paper;
    content: counter(paper);
    position: absolute;
    left: 16px;
    top: 18px;
    color: #67e8f9;
    font-weight: 800;
}
.paper-q { margin: 0 0 14px; color: #fff; font-weight: 700; font-size: 1.15rem; line-height: 1.45; }
.paper-q p { margin: 0 0 10px; color: #fff; font-weight: 700; line-height: 1.45; }
.paper-q p:last-child { margin-bottom: 0; }
.paper-a { margin: 0; }
.paper-a-label {
    margin: 0 0 8px;
    color: #67e8f9;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.paper-foot { margin-top: 28px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.08); color: #94A3B8; font-size: 13px; }
.study-text { color: #94A3B8; line-height: 1.6; font-size: 1.02rem; }
.study-text p { margin: 0 0 0.9em; color: #94A3B8; line-height: 1.6; white-space: normal; }
.study-text p:last-child { margin-bottom: 0; }
.study-code {
    margin: 12px 0 14px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(8, 15, 30, 0.72);
    border: 1px solid rgba(103, 232, 249, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 30px rgba(0, 0, 0, 0.18);
    color: #e2e8f0;
    font-family: var(--font-code), ui-monospace, Consolas, monospace;
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-x: auto;
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
}
.study-text code,
.quiz-prompt code,
.paper-q code,
.quiz-opt-text code,
.review-q code,
.review-explain code {
    font-family: var(--font-code), ui-monospace, Consolas, monospace;
    font-size: 0.92em;
    font-weight: 600;
    color: #a5f3fc;
    background: rgba(103, 232, 249, 0.12);
    border-radius: 6px;
    padding: 0.08em 0.38em;
}
.study-code code {
    background: transparent;
    color: inherit;
    padding: 0;
    font-size: inherit;
    font-weight: 500;
}
.study-steps { list-style: none; margin: 0 0 0.9em; padding: 0; display: grid; gap: 10px; }
.study-steps li { margin: 0; line-height: 1.6; }
.study-step { color: #67e8f9; font-weight: 800; margin-right: 6px; }

@media (max-width: 640px) {
    .paper-wrap { padding: 16px 0 120px; }
    .paper-sheet { padding: 22px 14px 18px; border-radius: 14px; }
    .paper-item { padding: 16px 12px 14px 38px; }
    .paper-q, .paper-q p, .study-text, .study-text p { overflow-wrap: anywhere; }
}

@media print {
    .navbar, .footer, .paper-toolbar, .seh-chat, .cookie-banner, .skip-link, .mobile-overlay { display: none !important; }
    body.page-paper, body.page-paper #main { background: #fff !important; color: #111 !important; }
    .paper-sheet { max-width: none; background: #fff; color: #111; border: 0; border-radius: 0; padding: 0; }
    .paper-sheet h1, .paper-q, .paper-q p, .paper-section h2 { color: #111 !important; }
    .paper-a, .paper-head p, .paper-foot, .study-text, .study-text p { color: #334155 !important; }
    .paper-section + .paper-section { border-top-color: #ddd; }
    .paper-item { background: transparent; border-color: #e2e8f0; break-inside: avoid; }
    .paper-item::before, .paper-a-label, .study-step { color: #0f172a !important; }
    .study-code { background: #f8fafc !important; color: #111 !important; border: 1px solid #cbd5e1 !important; box-shadow: none !important; }
    .study-text code, .paper-q code { color: #0f172a !important; background: #e2e8f0 !important; }
}
