/* ==========================================================================
   Law123 v3 - AMZ123-Inspired Design System
   ========================================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #f0f2f5;
    --card: #ffffff;
    --primary: #2563eb;
    --primary-light: #eff6ff;
    --text-main: #1f2937;
    --text-sec: #6b7280;
    --text-hint: #9ca3af;
    --border: #e5e7eb;
    --radius: 10px;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.08);
    --sidebar-w: 125px;
}

/* Brand logo image */
.css-logo {
    display: inline-block;
    width: 3.75em;
    height: 1.35em;
    vertical-align: middle;
    margin-right: 0;
    background: url('../img/logo-law123-transparent-cn-crisp-v40-slogan.png') center / contain no-repeat;
    flex-shrink: 0;
}
.css-logo::before {
    content: none;
}
.css-logo-law {
    display: none !important;
}
.css-logo-123 {
    display: none !important;
}

body {
    background: var(--bg);
    color: var(--text-main);
    font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

ul { list-style: none; }
a { color: var(--text-main); text-decoration: none; cursor: pointer; }
a:hover { color: var(--primary); }

/* ==========================================================================
   Top Bar
   ========================================================================== */
.top-bar {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 0 16px;
    height: 64px;
    display: flex;
    align-items: center;
    font-size: 13px;
    color: var(--text-sec);
    position: sticky;
    top: 0;
    z-index: 100;
}
.top-bar .wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 1400px;
    min-width: 0;
    margin: 0 auto;
}
.top-date {
    color: var(--text-hint);
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    line-height: 1;
    gap: 0;
    text-decoration: none;
}
.top-date .css-logo {
    margin-right: 0;
    width: 3.55em;
    height: 1.5em;
    background-image: url('../img/logo-law123-transparent-cn-crisp-v40-slogan.png');
}
.top-date .css-logo::before {
    content: none;
}
.top-nav-tabs {
    display: flex;
    align-items: center;
    gap: 0;
    margin-left: 2px;
    min-width: 0;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
}
.top-nav-tabs::-webkit-scrollbar { display: none; }
.top-nav-tab {
    padding: 0 10px;
    height: 64px;
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-sec);
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}
.top-nav-tab:hover { color: var(--primary); }
.top-nav-tab.active {
    color: var(--primary);
    font-weight: 600;
    border-bottom-color: var(--primary);
}
.top-userbars {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin-left: 4px;
    min-width: 0;
    flex-wrap: nowrap;
    flex-shrink: 1;
    overflow: hidden;
}
.top-userbars > span,
#authStatusText,
#authHint {
    display: inline-block;
    min-width: 0;
    max-width: 96px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.top-userbars .top-link {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 12px;
}
.top-userbars-compact > span,
.top-userbars-compact #authHint {
    max-width: 42px;
}
.top-link { color: var(--primary); font-weight: 500; }
.top-link:hover { opacity: 0.8; }

/* ==========================================================================
   Page Layout: Sidebar + Main
   ========================================================================== */
.page-layout {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 24px;
    gap: 16px;
    min-height: calc(100vh - 40px);
}

/* Left Sidebar (AMZ123 style) */
.side-nav {
    width: var(--sidebar-w);
    flex-shrink: 0;
    position: sticky;
    top: 64px; /* 48px topbar + 16px */
    height: fit-content;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.side-nav-title {
    padding: 12px 13px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-sec);
    border-bottom: 1px solid var(--border);
    background: #fafbfc;
}
.side-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 11px;
    font-size: 13px;
    color: var(--text-main);
    border-left: 3px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
}
.side-nav-item:hover { background: var(--primary-light); color: var(--primary); }
.side-nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 600;
}
.side-nav-icon {
    width: 18px;
    min-width: 18px;
    font-size: 14px;
    line-height: 1;
    text-align: center;
    flex-shrink: 0;
}
.side-nav-text {
    flex: 1;
    min-width: 0;
    width: auto;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
}

/* ==========================================================================
   Main Content
   ========================================================================== */
.main-content { flex: 1; min-width: 0; }

.content-page-layout {
    max-width: 1180px;
}
.content-page-main {
    max-width: 980px;
    margin: 0 auto;
}
.content-page-hero {
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
    border: 1px solid #dbeafe;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px 32px;
    margin-bottom: 16px;
}
.content-page-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #dbeafe;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
}
.content-page-hero h1 {
    margin: 14px 0 10px;
    font-size: 32px;
    line-height: 1.2;
    color: var(--text-main);
}
.content-page-hero p {
    margin: 0;
    color: var(--text-sec);
    font-size: 15px;
    line-height: 1.8;
}
.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 560px;
}
.feedback-form input,
.feedback-form textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14px;
    color: var(--text-main);
    background: #fff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.feedback-form input:focus,
.feedback-form textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.feedback-form textarea {
    resize: vertical;
    min-height: 140px;
    line-height: 1.6;
}
.feedback-form button {
    align-self: flex-start;
    border: none;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    padding: 11px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.feedback-form button:hover {
    background: #1d4ed8;
}
.content-page-shell {
    display: none;
}

/* Search Hero */
.search-hero {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(229, 231, 235, 0.85);
    padding: 24px 28px 20px;
    margin-bottom: 16px;
    text-align: center;
}
.search-hero-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-bottom: 18px;
}
.search-hero-copy {
    text-align: left;
}
.search-hero-copy h1 {
    margin: 0 0 4px;
    font-size: 24px;
    line-height: 1.25;
    color: var(--text-main);
    font-weight: 700;
}
.search-hero-copy p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-sec);
}
.logo-row { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 20px; }
.logo-row .css-logo {
    width: 3.95em;
    height: 1.42em;
}
.logo-img { height: 100px; }
.logo-title { font-size: 28px; font-weight: 700; color: var(--text-main); letter-spacing: 1px; }
.ai-page-main {
    display: flex;
    flex-direction: column;
}
.ai-hero-carousel--full {
    overflow: hidden;
    border-radius: 18px;
    margin-bottom: 16px;
}
.ai-carousel-window {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(145deg, #1d4ed8 0%, #2563eb 52%, #0f172a 100%);
    min-height: 220px;
    aspect-ratio: 4 / 1;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.10);
}
.ai-carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.45s ease;
}
.ai-carousel-slide {
    width: 100%;
    flex: 0 0 100%;
    min-height: 0;
    padding: 28px 40px 48px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0.55;
    transition: opacity 0.3s ease;
}
.ai-carousel-slide.is-active {
    opacity: 1;
}
.ai-slide-label {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 14px;
}
.ai-carousel-slide h2 {
    font-size: 30px;
    line-height: 1.2;
    margin-bottom: 12px;
    color: #ffffff;
}
.ai-carousel-slide p {
    max-width: 520px;
    font-size: 14px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}
.ai-slide-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}
.ai-slide-btn,
.ai-slide-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    padding: 10px 16px;
    border-radius: 999px;
    font-weight: 600;
    transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}
.ai-slide-btn {
    background: #ffffff;
    color: #1d4ed8;
}
.ai-slide-link {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.18);
}
.ai-slide-btn:hover,
.ai-slide-link:hover {
    transform: translateY(-1px);
    opacity: 0.96;
}
.ai-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease;
}
.ai-carousel-nav:hover {
    background: rgba(255, 255, 255, 0.28);
}
.ai-carousel-prev {
    left: 16px;
}
.ai-carousel-next {
    right: 16px;
}
.ai-carousel-dots {
    position: absolute;
    left: 34px;
    right: 34px;
    bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ai-carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: none;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}
.ai-carousel-dot.is-active {
    background: #ffffff;
    transform: scale(1.15);
}

.search-tabs-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.search-tabs-logo {
    margin-bottom: 0;
    flex: 0 0 auto;
}
.search-tabs-logo-img {
    display: block;
    height: 42px;
    width: auto;
}
.search-tabs-group {
    display: flex;
    align-items: center;
    justify-content: center;
}
.search-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 0;
    flex-wrap: wrap;
}
.search-tab {
    padding: 6px 18px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-sec);
    cursor: pointer;
    border: 1px solid var(--border);
    border-right: none;
    background: #fafbfc;
    transition: all 0.15s;
    user-select: none;
}
.search-tab:first-child { border-radius: 6px 0 0 6px; }
.search-tab:last-child { border-radius: 0 6px 6px 0; border-right: 1px solid var(--border); }
.search-tab:hover { background: var(--primary-light); color: var(--primary); }
.search-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    font-weight: 600;
}
.search-tab.active + .search-tab { border-left-color: var(--primary); }

.search-box { display: flex; max-width: 720px; margin: 0 auto 12px; min-height: 46px; }
.search-box input {
    flex: 1;
    min-width: 0;
    border: 2px solid var(--primary); border-right: none;
    border-radius: 10px 0 0 10px; padding: 0 16px; font-size: 15px;
    outline: none; transition: border-color 0.2s;
}
.search-box input:focus { border-color: #1d4ed8; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.search-box button {
    flex: 0 0 96px;
    width: 96px; background: var(--primary); color: #fff; border: none;
    border-radius: 0 10px 10px 0; font-size: 15px; font-weight: 600; cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}
.search-box button:hover { background: #1d4ed8; }

.hot-words { display: flex; align-items: center; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.hot-words span { color: var(--text-hint); font-size: 12px; }
.hot-word {
    font-size: 12px; padding: 2px 10px; border-radius: 12px;
    background: #f3f4f6; color: var(--text-sec); transition: all 0.15s;
}
.hot-word:hover { background: var(--primary-light); color: var(--primary); }

.filter-row { display: flex; align-items: center; gap: 8px; justify-content: center; margin-bottom: 12px; }
.search-filter-row {
    gap: 10px;
    flex-wrap: nowrap;
    align-items: center;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}
.search-filter-logo {
    margin-bottom: 0;
    flex: 0 0 auto;
}
.search-filter-row .filter-label {
    width: 58px;
    min-width: 58px;
    flex: 0 0 58px;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
}
#selProv.filter-select {
    width: 88px;
    min-width: 88px;
    max-width: 88px;
    flex: 0 0 88px;
}
#selCity.filter-select {
    width: 104px;
    min-width: 104px;
    max-width: 104px;
    flex: 0 0 104px;
}
#selDist.filter-select {
    width: 104px;
    min-width: 104px;
    max-width: 104px;
    flex: 0 0 104px;
}
.filter-label { font-size: 12px; font-weight: 600; color: var(--primary); }
.filter-select {
    border: 1px solid var(--border); border-radius: 6px; padding: 4px 8px;
    font-size: 12px; color: var(--text-sec); background: #fff; outline: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.filter-select:focus { border-color: var(--primary); }

/* ==========================================================================
   Quick Access Card
   ========================================================================== */
.quick-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 16px;
    overflow: hidden;
}
.quick-row {
    display: flex; align-items: stretch;
}
.quick-label {
    width: 100px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 600; padding: 12px 8px;
    border-right: 1px solid var(--border);
}
.quick-label.blue { color: var(--primary); background: var(--primary-light); }
.quick-label.orange { color: #ea580c; background: #fff7ed; }
.quick-links { display: flex; flex-wrap: wrap; gap: 6px 12px; padding: 12px 16px; align-items: center; }
.quick-links a { font-size: 13px; color: var(--primary); transition: opacity 0.15s; }
.quick-links a:hover { opacity: 0.7; text-decoration: underline; }
.quick-links .count-tag { font-size: 11px; color: var(--text-hint); margin-left: 2px; }

/* ==========================================================================
   Sponsored Placements
   ========================================================================== */
.ad-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 7px;
    border-radius: 999px;
    background: #dbeafe;
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.sponsor-hero-box {
    margin-bottom: 16px;
}
.sponsor-hero-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: #fcfdff;
    border: 1px solid #e8eef8;
    border-radius: var(--radius);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.sponsor-hero-main {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}
.sponsor-content-link {
    color: inherit;
    text-decoration: none;
}
.sponsor-content-link:hover {
    color: inherit;
    text-decoration: none;
}
.sponsor-video-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 8px;
    background: #e5e7eb;
    border: 1px solid #e5e7eb;
    flex-shrink: 0;
}
.sponsor-video-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.sponsor-hero-main .sponsor-video-thumb {
    width: 112px;
}
.sponsor-hero-card .sponsor-video-thumb {
    width: 112px;
}
.sponsor-hero-copy,
.sponsor-sidebar-copy,
.category-sponsor-copy,
.page-ad-card-copy {
    min-width: 0;
}
.sponsor-hero-top {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
    flex-wrap: wrap;
}
.sponsor-hero-eyebrow {
    font-size: 11px;
    color: var(--text-hint);
    font-weight: 600;
}
.sponsor-hero-title {
    margin: 0 0 1px;
    font-size: 15px;
    line-height: 1.4;
    color: var(--text-main);
}
.sponsor-hero-desc {
    margin: 0;
    font-size: 11px;
    color: var(--text-sec);
    line-height: 1.55;
}
.sponsor-hero-meta {
    margin-top: 3px;
    font-size: 10px;
    color: var(--text-hint);
}
.sponsor-hero-cta,
.sponsor-sidebar-cta,
.category-sponsor-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 600;
    white-space: nowrap;
}
.sponsor-hero-cta {
    padding: 0;
    background: transparent;
    color: #1d4ed8;
    border: none;
    box-shadow: none;
    font-size: 12px;
    font-weight: 500;
}
.sponsor-hero-cta:hover {
    color: #1d4ed8;
    background: transparent;
    text-decoration: underline;
}
.sponsor-sidebar-box {
    margin-bottom: 16px;
}
.sponsor-sidebar-header {
    color: #1d4ed8;
    background: #eff6ff;
}
.sponsor-sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
}
.sponsor-sidebar-card {
    display: block;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0;
    background: #fff;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.sponsor-sidebar-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-hover);
    border-color: #bfdbfe;
}
.sponsor-sidebar-card:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 3px;
    border-color: #93c5fd;
}
.sponsor-sidebar-top {
    margin-bottom: 8px;
}
.sponsor-sidebar-card > .sponsor-sidebar-top {
    margin: 12px 14px 8px;
}
.sponsor-sidebar-card > .sponsor-sidebar-title,
.sponsor-sidebar-card > .sponsor-sidebar-desc {
    margin-left: 14px;
    margin-right: 14px;
}
.sponsor-sidebar-card > .sponsor-sidebar-title:first-child {
    margin-top: 14px;
}
.sponsor-sidebar-card > .sponsor-sidebar-desc:last-child {
    margin-bottom: 14px;
}
.sponsor-sidebar-main {
    display: block;
}
.sponsor-sidebar-copy {
    padding: 12px 14px 0;
}
.sponsor-sidebar-main .sponsor-video-thumb {
    border: 0;
    border-radius: 0;
}
.sponsor-sidebar-card .sponsor-video-thumb {
    border: 0;
    border-radius: 0;
}
.sponsor-sidebar-title {
    margin: 0 0 6px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-main);
}
.sponsor-sidebar-desc {
    margin: 0 0 12px;
    font-size: 12px;
    color: var(--text-sec);
    line-height: 1.7;
}
.ai-entry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    padding: 18px 20px;
}
.ai-entry-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 0;
    gap: 8px;
    padding: 14px;
}
.ai-entry-card .sponsor-sidebar-top,
.ai-entry-card .sponsor-sidebar-title,
.ai-entry-card .sponsor-sidebar-desc {
    margin: 0;
}
.ai-entry-card .sponsor-sidebar-desc {
    line-height: 1.65;
}
.sponsor-sidebar-cta {
    margin: 12px 14px 14px;
    padding: 8px 12px;
    background: #eff6ff;
    color: var(--primary);
}
.sponsor-sidebar-cta:hover {
    color: var(--primary);
    background: #dbeafe;
}
.page-ad-slot {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.page-ad-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.page-ad-card.sponsor-content-link {
    display: block;
    color: inherit;
    text-decoration: none;
}
.page-ad-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
}
.page-ad-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
}
.page-ad-card-main {
    display: block;
}
.page-ad-card-main .sponsor-video-thumb {
    border: 0;
    border-radius: 0;
}
.page-ad-card .sponsor-video-thumb {
    border: 0;
    border-radius: 0;
}
.page-ad-card-copy {
    padding: 12px 14px;
}
.page-ad-card-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.page-ad-card-copy .page-ad-card-title {
    display: block;
    margin-bottom: 6px;
}
.page-ad-card-body {
    padding: 14px;
}
.page-ad-card-desc {
    margin: 0;
    font-size: 12px;
    line-height: 1.7;
    color: var(--text-sec);
}
.page-ad-card-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 12px;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}
.page-ad-card > .page-ad-card-cta {
    margin: 0 14px 14px;
}
.floating-ad-body > .page-ad-card-cta {
    margin-top: 10px;
}
.page-ad-card-copy .page-ad-card-cta {
    margin-top: 10px;
}
.page-ad-card-cta:hover {
    color: #fff;
    opacity: 0.92;
}
.third-party-ad-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.third-party-ad-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
}
.third-party-ad-body {
    min-height: 120px;
    padding: 10px;
}
.third-party-ad-frame {
    width: 100%;
    border: none;
    display: block;
    background: #fff;
}
.floating-ad-slot {
    position: fixed;
    right: 24px;
    bottom: 252px;
    z-index: 120;
    width: min(320px, calc(100vw - 24px));
    display: none;
}
.floating-ad-card {
    background: var(--card);
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
    overflow: hidden;
}
.floating-ad-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
}
.floating-ad-close {
    border: none;
    background: transparent;
    color: var(--text-hint);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}
