:root {
    --ink: #17213d;
    --muted: #667085;
    --brand: #5b45e0;
    --brand-dark: #3c2cac;
    --accent: #18a88b;
    --line: #e4e7ec;
    --shadow: 0 18px 50px rgba(25, 33, 61, .10);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: radial-gradient(circle at 10% 0, rgba(91, 69, 224, .12), transparent 28rem), #fafbff;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}
a { color: inherit; }
.container { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.site-header { position: sticky; z-index: 20; top: 0; border-bottom: 1px solid rgba(228, 231, 236, .85); background: rgba(255, 255, 255, .88); backdrop-filter: blur(16px); }
.nav-shell { min-height: 74px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 1.2rem; font-weight: 800; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; color: white; border-radius: 12px; background: linear-gradient(135deg, var(--brand), #8776ff); box-shadow: 0 8px 22px rgba(91, 69, 224, .28); }
.main-menu { display: flex; align-items: center; gap: 28px; }
.main-menu a { color: #46506b; font-size: .95rem; font-weight: 650; text-decoration: none; }
.main-menu a:hover { color: var(--brand); }
.main-menu .nav-ai { padding: 9px 15px; color: white; border-radius: 10px; background: var(--ink); }
.menu-button { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--ink); cursor: pointer; transition: background .18s, border-color .18s; }
.menu-button:hover { background: #f5f3ff; border-color: var(--brand); }
.menu-icon { position: relative; display: block; width: 20px; height: 14px; }
.menu-icon span { position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px; background: currentColor; transition: transform .25s ease, opacity .2s ease, top .25s ease; }
.menu-icon span:nth-child(1) { top: 0; }
.menu-icon span:nth-child(2) { top: 6px; }
.menu-icon span:nth-child(3) { top: 12px; }
.sidebar-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(15, 20, 40, .42); backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity .28s ease; }
.sidebar-backdrop.is-open { opacity: 1; pointer-events: auto; }
.sidebar { position: fixed; top: 0; right: 0; bottom: 0; z-index: 100; width: min(360px, 88vw); display: flex; flex-direction: column; background: white; border-left: 1px solid var(--line); box-shadow: -24px 0 60px rgba(25, 33, 61, .18); transform: translateX(100%); transition: transform .32s cubic-bezier(.32, .72, 0, 1); }
.sidebar.is-open { transform: translateX(0); }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 22px 14px; border-bottom: 1px solid var(--line); }
.sidebar-close { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--ink); cursor: pointer; transition: background .18s, border-color .18s; }
.sidebar-close:hover { background: #f5f3ff; border-color: var(--brand); color: var(--brand); }
.sidebar-search { position: relative; margin: 18px 22px 8px; }
.sidebar-search-icon { position: absolute; top: 50%; left: 14px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.sidebar-search input { width: 100%; padding: 13px 14px 13px 42px; border: 1px solid var(--line); border-radius: 14px; background: #f9faff; color: var(--ink); font: inherit; outline: 0; transition: border-color .2s, background .2s, box-shadow .2s; }
.sidebar-search input:focus { background: white; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(91, 69, 224, .14); }
.sidebar-nav { padding: 14px 14px 6px; display: flex; flex-direction: column; gap: 4px; }
.sidebar-nav a { display: flex; align-items: center; gap: 14px; padding: 13px 14px; color: var(--ink); border-radius: 14px; font-weight: 650; text-decoration: none; transition: background .18s, color .18s, transform .18s; }
.sidebar-nav a svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--muted); transition: color .18s; }
.sidebar-nav a:hover { background: #f5f3ff; color: var(--brand-dark); }
.sidebar-nav a:hover svg { color: var(--brand); }
.sidebar-nav .sidebar-nav-ai { margin-top: 10px; color: white; background: var(--ink); }
.sidebar-nav .sidebar-nav-ai svg { color: #c8cede; }
.sidebar-nav .sidebar-nav-ai:hover { color: white; background: var(--brand); }
.sidebar-nav .sidebar-nav-ai:hover svg { color: white; }
.sidebar-footer { margin-top: auto; padding: 20px 22px 24px; border-top: 1px solid var(--line); background: #fafbff; }
.sidebar-foot-label { margin: 0 0 10px; color: var(--muted); font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.sidebar-author { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.sidebar-author-avatar { display: grid; place-items: center; width: 44px; height: 44px; color: white; border-radius: 12px; background: linear-gradient(135deg, var(--brand), var(--accent)); font-weight: 800; font-size: .85rem; }
.sidebar-author strong { font-weight: 700; }
body.sidebar-locked { overflow: hidden; }
.hero { padding: clamp(72px, 10vw, 126px) 0 72px; text-align: center; }
.eyebrow { display: inline-flex; margin-bottom: 18px; padding: 7px 12px; color: var(--brand-dark); border: 1px solid rgba(91, 69, 224, .18); border-radius: 999px; background: rgba(255, 255, 255, .72); font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.hero h1 { max-width: 820px; margin: 0 auto 18px; font-size: clamp(2.5rem, 6vw, 5rem); line-height: 1.04; letter-spacing: -.055em; }
.hero h1 span { color: var(--brand); }
.hero-copy { max-width: 660px; margin: 0 auto 32px; color: var(--muted); font-size: clamp(1rem, 2vw, 1.2rem); }
.search-form { max-width: 760px; margin: 0 auto; padding: 9px; display: flex; gap: 8px; border: 1px solid rgba(91, 69, 224, .16); border-radius: 18px; background: white; box-shadow: var(--shadow); }
.search-form input { min-width: 0; flex: 1; padding: 15px 18px; border: 0; outline: 0; color: var(--ink); background: transparent; font: inherit; font-size: 1.05rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 22px; border: 0; border-radius: 12px; color: white; background: var(--brand); font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; }
.button:hover { background: var(--brand-dark); }
.button-secondary { color: var(--brand); background: #eeebff; }
.quick-links { margin-top: 22px; display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; color: var(--muted); font-size: .9rem; }
.quick-links a { padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; background: white; text-decoration: none; }
.section { padding: 38px 0 78px; }
.section-heading { max-width: 650px; margin-bottom: 28px; }
.section-heading h2, .content-card h1, .result-card h1 { margin: 0 0 8px; line-height: 1.15; letter-spacing: -.035em; }
.section-heading p, .muted { color: var(--muted); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card, .content-card, .result-card { border: 1px solid var(--line); border-radius: 20px; background: rgba(255, 255, 255, .92); box-shadow: 0 12px 34px rgba(25, 33, 61, .06); }
.card { padding: 26px; }
.card h3 { margin: 10px 0 7px; }
.card p { margin: 0; color: var(--muted); }
.icon-box { width: 43px; height: 43px; display: grid; place-items: center; color: var(--brand); border-radius: 12px; background: #eeebff; font-weight: 900; }
.ai-banner { margin-top: 24px; padding: clamp(28px, 5vw, 50px); display: flex; align-items: center; justify-content: space-between; gap: 24px; color: white; border-radius: 24px; background: radial-gradient(circle at 90% 10%, rgba(135, 118, 255, .45), transparent 17rem), var(--ink); }
.ai-banner h2 { margin: 0 0 8px; font-size: clamp(1.7rem, 4vw, 2.5rem); }
.ai-banner p { max-width: 610px; margin: 0; color: #c8cede; }
.page-main { padding: 54px 0 84px; }
.breadcrumbs { margin: 0 0 18px; color: var(--muted); font-size: .9rem; }
.breadcrumbs a { color: var(--brand); text-decoration: none; font-weight: 600; }
.breadcrumbs a:hover { text-decoration: underline; }
.compact-search { margin-bottom: 26px; }
.result-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; align-items: start; }
.result-card, .content-card { padding: clamp(24px, 5vw, 42px); }
.result-label { margin: 0 0 6px; color: var(--muted); font-size: .83rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.synonym-list { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 10px; }
.synonym-list a { padding: 10px 15px; color: var(--brand-dark); border: 1px solid #dcd6ff; border-radius: 12px; background: #f5f3ff; font-weight: 750; text-decoration: none; }
.side-stack { display: grid; gap: 18px; }
.side-card { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: white; }
.side-card h2 { margin: 0 0 14px; font-size: 1.05rem; }
.side-card ul { margin: 0; padding-left: 20px; }
.side-card li + li { margin-top: 8px; }
.side-card a { color: var(--brand-dark); }
.notice { margin: 0 0 20px; padding: 18px; border: 1px solid #cdeee7; border-radius: 14px; background: #edfbf8; color: #126653; }
.notice-error { border-color: #f0d2d2; background: #fff4f4; color: #922d2d; }
.related-results { margin-top: 24px; }
.related-results h2 { font-size: 1.2rem; }
.related-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.related-list a { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: white; text-decoration: none; }
.profile-hero { display: grid; grid-template-columns: 160px 1fr; gap: 30px; align-items: center; }
.profile-avatar { width: 160px; height: 160px; display: grid; place-items: center; color: white; border-radius: 34px; background: linear-gradient(135deg, var(--brand), var(--accent)); font-size: 3.1rem; font-weight: 900; letter-spacing: -.06em; }
.reason-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.reason-card { padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: white; }
.reason-card h2 { margin: 12px 0 8px; font-size: 1.15rem; line-height: 1.25; }
.reason-card p { margin: 0; color: var(--muted); font-size: .96rem; }
.reason-number { display: inline-grid; place-items: center; width: 40px; height: 40px; color: var(--brand-dark); border-radius: 12px; background: #eeebff; font-weight: 800; font-size: .95rem; }
.recent-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.recent-card { padding: 16px; display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: 14px; background: white; text-decoration: none; color: var(--ink); }
.recent-card strong { color: var(--brand-dark); }
.recent-card .muted { font-size: .88rem; }
.recent-card:hover { border-color: var(--brand); box-shadow: 0 8px 18px rgba(91, 69, 224, .12); }
.compact-search { max-width: 560px; margin: 0 0 24px; }
.footer { padding: 30px 0; color: var(--muted); border-top: 1px solid var(--line); background: white; text-align: center; font-size: .9rem; }
.footer a { color: var(--brand-dark); font-weight: 700; }
@media (max-width: 960px) {
    .menu-button { display: inline-flex; }
    .main-menu { display: none; }
    .feature-grid { grid-template-columns: 1fr; }
    .result-layout { grid-template-columns: 1fr; }
    .ai-banner { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 560px) {
    .search-form { padding: 7px; border-radius: 15px; }
    .search-form input { padding: 12px; font-size: 1rem; }
    .button { padding: 12px 15px; }
    .related-list { grid-template-columns: 1fr; }
    .profile-hero { grid-template-columns: 1fr; }
    .profile-avatar { width: 110px; height: 110px; border-radius: 26px; font-size: 2.2rem; }
    .reason-grid { grid-template-columns: 1fr; }
    .recent-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
    .recent-grid { grid-template-columns: repeat(2, 1fr); }
}
