* {
    box-sizing: border-box;
}

:root {
    --bg: #f5f7fb;
    --text: #182230;
    --muted: #667085;
    --card: #ffffff;
    --border: #e5e7eb;
    --primary: #1d4ed8;
    --primary-dark: #1e3a8a;
    --dark: #111827;
    --soft: #eef4ff;
}

body {
    padding-bottom: 78px;
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.site-header {
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.navbar {
    max-width: 1180px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 800;
    font-size: 18px;
}

.brand:hover {
    text-decoration: none;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--dark);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-links {
    display: flex;
    gap: 18px;
    align-items: center;
}

.nav-links a {
    color: #344054;
    font-weight: 700;
    font-size: 14px;
}

main {
    max-width: 1180px;
    margin: 0 auto;
    padding: 32px 24px 48px;
}

.hero {
    min-height: 400px;
    background: linear-gradient(135deg, #101828 0%, #1e3a8a 100%);
    color: white;
    border-radius: 28px;
    padding: 54px;
    display: grid;
    grid-template-columns: 1.4fr 0.6fr;
    gap: 32px;
    align-items: center;
    box-shadow: 0 24px 60px rgba(17, 24, 39, 0.22);
}

.eyebrow {
    margin: 0 0 10px;
    color: #2563eb;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 12px;
}

.hero .eyebrow {
    color: #bfdbfe;
}

.hero h1 {
    font-size: 48px;
    line-height: 1.05;
    margin: 0 0 20px;
    max-width: 780px;
}

.hero-text {
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.7;
    max-width: 760px;
    margin-bottom: 28px;
}

.hero-actions,
.page-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    padding: 12px 18px;
    font-weight: 800;
}

.button:hover {
    text-decoration: none;
}

.button.primary {
    background: var(--primary);
    color: white;
}

.hero .button.primary {
    background: white;
    color: #1e3a8a;
}

.button.secondary {
    background: rgba(255, 255, 255, 0.12);
    color: white;
    border: 1px solid rgba(255,255,255,0.25);
}

.button.secondary.dark-text {
    background: white;
    color: var(--primary);
    border: 1px solid var(--border);
}

.hero-card {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 24px;
    padding: 28px;
    min-height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-card-label {
    color: #dbeafe;
    font-size: 14px;
    margin-bottom: 10px;
}

.hero-card strong {
    font-size: 72px;
    line-height: 1;
}

.section {
    margin-top: 36px;
}

.section.light {
    background: var(--soft);
    padding: 28px;
    border-radius: 24px;
}

.section-text {
    color: var(--muted);
    line-height: 1.8;
    max-width: 980px;
}

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

.section-heading h2,
.page-title h1 {
    margin: 0;
    font-size: 32px;
}

.page-title {
    background: white;
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 34px;
    margin-bottom: 28px;
}

.page-title p {
    color: var(--muted);
    line-height: 1.7;
    max-width: 880px;
}

.page-title-grid {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 28px;
    align-items: center;
}

.page-stat {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 20px;
    background: #f8fafc;
}

.page-stat span,
.page-stat small {
    display: block;
    color: var(--muted);
}

.page-stat span {
    font-weight: 800;
    margin-bottom: 8px;
}

.page-stat strong {
    display: block;
    color: var(--text);
    font-size: 52px;
    line-height: 1;
    margin-bottom: 6px;
}

.feature-grid,
.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.feature-card,
.about-card,
.loading-card,
.empty-state {
    background: white;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.feature-card h3,
.about-card h2 {
    margin-top: 0;
}

.feature-card p,
.about-card p {
    color: var(--muted);
    line-height: 1.7;
}

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

.app-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
}

.app-visual {
    background: linear-gradient(135deg, #101828 0%, #1e3a8a 100%);
    color: white;
    min-height: 230px;
    display: flex;
    flex-direction: column;
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.app-visual.has-preview::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image: var(--preview-image);
    background-size: cover;
    background-position: center top;
    transform: scale(1.02);
}

.app-visual.has-preview::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(16, 24, 40, 0.92) 0%, rgba(16, 24, 40, 0.72) 46%, rgba(30, 58, 138, 0.48) 100%),
        linear-gradient(180deg, rgba(16, 24, 40, 0.18) 0%, rgba(16, 24, 40, 0.78) 100%);
}

.app-visual-top {
    height: 38px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.10);
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
}

.preview-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
}

