* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f5f7fb;
    color: #111827;
}

a {
    color: inherit;
}

.auth-page {
    min-height: 100vh;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(8, 145, 178, 0.08)),
        #f5f7fb;
}

.auth-shell {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 32px 18px;
}

.auth-panel {
    display: grid;
    width: min(100%, 440px);
    gap: 18px;
}

.auth-brand {
    display: grid;
    gap: 8px;
    text-align: center;
}

.auth-brand p,
.auth-card-header p,
.auth-secondary {
    margin: 0;
    color: #64748b;
}

.auth-card {
    padding: 28px;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
}

.auth-card-header {
    display: grid;
    gap: 8px;
    margin-bottom: 22px;
}

.auth-card-header h1 {
    margin: 0;
    font-size: 26px;
}

.auth-form {
    display: grid;
    gap: 16px;
}

.auth-form label {
    display: grid;
    gap: 7px;
    color: #374151;
    font-size: 13px;
    font-weight: 700;
}

.auth-form input {
    min-height: 42px;
    width: 100%;
    padding: 9px 11px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    color: #111827;
    font: inherit;
}

.auth-form input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
    outline: none;
}

.auth-form button {
    min-height: 42px;
    border: 1px solid #1d4ed8;
    border-radius: 6px;
    background: #2563eb;
    color: #ffffff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.auth-form button:hover {
    background: #1d4ed8;
}

.auth-links {
    margin-top: 16px;
    text-align: center;
}

.auth-links a,
.auth-secondary a {
    color: #1d4ed8;
    font-weight: 700;
    text-decoration: none;
}

.auth-links a:hover,
.auth-secondary a:hover {
    text-decoration: underline;
}

.auth-secondary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    justify-content: center;
    font-size: 14px;
}

.brand-logo-link {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    line-height: 0;
    text-decoration: none;
}

.brand-logo-link img {
    display: block;
    width: auto;
    max-width: 240px;
    max-height: 56px;
    object-fit: contain;
}

.auth-logo-link {
    justify-self: center;
}

.auth-logo-link img {
    max-width: 360px;
    max-height: 92px;
}

.error-message {
    border-color: #fecaca;
    background: #fff1f2;
    color: #991b1b;
}

.public-page {
    min-height: 100vh;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(8, 145, 178, 0.08)),
        #f5f7fb;
}

.public-site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 18px clamp(18px, 5vw, 56px);
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid #dbe2ea;
}

.public-nav,
.public-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.public-nav a {
    color: #374151;
    font-weight: 700;
    text-decoration: none;
}

.public-nav a:hover {
    text-decoration: underline;
}

.public-hero,
.public-section,
.public-final-cta {
    width: min(1120px, calc(100% - 36px));
    margin: 0 auto;
}

.public-hero {
    display: grid;
    align-items: center;
    min-height: 440px;
    padding: 58px 0 44px;
}

.public-hero-copy {
    max-width: 780px;
}

.public-hero h1 {
    margin: 0;
    font-size: clamp(34px, 6vw, 58px);
    line-height: 1.04;
}

.public-hero p {
    max-width: 720px;
    margin: 20px 0 0;
    color: #475569;
    font-size: 19px;
    line-height: 1.55;
}

.public-cta-row {
    margin-top: 26px;
}

.primary-cta,
.secondary-cta {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 800;
    text-decoration: none;
}

.primary-cta {
    border: 1px solid #1d4ed8;
    background: #2563eb;
    color: #ffffff;
}

.primary-cta:hover {
    background: #1d4ed8;
}

.secondary-cta {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #1d4ed8;
}

.secondary-cta:hover {
    border-color: #93c5fd;
    background: #eff6ff;
}

.public-section {
    padding: 34px 0;
}

.section-heading h2,
.public-final-cta h2 {
    margin: 0 0 18px;
    font-size: 28px;
}

.video-placeholder {
    display: grid;
    min-height: 360px;
    place-items: center;
    gap: 14px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.10), rgba(8, 145, 178, 0.12)),
        #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
    color: #1e40af;
    font-weight: 800;
}

