/* ==========================================================================
   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.is-authed #registerBtn,
.top-userbars.is-authed #guestAuthSeparator,
.top-userbars.is-authed #loginBtn {
    display: none !important;
}
.top-userbars.is-authed #profileLink,
.top-userbars.is-authed #notificationsEntry,
.top-userbars.is-authed #notificationAuthSeparator,
.top-userbars.is-authed #userAuthSeparator,
.top-userbars.is-authed #logoutBtn {
    display: inline !important;
}
.top-userbars.is-authed #notificationsEntry {
    display: inline-flex !important;
}
.top-userbars:not(.is-authed) #registerBtn,
.top-userbars:not(.is-authed) #guestAuthSeparator,
.top-userbars:not(.is-authed) #loginBtn {
    display: inline !important;
}
.top-userbars:not(.is-authed) #profileLink,
.top-userbars:not(.is-authed) #notificationsEntry,
.top-userbars:not(.is-authed) #notificationAuthSeparator,
.top-userbars:not(.is-authed) #userAuthSeparator,
.top-userbars:not(.is-authed) #logoutBtn {
    display: none !important;
}
.top-userbars > span {
    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 {
    max-width: 42px;
}
.top-auth-button {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--text-hint);
    font: inherit;
    line-height: 1.2;
    padding: 0;
    margin: 0;
    min-width: 0;
    max-width: 96px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.top-auth-button.is-action {
    color: var(--primary);
    cursor: pointer;
}
.top-auth-button.is-action:hover {
    opacity: 0.8;
}
.top-auth-button:disabled {
    cursor: default;
    opacity: 1;
}
.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 {
    position: relative;
    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 {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 0;
    gap: 6px;
    padding: 14px 44px 30px 14px;
    overflow: hidden;
}
.ai-entry-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    min-width: 0;
}
.ai-entry-logo {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: block;
    padding: 4px;
    box-sizing: border-box;
    border: 1px solid var(--border);
    border-radius: 10px;
    object-fit: contain;
    object-position: center;
    vertical-align: middle;
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}
.ai-entry-head .sponsor-sidebar-title {
    margin: 0;
    min-width: 0;
    flex: 0 1 auto;
    line-height: 1.35;
}
.ai-entry-head .ad-label {
    margin-left: auto;
    white-space: nowrap;
}
.ai-entry-card .sponsor-sidebar-top,
.ai-entry-card .sponsor-sidebar-title,
.ai-entry-card .sponsor-sidebar-desc {
    margin: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}
.ai-entry-card .sponsor-sidebar-desc {
    line-height: 1.55;
}
.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;
    align-items: center;
}
.version-series-ad-slot {
    max-width: 1100px;
    margin: 18px auto;
    padding: 0 16px;
}
.version-series-ad-slot:empty {
    min-height: 18px;
}
.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;
}
.page-ad-slot .page-ad-card {
    width: 100%;
    max-width: 970px;
    min-height: 96px;
    margin: 0 auto;
    border-radius: 10px;
}
.page-ad-slot .page-ad-card.sponsor-content-link {
    display: flex;
    align-items: stretch;
    gap: 14px;
    padding: 14px 16px;
}
.page-ad-slot .page-ad-card .sponsor-video-thumb {
    width: 160px;
    min-width: 160px;
    max-width: 160px;
    border-radius: 8px;
    border: 1px solid #dbe3ee;
    align-self: center;
}
.page-ad-slot .page-ad-card-copy {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 0;
}
.page-ad-slot .page-ad-card-top {
    margin-bottom: 0;
    gap: 8px 10px;
}
.page-ad-slot .page-ad-card-copy .page-ad-card-title {
    margin-bottom: 0;
    font-size: 15px;
    line-height: 1.35;
}
.page-ad-slot .page-ad-card-desc {
    line-height: 1.6;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}
.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);
}
.cat-item.training-logo-item {
    align-items: center;
    gap: 12px;
    min-height: 62px;
    padding-right: 72px;
}
.cat-item.training-logo-item[data-panel-decorated="1"] {
    grid-template-columns: minmax(0, 1fr) 30px;
    align-items: stretch;
    column-gap: 10px;
    padding-right: 10px;
}
.cat-item.training-logo-item .training-logo-main {
    grid-column: 1;
    display: flex;
    align-items: center;
    align-self: stretch;
    min-width: 0;
    gap: 12px;
}
.training-logo-media {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}
.training-logo-img {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    padding: 2px;
    box-sizing: border-box;
    object-fit: contain;
    object-position: center;
    background: #fff;
}
.training-logo-fallback {
    position: absolute;
    inset: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    background: var(--primary-light);
}
.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: 188px;
    padding: 12px 14px 34px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    position: relative;
}
.training-brand-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.training-brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
}
.training-brand-logo--stack .training-logo-media {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
}
.training-brand-heading {
    min-width: 0;
}
.training-brand-meta {
    width: fit-content;
    margin-bottom: 4px;
    padding: 2px 7px;
    border-radius: 4px;
    background: #f3f4f6;
    color: var(--text-sec);
    font-size: 11px;
    font-weight: 600;
}
.training-brand-title {
    margin: 0;
    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;
    width: 100%;
    margin: 0 auto;
    min-width: 0;
}
.tools-content-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 16px;
    align-items: start;
    max-width: 1400px;
    margin: 0 auto;
    min-width: 0;
}
.tools-sidebar {
    display: grid;
    align-content: start;
    gap: 12px;
    min-width: 0;
    width: min(100%, 260px);
    justify-self: end;
}
.tools-sidebar-inner {
    position: sticky;
    top: 86px;
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid #dbe5f1;
    border-radius: 12px;
    background: linear-gradient(180deg, #f8fbff 0%, #f1f5f9 100%);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}
.tools-sidebar-cards {
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr);
}
.tools-sidebar-card {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 16px;
    background: #fff;
    border: 1px solid #d6e0ea;
    border-radius: 10px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}
.tools-sidebar-card h2 {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-main);
}
.tools-sidebar-card p {
    margin: 0;
    font-size: 12px;
    line-height: 1.7;
    color: var(--text-sec);
}
.tools-sidebar-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 22px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 11px;
    font-weight: 700;
}
.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: minmax(0, 1fr);
    gap: 16px;
    padding: 18px 20px;
}
.tool-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    min-height: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    padding-right: 76px;
    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-head {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-bottom: 10px;
}
.tool-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #ffffff;
    overflow: hidden;
}
.tool-card-icon img {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    box-sizing: border-box;
    object-fit: contain;
    object-position: center;
    transform: scale(1.14);
    transform-origin: center;
    vertical-align: middle;
}
.tool-card-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    margin: 0;
    padding: 2px 8px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 11px;
    font-weight: 700;
}
.tool-card-title {
    margin: 0;
    min-width: 0;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 700;
    color: var(--text-main);
}
.tool-card-desc {
    margin: 0 0 12px;
    font-size: 14px;
    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;
}

.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-official-qr {
    min-width: 116px;
    align-items: center;
    justify-self: start;
}

@media (max-width: 900px) {
    .tools-content-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .tools-sidebar {
        width: 100%;
        justify-self: stretch;
    }
    .tools-sidebar-inner {
        position: static;
        padding: 0;
        border: none;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }
}

@media (max-width: 768px) {
    .page-layout {
        display: block;
        width: 100%;
        overflow-x: hidden;
    }
    .search-hero-brand {
        flex-direction: column;
    }
    .search-hero-copy {
        text-align: center;
    }
    .search-filter-row {
        flex-wrap: wrap;
    }
    .search-filter-row .filter-label {
        flex: 1 0 100%;
    }
    .filter-select {
        min-height: 38px;
    }
    .tools-content-layout {
        grid-template-columns: 1fr;
    }
    .tools-sidebar {
        display: none;
    }
    .tools-sidebar-cards {
        grid-template-columns: minmax(0, 1fr);
    }
    .tools-sidebar-card {
        padding: 14px;
    }
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 28px 16px 20px;
        flex-direction: column;
    }
    .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 {
        justify-self: center;
        min-width: 0;
    }
    .footer-official-qr img,
    .footer-official-qr h4,
    .footer-official-qr span {
        max-width: 96px;
    }
    .tool-detail-hero {
        padding-right: 14px;
    }
    .tool-detail-hero .panel-mini-actions--tool-detail {
        position: static;
    }
    .tool-detail-back-link {
        margin-left: 0;
    }
    .ai-hero-carousel--full {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
    .ai-carousel-window,
    .ai-carousel-track,
    .ai-carousel-slide {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
    .ai-carousel-slide h2,
    .ai-carousel-slide p {
        overflow-wrap: anywhere;
    }
}

.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: 9px;
    margin-bottom: 14px;
    padding: 14px;
    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: 9px;
}

.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-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;
}

.tools-search-button {
    align-self: stretch;
    min-height: 42px;
}

.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;
}

.deadline-law-name-combobox {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
}

.deadline-combobox-input {
    padding-right: 10px !important;
}

.deadline-combobox-listbox {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 18;
    display: grid;
    gap: 2px;
    max-height: min(280px, 42vh);
    overflow-y: auto;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.16);
}

.deadline-combobox-listbox[hidden] {
    display: none;
}

.deadline-combobox-toolbar {
    position: sticky;
    top: -6px;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(112px, max-content) minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    padding: 0 0 6px;
    margin-bottom: 2px;
    background: #fff;
}

.deadline-combobox-options {
    display: grid;
    gap: 2px;
}

.deadline-combobox-option {
    width: 100%;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-main);
    text-align: left;
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.4;
    cursor: pointer;
}

.deadline-combobox-option--all {
    min-height: 34px;
    white-space: nowrap;
}

.deadline-combobox-search {
    width: 100%;
    min-width: 0;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--text-main);
    font-size: 13px;
    outline: none;
}

.deadline-combobox-search:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.deadline-combobox-option:hover,
.deadline-combobox-option:focus,
.deadline-combobox-option.is-active {
    background: rgba(37, 99, 235, 0.1);
    outline: none;
}

.deadline-combobox-option.is-selected {
    color: var(--primary);
    font-weight: 700;
}

.deadline-combobox-empty {
    padding: 8px 10px;
    color: var(--text-hint);
    font-size: 12px;
    line-height: 1.4;
}

.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;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    justify-content: stretch;
    justify-self: stretch;
    align-items: center;
}

.deadlines-page .deadline-filter-row--primary {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.deadlines-page .deadline-filter-row--secondary {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.deadlines-page .deadline-filter-row--tertiary {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.deadlines-page .deadline-filter-row--tertiary .deadline-filter-actions {
    grid-column: 1 / -1;
    justify-self: center;
}

.deadlines-page .deadline-filter-field {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    width: 100%;
    min-width: 0;
}

.deadlines-page .deadline-filter-control {
    grid-template-columns: 72px minmax(0, 1fr);
}

.deadlines-page .deadline-filter-field--compact-label {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 5px;
}

.deadline-filter-field-label {
    display: block;
    width: 72px;
    min-width: 72px;
    color: var(--text-sec);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    text-align: right;
}

.deadline-filter-field-label--justify {
    text-align: justify;
    text-align-last: justify;
}

.deadline-filter-field-label--compact-short {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: end;
    width: 56px;
    min-width: 56px;
    text-align: center;
    letter-spacing: 0;
}

.deadline-filter-field-label--wide-spread {
    display: block;
    width: 72px;
    min-width: 72px;
    text-align: justify;
    text-align-last: justify;
    letter-spacing: 0;
}

.deadline-filter-actions {
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(76px, 92px));
    width: max-content;
    justify-self: center;
    justify-content: center;
    gap: 6px;
    max-width: 100%;
    min-width: 0;
    align-items: center;
}

.deadlines-page .deadline-keyword-input {
    padding-right: 10px;
}

.deadlines-page .deadline-filter-action {
    width: 88px;
    min-width: 76px;
    max-width: 96px;
    min-height: 34px;
    padding: 0 12px;
    justify-self: stretch;
    align-self: center;
}

.deadline-filter-action--secondary {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: var(--text-sec);
}

.deadline-filter-action--secondary:hover,
.deadline-filter-action--secondary:focus {
    border-color: #94a3b8;
    background: #f8fafc;
    color: var(--text-main);
}

.deadline-region-control.is-disabled .deadline-filter-field-label {
    color: var(--text-hint);
}

.deadline-region-control.is-disabled .lookup-select {
    background: #f6f8fb;
    color: var(--text-hint);
    cursor: not-allowed;
    box-shadow: none;
}

.deadline-region-control[hidden] {
    display: 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;
}

.deadline-intake-card {
    display: grid;
    gap: 10px;
    margin: 0;
    border-color: #d1fae5;
    background: linear-gradient(180deg, #ffffff 0%, #f8fffb 100%);
}

.deadline-intake-card .cat-header {
    align-items: center;
    gap: 8px;
    padding-bottom: 0;
}

.deadline-intake-card .cat-icon {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #ecfdf5;
    color: #047857;
    font-size: 14px;
    font-weight: 900;
}

.deadline-intake-field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.deadline-intake-label {
    color: var(--text-sec);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
}

.deadline-intake-text {
    width: 100%;
    min-height: 104px;
    padding: 9px 10px;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    background: #fff;
    color: var(--text-main);
    font: inherit;
    font-size: 13px;
    line-height: 1.55;
    resize: vertical;
}

.deadline-intake-text:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
    outline: none;
}

.deadline-intake-actions {
    display: flex;
    justify-content: flex-end;
}

.deadline-intake-submit {
    min-height: 34px;
    padding: 7px 14px;
    border: 1px solid #14b8a6;
    border-radius: 8px;
    background: #0f766e;
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.35;
    cursor: pointer;
}

.deadline-intake-submit:hover:not(:disabled) {
    background: #115e59;
}

.deadline-intake-submit:disabled {
    cursor: progress;
    opacity: 0.62;
}

.deadline-intake-result {
    min-height: 40px;
    padding: 9px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: var(--text-sec);
    font-size: 12px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.deadline-intake-result strong,
.deadline-intake-result span {
    display: block;
}

.deadline-intake-result strong {
    margin-bottom: 3px;
    color: var(--text-main);
    font-size: 13px;
    font-weight: 900;
}

.deadline-intake-result.is-success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.deadline-intake-result.is-warning {
    border-color: #fed7aa;
    background: #fff7ed;
    color: #9a3412;
}

.deadline-intake-result.is-error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

@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;
    gap: 14px;
    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: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    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;
}

.deadline-card-main {
    display: grid;
    grid-template-columns: minmax(76px, auto) minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
    min-width: 0;
}

.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;
    position: relative;
    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);
}

.deadlines-page .deadline-card--focused {
    border-color: #93c5fd;
    box-shadow: 0 0 0 2px rgba(147, 197, 253, 0.18), var(--shadow);
}

.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,
.deadline-quiz-difficulty-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    min-width: 0;
}

.deadline-quiz-mode,
.deadline-quiz-difficulty {
    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,
.deadline-quiz-difficulty.is-active,
.deadline-quiz-difficulty: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-setup,
.deadline-quiz-flow,
.deadline-quiz-result {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.deadline-quiz-tagline {
    color: #0f766e;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.45;
}

.deadline-quiz-copy,
.deadline-quiz-wechat-hint,
.deadline-quiz-result-comment {
    color: var(--text-sec);
    font-size: 12px;
    line-height: 1.6;
}

.deadline-quiz-quick-controls {
    display: grid;
    grid-template-columns: minmax(0, 92px) minmax(0, 1fr);
    gap: 8px;
    align-items: end;
}

.deadline-quiz-start--ghost {
    display: none;
}

.deadline-quiz-result-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    color: var(--text-main);
    font-size: 13px;
    font-weight: 800;
}

.deadline-quiz-result-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 30px;
    padding: 6px 10px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
}

.deadline-quiz-share-card {
    display: grid;
    gap: 6px;
    padding: 12px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: linear-gradient(135deg, #eff6ff 0%, #f8fbff 100%);
}

.deadline-quiz-share-card__brand,
.deadline-quiz-share-card__slogan {
    color: var(--text-sec);
    font-size: 12px;
    font-weight: 700;
}

.deadline-quiz-share-card__badge {
    color: var(--text-main);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.4;
}

.deadline-quiz-share-card__score,
.deadline-quiz-share-card__accuracy {
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
}

.deadline-quiz-copy-share {
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #fff;
    color: var(--primary);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.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-card-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
    padding-right: 70px;
}

.deadline-card-title-row .deadline-card-title {
    flex: 0 1 auto;
}

.deadlines-page .deadline-law-meta--inline {
    display: inline-flex;
    align-items: center;
    flex: 1 1 260px;
    min-width: min(100%, 220px);
}

.deadline-day-content .deadline-card-period {
    margin: 0;
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.45;
}

.deadline-card-copy-row {
    display: grid;
    gap: 10px;
    align-items: start;
}

.deadline-card-copy {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.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-rule-line {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.deadline-rule-line span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.deadline-rule-line .deadline-copy-button {
    justify-self: end;
    flex: 0 0 auto;
}

.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));
    }

    .deadlines-page .deadline-filter-row--tertiary {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .deadlines-page .deadline-filter-row--tertiary .deadline-filter-actions {
        grid-column: 1 / -1;
        justify-self: center;
    }
}

.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-label {
    display: inline-flex;
    align-items: flex-start;
    gap: 4px;
    width: fit-content;
    max-width: 100%;
    line-height: 1.35;
}
.tool-field-help {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    min-width: 14px;
    height: 14px;
    margin-top: -3px;
    border: 1px solid #dbe3ee;
    border-radius: 999px;
    background: #f8fafc;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    cursor: help;
    padding: 0;
}
.tool-field-help:hover,
.tool-field-help:focus-visible {
    border-color: var(--primary);
    color: var(--primary);
    outline: none;
}
.tool-field-help::after {
    content: attr(data-help);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    z-index: 30;
    width: min(320px, 70vw);
    padding: 9px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.6;
    text-align: left;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    transform: translateX(-50%) translateY(3px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    white-space: normal;
}
.tool-field-help::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: calc(100% + 3px);
    z-index: 31;
    width: 8px;
    height: 8px;
    background: #f8fafc;
    border-left: 1px solid #cbd5e1;
    border-top: 1px solid #cbd5e1;
    transform: translateX(-50%) rotate(45deg);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.tool-field-help:hover::after,
.tool-field-help:hover::before,
.tool-field-help:focus-visible::after,
.tool-field-help:focus-visible::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.tool-field-help:hover::before,
.tool-field-help:focus-visible::before {
    transform: translateX(-50%) rotate(45deg);
}
.tool-field-help--edge-left::after {
    left: 0;
    right: auto;
    transform: translateX(0) translateY(3px);
}
.tool-field-help--edge-right::after {
    left: auto;
    right: 0;
    transform: translateX(0) translateY(3px);
}
.tool-field-help--edge-left::before {
    left: 7px;
}
.tool-field-help--edge-right::before {
    left: auto;
    right: 3px;
    transform: translateX(0) rotate(45deg);
}
.tool-field-help--edge-left:hover::after,
.tool-field-help--edge-left:focus-visible::after,
.tool-field-help--edge-right:hover::after,
.tool-field-help--edge-right:focus-visible::after {
    transform: translateX(0) translateY(0);
}
.tool-field-help--edge-right:hover::before,
.tool-field-help--edge-right:focus-visible::before {
    transform: translateX(0) rotate(45deg);
}
.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-field--disabled {
    color: rgba(100, 116, 139, 0.62);
}
.tool-field--disabled .tool-calc-input {
    background: #f1f5f9;
    color: #94a3b8;
    border-color: #e2e8f0;
    cursor: not-allowed;
}
.tool-calc-input:disabled {
    background: #f1f5f9;
    color: #94a3b8;
    border-color: #e2e8f0;
    cursor: not-allowed;
    box-shadow: none;
}
.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 {
    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-list {
    display: grid;
    gap: 8px;
}
.tool-structured-result-primary-line {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
    white-space: nowrap;
}
.tool-structured-result-primary-line strong {
    flex: 0 1 auto;
    min-width: 0;
}
.tool-structured-result-primary {
    flex: 0 0 auto;
    color: #1d4ed8;
    font-size: 24px;
    font-weight: 900;
    line-height: 1.25;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: keep-all;
}
.tool-structured-result-primary-note {
    flex: 1 1 220px;
    min-width: 160px;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    white-space: normal;
    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-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 6px;
}
.tool-structured-result-heading h3 {
    margin: 0;
}
.tool-result-download-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.tool-download-result-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid #dbe4f0;
    border-radius: 50%;
    background: #fff;
    color: #2563eb;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.tool-download-result-button:hover,
.tool-download-result-button:focus-visible {
    border-color: #2563eb;
    background: #eff6ff;
    outline: none;
}
.tool-download-result-button:disabled {
    cursor: wait;
    opacity: 0.62;
}
.tool-download-result-button--excel {
    color: #047857;
}
.tool-download-result-button--excel:hover,
.tool-download-result-button--excel:focus-visible {
    border-color: #047857;
    background: #ecfdf5;
}
.tool-download-result-glyph {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
}
.tool-download-result-icon {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.tool-download-result-text {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
.tool-download-result-format {
    position: absolute;
    right: -5px;
    bottom: -4px;
    min-width: 11px;
    height: 11px;
    padding: 0 2px;
    border-radius: 999px;
    background: #fff;
    color: currentColor;
    font-size: 8px;
    font-weight: 800;
    line-height: 11px;
    text-align: center;
}
.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-lines {
    display: grid;
    gap: 6px;
    min-width: 0;
}
.tool-structured-result-line {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    min-width: 0;
}
.tool-structured-result-line-label {
    color: #475569;
    font-weight: 800;
    white-space: nowrap;
}
.tool-structured-result-line-value {
    min-width: 0;
    color: var(--text-sec);
    overflow-wrap: anywhere;
}
.tool-structured-result-line--result .tool-structured-result-line-value,
.tool-structured-result-line--total .tool-structured-result-line-value {
    color: var(--text-main);
    font-weight: 800;
}
.tool-structured-result-line--item {
    grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
    padding-left: 8px;
    border-left: 2px solid #dbeafe;
}
.tool-structured-result-line--item .tool-structured-result-line-label {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
}
.tool-structured-result-table--wide th {
    width: auto;
}
.tool-structured-result-table--wide td {
    min-width: 96px;
}
.tool-structured-result-table--wide th:nth-child(3),
.tool-structured-result-table--wide td:nth-child(3) {
    width: 152px;
    min-width: 152px;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: keep-all;
}
.tool-structured-result-table--wide td:nth-child(3) {
    text-align: right;
}
.tool-structured-money-number {
    display: inline-block;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: keep-all;
    font-variant-numeric: tabular-nums;
}
.tool-structured-result-row--subtotal {
    background: #f8fafc;
}
.tool-structured-result-row--subtotal td {
    color: #334155;
    font-weight: 700;
    font-size: 13px;
}
.tool-structured-result-row--total {
    background: #eef6ff;
}
.tool-structured-result-row--total td {
    color: #1e3a8a;
    font-weight: 800;
    font-size: 14px;
}
.tool-structured-result-row--final {
    background: #dbeafe;
}
.tool-structured-result-row--final td {
    color: #1d4ed8;
    font-weight: 900;
    font-size: 15px;
}
.tool-structured-result-row--subtotal td:nth-child(3) {
    font-size: 14px;
    font-weight: 800;
}
.tool-structured-result-row--total td:nth-child(3) {
    font-size: 15px;
    font-weight: 900;
}
.tool-structured-result-row--final td:nth-child(3) {
    color: #1e40af;
    font-size: 16px;
    font-weight: 900;
}
.tool-structured-result-row--subtotal td:first-child,
.tool-structured-result-row--total td:first-child,
.tool-structured-result-row--final td:first-child {
    border-left: 3px solid #2563eb;
}
.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-result-guidance[hidden] {
    display: none !important;
}
.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-info-button--sup {
    width: 14px;
    min-width: 14px;
    min-height: 14px;
    height: 14px;
    margin: 0 1px 0 2px;
    padding: 0;
    border-color: rgba(37, 99, 235, 0.42);
    background: rgba(239, 246, 255, 0.78);
    font-size: 10px;
    line-height: 1;
    vertical-align: super;
    transform: translateY(-0.18em);
}
.tool-legal-article-info-button--sup sup {
    position: static;
    font-size: 10px;
    line-height: 1;
}
.tool-legal-article-info-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
.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-result-actions[hidden] {
    display: none !important;
}
.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-legal-basis-download {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}
.tool-legal-basis-download:hover,
.tool-legal-basis-download:focus-visible {
    color: #1d4ed8;
    text-decoration: underline;
    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--danger {
    color: #dc2626;
    font-weight: 700;
}
.tool-source-note a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}
.tool-download-note {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 12px 0 0;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--text-sec);
    font-size: 13px;
    line-height: 1.6;
}
.tool-download-note span {
    color: var(--text-main);
    font-weight: 700;
}
.tool-download-note a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}
.tool-download-note a:hover,
.tool-download-note a:focus-visible {
    text-decoration: underline;
    outline: none;
}
.tool-download-note em {
    color: var(--text-hint);
    font-size: 12px;
    font-style: normal;
}
.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 {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: visible;
    padding-right: 86px;
}
.tool-detail-hero .content-page-eyebrow a:not(.tool-detail-back-link) {
    color: var(--primary);
    text-decoration: none;
}
.tool-detail-back-link {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: auto;
    margin-top: 0;
    margin-left: 10px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: rgba(37, 99, 235, 0.54);
    font-size: inherit;
    font-weight: 600;
    line-height: inherit;
    text-decoration: none;
}
.tool-detail-back-link:hover,
.tool-detail-back-link:focus-visible {
    color: rgba(37, 99, 235, 0.82);
    background: transparent;
    text-decoration: underline;
    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 solid #e5e7eb;
    border-radius: var(--radius);
    background: #fbfcfe;
    color: inherit;
    text-decoration: none;
    opacity: 0.72;
    transition: opacity 0.2s, border-color 0.2s, background 0.2s;
}
.tool-detail-ad-slot:hover {
    opacity: 0.94;
    border-color: #cbd5e1;
    background: #f8fafc;
}
.tool-detail-ad-slot span {
    color: var(--text-hint);
    font-size: 11px;
    font-weight: 600;
}
.tool-detail-ad-slot strong {
    color: var(--text-sec);
    font-size: 14px;
    line-height: 1.5;
    font-weight: 600;
}
.tool-detail-ad-slot em {
    color: var(--text-hint);
    font-size: 12px;
    line-height: 1.6;
    font-style: normal;
}
.tool-detail-ad-slot--wide {
    margin-top: 16px;
    opacity: 0.64;
}
.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-summary {
    cursor: pointer;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
}
.tool-subpanel-summary::marker {
    color: var(--text-sec);
}
.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-subpanel-field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px 10px;
    align-items: end;
}
.tool-subpanel--work-injury-primer {
    grid-column: 1 / -1;
}
#tool-work-injury .tool-calc-form--work-injury {
    grid-template-columns: minmax(0, 1fr);
}
.tool-subpanel-field-grid--work-injury-primer {
    grid-template-columns: repeat(6, minmax(0, 180px));
    justify-content: start;
    align-items: end;
}
.tool-subpanel-field-grid--work-injury-primer > .tool-field,
.tool-subpanel-field-grid--work-injury-primer > .tool-check {
    grid-column: span 2;
    min-width: 0;
}
.tool-subpanel-field-grid--work-injury-primer > .tool-source-note {
    grid-column: 1 / -1;
}
.work-injury-branch,
.work-injury-grade-band {
    display: block;
}
.work-injury-branch[hidden],
.work-injury-grade-band[hidden] {
    display: none;
}
.tool-subpanel-field-grid--work-injury-death,
.tool-subpanel-field-grid--work-injury-dependents {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: end;
}
.tool-subpanel-field-grid--work-injury-optional,
.tool-subpanel-field-grid--work-injury-manual {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
}
.tool-subpanel-field-grid--work-injury-local-benefits {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
    padding: 10px;
    border: 1px solid #dbe3ee;
    border-radius: var(--radius);
    background: #f8fafc;
}
.tool-subpanel-field-grid--work-injury-local-benefits > .tool-source-note {
    grid-column: 1 / -1;
}
.tool-subpanel-field-grid--work-injury-dependents {
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #dbe3ee;
    border-radius: var(--radius);
    background: #f8fafc;
}
.tool-work-injury-manual-action-row {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    padding-top: 6px;
}
.tool-work-injury-primer-action-row {
    display: flex;
    justify-content: center;
    padding-top: 6px;
}
.tool-work-injury-primer-action-row .tool-step-cta {
    justify-self: center;
}
.tool-subpanel-field-grid--injury-death {
    grid-template-columns: repeat(6, minmax(0, 180px));
    justify-content: start;
}
.tool-subpanel-field-grid--injury-death > .tool-field {
    grid-column: span 2;
}
.tool-subpanel-field-grid .tool-source-note,
.tool-subpanel-field-grid .tool-subpanel-details {
    grid-column: 1 / -1;
}
.tool-subpanel-field-grid--injury-death > .tool-field:nth-of-type(1),
.tool-subpanel-field-grid--injury-death > .tool-field:nth-of-type(3),
.tool-subpanel-field-grid--injury-death > .tool-field:nth-of-type(5),
.tool-subpanel-field-grid--injury-death > .tool-field:nth-of-type(7) {
    grid-column: 1 / span 2;
}
.tool-subpanel-field-grid--injury-death > .tool-field:nth-of-type(2),
.tool-subpanel-field-grid--injury-death > .tool-field:nth-of-type(4),
.tool-subpanel-field-grid--injury-death > .tool-field:nth-of-type(6),
.tool-subpanel-field-grid--injury-death > .tool-field:nth-of-type(8) {
    grid-column: 3 / span 2;
}
.tool-subpanel-field-grid--injury-death > .tool-field:nth-of-type(9) {
    grid-column: 5 / span 2;
}
.tool-subpanel-field-grid--injury-death > .tool-source-note {
    grid-column: 1 / -1;
    min-height: 1px;
}
.tool-subpanel-field-grid--injury-actual-loss {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: start;
}
.tool-subpanel-field-grid--injury-actual-loss > .tool-field {
    grid-column: span 1;
    min-width: 0;
}
.tool-subpanel-field-grid--injury-actual-loss > .tool-field:nth-of-type(2),
.tool-subpanel-field-grid--injury-actual-loss > .tool-field:nth-of-type(4),
.tool-subpanel-field-grid--injury-actual-loss > .tool-field:nth-of-type(7),
.tool-subpanel-field-grid--injury-actual-loss > .tool-field:nth-of-type(9),
.tool-subpanel-field-grid--injury-actual-loss > .tool-field:nth-of-type(11),
.tool-subpanel-field-grid--injury-actual-loss > .tool-field:nth-of-type(13) {
    grid-column-start: 1;
}
.tool-subpanel-field-grid--injury-dependents > .tool-field,
.tool-subpanel-field-grid--injury-dependents > .tool-dependent-rows,
.tool-subpanel-field-grid--injury-dependents > .tool-dependent-row-action {
    grid-column: 1 / -1;
}
.tool-field--injury-casualty-status {
    max-width: 50%;
}
.tool-dependent-rows {
    display: grid;
    gap: 8px;
}
.tool-dependent-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    gap: 8px 10px;
    align-items: end;
}
.tool-dependent-remove-button {
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #8a95a5;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    opacity: 0.72;
}
.tool-dependent-remove-button:hover {
    background: #eef2f7;
    color: var(--text-main);
    opacity: 1;
}
.tool-dependent-remove-button:disabled {
    cursor: not-allowed;
    opacity: 0.2;
}
.tool-dependent-row-action {
    display: flex;
    justify-content: flex-end;
}
.tool-dependent-row-action .tool-copy-button {
    min-width: 36px;
    min-height: 36px;
    padding: 0 10px;
    font-size: 20px;
    line-height: 1;
}
.tool-subpanel-field-grid .tool-subpanel-details .tool-subpanel-field-grid {
    margin-top: 6px;
}
.injury-death-context--inactive {
    color: var(--text-hint);
    opacity: 0.62;
}
.injury-death-context--inactive .tool-calc-input {
    color: var(--text-hint);
    border-color: #d8dee8;
    background: #f3f5f8;
}
.injury-disability-context--inactive {
    color: var(--text-hint);
    opacity: 0.62;
}
.injury-disability-context--inactive .tool-calc-input {
    color: var(--text-hint);
    border-color: #d8dee8;
    background: #f3f5f8;
}
.work-injury-disability-context--inactive {
    color: var(--text-hint);
    opacity: 0.62;
}
.work-injury-disability-context--inactive .tool-calc-input {
    color: var(--text-hint);
    border-color: #d8dee8;
    background: #f3f5f8;
}
.work-injury-death-context--inactive {
    color: var(--text-hint);
    opacity: 0.62;
}
.work-injury-death-context--inactive .tool-calc-input {
    color: var(--text-hint);
    border-color: #d8dee8;
    background: #f3f5f8;
}
.tool-step-cta,
.tool-injury-final-actions .tool-card-cta--button {
    justify-self: end;
    width: auto;
    min-width: 190px;
}
.tool-calc-form--injury .tool-step-cta {
    justify-self: center;
    width: auto;
    min-width: 190px;
}
.tool-step-action-row {
    display: flex;
    justify-content: center;
    width: 100%;
}
.tool-subpanel--actual-loss .tool-step-cta {
    margin-left: auto;
    margin-right: auto;
    margin-top: 14px;
}
.tool-step-action-row--actual-loss {
    justify-content: center;
    margin-top: 14px;
}
.tool-step-action-row--actual-loss .tool-step-cta {
    margin-top: 0;
}
.tool-injury-final-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: center;
    gap: 10px 14px;
    padding-top: 8px;
}
.tool-field--injury-liability-final {
    width: min(220px, 100%);
}
.tool-injury-final-actions .tool-source-note {
    flex-basis: 100%;
    margin: 0;
    text-align: center;
}
@media (max-width: 768px) {
    .tool-step-cta,
    .tool-injury-final-actions .tool-card-cta--button {
        justify-self: stretch;
        width: 100%;
    }
    .tool-injury-final-actions {
        align-items: stretch;
    }
    .tool-field--injury-liability-final {
        width: 100%;
    }
}
.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-calc-form--injury {
        grid-template-columns: minmax(0, 1fr);
    }
    .tool-calc-form--injury .tool-subpanel-field-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .tool-calc-form--injury .tool-subpanel-field-grid--injury-death {
        grid-template-columns: repeat(6, minmax(0, 180px));
    }
    #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) {
    .tool-structured-result-line {
        grid-template-columns: minmax(0, 1fr);
        gap: 2px;
    }
    .tool-structured-result-line-label {
        white-space: normal;
    }
    .tool-subpanel-field-grid--work-injury-primer,
    .tool-subpanel-field-grid--work-injury-death,
    .tool-subpanel-field-grid--work-injury-dependents,
    .tool-subpanel-field-grid--work-injury-optional,
    .tool-subpanel-field-grid--work-injury-manual,
    .tool-subpanel-field-grid--work-injury-local-benefits,
    .tool-subpanel-field-grid--injury-death,
    .tool-subpanel-field-grid--injury-actual-loss,
    .tool-calc-form--injury .tool-subpanel-field-grid--injury-death,
    .tool-dependent-row {
        grid-template-columns: minmax(0, 1fr);
    }
    .tool-field--injury-casualty-status {
        max-width: 100%;
    }
    .tool-subpanel-field-grid--injury-death > .tool-field,
    .tool-subpanel-field-grid--injury-death > .tool-field:nth-of-type(1),
    .tool-subpanel-field-grid--injury-death > .tool-field:nth-of-type(2),
    .tool-subpanel-field-grid--injury-death > .tool-field:nth-of-type(3),
    .tool-subpanel-field-grid--injury-death > .tool-field:nth-of-type(4),
    .tool-subpanel-field-grid--injury-death > .tool-field:nth-of-type(5),
    .tool-subpanel-field-grid--injury-death > .tool-field:nth-of-type(6),
    .tool-subpanel-field-grid--injury-death > .tool-field:nth-of-type(7),
    .tool-subpanel-field-grid--injury-death > .tool-field:nth-of-type(8),
    .tool-subpanel-field-grid--injury-death > .tool-field:nth-of-type(9),
    .tool-subpanel-field-grid--work-injury-primer > .tool-field,
    .tool-subpanel-field-grid--work-injury-primer > .tool-check,
    .tool-subpanel-field-grid--work-injury-primer > .tool-source-note,
    .tool-subpanel-field-grid--work-injury-death > .tool-field,
    .tool-subpanel-field-grid--work-injury-death > .tool-check,
    .tool-subpanel-field-grid--work-injury-death > .tool-source-note,
    .tool-subpanel-field-grid--work-injury-dependents > .tool-field,
    .tool-subpanel-field-grid--work-injury-dependents > .tool-check,
    .tool-subpanel-field-grid--work-injury-dependents > .tool-source-note,
    .tool-subpanel-field-grid--work-injury-optional > .tool-field,
    .tool-subpanel-field-grid--work-injury-optional > .tool-check,
    .tool-subpanel-field-grid--work-injury-optional > .tool-source-note,
    .tool-subpanel-field-grid--work-injury-manual > .tool-field,
    .tool-subpanel-field-grid--work-injury-manual > .tool-check,
    .tool-subpanel-field-grid--work-injury-manual > .tool-source-note,
    .tool-subpanel-field-grid--work-injury-local-benefits > .tool-field,
    .tool-subpanel-field-grid--work-injury-local-benefits > .tool-check,
    .tool-subpanel-field-grid--work-injury-local-benefits > .tool-source-note,
    .tool-subpanel-field-grid--injury-actual-loss > .tool-field,
    .tool-subpanel-field-grid--injury-death > .tool-source-note {
        grid-column: 1 / -1;
    }
    .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: grid;
    grid-template-columns: minmax(0, 1fr) 30px;
    align-items: center;
    column-gap: 10px;
    padding: 12px 10px 12px 14px;
    border-right: 1px solid #f3f4f6;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s;
    min-height: 72px;
    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-main {
    min-width: 0;
    display: flex;
    align-items: center;
    align-self: stretch;
    gap: 6px;
}
.cat-item-name {
    flex: 0 1 auto;
    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-panel-actions {
    position: absolute;
    top: 18px;
    right: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.wx-modal-panel-actions .panel-icon-btn {
    background: rgba(255, 255, 255, 0.96);
}
.wx-modal-body {
    position: relative;
    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 {
    padding: 14px 24px;
    text-align: center;
    font-size: 12px;
    color: #64748b;
}
.footer-bottom p {
    margin: 0;
}
.footer-version-line {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #334155;
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.6;
    text-align: center;
    overflow-wrap: anywhere;
}
.footer-icp {
    color: #cbd5e1;
    text-decoration: none;
}
.footer-version-link {
    color: #cbd5e1;
    text-decoration: none;
}
.footer-icp:hover,
.footer-version-link: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; }

/* ==========================================================================
   Hermes Chat
   ========================================================================== */