.preview-address {
    margin-left: 8px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 999px;
    padding: 5px 10px;
    color: #dbeafe;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.app-visual-main {
    flex: 1;
    padding: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    text-align: left;
}

.app-visual-main h2 {
    margin: 0;
    color: white;
    font-size: 32px;
    line-height: 1.1;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.42);
}

.app-visual-main p {
    margin: 0;
    color: #dbeafe;
    word-break: break-word;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.42);
}

.app-body {
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: center;
}

.app-body h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.2;
}

.app-body p {
    color: var(--muted);
    line-height: 1.7;
}

.app-url {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    word-break: break-word;
}

.app-actions-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 7px;
    color: #047857;
    background: #ecfdf3;
    border: 1px solid #abefc6;
    padding: 7px 10px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 13px;
    white-space: nowrap;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #12b76a;
}

.guide-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
}

.guide-aside,
.guide {
    background: white;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
}

.guide-aside {
    position: sticky;
    top: 86px;
}

.guide-aside a {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
}

.guide h2 {
    margin-top: 30px;
}

.guide h2:first-child {
    margin-top: 0;
}

.guide p {
    color: var(--muted);
    line-height: 1.7;
}

.glossary-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
}

.glossary {
    background: white;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px;
}

.glossary section + section {
    margin-top: 34px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}

.glossary h2 {
    margin: 0 0 18px;
}

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

.glossary-grid div {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
}

.glossary-grid h3 {
    margin: 0 0 8px;
    font-size: 17px;
}

.glossary-grid p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
    font-size: 14px;
}

.requirement-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 18px 0;
}

.requirement-grid div {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
}

.requirement-grid strong {
    display: block;
    color: var(--primary);
    font-size: 22px;
    margin-bottom: 6px;
}

.code-block {
    white-space: pre-wrap;
    background: #0b1220;
    color: #dbeafe;
    border-radius: 14px;
    padding: 16px;
    overflow-x: auto;
    font-family: Consolas, Monaco, monospace;
    font-size: 14px;
    margin: 14px 0 24px;
}

.notice {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
    border-radius: 14px;
    padding: 16px;
    line-height: 1.7;
}

.table-wrapper {
    overflow-x: auto;
    margin: 16px 0 24px;
}

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

th,
td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

th {
    background: #f8fafc;
}

.checklist {
    padding-left: 20px;
    color: var(--muted);
    line-height: 1.9;
}

.authors {
    display: grid;
    gap: 14px;
}

.about-overview-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
}

.about-card-objective,
.about-card-authors {
    min-height: 300px;
}

.about-card-authors .authors {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
}

.author-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 14px;
    align-items: center;
}

.about-card-authors .author-card {
    min-height: 190px;
}

.author-photo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.14);
}

.author-info {
    min-width: 0;
}

.author-card strong {
    display: block;
    margin-bottom: 4px;
}

.author-email {
    display: block;
    font-size: 14px;
    word-break: break-word;
}

.author-links {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.author-links a {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: white;
    border: 1px solid var(--border);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 13px;
}

.author-links a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    text-decoration: none;
}

.about-card.wide {
    grid-column: span 3;
}

.architecture-layout {
    display: grid;
    gap: 24px;
}

.architecture-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.8fr);
    gap: 32px;
    align-items: center;
}

.architecture-hero-metrics {
    display: grid;
    gap: 12px;
}

.architecture-hero-metrics div {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    background: #f8fafc;
}

.architecture-hero-metrics strong {
    display: block;
    font-size: 30px;
    line-height: 1;
    color: var(--text);
    margin-bottom: 6px;
}

.architecture-hero-metrics span {
    color: var(--muted);
    font-weight: 700;
    font-size: 13px;
}