.play-icon {
    width: 74px;
    height: 74px;
    border-radius: 999px;
    background: #2563eb;
    position: relative;
}

.play-icon::after {
    content: "";
    position: absolute;
    top: 22px;
    left: 29px;
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-left: 22px solid #ffffff;
}

.video-caption {
    max-width: 680px;
    margin: 14px 0 0;
    color: #64748b;
    line-height: 1.5;
}

.signal-preview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.signal-preview article {
    display: grid;
    gap: 10px;
    padding: 20px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.signal-preview span {
    color: #475569;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.signal-preview strong {
    color: #111827;
    font-size: 24px;
}

.signal-preview p {
    margin: 0;
    color: #64748b;
    line-height: 1.5;
}

.step-grid,
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.step-grid article,
.feature-grid article,
.price-card {
    padding: 20px;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.step-grid span {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 800;
}

.step-grid h3,
.feature-grid h3 {
    margin: 14px 0 8px;
    font-size: 18px;
}

.step-grid p,
.feature-grid p,
.price-card p {
    margin: 0;
    color: #64748b;
    line-height: 1.5;
}

.price-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.price-card h2 {
    margin: 0 0 8px;
    font-size: 30px;
}

.price-card p + p {
    margin-top: 5px;
}

.public-final-cta {
    display: grid;
    justify-items: center;
    padding: 44px 0 68px;
    text-align: center;
}

.public-doormat {
    margin: 0 -28px -36px;
    border-top: 1px solid #dbe2ea;
    background: #ffffff;
}

.public-doormat-inner {
    display: grid;
    width: min(1120px, calc(100% - 36px));
    margin: 0 auto;
    grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(140px, 1fr));
    gap: 28px;
    padding: 34px 0;
}

.doormat-brand {
    display: grid;
    gap: 14px;
    align-content: start;
}

.doormat-brand p {
    max-width: 300px;
    margin: 0;
    color: #64748b;
    line-height: 1.5;
}

.doormat-column {
    display: grid;
    gap: 10px;
    align-content: start;
}

.doormat-column h2 {
    margin: 0 0 4px;
    color: #111827;
    font-size: 15px;
}

.doormat-column a {
    color: #475569;
    text-decoration: none;
}

.doormat-column a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    min-height: 72px;
    padding: 14px 28px;
    background: white;
    border-bottom: 1px solid #dbe2ea;
}

.brand {
    font-size: 20px;
    font-weight: 800;
}

.brand-link {
    color: #111827;
    text-decoration: none;
}

.brand strong {
    margin-left: 8px;
    font-size: 32px;
}

.topnav,
.platform-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.topnav a {
    color: #374151;
    text-decoration: none;
}

.topnav a:hover {
    text-decoration: underline;
}

.topnav-button {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: #111827;
    text-decoration: none;
    font-weight: 700;
}

.topnav-button:hover {
    border-color: #93c5fd;
    background: #eff6ff;
    text-decoration: none;
}