.hermes-chat-root {
    position: fixed;
    right: 30px;
    bottom: 84px;
    z-index: 70;
    pointer-events: none;
}
.hermes-chat-root.is-open {
    z-index: 1000;
}
.hermes-chat-launcher {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 118px;
    height: 44px;
    padding: 0 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
    color: var(--text-main);
    box-shadow: var(--shadow);
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.hermes-chat-launcher:hover,
.hermes-chat-launcher:focus-visible {
    transform: translateY(-1px);
    border-color: #2563eb;
    box-shadow: var(--shadow-hover);
}
.hermes-chat-launcher img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}
.hermes-chat-panel {
    pointer-events: auto;
    position: absolute;
    right: 0;
    bottom: var(--hermes-chat-bottom, 56px);
    width: var(--hermes-chat-width, min(560px, calc(100vw - 40px)));
    height: var(--hermes-chat-height, min(720px, calc(100vh - 120px)));
    min-width: min(360px, calc(100vw - 40px));
    min-height: 520px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 120px);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.24);
}
.hermes-chat-root.is-open .hermes-chat-panel {
    display: flex;
}
.hermes-chat-root.is-open .hermes-chat-launcher {
    display: none;
}
.hermes-chat-root.is-open.is-minimized .hermes-chat-panel {
    display: none;
}
.hermes-chat-root.is-open.is-minimized .hermes-chat-launcher {
    display: inline-flex;
}
.hermes-chat-root.is-maximized .hermes-chat-panel {
    position: fixed;
    top: var(--hermes-chat-max-top, 64px);
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    min-height: 0;
    z-index: 1000;
}
.hermes-chat-resize-handle {
    position: absolute;
    z-index: 3;
    border: 0;
    background: transparent;
    touch-action: none;
}
.hermes-chat-resize-handle--corner {
    left: 8px;
    bottom: 8px;
    width: 18px;
    height: 18px;
    border-left: 2px solid #94a3b8;
    border-bottom: 2px solid #94a3b8;
    border-radius: 0 0 0 4px;
    cursor: nesw-resize;
}
.hermes-chat-resize-handle--bottom {
    left: 50%;
    bottom: 6px;
    width: 72px;
    height: 12px;
    transform: translateX(-50%);
    border-radius: 999px;
    cursor: ns-resize;
}
.hermes-chat-resize-handle--bottom::before {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    top: 5px;
    height: 2px;
    border-radius: 999px;
    background: #94a3b8;
}
.hermes-chat-resize-handle:hover,
.hermes-chat-resize-handle:focus-visible {
    border-color: #2563eb;
    outline: none;
}
.hermes-chat-resize-handle--bottom:hover::before,
.hermes-chat-resize-handle--bottom:focus-visible::before {
    background: #2563eb;
}
.hermes-chat-root.is-resizing {
    user-select: none;
}
.hermes-chat-root.is-maximized .hermes-chat-resize-handle,
.hermes-chat-root.is-minimized .hermes-chat-resize-handle {
    display: none;
}
.hermes-chat-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
}
.hermes-chat-header-main {
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 4px;
}
.hermes-chat-header strong {
    display: block;
    color: var(--text-main);
    font-size: 15px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hermes-chat-header span {
    display: block;
    color: var(--text-sec);
    font-size: 12px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hermes-chat-window-controls {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 6px;
}
.hermes-chat-window-btn {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text-sec);
    cursor: pointer;
    font-size: 17px;
    line-height: 1;
}
.hermes-chat-window-btn:hover,
.hermes-chat-window-btn:focus-visible {
    color: var(--primary);
    border-color: var(--primary);
}
.hermes-chat-close {
    font-size: 20px;
}
.hermes-chat-messages {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    overflow-y: auto;
    background: #ffffff;
}
.hermes-chat-welcome-card {
    align-self: stretch;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #f8fbff;
    color: var(--text-main);
    padding: 14px;
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.08);
    font-size: 13px;
    line-height: 1.65;
}
.hermes-chat-welcome-card h3 {
    margin: 0 0 10px;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 800;
    color: #0f172a;
}
.hermes-chat-welcome-card p,
.hermes-chat-welcome-card ul {
    margin: 0;
}
.hermes-chat-welcome-lead,
.hermes-chat-welcome-foot {
    color: #475569;
}
.hermes-chat-welcome-section {
    margin-top: 10px;
}
.hermes-chat-welcome-section strong {
    display: block;
    margin-bottom: 4px;
    color: #1e3a8a;
}
.hermes-chat-welcome-section ul {
    padding-left: 20px;
    color: #334155;
    list-style: disc;
}
.hermes-chat-welcome-foot {
    margin-top: 12px;
}
.hermes-chat-welcome-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.hermes-chat-welcome-action {
    appearance: none;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    min-height: 34px;
    padding: 7px 10px;
    background: #ffffff;
    color: #1d4ed8;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    line-height: 1.2;
}
.hermes-chat-welcome-action:hover,
.hermes-chat-welcome-action:focus-visible {
    border-color: #2563eb;
    background: #eff6ff;
    outline: none;
}
.hermes-chat-message {
    max-width: 88%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    font-size: 13px;
    line-height: 1.7;
}
.hermes-chat-message--assistant {
    align-self: flex-start;
    color: var(--text-main);
}
.hermes-chat-message--user {
    align-self: flex-end;
    align-items: flex-end;
    background: transparent;
    color: var(--text-main);
}
.hermes-chat-message--user .hermes-chat-message-meta {
    justify-content: flex-end;
}
.hermes-chat-message--user .hermes-chat-message-name {
    color: var(--text-sec);
}
.hermes-chat-message-meta,
.hermes-chat-message-speaker {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 7px;
    min-width: 0;
}
.hermes-chat-message-bubble {
    max-width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.hermes-chat-message--assistant .hermes-chat-message-bubble {
    background: #f3f6fb;
    color: var(--text-main);
}
.hermes-chat-message--user .hermes-chat-message-bubble {
    background: #2563eb;
    color: #ffffff;
}
.hermes-chat-message-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 6px;
}
.hermes-chat-message-action-btn {
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #ffffff;
    color: #1d4ed8;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    padding: 5px 9px;
}
.hermes-chat-message-action-btn:hover,
.hermes-chat-message-action-btn:focus-visible {
    border-color: #2563eb;
    background: #eff6ff;
    outline: none;
}
.hermes-chat-message-action-btn--danger {
    border-color: #fecdd3;
    color: #be123c;
}
.hermes-chat-message-action-btn--danger:hover,
.hermes-chat-message-action-btn--danger:focus-visible {
    border-color: #fb7185;
    background: #fff1f2;
}
.hermes-chat-message-avatar {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    border: 1px solid rgba(148, 163, 184, 0.42);
    border-radius: 50%;
    background: #ffffff;
    object-fit: contain;
    padding: 3px;
}
.hermes-chat-message-avatar--law {
    padding: 1px;
}
.hermes-chat-avatar-link {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: inherit;
    text-decoration: none;
}
.hermes-chat-avatar-link:hover,
.hermes-chat-avatar-link:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.42);
    outline-offset: 2px;
}
.hermes-chat-message-avatar--fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}
.hermes-chat-message-name {
    min-width: 0;
    color: var(--text-main);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hermes-chat-message.is-pending {
    color: var(--text-sec);
}
.hermes-chat-message.is-queued .hermes-chat-message-bubble {
    color: #1d4ed8;
    background: #eff6ff;
    border: 1px dashed #93c5fd;
}
.hermes-chat-message.is-priority .hermes-chat-message-bubble {
    border-color: #2563eb;
}
.hermes-chat-queue-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 6px;
    font-size: 12px;
}
.hermes-chat-queue-badge {
    color: var(--text-hint);
}
.hermes-chat-queue-promote {
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #ffffff;
    color: #1d4ed8;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    padding: 5px 9px;
}
.hermes-chat-queue-promote:hover,
.hermes-chat-queue-promote:focus-visible {
    border-color: #2563eb;
    background: #dbeafe;
    outline: none;
}
.hermes-chat-message.is-error .hermes-chat-message-bubble {
    background: #fff1f2;
    color: #be123c;
}
.hermes-chat-message-body a,
.hermes-chat-link {
    color: #1d4ed8;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.hermes-chat-message--user .hermes-chat-link {
    color: #ffffff;
}
.hermes-chat-message-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}
.hermes-chat-favorite-btn {
    position: relative;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.36);
    overflow: visible;
}
.hermes-chat-favorite-btn--inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    margin-right: 2px;
    vertical-align: middle;
}
.hermes-chat-favorite-btn:hover,
.hermes-chat-favorite-btn:focus-visible {
    background: #fff7f8;
    box-shadow: 0 0 0 1px rgba(244, 114, 182, 0.42);
}
.hermes-chat-composer {
    border-top: 1px solid var(--border);
    background: #f8fafc;
}
.hermes-chat-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px 4px;
}
.hermes-chat-tool-btn {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--text-sec);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}
.hermes-chat-tool-btn--text {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0;
}
.hermes-chat-tool-btn:hover,
.hermes-chat-tool-btn:focus-visible,
.hermes-chat-tool-btn.is-active {
    background: #ffffff;
    border-color: #d1d5db;
    color: #2563eb;
}
.hermes-chat-emoji-panel {
    display: grid;
    grid-template-columns: repeat(6, 34px);
    gap: 6px;
    width: max-content;
    max-width: calc(100% - 24px);
    margin: 4px 12px 8px;
    padding: 8px;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
}
.hermes-chat-emoji-panel[hidden],
.hermes-chat-attachments[hidden] {
    display: none;
}
.hermes-chat-emoji-item {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 8px;
    background: #f8fafc;
    cursor: pointer;
    font-size: 18px;
}
.hermes-chat-emoji-item:hover,
.hermes-chat-emoji-item:focus-visible {
    background: #e0ecff;
}
.hermes-chat-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 12px 0;
}
.hermes-chat-attachment-chip {
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 4px 6px 4px 9px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
    color: var(--text-sec);
    font-size: 12px;
}
.hermes-chat-attachment-chip span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hermes-chat-attachment-thumb {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 6px;
    background: #eef2f7;
    object-fit: cover;
}
.hermes-chat-attachment-chip button {
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 6px;
    background: #eef2f7;
    color: var(--text-sec);
    cursor: pointer;
    line-height: 1;
}
.hermes-chat-attachment-chip button:hover,
.hermes-chat-attachment-chip button:focus-visible {
    background: #fee2e2;
    color: #be123c;
}
.hermes-chat-form {
    display: flex;
    gap: 8px;
    padding: 8px 12px 12px;
}
.hermes-chat-form textarea {
    flex: 1;
    min-width: 0;
    min-height: 82px;
    max-height: 180px;
    resize: vertical;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 9px 10px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-main);
    outline: none;
}
.hermes-chat-form textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.hermes-chat-form button {
    flex: 0 0 64px;
    border: none;
    border-radius: 8px;
    background: #2563eb;
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
}
.hermes-chat-form button:disabled {
    opacity: 0.58;
    cursor: wait;
}
.hermes-chat-status {
    min-height: 0;
    padding: 0 12px 10px;
    color: var(--text-hint);
    font-size: 12px;
}

