:root {
    --public-blue: #007bff;
    --public-blue-hover: #0056b3;
    --public-text: #333;
    --public-muted: #66707a;
    --public-border: #ddd;
    --public-soft: #f7f8fa;
    --public-danger: #b42318;
    --public-success: #177245;
}

button, input { font: inherit; }
a { color: var(--public-blue); }

.public-shell {
    min-height: calc(100vh - 40px);
}

.public-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: -4px 0 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e5e5e5;
}

.public-brand {
    color: var(--public-text);
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
}

.public-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
    flex-wrap: wrap;
    gap: 8px 18px;
    font-size: 14px;
}

.public-nav a,
.link-button {
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--public-blue);
    cursor: pointer;
    text-decoration: none;
}

.public-nav a:hover,
.link-button:hover {
    color: var(--public-blue-hover);
    text-decoration: underline;
}

.public-nav a.survey-nav-button {
    border: 1px solid var(--public-blue);
    border-radius: 999px;
    padding: 7px 14px;
    background: #eef6ff;
    color: var(--public-blue);
    font-weight: 700;
}

.public-nav a.survey-nav-button:hover {
    background: var(--public-blue);
    color: #fff;
    text-decoration: none;
}

.public-nav form { margin: 0; }

.public-language-switcher {
    display: inline-flex;
    gap: 4px;
    padding-left: 4px;
}

.public-language-switcher button {
    min-width: 34px;
    border: 1px solid var(--public-border);
    border-radius: 7px;
    padding: 4px 7px;
    background: #fff;
    color: var(--public-muted);
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.public-language-switcher button.active {
    border-color: var(--public-blue);
    background: var(--public-blue);
    color: #fff;
}

.service-header { position: relative; margin-top: 4px; }
.service-header-with-notifications { padding-right: 56px; }

.notification-bell {
    position: absolute;
    top: 0;
    right: 0;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 2px solid #d7dce1;
    border-radius: 50%;
    background: #fff;
    color: #74808c;
    cursor: pointer;
    transition: .2s ease;
}

.notification-bell svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.notification-bell.has-unread {
    border-color: #24a65a;
    background: #eaf8ef;
    color: #168044;
    animation: notification-pulse 1.8s ease-in-out infinite;
}

.notification-count {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 20px;
    height: 20px;
    border: 2px solid #fff;
    border-radius: 10px;
    padding: 0 4px;
    background: #168044;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 16px;
}

@keyframes notification-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(36, 166, 90, .32); transform: rotate(0); }
    15% { transform: rotate(8deg); }
    30% { box-shadow: 0 0 0 9px rgba(36, 166, 90, 0); transform: rotate(-7deg); }
    45% { transform: rotate(0); }
}

.notification-modal {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(20, 27, 35, .55);
}

.notification-dialog {
    width: min(100%, 620px);
    max-height: min(80vh, 760px);
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .25);
}

.notification-dialog-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--public-border);
}

