*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root,
[data-theme="light"] {
    /* Sinaweb dashboard palette */
    --gold: #f5c842;
    --gold-light: #ffd54f;
    --blue: #0369a1;
    --blue-dark: #075985;
    --blue-light: #0ea5e9;
    --navy-deep: #0a1e38;
    --text-primary: #111827;
    --text-secondary: #1f2937;
    --text-muted: #374151;
    --text-faint: #6b7280;
    --bg-body: #f8fafc;
    --page-bg-image: none;
    --page-bg-gradient: #f8fafc;
    --page-bg-overlay: none;
    --navbar-bg: linear-gradient(to right, #082f49, #075985);
    --navbar-border: rgba(255, 255, 255, 0.12);
    --nav-link: rgba(255, 255, 255, 0.92);
    --nav-link-hover: #f5c842;
    --btn-primary-bg: #0369a1;
    --btn-primary-text: #ffffff;
    --btn-primary-hover: #075985;
    --btn-gold-bg: #f5c842;
    --btn-gold-text: #0a1e38;
    --btn-gold-hover: #ffd54f;
    --btn-secondary-border: rgba(255, 255, 255, 0.45);
    --btn-secondary-text: #ffffff;
    --btn-secondary-hover-bg: #f5c842;
    --btn-secondary-hover-text: #0a1e38;
    --btn-outline-border: rgba(255, 255, 255, 0.45);
    --btn-outline-text: #ffffff;
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --card-accent-border: #bae6fd;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --sidebar-bg: #ffffff;
    --feature-bg: #f8fafc;
    --feature-border: #e2e8f0;
    --accordion-bg: #ffffff;
    --accordion-bg-open: #f0f9ff;
    --cta-bg: #ffffff;
    --footer-border: #e2e8f0;
    --logo-divider: rgba(255, 255, 255, 0.35);
    --logo-doi-filter: brightness(0) invert(1);
    --theme-switch-bg: rgba(255, 255, 255, 0.12);
    --theme-switch-border: rgba(255, 255, 255, 0.2);
    --theme-switch-icon: rgba(255, 255, 255, 0.9);
    --heading-gradient: linear-gradient(180deg, #000000 0%, #000000 100%);
    --badge-bg: #e0f2fe;
    --badge-border: #bae6fd;
    --badge-text: #0369a1;
    --link-accent: #0369a1;
    --icon-bg: #e0f2fe;
    --icon-border: #bae6fd;
    --icon-color: #0369a1;
}

[data-theme="dark"] {
    --gold: #e6b422;
    --gold-light: #f5cd5e;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.92);
    --text-muted: rgba(255, 255, 255, 0.7);
    --text-faint: rgba(255, 255, 255, 0.5);
    --bg-body: #0a0f1c;
    --page-bg-image: url('https://images.pexels.com/photos/18233972/pexels-photo-18233972/free-photo-of-sunset-over-the-sea-with-mountains.jpeg?auto=compress&cs=tinysrgb&w=1600&h=900&dpr=2');
    --page-bg-gradient: linear-gradient(135deg, rgba(5, 15, 25, 0.55), rgba(0, 0, 0, 0.65));
    --page-bg-overlay: radial-gradient(ellipse at 30% 40%, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.6) 100%);
    --navbar-bg: rgba(10, 22, 40, 0.55);
    --navbar-border: rgba(255, 255, 255, 0.1);
    --nav-link: rgba(255, 255, 255, 0.92);
    --nav-link-hover: #f5cd5e;
    --btn-outline-border: rgba(255, 255, 255, 0.4);
    --btn-outline-text: #ffffff;
    --card-bg: rgba(15, 30, 50, 0.72);
    --card-border: rgba(255, 255, 255, 0.12);
    --card-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.4);
    --sidebar-bg: rgba(10, 22, 40, 0.6);
    --feature-bg: rgba(0, 0, 0, 0.3);
    --feature-border: rgba(245, 205, 94, 0.15);
    --accordion-bg: rgba(0, 0, 0, 0.28);
    --accordion-bg-open: rgba(0, 0, 0, 0.4);
    --cta-bg: rgba(0, 0, 0, 0.55);
    --footer-border: rgba(255, 255, 255, 0.1);
    --logo-divider: rgba(255, 255, 255, 0.3);
    --logo-doi-filter: none;
    --theme-switch-bg: rgba(255, 255, 255, 0.08);
    --theme-switch-border: rgba(255, 255, 255, 0.15);
    --theme-switch-icon: rgba(255, 255, 255, 0.85);
    --heading-gradient: linear-gradient(180deg, #fff4c4 0%, #f5cd5e 50%, #e6b422 100%);
    --badge-bg: rgba(230, 180, 34, 0.15);
    --badge-border: rgba(245, 205, 94, 0.4);
    --badge-text: #f5cd5e;
}

body {
    font-family: 'Inter', 'Lexend', system-ui, -apple-system, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.65;
    transition: background 0.25s ease, color 0.25s ease;
}

.page-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: var(--page-bg-gradient), var(--page-bg-image);
    background-size: cover;
    background-position: center 30%;
    background-attachment: fixed;
}