.floating-ad-body {
    padding: 12px;
}
.content-ad-main {
    flex: 1;
    min-width: 0;
}
.content-ad-sidebar {
    width: 300px;
    flex-shrink: 0;
}
.content-ad-sidebar .page-ad-slot {
    position: sticky;
    top: 80px;
}

/* ==========================================================================
   Fahai Wuyou Video Page
   ========================================================================== */
.fahai-page {
    min-height: 100vh;
}
.fahai-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 22px auto 34px;
}
.fahai-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 24px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
}
.fahai-eyebrow {
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
}
.fahai-hero h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.25;
    color: var(--text-main);
}
.fahai-hero p {
    margin: 8px 0 0;
    color: var(--text-sec);
}
.fahai-stats {
    min-width: 92px;
    padding: 12px 14px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
}
.fahai-stats span {
    display: block;
    font-size: 26px;
    line-height: 1.1;
    font-weight: 800;
    color: var(--primary);
}
.fahai-stats small {
    color: var(--text-hint);
}
.fahai-toolbar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 14px 0;
    padding: 14px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
}
.fahai-search {
    display: flex;
    align-items: center;
    gap: 10px;
}
.fahai-search span {
    font-weight: 700;
    color: var(--text-sec);
}
.fahai-search input {
    flex: 1;
    min-width: 0;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
}
.fahai-search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.fahai-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.fahai-chip {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-sec);
    border-radius: 999px;
    padding: 7px 12px;
    cursor: pointer;
    font-weight: 600;
}
.fahai-chip.is-active {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}
.fahai-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}
.fahai-video-card {
    display: block;
    overflow: hidden;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
    color: inherit;
    text-decoration: none;
}
.fahai-video-card[role="button"],
a.fahai-video-card {
    cursor: pointer;
}
.fahai-video-card:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.35);
    outline-offset: 3px;
}
.fahai-video-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #eff6ff 0%, #ecfdf5 100%) center / cover no-repeat;
    color: #fff;
}
.fahai-video-thumb::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.04) 0%, rgba(15, 23, 42, 0.22) 100%);
}
.fahai-video-thumb.is-pending {
    cursor: default;
    background: #e5e7eb;
    color: var(--text-sec);
    font-weight: 700;
}
.fahai-play {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(255,255,255,0.92);
    color: var(--primary);
    font-weight: 800;
}
.fahai-play-icon {
    display: block;
    width: 0;
    height: 0;
    margin-left: 4px;
    border-top: 13px solid transparent;
    border-bottom: 13px solid transparent;
    border-left: 20px solid var(--primary);
}
.fahai-play--pending {
    width: auto;
    min-width: 92px;
    height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    font-size: 13px;
}
.fahai-video-body {
    padding: 13px 14px 14px;
}
.fahai-video-meta,
.fahai-video-foot {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: var(--text-hint);
    font-size: 12px;
}
.fahai-video-body h3 {
    margin: 8px 0 6px;
    font-size: 16px;
    line-height: 1.45;
}
.fahai-video-body p {
    margin: 0;
    min-height: 42px;
    color: var(--text-sec);
    font-size: 13px;
    line-height: 1.65;
}
.fahai-video-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin: 12px 0;
}
.fahai-video-tags span {
    padding: 2px 7px;
    border-radius: 999px;
    background: #f3f4f6;
    color: var(--text-sec);
    font-size: 12px;
}
.fahai-empty,
.fahai-note {
    padding: 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-sec);
}
.fahai-note {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    align-items: flex-start;
}
.fahai-note strong {
    color: var(--text-main);
    white-space: nowrap;
}
.fahai-video-modal {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(15, 23, 42, 0.58);
}
.fahai-video-modal.is-open {
    display: flex;
}
.fahai-modal-card {
    width: min(860px, 100%);
    background: var(--card);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}
.fahai-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}
.fahai-modal-head h2 {
    margin: 0;
    font-size: 16px;
    flex: 1;
}
.fahai-modal-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.fahai-modal-head button {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: #f3f4f6;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}
.fahai-modal-head .fahai-share-btn {
    width: auto;
    min-width: 54px;
    padding: 0 12px;
    border-radius: 16px;
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
}
.fahai-modal-head .is-hidden {
    display: none;
}
.fahai-share-panel {
    border-bottom: 1px solid var(--border);
    background: #fff;
    padding: 12px 16px 14px;
}
.fahai-share-panel.is-hidden {
    display: none;
}
.fahai-share-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.fahai-share-panel-head strong {
    font-size: 14px;
    color: var(--text-main);
}
.fahai-share-panel-head button {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: #f3f4f6;
    cursor: pointer;
    color: var(--text-sec);
}
.fahai-share-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}
.fahai-share-option {
    min-width: 0;
    min-height: 76px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fafbfc;
    color: var(--text-main);
    padding: 10px;
    font: inherit;
    text-align: center;
    cursor: pointer;
}
.fahai-share-option:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}
.fahai-share-option span {
    font-size: 14px;
    font-weight: 700;
}
.fahai-share-option small {
    color: var(--text-sec);
    font-size: 11px;
    line-height: 1.4;
}
.fahai-share-status {
    margin-top: 10px;
    color: var(--text-sec);
    font-size: 12px;
    line-height: 1.6;
}
.fahai-modal-body {
    background: #0f172a;
}
.fahai-modal-video {
    display: block;
    width: 100%;
    max-height: min(70vh, 620px);
    background: #000;
}
.fahai-modal-placeholder {
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

/* ==========================================================================
   Training Page
   ========================================================================== */
.training-layout {
    justify-content: center;
}
.training-main {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}
.training-page .section-divider {
    margin: 32px 0 18px;
    padding: 14px 18px;
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    background: #fafbfc;
    box-shadow: var(--shadow);
}
.training-page .section-divider-title {
    display: block;
    color: var(--text-main);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
}
.training-page .section-divider-sub {
    display: block;
    margin-top: 2px;
    color: var(--text-sec);
    font-size: 12px;
    line-height: 1.6;
}
.training-card {
    transition: transform 0.2s, box-shadow 0.2s;
}
.training-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}
.training-brand-panel {
    padding: 18px 20px;
}
.training-brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}
.training-brand-card {
    display: flex;
    flex-direction: column;
    min-height: 210px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
}
.training-brand-meta {
    width: fit-content;
    margin-bottom: 8px;
    padding: 2px 7px;
    border-radius: 4px;
    background: #f3f4f6;
    color: var(--text-sec);
    font-size: 11px;
    font-weight: 600;
}
.training-brand-title {
    margin: 0 0 6px;
    color: var(--text-main);
    font-size: 15px;
    line-height: 1.45;
}
.training-brand-desc {
    margin: 0;
    color: var(--text-sec);
    font-size: 12px;
    line-height: 1.75;
}
.training-brand-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}
.training-brand-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 8px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
}
.training-brand-link:hover {
    background: #dbeafe;
    color: var(--primary);
}
.training-brand-note {
    margin-top: auto;
    padding-top: 14px;
    color: var(--text-sec);
    font-size: 12px;
    line-height: 1.7;
}

/* ==========================================================================
   Category Cards (AMZ123 style)
   ========================================================================== */
.cat-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 16px;
    overflow: hidden;
    animation: fadeUp 0.3s ease both;
}
.cat-header {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    background: #fafbfc;
}
.cat-icon { font-size: 18px; }
.cat-title { font-size: 14px; font-weight: 600; color: var(--text-main); }
.cat-count { font-size: 11px; color: var(--text-hint); margin-left: 4px; }

.cat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}
.tools-page-main {
    max-width: 1100px;
    margin: 0 auto;
}
.tools-hero {
    display: grid;
    gap: 14px;
}
.tools-search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 760px;
}
.tools-search-input {
    width: 100%;
    min-height: 42px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.5;
}
.tools-search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.tools-search-count {
    flex-shrink: 0;
    color: var(--text-sec);
    font-size: 13px;
}
.tools-request-card {
    display: inline-grid;
    align-items: center;
    justify-self: start;
    gap: 8px;
    width: fit-content;
    max-width: 260px;
    padding: 7px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: var(--text-main);
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}
.tools-request-card:hover,
.tools-request-card:focus-visible {
    border-color: #cbd5e1;
    background: #f8fafc;
    outline: none;
}
.tools-request-title {
    color: #334155;
    font-size: 12px;
    font-weight: 700;
}
.tools-request-modal[hidden] {
    display: none;
}
.tools-request-modal {
    position: fixed;
    inset: 0;
    z-index: 2100;
    display: grid;
    place-items: center;
    padding: 18px;
}
.tools-request-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
}
.tools-request-modal-card {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
    padding: 22px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22);
}
.tools-request-modal-card h2 {
    margin: 0 36px 10px 0;
    color: var(--text-main);
    font-size: 18px;
    line-height: 1.35;
}
.tools-request-modal-card p {
    margin: 0 0 18px;
    color: var(--text-sec);
    font-size: 14px;
    line-height: 1.7;
}
.tools-request-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #475569;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}
.tools-request-modal-close:hover,
.tools-request-modal-close:focus-visible {
    border-color: #cbd5e1;
    background: #f8fafc;
    outline: none;
}
.tools-request-modal-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 14px;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}
.tools-request-modal-link:hover,
.tools-request-modal-link:focus-visible {
    background: #1d4ed8;
    outline: none;
}
.tools-section-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tools-section-tab {
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--text-sec);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.tools-section-tab:hover,
.tools-section-tab.active {
    color: var(--primary);
    border-color: #bfdbfe;
    background: #eff6ff;
}
.tool-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    padding: 18px 20px;
}
.tool-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    background: var(--card);
    color: inherit;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.tool-card[hidden],