.ai-documents-hermes-only .hermes-chat-root.is-maximized .hermes-chat-panel {
    top: var(--hermes-chat-max-top, 64px);
    left: 0;
    right: 0;
    bottom: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

@media (max-width: 640px) {
    .back-to-top {
        right: 18px;
        bottom: 20px;
    }
    .hermes-chat-root {
        right: 14px;
        bottom: 74px;
    }
    .hermes-chat-root.is-open {
        left: 14px;
        right: 14px;
        z-index: 1000;
    }
    .hermes-chat-root.is-maximized .hermes-chat-panel {
        top: var(--hermes-chat-max-top, 64px);
        left: 0;
        right: 0;
        bottom: 0;
        width: auto;
        height: auto;
        min-height: 0;
    }
    .hermes-chat-panel {
        left: 0;
        right: 0;
        width: auto;
        height: min(720px, calc(100vh - 118px));
        min-height: min(420px, calc(100vh - 118px));
        max-width: none;
        bottom: 54px;
    }
    .hermes-chat-resize-handle {
        display: none;
    }
    .hermes-chat-tools {
        gap: 6px;
    }
    .hermes-chat-emoji-panel {
        grid-template-columns: repeat(6, minmax(30px, 1fr));
        width: auto;
    }
    .hermes-chat-form {
        flex-direction: column;
    }
    .hermes-chat-form button {
        flex: 0 0 40px;
    }
    .hermes-chat-launcher {
        min-width: 108px;
    }
}

/* ==========================================================================
   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; }

/* Litigation complaint drafting workspace */
.complaint-draft-page {
    background: #f5f7fb;
}

.complaint-draft-shell {
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px 24px 48px;
}

.complaint-draft-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-end;
    padding: 22px 0 18px;
}