.flash-list {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.flash-message {
    padding: 10px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: #1e40af;
}

.layout {
    display: flex;
    gap: 22px;
    padding: 22px 28px;
    min-height: calc(100vh - 72px);
}

.sidebar {
    flex: 0 0 260px;
    max-width: 260px;
}

.sidebar-header h2,
.content-header h1,
.detail-card h2 {
    margin: 0;
}

.sidebar-header {
    margin-bottom: 12px;
}

.label-header {
    margin-top: 22px;
}

.profile-link {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 10px;
    padding: 12px;
    margin-bottom: 8px;
    background: white;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    text-decoration: none;
}

.profile-link strong {
    color: #2563eb;
}

.profile-link small {
    grid-column: 1 / -1;
    color: #64748b;
}

.profile-link:hover {
    border-color: #93c5fd;
    background: #f8fbff;
}

.empty-sidebar {
    padding: 12px;
    background: white;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    color: #64748b;
}

.sidebar-actions {
    display: grid;
    gap: 8px;
    margin: 14px 0 22px 0;
}

.sidebar-actions a {
    padding: 10px 12px;
    background: white;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    color: #374151;
    text-decoration: none;
}

.sidebar-actions a:hover {
    border-color: #93c5fd;
    background: #f8fbff;
}

.label-form {
    display: grid;
    grid-template-columns: 1fr 38px 34px;
    gap: 6px;
    margin-bottom: 10px;
}

.label-form input,
.label-form button,
.inline-form select,
.inline-form button,
.forward-form input,
.forward-form button {
    min-height: 34px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: white;
}

.label-form button,
.inline-form button,
.forward-form button {
    background: #2563eb;
    color: white;
    font-weight: 700;
    cursor: pointer;
}

.label-row,
.label-link,
.label-chip-row,
.inline-form,
.forward-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.label-row {
    justify-content: space-between;
    margin-bottom: 6px;
}

.label-link {
    flex: 1;
    padding: 8px;
    background: white;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    text-decoration: none;
}

.label-row form {
    margin: 0;
}

.label-row button {
    min-width: 28px;
    min-height: 28px;
    border: 1px solid #fecaca;
    border-radius: 6px;
    background: #fff1f2;
    color: #991b1b;
    cursor: pointer;
}

.label-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.label-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: white;
    font-size: 12px;
    font-weight: 700;
}

.label-chip-button {
    cursor: pointer;
}

.content {
    flex: 1;
    min-width: 0;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 18px;
    margin-bottom: 14px;
}

.content-header p {
    margin: 6px 0 0 0;
    color: #64748b;
}

.tender-list {
    display: grid;
    gap: 12px;
}

.tender-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.tender-card {
    padding: 16px 18px;
    background: white;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.tender-card.unread {
    border-left: 5px solid #2563eb;
    background: #f8fbff;
}

.tender-card:hover {
    border-color: #93c5fd;
}

.tender-title-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
}

.tender-card h3 {
    margin: 0;
    color: #1d4ed8;
    font-size: 17px;
    line-height: 1.35;
}

.tender-card h3 a {
    color: #1d4ed8;
    text-decoration: none;
}

.tender-card h3 a:hover {
    text-decoration: underline;
}

.tender-card p {
    margin: 12px 0 0 0;
    color: #374151;
    line-height: 1.45;
}

.tender-card-description {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tender-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    margin-top: 12px;
    color: #475569;
    font-size: 13px;
}

.tender-footer {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-top: 14px;
    color: #64748b;
    font-size: 13px;
}

.tender-footer strong {
    color: #1d4ed8;
}

.tender-footer a {
    color: #1d4ed8;
    font-weight: 700;
    text-decoration: none;
}

.tender-footer a:hover {
    text-decoration: underline;
}

.keyword-match-panel {
    margin-top: 12px;
    border-top: 1px solid #e2e8f0;
    padding-top: 10px;
}

.keyword-match-panel summary {
    cursor: pointer;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 700;
}

.keyword-match-list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.keyword-match-row {
    display: grid;
    grid-template-columns: minmax(110px, 170px) minmax(0, 1fr);
    gap: 12px;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #f8fafc;
    font-size: 13px;
}

.keyword-match-term {
    color: #0f172a;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.keyword-match-context {
    display: grid;
    gap: 3px;
    color: #475569;
    min-width: 0;
}

.keyword-match-context .hit-line {
    color: #111827;
    font-weight: 700;
}

.keyword-empty {
    margin-top: 8px;
    color: #64748b;
    font-size: 13px;
}

.inbox-search-form {
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    background: #ffffff;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
}

.filter-grid label {
    display: grid;
    gap: 6px;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
}

.filter-grid input {
    min-height: 38px;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font: inherit;
}

.filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 14px;
    color: #64748b;
    font-size: 13px;
}

.filter-actions button,
.filter-actions a {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #f8fafc;
    color: #1d4ed8;
    font-weight: 700;
    text-decoration: none;
}

.filter-actions button {
    cursor: pointer;
}

.bulk-actions-form {
    display: grid;
    gap: 12px;
}

.bulk-mode-row {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 2px;
}

.bulk-actions-form [hidden] {
    display: none !important;
}