.architecture-panel {
    background: white;
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 24px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.architecture-diagram-panel {
    padding-bottom: 28px;
}

.architecture-flow {
    background: white;
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 28px;
    display: grid;
    grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.25fr);
    gap: 30px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.architecture-flow-intro {
    border-right: 1px solid var(--border);
    padding-right: 26px;
}

.architecture-flow-intro h2,
.architecture-panel h2 {
    margin-top: 0;
}

.architecture-flow-intro p,
.architecture-note {
    color: var(--muted);
    line-height: 1.7;
}

.architecture-steps {
    display: grid;
    gap: 18px;
    position: relative;
}

.architecture-steps::before {
    content: "";
    position: absolute;
    left: 17px;
    top: 18px;
    bottom: 18px;
    width: 2px;
    background: #dbeafe;
}

.architecture-step {
    position: relative;
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 14px;
}

.architecture-step > span {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: var(--primary);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    z-index: 1;
    box-shadow: 0 0 0 6px white;
}

.architecture-step h3 {
    margin: 0 0 6px;
    font-size: 18px;
}

.architecture-step p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
    font-size: 14px;
}

.architecture-split {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 24px;
}

.architecture-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 12px;
}

.architecture-list li {
    border-left: 4px solid #bfdbfe;
    padding: 12px 14px;
    background: #f8fafc;
    border-radius: 0 12px 12px 0;
    color: var(--muted);
    line-height: 1.55;
}

.architecture-list strong {
    color: var(--text);
}

.architecture-panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 18px;
}

.architecture-panel-heading span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.architecture-image-button {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px;
    background: white;
    cursor: zoom-in;
    overflow: hidden;
    display: block;
}

.architecture-image-button img {
    width: 100%;
    max-height: min(48vh, 460px);
    height: auto;
    display: block;
    object-fit: contain;
    object-position: center;
}

.architecture-image-button:hover {
    border-color: #bfdbfe;
    box-shadow: 0 0 0 4px #eff6ff;
}

.architecture-modal[hidden] {
    display: none;
}

.architecture-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 24px;
}

.architecture-modal-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(15, 23, 42, 0.78);
}

.architecture-modal-content {
    position: relative;
    z-index: 1;
    width: min(96vw, 1600px);
    height: min(92vh, 900px);
    background: white;
    border-radius: 18px;
    padding: 16px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.45);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.architecture-modal-content img {
    width: 100%;
    min-height: 0;
    flex: 1;
    height: 100%;
    display: block;
    object-fit: contain;
    border-radius: 12px;
}

.architecture-modal-close {
    flex: 0 0 auto;
    margin-left: auto;
    display: flex;
    border: 1px solid var(--border);
    background: white;
    color: var(--text);
    border-radius: 10px;
    padding: 9px 12px;
    font-weight: 800;
    cursor: pointer;
}

body.modal-open {
    overflow: hidden;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tags span {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    padding: 9px 12px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 13px;
}

.empty-state,
.loading-card {
    color: var(--muted);
    line-height: 1.7;
}

.footer {
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: 20;
    width: 100%;
    padding: 18px max(24px, calc((100vw - 1180px) / 2 + 24px));
    border-top: 1px solid var(--border);
    background: rgba(245, 247, 251, 0.92);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: var(--muted);
}

@media (max-width: 900px) {
    .hero,
    .guide-layout,
    .glossary-layout,
    .page-title-grid,
    .architecture-hero,
    .architecture-flow,
    .architecture-split {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 36px;
    }

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

    .feature-grid,
    .about-grid,
    .app-grid,
    .glossary-grid,
    .requirement-grid {
        grid-template-columns: 1fr;
    }

    .about-overview-grid,
    .about-card-authors .authors {
        grid-template-columns: 1fr;
    }

    .architecture-flow-intro {
        border-right: 0;
        border-bottom: 1px solid var(--border);
        padding-right: 0;
        padding-bottom: 22px;
    }

    .about-card.wide {
        grid-column: span 1;
    }

    .guide-aside {
        position: static;
    }
}

@media (max-width: 650px) {
    .navbar,
    .footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-links {
        flex-wrap: wrap;
    }

    main {
        padding: 22px 16px 36px;
    }

    .hero {
        border-radius: 20px;
        padding: 28px;
    }

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