.complaint-draft-toolbar h1 {
    margin: 4px 0 8px;
    font-size: 34px;
    line-height: 1.15;
    color: #111827;
}

.complaint-draft-toolbar p {
    margin: 0;
    color: #4b5563;
    max-width: 720px;
}

.complaint-draft-actions-row,
.complaint-draft-preview-tabs,
.complaint-draft-case-tabs,
.complaint-draft-category-tabs {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.complaint-draft-primary,
.complaint-draft-secondary,
.complaint-draft-actions-row button,
.complaint-draft-preview-tabs button,
.complaint-draft-case-tabs button,
.complaint-draft-category-tabs button {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #1f2937;
    border-radius: 6px;
    padding: 9px 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.complaint-draft-primary,
.complaint-draft-case-tabs button.active,
.complaint-draft-preview-tabs button.active,
.complaint-draft-category-tabs button.active {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
}

.complaint-draft-secondary:hover,
.complaint-draft-actions-row button:hover {
    border-color: #2563eb;
    color: #1d4ed8;
}

.complaint-draft-case-tabs {
    margin-bottom: 14px;
}

.complaint-draft-mode-bar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.complaint-draft-mode-bar button,
.complaint-draft-doc-card {
    min-width: 0;
    text-align: left;
    border: 1px solid #d5deea;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    cursor: pointer;
    overflow-wrap: anywhere;
}

.complaint-draft-mode-bar button {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
}

.complaint-draft-mode-bar button strong,
.complaint-draft-doc-card strong {
    font-size: 14px;
    line-height: 1.35;
}

.complaint-draft-mode-bar button span,
.complaint-draft-doc-card span,
.complaint-draft-mode-guidance,
.complaint-draft-preview-note {
    color: #64748b;
    font-size: 12px;
    line-height: 1.55;
}

.complaint-draft-preview-note {
    margin: -4px 0 10px;
}

.complaint-draft-mode-bar button.active,
.complaint-draft-doc-card.active {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: inset 3px 0 0 #2563eb;
}

.complaint-draft-document-zone {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
    padding: 14px;
    border: 1px solid #d9e2ef;
    border-radius: 8px;
    background: #fff;
}

.complaint-draft-doc-cards {
    display: grid;
    grid-template-columns: repeat(6, minmax(150px, 1fr));
    gap: 10px;
}

.complaint-draft-doc-card {
    display: grid;
    gap: 5px;
    min-height: 88px;
    padding: 11px 12px;
}

.complaint-draft-doc-card[hidden] {
    display: none;
}

.complaint-draft-mode-guidance {
    margin: 0 0 12px;
    padding: 10px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: #1e40af;
}

.complaint-draft-intake-plan {
    display: grid;
    gap: 10px;
    margin: 0 0 12px;
    padding: 12px;
    border: 1px solid #d9e2ef;
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
    font-size: 13px;
}

.complaint-draft-intake-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.complaint-draft-intake-head strong,
.complaint-draft-intake-group strong {
    color: #0f172a;
}

.complaint-draft-intake-head span {
    padding: 2px 8px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #075985;
    white-space: nowrap;
}

.complaint-draft-intake-group ul {
    margin: 6px 0 0 18px;
    padding: 0;
    line-height: 1.6;
}

.complaint-draft-actions-row--intake {
    margin: -2px 0 12px;
}

.complaint-draft-grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.85fr) minmax(340px, 1fr) minmax(360px, 1.05fr);
    gap: 16px;
    align-items: start;
}

.complaint-draft-panel {
    background: #fff;
    border: 1px solid #d9e2ef;
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.complaint-draft-panel-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
}

.complaint-draft-panel-head h2 {
    margin: 0;
    font-size: 18px;
    color: #111827;
}

.complaint-draft-panel-head span,
.complaint-draft-empty,
.complaint-draft-notice {
    color: #64748b;
    font-size: 13px;
}

.complaint-draft-label,
.complaint-draft-form-grid label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: #374151;
    font-weight: 700;
}

.complaint-draft-panel input,
.complaint-draft-panel textarea {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 10px 11px;
    font: inherit;
    line-height: 1.5;
    color: #111827;
    background: #fff;
}

.complaint-draft-panel textarea {
    resize: vertical;
}

.complaint-draft-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.complaint-draft-form-grid .wide {
    grid-column: 1 / -1;
}

.complaint-draft-upload {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 72px;
    margin: 14px 0;
    border: 1px dashed #94a3b8;
    border-radius: 8px;
    background: #f8fafc;
    cursor: pointer;
    color: #1d4ed8;
    font-weight: 800;
}

.complaint-draft-upload input {
    display: none;
}

.complaint-draft-material-list {
    display: grid;
    gap: 8px;
    min-height: 34px;
}

.complaint-draft-material-item {
    display: grid;
    gap: 3px;
    padding: 9px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #f8fafc;
}

.complaint-draft-material-item strong {
    color: #111827;
    font-size: 13px;
}

.complaint-draft-material-item span {
    color: #64748b;
    font-size: 12px;
}

.complaint-draft-missing {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
    color: #92400e;
    font-size: 13px;
}

.complaint-draft-missing span {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    background: #fef3c7;
}

.complaint-draft-missing .ok {
    color: #047857;
    background: #dcfce7;
}

.complaint-draft-preview {
    min-height: 530px;
    max-height: 68vh;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 12px 0;
    padding: 16px;
    border: 1px solid #d9e2ef;
    border-radius: 8px;
    background: #fbfdff;
    color: #111827;
    font: 14px/1.8 "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

.complaint-draft-status {
    min-height: 22px;
    color: #475569;
    font-size: 13px;
}

.complaint-draft-status[data-tone="ok"] {
    color: #047857;
}

.complaint-draft-status[data-tone="warn"] {
    color: #92400e;
}

.complaint-draft-status[data-tone="error"] {
    color: #b91c1c;
}

.complaint-draft-entry-card {
    border: 1px solid #bfdbfe;
    background: #eff6ff;
}

.complaint-draft-entry-card .quick-label {
    background: #2563eb;
    color: #fff;
}

.tools-draft-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
}

.tools-draft-entry strong {
    color: #1e3a8a;
}

.tools-draft-entry span {
    color: #475569;
    font-size: 13px;
}

.tools-draft-entry a,
.ai-entry-card--native {
    text-decoration: none;
}

@media (max-width: 1180px) {
    .complaint-draft-grid {
        grid-template-columns: 1fr;
    }

    .complaint-draft-doc-cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .complaint-draft-preview {
        min-height: 360px;
        max-height: none;
    }
}

@media (max-width: 720px) {
    .complaint-draft-shell {
        padding: 16px 12px 36px;
    }

    .complaint-draft-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .complaint-draft-toolbar h1 {
        font-size: 28px;
    }

    .tools-draft-entry {
        align-items: stretch;
        flex-direction: column;
    }

    .complaint-draft-mode-bar,
    .complaint-draft-doc-cards {
        grid-template-columns: 1fr;
    }

    .complaint-draft-category-tabs button,
    .complaint-draft-case-tabs button,
    .complaint-draft-preview-tabs button,
    .complaint-draft-actions-row button,
    .complaint-draft-primary,
    .complaint-draft-secondary {
        width: 100%;
        white-space: normal;
    }

    .complaint-draft-form-grid {
        grid-template-columns: 1fr;
    }
}

/* 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 {
        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 {
        width: 100%;
        max-width: none;
    }
    .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;
    }
    .page-ad-slot .page-ad-card {
        min-height: 108px;
    }
    .page-ad-slot .page-ad-card.sponsor-content-link {
        gap: 10px;
        padding: 12px;
    }
    .page-ad-slot .page-ad-card .sponsor-video-thumb {
        width: 112px;
        min-width: 112px;
        max-width: 112px;
    }
    .page-ad-slot .page-ad-card-copy {
        gap: 4px;
    }
    .page-ad-slot .page-ad-card-desc {
        -webkit-line-clamp: 3;
    }
    .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;
    }
    .ai-entry-head .ad-label {
        margin-left: 0;
    }
    .ai-entry-logo {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }
    .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,
    .deadlines-page .deadline-filter-row--tertiary {
        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: 88px;
        min-width: 76px;
        max-width: 96px;
    }
    .deadline-combobox-listbox {
        max-height: min(240px, 38vh);
    }
    .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;
        padding-right: 72px;
    }
    .tool-card-head {
        grid-template-columns: 38px minmax(0, 1fr) auto;
        gap: 7px;
    }
    .tool-card-icon {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }
    .tool-card-title {
        min-width: 0;
    }
    .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,
    .guardian-lawyer-page .footer-inner {
        flex-direction: column;
        gap: 18px;
        padding: 28px 16px 20px;
    }
    .tools-page .footer-about,
    .tools-page .footer-col,
    .guardian-lawyer-page .footer-about,
    .guardian-lawyer-page .footer-col {
        min-width: 0;
        width: 100%;
    }
    .tools-page .footer-col a,
    .tools-page .footer-about p,
    .guardian-lawyer-page .footer-col a,
    .guardian-lawyer-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 {
        max-width: 96px;
    }
}
@media (max-width: 480px) {
    .search-box {
        flex-direction: row;
        width: 100%;
        max-width: none;
        min-height: 44px;
    }
    .search-box input {
        min-width: 0;
        border-right: none;
        border-radius: 10px 0 0 10px;
        padding: 0 12px;
        font-size: 14px;
    }
    .search-box button {
        flex: 0 0 72px;
        width: 72px;
        min-height: 44px;
        padding: 0;
        border-radius: 0 10px 10px 0;
        font-size: 14px;
    }
    .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 {
        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 36px;
    gap: 4px;
    cursor: pointer;
    min-height: 84px;
}
.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 4px;
    border-radius: 3px;
    font-weight: 600;
    line-height: 14px;
}
.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: min(420px, calc(100vw - 24px));
    max-height: calc(100dvh - 32px);
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    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;
    position: sticky;
    top: 0;
    width: 100%;
    flex-shrink: 0;
    z-index: 2;
}
.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;
    margin-right: -4px;
}
.login-tab-bar {
    display: flex;
    border-bottom: 1px solid var(--border);
    background: #fafbfc;
    position: sticky;
    top: 72px;
    z-index: 2;
}
.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;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
#forgotConfirmFields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
#loginTabForgot .login-form {
    gap: 12px;
}
#loginTabForgot .login-panel-intro {
    margin-bottom: 0;
}
#loginTabForgot .login-panel-desc {
    line-height: 1.55;
}
.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-wx-entry {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    border: 1px solid #bce8cf;
    border-radius: 10px;
    background: #f0fff6;
    color: #087a3a;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.login-wx-entry:hover {
    background: #e3faee;
    border-color: #87d9a5;
}
.login-wx-entry-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #07c160;
    color: #fff;
    font-size: 13px;
    line-height: 1;
}
.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-frame {
    width: 246px;
    height: 246px;
    margin: 0 auto 16px;
    border: 0;
    border-radius: 0;
    background: transparent;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.login-qr-frame iframe {
    width: 300px;
    height: 340px;
    border: 0;
    flex: 0 0 300px;
    position: absolute;
    top: 0;
    left: 50%;
    margin-left: -150px;
    transform: translateY(-25px) scale(0.82);
    transform-origin: top center;
}
.wx-login-preload-host {
    position: fixed;
    left: -10000px;
    top: 0;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
}
.login-qr-loading,
.login-qr-config-note {
    padding: 18px;
    color: var(--text-sec);
    font-size: 13px;
    line-height: 1.6;
}
.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-wx-fallback {
    margin-top: 14px;
}
.login-wx-auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 18px;
    border-radius: 8px;
    background: #07c160;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}
.login-wx-auth-btn:hover {
    background: #06ad56;
    color: #fff;
}
.login-qr-panel {
    padding: 22px 24px 28px;
    text-align: center;
}
.login-step2-panel {
    padding: 24px;
    text-align: center;
}
.login-role-prompt {
    margin-bottom: 14px;
    color: var(--text-main);
    font-size: 16px;
    font-weight: 600;
    text-align: left;
}
.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-card.is-selected {
    border-color: #07c160;
    background: #ecfdf5;
    box-shadow: 0 0 0 3px rgba(7, 193, 96, 0.12);
}

.login-qr-role-choice {
    margin-bottom: 16px;
}

.login-qr-role-title {
    margin-bottom: 10px;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 600;
}

.login-qr-role-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.login-role-card {
    padding: 14px 10px;
}

.role-select-label {
    font-size: 13px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .login-modal-card {
        width: min(100%, calc(100vw - 16px));
        max-height: calc(100dvh - 16px);
        border-radius: 14px;
    }
    .login-modal-header {
        padding: 16px 18px;
    }
    .login-tab-bar {
        top: 60px;
    }
    .login-tab {
        padding: 12px 10px;
        font-size: 13px;
    }
    .login-panel {
        padding: 20px 18px 18px;
    }
    .login-form {
        gap: 12px;
    }
    .login-input {
        padding: 12px 14px;
        font-size: 14px;
    }
    .login-btn-primary,
    .login-btn-success,
    .login-btn-warning {
        padding: 13px;
        font-size: 15px;
    }
    .login-panel-icon {
        font-size: 30px;
        margin-bottom: 4px;
    }
    .login-panel-desc {
        line-height: 1.6;
    }
}
.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-identity {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.hotline-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hotline-icon svg {
    width: 40px;
    height: 40px;
    display: block;
}

.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-board-switch,
.forum-section-choice,
.forum-assistant-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.forum-board-switch {
    margin-top: 18px;
}

.forum-board-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 8px 13px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--card);
    color: var(--text-sec);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.forum-board-btn:hover,
.forum-board-btn.active {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.forum-section-choice {
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fafbfc;
}

.forum-section-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--text-sec);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.forum-section-option input {
    accent-color: var(--primary);
}

.forum-section-option.is-active {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

.forum-section-option.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.forum-section-option.is-disabled input,
.forum-section-option.is-disabled span {
    cursor: not-allowed;
}

.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-btn.is-loading {
    position: relative;
    cursor: wait;
}

.forum-btn-secondary.is-recording {
    border-color: #fed7aa;
    background: #fff7ed;
    color: #c2410c;
}

.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;
}

.forum-keyword-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 0;
}

.forum-keyword-chip {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}

.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-confirm-check {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    color: var(--text-sec);
    font-size: 13px;
    line-height: 1.4;
}

.forum-confirm-check input {
    accent-color: var(--primary);
}

.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-section-tag,
.forum-status-tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
}

.forum-section-tag-practice {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #bbf7d0;
}

.forum-section-tag-question {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.forum-status-tag {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
}

.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%;
    }

    .forum-section-choice,
    .forum-assistant-actions,
    .forum-confirm-check {
        align-items: stretch;
    }

    .forum-section-option,
    .forum-assistant-actions .forum-btn {
        width: 100%;
    }
}

/* ==========================================================================
   Guardian Prototype
   ========================================================================== */
.guardian-strip {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
    min-width: 0;
    width: max-content;
    max-width: 100%;
    margin-left: auto;
    overflow: visible;
    flex: 0 0 auto;
}

.guardian-strip-avatars {
    display: flex;
    align-items: flex-end;
    gap: 0;
    min-width: max-content;
    width: max-content;
    max-width: none;
    flex-wrap: nowrap;
    overflow: visible;
}

.guardian-avatar-link,
.guardian-avatar-trigger {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    line-height: normal;
    outline: none;
    flex-shrink: 0;
}

.guardian-avatar-link {
    border: 0;
}

.guardian-avatar-link[data-guardian-profile-url] {
    width: 18px;
    height: 26px;
}

.guardian-avatar-trigger.guardian-avatar-trigger--framed {
    width: 18px;
    height: 26px;
}

.guardian-strip .guardian-avatar-face,
.guardian-primary-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: #ffffff;
    color: #0f172a;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.guardian-avatar-face,
.guardian-primary-avatar,
.guardian-lawyer-avatar {
    overflow: hidden;
}

.guardian-strip .guardian-avatar-face {
    width: 16px;
    height: 16px;
    font-size: 8px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    position: relative;
    z-index: 1;
}

.guardian-avatar-face--apply-slot {
    border: 1px dashed rgba(148, 163, 184, 0.8);
    background: #f8fafc;
    color: var(--primary);
    font-size: 12px;
    font-weight: 500;
    box-shadow: none;
}

.guardian-avatar-link .guardian-avatar-frame,
.guardian-avatar-trigger .guardian-avatar-frame {
    position: absolute;
    inset: 0;
    background-image: var(--guardian-rank-frame-image);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
    z-index: 2;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.guardian-avatar-link .guardian-avatar-face,
.guardian-avatar-trigger .guardian-avatar-frame + .guardian-avatar-face {
    position: absolute;
    top: 11px;
    left: 50%;
    transform: translateX(-50%);
    width: 13px;
    height: 13px;
    font-size: 8px;
    border: 0;
    box-shadow: none;
    background: transparent;
    color: #64748b;
    clip-path: circle(50% at 50% 50%);
}

.guardian-avatar-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 999px;
    display: block;
}

.guardian-avatar-trigger:hover .guardian-avatar-face,
.guardian-avatar-trigger:focus-visible .guardian-avatar-face {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.14);
}