.tools-card-section[hidden] {
    display: none !important;
}
.tool-card:hover {
    color: inherit;
    transform: translateY(-1px);
    box-shadow: var(--shadow-hover);
    border-color: #bfdbfe;
}
.tool-card:focus-visible {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}
.tool-card-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    margin-bottom: 10px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 11px;
    font-weight: 700;
}
.tool-card-title {
    margin: 0 0 6px;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 700;
    color: var(--text-main);
}
.tool-card-desc {
    margin: 0 0 12px;
    font-size: 12px;
    line-height: 1.7;
    color: var(--text-sec);
}
.tool-card-meta {
    display: block;
    margin: auto 0 12px;
    color: var(--text-hint);
    font-size: 12px;
    line-height: 1.5;
}
.tool-card-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    margin-top: auto;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
}
.tool-card-cta:hover {
    color: #fff;
    background: #1d4ed8;
    box-shadow: 0 3px 8px rgba(37, 99, 235, 0.18);
}
.tool-card:hover .tool-card-cta {
    background: #1d4ed8;
    box-shadow: 0 3px 8px rgba(37, 99, 235, 0.18);
}
.tool-card-cta:active {
    transform: translateY(1px);
}
.tool-card-cta--button {
    width: 100%;
    border: 0;
    cursor: pointer;
}

/* ==========================================================================
   Deadlines Channel Page
   ========================================================================== */
body.deadlines-page {
    overflow-x: hidden;
}

.deadlines-page .tools-page-main {
    max-width: 1180px;
}

.deadlines-page-main {
    max-width: 1100px;
    margin: 0 auto;
    min-width: 0;
}

.deadlines-hero {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
}

.deadlines-search-panel {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.deadlines-search-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.deadline-global-search {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.5;
}

.deadline-global-search:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.deadline-global-search::placeholder {
    color: var(--text-hint);
}

.deadline-result-count {
    flex: 0 0 auto;
    color: var(--text-sec);
    font-size: 13px;
    line-height: 1.6;
    white-space: nowrap;
}

.deadline-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.deadlines-page .deadline-filter-grid {
    display: grid;
    grid-template-columns: minmax(180px, 1.4fr) repeat(2, minmax(140px, 1fr));
    gap: 10px;
    align-items: end;
    min-width: 0;
}

.deadlines-page .deadline-filter-field {
    display: grid;
    gap: 5px;
    min-width: 0;
    color: var(--text-sec);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
}

.deadlines-page .deadline-filter-field label,
.deadlines-page .deadline-filter-field span {
    min-width: 0;
    color: var(--text-sec);
    overflow-wrap: anywhere;
}

.deadlines-page .deadline-filter-select {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: 8px 34px 8px 11px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--text-main);
    font: inherit;
    font-size: 13px;
    line-height: 1.45;
}

.deadlines-page .deadline-filter-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.deadline-filter-panel {
    gap: 8px;
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.deadline-filter-panel--compact {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 10px;
}

.deadline-search-row {
    display: flex;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 8px;
    min-width: 0;
}

.deadline-filter-panel .deadline-search-shell {
    flex: 1 1 auto;
    min-width: 0;
    padding: 9px 12px;
    border-radius: 10px;
    box-shadow: none;
}

.deadline-search-button {
    flex: 0 0 auto;
    min-width: 76px;
    min-height: 36px;
    padding: 0 16px;
    border: 1px solid var(--primary);
    border-radius: 9px;
    background: var(--primary);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.deadline-filter-action {
    width: auto;
    min-width: 92px;
    align-self: end;
    justify-self: start;
}

.deadline-filter-action-row {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 2px;
}

.deadline-search-button:hover,
.deadline-search-button:focus {
    background: #1d4ed8;
    border-color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    outline: none;
}

.deadline-filter-panel .tools-search-input {
    min-height: 34px;
}

.deadline-filter-selects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 8px;
}

.deadline-filter-selects--compact {
    align-items: end;
}

.deadline-filter-selects--horizontal {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    justify-items: stretch;
}

.deadline-filter-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
    gap: 8px;
    justify-items: stretch;
}

.deadline-filter-control {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.deadline-filter-control span {
    color: var(--text-sec);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.4;
    white-space: nowrap;
}

.deadline-filter-control .lookup-select {
    width: 100%;
    min-height: 36px;
    padding: 8px 30px 8px 10px;
    border-radius: 8px;
    font-size: 13px;
}

.deadlines-page .deadline-filter-panel {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    justify-content: stretch;
}

.deadlines-page .deadline-filter-panel--compact {
    width: 100%;
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    justify-items: stretch;
}

.deadlines-page .hotline-toolbar.deadline-filter-panel--compact {
    width: 100%;
    max-width: none;
    display: grid;
    justify-content: stretch;
}

.deadlines-page .deadline-filter-selects--horizontal {
    width: 100%;
    max-width: none;
    grid-template-columns: minmax(0, 1fr);
    justify-items: stretch;
    justify-content: stretch;
}

.deadlines-page .lookup-selects.deadline-filter-selects--horizontal {
    width: 100%;
    max-width: none;
    display: grid;
}

.deadlines-page .deadline-filter-row {
    width: 100%;
    max-width: none;
    justify-content: stretch;
    justify-self: stretch;
}

.deadlines-page .deadline-filter-row--primary {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.35fr);
}

.deadlines-page .deadline-filter-row--secondary {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.deadlines-page .deadline-filter-control {
    grid-template-columns: 72px minmax(0, 1fr);
}

.deadlines-page .deadline-filter-action {
    width: 200px;
    min-width: 180px;
    max-width: 240px;
    justify-self: center;
    margin: 0 auto;
    align-self: center;
}

.deadline-region-control.is-disabled span {
    color: var(--text-hint);
}

.deadline-region-control.is-disabled .lookup-select {
    background: #f6f8fb;
    color: var(--text-hint);
    cursor: not-allowed;
    box-shadow: none;
}

.deadline-nature-definition-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin: 18px 18px 0;
    padding-top: 10px;
}

.deadline-nature-definition-title {
    grid-column: 1 / -1;
    margin: 0 0 4px;
    color: var(--text-main);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.4;
}

.deadline-nature-definition-bar--inner {
    grid-column: 1 / -1;
    margin: 0;
    padding-top: 0;
}

.deadline-nature-definition-item {
    padding: 11px 12px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #f8fbff;
    color: var(--text-sec);
    font-size: 12px;
    line-height: 1.55;
}

.deadline-nature-definition-item strong {
    display: block;
    margin-bottom: 3px;
    color: var(--text-main);
    font-size: 13px;
}

.deadline-nature-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
    cursor: help;
}

.deadline-nature-badge:hover,
.deadline-nature-badge:focus-visible,
.deadline-nature-badge.is-active {
    border-color: var(--primary);
    background: #dbeafe;
    outline: none;
}

.deadline-nature-popover {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 20;
    width: min(280px, calc(100vw - 32px));
    padding: 10px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
    color: var(--text-sec);
    font-size: 12px;
    line-height: 1.55;
}

.deadline-nature-popover strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text-main);
    font-size: 13px;
}

.deadline-nature-popover span {
    display: block;
}

.deadlines-page .deadline-law-meta .deadline-nature-popover strong,
.deadlines-page .deadline-law-meta .deadline-nature-popover span {
    display: block;
    min-height: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.55;
}

.deadlines-page .deadline-law-meta .deadline-nature-popover strong {
    margin-bottom: 4px;
    color: var(--text-main);
    font-size: 13px;
    font-weight: 800;
}

.deadline-content-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 260px);
    gap: 16px;
    align-items: start;
    min-width: 0;
}

.deadline-main-column,
.deadline-side-column {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.deadline-side-column {
    position: sticky;
    top: 76px;
    max-height: calc(100vh - 96px);
    overflow-x: hidden;
    overflow-y: auto;
    padding-bottom: 78px;
    scrollbar-gutter: stable;
}

.deadline-results-panel {
    min-width: 0;
}

.deadline-results-card {
    overflow: hidden;
}

.deadline-sidebar-promo {
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 13px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: var(--text-sec);
    font-size: 12px;
    line-height: 1.55;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.035);
}

.deadline-sidebar-promo:hover {
    border-color: #cbd5e1;
    color: var(--text-main);
}

.deadline-sidebar-promo strong {
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.35;
}

.deadline-sidebar-promo span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.deadline-sidebar-promo-kicker {
    width: fit-content;
    padding: 2px 7px;
    border-radius: 999px;
    background: #f1f5f9;
    color: var(--text-hint);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.35;
}

@media (max-width: 1100px) {
    .deadline-filter-selects--horizontal {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.deadline-filter-tab {
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--text-sec);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    overflow-wrap: anywhere;
    cursor: pointer;
}

.deadline-filter-tab:hover,
.deadline-filter-tab.active,
.deadline-filter-tab.is-active {
    color: var(--primary);
    border-color: #bfdbfe;
    background: var(--primary-light);
}

.deadline-results-list {
    display: grid;
    gap: 14px;
}

.deadline-result-group {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.deadline-result-group-head {
    justify-content: space-between;
}

.deadline-result-group-label {
    min-width: 0;
    overflow-wrap: anywhere;
}

.deadline-result-group-count {
    flex: 0 0 auto;
    padding: 3px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: var(--text-sec);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
}

.deadlines-page .deadline-days-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}

.deadlines-page .deadline-day-group {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.deadlines-page .deadline-day-group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    margin: 0;
    color: var(--text-main);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.45;
}

.deadlines-page .deadline-day-group-title::before {
    content: "";
    width: 4px;
    height: 18px;
    border-radius: 999px;
    background: var(--primary);
    flex: 0 0 auto;
}

.deadlines-page .deadline-day-card {
    display: grid;
    grid-template-columns: minmax(76px, auto) minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    min-width: 0;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.deadlines-page .deadline-day-card:hover {
    border-color: #bfdbfe;
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
}

.deadlines-page .deadline-day-figure {
    display: grid;
    justify-items: center;
    align-content: start;
    min-width: 0;
}

.deadlines-page .deadline-day-number {
    min-width: 0;
    color: var(--primary);
    font-size: 42px;
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.deadlines-page .deadline-day-unit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 22px;
    margin-top: 6px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #e9f7ef;
    color: #198754;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.35;
    white-space: nowrap;
}

.deadlines-page .deadline-day-content {
    display: grid;
    gap: 7px;
    min-width: 0;
    padding-left: 12px;
    border-left: 1px solid #edf2f7;
    color: var(--text-sec);
    font-size: 13px;
    line-height: 1.65;
}

.deadlines-page .deadline-day-content > * {
    min-width: 0;
    overflow-wrap: anywhere;
}

.deadlines-page .deadline-law-meta {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    min-width: 0;
    color: var(--text-hint);
    font-size: 12px;
    line-height: 1.5;
}

.deadlines-page .deadline-law-meta span,
.deadlines-page .deadline-law-meta em,
.deadlines-page .deadline-law-meta strong {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 22px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #eef4ff;
    color: var(--primary);
    font-style: normal;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.deadlines-page .deadline-law-meta em {
    background: #e9f7ef;
    color: #198754;
}

.deadlines-page .deadline-card-status {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #fff7ed;
    color: #c2410c;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.35;
}

.deadlines-page .deadline-nature-badge {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.deadline-card {
    display: grid;
    gap: 10px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.deadline-card:hover {
    border-color: #bfdbfe;
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
}

.deadline-quiz-card {
    display: grid;
    gap: 12px;
    margin: 0;
    border-color: #bfdbfe;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.deadline-quiz-card--compact {
    gap: 9px;
    padding: 12px;
}

.deadline-quiz-card--compact .cat-header {
    align-items: center;
    gap: 8px;
    padding-bottom: 2px;
}

.deadline-quiz-logo {
    display: block;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.14);
}

.deadline-quiz-brand-title {
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.2;
}

.deadline-quiz-mode-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    min-width: 0;
}

.deadline-quiz-mode {
    min-width: 0;
    min-height: 30px;
    padding: 6px 8px;
    border: 1px solid #dbeafe;
    border-radius: 7px;
    background: #fff;
    color: var(--text-sec);
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
    cursor: pointer;
}

.deadline-quiz-mode.is-active,
.deadline-quiz-mode:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

.deadline-quiz-topic-controls[hidden] {
    display: none;
}

.deadline-quiz-topic-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(76px, 92px);
    gap: 7px;
    align-items: end;
    min-width: 0;
}

.deadline-quiz-topic-field {
    display: grid;
    gap: 4px;
    min-width: 0;
    color: var(--text-sec);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
}

.deadline-quiz-topic-field select {
    width: 100%;
    min-width: 0;
    min-height: 31px;
    padding: 6px 24px 6px 8px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #fff;
    color: var(--text-main);
    font: inherit;
    font-size: 12px;
}

.deadline-quiz-start {
    grid-column: 1 / -1;
    justify-self: start;
    min-height: 31px;
    padding: 6px 12px;
    border: 0;
    border-radius: 7px;
    background: #0f766e;
    color: #fff;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.deadline-quiz-progress {
    min-height: 18px;
    color: var(--text-sec);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
}

.deadline-quiz-question {
    min-width: 0;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.deadline-quiz-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
    min-width: 0;
}

.deadline-quiz-option {
    min-width: 0;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--text-main);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
    text-align: left;
    overflow-wrap: anywhere;
    cursor: pointer;
}

.deadline-quiz-option:hover:not(:disabled) {
    border-color: #bfdbfe;
    background: var(--primary-light);
    color: var(--primary);
}

.deadline-quiz-option.is-correct {
    border-color: #86efac;
    background: #f0fdf4;
    color: #15803d;
}

.deadline-quiz-option.is-wrong {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.deadline-quiz-option:disabled {
    cursor: default;
}

.deadline-quiz-answer {
    display: none;
    gap: 5px;
    min-width: 0;
    padding: 9px 10px;
    border-radius: 8px;
    background: #f8fafc;
    color: var(--text-sec);
    font-size: 12px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.deadline-quiz-answer.is-correct,
.deadline-quiz-answer.is-wrong {
    display: grid;
}

.deadline-quiz-answer.is-correct {
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
}

.deadline-quiz-answer.is-wrong {
    border: 1px solid #fecaca;
    background: #fff7f7;
}

.deadline-quiz-answer strong {
    color: var(--text-main);
}

.deadline-quiz-next {
    justify-self: start;
    min-height: 34px;
    padding: 7px 12px;
    border: 0;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
    cursor: pointer;
}

.deadline-quiz-next:disabled {
    opacity: 0.55;
    cursor: default;
}

.deadline-card-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
}

.deadline-card-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: start;
    min-height: 22px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #eef6ff;
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.3;
}

.deadline-card-period {
    margin: 0;
    color: var(--primary);
    font-size: 24px;
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.deadline-day-content .deadline-card-title {
    margin: 0;
    color: var(--text-main);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.4;
}

.deadline-day-content .deadline-card-period {
    margin: 0;
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.45;
}

.deadline-card-details {
    display: grid;
    gap: 5px;
    margin: 0;
}

.deadline-card-details div {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 8px;
    min-width: 0;
}

.deadline-card-details dt {
    color: var(--text-hint);
    font-size: 12px;
    font-weight: 800;
}

.deadline-card-details dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
}

.deadline-copy-button {
    justify-self: start;
    min-height: 30px;
    padding: 6px 10px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #fff;
    color: var(--primary);
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
    cursor: pointer;
}

.deadline-copy-button:hover,
.deadline-copy-button:focus-visible {
    background: var(--primary-light);
    outline: none;
}

.deadline-card-meta {
    display: grid;
    gap: 5px;
    margin: 0;
    color: var(--text-sec);
    font-size: 13px;
    line-height: 1.6;
}

.deadline-card-meta strong,
.deadline-card-meta b {
    color: var(--text-main);
    font-weight: 700;
}

.deadline-card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 2px;
}

