:root {
    color-scheme: light;
    --ink: #123047;
    --muted: #5f7f98;
    --line: #c7dded;
    --paper: #ffffff;
    --soft: #eef8ff;
    --accent: #2f8fd3;
    --accent-dark: #176aa5;
    --accent-pale: #dff1ff;
    --warn: #b42318;
    --shadow: 0 18px 45px rgba(28, 88, 132, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    color: var(--ink);
    background: var(--soft);
}

a {
    color: inherit;
}

.content-protected {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.content-protected input,
.content-protected textarea {
    -webkit-user-select: text;
    user-select: text;
}

.content-protected img,
.content-protected a {
    -webkit-user-drag: none;
    user-drag: none;
}

.content-protected img {
    pointer-events: none;
}

@media print {
    body.content-protected * {
        visibility: hidden !important;
    }

    body.content-protected::before {
        content: "Printing and downloading this content is disabled.";
        display: block;
        visibility: visible;
        padding: 24px;
        color: #000;
        font: 16px Arial, Helvetica, sans-serif;
    }
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #eaf7ff;
}

.header-actions a {
    text-decoration: none;
    font-weight: 700;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: var(--accent);
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.button:hover {
    background: var(--accent-dark);
}

.button.small {
    min-height: 32px;
    padding: 0 14px;
}

.button.full {
    width: 100%;
}

.user-pill {
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 0.82rem;
}

.hero {
    min-height: 118px;
    display: flex;
    align-items: center;
    background:
        linear-gradient(120deg, rgba(18, 68, 112, 0.88), rgba(67, 161, 222, 0.74)),
        url("https://images.unsplash.com/photo-1497366754035-f200968a6e72?auto=format&fit=crop&w=1800&q=80");
    background-size: cover;
    background-position: center;
    color: #fff;
}

.hero > div {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.hero-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.hero-brand {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 14px;
}

.hero-brand img {
    width: 86px;
    height: 86px;
    flex: 0 0 auto;
    border-radius: 8px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.9);
    padding: 5px;
}

.hero h1 {
    margin: 0;
    font-size: clamp(1.15rem, 2.6vw, 1.65rem);
    line-height: 1;
}

.hero-title p {
    margin: 6px 0 0;
    color: #d6efff;
    font-size: clamp(0.78rem, 1.6vw, 0.9rem);
    font-weight: 800;
}

.hero-copy {
    max-width: 620px;
    margin: 8px 0 0;
    font-size: 0.86rem;
    line-height: 1.4;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero .eyebrow {
    color: #d6efff;
}

.content-wrap {
    width: min(1120px, calc(100% - 32px));
    margin: 44px auto;
}

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

.section-heading h2,
.section-heading p {
    margin: 0;
}

.section-heading p,
.post-meta,
.hint,
.footer {
    color: var(--muted);
}

.blog-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    align-items: start;
    gap: 26px;
}

.post-list {
    display: grid;
    gap: 18px;
}

.post-card,
.article,
.sidebar-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: var(--shadow);
}

.post-card {
    padding: 22px;
}

.sidebar {
    position: sticky;
    top: 46px;
    display: grid;
    gap: 16px;
    padding-top: 46px;
}

.sidebar-panel {
    padding: 18px;
}

.sidebar-panel h2 {
    margin: 0 0 14px;
    font-size: 0.94rem;
}

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

.search-box {
    position: relative;
    display: block;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    width: 15px;
    height: 15px;
    border: 2px solid var(--accent-dark);
    border-radius: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.search-icon::after {
    content: "";
    position: absolute;
    right: -7px;
    bottom: -5px;
    width: 8px;
    height: 2px;
    border-radius: 2px;
    background: var(--accent-dark);
    transform: rotate(45deg);
}

.search-form input,
input,
select {
    width: 100%;
    min-height: 42px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    font: inherit;
}

.search-form input {
    padding-left: 40px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.category-list,
.recent-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.category-list li,
.recent-list li {
    padding: 10px 0;
    border-top: 1px solid var(--line);
}

.category-list a,
.recent-list a {
    color: var(--ink);
    font-weight: 800;
    text-decoration: none;
}

.post-card h3 {
    margin: 14px 0 10px;
    font-size: 1.08rem;
}

.post-card h3 a {
    text-decoration: none;
}

.post-card p {
    color: var(--muted);
    line-height: 1.55;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.76rem;
    font-weight: 700;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.tags span {
    padding: 6px 9px;
    border-radius: 999px;
    color: var(--accent-dark);
    background: var(--accent-pale);
    font-size: 0.72rem;
    font-weight: 800;
}

.alert {
    padding: 12px;
    border-radius: 8px;
    color: var(--warn);
    background: #fff0ed;
    font-weight: 800;
}

.notice {
    margin-bottom: 16px;
    padding: 12px;
    border-radius: 8px;
    color: var(--accent-dark);
    background: var(--accent-pale);
    font-weight: 800;
}

.hint {
    margin: 18px 0 0;
    font-size: 0.82rem;
}

.article-wrap {
    max-width: 820px;
}

.article {
    padding: 34px;
}

.article h1 {
    margin: 14px 0;
    font-size: clamp(1.45rem, 3.6vw, 2.3rem);
    line-height: 1.05;
}

.article p {
    color: #344456;
    font-size: 0.9rem;
    line-height: 1.75;
}

.quick-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 28px;
}

.quick-gallery-card {
    display: grid;
    gap: 10px;
    width: 100%;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: #fff;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.quick-gallery-card:hover,
.quick-gallery-card:focus-visible {
    border-color: var(--accent);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(47, 143, 211, 0.16);
}

.quick-gallery-thumb {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 6px;
    background: var(--soft);
}

.quick-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quick-gallery-title {
    min-height: 2.4em;
    color: var(--ink);
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.2;
}

.image-viewer {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    padding: 28px;
    background: rgba(7, 22, 34, 0.86);
}

.image-viewer[hidden] {
    display: none;
}

.image-viewer figure {
    width: min(1180px, 100%);
    max-height: calc(100vh - 56px);
    margin: 0;
    display: grid;
    gap: 12px;
}

.image-viewer-frame {
    position: relative;
    width: 100%;
    max-height: calc(100vh - 120px);
    min-height: 280px;
    overflow: auto;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #fff;
}

.image-viewer img {
    width: auto;
    max-height: calc(100vh - 120px);
    height: auto;
}

.image-viewer figcaption {
    color: #fff;
    font-weight: 800;
    text-align: center;
}

.image-zoom-badge {
    position: absolute;
    left: 50%;
    bottom: 12px;
    margin: 0;
    padding: 7px 11px;
    border-radius: 999px;
    color: #fff;
    background: rgba(7, 22, 34, 0.78);
    font-size: 0.82rem;
    font-weight: 800;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%);
    transition: opacity 160ms ease;
}

.image-zoom-badge.is-visible {
    opacity: 1;
}

.image-viewer-close {
    position: fixed;
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: var(--accent-dark);
    font-weight: 800;
    text-decoration: none;
}

.footer {
    padding: 28px 16px;
    text-align: center;
}

@media (max-width: 820px) {
    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .blog-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        padding-top: 0;
    }

    .hero-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero-brand img {
        width: 70px;
        height: 70px;
    }

    .hero {
        min-height: 118px;
    }
}