.guardian-avatar-link:hover .guardian-avatar-frame,
.guardian-avatar-link:focus-visible .guardian-avatar-frame,
.guardian-avatar-trigger:hover .guardian-avatar-frame,
.guardian-avatar-trigger:focus-visible .guardian-avatar-frame {
    transform: translateY(-1px);
    filter: drop-shadow(0 4px 10px rgba(15, 23, 42, 0.08));
}

.guardian-avatar-link:hover .guardian-avatar-face,
.guardian-avatar-link:focus-visible .guardian-avatar-face,
.guardian-avatar-trigger:hover .guardian-avatar-frame + .guardian-avatar-face,
.guardian-avatar-trigger:focus-visible .guardian-avatar-frame + .guardian-avatar-face {
    transform: translate(-50%, -1px);
    box-shadow: none;
}

.guardian-primary-avatar.guardian-avatar--gold {
    border-color: rgba(217, 119, 6, 0.58);
    box-shadow: 0 0 0 2px rgba(253, 224, 71, 0.34), 0 2px 6px rgba(217, 119, 6, 0.12);
}

.guardian-primary-avatar.guardian-avatar--silver {
    border-color: rgba(148, 163, 184, 0.74);
    box-shadow: 0 0 0 2px rgba(226, 232, 240, 0.6), 0 2px 6px rgba(100, 116, 139, 0.12);
}

.guardian-primary-avatar.guardian-avatar--bronze {
    border-color: rgba(180, 83, 9, 0.7);
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.24), 0 2px 6px rgba(154, 52, 18, 0.14);
}

.guardian-avatar-stack {
    display: inline-flex;
    align-items: flex-end;
    flex-wrap: nowrap;
    gap: 2px;
    margin-left: 1px;
    isolation: isolate;
    min-width: max-content;
    width: max-content;
    max-width: none;
}

.guardian-avatar-track > * {
    position: relative;
    flex-shrink: 0;
}

.guardian-lawyer-avatar .guardian-avatar-photo {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
    display: block;
}

.guardian-strip[data-guardian-layout="spread"] .guardian-avatar-stack {
    gap: 2px;
}

.guardian-strip[data-guardian-layout="compact"] .guardian-avatar-stack {
    flex-wrap: nowrap;
    gap: 0;
}

.guardian-strip[data-guardian-layout="compact"] .guardian-avatar-stack > * + * {
    margin-left: -5px;
}

.guardian-strip[data-guardian-layout="compact"] .guardian-avatar-link[data-guardian-profile-url],
.guardian-strip[data-guardian-layout="compact"] .guardian-avatar-trigger,
.guardian-strip[data-guardian-layout="compact"] .guardian-more-trigger {
    transform: translateZ(0);
}

.guardian-avatar-stack .guardian-avatar-trigger {
    z-index: 1;
}

.guardian-avatar-stack .guardian-avatar-trigger .guardian-avatar-face {
    opacity: 0.9;
}

.guardian-avatar-stack .guardian-avatar-trigger:hover,
.guardian-avatar-stack .guardian-avatar-trigger:focus-visible {
    z-index: 10;
}

.guardian-avatar-stack .guardian-avatar-trigger:hover .guardian-avatar-face,
.guardian-avatar-stack .guardian-avatar-trigger:focus-visible .guardian-avatar-face {
    opacity: 1;
}

.guardian-more-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 16px;
    padding: 0 4px;
    margin-left: 2px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 999px;
    background: #f8fafc;
    color: #64748b;
    font-size: 9px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    position: relative;
    z-index: 8;
    flex-shrink: 0;
}

.guardian-more-trigger:hover,
.guardian-more-trigger:focus-visible {
    background: #eff6ff;
    color: #1d4ed8;
    z-index: 11;
}

.guardian-deadline-footer {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    width: 100%;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    position: relative;
    z-index: 2;
}

.guardian-deadline-rules {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    justify-content: flex-start;
    gap: 3px;
    color: #94a3b8;
    font-size: 10.5px;
    line-height: 1.35;
    min-width: 0;
    max-width: 100%;
}

.guardian-deadline-rule-line {
    display: block;
    margin: 0;
    min-width: 0;
}

.guardian-deadline-rule-heading {
    color: #64748b;
    font-weight: 600;
}

.tool-card .guardian-deadline-footer {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 6px;
}

.tool-card .guardian-deadline-rules {
    gap: 2px;
    font-size: 10px;
    line-height: 1.35;
    opacity: 0.84;
}

.tool-card .guardian-strip {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    justify-self: end;
    align-self: end;
    width: max-content;
    max-width: 100%;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.tool-card .guardian-strip-avatars {
    justify-content: flex-end;
    width: auto;
    min-width: max-content;
}

.tool-card .guardian-avatar-link .guardian-avatar-frame {
    opacity: 1;
    filter: none;
}

.tool-card .guardian-avatar-trigger.guardian-avatar-trigger--framed .guardian-avatar-frame {
    opacity: 1;
    filter: none;
}

.tool-card .guardian-avatar-link:hover .guardian-avatar-face,
.tool-card .guardian-avatar-link:focus-visible .guardian-avatar-face,
.tool-card .guardian-avatar-trigger:hover .guardian-avatar-face,
.tool-card .guardian-avatar-trigger:focus-visible .guardian-avatar-face {
    transform: none;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.tool-card .guardian-avatar-link:hover .guardian-avatar-frame,
.tool-card .guardian-avatar-link:focus-visible .guardian-avatar-frame {
    transform: none;
    filter: none;
}

.tool-card .guardian-avatar-trigger.guardian-avatar-trigger--framed:hover .guardian-avatar-frame,
.tool-card .guardian-avatar-trigger.guardian-avatar-trigger--framed:focus-visible .guardian-avatar-frame {
    transform: none;
    filter: none;
}

.tool-card .guardian-avatar-link:hover .guardian-avatar-face,
.tool-card .guardian-avatar-link:focus-visible .guardian-avatar-face {
    transform: translate(-50%, 0);
    box-shadow: none;
}

.tool-card .guardian-avatar-trigger.guardian-avatar-trigger--framed:hover .guardian-avatar-frame + .guardian-avatar-face,
.tool-card .guardian-avatar-trigger.guardian-avatar-trigger--framed:focus-visible .guardian-avatar-frame + .guardian-avatar-face {
    transform: translate(-50%, 0);
    box-shadow: none;
}

article.deadline-card[data-deadline-id] > .guardian-deadline-footer {
    grid-column: 1 / -1;
}

article.deadline-card[data-deadline-id] .guardian-strip {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    justify-self: end;
    align-self: end;
    width: max-content;
    max-width: 100%;
    margin-left: auto;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.deadline-card[data-deadline-id] .guardian-strip-avatars {
    justify-content: flex-end;
    min-width: max-content;
    width: auto;
    max-width: 100%;
}

.guardian-popover {
    position: absolute;
    z-index: 220;
    width: min(320px, calc(100vw - 24px));
    padding: 14px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}

.guardian-popover[hidden] {
    display: none;
}

.guardian-popover-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.guardian-popover-close:hover {
    background: #e2e8f0;
}

.guardian-popover-kicker,
.guardian-panel-kicker,
.guardian-primary-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: #334155;
    font-size: 12px;
    font-weight: 600;
}

.guardian-primary-meta,
.guardian-secondary-main {
    display: flex;
    align-items: center;
    gap: 8px;
}

.guardian-primary strong,
.guardian-secondary-name {
    color: #0f172a;
    font-size: 14px;
    line-height: 1.3;
}

.guardian-primary-rank {
    color: #64748b;
    font-size: 12px;
}

.guardian-popover-role,
.guardian-primary p,
.guardian-primary-note,
.guardian-secondary-meta,
.guardian-panel-head p,
.guardian-panel-foot p {
    color: #64748b;
    font-size: 12px;
    line-height: 1.5;
}

.guardian-popover-role {
    margin: 6px 0 10px;
}

.guardian-popover-note {
    margin-top: 12px;
    color: #64748b;
    font-size: 12px;
}

.guardian-share-sheet {
    position: fixed;
    inset: 0;
    z-index: 260;
}

.guardian-share-sheet[hidden] {
    display: none;
}

.guardian-share-sheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
}

.guardian-share-sheet__card {
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    width: min(420px, calc(100vw - 24px));
    max-height: min(86vh, 720px);
    overflow-y: auto;
    padding: 18px 16px 16px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 22px 54px rgba(15, 23, 42, 0.24);
}

.guardian-share-sheet__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.guardian-share-sheet__close:hover,
.guardian-share-sheet__close:focus-visible {
    background: #e2e8f0;
}

.guardian-share-sheet__head {
    padding-right: 34px;
}

.guardian-share-sheet__title {
    display: block;
    color: #0f172a;
    font-size: 18px;
    line-height: 1.3;
}

.guardian-share-sheet__subtitle {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.6;
}

.guardian-share-sheet__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.guardian-share-sheet__action {
    display: grid;
    justify-items: center;
    gap: 8px;
    min-height: 96px;
    padding: 12px 10px;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background: #f8fbff;
    color: #0f172a;
    cursor: pointer;
}

.guardian-share-sheet__action:hover,
.guardian-share-sheet__action:focus-visible {
    border-color: #93c5fd;
    background: #eff6ff;
}

.guardian-share-sheet__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #dcfce7;
    color: #166534;
    font-size: 16px;
    font-weight: 700;
}

.guardian-share-sheet__label {
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    word-break: break-word;
}

.guardian-share-sheet__status {
    min-height: 20px;
    margin-top: 12px;
    color: #166534;
    font-size: 12px;
    line-height: 1.6;
}

.guardian-popover-list {
    display: grid;
    gap: 8px;
    margin: 0;
}

.guardian-popover-list div {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 8px;
}

.guardian-popover-list dt {
    color: #475569;
    font-size: 12px;
    font-weight: 600;
}

.guardian-popover-list dd {
    margin: 0;
    color: #0f172a;
    font-size: 12px;
}

.guardian-like-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px 8px;
    margin: 12px 0 0;
    padding: 0;
}

.guardian-like-grid-item {
    display: grid;
    justify-items: center;
    gap: 6px;
    min-width: 0;
}

.guardian-like-grid-avatar,
.guardian-like-grid-avatar-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
}

.guardian-like-grid-avatar .guardian-avatar-face,
.guardian-like-grid-avatar-button .guardian-avatar-face {
    width: 30px;
    height: 30px;
    font-size: 12px;
}

.guardian-like-grid-avatar-button .guardian-avatar-frame {
    position: absolute;
    inset: -3px;
    background-image: var(--guardian-rank-frame-image);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
}

.guardian-like-grid-avatar-button .guardian-avatar-face {
    position: relative;
    z-index: 1;
    border: 0;
    box-shadow: none;
}

.guardian-like-grid-avatar-button .guardian-avatar-frame + .guardian-avatar-face {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    font-size: 10px;
    transform: translate(-50%, -18%);
    clip-path: circle(50% at 50% 50%);
}

.guardian-like-grid-avatar-button--apply-slot .guardian-avatar-face {
    border: 1px dashed rgba(148, 163, 184, 0.8);
}