.deadline-feedback-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 7px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #fff;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
}

.deadline-feedback-link:hover,
.deadline-feedback-link:focus-visible {
    background: var(--primary-light);
    outline: none;
}

@media (max-width: 1100px) {
    .deadline-filter-panel--compact {
        grid-template-columns: 1fr;
    }

    .deadline-filter-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .deadlines-page .deadline-filter-row--primary,
    .deadlines-page .deadline-filter-row--secondary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.tool-panel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}
.tool-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    scroll-margin-top: 86px;
}
.tool-panel--planning {
    background: #fbfcff;
}
.tool-panel-header {
    display: grid;
    gap: 5px;
}
.tool-panel-header span {
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
}
.tool-panel-header h2 {
    margin: 0;
    color: var(--text-main);
    font-size: 18px;
    line-height: 1.35;
}
.tool-panel-header p {
    margin: 0;
    color: var(--text-sec);
    font-size: 13px;
    line-height: 1.65;
}
.tool-calc-form {
    display: grid;
    gap: 8px;
    width: 100%;
    margin-top: 12px;
}
.tool-field {
    display: grid;
    gap: 5px;
    color: var(--text-sec);
    font-size: 12px;
    font-weight: 600;
}
.tool-field--muted {
    color: #64748b;
    font-weight: 500;
}
.tool-field--muted .tool-calc-input {
    border-color: #e5e7eb;
    background: #f8fafc;
    color: #475569;
}
.tool-field--muted .tool-calc-input::placeholder {
    color: #94a3b8;
}
.tool-inline-helper-link {
    justify-self: start;
    width: fit-content;
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}
.tool-inline-helper-link:hover {
    text-decoration: underline;
}
.tool-check {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text-sec);
    font-size: 13px;
}
.tool-calc-input {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--text-main);
    font-size: 13px;
    line-height: 1.5;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.tool-calc-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.tool-date-selects {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}
.tool-result-panel {
    margin: 0;
    padding: 9px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--text-sec);
    font-size: 12px;
    line-height: 1.7;
}
.tool-result-panel--rich {
    padding: 0;
    overflow: hidden;
    background: #ffffff;
}
.lawyer-fee-result {
    display: grid;
    gap: 12px;
}
.lawyer-fee-result-main {
    display: grid;
    gap: 6px;
    padding: 16px;
    border-bottom: 1px solid #bfdbfe;
    background: #eff6ff;
    color: var(--text-main);
}
.lawyer-fee-result-kicker {
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
}
.lawyer-fee-result-main strong {
    font-size: 14px;
    line-height: 1.4;
}
.lawyer-fee-result-amount {
    color: #1d4ed8;
    font-size: 24px;
    font-weight: 900;
    line-height: 1.25;
}
.lawyer-fee-result-section {
    padding: 0 16px;
}
.lawyer-fee-result-section h3 {
    margin: 0 0 6px;
    color: var(--text-main);
    font-size: 13px;
    line-height: 1.4;
}
.lawyer-fee-result-section p {
    margin: 0;
    color: var(--text-sec);
    font-size: 12px;
    line-height: 1.8;
}
.lawyer-fee-result-table {
    width: 100%;
    border-collapse: collapse;
    overflow-wrap: anywhere;
}
.lawyer-fee-result-table th,
.lawyer-fee-result-table td {
    padding: 7px 8px;
    border: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
    font-size: 12px;
    line-height: 1.6;
}
.lawyer-fee-result-table th {
    width: 112px;
    background: #f8fafc;
    color: var(--text-sec);
    font-weight: 700;
}
.lawyer-fee-result-source {
    margin: 0;
    padding: 0 16px 16px;
    color: var(--text-hint);
    font-size: 12px;
    line-height: 1.7;
}
.tool-structured-result {
    display: grid;
    gap: 12px;
}
.tool-structured-result-main {
    display: grid;
    gap: 6px;
    padding: 16px;
    border-bottom: 1px solid #bfdbfe;
    background: #eff6ff;
    color: var(--text-main);
}
.tool-structured-result-kicker {
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
}
.tool-structured-result-main strong {
    font-size: 14px;
    line-height: 1.4;
}
.tool-structured-result-primary {
    color: #1d4ed8;
    font-size: 24px;
    font-weight: 900;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.tool-structured-result-section {
    padding: 0 16px;
}
.tool-structured-result-section h3 {
    margin: 0 0 6px;
    color: var(--text-main);
    font-size: 13px;
    line-height: 1.4;
}
.tool-structured-result-table {
    width: 100%;
    border-collapse: collapse;
    overflow-wrap: anywhere;
}
.tool-structured-result-table th,
.tool-structured-result-table td {
    padding: 7px 8px;
    border: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
    font-size: 12px;
    line-height: 1.6;
}
.tool-structured-result-table th {
    width: 120px;
    background: #f8fafc;
    color: var(--text-sec);
    font-weight: 700;
}
.tool-structured-result-table--wide th {
    width: auto;
}
.tool-structured-result-table--wide td {
    min-width: 96px;
}
.tool-structured-result-source {
    margin: 0;
    padding: 0 16px 16px;
    color: var(--text-hint);
    font-size: 12px;
    line-height: 1.7;
}
.tool-structured-result-guidance,
.tool-result-guidance {
    display: grid;
    width: 100%;
    box-sizing: border-box;
    gap: 8px;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: var(--text-sec);
    font-size: 12px;
    line-height: 1.7;
}
.tool-structured-result-guidance {
    margin: 0 16px 16px;
    padding: 12px;
    grid-template-columns: 1fr;
}
.tool-result-guidance {
    grid-column: 1 / -1;
    margin-top: 4px;
}
.tool-structured-result-guidance h3,
.tool-result-guidance strong {
    display: inline-block;
    margin: 0 8px 0 0;
    color: var(--text-main);
    font-size: 12px;
    font-weight: 800;
}
.tool-structured-result-guidance-list,
.tool-structured-result-guidance ul {
    margin: 4px 0 0;
    padding-left: 18px;
}
.tool-structured-result-guidance-item {
    overflow-wrap: anywhere;
}
.tool-structured-result-guidance-item + .tool-structured-result-guidance-item {
    margin-top: 10px;
}
.tool-legal-basis-text {
    min-width: 0;
}
.tool-legal-article-info-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 2px;
    min-height: 24px;
    padding: 2px 7px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    cursor: pointer;
}
.tool-legal-article-info-button:hover,
.tool-legal-article-info-button:focus-visible {
    border-color: #2563eb;
    background: #dbeafe;
    outline: none;
}
.tool-legal-article-info-button--summary {
    margin-left: 4px;
    vertical-align: middle;
}
.tool-legal-article-dialog[hidden] {
    display: none;
}
.tool-legal-article-dialog {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: rgba(15, 23, 42, 0.42);
}
.tool-legal-article-panel {
    width: min(720px, 100%);
    max-height: min(720px, calc(100vh - 72px));
    overflow: auto;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}
.tool-legal-article-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px 10px;
    border-bottom: 1px solid #e2e8f0;
}
.tool-legal-article-head h2 {
    margin: 4px 0 0;
    color: var(--text-main);
    font-size: 20px;
    line-height: 1.3;
}
.tool-legal-article-kicker {
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
}
.tool-legal-article-close {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border: 1px solid #cbd5e1;
    border-radius: 50%;
    background: #fff;
    color: var(--text-main);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}
