:root {
    --brand-800: #4f872a;
    --brand-700: #619f35;
    --brand-600: #71ad3b;
    --brand-200: #cfe2bc;
    --brand-100: #e1edd5;
    --brand-50: #f1f7eb;
    --blue-700: #357b92;
    --blue-100: #d8edf2;
    --blue-50: #edf7f9;
    --green-700: #3e7f35;
    --green-100: #d9eacf;
    --green-50: #eff7ea;
    --ink-900: #243020;
    --ink-700: #4c5a48;
    --ink-500: #788275;
    --line: #dde5d8;
    --surface: #ffffff;
    --page: #f1f5ef;
    --shadow: 0 18px 46px rgba(51, 79, 40, 0.10);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--page);
}

body {
    display: grid;
    min-height: 100vh;
    margin: 0;
    padding: clamp(16px, 2.4vw, 32px);
    color: var(--ink-900);
    background:
        radial-gradient(circle at 9% 0%, rgba(113, 173, 59, 0.14), transparent 28rem),
        radial-gradient(circle at 100% 100%, rgba(113, 173, 59, 0.08), transparent 32rem),
        var(--page);
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    place-items: center;
}

a {
    color: inherit;
}

.icon-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.page-shell {
    width: min(100%, var(--shell-width, 1480px));
    margin: 0 auto;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.diaochan-page .page-shell {
    width: min(100%, var(--shell-width, 900px));
}

.hero {
    position: relative;
    display: flex;
    align-items: stretch;
    min-height: 118px;
    overflow: hidden;
    color: var(--ink-900);
    background: linear-gradient(100deg, #d5e8c2 0%, #e5f0da 62%, #edf5e7 100%);
}

.hero::after {
    position: absolute;
    right: -100px;
    bottom: -195px;
    width: 420px;
    height: 420px;
    border: 70px solid rgba(113, 173, 59, 0.07);
    border-radius: 50%;
    content: "";
}

.product-brand {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 0 0 238px;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand-700), var(--brand-600));
    text-decoration: none;
    transition: filter 160ms ease;
}

.product-brand:hover {
    filter: brightness(1.035);
}

.logo-fallback {
    display: flex;
    align-items: center;
    gap: 9px;
}

.logo-fallback > img {
    width: 44px;
    height: 44px;
}

.logo-fallback strong,
.logo-fallback small {
    display: block;
    color: #ffffff;
}

.logo-fallback strong {
    font-size: 27px;
    letter-spacing: -0.035em;
    line-height: 1;
}

.logo-fallback small {
    margin-top: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
}

.hero-copy {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 1;
    align-items: center;
    align-self: center;
    flex-direction: column;
    justify-content: center;
    padding: 22px 28px;
    text-align: center;
}

.eyebrow,
.section-kicker {
    margin: 0 0 6px;
    color: var(--brand-800);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0;
    font-size: clamp(28px, 2.7vw, 40px);
    font-weight: 720;
    letter-spacing: -0.035em;
    line-height: 1;
}

.hero-title-long {
    max-width: 720px;
    font-size: clamp(22px, 2.15vw, 32px) !important;
    line-height: 1.15 !important;
}

.customer-logo {
    display: block;
    width: min(210px, 100%);
    height: 45px;
    object-fit: contain;
    object-position: center;
}

.customer-identity {
    display: grid;
    min-height: 54px;
    place-items: center;
}

.customer-identity .customer-logo {
    display: none;
}

.customer-identity.has-logo .customer-logo {
    display: block;
}

.customer-identity.has-logo .customer-name-fallback {
    display: none;
}

.client-panel {
    display: flex;
    align-items: center;
    gap: 24px;
    margin: 20px 24px 0;
    padding: 14px 16px;
    border: 1px solid var(--brand-200);
    border-radius: 14px;
    background: var(--brand-50);
}

.client-intro,
.client-actions {
    display: flex;
    align-items: center;
}

.client-intro {
    min-width: 235px;
}

.section-icon {
    display: grid;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    margin-right: 12px;
    place-items: center;
    border-radius: 11px;
    color: var(--brand-700);
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(79, 135, 42, 0.08);
}