.notification-close { border: 0; padding: 0 4px; background: transparent; color: #66707a; cursor: pointer; font-size: 30px; line-height: 1; }
.notification-list { max-height: calc(min(80vh, 760px) - 67px); overflow-y: auto; padding: 8px 20px 20px; }
.notification-item { padding: 18px 0; border-bottom: 1px solid #e9ecef; }
.notification-item:last-child { border-bottom: 0; }
.notification-item.unread { margin: 8px -12px 0; border: 1px solid #bde5cc; border-radius: 12px; padding: 16px 12px; background: #f1fbf5; }
.notification-item-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.notification-item time { flex: 0 0 auto; color: var(--public-muted); font-size: 12px; }
.notification-body { line-height: 1.6; overflow-wrap: break-word; word-break: normal; }
.notification-body p { margin: 0 0 16px; white-space: pre-wrap; }
.notification-body p:last-child { margin-bottom: 0; }
.notification-body a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    margin: 2px 3px;
    border-radius: 999px;
    padding: 5px 13px;
    background: var(--public-blue);
    color: #fff;
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none;
}
.notification-body a:hover { background: var(--public-blue-hover); }
.notification-empty { margin: 12px 0 0; border-radius: 10px; padding: 22px 14px; background: var(--public-soft); color: var(--public-muted); text-align: center; }
.modal-open { overflow: hidden; }

.language-switcher button.active {
    border-color: var(--public-blue);
    background-color: var(--public-blue);
    color: #fff;
}

.quota-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px 18px;
    margin: 24px auto;
    padding: 14px 16px;
    border: 1px solid #cfe3fa;
    border-radius: 10px;
    background: #f2f8ff;
    color: #23466c;
    text-align: center;
}

.quota-banner > span { color: #526a83; font-size: 13px; }
.quota-banner .quota-title,
.quota-banner .quota-note,
.quota-banner .quota-price { flex-basis: 100%; }
.quota-banner .quota-price { color: var(--public-blue); font-size: 14px; }
.quota-banner a { font-size: 13px; font-weight: 700; }
.quota-banner.unlimited { border-color: #bee0ca; background: #f0faf4; color: var(--public-success); }

.page-header {
    margin: 8px 0 26px;
    text-align: center;
}

.page-header h1 {
    margin: 0;
    font-size: 24px;
    line-height: 1.3;
}

.page-header p {
    max-width: 610px;
    margin: 9px auto 0;
    color: var(--public-muted);
}

.section-label {
    margin-bottom: 5px;
    color: var(--public-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.public-card {
    padding: 20px;
    border: 2px solid var(--public-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .07);
}

.public-card h2 {
    margin: 0 0 10px;
    font-size: 20px;
    line-height: 1.35;
}

.public-card p { margin: 0 0 14px; }
.public-card p:last-child { margin-bottom: 0; }
.muted { color: var(--public-muted); font-size: 13px; }

.button-primary,
.button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 30px;
    padding: 9px 22px;
    font-weight: 600;
    text-decoration: none;
    transition: .2s ease;
}

.button-primary {
    border: 2px solid var(--public-blue);
    background: var(--public-blue);
    color: #fff;
}

.button-primary:hover:not(:disabled) {
    border-color: var(--public-blue-hover);
    background: var(--public-blue-hover);
}

.button-primary:disabled {
    border-color: #ccc;
    background: #ccc;
    color: #666;
    cursor: not-allowed;
}

.button-secondary {
    border: 2px solid #555;
    background: #fff;
    color: #555;
}

.button-secondary:hover {
    border-color: var(--public-blue);
    background: var(--public-blue);
    color: #fff;
}

.public-alert {
    margin-bottom: 20px;
    padding: 12px 15px;
    border-radius: 8px;
}

.public-alert.error { background: #fff0f0; color: var(--public-danger); }
.public-alert.success { background: #eef9f2; color: var(--public-success); }

.auth-panel {
    max-width: 540px;
    margin: 0 auto;
    padding: 24px;
    border: 2px solid var(--public-border);
    border-radius: 12px;
    background: var(--public-soft);
    text-align: center;
}

.auth-methods {
    display: grid;
    gap: 10px;
}

.auth-provider-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 46px;
    gap: 10px;
    border: 1px solid var(--public-border);
    border-radius: 12px;
    background: #fff;
    color: var(--public-text);
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.auth-provider-button:hover:not(:disabled) {
    border-color: #a7a7ad;
    color: var(--public-text);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .06);
    transform: translateY(-1px);
}

.auth-provider-button:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.google-icon {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    color: #4285f4;
    font-weight: 800;
}

.telegram-icon {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #229ed9;
    color: #fff;
}

.telegram-icon svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.auth-note {
    margin: 16px 0 0;
    color: var(--public-muted);
    font-size: 13px;
}

.account-profile {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e5e5;
}

.account-avatar,
.avatar-placeholder {
    flex: 0 0 auto;
    width: 58px;
    height: 58px;
    border-radius: 50%;
}

.account-avatar { object-fit: cover; }
.avatar-placeholder { display: grid; place-items: center; background: var(--public-blue); color: #fff; font-size: 22px; font-weight: 700; }
.account-profile h1 { margin: 0; font-size: 24px; line-height: 1.25; }
.account-profile p { margin: 3px 0 0; color: var(--public-muted); overflow-wrap: anywhere; }
.account-history-link { margin-left: auto; white-space: nowrap; }

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

.account-grid-single { grid-template-columns: 1fr; }

.card-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.card-title-row h2 { margin-bottom: 0; }

.subscription-card.active { border-color: var(--public-blue); background: #f2f8ff; }
.status-badge { display: inline-flex; padding: 5px 10px; border-radius: 30px; background: #dff1e6; color: var(--public-success); font-size: 13px; font-weight: 700; }
.status-badge.neutral { background: #edf1f5; color: #59636e; }
.status-badge.failed { background: #fde8e8; color: #b42318; }
.status-badge.pending { background: #fff3cd; color: #7a5d00; }
.status-badge.test { background: #e8eef7; color: #43546a; }
.price { margin: 18px 0; color: var(--public-text); font-size: 30px; font-weight: 700; }
.price small { color: var(--public-muted); font-size: 14px; font-weight: 400; }
.account-action { width: 100%; }
.plan-benefits { margin: 0 0 18px 20px; }
.plan-benefits li { margin-bottom: 7px; }
.payment-note { margin-top: 9px !important; }
.payment-test-banner { margin: 12px 0 0 !important; border-radius: 9px; padding: 10px 12px; background: #fff5d9; color: #735d17; font-size: 13px; }

.payment-options {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.account-grid-single .payment-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.payment-option {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid #dce1e6;
    border-radius: 11px;
    padding: 16px;
    background: #fff;
}

.payment-option.featured { border-color: #9cc8fb; background: #f7fbff; }
.payment-option h3 { margin: 3px 0 6px; font-size: 17px; }
.payment-option-price { margin-bottom: 7px; font-size: 24px; font-weight: 800; }
.payment-option-price small { color: var(--public-muted); font-size: 12px; font-weight: 600; }
.payment-option-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.renewal-block {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--public-border);
}

.renewal-block h3 {
    margin: 0 0 8px;
    font-size: 17px;
}

.quota-number {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 9px 0 15px;
}

.quota-number strong { color: var(--public-blue); font-size: 46px; line-height: 1; }
.quota-number span { color: var(--public-muted); }
.quota-progress { height: 8px; margin-bottom: 13px; overflow: hidden; border-radius: 30px; background: #e7e7e7; }
.quota-progress span { display: block; height: 100%; border-radius: inherit; background: var(--public-blue); }
.usage-history { margin-top: 16px; }
.history-list { display: grid; }
.history-list div { display: flex; justify-content: space-between; gap: 15px; padding: 10px 0; border-bottom: 1px solid #e7e7e7; }
.history-list div:last-child { border-bottom: 0; }

.page-header-left {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    text-align: left;
}

.page-header-left p { margin-left: 0; }
.payment-summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.payment-summary > div { display: grid; gap: 4px; }
.payment-summary span { color: var(--public-muted); }
.payment-summary small { color: var(--public-muted); font-size: 12px; }
.payment-summary strong { font-size: 24px; }
.payment-history-card { padding: 0; overflow: hidden; }
.responsive-table { overflow-x: auto; }
.public-table { width: 100%; border-collapse: collapse; }
.public-table th, .public-table td { padding: 14px 16px; border-bottom: 1px solid #e7eaed; text-align: left; white-space: nowrap; }
.public-table th { background: var(--public-soft); color: var(--public-muted); font-size: 12px; letter-spacing: .05em; text-transform: uppercase; }
.public-table tbody tr:last-child td { border-bottom: 0; }
.payment-provider { white-space: normal !important; min-width: 190px; }
.payment-provider strong, .payment-provider small { display: block; }
.payment-provider small { max-width: 230px; margin-top: 4px; color: var(--public-muted); font-size: 11px; overflow-wrap: anywhere; }
.empty-state { padding: 32px 20px; text-align: center; }
.empty-state h2 { margin-bottom: 8px; }

.support-card { max-width: 680px; margin: 0 auto; }
.survey-card, .survey-thanks { max-width: 760px; margin: 0 auto; }
.public-form { display: grid; gap: 18px; }
.public-form label { display: grid; gap: 7px; font-weight: 700; }
.public-form input, .public-form textarea {
    width: 100%;
    border: 1px solid #ccd2d8;
    border-radius: 9px;
    padding: 11px 12px;
    background: #fff;
    color: var(--public-text);
    outline: none;
}
.public-form input:focus, .public-form textarea:focus { border-color: var(--public-blue); box-shadow: 0 0 0 3px rgba(0, 123, 255, .12); }
.public-form textarea { resize: vertical; line-height: 1.55; }
.public-form .button-primary { justify-self: start; border: 2px solid var(--public-blue); cursor: pointer; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.support-user { display: grid; gap: 3px; border-radius: 10px; padding: 13px 15px; background: var(--public-soft); }
.support-user span, .support-user small { color: var(--public-muted); }
.support-history { display: grid; gap: 14px; max-width: 680px; margin: 30px auto 0; }
.support-history > h2 { margin: 0 0 2px; font-size: 20px; }
.support-history-card { display: grid; gap: 16px; }
.support-history-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.support-history-card h3 { margin: 0 0 5px; font-size: 17px; line-height: 1.35; }
.support-history-card time { color: var(--public-muted); font-size: 12px; }
.support-history-message { white-space: pre-wrap; line-height: 1.6; overflow-wrap: anywhere; }
.support-public-status { flex: 0 0 auto; border-radius: 999px; padding: 6px 10px; background: #edf0f3; color: #5c6670; font-size: 12px; font-weight: 700; }
.support-public-status.status-new { background: #e8f3ff; color: #0868c4; }
.support-public-status.status-closed { background: #e8f6ed; color: #176b38; }
.support-answer { display: grid; gap: 7px; border-left: 3px solid var(--public-blue); border-radius: 0 10px 10px 0; padding: 14px 16px; background: #f1f7ff; }
.support-answer > div { white-space: pre-wrap; line-height: 1.6; overflow-wrap: anywhere; }
.support-answer time { justify-self: end; }
.support-awaiting { margin: 0; color: var(--public-muted); font-size: 13px; }
.support-history-empty { color: var(--public-muted); text-align: center; }
.support-card > h2 { margin-bottom: 18px; }
.support-conversation-card {
    display: grid;
    gap: 12px;
    color: var(--public-text);
    text-decoration: none;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.support-conversation-card:hover {
    border-color: #9acbff;
    box-shadow: 0 8px 24px rgba(0, 122, 255, .1);
    transform: translateY(-1px);
}
.support-conversation-main { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.support-conversation-card h3 { margin: 0 0 4px; font-size: 17px; line-height: 1.35; }
.support-conversation-card time { color: var(--public-muted); font-size: 12px; }
.support-conversation-card p { margin: 0; color: #4e5965; line-height: 1.5; }
.support-message-count { color: var(--public-blue); font-size: 12px; font-weight: 700; }

.support-chat-page-header { max-width: 760px; margin: 8px auto 18px; }
.support-chat-page-header > a { display: inline-flex; margin-bottom: 14px; color: var(--public-blue); font-weight: 700; text-decoration: none; }
.support-chat-page-header > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.support-chat-page-header h1 { margin: 0; font-size: 24px; line-height: 1.3; }
.support-chat-card { max-width: 760px; margin: 0 auto; padding: 0; overflow: hidden; }
.support-chat-stream {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 320px;
    max-height: 58vh;
    overflow-y: auto;
    padding: 22px;
    background: #f2f4f7;
}
.support-chat-bubble {
    display: grid;
    gap: 6px;
    width: fit-content;
    max-width: 78%;
    border: 1px solid #e0e4e8;
    border-radius: 18px 18px 18px 6px;
    padding: 11px 14px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(20, 32, 48, .05);
}
.support-chat-bubble.user {
    align-self: flex-end;
    border-color: var(--public-blue);
    border-radius: 18px 18px 6px 18px;
    background: var(--public-blue);
    color: #fff;
}
.support-chat-bubble > span { font-size: 12px; font-weight: 800; }
.support-chat-bubble.admin > span { color: var(--public-blue); }
.support-chat-bubble > div { white-space: pre-wrap; line-height: 1.55; overflow-wrap: anywhere; }
.support-chat-bubble time { justify-self: end; color: var(--public-muted); font-size: 11px; }
.support-chat-bubble.user time { color: rgba(255, 255, 255, .75); }
.support-chat-composer { display: grid; gap: 10px; border-top: 1px solid var(--public-border); padding: 18px 20px 20px; background: #fff; }
.support-chat-composer label { font-size: 13px; font-weight: 800; }
.support-chat-composer textarea {
    width: 100%;
    min-height: 92px;
    border: 1px solid #ccd2d8;
    border-radius: 14px;
    padding: 12px 14px;
    resize: vertical;
    color: var(--public-text);
    font: inherit;
    line-height: 1.5;
    outline: none;
}
.support-chat-composer textarea:focus { border-color: var(--public-blue); box-shadow: 0 0 0 3px rgba(0, 123, 255, .12); }
.support-chat-composer .button-primary { justify-self: end; border: 2px solid var(--public-blue); cursor: pointer; }
@media (max-width: 600px) {
    .support-conversation-main,
    .support-chat-page-header > div { align-items: flex-start; }
    .support-chat-page-header h1 { font-size: 20px; }
    .support-chat-stream { min-height: 300px; padding: 14px; }
    .support-chat-bubble { max-width: 90%; }
    .support-chat-composer { padding: 14px; }
}
.honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

.survey-form { gap: 26px; }
.survey-question { margin: 0; border: 0; padding: 0; }
.survey-question > span, .survey-question legend { margin-bottom: 10px; font-size: 17px; line-height: 1.5; }
.survey-question legend { font-weight: 700; }
.survey-price-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.survey-price-option {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px !important;
    margin: 0;
    border: 1px solid #ccd2d8;
    border-radius: 10px;
    padding: 12px 9px;
    background: #fff;
    cursor: pointer;
}
.survey-price-option:has(input:checked) { border-color: var(--public-blue); background: #eef6ff; color: var(--public-blue); }
.survey-price-option input { width: auto; margin: 0; accent-color: var(--public-blue); }
.survey-thanks { padding: 36px; text-align: center; }
.survey-thanks h2 { margin-top: 12px; }
.survey-thanks .button-primary { margin-top: 8px; }
.survey-thanks-mark { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto; border-radius: 50%; background: #dff1e6; color: var(--public-success); font-size: 28px; font-weight: 800; }

.legal-document { min-height: 320px; }
.legal-document__content { white-space: pre-wrap; line-height: 1.7; overflow-wrap: anywhere; }
.legal-document__empty { padding: 20px; border-radius: 10px; background: var(--public-soft); color: var(--public-muted); text-align: center; }

.site-footer {
    margin-top: 40px;
    padding: 20px 0 4px;
    border-top: 1px solid #ccc;
    font-size: 14px;
    text-align: center;
}

.site-footer nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 20px;
}

.site-footer a { color: var(--public-blue); text-decoration: none; }
.site-footer a:hover { color: var(--public-blue-hover); }
.footer-note { margin-bottom: 12px; font-weight: 600; }

.payment-acceptance {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--public-muted);
    font-size: 12px;
    line-height: 1.4;
}

.payment-acceptance-footer {
    margin-bottom: 18px;
    gap: 8px;
}

.payment-acceptance-footer .payment-mark {
    width: 70px;
    height: 40px;
    padding: 5px 9px;
}

.payment-acceptance-footer .payment-mark-visa img { width: 50px; }
.payment-acceptance-footer .payment-mark-mastercard img { width: 42px; }

.payment-acceptance-label {
    color: var(--public-text);
    font-weight: 700;
}

.payment-acceptance-marks {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.payment-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 82px;
    height: 44px;
    border: 1px solid #e0e3e7;
    border-radius: 9px;
    padding: 6px 10px;
    background: #fff;
}

.payment-mark img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
}

.payment-mark-visa img { width: 58px; }
.payment-mark-mastercard img { width: 50px; }

@media (max-width: 600px) {
    .public-shell { min-height: calc(100vh - 40px); }
    .public-topbar { align-items: flex-start; }
    .public-nav { align-items: flex-end; flex-direction: column; gap: 5px; }
    .page-header h1, .account-profile h1 { font-size: 20px; }
    .account-grid { grid-template-columns: 1fr; }
    .account-grid-single .payment-options { grid-template-columns: 1fr; }
    .public-card, .auth-panel { padding: 16px; }
    .account-profile { align-items: flex-start; flex-wrap: wrap; }
    .account-history-link { width: 100%; margin-left: 0; }
    .quota-banner { align-items: flex-start; flex-direction: column; text-align: left; }
    .page-header-left { align-items: stretch; flex-direction: column; }
    .form-grid { grid-template-columns: 1fr; }
    .survey-price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .notification-item-heading { flex-direction: column; gap: 2px; }
}

/* Unified iOS-inspired system for internal pages. The home page remains untouched. */
body.internal-page {
    --public-blue: #007aff;
    --public-blue-hover: #0066d6;
    --public-text: #1c1c1e;
    --public-muted: #6e6e73;
    --public-border: #d1d1d6;
    --public-soft: #f2f2f7;
    margin: 0;
    background: #f2f2f7;
    color: var(--public-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
}

.internal-page *,
.internal-page *::before,
.internal-page *::after {
    box-sizing: border-box;
}

.internal-page .container.public-shell {
    width: min(calc(100% - 32px), 800px);
    min-height: calc(100vh - 32px);
    margin: 16px auto;
    padding: 16px 18px 26px;
    border-radius: 24px;
    background: #f2f2f7;
    box-shadow: none;
}

.internal-page .public-topbar {
    min-height: 58px;
    margin: 0 0 22px;
    border: 1px solid rgba(60, 60, 67, .08);
    border-radius: 18px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .03), 0 8px 28px rgba(0, 0, 0, .04);
    backdrop-filter: blur(18px);
}

.internal-page .public-brand {
    color: var(--public-text);
    font-size: 15px;
    font-weight: 700;
}

.internal-page .public-nav {
    gap: 7px 14px;
    font-size: 13px;
}

.internal-page .public-nav a,
.internal-page .link-button {
    color: var(--public-blue);
}

.internal-page .public-nav a.survey-nav-button {
    border: 0;
    border-radius: 11px;
    padding: 8px 12px;
    background: #e8f2ff;
    color: var(--public-blue);
}

.internal-page .public-language-switcher {
    gap: 2px;
    border-radius: 10px;
    padding: 2px;
    background: #e9e9ee;
}

.internal-page .public-language-switcher button {
    min-width: 32px;
    border: 0;
    border-radius: 8px;
    padding: 5px 7px;
    background: transparent;
}

.internal-page .public-language-switcher button.active {
    background: #fff;
    color: var(--public-blue);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
}

.internal-page .page-header {
    margin: 6px 0 18px;
    text-align: left;
}

.internal-page .page-header h1 {
    font-size: clamp(25px, 4vw, 32px);
    letter-spacing: -.025em;
}

.internal-page .page-header p {
    margin-left: 0;
}

.internal-page .section-label {
    color: #8e8e93;
    font-size: 11px;
    letter-spacing: .06em;
}

.internal-page .public-card,
.internal-page .auth-panel,
.internal-page .account-profile {
    border: 1px solid rgba(60, 60, 67, .08);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 10px 32px rgba(0, 0, 0, .04);
}

.internal-page .public-card {
    padding: 18px;
}

.internal-page .auth-panel {
    padding: 26px;
}

.internal-page .account-profile {
    padding: 18px;
    margin-bottom: 16px;
}

.internal-page .account-profile h1 {
    font-size: 23px;
    letter-spacing: -.02em;
}

.internal-page .button-primary,
.internal-page .button-secondary {
    min-height: 40px;
    border: 0;
    border-radius: 12px;
    padding: 9px 15px;
    font-size: 14px;
    font-weight: 700;
}

.internal-page .button-primary {
    background: var(--public-blue);
}

.internal-page .button-primary:hover:not(:disabled) {
    background: var(--public-blue-hover);
}

.internal-page .button-primary:disabled {
    background: #d1d1d6;
    color: #8e8e93;
}

.internal-page .button-secondary {
    background: #e8f2ff;
    color: var(--public-blue);
}

.internal-page .button-secondary:hover {
    background: #d8eaff;
    color: var(--public-blue-hover);
}

.internal-page .subscription-card.active,
.internal-page .payment-option.featured {
    border-color: rgba(0, 122, 255, .2);
    background: #f7fbff;
}

.internal-page .payment-options {
    gap: 10px;
    margin-top: 14px;
}

.internal-page .payment-option {
    gap: 10px;
    border: 1px solid rgba(60, 60, 67, .1);
    border-radius: 16px;
    padding: 14px;
}

.internal-page .payment-option-price {
    font-size: 22px;
}

.internal-page .status-badge {
    padding: 5px 8px;
    border-radius: 9px;
    font-size: 11px;
}

.internal-page .public-form input,
.internal-page .public-form textarea {
    border: 1px solid rgba(60, 60, 67, .16);
    border-radius: 12px;
    padding: 12px 13px;
    background: #fff;
}

.internal-page .public-form input:focus,
.internal-page .public-form textarea:focus {
    border-color: var(--public-blue);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, .12);
}

.internal-page .payment-history-card {
    padding: 0;
    overflow: hidden;
}

.internal-page .public-table {
    table-layout: auto;
    font-size: 13px;
}

.internal-page .public-table th,
.internal-page .public-table td {
    padding: 11px 8px;
}

.internal-page .public-table th {
    background: #f7f7fa;
    font-size: 10px;
    letter-spacing: .025em;
}

.internal-page .payment-date strong,
.internal-page .payment-date small {
    display: block;
}

.internal-page .payment-date small {
    margin-top: 2px;
    color: var(--public-muted);
    font-size: 10px;
}

.internal-page .payment-provider {
    min-width: 108px;
}

.internal-page .payment-provider small {
    max-width: 112px;
    margin-top: 2px;
    font-size: 9px;
}

.internal-page .site-footer {
    margin-top: 28px;
    border-color: rgba(60, 60, 67, .14);
}

.internal-page .notification-dialog {
    border: 1px solid rgba(60, 60, 67, .1);
    border-radius: 22px;
}

@media (max-width: 600px) {
    .internal-page .container.public-shell {
        width: min(calc(100% - 16px), 800px);
        margin: 8px auto;
        padding: 10px 10px 22px;
        border-radius: 20px;
    }

    .internal-page .public-topbar {
        align-items: flex-start;
        padding: 10px;
    }

    .internal-page .public-nav {
        align-items: flex-end;
        flex-direction: column;
    }

    .internal-page .account-profile {
        padding: 15px;
    }
}

/* Compact survey heading on desktop and mobile. */
.survey-page .page-header {
    max-width: 640px;
    margin-right: auto;
    margin-left: auto;
    text-align: center;
}

.survey-page .page-header h1 {
    font-size: 23px;
    line-height: 1.3;
    letter-spacing: -.015em;
}

.survey-page .page-header p {
    margin-right: auto;
    margin-left: auto;
    font-size: 14px;
    line-height: 1.5;
}

/* Large, orderly touch targets for the mobile header. */
@media (max-width: 700px) {
    .public-topbar,
    .internal-page .public-topbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch;
        gap: 9px;
        min-height: 0;
        margin-bottom: 16px;
        padding: 10px;
    }

    .public-brand {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 46px;
        border-radius: 12px;
        padding: 9px 12px;
        background: #f2f2f7;
        color: var(--public-text);
        font-size: 14px;
        text-align: center;
    }

    .public-nav,
    .internal-page .public-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
        width: 100%;
        margin: 0;
        gap: 8px;
        font-size: 14px;
    }

    .public-nav > a,
    .public-logout-form .link-button {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 46px;
        width: 100%;
        border: 0;
        border-radius: 12px;
        padding: 9px 10px;
        background: #eef5ff;
        color: var(--public-blue);
        font-size: 14px;
        font-weight: 700;
        line-height: 1.2;
        text-align: center;
        text-decoration: none;
    }

    .public-nav > a:hover,
    .public-logout-form .link-button:hover {
        background: #deecff;
        color: var(--public-blue-hover);
        text-decoration: none;
    }

    .public-nav > a.survey-nav-button,
    .internal-page .public-nav > a.survey-nav-button {
        border: 0;
        border-radius: 12px;
        padding: 9px 10px;
        background: var(--public-blue);
        color: #fff;
    }

    .public-logout-form {
        grid-column: 1 / -1;
        width: 100%;
    }

    .public-language-switcher,
    .internal-page .public-language-switcher {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        min-height: 46px;
        gap: 3px;
        border-radius: 12px;
        padding: 3px;
        background: #e9e9ee;
    }

    .public-language-switcher button,
    .internal-page .public-language-switcher button {
        min-width: 0;
        min-height: 40px;
        border: 0;
        border-radius: 9px;
        padding: 8px 10px;
        font-size: 14px;
    }

    .internal-page .public-card {
        padding: 15px;
    }

    .internal-page .account-profile {
        gap: 12px;
    }

    .internal-page .account-profile h1 {
        font-size: 20px;
    }

    .internal-page .card-title-row h2 {
        font-size: 18px;
    }

    .internal-page .renewal-block {
        margin-top: 18px;
        padding-top: 17px;
    }

    .internal-page .account-grid-single .payment-options {
        grid-template-columns: 1fr;
    }

    .survey-page .page-header h1 {
        font-size: 20px;
        line-height: 1.3;
    }

    .survey-page .page-header p {
        font-size: 13px;
    }
}

/* The account header contains only Home and the compact language control. */
.account-dashboard-page .account-logout {
    display: flex;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(60, 60, 67, .14);
}

.account-dashboard-page .account-logout form {
    margin: 0;
}

.account-dashboard-page .account-logout-button {
    min-height: 42px;
    border: 1px solid rgba(255, 59, 48, .22);
    border-radius: 12px;
    padding: 9px 18px;
    background: rgba(255, 59, 48, .08);
    color: #d92d20;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.account-dashboard-page .account-logout-button:hover {
    background: rgba(255, 59, 48, .14);
}

@media (max-width: 700px) {
    .account-area-page .public-topbar,
    .internal-page.account-area-page .public-topbar {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 8px 10px;
    }

    .account-area-page .public-brand {
        flex: 0 0 auto;
        width: auto;
        min-height: 40px;
        padding: 8px 12px;
    }

    .account-area-page .public-nav,
    .internal-page.account-area-page .public-nav {
        display: flex;
        flex: 0 0 auto;
        align-items: center;
        width: auto;
        margin-left: auto;
        gap: 0;
    }

    .account-area-page .public-language-switcher,
    .internal-page.account-area-page .public-language-switcher {
        display: flex;
        width: auto;
        min-height: 40px;
        gap: 2px;
        padding: 3px;
    }

    .account-area-page .public-language-switcher button,
    .internal-page.account-area-page .public-language-switcher button {
        width: 38px;
        min-width: 38px;
        min-height: 34px;
        padding: 6px;
    }

    .account-dashboard-page .account-logout {
        justify-content: flex-end;
    }

    .account-dashboard-page .account-logout-button {
        min-height: 46px;
    }
}

/* Compact primary actions in the home header. */
.home-topbar-actions {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
}

.nav-label-short,
.notification-label {
    display: none;
}

.home-page .home-topbar-actions > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border-radius: 999px;
    padding: 7px 13px;
    background: #eef6ff;
    font-weight: 700;
    line-height: 1.15;
    white-space: nowrap;
}

.home-page .home-topbar-actions > a:hover {
    background: #deecff;
    text-decoration: none;
}

.home-page .home-topbar-actions .notification-bell {
    position: relative;
    top: auto;
    right: auto;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
}

.home-page .home-topbar-actions .notification-bell svg {
    width: 20px;
    height: 20px;
}

.payment-unavailable-notice {
    margin: 12px 0 10px;
    border-radius: 10px;
    padding: 9px 11px;
    background: #fff4e5;
    color: #9a5b00;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.recurring-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 12px 0;
    border: 1px solid #b9e3ca;
    border-radius: 12px;
    padding: 12px;
    background: #f0faf4;
}

.recurring-summary.payment_failed,
.recurring-summary.setup_failed {
    border-color: #f2c5c1;
    background: #fff4f3;
}

.recurring-summary strong,
.recurring-summary small {
    display: block;
}

.recurring-summary small {
    margin-top: 4px;
    color: var(--public-muted);
    font-size: 12px;
}

.recurring-summary form {
    flex: 0 0 auto;
    margin: 0;
}

.recurring-cancel-button {
    min-height: 38px;
    border: 1px solid rgba(255, 59, 48, .24);
    border-radius: 10px;
    padding: 8px 12px;
    background: #fff;
    color: #d92d20;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.payment-option-note {
    display: block;
    margin-top: 5px;
    color: var(--public-muted);
    font-size: 12px;
}

.billing-payment-selector {
    position: relative;
}

.payment-options-main {
    align-items: start;
}

.monthly-payment-column,
.monthly-payment-column .billing-payment-selector,
.monthly-payment-column .billing-panel,
.monthly-payment-column .payment-option {
    width: 100%;
}

.billing-mode-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.billing-mode-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    margin: 0 0 10px;
    border-radius: 12px;
    padding: 3px;
    background: #e9e9ee;
}

.billing-mode-switch label {
    min-height: 40px;
    border-radius: 9px;
    padding: 10px 12px;
    color: var(--public-muted);
    font-size: 13px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
}

#billing-choice-one-time:checked ~ .billing-mode-switch label[for="billing-choice-one-time"],
#billing-choice-subscription:checked ~ .billing-mode-switch label[for="billing-choice-subscription"] {
    background: #fff;
    color: var(--public-blue);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
}

#billing-choice-one-time:focus-visible ~ .billing-mode-switch label[for="billing-choice-one-time"],
#billing-choice-subscription:focus-visible ~ .billing-mode-switch label[for="billing-choice-subscription"] {
    outline: 3px solid rgba(0, 122, 255, .25);
    outline-offset: 1px;
}

.billing-panel {
    display: none;
}

#billing-choice-one-time:checked ~ .billing-panel-one-time,
#billing-choice-subscription:checked ~ .billing-panel-subscription {
    display: block;
}

.recurring-charge-notice {
    margin: 10px 0 0 !important;
    color: #425b76;
    font-size: 13px;
    line-height: 1.45;
}

.recurring-payment-form {
    display: grid;
    gap: 10px;
}

.recurring-consent {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 9px;
    align-items: start;
    border: 1px solid #cfe0f4;
    border-radius: 10px;
    padding: 11px;
    background: #fff;
    color: #34475c;
    font-size: 12px;
    line-height: 1.45;
    cursor: pointer;
}

.recurring-consent input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--public-blue);
}

.recurring-consent.disabled {
    opacity: .65;
    cursor: default;
}

.subscription-terms-link {
    justify-self: start;
    font-size: 12px;
    font-weight: 700;
}

.monthly-payment-option,
.yearly-payment-option {
    min-height: 238px;
}

@media (max-width: 700px) {
    .home-page .public-topbar {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 8px 4px 12px;
    }

    .home-page .public-nav {
        display: flex;
        flex-direction: row;
        align-items: center;
        flex-wrap: nowrap;
        width: auto;
        max-width: 100%;
        margin: 0 auto;
        gap: 5px;
    }

    .home-page .home-topbar-actions {
        width: auto;
        max-width: 100%;
        gap: 5px;
    }

    .home-page .home-topbar-actions > a {
        flex: 0 0 auto;
        width: auto;
        min-height: 42px;
        border-radius: 12px;
        padding: 8px 10px;
        font-size: 12px;
    }

    .home-page .nav-label-full {
        display: none;
    }

    .home-page .nav-label-short,
    .home-page .notification-label {
        display: inline;
    }

    .home-page .home-topbar-actions .notification-bell {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: auto;
        min-width: 42px;
        height: 42px;
        border-width: 1px;
        border-radius: 12px;
        padding: 8px 10px;
        gap: 5px;
        font-size: 12px;
        font-weight: 700;
        line-height: 1.15;
        white-space: nowrap;
    }

    .home-page .home-topbar-actions .notification-bell svg {
        width: 18px;
        height: 18px;
    }

    .home-page .public-language-switcher,
    .internal-page.home-page .public-language-switcher {
        display: inline-flex;
        grid-column: auto;
        width: auto;
        min-height: 0;
        gap: 3px;
        padding: 0;
        background: transparent;
    }

    .home-page .public-language-switcher button {
        width: auto;
        min-width: 32px;
        min-height: 34px;
        padding: 5px;
        font-size: 12px;
    }

    .recurring-summary {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .recurring-cancel-button {
        min-height: 42px;
    }
}

@media (max-width: 360px) {
    .home-page .home-topbar-actions {
        gap: 4px;
    }

    .home-page .home-topbar-actions > a,
    .home-page .home-topbar-actions .notification-bell {
        padding-right: 7px;
        padding-left: 7px;
        font-size: 11px;
    }

    .home-page .home-topbar-actions .notification-bell {
        gap: 3px;
    }

    .home-page .notification-label {
        display: none;
    }

    .home-page .home-topbar-actions .notification-bell {
        width: 38px;
        min-width: 38px;
        padding-right: 8px;
        padding-left: 8px;
    }

    .home-page .public-language-switcher button {
        min-width: 30px;
        padding-right: 4px;
        padding-left: 4px;
    }
}