.tool-legal-article-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
    margin: 0;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
}
.tool-legal-article-meta div {
    min-width: 0;
}
.tool-legal-article-meta dt {
    color: var(--text-hint);
    font-size: 12px;
    font-weight: 700;
}
.tool-legal-article-meta dd {
    margin: 2px 0 0;
    color: var(--text-main);
    font-size: 13px;
    overflow-wrap: anywhere;
}
.tool-legal-article-body {
    padding: 16px 20px;
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.8;
    white-space: pre-wrap;
}
.tool-legal-article-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 0 20px 16px;
}
.tool-copy-button--ghost {
    background: #fff;
    color: var(--primary);
}
.tool-legal-article-feedback {
    min-height: 20px;
    margin: -4px 20px 18px;
    color: var(--text-sec);
    font-size: 12px;
}
.tool-legal-article-dialog-open {
    overflow: hidden;
}
@media (max-width: 640px) {
    .tool-legal-article-dialog {
        align-items: flex-end;
        padding: 16px 10px calc(16px + env(safe-area-inset-bottom));
    }
    .tool-legal-article-panel {
        max-height: calc(100vh - 96px);
    }
    .tool-legal-article-meta {
        grid-template-columns: 1fr;
    }
}
.tool-structured-result-faq strong {
    display: block;
    margin: 0;
}
.tool-structured-result-faq span {
    display: block;
    color: var(--text-sec);
}
.tool-result-guidance p {
    margin: 0;
}
.tool-result-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}
.tool-copy-button {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    padding: 7px 10px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.tool-copy-button:hover,
.tool-copy-button:focus-visible {
    border-color: var(--primary);
    background: #eff6ff;
    outline: none;
}
.tool-rule-version {
    color: var(--text-hint);
    font-size: 12px;
    line-height: 1.6;
    flex: 1;
    min-width: 180px;
}
.tool-source-note {
    margin: 0;
    color: var(--text-hint);
    font-size: 12px;
    line-height: 1.7;
}
.tool-source-note a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}
.tool-advanced-fields {
    grid-column: 1 / -1;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    background: #f8fafc;
}
.tool-advanced-fields summary {
    cursor: pointer;
    color: var(--text-main);
    font-size: 13px;
    font-weight: 700;
}
.tool-advanced-fields[open] {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}
.tool-advanced-fields[open] summary {
    grid-column: 1 / -1;
}
.tool-field--checkbox {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}
.tool-field--checkbox input {
    width: auto;
}
.tool-lpr-fields {
    display: contents;
}
.tool-lpr-fields[hidden] {
    display: none;
}
.tool-detail-hero .content-page-eyebrow a {
    color: var(--primary);
    text-decoration: none;
}
.tool-detail-back-link {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 32px;
    margin-top: 12px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
}
.tool-detail-back-link:hover,
.tool-detail-back-link:focus-visible {
    border-color: var(--primary);
    background: #eff6ff;
    outline: none;
}
.tool-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 18px;
    align-items: start;
    margin-top: 18px;
}
.tool-detail-main {
    min-width: 0;
}
.tool-detail-panel[hidden] {
    display: none !important;
}
.tool-detail-sidebar {
    display: grid;
    gap: 12px;
    position: sticky;
    top: 86px;
}
.tool-detail-ad-slot {
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px dashed #bfdbfe;
    border-radius: var(--radius);
    background: #f8fbff;
    color: inherit;
    text-decoration: none;
}
.tool-detail-ad-slot:hover {
    border-color: var(--primary);
    background: #eff6ff;
}
.tool-detail-ad-slot span {
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
}
.tool-detail-ad-slot strong {
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.5;
}
.tool-detail-ad-slot em {
    color: var(--text-sec);
    font-size: 12px;
    line-height: 1.6;
    font-style: normal;
}
.tool-detail-ad-slot--wide {
    margin-top: 16px;
}
.tool-calc-form--split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}
.tool-subpanel {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fbfdff;
}
.tool-subpanel h3 {
    margin: 0 0 2px;
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.5;
}
.tool-subpanel-details {
    display: grid;
    gap: 7px;
    margin: 0;
}
.tool-subpanel-details summary {
    cursor: pointer;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.5;
}
.tool-subpanel-details[open] {
    padding-top: 2px;
}
.tool-subpanel-details[open] summary {
    margin-bottom: 6px;
}
.tool-subpanel-details .tool-field + .tool-field {
    margin-top: 7px;
}
.tool-combined-action-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.tool-combined-action-row .tool-card-cta--button {
    width: 100%;
    min-height: 40px;
}
.tool-calc-form--split .tool-result-panel,
.tool-calc-form--split .tool-result-actions,
.tool-calc-form--split .tool-result-guidance {
    grid-column: 1 / -1;
}
.deadline-query-controls {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(180px, 1fr);
    gap: 10px;
    align-items: end;
}
.deadline-periods-list {
    display: grid;
    gap: 10px;
}
.deadline-period-card {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}
.deadline-period-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}
.deadline-period-head strong {
    min-width: 0;
    color: var(--text-main);
    font-size: 15px;
    line-height: 1.45;
}
.deadline-period-category,
.deadline-period-value {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.3;
}
.deadline-period-category {
    color: var(--primary);
    background: #eef6ff;
}
.deadline-period-value {
    color: #7a3f00;
    background: #fff4df;
}
.deadline-period-details {
    display: grid;
    gap: 7px;
    margin: 0;
}
.deadline-period-details div {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 8px;
}
.deadline-period-details dt {
    color: var(--text-hint);
    font-size: 12px;
    font-weight: 800;
}
.deadline-period-details dd {
    margin: 0;
    color: var(--text-sec);
    font-size: 13px;
    line-height: 1.65;
}
.deadline-period-empty {
    padding: 16px;
    border: 1px dashed var(--border);
    border-radius: 8px;
    color: var(--text-sec);
    background: #fbfdff;
}
@media (min-width: 769px) {
    .tool-calc-form--compact {
        gap: 8px 10px;
    }
    .tool-calc-form--compact .tool-subpanel {
        gap: 6px;
        padding: 10px;
    }
    .tool-calc-form--compact .tool-field {
        gap: 4px;
        font-size: 11px;
    }
    .tool-calc-form--compact .tool-calc-input {
        padding: 7px 9px;
        font-size: 12px;
    }
    .tool-calc-form--compact .tool-check {
        font-size: 12px;
    }
    .tool-calc-form--compact .tool-subpanel h3 {
        font-size: 13px;
    }
    #tool-deadline .tool-calc-form,
    #tool-delayed-interest .tool-calc-form,
    #tool-penalty .tool-calc-form,
    #tool-tax-late-fee .tool-calc-form,
    #tool-lpr-interest .tool-calc-form {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: end;
    }
    .tool-calc-form--tri {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    #tool-deadline .tool-result-panel,
    #tool-deadline .tool-result-actions,
    #tool-delayed-interest .tool-result-panel,
    #tool-delayed-interest .tool-result-actions,
    #tool-penalty .tool-result-panel,
    #tool-penalty .tool-result-actions,
    #tool-days .tool-result-panel,
    #tool-days .tool-result-actions,
    #tool-tax-late-fee .tool-result-panel,
    #tool-tax-late-fee .tool-result-actions,
    #tool-lpr-interest .tool-result-panel,
    #tool-lpr-interest .tool-result-actions {
        grid-column: 1 / -1;
    }
    #tool-litigation-fee .tool-card-cta--button,
    #tool-deadline .tool-card-cta--button,
    #tool-delayed-interest .tool-card-cta--button,
    #tool-penalty .tool-card-cta--button,
    #tool-tax-late-fee .tool-card-cta--button,
    #tool-lpr-interest .tool-card-cta--button {
        align-self: end;
        min-height: 38px;
    }
}
@media (max-width: 640px) {
    .deadline-query-controls,
    .deadline-period-head,
    .deadline-period-details div {
        grid-template-columns: 1fr;
    }
    .deadline-period-value {
        justify-self: start;
    }
}
.tool-plan-list {
    margin: 0;
    padding-left: 18px;
    color: var(--text-sec);
    font-size: 13px;
    line-height: 1.8;
}
.cat-item {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 10px 14px;
    border-right: 1px solid #f3f4f6;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s;
    min-height: 42px;
    color: inherit;
    text-decoration: none;
}
.cat-item:hover { background: #f9fafb; }
.cat-item:hover .cat-item-name { color: var(--primary); }
.cat-item:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
}
.cat-item:nth-child(4n) { border-right: none; }
.cat-item-name {
    flex: 1;
    min-width: 0;
    display: block;
    font-size: 13px;
    color: var(--text-main);
    line-height: 1.4;
    word-break: break-word;
    overflow-wrap: anywhere;
}
.cat-item-name:hover { color: var(--primary); }
.cat-item-badges {
    display: flex;
    gap: 3px;
    flex-shrink: 0;
    margin-left: auto;
}
.badge-oa, .badge-mp {
    font-size: 10px;
    padding: 0 4px;
    border-radius: 3px;
    cursor: pointer;
    font-weight: 600;
    line-height: 18px;
    transition: all 0.15s;
}
.badge-oa { color: #16a34a; background: #f0fdf4; border: 1px solid #bbf7d0; }
.badge-oa:hover { background: #dcfce7; transform: scale(1.1); }
.badge-mp { color: #2563eb; background: #eff6ff; border: 1px solid #bfdbfe; }
.badge-mp:hover { background: #dbeafe; transform: scale(1.1); }
.cat-prov {
    font-size: 10px;
    color: var(--text-hint);
    background: #f3f4f6;
    padding: 1px 5px;
    border-radius: 3px;
    white-space: nowrap;
    flex-shrink: 0;
}
.category-sponsor-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-top: 1px solid var(--border);
    background: linear-gradient(90deg, #f8fbff 0%, #ffffff 100%);
}
.category-sponsor-main {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}
.category-sponsor-main .sponsor-video-thumb {
    width: 96px;
}
.category-sponsor-card .sponsor-video-thumb {
    width: 96px;
}
.category-sponsor-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.category-sponsor-kicker {
    font-size: 12px;
    color: var(--text-sec);
    font-weight: 600;
}
.category-sponsor-title {
    margin: 0 0 4px;
    font-size: 14px;
    color: var(--text-main);
}
.category-sponsor-desc {
    margin: 0;
    font-size: 12px;
    line-height: 1.65;
    color: var(--text-sec);
}
.category-sponsor-cta {
    padding: 0;
    background: transparent;
    color: #f97316;
    border: none;
    font-size: 12px;
    font-weight: 500;
}
.category-sponsor-cta:hover {
    color: #ea580c;
    background: transparent;
    text-decoration: underline;
}

/* ==========================================================================
   Lawyer Page Redesign
   ========================================================================== */
.lawyer-page-main {
    max-width: 1100px;
    margin: 0 auto;
}
.lawyer-hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
    min-height: 246px;
    padding: 28px 32px;
    border-radius: var(--radius);
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.18), transparent 34%),
        linear-gradient(135deg, #0f172a 0%, #1e3a8a 62%, #eff6ff 180%);
    color: #fff;
    box-shadow: var(--shadow);
}
.lawyer-hero-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #dbeafe;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
}
.lawyer-hero h1 {
    margin: 0;
    font-size: 26px;
    line-height: 1.2;
    color: #fff;
}
.lawyer-hero-desc {
    margin: 0;
    max-width: 680px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 13px;
    line-height: 1.6;
}
.lawyer-stat-grid--inline {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 2px;
}
.lawyer-stat-grid--inline .lawyer-stat-card {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: none;
}
.lawyer-stat-grid--inline .lawyer-stat-card strong {
    display: inline;
    font-size: 14px;
    color: #fff7ed;
}
.lawyer-stat-grid--inline .lawyer-stat-card span {
    display: inline;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.82);
    margin-top: 0;
}
.lawyer-stat-card--notice {
    background: rgba(249, 115, 22, 0.15) !important;
    border-color: rgba(249, 115, 22, 0.3) !important;
}
.lawyer-hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 2px;
}
.lawyer-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s, color 0.15s;
}
.lawyer-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}
.lawyer-btn-primary {
    background: var(--primary);
    color: #fff;
}
.lawyer-btn-primary:hover {
    color: #fff;
    background: #1d4ed8;
}
.lawyer-btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.22);
    color: #fff;
}
.lawyer-btn-secondary:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
}
.lawyer-btn-info {
    background: var(--primary-light);
    color: var(--primary);
}
.lawyer-btn-info:hover {
    color: var(--primary);
    background: #dbeafe;
}
.lawyer-btn-success {
    background: #16a34a;
    color: #fff;
}
.lawyer-btn-success:hover {
    color: #fff;
    background: #15803d;
}
.lawyer-hero-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.lawyer-stat-grid {
    display: grid;
    gap: 12px;
}
.lawyer-stat-grid.lawyer-stat-grid--inline {
    display: flex;
}
.lawyer-stat-card {
    padding: 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
}
.lawyer-stat-card strong {
    display: block;
    font-size: 24px;
    color: #fff7ed;
}
.lawyer-stat-card span {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.82);
}
.lawyer-hero-notice {
    padding: 16px;
    border-radius: 14px;
    background: #fff7ed;
    color: #9a3412;
    line-height: 1.7;
}
.lawyer-quick-grid,
.lawyer-brand-shell {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding: 18px 20px 20px;
}
.lawyer-quick-block {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}
.lawyer-quick-title {
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
}
.lawyer-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.lawyer-chip {
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.lawyer-chip:hover {
    background: #dbeafe;
    border-color: #93c5fd;
    transform: translateY(-1px);
}
.lawyer-chip-city {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #c2410c;
}
.lawyer-chip-city:hover {
    background: #ffedd5;
    border-color: #fdba74;
}
.lawyer-rule-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    padding: 18px 20px 22px;
}
.lawyer-rule-card {
    padding: 18px;
    border-radius: 14px;
    background: linear-gradient(180deg, #fcfdff 0%, #f8fafc 100%);
    border: 1px solid #e5e7eb;
}
.lawyer-rule-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #eff6ff;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
}
.lawyer-rule-card h3 {
    margin: 14px 0 8px;
    font-size: 16px;
    color: var(--text-main);
}
.lawyer-rule-card p {
    margin: 0;
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-sec);
}
.lawyer-filter-shell,
.lawyer-results-shell,
.lawyer-enroll-shell {
    padding: 20px;
}
.lawyer-filter-head h2,
.lawyer-results-copy h2,
.lawyer-brand-copy h2 {
    margin: 0 0 8px;
    font-size: 22px;
    color: var(--text-main);
}
.lawyer-filter-head p,
.lawyer-results-copy p,
.lawyer-brand-copy p {
    margin: 0;
    color: var(--text-sec);
    line-height: 1.8;
}
.lawyer-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}
.lawyer-filter-grid-enroll {
    margin-top: 0;
}
.lawyer-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.lawyer-field span {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-sec);
}
.lawyer-field input,
.lawyer-field select,
.lawyer-field textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 11px 12px;
    font-size: 14px;
    color: var(--text-main);
    background: #fff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.lawyer-field input:focus,