.bulk-mode-row label,
.bulk-card-select {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
}

.bulk-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: #475569;
    font-size: 13px;
}

.bulk-toolbar strong {
    color: #0f172a;
}

.bulk-toolbar select,
.bulk-toolbar button {
    min-height: 34px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: white;
    font: inherit;
}

.bulk-toolbar select {
    padding: 0 10px;
}

.bulk-toolbar button {
    padding: 0 12px;
    color: #1d4ed8;
    font-weight: 700;
    cursor: pointer;
}

.bulk-toolbar button:disabled {
    color: #94a3b8;
    cursor: not-allowed;
}

.bulk-toolbar .danger-button {
    border-color: #fecaca;
    color: #991b1b;
}

.bulk-card-select {
    margin-bottom: 10px;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 18px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    min-width: 36px;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    color: #1d4ed8;
    font-weight: 700;
    text-decoration: none;
}

.pagination .active {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #ffffff;
}

.pagination .disabled {
    color: #94a3b8;
    background: #f8fafc;
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.badge-new,
.badge-followed,
.badge-read {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.badge-new {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-followed {
    background: #fef3c7;
    color: #92400e;
}

.badge-read {
    background: #dcfce7;
    color: #166534;
}

.empty-state,
.empty-panel {
    padding: 24px;
    background: white;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    color: #64748b;
}

.detail-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px 28px 42px 28px;
}

.back-link {
    display: inline-block;
    margin-bottom: 16px;
    color: #374151;
    text-decoration: none;
}

.back-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.back-link:hover {
    text-decoration: underline;
}

.detail-hero {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
    padding: 22px 24px;
    background: white;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
}

.detail-hero h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.2;
}

.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.detail-actions form {
    margin: 0;
}

.detail-actions button {
    padding: 10px 14px;
    border: 0;
    border-radius: 8px;
    background: #2563eb;
    color: white;
    font-weight: 700;
    cursor: pointer;
}

.inline-form,
.forward-form {
    margin-top: 14px;
}

.forward-form input[name="message"] {
    flex: 1;
    min-width: 220px;
}

.detail-card {
    margin-top: 16px;
    padding: 22px 24px;
    background: white;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 12px 18px;
    margin: 18px 0 0 0;
}

.detail-grid dt {
    font-weight: 700;
    color: #475569;
}

.detail-grid dd {
    margin: 0;
    line-height: 1.45;
}

.detail-description-block {
    margin-top: 20px;
}

.detail-description-block h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
}

.tender-description-preview {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #374151;
    line-height: 1.55;
}

.tender-description-preview.is-expanded {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
}

.description-toggle {
    margin-top: 10px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #1d4ed8;
    font-weight: 700;
    cursor: pointer;
}

.description-toggle:hover {
    text-decoration: underline;
}

.match-block {
    margin-top: 18px;
}

.match-heading {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: baseline;
    margin-bottom: 10px;
}

.match-heading h3 {
    margin: 0;
}

.match-heading span,
.muted {
    color: #64748b;
    font-size: 14px;
}

.match-table {
    width: 100%;
    border-collapse: collapse;
}

.match-table th,
.match-table td {
    padding: 10px;
    border: 1px solid #dbe2ea;
    text-align: left;
    vertical-align: top;
}

.match-table th {
    background: #f8fafc;
    color: #475569;
    font-size: 13px;
}

.match-table a {
    color: #1d4ed8;
}

.current-family-row td {
    background: #eff6ff;
    font-weight: 700;
}

.public-page {
    min-height: calc(100vh - 72px);
    padding: 36px 28px;
}

.public-panel {
    max-width: 920px;
    margin: 0 auto;
    padding: 26px;
    background: white;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
}

.public-header {
    margin-bottom: 20px;
}

.public-header h1 {
    margin: 0 0 8px 0;
}

.public-header p {
    max-width: 680px;
    margin: 0;
    color: #475569;
}

.subscription-summary-card {
    margin: 0 0 22px;
    padding: 20px;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    background: #f8fbff;
}

.subscription-summary-card h2 {
    margin: 0 0 8px;
    font-size: 26px;
}