.guardian-like-grid-name {
    display: block;
    max-width: 100%;
    color: #475569;
    font-size: 11px;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tool-detail-guardian-sidebar {
    min-width: 0;
    margin-top: -6px;
    align-self: start;
}

.guardian-sidebar {
    display: grid;
    gap: 10px;
    padding: 10px 12px 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.guardian-sidebar-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.guardian-sidebar-head p {
    margin: 2px 0 0;
    color: #94a3b8;
    font-size: 12px;
    line-height: 1.5;
}

.guardian-sidebar-list {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.guardian-sidebar-item {
    display: grid;
    grid-template-columns: 28px 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 7px 8px;
    border-radius: 7px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
}

.guardian-sidebar-item:nth-child(1) {
    padding-top: 0;
}

.guardian-sidebar-item:nth-child(-n + 3) {
    border-bottom-color: rgba(226, 232, 240, 0.92);
}

.guardian-sidebar-item:nth-child(1) {
    background: linear-gradient(90deg, rgba(254, 249, 195, 0.34), rgba(255, 255, 255, 0));
}

.guardian-sidebar-item:nth-child(2) {
    background: linear-gradient(90deg, rgba(241, 245, 249, 0.92), rgba(255, 255, 255, 0));
}

.guardian-sidebar-item:nth-child(3) {
    background: linear-gradient(90deg, rgba(255, 237, 213, 0.38), rgba(255, 255, 255, 0));
}

.guardian-sidebar-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.guardian-sidebar-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    min-height: 20px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}

.guardian-sidebar-item:nth-child(1) .guardian-sidebar-rank {
    background: #fef3c7;
    color: #92400e;
}

.guardian-sidebar-item:nth-child(2) .guardian-sidebar-rank {
    background: #e2e8f0;
    color: #475569;
}

.guardian-sidebar-item:nth-child(3) .guardian-sidebar-rank {
    background: #fed7aa;
    color: #9a3412;
}

.guardian-sidebar-avatar-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.guardian-sidebar-avatar-link,
.guardian-sidebar-avatar-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.guardian-sidebar-frame {
    position: absolute;
    inset: 0;
    background-image: var(--guardian-rank-frame-image);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.guardian-sidebar-avatar-face {
    width: 22px;
    height: 22px;
    font-size: 10px;
}

.guardian-sidebar-avatar-face--apply-slot {
    border: 1px dashed rgba(148, 163, 184, 0.8);
    background: #f8fafc;
    color: var(--primary);
    font-size: 16px;
    font-weight: 500;
    box-shadow: none;
}

.guardian-sidebar-avatar-link .guardian-sidebar-avatar-face {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    font-size: 8px;
    clip-path: circle(50% at 50% 50%);
}

.guardian-sidebar-avatar-button .guardian-sidebar-frame + .guardian-sidebar-avatar-face {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    font-size: 8px;
    clip-path: circle(50% at 50% 50%);
}

.guardian-sidebar-main {
    min-width: 0;
}

.guardian-sidebar-name {
    display: block;
    color: #334155;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
}

.guardian-sidebar-meta {
    margin: 1px 0 0;
    color: #64748b;
    font-size: 11px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.guardian-sidebar-score {
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
}

.guardian-sidebar-item:nth-child(-n + 3) .guardian-sidebar-score {
    color: #475569;
}

.guardian-sidebar-rules {
    display: grid;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(226, 232, 240, 0.85);
}

.guardian-sidebar-note-block {
    display: grid;
    gap: 4px;
}

.guardian-sidebar-note-block:has(.guardian-share-button) {
    justify-items: center;
}

.guardian-share-button {
    justify-self: center;
    min-width: min(100%, 224px);
    padding-inline: 12px;
    border-color: #dbeafe;
    background: #f8fbff;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
}

.guardian-share-button:hover,
.guardian-share-button:focus-visible {
    background: #eff6ff;
    color: #1d4ed8;
}

.guardian-popover-actions {
    display: grid;
    justify-items: center;
    gap: 6px;
    margin-top: 10px;
}

.guardian-overview-link {
    color: #64748b;
    font-size: 12px;
    line-height: 1.5;
    text-decoration: none;
}

.guardian-overview-link:hover,
.guardian-overview-link:focus-visible {
    color: #1d4ed8;
    text-decoration: underline;
}

.guardian-overview-action-link {
    display: inline-flex;
    margin-top: 8px;
    color: #1d4ed8;
    font-weight: 700;
}

.guardian-sidebar-note-label {
    color: #0f172a;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
}

.guardian-sidebar-note-list {
    margin: 0;
    padding-left: 16px;
    color: #64748b;
}

.guardian-sidebar-note-list li {
    font-size: 12px;
    line-height: 1.6;
}

.guardian-panel {
    margin: 16px 0 20px;
    padding: 16px;
    background: #fbfdff;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
}

.guardian-panel-head,
.guardian-primary,
.guardian-panel-foot {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.guardian-panel-head {
    margin-bottom: 14px;
}

.guardian-panel-head h3 {
    margin: 8px 0 0;
    font-size: 18px;
    line-height: 1.3;
    color: #0f172a;
}

.guardian-primary {
    padding: 14px;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 8px;
}

.guardian-primary-avatar {
    width: 48px;
    height: 48px;
    font-size: 18px;
}

.guardian-primary-body {
    flex: 1;
    min-width: 0;
}

.guardian-primary p,
.guardian-primary-note {
    margin-top: 6px;
}

.guardian-secondary-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.guardian-secondary-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 10px;
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 8px;
}

.guardian-secondary-rank {
    color: #0f172a;
    font-size: 12px;
    font-weight: 700;
}

.guardian-secondary-meta {
    grid-column: 1 / -1;
}

.guardian-panel-foot {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.guardian-panel-foot p {
    margin: 0;
}

.guardian-lawyer-layout,
.guardian-lawyer-hero,
.guardian-lawyer-section {
    max-width: 980px;
    margin: 0 auto 16px;
}

.guardian-lawyer-page {
    background: #eef2f6;
    color: #1D2129;
}

.guardian-lawyer-layout,
.guardian-lawyer-section {
    max-width: 1180px;
    margin: 0 auto;
}

.guardian-lawyer-layout {
    display: grid;
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
    gap: 0;
    align-items: stretch;
    padding: 40px 20px 0;
}

.guardian-lawyer-sidebar {
    position: relative;
    z-index: 1;
    min-width: 0;
    padding: 56px 28px 40px;
    background: #10274c;
    color: #ffffff;
    border-radius: 24px 0 0 24px;
}

.guardian-lawyer-sidebar-inner {
    display: grid;
    gap: 14px;
    max-width: 190px;
    min-height: 100%;
    align-content: start;
}

.guardian-lawyer-main {
    position: relative;
    z-index: 3;
    min-width: 0;
    padding-bottom: 32px;
}

.guardian-lawyer-hero {
    position: relative;
    z-index: 4;
    min-width: 0;
    margin-left: -48px;
    padding: 36px 48px 28px 104px;
    background: #ffffff;
    border-radius: 30px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.guardian-lawyer-avatar-wrap {
    position: absolute;
    top: 42px;
    left: -64px;
    z-index: 6;
    display: grid;
    justify-items: center;
    gap: 8px;
}

.guardian-lawyer-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 128px;
    height: 128px;
    border-radius: 999px;
    background: #165DFF;
    color: #ffffff;
    font-size: 42px;
    font-weight: 700;
    border: 6px solid #ffffff;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.16);
    flex-shrink: 0;
}

.guardian-lawyer-kicker,
.guardian-lawyer-badge,
.guardian-lawyer-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.guardian-lawyer-kicker {
    width: fit-content;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.9);
}

.guardian-lawyer-sidebar h1,
.guardian-lawyer-section h2,
.guardian-lawyer-info-card h2 {
    margin: 0;
    color: #1D2129;
}

.guardian-lawyer-sidebar h1 {
    color: #ffffff;
    font-size: 32px;
    line-height: 1.15;
}

.guardian-lawyer-badge-row,
.guardian-lawyer-cta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.guardian-lawyer-badge--verified {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.guardian-lawyer-badge--honor {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.78);
}

.guardian-lawyer-sidebar-meta {
    max-width: 100%;
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.guardian-lawyer-sidebar-facts {
    display: grid;
    gap: 8px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 12px;
    line-height: 1.55;
}

.guardian-lawyer-sidebar-facts div {
    display: grid;
    gap: 2px;
}

.guardian-lawyer-sidebar-facts dt,
.guardian-lawyer-sidebar-facts dd {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

.guardian-lawyer-sidebar-facts dt {
    color: rgba(255, 255, 255, 0.62);
}

.guardian-lawyer-sidebar-facts dd {
    color: rgba(255, 255, 255, 0.9);
}

.guardian-lawyer-fact-label {
    color: rgba(255, 255, 255, 0.62);
    font-size: 12px;
    line-height: 1.45;
}

.guardian-lawyer-fact-value {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    color: #ffffff;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.5;
    flex-wrap: wrap;
}

.guardian-lawyer-fact-value span:first-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

.guardian-lawyer-fact-verify {
    position: relative;
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background: linear-gradient(180deg, #7dc9ff 0%, #165dff 100%);
    box-shadow: 0 2px 6px rgba(22, 93, 255, 0.28);
    cursor: help;
}

.guardian-lawyer-fact-verify::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 3px;
    width: 4px;
    height: 7px;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    transform: rotate(45deg);
}

.guardian-lawyer-fact-verify::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    z-index: 20;
    min-width: 82px;
    padding: 5px 8px;
    border-radius: 6px;
    background: rgba(29, 33, 41, 0.94);
    color: #ffffff;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    text-align: center;
    white-space: nowrap;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 4px);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.guardian-lawyer-fact-verify:hover::after,
.guardian-lawyer-fact-verify:focus-visible::after {
    opacity: 1;
    transform: translate(-50%, 0);
}

.guardian-lawyer-context-link {
    width: fit-content;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 13px;
}

.guardian-lawyer-topbar {
    display: flex;
    align-items: center;
    min-height: 40px;
    margin-bottom: 18px;
}

.guardian-lawyer-meta,
.guardian-lawyer-summary,
.guardian-lawyer-inline-state,
.guardian-lawyer-context-note,
.guardian-lawyer-empty,
.guardian-lawyer-service-list li,
.guardian-lawyer-record-list li,
.guardian-lawyer-tag-meta span,
.guardian-lawyer-case-list li {
    color: #86909C;
    font-size: 14px;
    line-height: 1.7;
}

.guardian-lawyer-meta {
    margin: 0;
    color: #718096;
}

.guardian-lawyer-profile-grid,
.guardian-lawyer-content-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

.guardian-lawyer-info-card {
    min-width: 0;
}

.guardian-lawyer-info-card--credentials,
.guardian-lawyer-info-card--specialty,
.guardian-lawyer-info-card--intro,
.guardian-lawyer-info-card--cases,
.guardian-lawyer-info-card--tags,
.guardian-lawyer-footer-col {
    display: flex;
    flex-direction: column;
}

.guardian-lawyer-info-card h2 {
    margin-bottom: 14px;
    font-size: 18px;
    line-height: 1.3;
    color: #1D2129;
}

.guardian-lawyer-credential-list,
.guardian-lawyer-case-list,
.guardian-lawyer-record-list,
.guardian-lawyer-service-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.guardian-lawyer-credential-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.guardian-lawyer-credential-list li {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    background: #F5F7FA;
    color: #253044;
    font-size: 13px;
    font-weight: 600;
}

.guardian-lawyer-specialty-primary {
    margin: 0 0 14px;
    color: #1D2129;
    font-size: 32px;
    line-height: 1.2;
    font-weight: 700;
}

.guardian-lawyer-specialty-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0;
}

.guardian-lawyer-specialty-tags span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    min-width: 112px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid rgba(16, 39, 76, 0.16);
    background: #ffffff;
    color: #10274c;
    font-size: 13px;
    font-weight: 600;
}

.guardian-lawyer-section-divider {
    height: 1px;
    margin: 30px 0 24px;
    background: rgba(148, 163, 184, 0.22);
}

.guardian-lawyer-summary {
    margin: 0;
    max-width: 34ch;
}

.guardian-lawyer-summary + .guardian-lawyer-summary,
.guardian-lawyer-context-note,
.guardian-lawyer-inline-state {
    margin-top: 10px;
}

.guardian-lawyer-summary--secondary {
    color: #6b7280;
}

.guardian-lawyer-case-block {
    min-height: 100%;
}

.guardian-lawyer-case-list {
    display: grid;
    gap: 10px;
}

.guardian-lawyer-case-list li {
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8fafc;
    color: #253044;
}

.guardian-lawyer-case-empty {
    color: #8a94a6;
}

.guardian-lawyer-owner-entry {
    align-self: flex-start;
    max-width: 180px;
    margin-top: 10px;
    white-space: nowrap;
}

.guardian-lawyer-cta {
    min-height: 28px;
    padding: 0 12px;
    text-decoration: none;
    background: #f2f5f9;
    color: #4b5563;
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.guardian-lawyer-consult-entry {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: #10274c;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    border: 0;
    cursor: pointer;
}

.guardian-lawyer-consult-entry:hover {
    color: #ffffff;
    opacity: 0.94;
}

.guardian-lawyer-consult-entry--primary {
    width: fit-content;
    min-width: 78px;
    margin-top: 0;
}

.guardian-lawyer-consult-entry--disabled {
    background: #e5e7eb;
    color: #6b7280;
    box-shadow: none;
}

.guardian-lawyer-consult-entry--disabled:hover {
    color: #6b7280;
    opacity: 1;
}

.guardian-consult-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.guardian-consult-modal.is-open {
    display: flex;
}

.guardian-consult-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.36);
}

.guardian-consult-dialog {
    position: relative;
    z-index: 1;
    width: min(520px, 100%);
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.22);
    padding: 22px;
}

.guardian-consult-dialog h2 {
    margin: 0 0 8px;
    font-size: 20px;
    color: #111827;
}

.guardian-consult-target,
.guardian-consult-status {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.guardian-consult-dialog textarea {
    width: 100%;
    margin-top: 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 12px;
    resize: vertical;
    font-size: 15px;
    line-height: 1.6;
}

.guardian-consult-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
}

.guardian-consult-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: #f1f5f9;
    color: #475569;
    font-size: 18px;
    line-height: 28px;
    cursor: pointer;
}

.guardian-lawyer-consult-entry--jump {
    display: none;
}

.guardian-lawyer-section {
    margin-top: 18px;
    padding: 0 20px 28px;
}

.guardian-lawyer-section--muted {
    margin-left: -48px;
    padding: 18px 24px 22px;
    background: #f6f8fb;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 30px;
}

.guardian-lawyer-footer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.guardian-lawyer-footer-col {
    min-width: 0;
}

.guardian-lawyer-footer-col + .guardian-lawyer-footer-col {
    border-left: 1px solid rgba(148, 163, 184, 0.2);
    padding-left: 18px;
}

.guardian-lawyer-footer-col h2 {
    margin-bottom: 12px;
    color: #4b5563;
    font-size: 15px;
    line-height: 1.35;
}

.guardian-lawyer-service-list,
.guardian-lawyer-record-list {
    display: grid;
    gap: 8px;
}

.guardian-lawyer-tag-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.guardian-lawyer-tag-group + .guardian-lawyer-tag-group {
    margin-top: 16px;
}

.guardian-lawyer-tag-group-title {
    margin: 0 0 10px;
    color: #1D2129;
    font-size: 14px;
    font-weight: 700;
}

.guardian-lawyer-tag-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 12px;
    min-width: 0;
}

.guardian-lawyer-tag-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.guardian-lawyer-tag-head h3 {
    margin: 0;
    color: #253044;
    font-size: 14px;
    line-height: 1.5;
}

.guardian-lawyer-tag-title-link {
    color: inherit;
    text-decoration: none;
}

.guardian-lawyer-tag-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #10274c;
    text-decoration: none;
    white-space: nowrap;
    font-size: 12px;
}

.guardian-lawyer-tag-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.guardian-lawyer-tag-meta span {
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: #eef2f6;
}

.guardian-lawyer-owner-entry-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px 36px;
}

.profile-top-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    margin-left: 4px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    line-height: 1;
}

.profile-notification-list,
.profile-consultation-session-list,
.profile-consultation-message-list {
    display: grid;
    gap: 10px;
}

.profile-notification-item,
.profile-consultation-session,
.profile-consultation-message {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    padding: 14px;
}

.profile-notification-item.is-unread {
    border-color: #bfdbfe;
    background: #f8fbff;
}

.profile-notification-item__meta,
.profile-consultation-session__top,
.profile-consultation-message__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.profile-panel-title {
    margin: 8px 0 4px;
    font-size: 16px;
}

.profile-panel-desc {
    margin: 0;
    color: #475569;
    line-height: 1.7;
}

.profile-consultations-layout {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    gap: 16px;
}

.profile-consultation-session {
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.profile-consultation-session.is-active {
    border-color: #2563eb;
    background: #eff6ff;
}

.profile-consultation-session p,
.profile-consultation-message p {
    margin: 8px 0 0;
    color: #475569;
    line-height: 1.7;
}

.profile-consultation-thread {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px;
    background: #f8fafc;
}

.profile-consultation-message.is-self {
    background: #eef6ff;
}

.profile-consultation-reply-box {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.profile-textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 15px;
    line-height: 1.6;
    resize: vertical;
}

@media (max-width: 768px) {
    .guardian-strip {
        overflow-x: hidden;
        overflow-y: visible;
    }

    .guardian-strip[data-guardian-layout="compact"] .guardian-avatar-stack > * + * {
        margin-left: -6px;
    }

    .guardian-like-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .guardian-deadline-footer,
    .tool-card .guardian-deadline-footer {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .guardian-deadline-rules {
        grid-template-columns: 1fr;
        white-space: normal;
    }

    .guardian-panel {
        padding: 14px;
    }

    .guardian-panel-head,
    .guardian-primary,
    .guardian-panel-foot {
        flex-direction: column;
    }

    .guardian-secondary-list {
        grid-template-columns: 1fr;
    }

    .guardian-popover {
        width: calc(100vw - 20px);
    }

    .guardian-share-sheet__card {
        bottom: 10px;
        width: calc(100vw - 16px);
        padding: 16px 14px 14px;
        border-radius: 14px;
    }

    .guardian-share-sheet__actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .guardian-share-sheet__action {
        min-height: 88px;
        padding: 10px 8px;
    }

    .tool-detail-guardian-sidebar {
        margin-top: 0;
    }

    .guardian-lawyer-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        padding: 20px 12px 0;
    }

    .guardian-lawyer-sidebar {
        padding: 24px 18px 84px;
        border-radius: 22px 22px 0 0;
    }

    .guardian-lawyer-main {
        padding-bottom: 20px;
    }

    .guardian-lawyer-hero {
        margin: -56px 0 0;
        padding: 96px 20px 20px;
        border-radius: 24px;
    }

    .guardian-lawyer-avatar-wrap {
        top: -56px;
        left: 50%;
        transform: translateX(-50%);
    }

    .guardian-lawyer-profile-grid,
    .guardian-lawyer-content-grid,
    .guardian-lawyer-footer-grid,
    .guardian-lawyer-tag-grid {
        grid-template-columns: 1fr;
    }

    .guardian-lawyer-avatar {
        width: 112px;
        height: 112px;
        font-size: 36px;
    }

    .guardian-lawyer-sidebar h1 {
        font-size: 28px;
    }

    .guardian-lawyer-topbar,
    .guardian-lawyer-badge-row,
    .guardian-lawyer-cta-row {
        justify-content: center;
    }

    .guardian-lawyer-fact-value {
        font-size: 15px;
        gap: 6px;
    }

    .guardian-lawyer-fact-verify {
        width: 15px;
        height: 15px;
    }

    .guardian-lawyer-fact-verify::before {
        left: 5px;
        top: 2px;
    }

    .guardian-lawyer-specialty-primary {
        font-size: 26px;
    }

    .guardian-lawyer-summary {
        max-width: none;
    }

    .guardian-lawyer-cta {
        width: 100%;
    }

    .guardian-lawyer-section {
        padding: 0 12px 20px;
    }

    .guardian-lawyer-section--muted {
        margin-left: 0;
        padding: 18px 16px;
    }

    .guardian-lawyer-footer-col + .guardian-lawyer-footer-col {
        border-left: 0;
        border-top: 1px solid rgba(148, 163, 184, 0.2);
        padding-left: 0;
        padding-top: 14px;
    }

    .guardian-lawyer-owner-entry-shell {
        padding: 0 12px 28px;
    }

    .guardian-lawyer-consult-entry--jump {
        display: inline-flex;
        width: calc(100% - 24px);
        margin: 12px;
    }

    .deadline-card-main {
        grid-template-columns: minmax(68px, auto) minmax(0, 1fr);
    }
}

.profile-page-shell {
    max-width: 1100px;
    margin: 0 auto;
}

.profile-page-hero {
    text-align: left;
    padding: 24px 28px 18px;
}

.profile-page-hero__title-row {
    justify-content: flex-start;
    margin-bottom: 10px;
}

.profile-page-hero__title {
    font-size: 26px;
}

.profile-page-hero__lead,
.profile-section-intro,
.profile-muted {
    color: var(--text-sec);
    font-size: 13px;
    line-height: 1.6;
}

.profile-page-hero__lead,
.profile-section-intro {
    margin: 0 0 6px;
}

.profile-body,
.profile-section {
    display: grid;
    gap: 14px;
}

.profile-layout-with-sidebar {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    align-items: start;
    gap: 16px;
}

.profile-sidebar-panel {
    position: sticky;
    top: 64px;
    min-width: 0;
}

.profile-content-panel {
    min-width: 0;
    display: grid;
    gap: 14px;
}

.profile-sidebar-panel .cat-card {
    overflow: hidden;
    border-radius: 0 0 14px 14px;
    min-height: calc(100vh - 76px);
    display: flex;
    flex-direction: column;
}

.profile-sidebar-panel .profile-page-hero {
    padding: 0;
}

.profile-sidebar-panel .profile-page-hero__title-row,
.profile-sidebar-panel .profile-page-hero__lead {
    display: none;
}

.profile-sidebar-panel .profile-page-hero__title {
    font-size: 18px;
}

.profile-sidebar-panel .profile-page-hero__lead {
    margin-bottom: 12px;
    font-size: 12px;
}

.profile-workbench {
    gap: 16px;
}

.profile-workbench-nav {
    display: grid;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #f8fafc;
}

.profile-workbench-nav__title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
}

.profile-workbench-nav__links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.profile-handover-card {
    border-color: #bfdbfe;
}

.profile-handover-title {
    margin: 0 0 8px;
    color: #1e3a8a;
    font-size: 15px;
    font-weight: 700;
}

.profile-handover-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.profile-handover-action {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--text-main);
    text-decoration: none;
}

.profile-handover-action span {
    color: var(--text-sec);
    font-size: 12px;
    line-height: 1.6;
}

.profile-detail-tabs {
    display: grid;
    gap: 0;
    margin-top: 0;
}

.profile-sidebar-tabs {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.profile-detail-tab {
    display: flex;
    align-items: center;
    min-height: 44px;
    border: 0;
    border-left: 3px solid transparent;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
    background: #fff;
    color: #1f2937;
    padding: 10px 11px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.profile-detail-tab:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.profile-detail-tab.is-active {
    background: #eff6ff;
    border-left-color: var(--primary);
    color: #1d4ed8;
}

.profile-jump-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.profile-jump-card {
    display: grid;
    gap: 4px;
    width: 100%;
    text-align: left;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--text-main);
    padding: 12px 14px;
    cursor: pointer;
}

.profile-jump-card span {
    color: var(--text-sec);
    font-size: 12px;
    line-height: 1.6;
}

.profile-feedback-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 10px;
}