.lawyer-field select:focus,
.lawyer-field textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.lawyer-field-wide {
    grid-column: span 2;
}
.lawyer-cause-select-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.lawyer-field-textarea {
    margin-top: 12px;
}
.lawyer-field textarea {
    min-height: 132px;
    resize: vertical;
    line-height: 1.7;
}
.lawyer-filter-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
}
.lawyer-inline-msg {
    font-size: 13px;
    color: var(--text-sec);
}
.lawyer-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
    margin-top: 16px;
}
.lawyer-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 240px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
    transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s;
}
.lawyer-card:hover {
    border-color: #dbeafe;
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
}
.lawyer-card-top {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.lawyer-card-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
}
.lawyer-card-head {
    flex: 1;
    min-width: 0;
}
.lawyer-card-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.lawyer-card-name-row strong {
    font-size: 17px;
    color: var(--text-main);
}
.lawyer-score-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
}
.lawyer-card-specialty {
    margin-top: 7px;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
}
.lawyer-card-meta {
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-hint);
}
.lawyer-card-body {
    color: var(--text-sec);
    font-size: 13px;
    line-height: 1.8;
}
.lawyer-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
}
.lawyer-card-tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #f0fdf4;
    color: #16a34a;
    font-size: 12px;
    font-weight: 700;
}
.lawyer-card-link {
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
}
.lawyer-card-slot {
    align-items: center;
    justify-content: center;
    text-align: center;
    border-style: dashed;
    background: #f8fafc;
}
.lawyer-card-slot-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: #dbeafe;
    color: var(--primary);
    font-size: 28px;
    font-weight: 500;
}
.lawyer-card-slot p {
    margin: 0;
    color: var(--text-sec);
    line-height: 1.7;
}
.lawyer-brand-copy {
    padding: 6px 0;
}
.lawyer-brand-points {
    margin: 16px 0 0;
    padding-left: 18px;
    color: var(--text-sec);
}
.lawyer-brand-points li {
    margin-bottom: 10px;
}
.lawyer-plan-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.lawyer-plan-card {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
}
.lawyer-plan-card-highlight {
    border-color: #fdba74;
    background: linear-gradient(180deg, #fff7ed 0%, #ffffff 100%);
    box-shadow: 0 10px 18px rgba(249, 115, 22, 0.12);
}
.lawyer-plan-label {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
}
.lawyer-plan-card h3 {
    margin: 14px 0 8px;
    font-size: 18px;
    color: var(--text-main);
}
.lawyer-plan-card p {
    margin: 0;
    color: var(--text-sec);
    line-height: 1.8;
    font-size: 13px;
}
.lawyer-enroll-shell {
    border-top: 1px solid var(--border);
}
.lawyer-enroll-note {
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fef3c7;
    color: #92400e;
    font-size: 13px;
    line-height: 1.7;
}

/* ==========================================================================
   Right Sidebar (Leaderboard)
   ========================================================================== */
.right-sidebar {
    width: 220px;
    flex-shrink: 0;
    position: sticky;
    top: 56px;
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.leaderboard-box {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.leaderboard-header {
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #ea580c;
    border-bottom: 1px solid var(--border);
    background: #fffbeb;
}
.leaderboard-list {
    padding: 8px 0;
    counter-reset: lb;
}
.leaderboard-list li {
    display: flex;
    align-items: center;
    padding: 6px 16px;
    font-size: 13px;
    gap: 8px;
    transition: background 0.15s;
}
.leaderboard-list li:hover { background: #f9fafb; }
.leaderboard-list li::before {
    counter-increment: lb;
    content: counter(lb);
    width: 20px; height: 20px;
    background: #f3f4f6;
    color: var(--text-sec);
    font-size: 11px; font-weight: 600;
    border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.leaderboard-list li:nth-child(1)::before { background: #fbbf24; color: #fff; }
.leaderboard-list li:nth-child(2)::before { background: #9ca3af; color: #fff; }
.leaderboard-list li:nth-child(3)::before { background: #cd7f32; color: #fff; }
.leaderboard-list li a { flex: 1; color: var(--text-main); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-clicks { font-size: 11px; color: var(--text-hint); flex-shrink: 0; }

/* ==========================================================================
   Login Modal
   ========================================================================== */
.modal-overlay {
    display: none;
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.45);
    z-index: 200;
    align-items: center; justify-content: center;
}
.modal-card {
    background: var(--card);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    overflow: hidden;
}
.role-select-card {
    transition: all 0.2s;
}
.role-select-card:hover {
    border-color: #07c160 !important;
    background: #f0fdf4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(7,193,96,0.15);
}
.role-select-card:active { transform: translateY(0); }

/* ==========================================================================
   WX Modal (QR popup)
   ========================================================================== */
.wx-modal-overlay {
    display: none;
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 200;
    align-items: center; justify-content: center;
}
.wx-modal {
    background: var(--card);
    border-radius: 12px;
    width: 360px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    overflow: hidden;
}
.wx-modal-header {
    background: #07c160;
    color: #fff;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.wx-modal-icon {
    background: #fff;
    color: #07c160;
    width: 28px; height: 28px;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold; font-size: 14px;
}
.wx-modal-close {
    margin-left: auto;
    cursor: pointer;
    font-size: 18px;
    opacity: 0.8;
}
.wx-modal-close:hover { opacity: 1; }
.wx-modal-body { padding: 24px; }
.wx-modal-id { font-size: 20px; font-weight: 700; color: var(--text-main); }
.wx-copy-btn {
    background: #07c160; color: #fff; border: none;
    padding: 10px 24px; border-radius: 6px;
    font-size: 14px; cursor: pointer; transition: background 0.2s;
}
.wx-copy-btn:hover { background: #06a855; }

/* ==========================================================================
   Footer (TT123 / AMZ123 Style)
   ========================================================================== */
.site-footer {
    background: #1e293b;
    color: #94a3b8;
    margin-top: 20px;
    font-size: 13px;
    line-height: 1.8;
}
.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 28px 24px 20px;
    display: grid;
    grid-template-columns: minmax(260px, 1.5fr) minmax(120px, 0.45fr) minmax(260px, 0.8fr) 116px;
    gap: 18px 28px;
    align-items: flex-start;
}
.footer-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.footer-about {
    min-width: 260px;
}
.footer-about h3 {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}
.footer-about p {
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.7;
}
.footer-col h4 {
    font-size: 14px;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 6px;
}
.footer-col a {
    color: #94a3b8;
    font-size: 13px;
    transition: color 0.15s;
}
.footer-col a:hover {
    color: #fff;
}
.footer-official-qr {
    min-width: 116px;
    align-items: center;
    justify-self: start;
}
.footer-official-qr h4 {
    width: 96px;
    text-align: center;
}
.footer-official-qr img {
    display: block;
    width: 96px;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid #475569;
    background: #fff;
    transform: rotate(90deg);
    transform-origin: center;
}
.footer-official-qr span {
    width: 96px;
    text-align: center;
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.4;
}
.footer-bottom {
    border-top: 1px solid #334155;
    padding: 14px 24px;
    text-align: center;
    font-size: 12px;
    color: #64748b;
}
.footer-version-line {
    margin-top: 5px;
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.6;
    text-align: center;
    overflow-wrap: anywhere;
}
.footer-icp {
    color: #cbd5e1;
    text-decoration: none;
}
.footer-icp:hover {
    color: #e2e8f0;
    text-decoration: underline;
}

/* ==========================================================================
   Back to Top
   ========================================================================== */
.back-to-top {
    position: fixed; bottom: 30px; right: 30px;
    width: 40px; height: 40px;
    background: var(--card); color: var(--text-sec);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 16px; cursor: pointer; display: none;
    box-shadow: var(--shadow);
    transition: all 0.2s; z-index: 50;
    align-items: center; justify-content: center;
}
.back-to-top:hover { color: var(--primary); border-color: var(--primary); box-shadow: var(--shadow-hover); }
.back-to-top.show { display: flex; }

@media (max-width: 640px) {
    .back-to-top {
        right: 18px;
        bottom: 20px;
    }
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.cat-card:nth-child(1) { animation-delay: 0s; }
.cat-card:nth-child(2) { animation-delay: 0.05s; }
.cat-card:nth-child(3) { animation-delay: 0.1s; }

/* Loading */
.skeleton-loader { text-align: center; padding: 60px 20px; color: var(--text-hint); }
.skeleton-loader .spinner {
    width: 32px; height: 32px; border: 3px solid var(--border);
    border-top-color: var(--primary); border-radius: 50%;
    animation: spin 0.8s linear infinite; margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Empty state */
.empty-state {
    text-align: center; padding: 40px; color: var(--text-hint); font-size: 14px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 860px) {
    .side-nav { display: none; }
    .right-sidebar { display: none; }
    .cat-grid { grid-template-columns: repeat(3, 1fr); }
    .lawyer-hero,
    .lawyer-quick-grid,
    .lawyer-brand-shell {
        grid-template-columns: 1fr;
    }
    .lawyer-rule-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .lawyer-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .lawyer-plan-grid {
        grid-template-columns: 1fr;
    }
    .sponsor-hero-card {
        padding: 11px 12px;
    }
    .content-ad-sidebar {
        display: none;
    }
    .top-bar { height: auto; }
    .top-bar .wrapper {
        flex-wrap: wrap;
        row-gap: 0;
        padding: 8px 0;
    }
    .top-date,
    .top-userbars {
        height: 40px;
    }
    .top-date {
        flex: 1;
        min-width: 0;
    }
    .top-userbars {
        margin-left: auto;
        max-width: 55%;
    }
    .top-userbars > span,
    #authStatusText,
    #authHint {
        max-width: 150px;
    }
    .top-nav-tabs {
        order: 3;
        flex: 0 0 100%;
        margin-left: 0;
        height: 40px;
    }
    .top-nav-tab {
        height: 40px;
        padding: 0 12px;
    }
}
@media (max-width: 768px) {
    .page-layout { padding: 8px; }
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 28px 16px 20px;
    }
    .footer-about,
    .footer-col {
        min-width: 0;
        width: 100%;
    }
    .footer-col a,
    .footer-about p,
    .footer-official-qr h4,
    .footer-official-qr span {
        overflow-wrap: anywhere;
    }
    .footer-official-qr img,
    .footer-official-qr h4,
    .footer-official-qr span {
        max-width: 96px;
    }
    .footer-official-qr {
        justify-self: center;
    }
    .search-hero { padding: 18px 14px; }
    .search-hero-brand {
        gap: 12px;
    }
    .search-hero-copy h1 {
        font-size: 22px;
    }
    .search-box button {
        flex-basis: 72px;
        width: 72px;
        font-size: 14px;
    }
    .ai-hero-carousel--full {
        border-radius: 10px;
    }
    .ai-hero-carousel--full,
    .ai-carousel-window,
    .ai-carousel-track,
    .ai-carousel-slide {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
    .ai-carousel-window {
        aspect-ratio: 3 / 1;
        min-height: 180px;
    }
    .ai-carousel-slide {
        padding: 20px 22px 48px;
    }
    .ai-carousel-slide h2 {
        font-size: 24px;
        overflow-wrap: anywhere;
    }
    .ai-carousel-slide p {
        max-width: none;
        overflow-wrap: anywhere;
    }
    .ai-slide-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .ai-slide-btn,
    .ai-slide-link {
        width: 100%;
    }
    .lawyer-hero {
        padding: 16px 20px;
        min-height: 168px;
        border-radius: 10px;
    }
    .lawyer-hero h1 {
        font-size: 20px;
    }
    .lawyer-hero-desc {
        font-size: 12px;
        display: none;
    }
    .lawyer-stat-grid--inline {
        display: none;
    }
    .lawyer-rule-grid,
    .lawyer-filter-grid {
        grid-template-columns: 1fr;
    }
    .lawyer-field-wide {
        grid-column: span 1;
    }
    .lawyer-cause-select-grid {
        grid-template-columns: 1fr;
    }
    .lawyer-card-foot,
    .lawyer-filter-actions,
    .lawyer-hero-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .lawyer-btn {
        width: 100%;
    }
    .lawyer-page .footer-inner {
        flex-direction: column;
        gap: 18px;
        padding: 28px 16px 20px;
    }
    .lawyer-page .footer-about,
    .lawyer-page .footer-col {
        min-width: 0;
        width: 100%;
    }
    .lawyer-page .footer-col a,
    .lawyer-page .footer-about p {
        overflow-wrap: anywhere;
    }
    .search-tabs-row {
        gap: 12px;
    }
    .sponsor-hero-card,
    .category-sponsor-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .sponsor-hero-main,
    .category-sponsor-main {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }
    .sponsor-hero-main .sponsor-video-thumb,
    .category-sponsor-main .sponsor-video-thumb {
        width: 100%;
    }
    .sponsor-hero-cta,
    .category-sponsor-cta {
        width: auto;
    }
    .floating-ad-slot {
        right: 10px;
        bottom: 180px;
        width: min(280px, calc(100vw - 20px));
    }
    .search-tabs-logo-img {
        height: 42px;
    }
    .search-tab {
        padding: 6px 14px;
    }
    .cat-grid { grid-template-columns: repeat(2, 1fr); }
    .ai-entry-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 14px;
    }
    .ai-entry-card {
        padding: 13px;
    }
    .tools-search-bar {
        align-items: stretch;
        flex-direction: column;
    }
    .tools-search-count {
        font-size: 12px;
    }
    .tools-request-card {
        max-width: 100%;
        gap: 3px;
    }
    .tools-section-tabs {
        gap: 6px;
    }
    .tools-section-tab {
        flex: 1 1 auto;
        padding: 7px 10px;
    }
    .deadlines-hero {
        margin-bottom: 14px;
    }
    .deadlines-search-panel {
        gap: 10px;
        padding: 12px;
        border-radius: 12px;
    }
    .deadlines-search-row {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
    }
    .deadline-global-search {
        min-height: 40px;
    }
    .deadline-result-count {
        white-space: normal;
        font-size: 12px;
    }
    .deadline-filter-panel {
        padding: 10px;
    }
    .deadline-filter-panel--compact {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
    .deadline-filter-panel .deadline-search-shell {
        padding: 8px 10px;
    }
    .deadline-filter-selects {
        grid-template-columns: 1fr;
        gap: 7px;
    }
    .deadline-filter-selects--horizontal {
        grid-template-columns: 1fr;
    }
    .deadline-filter-row {
        grid-template-columns: 1fr;
    }
    .deadlines-page .deadline-filter-row--primary,
    .deadlines-page .deadline-filter-row--secondary {
        grid-template-columns: 1fr;
    }
    .deadline-filter-control {
        grid-template-columns: 58px minmax(0, 1fr);
    }
    .deadlines-page .deadline-filter-control {
        grid-template-columns: 58px minmax(0, 1fr);
    }
    .deadlines-page .deadline-filter-action {
        width: min(100%, 200px);
        min-width: 180px;
        max-width: 240px;
    }
    .deadline-content-layout {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .deadline-side-column {
        position: static;
        max-height: none;
        overflow: visible;
        padding-bottom: 0;
        order: 2;
    }
    .deadline-main-column {
        order: 1;
    }
    .deadline-filter-tabs {
        gap: 6px;
    }
    .deadlines-page .deadline-filter-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .deadlines-page .deadline-filter-field {
        gap: 4px;
        font-size: 12px;
    }
    .deadlines-page .deadline-filter-select {
        min-height: 38px;
        padding-top: 8px;
        padding-bottom: 8px;
    }
    .deadline-filter-tab {
        flex: 1 1 auto;
        min-width: min(132px, 100%);
        padding: 7px 10px;
    }
    .deadline-results-list {
        gap: 12px;
    }
    .deadlines-page .deadline-days-layout {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .deadlines-page .deadline-day-group {
        gap: 8px;
    }
    .deadlines-page .deadline-day-card {
        grid-template-columns: minmax(54px, auto) minmax(0, 1fr);
        gap: 10px;
        padding: 12px;
    }
    .deadlines-page .deadline-day-number {
        font-size: clamp(26px, 12vw, 38px);
    }
    .deadlines-page .deadline-day-unit {
        white-space: normal;
    }
    .deadlines-page .deadline-day-content {
        gap: 7px;
        padding-left: 10px;
    }
    .deadline-card {
        padding: 13px;
    }
    .deadline-quiz-card {
        margin-top: 12px;
        margin-bottom: 12px;
    }
    .deadline-quiz-options {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .deadline-quiz-next {
        width: 100%;
    }
    .deadline-card-head {
        grid-template-columns: 1fr;
    }
    .deadline-card-period {
        font-size: 21px;
    }
    .deadline-card-actions {
        align-items: stretch;
        flex-direction: column;
    }
    .deadline-feedback-link {
        width: 100%;
    }
    .tool-card-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 14px;
    }
    .tool-card {
        padding: 13px;
    }
    .tool-panel-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .tool-panel {
        padding: 14px;
    }
    .tool-detail-layout,
    .tool-calc-form--split {
        grid-template-columns: 1fr;
    }
    .tool-combined-action-row {
        grid-template-columns: 1fr;
    }
    .tool-detail-sidebar {
        position: static;
        grid-template-columns: 1fr;
    }
    .tool-detail-ad-slot--wide {
        margin-top: 12px;
    }
    .training-page .footer-inner {
        flex-direction: column;
        gap: 18px;
        padding: 28px 16px 20px;
    }
    .training-page .footer-about,
    .training-page .footer-col {
        min-width: 0;
        width: 100%;
    }
    .training-page .footer-col a,
    .training-page .footer-about p {
        overflow-wrap: anywhere;
    }
    .fahai-shell {
        width: calc(100% - 24px);
        margin: 14px auto 24px;
    }
    .fahai-hero {
        align-items: flex-start;
        padding: 18px 16px;
    }
    .fahai-hero h1 {
        font-size: 24px;
    }
    .fahai-toolbar {
        padding: 12px;
    }
    .fahai-search {
        align-items: stretch;
    }
    .fahai-search span {
        padding-top: 9px;
    }
    .fahai-video-grid {
        grid-template-columns: 1fr;
    }
    .fahai-note {
        flex-direction: column;
        gap: 6px;
    }
    .fahai-page .footer-inner {
        flex-direction: column;
        gap: 18px;
        padding: 28px 16px 20px;
    }
    .fahai-page .footer-about,
    .fahai-page .footer-col {
        min-width: 0;
        width: 100%;
    }
    .fahai-page .footer-col a,
    .fahai-page .footer-about p {
        overflow-wrap: anywhere;
    }
    .tools-page .footer-inner {
        flex-direction: column;
        gap: 18px;
        padding: 28px 16px 20px;
    }
    .tools-page .footer-about,
    .tools-page .footer-col {
        min-width: 0;
        width: 100%;
    }
    .tools-page .footer-col a,
    .tools-page .footer-about p {
        overflow-wrap: anywhere;
    }
    .top-date {
        font-size: 12px;
        max-width: calc(100% - 120px);
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .top-userbars {
        gap: 8px;
        margin-left: auto;
        max-width: 60%;
    }
    .top-userbars > span,
    #authStatusText,
    #authHint {
        max-width: 96px;
    }
}
@media (max-width: 480px) {
    .ai-carousel-nav {
        top: auto;
        bottom: 16px;
        transform: none;
        width: 36px;
        height: 36px;
        font-size: 22px;
    }
    .ai-carousel-prev {
        left: auto;
        right: 60px;
    }
    .ai-carousel-next {
        right: 16px;
    }
    .ai-carousel-dots {
        left: 18px;
        right: auto;
        bottom: 28px;
    }
    .search-tabs-row {
        flex-direction: column;
        align-items: center;
    }
    .search-tabs-logo-img {
        height: 38px;
    }
    .search-tabs {
        justify-content: center;
    }
    .top-userbars > span,
    #authStatusText,
    #authHint {
        display: none;
    }
    .fahai-hero {
        flex-direction: column;
    }
    .fahai-stats {
        min-width: 0;
        width: 100%;
    }
    .fahai-search {
        flex-direction: column;
        gap: 6px;
    }
    .fahai-search span {
        padding-top: 0;
    }
    .fahai-modal-card {
        width: 100%;
    }
    .deadlines-page .deadline-day-card {
        grid-template-columns: 1fr;
    }
    .deadlines-page .deadline-day-content {
        padding-left: 0;
        border-left: 0;
        padding-top: 10px;
        border-top: 1px solid #edf2f7;
    }
    .deadlines-page .deadline-day-number {
        font-size: 34px;
    }
}

/* ==========================================================================
   Channel Toggle Bar (PC / 公众号 / 小程序)
   ========================================================================== */
.channel-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-top: 14px;
    background: #f1f5f9;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}
.channel-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-sec);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    position: relative;
    white-space: nowrap;
}
.channel-btn:hover {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.06);
}
.channel-btn.active {
    background: #fff;
    color: var(--primary);
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(37, 99, 235, 0.12);
}
.channel-btn-icon {
    font-size: 16px;
    line-height: 1;
}
.channel-btn-label {
    font-size: 13px;
}
.channel-btn-count {
    display: none;
    font-size: 11px;
    color: var(--text-hint);
    background: #f0f2f5;
    padding: 1px 6px;
    border-radius: 8px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
    transition: all 0.2s;
}
.channel-btn.active .channel-btn-count {
    background: var(--primary-light);
    color: var(--primary);
}

/* Channel-specific item styles for QR views */
.cat-item--qr {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 14px 10px;
    gap: 4px;
    cursor: pointer;
    min-height: 56px;
}
.cat-item--qr:hover {
    background: #f0fdf4;
}
.cat-item--qr .cat-item-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
}
.cat-item--qr .qr-channel-tag {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 600;
    line-height: 16px;
}
.cat-item--qr .qr-channel-tag--oa {
    color: #16a34a;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}
.cat-item--qr .qr-channel-tag--mp {
    color: #2563eb;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}
.cat-item--contact {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 12px 14px;
}
.cat-contact-phone {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.3;
}
.cat-contact-note {
    font-size: 12px;
    color: var(--text-sec);
    line-height: 1.6;
}

/* Inline channel micro-badges for PC view */
.inline-channel-badge {
    display: inline-flex;
    align-items: center;
    font-size: 9px;
    padding: 0 3px;
    border-radius: 2px;
    cursor: pointer;
    font-weight: 600;
    line-height: 15px;
    transition: all 0.15s;
    vertical-align: middle;
    margin-left: 2px;
}
.inline-channel-badge--oa {
    color: #16a34a;
    background: #f0fdf4;
    border: 1px solid #dcfce7;
}
.inline-channel-badge--mp {
    color: #2563eb;
    background: #eff6ff;
    border: 1px solid #dbeafe;
}
.inline-channel-badge:hover {
    transform: scale(1.12);
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .channel-bar {
        max-width: 100%;
    }
    .channel-btn {
        padding: 8px 10px;
        gap: 4px;
    }
    .channel-btn-icon {
        font-size: 14px;
    }
    .channel-btn-label {
        font-size: 12px;
    }
}

/* ==========================================================================
   Login Modal Redesign
   ========================================================================== */
.login-modal-card {
    width: 420px;
    padding: 0;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    background: var(--card);
}
.login-modal-header {
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    color: #fff;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.login-modal-heading {
    display: flex;
    align-items: center;
    gap: 10px;
}
.login-modal-icon {
    font-size: 22px;
}
.login-modal-title {
    font-size: 17px;
    font-weight: 600;
}
.login-modal-close {
    color: #fff;
    font-size: 22px;
    cursor: pointer;
}
.login-tab-bar {
    display: flex;
    border-bottom: 1px solid var(--border);
    background: #fafbfc;
}
.login-tab {
    flex: 1;
    text-align: center;
    padding: 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    color: var(--text-hint);
}
.login-tab.active {
    border-bottom-color: var(--primary);
    color: var(--primary);
}
.login-panel {
    padding: 28px 24px 20px;
}
.login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.login-label {
    font-size: 13px;
    color: var(--text-sec);
    margin-bottom: 6px;
    display: block;
}
.login-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 13px 16px;
    font-size: 15px;
    outline: none;
    transition: border 0.2s;
    background: #fff;
}
.login-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.login-input-muted {
    color: var(--text-hint);
}
.login-input-uppercase {
    text-transform: uppercase;
}
.login-btn-primary {
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 4px;
    transition: opacity 0.2s;
}
.login-btn-primary:hover {
    opacity: 0.9;
}
.login-btn-success {
    background: linear-gradient(135deg, #34a853, #43b864);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 4px;
    transition: opacity 0.2s;
}
.login-btn-success:hover {
    opacity: 0.9;
}
.login-btn-warning {
    background: linear-gradient(135deg, #fb8c00, #f9a825);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 4px;
    transition: opacity 0.2s;
}
.login-btn-warning:hover {
    opacity: 0.9;
}
.login-msg {
    font-size: 13px;
    text-align: center;
    color: #e53935;
    min-height: 20px;
}
.login-link {
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
}
.login-link-muted {
    font-size: 13px;
    color: var(--text-hint);
    text-decoration: none;
}
.login-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 2px;
}
.login-actions-end {
    justify-content: flex-end;
}
.login-actions-center {
    justify-content: center;
}
.login-panel-intro {
    text-align: center;
    margin-bottom: 4px;
}
.login-panel-icon {
    font-size: 36px;
    margin-bottom: 6px;
}
.login-panel-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 4px;
}
.login-panel-desc {
    font-size: 12px;
    color: var(--text-hint);
    line-height: 1.7;
}
.login-qr-placeholder {
    width: 160px;
    height: 160px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #f0f5ff, #e8f0fe);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d0ddf0;
}
.login-qr-icon-wrap {
    text-align: center;
}
.login-qr-icon {
    font-size: 48px;
}
.login-qr-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
}
.login-qr-desc {
    font-size: 13px;
    color: var(--text-sec);
    margin-bottom: 4px;
}
.login-qr-note {
    font-size: 11px;
    color: var(--text-hint);
    margin-bottom: 18px;
}
.login-coming-soon {
    display: inline-block;
    padding: 8px 20px;
    background: #f5f5f5;
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-hint);
}
.login-qr-panel {
    padding: 40px 24px;
    text-align: center;
}
.login-step2-panel {
    padding: 24px;
    text-align: center;
}
.login-step-success {
    font-size: 36px;
    color: #07c160;
    margin-bottom: 8px;
}
.role-select-grid {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 16px;
}
.role-select-card {
    flex: 1;
    padding: 18px 10px;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.15s, background 0.15s;
}
.role-select-card:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}
.role-select-icon {
    font-size: 28px;
}
.role-select-label {
    font-size: 13px;
    font-weight: 600;
    margin-top: 6px;
}
.login-step-note {
    font-size: 11px;
    color: var(--text-hint);
}
.channel-bar--two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 720px;
    width: min(720px, 100%);
}

/* ============================================================================
   Hotline Page
   ============================================================================ */
.hotline-page-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 24px;
    align-items: start;
    max-width: 1100px;
    margin: 0 auto;
}

.hotline-page {
    overflow-x: hidden;
}

.hotline-main-content {
    min-width: 0;
}

.hotline-sidebar {
    position: sticky;
    top: 84px;
}

.hotline-page-shell .section-hero {
    margin-bottom: 18px;
}

.hotline-page-shell .section-hero p {
    color: var(--text-sec);
    font-size: 14px;
    line-height: 1.8;
    margin: 10px 0 0;
}

.catalog-shell {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.hotline-toolbar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.hotline-search-shell {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
    padding: 14px 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.hotline-search-icon {
    font-size: 18px;
    color: var(--primary);
    flex: 0 0 auto;
}

.hotline-search-input {
    width: 100%;
    min-width: 0;
    border: none;
    outline: none;
    font-size: 15px;
    color: var(--text-main);
    background: transparent;
}

.hotline-search-input::placeholder {
    color: var(--text-hint);
}

.hotline-search-summary {
    color: var(--text-sec);
    font-size: 13px;
    line-height: 1.7;
    min-height: 22px;
}

.directory-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.directory-section-head h2 {
    margin: 0;
    font-size: 24px;
}

.directory-section-head p {
    margin: 8px 0 0;
    color: var(--text-sec);
    font-size: 14px;
    line-height: 1.7;
}

.directory-total {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #eef4ff;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    padding: 8px 14px;
    white-space: nowrap;
}

.directory-groups {
    display: grid;
    gap: 16px;
}

.directory-groups .cat-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.cat-grid--search-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}

.group-note {
    padding: 0 20px 16px;
    color: var(--text-hint);
    font-size: 12px;
    line-height: 1.7;
}

.search-results-card .group-note {
    padding-bottom: 12px;
}

.hotline-entry {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-results-card .hotline-entry {
    gap: 6px;
    min-height: 0;
    align-self: start;
}

.hotline-theme-label {
    display: inline-flex;
    align-self: flex-start;
    border-radius: 999px;
    background: #eef4ff;
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
}

.hotline-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.hotline-number {
    font-size: 28px;
    line-height: 1;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 0.5px;
}

.hotline-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
}

.hotline-entry.is-live .hotline-status {
    background: #e9f7ef;
    color: #198754;
}

.hotline-entry.is-merged .hotline-status {
    background: #fff4e5;
    color: #c36a00;
}

.hotline-entry.is-local .hotline-status {
    background: #eef4ff;
    color: var(--primary);
}

.hotline-entry.is-pending .hotline-status {
    background: #f3f4f6;
    color: #6b7280;
}

.hotline-dept {
    color: var(--text-hint);
    font-size: 12px;
    line-height: 1.5;
}

.hotline-desc {
    color: var(--text-sec);
    font-size: 13px;
    line-height: 1.7;
}

.hotline-tip {
    color: var(--text-hint);
    font-size: 12px;
    line-height: 1.7;
}

.search-results-card .hotline-desc,
.search-results-card .hotline-tip {
    line-height: 1.55;
}

.lookup-card {
    overflow: hidden;
}

.lookup-body {
    padding: 18px 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.lookup-desc {
    color: var(--text-sec);
    font-size: 13px;
    line-height: 1.7;
    margin: 0;
}

.lookup-selects {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lookup-select {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14px;
    outline: none;
    background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.lookup-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.lookup-select:disabled {
    background: #f6f8fb;
    color: var(--text-hint);
    cursor: not-allowed;
}

.lookup-note {
    color: var(--text-hint);
    font-size: 12px;
    line-height: 1.7;
    margin: -2px 0 0;
}

.lookup-result {
    border-radius: 14px;
    border: 1px solid #dbe7ff;
    background: #f8fbff;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lookup-result.is-empty {
    background: #fafbfc;
    color: var(--text-hint);
}

.lookup-result.is-error {
    border-color: #ffd8d8;
    background: #fff7f7;
    color: #c0392b;
}

.lookup-result-label {
    color: var(--text-hint);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.lookup-result-code {
    font-size: 34px;
    line-height: 1;
    font-weight: 800;
    color: var(--primary);
}

.lookup-result.is-empty .lookup-result-code {
    color: var(--text-hint);
}

.lookup-result-meta {
    color: var(--text-sec);
    font-size: 13px;
    line-height: 1.7;
}

.lookup-result-meta strong {
    color: var(--text-main);
}

@media (max-width: 820px) {
    .fahai-share-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hotline-page-shell {
        grid-template-columns: 1fr;
    }

    .hotline-sidebar {
        display: block;
        position: static;
    }
}

@media (max-width: 768px) {
    .hotline-page .hero-carousel {
        width: calc(100% - 16px);
    }

    .hotline-section-hero {
        padding: 24px 16px 18px;
    }

    .hotline-page-shell .section-hero p {
        overflow-wrap: anywhere;
    }

    .hotline-tabs {
        gap: 16px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .hotline-tabs::-webkit-scrollbar {
        display: none;
    }

    .hotline-tab {
        flex: 0 0 auto;
        min-height: 44px;
        font-size: 16px;
    }

    .hotline-search-shell {
        border-radius: 12px;
        padding: 12px 14px;
    }

    .hotline-page .footer-inner {
        flex-direction: column;
        gap: 18px;
        padding: 28px 16px 20px;
    }

    .hotline-page .footer-about,
    .hotline-page .footer-col {
        min-width: 0;
        width: 100%;
    }

    .hotline-page .footer-col a,
    .hotline-page .footer-about p {
        overflow-wrap: anywhere;
    }

    .directory-section-head h2 {
        font-size: 21px;
    }

    .directory-groups .cat-grid {
        grid-template-columns: 1fr;
    }

    .cat-grid--search-results {
        grid-template-columns: 1fr;
    }
}
.hotline-section-hero {
    text-align: center;
    padding: 28px 40px 20px;
}
.hotline-hero-icon {
    font-size: 36px;
}
.hotline-tabs {
    display: flex;
    gap: 24px;
    margin-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0;
}
.hotline-tab {
    appearance: none;
    border: 0;
    border-bottom: 3px solid transparent;
    background: transparent;
    padding: 0 0 10px;
    color: var(--text-sec);
    font: inherit;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.5;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.hotline-tab:hover,
.hotline-tab.is-active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}
.hotline-panel {
    display: none;
}
.hotline-panel.is-active {
    display: flex;
}
.deadlines-page .deadline-results-panel {
    display: block;
}
.hotline-loading-note {
    padding: 16px 20px;
    color: var(--text-hint);
}

/* ========================================================================== 
   Forum / Miji
   ========================================================================== */
.forum-page-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) 320px;
    gap: 18px;
    width: 100%;
}

.forum-main-column,
.forum-side-column {
    min-width: 0;
}

.forum-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.forum-hero {
    padding: 26px 28px;
    margin-bottom: 16px;
    background: var(--card);
}

.forum-kicker,
.forum-badge,
.forum-rule-chip,
.forum-side-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--primary-light);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
}

.forum-kicker {
    padding: 6px 12px;
}

.forum-hero h1 {
    margin: 16px 0 10px;
    font-size: 32px;
    line-height: 1.2;
    color: var(--text-main);
}

.forum-hero p {
    margin: 0;
    color: var(--text-sec);
    line-height: 1.75;
}

.forum-rule-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.forum-rule-chip {
    padding: 7px 11px;
    background: var(--card);
    color: var(--text-sec);
}

.forum-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.forum-hero-btn,
.forum-btn,
.forum-sort-btn,
.post-format-btn,
.forum-rating-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    border-radius: 999px;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.forum-hero-btn,
.forum-btn {
    padding: 10px 16px;
    border: 1px solid transparent;
}

.forum-hero-btn-primary,
.forum-btn-primary {
    background: var(--primary);
    color: #fff;
}

.forum-hero-btn-primary:hover,
.forum-btn-primary:hover {
    color: #fff;
    box-shadow: var(--shadow-hover);
}

.forum-hero-btn-secondary,
.forum-btn-secondary {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--border);
}

.forum-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

.forum-composer-card,
.forum-post-card,
.forum-side-card {
    padding: 20px;
}

.forum-composer-card,
.forum-side-card {
    margin-bottom: 16px;
}

.forum-card-head,
.forum-post-head,
.forum-toolbar-card,
.forum-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.forum-card-head {
    align-items: center;
    margin-bottom: 14px;
}

.forum-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
}

.forum-card-desc,
.forum-toolbar-copy {
    color: var(--text-sec);
    font-size: 13px;
    line-height: 1.7;
}

.forum-field-grid,
.forum-comment-form,
.forum-comment-list,
.forum-post-list {
    display: grid;
}

.forum-field-grid,
.forum-comment-form {
    gap: 10px;
}

.forum-post-list {
    gap: 12px;
}

.forum-input,
.forum-textarea,
.forum-select {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 11px 13px;
    background: var(--card);
    color: var(--text-main);
    font: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.forum-input:focus,
.forum-textarea:focus,
.forum-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.forum-input:disabled {
    background: #f6f8fb;
    color: var(--text-sec);
}

.forum-textarea {
    min-height: 150px;
    resize: vertical;
    line-height: 1.7;
}

.post-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fafbfc;
}

.post-format-btn,
.forum-sort-btn,
.forum-rating-btn {
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text-sec);
    padding: 8px 11px;
}

.post-format-btn:hover,
.forum-sort-btn:hover,
.forum-rating-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.forum-sort-btn.active,
.forum-rating-btn:active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.post-editor-help {
    color: var(--text-sec);
    font-size: 12px;
    line-height: 1.7;
}

.post-editor-help code {
    display: inline-block;
    padding: 1px 6px;
    margin: 0 3px 3px 0;
    border-radius: 999px;
    background: var(--primary-light);
    color: var(--primary);
    font-family: Consolas, Monaco, monospace;
    font-size: 11px;
}

.post-preview-card {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fafbfc;
    margin-top: 10px;
}

.post-preview-label {
    margin-bottom: 10px;
    color: var(--text-sec);
    font-size: 12px;
    font-weight: 700;
}

.forum-inline-msg {
    font-size: 13px;
    color: var(--text-sec);
}

.forum-composer-actions,
.forum-sort-group,
.forum-rating-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.forum-composer-actions {
    margin-top: 12px;
}

.forum-toolbar-card {
    align-items: center;
    padding: 14px 16px;
    margin-bottom: 12px;
}

.forum-post-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-main);
}