.page-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--page-bg-overlay);
}

.page-wrap {
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

.content-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 4rem;
}

/* navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--navbar-bg);
    backdrop-filter: blur(12px);
    border-radius: 80px;
    border: 1px solid var(--navbar-border);
    box-shadow: 0 4px 24px rgba(8, 47, 73, 0.15);
}

[data-theme="light"] .navbar {
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(8, 47, 73, 0.18);
}

[data-theme="dark"] .navbar { box-shadow: none; }

.logo-area { display: flex; align-items: center; gap: 1rem; text-decoration: none; }
.logo-sinaweb { height: 40px; width: auto; }
.logo-doi { height: 34px; width: auto; filter: var(--logo-doi-filter); opacity: 0.92; }

[data-theme="light"] .logo-doi {
    filter: brightness(0);
    opacity: 1;
}
.logo-divider { width: 1px; height: 28px; background: var(--logo-divider); }

.nav-links { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.nav-links a {
    color: var(--nav-link);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.88rem;
    transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--nav-link-hover); }

.btn-outline-light {
    border: 1px solid var(--btn-outline-border);
    color: var(--btn-outline-text);
    padding: 0.45rem 1.2rem;
    border-radius: 40px;
    font-weight: 600;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn-outline-light:hover {
    background: var(--btn-secondary-hover-bg);
    border-color: var(--btn-secondary-hover-bg);
    color: var(--btn-secondary-hover-text);
}

[data-theme="light"] .btn-outline-light:hover {
    background: var(--btn-gold-bg);
    border-color: var(--btn-gold-bg);
    color: var(--btn-gold-text);
}

.theme-switch {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem;
    border-radius: 9999px;
    border: 1px solid var(--theme-switch-border);
    background: var(--theme-switch-bg);
    gap: 0.15rem;
}

.theme-switch-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: none;
    background: transparent;
    color: var(--theme-switch-icon);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.theme-switch-btn svg {
    width: 0.95rem;
    height: 0.95rem;
    flex-shrink: 0;
}

.theme-switch-btn:hover { color: var(--gold); }

.theme-switch-btn.is-active {
    background: var(--gold-light);
    color: #0a1628;
    box-shadow: 0 1px 6px rgba(230, 180, 34, 0.25);
}

[data-theme="light"] .theme-switch-btn.is-active {
    background: var(--btn-gold-bg);
    color: var(--btn-gold-text);
}

[data-theme="light"] .theme-switch-btn:hover {
    color: #ffffff;
}

/* page header */
.page-hero {
    text-align: center;
    max-width: 820px;
    margin: 0 auto 2.5rem;
}

.page-hero .badge {
    display: inline-block;
    padding: 0.35rem 1.2rem;
    border-radius: 9999px;
    border: 1px solid var(--badge-border);
    background: var(--badge-bg);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--badge-text);
    margin-bottom: 1rem;
}