.subscription-summary-card p {
    margin: 0;
    color: #526482;
    line-height: 1.5;
}

.subscription-summary-card p + p {
    margin-top: 5px;
}

.public-errors {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
    padding: 10px 12px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fef2f2;
    color: #991b1b;
    font-weight: 700;
}

.public-form,
.public-form label {
    display: grid;
    gap: 8px;
}

.public-form {
    gap: 16px;
}

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

.public-form label {
    font-weight: 700;
}

.optional-label {
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
}

.public-form input,
.public-form textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font: inherit;
}

.public-flow-page {
    padding: 42px 18px 70px;
}

.signup-panel {
    max-width: 720px;
}

.profile-setup-panel {
    max-width: 840px;
}

.flow-step {
    margin-bottom: 12px;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.wordgroup-help {
    padding: 16px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
}

.wordgroup-help h2 {
    margin: 0 0 8px;
    font-size: 18px;
}

.wordgroup-help p {
    margin: 0;
    color: #475569;
    line-height: 1.5;
}

.short-number-field {
    max-width: 340px;
}

.terms-check {
    display: flex !important;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 10px;
    font-weight: 600 !important;
}

.terms-check input {
    width: auto;
}

.primary-action {
    justify-content: center;
    background: #2563eb;
    color: white;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
}

.introduction-panel {
    max-width: 1040px;
}

.intro-blocks {
    display: grid;
    gap: 16px;
}

.intro-block {
    padding: 20px;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    background: #f8fafc;
}

.intro-block h2 {
    margin: 0 0 8px 0;
    font-size: 22px;
}

.intro-subtitle {
    margin: 0 0 12px 0;
    color: #475569;
    font-weight: 700;
}

.intro-content {
    color: #334155;
    line-height: 1.55;
    white-space: pre-line;
}

.dossier-timeline {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.dossier-timeline-item {
    display: grid;
    grid-template-columns: 140px 1fr auto;
    gap: 16px;
    align-items: start;
    padding: 14px;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    background: #f8fafc;
}

.dossier-timeline-item.current-publication {
    border-color: #93c5fd;
    background: #eff6ff;
}

.timeline-date {
    color: #475569;
    font-weight: 700;
}

.timeline-heading {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.timeline-content h3 {
    margin: 6px 0;
    font-size: 16px;
    line-height: 1.35;
}

.timeline-awards {
    display: grid;
    gap: 3px;
    margin: 2px 0 8px 12px;
    color: #334155;
    font-size: 13px;
}

.timeline-awards div {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: baseline;
}

.timeline-awards span:not(:last-child)::after {
    content: "·";
    margin-left: 4px;
    color: #94a3b8;
}

.timeline-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    color: #64748b;
    font-size: 13px;
}

.current-publication-badge {
    display: inline-flex;
    padding: 3px 8px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
}

.timeline-action a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: white;
    color: #1d4ed8;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.timeline-action a:hover {
    background: #dbeafe;
}

.two-column-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.compact-row {
    display: grid;
    gap: 4px;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

.profile-keyword-line {
    margin-bottom: 6px;
}

.document-table td:last-child {
    white-space: nowrap;
}

@media (max-width: 900px) {
    .topbar,
    .layout,
    .detail-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .sidebar,
    .content {
        flex: 0 0 auto;
        max-width: 100%;
        width: 100%;
    }

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

    .dossier-timeline-item {
        grid-template-columns: 1fr;
    }

    .two-column-list {
        grid-template-columns: 1fr;
    }

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

    .public-site-header,
    .price-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .public-nav {
        width: 100%;
    }

    .public-hero {
        min-height: auto;
        padding: 42px 0 28px;
    }

    .public-hero p {
        font-size: 17px;
    }

    .signal-preview,
    .step-grid,
    .feature-grid {
        grid-template-columns: 1fr;
    }

    .video-placeholder {
        min-height: 240px;
    }

    .step-grid,
    .feature-grid {
        grid-template-columns: 1fr;
    }

    .public-doormat-inner {
        grid-template-columns: 1fr;
    }
}