.forum-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
    color: var(--text-sec);
    font-size: 12px;
}

.forum-badge {
    padding: 5px 10px;
    font-size: 11px;
}

.forum-post-score {
    min-width: 94px;
    padding: 10px;
    border: 1px solid #fed7aa;
    border-radius: var(--radius);
    background: #fff7ed;
    color: #c2410c;
    text-align: center;
}

.forum-post-score strong {
    display: block;
    font-size: 20px;
    line-height: 1;
}

.forum-post-score span {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 700;
}

.forum-post-body {
    margin-top: 14px;
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.8;
}

.forum-rich-content p {
    margin: 0 0 12px;
}

.forum-rich-content h3 {
    margin: 4px 0 12px;
    font-size: 18px;
    color: var(--text-main);
}

.forum-rich-content ul,
.forum-rich-content ol {
    margin: 0 0 12px 22px;
    color: var(--text-main);
}

.forum-rich-content li {
    margin-bottom: 6px;
}

.forum-rich-content blockquote {
    margin: 0 0 12px;
    padding: 10px 14px;
    border-left: 4px solid var(--border);
    background: #fafbfc;
    color: var(--text-sec);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.forum-rich-content mark {
    background: #fef3c7;
    color: var(--text-main);
    padding: 0 3px;
    border-radius: 4px;
}

.forum-rich-content strong {
    color: var(--text-main);
}

.forum-rich-callout {
    margin: 0 0 12px;
    padding: 12px 14px;
    border-radius: var(--radius);
    border: 1px solid #fed7aa;
    background: #fff7ed;
}

.forum-rich-callout strong {
    display: block;
    margin-bottom: 6px;
    color: #c2410c;
}

.forum-rich-empty,
.forum-empty {
    color: var(--text-hint);
    font-size: 13px;
}

.forum-post-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    color: var(--text-sec);
    font-size: 12px;
}