.page-hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700;
    line-height: 1.1;
    background: var(--heading-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.page-hero p {
    margin-top: 0.85rem;
    color: var(--text-muted);
    font-size: 1.05rem;
}

[data-theme="light"] .page-hero p {
    color: #000000;
}

.breadcrumb {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    font-size: 0.8rem;
    color: var(--text-faint);
}
.breadcrumb a { color: var(--gold-light); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* article layout */
.article-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 2rem;
    align-items: start;
}

.article-sidebar {
    position: sticky;
    top: 1.5rem;
    padding: 1.25rem;
    border-radius: 1.25rem;
    background: var(--sidebar-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(12px);
}

.article-sidebar h3 {
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold-light);
    margin-bottom: 0.85rem;
}

.article-sidebar a {
    display: block;
    padding: 0.45rem 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 1px solid var(--card-border);
}
.article-sidebar a:hover { color: var(--gold-light); }

.article-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.glass-card {
    padding: 2rem;
    border-radius: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(16px);
    box-shadow: var(--card-shadow);
}

.glass-card h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gold-light);
    margin-bottom: 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--feature-border);
}

[data-theme="light"] .glass-card h2 {
    color: var(--text-primary);
    border-bottom-color: var(--card-accent-border);
}

.glass-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 1.5rem 0 0.65rem;
}

[data-theme="light"] .glass-card h3 {
    color: var(--text-primary);
}

.glass-card p {
    color: var(--text-muted);
    margin-bottom: 0.85rem;
}

[data-theme="light"] .glass-card p,
[data-theme="light"] .glass-card ul,
[data-theme="light"] .glass-card ol,
[data-theme="light"] .glass-card li {
    color: var(--text-muted);
}

[data-theme="light"] .glass-card li strong {
    color: var(--blue);
}

[data-theme="light"] .glass-card a {
    color: var(--blue);
}

[data-theme="light"] .feature-item strong {
    color: var(--text-primary);
}

.glass-card p:last-child { margin-bottom: 0; }

.glass-card ul, .glass-card ol {
    margin: 0.5rem 0 1rem 1.25rem;
    color: var(--text-muted);
}
.glass-card li { margin-bottom: 0.45rem; }
.glass-card li strong { color: var(--gold-light); }

.glass-card a {
    color: var(--gold-light);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.feature-item {
    padding: 1.1rem;
    border-radius: 1rem;
    background: var(--feature-bg);
    border: 1px solid var(--feature-border);
}

.feature-item strong {
    display: block;
    color: var(--gold-light);
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
}

.feature-item span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.steps-list {
    counter-reset: step;
    list-style: none;
    margin-left: 0 !important;
}

.steps-list li {
    counter-increment: step;
    position: relative;
    padding-left: 2.5rem;
    margin-bottom: 0.75rem;
}

.steps-list li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    background: var(--gold);
    color: #0a1628;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* documentation hub */
.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.doc-card {
    display: block;
    padding: 1.5rem;
    border-radius: 1.25rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    text-decoration: none;
    transition: all 0.2s;
    backdrop-filter: blur(12px);
}

.doc-card:hover {
    border-color: rgba(245, 205, 94, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.3);
}

[data-theme="light"] .doc-card {
    border-color: var(--card-border);
    box-shadow: var(--card-shadow);
}

[data-theme="light"] .doc-card:hover {
    border-color: var(--card-accent-border);
    box-shadow: 0 4px 16px rgba(3, 105, 161, 0.1);
    transform: translateY(-2px);
}

.doc-card .doc-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 0.85rem;
    border-radius: 0.65rem;
    background: rgba(230, 180, 34, 0.15);
    border: 1px solid rgba(245, 205, 94, 0.25);
    color: #f5cd5e;
}

[data-theme="light"] .doc-card .doc-icon {
    background: var(--icon-bg);
    border-color: var(--icon-border);
    color: var(--icon-color);
}