.profile-feedback-chip {
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1e3a8a;
    padding: 6px 10px;
    font-size: 12px;
    line-height: 1.5;
}

.profile-inline-tab-link {
    border: 0;
    background: transparent;
    padding: 0;
}

.profile-card-body,
.profile-ledger-wrap {
    padding: 16px 20px;
}

.profile-card-body-topless {
    padding-top: 0;
}

.profile-inline-meta,
.profile-status-row,
.profile-action-row,
.profile-link-row,
.profile-panel-head {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.profile-inline-meta {
    font-size: 13px;
    color: var(--text-sec);
}

.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.profile-info-item {
    min-height: 112px;
    padding: 22px 24px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 12px;
}

.profile-info-item span {
    display: block;
    font-size: 12px;
    line-height: 1.2;
    color: var(--text-sec);
}

.profile-info-item strong {
    font-size: 15px;
    line-height: 1.25;
}

.profile-username-line {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    width: 100%;
    min-width: 0;
}

.profile-username-value {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.profile-username-edit-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-top: -3px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: #94a3b8;
    font: inherit;
    font-size: 14px;
    line-height: 1;
    opacity: 0.72;
    cursor: pointer;
}

.profile-username-edit-btn:hover,
.profile-username-edit-btn:focus-visible {
    border-color: #dbeafe;
    background: #eff6ff;
    color: var(--primary);
    opacity: 1;
    outline: none;
}

.profile-username-edit-icon {
    display: inline-block;
    transform: scaleX(-1);
}

.profile-role-line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}

.profile-role-editor {
    display: grid;
    justify-items: start;
    gap: 8px;
    width: 100%;
}

.profile-role-editor .profile-input {
    min-width: 128px;
    width: min(184px, 100%);
}

.profile-role-editor .profile-btn {
    min-width: 92px;
    white-space: nowrap;
}

.profile-role-editor.is-certified .profile-input {
    background: #f3f4f6;
    color: #94a3b8;
    cursor: not-allowed;
}

.profile-role-editor.is-certified .profile-btn {
    color: #94a3b8;
}

.profile-role-msg {
    min-height: 18px;
    margin: -4px 0 0;
}

.profile-info-item .profile-badge {
    align-self: center;
    margin-top: 0;
}

.profile-email-value {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.profile-password-box {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.profile-password-head {
    display: flex;
    gap: 10px;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.profile-password-grid {
    grid-template-columns: repeat(3, minmax(160px, 1fr)) auto;
    align-items: center;
}

.profile-strong {
    color: var(--text-main);
}

.profile-badge,
.profile-status-badge {
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 999px;
    font-weight: 600;
}

.profile-status-badge {
    background: #f3f4f6;
    color: var(--text-sec);
}

.profile-badge {
    font-size: 11px;
    padding: 2px 8px;
}

.profile-login-link {
    font-size: 13px;
}

.profile-login-inline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.profile-alert {
    padding: 12px 16px;
    margin-bottom: 12px;
    border-radius: 8px;
}

.profile-alert-warn {
    background: #fff7ed;
    border: 1px solid #fed7aa;
}

.profile-alert-warn p {
    margin: 0;
}

.profile-alert-title {
    margin-bottom: 4px !important;
    color: #c2410c;
    font-size: 13px;
    font-weight: 600;
}

.profile-alert-warn p:last-child {
    color: #9a3412;
    font-size: 12px;
}

.profile-form-grid,
.profile-metric-grid,
.profile-guide-grid,
.profile-grid-body {
    display: grid;
    gap: 12px;
}

.profile-form-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-bottom: 10px;
}

.profile-form-grid-3 {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-input,
.profile-textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 9px 10px;
    font-size: 13px;
    outline: none;
    background: #fff;
}

.profile-input-readonly {
    background: #f3f4f6;
    color: var(--text-sec);
    cursor: not-allowed;
}

.profile-select {
    color: var(--text-hint);
}

.profile-input-full {
    grid-column: 1 / -1;
}

.profile-textarea {
    min-height: 120px;
    padding: 10px 12px;
    resize: vertical;
    margin-bottom: 10px;
}

.profile-textarea-sm {
    min-height: 88px;
}

.profile-btn {
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.profile-btn-primary {
    background: #2563eb;
    color: #fff;
}

.profile-btn-secondary {
    background: #0ea5e9;
    color: #fff;
}

.profile-btn-success {
    background: #16a34a;
    color: #fff;
}

.profile-btn-light {
    background: #f3f4f6;
    color: var(--text-sec);
    border: 1px solid var(--border);
}

.profile-upload-label {
    display: inline-block;
}

.profile-upload-zone {
    background: #f8fafc;
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 14px;
    text-align: center;
    position: relative;
}

.profile-upload-icon {
    font-size: 40px;
    margin-bottom: 8px;
}

.profile-upload-title,
.profile-guide-title,
.profile-panel-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
}

.profile-upload-hint,
.profile-panel-desc,
.profile-guide-line,
.profile-guide-foot,
.profile-label-muted {
    font-size: 12px;
}

.profile-upload-hint {
    color: var(--text-hint);
    margin: 4px 0 12px;
}

.profile-preview-image {
    max-width: 320px;
    max-height: 220px;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 8px;
}

.profile-action-row-center {
    justify-content: center;
}

.profile-step-nav {
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.profile-step-nav .profile-btn {
    min-width: 132px;
    text-align: center;
}

.case-visualization-workbench {
    display: grid;
    grid-template-columns: minmax(280px, 0.95fr) minmax(300px, 1.05fr);
    gap: 22px;
    align-items: start;
}

.case-visualization-editor,
.case-visualization-preview {
    display: grid;
    gap: 14px;
}

.case-visualization-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
}

.case-visualization-textarea {
    min-height: 260px;
    resize: vertical;
    line-height: 1.7;
}

.case-visualization-upload-row,
.case-visualization-template-row,
.case-visualization-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.case-visualization-upload-row input[type="file"] {
    max-width: 260px;
    font-size: 13px;
    color: var(--text-sec);
}

.case-template-btn {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-main);
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.case-template-btn:hover,
.case-template-btn.is-active {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

.case-visualization-preview {
    justify-items: center;
}

.case-visualization-preview canvas {
    width: min(100%, 420px);
    height: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.10);
}

.case-visualization-draft-list {
    display: grid;
    gap: 10px;
}

.case-visualization-draft-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
    background: #fff;
    color: var(--text-main);
    text-align: left;
    cursor: pointer;
}

.case-visualization-draft-item:hover {
    border-color: var(--primary);
    background: #f8fbff;
}

.case-visualization-draft-item span {
    flex: 0 0 auto;
    color: var(--text-sec);
    font-size: 13px;
}

.profile-panel {
    padding: 14px 16px;
    margin-bottom: 12px;
    border-radius: 10px;
}

.profile-panel-soft {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
}

.profile-panel-icon {
    font-size: 20px;
}

.profile-panel-title {
    color: #0c4a6e;
}

.profile-panel-desc {
    color: #0369a1;
}

.profile-metric-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.profile-metric-grid-compact {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.profile-stat-card {
    padding: 12px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.profile-stat-label {
    font-size: 12px;
    color: var(--text-hint);
}

.profile-stat-value {
    margin-top: 4px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
}

.profile-stat-value-success {
    color: #16a34a;
}

.profile-stat-value-primary,
.profile-code-value {
    color: #2563eb;
}

.profile-stat-value-teal {
    color: #0f766e;
}

.profile-stat-value-purple {
    color: #9333ea;
}

.profile-code-value {
    letter-spacing: 1px;
}

.profile-guide-grid,
.profile-grid-body {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.profile-guide-card {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.profile-guide-card-warm {
    background: #fff7ed;
    border-color: #fed7aa;
}

.profile-guide-card-cool {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.profile-guide-card-accent {
    background: #f5f3ff;
    border-color: #ddd6fe;
}

.profile-guide-title {
    margin-bottom: 8px;
}

.profile-guide-line {
    line-height: 1.9;
}

.profile-guide-foot {
    margin-top: 6px;
    line-height: 1.8;
    color: #6b7280;
}

.profile-task-invite-link {
    margin-top: 8px;
    padding: 8px 10px;
    border: 1px solid rgba(109, 40, 217, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.62);
    color: #4c1d95;
    font-size: 12px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.profile-task-invite-link-empty {
    color: #7c3aed;
}

.profile-task-copy-feedback {
    min-height: 18px;
    margin-top: 6px;
    color: #16a34a;
    font-size: 12px;
    font-weight: 700;
}

.profile-grid-body {
    padding: 16px 20px;
}

.profile-grid-body-tight {
    padding: 0;
    margin-top: 12px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.profile-share-link {
    flex: 1;
    min-width: 280px;
    color: var(--text-sec);
}

.profile-invite-rule-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.profile-invite-rule-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: #f8fafc;
}

.profile-invite-rule-chip-user {
    border-color: rgba(59, 130, 246, 0.2);
    background: #f8fbff;
}

.profile-invite-rule-chip-lawyer {
    border-color: rgba(139, 92, 246, 0.18);
    background: #fbfaff;
}

.profile-invite-rule-label {
    color: var(--text-sec);
    font-size: 13px;
    font-weight: 600;
}

.profile-invite-rule-points {
    color: var(--text-main);
    font-size: 15px;
    font-weight: 800;
    white-space: nowrap;
}

.profile-top-gap-sm {
    margin-top: 10px;
}

.profile-top-gap-xs {
    margin-top: 8px;
}

.profile-link-row {
    margin-top: 10px;
}

.profile-workbench .profile-grid-body {
    padding-top: 0;
}

.profile-link-divider {
    color: var(--text-hint);
}

.profile-ledger-wrap {
    padding-top: 0;
}

.profile-ledger-table-wrap {
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.profile-ledger-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
    font-size: 12px;
}

.profile-ledger-table thead tr {
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    color: var(--text-sec);
    text-align: left;
}

.profile-ledger-table th {
    padding: 9px 10px;
    font-weight: 600;
}

.guardian-progress-dialog[hidden] {
    display: none;
}

.guardian-progress-dialog {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: 20px;
}

.guardian-progress-dialog__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .36);
}

.guardian-progress-dialog__card {
    position: relative;
    z-index: 1;
    width: min(360px, 100%);
    padding: 20px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: 0 18px 45px rgba(15, 23, 42, .18);
}

.guardian-progress-dialog__title {
    display: block;
    color: var(--text-main);
    font-size: 16px;
    margin-bottom: 8px;
}

.guardian-progress-dialog__message {
    margin: 0 0 18px;
    color: var(--text-sec);
    line-height: 1.7;
}

.guardian-progress-dialog__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.guardian-progress-dialog__primary,
.guardian-progress-dialog__secondary {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 9px 16px;
    font-size: 14px;
    cursor: pointer;
}

.guardian-progress-dialog__primary {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.guardian-progress-dialog__secondary {
    background: #fff;
    color: var(--text-sec);
}

.profile-align-right {
    text-align: right;
}

.my-panel-entry-card {
    display: block;
}

.quick-panel-entry {
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
}

.my-panel-main {
    padding-bottom: 36px;
}

.my-panel-shell {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.my-panel-header {
    display: grid;
    grid-template-columns: minmax(360px, 1fr) minmax(232px, 454px);
    gap: 16px;
    align-items: start;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.my-panel-header-copy h1 {
    margin: 0 0 8px;
    font-size: 26px;
    color: var(--text-main);
}

.my-panel-header-copy {
    min-width: 0;
}

.my-panel-title-eyebrow {
    margin-left: 8px;
    vertical-align: middle;
    font-size: 12px;
    font-weight: 600;
}

.my-panel-header-copy p {
    margin: 0;
    color: var(--text-sec);
    line-height: 1.6;
}

.my-panel-header-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, 106px);
    justify-content: end;
    align-content: start;
    gap: 10px;
    width: 100%;
    justify-self: end;
}

.my-panel-metric {
    min-height: 64px;
    padding: 8px 10px;
    border: 1px solid #dbe4f0;
    border-radius: 8px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6px;
}

.my-panel-metric-label {
    color: var(--text-sec);
    font-size: 12px;
}

.my-panel-metric strong {
    color: var(--text-main);
    font-size: 20px;
    line-height: 1;
}

.my-panel-workbench-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
    gap: 14px;
    align-items: start;
}

.my-panel-workgrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: stretch;
}

.my-panel-grid-adaptive {
    align-items: stretch;
}

.my-panel-column {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
    min-height: 220px;
    border-radius: 8px;
    transition: background-color 0.16s ease, box-shadow 0.16s ease;
}

.my-panel-zone {
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    min-width: 0;
    height: auto;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.my-panel-recent-sidebar {
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    min-width: 0;
    position: sticky;
    top: 84px;
}

.my-panel-recent-sidebar .my-panel-block-head {
    margin-bottom: 12px;
}

.my-panel-recent-sidebar .my-panel-entry {
    gap: 8px;
}

.my-panel-recent-sidebar .my-panel-entry-actions {
    display: none;
}

.my-panel-block-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.my-panel-section-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.my-panel-section-actions .my-panel-drag-handle {
    margin-top: 0;
}

.my-panel-section-manager {
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.my-panel-header .my-panel-section-manager {
    margin-top: 14px;
    padding: 10px 0 0;
    border: 0;
    border-top: 1px solid #edf2f7;
    border-radius: 0;
    background: transparent;
}

.my-panel-section-manager-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.my-panel-header .my-panel-section-manager-head {
    align-items: center;
    margin-bottom: 8px;
}

.my-panel-section-manager-titleline {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
}

.my-panel-section-manager-head h2 {
    margin: 0;
    font-size: 16px;
    color: var(--text-main);
}

.my-panel-section-manager-head p,
.my-panel-section-manager-tip {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--text-sec);
}

.my-panel-hidden-sections {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.my-panel-hidden-sections-empty {
    color: var(--text-hint);
    font-size: 13px;
}

.my-panel-header .my-panel-hidden-sections-empty {
    font-size: 12px;
}

.my-panel-hidden-section-chip {
    border: 1px solid #dbe4f0;
    border-radius: 999px;
    background: #f8fafc;
    color: var(--text-main);
    min-height: 32px;
    padding: 0 12px;
    font-size: 12px;
    cursor: pointer;
}

.my-panel-hidden-section-chip:hover,
.my-panel-hidden-section-chip:focus-visible {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: var(--primary);
}

.my-panel-section-headline {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.my-panel-section-headline-copy {
    min-width: 0;
}

.my-panel-item-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    min-width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    flex-shrink: 0;
}

.my-panel-item-logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-decoration: none;
    border-radius: 8px;
}

.my-panel-item-logo-link:hover,
.my-panel-item-logo-link:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.22);
    outline-offset: 2px;
}

.my-panel-item-logo-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
    background: #fff;
}

.my-panel-item-logo--site {
    background: #2563eb;
}

.my-panel-item-logo--recent {
    background: #64748b;
}

.my-panel-item-logo--qr {
    background: #16a34a;
}

.my-panel-item-logo--tool {
    background: #ea580c;
}

.my-panel-item-logo--law {
    background: #7c3aed;
}

.my-panel-item-logo--ai {
    background: #0f766e;
}

.my-panel-item-logo--learning {
    background: #0891b2;
}

.my-panel-item-logo--profile {
    background: #475569;
}

.my-panel-drag-handle,
.my-panel-entry-drag-handle,
.my-panel-section-hide,
.my-panel-entry-hide {
    border: 1px solid transparent;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    flex-shrink: 0;
    opacity: 0.62;
    transition: color 0.16s ease, opacity 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.my-panel-drag-handle,
.my-panel-entry-drag-handle {
    touch-action: none;
    user-select: none;
    cursor: pointer;
}

.my-panel-drag-handle {
    width: 18px;
    min-width: 18px;
    height: 18px;
    border-radius: 6px;
    font-size: 15px;
    line-height: 1;
    margin-top: 2px;
}

.my-panel-entry-drag-handle {
    width: 20px;
    min-width: 20px;
    height: 20px;
    border-radius: 5px;
    font-size: 12px;
    line-height: 1;
    opacity: 0.76;
}

.my-panel-drag-handle:hover,
.my-panel-drag-handle:focus-visible,
.my-panel-drag-handle.is-dragging,
.my-panel-entry-drag-handle:hover,
.my-panel-entry-drag-handle:focus-visible,
.my-panel-entry-drag-handle.is-dragging {
    border-color: #dbe4f0;
    background: #f8fafc;
    color: var(--text-main);
    opacity: 1;
}

.my-panel-section-hide,
.my-panel-entry-hide {
    width: 22px;
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    font-size: 13px;
    line-height: 1;
}

.my-panel-section-hide:hover,
.my-panel-section-hide:focus-visible,
.my-panel-entry-hide:hover,
.my-panel-entry-hide:focus-visible {
    border-color: #dbe4f0;
    background: #f8fafc;
    color: #64748b;
    opacity: 0.88;
}

.my-panel-zone--span-4 {
    grid-column: span 4;
}

.my-panel-zone--span-8 {
    grid-column: span 8;
}

.my-panel-zone--span-12 {
    grid-column: span 12;
}

.my-panel-zone.is-drop-target {
    border-color: #93c5fd;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
}

.my-panel-column.is-column-drop-target {
    background: rgba(59, 130, 246, 0.045);
    box-shadow: inset 0 0 0 1px rgba(147, 197, 253, 0.58);
}

.my-panel-block-head h2 {
    margin: 0;
    color: var(--text-sec);
    font-size: 14px;
    font-weight: 600;
}

.my-panel-entries {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.my-panel-entry,
.my-panel-shortcut {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid #edf2f7;
}

.my-panel-entries > :first-child {
    border-top: 0;
    padding-top: 0;
}

.my-panel-entry-main,
.my-panel-shortcut-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    min-width: 0;
    flex: 1;
}

.my-panel-entry-line {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center;
    column-gap: 10px;
    row-gap: 2px;
    width: 100%;
    min-width: 0;
    padding-left: 0;
}

.my-panel-entry-title-wrap {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    grid-column: 3;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.45;
}

.my-panel-entry-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.my-panel-entry-link {
    color: var(--text-main);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.my-panel-entry-link:hover,
.my-panel-entry-link:focus-visible {
    color: var(--primary);
}

.my-panel-entry-link--static:hover,
.my-panel-entry-link--static:focus-visible {
    color: var(--text-main);
}

.my-panel-entry-qr-preview {
    --my-panel-qr-preview-size: 112px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--my-panel-qr-preview-size);
    height: var(--my-panel-qr-preview-size);
    min-width: var(--my-panel-qr-preview-size);
    min-height: var(--my-panel-qr-preview-size);
    max-width: var(--my-panel-qr-preview-size);
    max-height: var(--my-panel-qr-preview-size);
    flex: 0 0 var(--my-panel-qr-preview-size);
    margin-left: 70px;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.my-panel-entry-qr-img {
    display: block;
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    image-rendering: auto;
}

.my-panel-entry--qr[data-entry-section="qrs"] {
    --my-panel-entry-action-strip: 58px;
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--my-panel-entry-action-strip) var(--my-panel-qr-preview-size);
    align-items: center;
    column-gap: 16px;
    padding-right: 0;
}

.my-panel-entry--qr .my-panel-entry-main {
    display: contents;
    min-width: 0;
}

.my-panel-entry-info {
    min-width: 0;
    align-self: center;
}

.my-panel-entry--qr .my-panel-entry-line {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 6px 8px;
    align-items: center;
    width: 100%;
    padding-left: 0;
}

.my-panel-entry--qr .my-panel-entry-info {
    display: flex;
    grid-column: 1;
    align-items: center;
    justify-self: start;
    width: 100%;
    min-height: var(--my-panel-qr-preview-size);
}

.my-panel-entry--qr .my-panel-entry-number {
    grid-column: 1;
    grid-row: 1;
}

.my-panel-entry--qr .my-panel-entry-title-wrap {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
}

.my-panel-entry--qr .my-panel-entry-title-wrap,
.my-panel-entry--qr .my-panel-entry-link {
    min-width: 0;
}

.my-panel-entry--qr .my-panel-entry-qr-preview {
    grid-column: 3;
    justify-self: end;
    align-self: center;
    margin-left: 0;
}

.my-panel-entry-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-left: auto;
    padding-left: 0;
    padding-right: 0;
    flex-shrink: 0;
}

.my-panel-entry--qr .my-panel-entry-actions {
    position: static;
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    width: var(--my-panel-entry-action-strip);
    justify-self: stretch;
    align-self: center;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding-left: 0;
    padding-right: 0;
}

.my-panel-entry.is-entry-drop-target {
    border-radius: 10px;
    background: #f8fbff;
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.18);
}

.my-panel-entry-rename {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 18px;
    min-width: 18px;
    height: 18px;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0;
    background: transparent;
    color: #64748b;
    font-size: 10px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.58;
}

.my-panel-entry-rename span {
    display: inline-block;
    transform: scaleX(-1);
}

.my-panel-entry-rename:hover,
.my-panel-entry-rename:focus-visible {
    border-color: #cbd5e1;
    color: var(--text-main);
}

.my-panel-entry-rename:hover,
.my-panel-entry-rename:focus-visible {
    opacity: 0.86;
}

.my-panel-entry-move {
    width: 39px;
    min-width: 39px;
    height: 24px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 0 12px 0 6px;
    background: transparent;
    color: #64748b;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease, border-color .15s ease, background-color .15s ease, color .15s ease;
}

.my-panel-entry:hover .my-panel-entry-move,
.my-panel-entry:focus-within .my-panel-entry-move {
    opacity: 0.72;
    pointer-events: auto;
}

.my-panel-entry-move:hover,
.my-panel-entry-move:focus-visible {
    opacity: 0.9;
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #475569;
    outline: none;
}

.my-panel-empty {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 56px;
    padding: 12px 0;
    color: var(--text-sec);
    font-size: 13px;
    border-top: 1px solid #edf2f7;
}

.my-panel-empty-action {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
}

.my-panel-empty-action:hover,
.my-panel-empty-action:focus-visible {
    text-decoration: underline;
}

.my-panel-custom-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
        "top"
        "inputs"
        "actions"
        "sync";
    gap: 10px;
    align-items: stretch;
}