.forum-rating-panel,
.forum-comment-panel {
    margin-top: 12px;
    padding: 12px 0 0;
    border-top: 1px solid var(--border);
    background: transparent;
}

.forum-panel-head {
    align-items: center;
    margin-bottom: 10px;
}

.forum-panel-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
}

.forum-comment-list {
    gap: 0;
    border-top: 1px solid var(--border);
}

.forum-comment-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.forum-comment-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
    font-size: 12px;
    color: var(--text-hint);
}

.forum-comment-content {
    color: var(--text-main);
    font-size: 13px;
    line-height: 1.7;
    white-space: pre-wrap;
}

.forum-comment-form {
    margin-top: 12px;
}

.forum-comment-form-top {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 10px;
}

.forum-side-card h3 {
    margin: 0 0 10px;
    font-size: 17px;
    color: var(--text-main);
}

.forum-side-card p,
.forum-side-card li {
    color: var(--text-sec);
    font-size: 13px;
    line-height: 1.7;
}

.forum-side-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}

.forum-side-card-internal {
    border-style: dashed;
    background: #fafbfc;
}

.forum-side-note {
    margin-bottom: 10px;
    padding: 5px 10px;
    font-size: 11px;
}

.forum-empty {
    padding: 26px 18px;
    text-align: center;
}

@media (max-width: 1120px) {
    .forum-page-shell {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .forum-hero {
        padding: 22px 18px;
    }

    .forum-hero h1 {
        font-size: 30px;
    }

    .forum-composer-card,
    .forum-side-card,
    .forum-post-card {
        padding-left: 16px;
        padding-right: 16px;
    }

    .forum-comment-form-top {
        grid-template-columns: 1fr;
    }

    .forum-post-head,
    .forum-toolbar-card,
    .forum-panel-head,
    .forum-card-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .forum-post-score {
        min-width: 0;
        width: 100%;
    }
}