.section-icon svg,
.primary-action svg,
.download-link svg,
.app-icon svg,
.arrow-icon {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.section-icon svg {
    width: 21px;
    height: 21px;
}

.client-intro h2 {
    margin: 0 0 3px;
    font-size: 15px;
    line-height: 1.2;
}

.client-intro p {
    margin: 0;
    color: var(--ink-500);
    font-size: 12px;
}

.client-actions {
    flex: 1;
    justify-content: flex-end;
    gap: 10px;
}

.primary-action,
.download-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 650;
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.primary-action {
    gap: 8px;
    min-width: 128px;
    padding: 0 16px;
    color: #ffffff;
    background: var(--brand-700);
    box-shadow: 0 6px 14px rgba(79, 135, 42, 0.2);
}

.primary-action svg,
.download-link svg {
    width: 16px;
    height: 16px;
}

.action-divider {
    width: 1px;
    height: 28px;
    margin: 0 2px;
    background: var(--brand-200);
}

.download-label {
    color: var(--ink-500);
    font-size: 11px;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.download-link {
    gap: 6px;
    padding: 0 12px;
    border: 1px solid var(--brand-200);
    color: var(--ink-700);
    background: rgba(255, 255, 255, 0.72);
}

.accounts-section {
    padding: 24px;
}

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

.section-kicker {
    margin-bottom: 4px;
    color: var(--brand-700);
}

.section-heading h2 {
    margin: 0;
    font-size: 22px;
    letter-spacing: -0.025em;
}

.account-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.account-grid .account-card {
    flex: 0 1 var(--account-card-basis, calc((100% - 24px) / 3));
    width: var(--account-card-basis, calc((100% - 24px) / 3));
}

.diaochan-page .accounts-section {
    padding-top: 28px;
}

.diaochan-page .section-heading {
    margin-bottom: 18px;
}

.diaochan-account-card {
    padding: 17px;
}

.account-card.test-account-card::before {
    background: var(--account-accent, #f26b4f);
}

.test-account-card .account-index {
    color: var(--account-accent-dark, #c84d35);
    background: var(--account-accent-soft, #fff0ec);
}

.test-account-card .account-heading p {
    color: var(--account-accent-dark, #c84d35);
    font-weight: 650;
}

.diaochan-product-list {
    display: grid;
    gap: 8px;
}

.diaochan-product-row {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 8px 9px;
    border: 1px solid #e2e8df;
    border-radius: 11px;
    color: var(--brand-800);
    background: #fafcf9;
}

.product-row-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 9px;
    color: currentColor;
    background: #ffffff;
}

.product-row-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.product-row-copy strong,
.product-row-copy small {
    display: block;
}

.product-row-copy strong {
    color: var(--ink-900);
    font-size: 13px;
}

.product-row-copy small {
    margin-top: 4px;
    color: var(--ink-500);
    font-size: 10px;
}

.product-row-action {
    min-width: 66px;
    height: 34px;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    color: #ffffff;
    background: var(--account-accent, var(--brand-700));
    box-shadow: 0 4px 10px var(--account-accent-shadow, rgba(79, 135, 42, 0.18));
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    line-height: 34px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: filter 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.product-row-action:hover {
    filter: brightness(0.94);
    transform: translateY(-1px);
}

.test-account-card .product-row-action {
    background: var(--account-accent, #f26b4f);
    box-shadow: 0 4px 10px var(--account-accent-shadow, rgba(242, 107, 79, 0.2));
}

.product-row-action:disabled {
    color: #98a096;
    background: #f0f2ef;
    cursor: not-allowed;
}

.diaochan-product-row.product-go {
    color: #357b92;
}

.diaochan-product-row.product-mes {
    color: #7566a8;
}

.diaochan-product-row.product-srm {
    color: #54739c;
}

.single-product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.single-product-card {
    position: relative;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) 118px;
    grid-template-rows: 1fr;
    align-items: center;
    gap: 16px;
    min-height: 92px;
    padding: 14px 18px;
    overflow: hidden;
    border: 1px solid #dbe3d6;
    border-radius: 16px;
    color: var(--brand-800);
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(43, 66, 35, 0.065);
}

.single-product-card::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.82;
    content: "";
}

.product-card-icon {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 14px;
    color: currentColor;
    background: #f1f6ed;
}

.product-card-icon svg,
.product-card-action svg {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.product-card-icon svg {
    width: 26px;
    height: 26px;
}

.product-card-content {
    display: block;
    min-width: 0;
}

.product-card-content strong,
.product-card-content small,
.product-card-content > span {
    display: block;
}

.product-card-content strong {
    color: var(--ink-900);
    font-size: 18px;
    line-height: 1.2;
}

.product-card-content small {
    margin-top: 5px;
    color: currentColor;
    font-size: 12px;
    font-weight: 700;
}

.product-card-content > span {
    margin-top: 7px;
    color: var(--ink-500);
    font-size: 12px;
    line-height: 1.45;
}

.product-card-action {
    display: inline-flex;
    grid-column: auto;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 13px;
    border-radius: 10px;
    color: currentColor;
    background: #f1f6ed;
    font-size: 12px;
    font-weight: 750;
    text-decoration: none;
    transition: filter 160ms ease, transform 160ms ease;
}

.product-card-action:hover {
    filter: brightness(0.97);
    transform: translateY(-1px);
}

.product-card-action svg {
    width: 15px;
    height: 15px;
}

.product-pro {
    color: var(--brand-800);
    border-color: #bcd2ae;
    background: linear-gradient(145deg, #ffffff, #f4f9ef);
    box-shadow: 0 11px 26px rgba(79, 135, 42, 0.12);
}

.product-pro .product-card-action {
    color: #ffffff;
    background: var(--brand-700);
}

.product-go {
    color: #357b92;
}

.product-go .product-card-icon,
.product-go .product-card-action {
    background: #edf7f9;
}

.product-mes {
    color: #7566a8;
}

.product-mes .product-card-icon,
.product-mes .product-card-action {
    background: #f3f0fa;
}

.product-srm {
    color: #54739c;
}

.product-srm .product-card-icon,
.product-srm .product-card-action {
    background: #f0f4f9;
}

.account-card {
    position: relative;
    min-width: 0;
    padding: 15px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--surface);
    box-shadow: 0 7px 20px rgba(24, 55, 84, 0.055);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.account-card::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--account-accent, var(--brand-700)), var(--account-accent-light, #8abc58));
    content: "";
}

.account-card:hover {
    transform: translateY(-3px);
    border-color: var(--account-accent-border, #bfd0df);
    box-shadow: 0 14px 30px rgba(24, 55, 84, 0.1);
}

.account-heading {
    display: flex;
    align-items: center;
    min-height: 48px;
    margin-bottom: 12px;
}

.account-index {
    display: grid;
    flex: 0 0 auto;
    width: 35px;
    height: 35px;
    margin-right: 10px;
    place-items: center;
    border-radius: 10px;
    color: var(--account-accent-dark, var(--brand-800));
    background: var(--account-accent-soft, var(--brand-50));
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.account-heading h3 {
    margin: 0;
    overflow: hidden;
    color: var(--ink-900);
    font-size: clamp(13px, 1.05vw, 16px);
    font-weight: 750;
    letter-spacing: -0.015em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-heading p {
    margin: 3px 0 0;
    overflow: hidden;
    color: var(--ink-500);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-actions {
    display: grid;
    gap: 7px;
}

.app-link {
    display: grid;
    grid-template-columns: 31px minmax(0, 1fr) 15px;
    align-items: center;
    min-height: 46px;
    padding: 6px 9px 6px 7px;
    border: 1px solid transparent;
    border-radius: 10px;
    text-decoration: none;
    transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

.app-link-pro {
    color: var(--green-700);
    background: var(--green-50);
}

.app-link-go {
    color: var(--blue-700);
    background: var(--blue-50);
}

.app-link:hover {
    transform: translateX(2px);
}

.app-link-pro:hover {
    border-color: var(--green-100);
    background: #e5f2de;
}

.app-link-go:hover {
    border-color: var(--blue-100);
    background: #e4f2f5;
}

.app-icon {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.8);
}

.app-icon svg {
    width: 16px;
    height: 16px;
}

.app-link > span:nth-child(2) {
    min-width: 0;
    padding-left: 3px;
}

.app-link strong,
.app-link small {
    display: block;
}

.app-link strong {
    color: var(--ink-900);
    font-size: 12px;
    line-height: 1.1;
}

.app-link small {
    margin-top: 3px;
    color: var(--ink-500);
    font-size: 10px;
}

.arrow-icon {
    width: 14px;
    height: 14px;
    opacity: 0.62;
}

.primary-action:hover,
.download-link:hover {
    transform: translateY(-1px);
}

.primary-action:hover {
    box-shadow: 0 9px 18px rgba(79, 135, 42, 0.28);
}

.download-link:hover {
    border-color: #b9d2a7;
}

a:focus-visible {
    outline: 3px solid rgba(113, 173, 59, 0.32);
    outline-offset: 2px;
}

footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 24px 19px;
    color: #8794a2;
    font-size: 10px;
    letter-spacing: 0.035em;
}

footer a {
    color: var(--brand-700);
    font-weight: 700;
    text-decoration: none;
}

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

.footer-separator {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #b4bec8;
}

.account-count-5 {
    padding: clamp(10px, 1.5vw, 20px);
}

.account-count-5 .hero {
    min-height: 96px;
}

.account-count-5 .client-panel {
    margin-top: 12px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.account-count-5 .accounts-section {
    padding: 16px 20px;
}

.account-count-5 .section-heading {
    margin-bottom: 10px;
}

.account-count-5 .diaochan-account-card {
    padding: 12px;
}

.account-count-5 .account-heading {
    min-height: 40px;
    margin-bottom: 8px;
}

.account-count-5 .diaochan-product-list {
    gap: 6px;
}

.account-count-5 .diaochan-product-row {
    min-height: 48px;
    padding: 5px 7px;
}

.account-count-5 .product-row-icon {
    width: 32px;
    height: 32px;
}

.account-count-5 footer {
    padding-bottom: 14px;
}

@media (max-width: 1180px) {
    .account-heading h3 {
        font-size: 15px;
    }
}

@media (max-width: 860px) {
    .client-panel {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .client-actions {
        flex-wrap: wrap;
        justify-content: flex-start;
        width: 100%;
    }

    .action-divider,
    .download-label {
        display: none;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 690px) {
    body {
        display: block;
        padding: 0;
        background: #ffffff;
    }

    .page-shell {
        min-height: 100vh;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .hero {
        min-height: auto;
        flex-direction: column;
    }

    .product-brand {
        flex-basis: 80px;
        width: 100%;
    }

    .hero-copy {
        align-self: stretch;
        padding: 19px 20px 21px;
    }

    .client-panel {
        margin: 14px 14px 0;
    }

    .accounts-section {
        padding: 20px 14px;
    }

}

@media (max-width: 760px) {
    .account-grid .account-card {
        flex-basis: calc((100% - 12px) / 2);
        width: calc((100% - 12px) / 2);
    }
}

@media (max-width: 480px) {
    .eyebrow {
        letter-spacing: 0.09em;
    }

    .hero h1 {
        font-size: 27px;
    }

    .client-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .primary-action {
        grid-column: 1 / -1;
    }

    .download-link {
        padding: 0 7px;
    }

    .account-grid .account-card {
        flex-basis: 100%;
        width: 100%;
    }

    .account-heading h3 {
        font-size: 15px;
    }

    .single-product-card {
        grid-template-columns: 48px minmax(0, 1fr);
        grid-template-rows: 1fr auto;
        min-height: 146px;
        padding: 16px;
    }

    .product-card-icon {
        width: 46px;
        height: 46px;
    }

    .product-card-action {
        grid-column: 1 / -1;
        justify-content: space-between;
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* Keep the single account full-width at every viewport size. */
.account-grid .account-card:only-child {
    flex-basis: 100%;
    width: 100%;
}