.doc-card .doc-icon svg {
    width: 1.25rem;
    height: 1.25rem;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.doc-card h3 { color: var(--gold-light); font-size: 1.1rem; margin-bottom: 0.5rem; font-weight: 700; }
.doc-card p { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 0; }

[data-theme="light"] .doc-card h3 { color: var(--text-primary); }
[data-theme="light"] .doc-card p { color: var(--text-muted); }

[data-theme="light"] .cta-band h3,
[data-theme="light"] .cta-band p {
    color: var(--text-primary);
}

[data-theme="light"] .cta-band {
    border-color: var(--card-accent-border);
}

.btn-gold {
    display: inline-flex;
    padding: 0.7rem 1.5rem;
    border-radius: 0.5rem;
    background: var(--btn-gold-bg, var(--gold));
    color: var(--btn-gold-text, #0a1e38);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
}
.btn-gold:hover { background: var(--btn-gold-hover, #ffd54f); }

.btn-blue {
    display: inline-flex;
    padding: 0.7rem 1.5rem;
    border-radius: 0.5rem;
    background: var(--btn-primary-bg, var(--blue));
    color: var(--btn-primary-text, #ffffff);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
}
.btn-blue:hover { background: var(--btn-primary-hover, var(--blue-dark)); }

[data-theme="light"] .service-accordion-head strong {
    color: var(--text-primary);
}

[data-theme="light"] .service-accordion-panel li strong {
    color: var(--blue);
}

[data-theme="light"] .steps-list li::before {
    background: var(--btn-primary-bg);
    color: #ffffff;
}

/* services accordion */
.service-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.service-accordion {
    border-radius: 1rem;
    background: var(--accordion-bg);
    border: 1px solid var(--feature-border);
    overflow: hidden;
    transition: border-color 0.2s, background 0.2s;
}

.service-accordion.is-open {
    border-color: rgba(245, 205, 94, 0.35);
    background: var(--accordion-bg-open);
}

.service-accordion-trigger {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    width: 100%;
    padding: 1rem 1.1rem;
    border: none;
    background: transparent;
    color: inherit;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}

.service-accordion-trigger:hover {
    background: rgba(230, 180, 34, 0.06);
}

.service-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.55rem;
    background: rgba(230, 180, 34, 0.18);
    border: 1px solid rgba(245, 205, 94, 0.22);
    color: #f5cd5e;
}

.service-icon svg {
    width: 1.1rem;
    height: 1.1rem;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.service-accordion-head {
    flex: 1;
    min-width: 0;
}

.service-accordion-head strong {
    display: block;
    color: #f5cd5e;
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.service-accordion-head .summary {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.service-chevron {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    margin-top: 0.15rem;
    border-radius: 50%;
    color: #f5cd5e;
    transition: transform 0.25s ease;
}

.service-chevron svg {
    width: 1rem;
    height: 1rem;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.service-accordion.is-open .service-chevron {
    transform: rotate(180deg);
}

.service-accordion-panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease;
}

.service-accordion.is-open .service-accordion-panel {
    grid-template-rows: 1fr;
}

.service-accordion-inner {
    overflow: hidden;
    padding: 0 1.1rem 0 4.35rem;
}

.service-accordion.is-open .service-accordion-inner {
    padding-bottom: 1.15rem;
}

.service-accordion-panel p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 0.75rem;
}

.service-accordion-panel ul {
    margin: 0 0 0.5rem 1rem;
    font-size: 0.84rem;
    color: var(--text-muted);
}

.service-accordion-panel li {
    margin-bottom: 0.35rem;
}

.service-accordion-panel li strong {
    color: #f5cd5e;
}

.services-hint {
    margin-bottom: 1rem;
    font-size: 0.82rem;
    color: var(--text-faint);
    text-align: center;
}

@media (max-width: 600px) {
    .service-accordion-inner {
        padding-left: 1.1rem;
    }
}

.section-icon-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.section-icon-title .service-icon {
    width: 2rem;
    height: 2rem;
}

.cta-band {
    margin-top: 2rem;
    padding: 2rem;
    border-radius: 1.5rem;
    background: var(--cta-bg);
    border: 1px solid var(--feature-border);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

.cta-band h3 { font-size: 1.25rem; color: var(--gold-light); }
.cta-band p { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.35rem; }

.refs {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--card-border);
    font-size: 0.75rem;
    color: var(--text-faint);
}
.refs a { color: var(--gold-light); }

.site-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--footer-border);
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-faint);
}

@media (max-width: 900px) {
    .article-layout { grid-template-columns: 1fr; }
    .article-sidebar { position: static; }
}

@media (max-width: 720px) {
    .navbar { border-radius: 1.5rem; flex-direction: column; }
    .nav-links { justify-content: center; }
    .page-bg { background-attachment: scroll; }
}