.my-panel-custom-field {
    min-width: 0;
    display: flex;
    align-items: center;
}

.my-panel-custom-top-row {
    grid-area: top;
    display: grid;
    grid-template-columns: minmax(128px, 0.8fr) minmax(0, 1.4fr);
    gap: 10px;
    align-items: end;
}

.my-panel-custom-field-label {
    width: 100%;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
}

.my-panel-custom-input-row {
    grid-area: inputs;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.my-panel-custom-conditional-fields {
    min-width: 0;
    grid-column: 1;
}

.my-panel-custom-conditional-fields[hidden] {
    display: none !important;
}

.my-panel-custom-conditional-fields--qr {
    display: grid;
    grid-template-columns: minmax(112px, 140px) minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
}

.my-panel-custom-field--type {
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.my-panel-custom-field--type .lookup-select {
    width: 100%;
}

.my-panel-custom-field--name {
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.my-panel-qr-upload {
    min-height: 36px;
    padding: 0 12px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: var(--text-sec);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
}

.my-panel-qr-upload input {
    display: none;
}

.my-panel-qr-paste-box {
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid #dbe4f0;
    border-radius: 8px;
    background: #fff;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    text-align: center;
    outline: none;
    overflow: hidden;
}

.my-panel-qr-paste-box:focus,
.my-panel-qr-paste-box:hover {
    border-color: #bfdbfe;
    background: #f8fafc;
}

.my-panel-qr-paste-box img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.my-panel-sync-tip {
    color: #64748b;
    font-size: 12px;
    line-height: 1.2;
    text-align: center;
    font-weight: 600;
}

.my-panel-sync-row {
    grid-area: sync;
    position: relative;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    min-height: 24px;
}

.my-panel-sync-help {
    width: 18px;
    height: 18px;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.my-panel-sync-help:hover,
.my-panel-sync-help:focus {
    border-color: #93c5fd;
    background: #eff6ff;
    color: #1d4ed8;
}

.my-panel-sync-help-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 20;
    width: min(280px, calc(100vw - 40px));
    padding: 10px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
    color: var(--text-sec);
    font-size: 12px;
    line-height: 1.55;
}

.my-panel-sync-help-panel[hidden] {
    display: none;
}

.my-panel-sync-help-panel strong,
.my-panel-sync-help-panel span {
    display: block;
}

.my-panel-sync-help-panel strong {
    margin-bottom: 4px;
    color: #1d4ed8;
}

.my-panel-custom-form-actions {
    grid-area: actions;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    align-self: end;
    align-items: flex-start;
    flex-wrap: wrap;
}

.my-panel-sync-action {
    display: inline-flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
}

.my-panel-custom-form .deadline-search-button {
    min-height: 34px;
    min-width: 0;
    padding: 0 12px;
    border-color: #dbe4f0;
    background: #f8fafc;
    color: var(--text-sec);
    font-size: 13px;
    font-weight: 500;
    box-shadow: none;
}

.my-panel-custom-form .deadline-search-button:hover,
.my-panel-custom-form .deadline-search-button:focus {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: var(--primary);
    box-shadow: none;
}

.my-panel-custom-form .lookup-select {
    width: 100%;
}

@media (max-width: 1024px) {
    .my-panel-header-metrics {
        grid-template-columns: repeat(2, 106px);
        justify-content: end;
    }

    .my-panel-workbench-layout {
        grid-template-columns: 1fr;
    }

    .my-panel-recent-sidebar {
        position: static;
    }

    .my-panel-custom-input-row {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 768px) {
    .my-panel-header {
        padding: 18px;
    }

    .my-panel-header-copy h1 {
        font-size: 24px;
    }

    .my-panel-header-metrics {
        grid-template-columns: repeat(2, 106px);
    }

    .my-panel-entry,
    .my-panel-shortcut,
    .my-panel-empty {
        flex-direction: column;
        align-items: flex-start;
    }

    .my-panel-section-manager-head {
        flex-direction: column;
    }

    .my-panel-entry-actions {
        width: 100%;
        justify-content: flex-end;
        padding-right: 0;
    }

    .my-panel-custom-form {
        grid-template-columns: 1fr;
    }

    .my-panel-custom-input-row {
        grid-template-columns: 1fr;
    }

    .my-panel-custom-form-actions {
        justify-content: stretch;
    }

    .my-panel-custom-form-actions .deadline-search-button {
        flex: 1 1 160px;
    }
}

@media (max-width: 640px) {
    .my-panel-header {
        grid-template-columns: 1fr;
    }

    .my-panel-header-metrics {
        justify-content: start;
    }

    .my-panel-workgrid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .my-panel-header-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .my-panel-zone {
        padding: 16px;
    }
}

.cat-item {
    position: relative;
}

.cat-item[data-panel-decorated="1"] {
    grid-template-columns: minmax(0, 1fr) 34px;
    align-items: center;
    padding-right: 10px;
}

.cat-item[data-panel-decorated="1"] .cat-item-main {
    grid-column: 1;
    align-self: center;
    min-height: 100%;
}

.cat-item--qr[data-panel-decorated="1"] {
    padding-top: 12px;
    padding-bottom: 12px;
}

.panel-mini-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.panel-mini-actions--home {
    grid-column: 2;
    position: static;
    right: auto;
    bottom: auto;
    top: auto;
    transform: none;
    opacity: 1;
    transition: opacity .16s ease;
}

.cat-item:hover .panel-mini-actions--home,
.cat-item:focus-within .panel-mini-actions--home,
.ai-entry-card:hover .panel-mini-actions--home,
.ai-entry-card:focus-within .panel-mini-actions--home,
.ai-entry-card .panel-mini-actions--home:has(.is-active),
.training-brand-card:hover .panel-mini-actions--home,
.training-brand-card:focus-within .panel-mini-actions--home,
.training-brand-card .panel-mini-actions--home:has(.is-active),
.panel-mini-actions--home:has(.is-active) {
    opacity: 1;
}

.panel-mini-actions--tool,
.panel-mini-actions--deadline {
    gap: 4px;
}

.tool-card .panel-mini-actions--tool {
    position: absolute;
    right: 12px;
    top: 14px;
    height: 38px;
    opacity: 1;
    transition: opacity .16s ease;
}

.tool-card:hover .panel-mini-actions--tool,
.tool-card:focus-within .panel-mini-actions--tool,
.tool-card .panel-mini-actions--tool:has(.is-active) {
    opacity: 1;
}

.tool-detail-hero .panel-mini-actions--tool-detail {
    position: absolute;
    right: 18px;
    top: 18px;
    z-index: 2;
}

.panel-icon-btn {
    width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #e11d48;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    box-shadow: none;
    overflow: hidden;
    padding: 0;
    transition: transform .15s ease, opacity .15s ease, filter .15s ease;
}

.panel-icon-btn:hover,
.panel-icon-btn:focus-visible {
    color: #be123c;
    background: transparent;
    transform: translateY(-1px);
    filter: brightness(1.03);
}

.panel-icon-btn.is-active {
    color: #be123c;
    background: transparent;
}

.panel-reaction-btn.is-active {
    color: #be123c;
    background: transparent;
}

.panel-favorite-btn {
    width: 20px;
    height: 22px;
}

.panel-favorite-btn:not(.is-active) .panel-icon-art {
    opacity: 0.44;
    filter: grayscale(0.12) saturate(0.82);
}

.panel-favorite-btn.is-active .panel-icon-art {
    opacity: 1;
    filter: none;
}

.panel-reaction-btn {
    position: relative;
    width: 20px;
}

.panel-reaction-btn.is-active .panel-icon-art {
    opacity: 1;
    filter: sepia(1) saturate(6) hue-rotate(320deg) brightness(0.9);
}

.panel-button-feedback {
    position: absolute;
    right: 50%;
    bottom: calc(100% + 6px);
    z-index: 5;
    min-width: 42px;
    padding: 3px 6px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    color: #fff;
    font-size: 11px;
    line-height: 1.2;
    text-align: center;
    transform: translateX(50%);
    pointer-events: none;
    white-space: nowrap;
}

.panel-icon-art {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
}

.cat-item-action-column {
    width: 30px;
    min-height: 48px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    justify-self: end;
    align-self: stretch;
    gap: 5px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease, filter .15s ease;
    filter: saturate(0.7);
}

.cat-item.training-logo-item .cat-item-action-column {
    grid-column: 2;
    flex-direction: column;
    justify-content: center;
    align-self: stretch;
}

.cat-item .cat-item-action-column:has(.is-active) {
    opacity: 0.72;
    pointer-events: auto;
}

.cat-item:hover .cat-item-action-column,
.cat-item:focus-within .cat-item-action-column {
    opacity: 0.72;
    pointer-events: auto;
    filter: saturate(0.85);
}

.cat-item-action-column:hover,
.cat-item-action-column:focus-within {
    opacity: 0.9;
    pointer-events: auto;
}

.cat-item-action-column:has(.panel-favorite-btn.is-active) .panel-reaction-btn,
.cat-item-action-column:has(.panel-reaction-btn.is-active) .panel-favorite-btn {
    visibility: hidden;
    pointer-events: none;
}

.ai-entry-card .panel-mini-actions--home {
    position: absolute;
    right: 10px;
    bottom: 10px;
    top: auto;
    grid-column: auto;
    z-index: 2;
    opacity: 0;
    pointer-events: none;
    filter: saturate(0.7);
}

.ai-entry-card:hover .panel-mini-actions--home,
.ai-entry-card:focus-within .panel-mini-actions--home,
.ai-entry-card .panel-mini-actions--home:has(.is-active) {
    opacity: 0.72;
    pointer-events: auto;
    filter: saturate(0.85);
}

.ai-entry-card .panel-mini-actions--home:hover,
.ai-entry-card .panel-mini-actions--home:focus-within {
    opacity: 0.9;
    pointer-events: auto;
}

.ai-entry-card .panel-mini-actions--home:has(.panel-favorite-btn.is-active) .panel-reaction-btn,
.ai-entry-card .panel-mini-actions--home:has(.panel-reaction-btn.is-active) .panel-favorite-btn {
    visibility: hidden;
    pointer-events: none;
}

.training-brand-card .panel-mini-actions--home {
    right: 12px;
    bottom: 8px;
}

.cat-item--qr .panel-mini-actions--home {
    right: auto;
    top: auto;
    bottom: auto;
}

.deadline-card-action-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.deadline-card .panel-mini-actions--deadline {
    position: absolute;
    right: 12px;
    top: 12px;
    opacity: 1;
    z-index: 2;
}

@media (max-width: 768px) {
    .profile-layout-with-sidebar {
        grid-template-columns: 1fr;
    }

    .profile-sidebar-panel {
        position: static;
    }

    .profile-sidebar-panel .cat-card {
        min-height: 0;
    }

    .profile-sidebar-panel .profile-page-hero {
        padding: 16px 0 0;
    }

    .profile-sidebar-panel .profile-page-hero__title-row {
        display: flex;
        padding-left: 16px;
        padding-right: 16px;
    }

    .profile-sidebar-panel .profile-page-hero__lead {
        display: block;
        padding-left: 16px;
        padding-right: 16px;
        margin-bottom: 10px;
    }

    .profile-sidebar-tabs {
        display: flex;
        gap: 0;
        overflow-x: auto;
        border-top: 1px solid var(--border);
        scrollbar-width: thin;
    }

    .profile-detail-tab {
        flex: 0 0 auto;
        min-height: 44px;
        border-left: 0;
        border-bottom: 3px solid transparent;
        padding: 10px 14px;
        font-size: 14px;
        white-space: nowrap;
    }

    .profile-detail-tab.is-active {
        border-left-color: transparent;
        border-bottom-color: var(--primary);
    }

    .profile-page-hero {
        padding: 20px 18px 14px;
    }

    .profile-card-body,
    .profile-ledger-wrap,
    .profile-grid-body {
        padding-left: 16px;
        padding-right: 16px;
    }

    .profile-form-grid-3 {
        grid-template-columns: 1fr;
    }

    .profile-password-grid {
        grid-template-columns: 1fr;
    }

    .profile-share-link {
        min-width: 0;
    }

    .profile-invite-rule-grid {
        grid-template-columns: 1fr;
    }
}



