:root {
    --primary: #2C3E50;
    --secondary: #34495E;
    --accent: #E67E22;
    --bg-color: #ffffff;
    --text-primary: #2C3E50;
    --text-secondary: #7F8C8D;
    --border-color: #ECF0F1;
}

html {
    color-scheme: light only;
}

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

body {
    background: var(--bg-color);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    overflow-y: scroll;
}

.index-page {
    background: #ffffff;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

.index-hero {
    align-items: center;
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 1.2rem 1rem 0.55rem;
}

.index-hero-copy {
    max-width: 680px;
}

.index-kicker {
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    margin-bottom: 0.55rem;
    text-transform: uppercase;
}

.index-hero h1,
.index-section-heading h2 {
    color: var(--text-primary);
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
    margin: 0;
}

.index-hero-copy > p:last-child {
    color: #4d626b;
    font-size: 1.125rem;
    line-height: 1.35;
    margin-top: 0.9rem;
    max-width: 34rem;
}

.index-scan-scene {
    align-items: center;
    display: none;
    justify-content: center;
    min-height: 9rem;
    position: relative;
}

.index-scan-scene::before {
    background: #f8f9fa;
    border: 1px solid rgba(44, 62, 80, 0.08);
    content: "";
    height: 8.8rem;
    position: absolute;
    transform: rotate(-7deg);
    width: min(72vw, 13rem);
}

.index-label-card {
    aspect-ratio: 1.56;
    background: #ffffff;
    border: 1px solid rgba(44, 62, 80, 0.12);
    border-radius: 16px;
    box-shadow: 0 22px 60px rgba(44, 62, 80, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.9);
    max-width: 210px;
    overflow: hidden;
    padding: clamp(1rem, 4vw, 2rem);
    position: relative;
    transform: rotate(3deg);
    width: min(62vw, 100%);
}

.index-label-top,
.index-label-lines,
.index-label-code {
    position: relative;
    z-index: 1;
}

.index-label-top {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.65rem;
}

.index-label-top span:first-child {
    background: var(--primary);
    border-radius: 999px;
    height: 0.75rem;
    width: 42%;
}

.index-label-lines {
    display: flex;
    flex-direction: column;
    gap: 0.38rem;
    margin-bottom: 0.75rem;
}

.index-label-lines span {
    animation: index-line-pulse 1.8s ease-in-out infinite;
    background: rgba(44, 62, 80, 0.16);
    border-radius: 999px;
    height: 0.32rem;
}

.index-label-lines span:nth-child(1) {
    width: 84%;
}

.index-label-lines span:nth-child(2) {
    animation-delay: 0.12s;
    width: 54%;
}

.index-label-lines span:nth-child(3) {
    animation-delay: 0.24s;
    width: 72%;
}

.index-label-lines span:nth-child(4) {
    animation-delay: 0.36s;
    width: 46%;
}

.index-label-code {
    display: grid;
    gap: 0.28rem;
    grid-template-columns: 1.2fr 0.7fr 1fr 0.9fr 1.1fr;
}

.index-label-code span {
    background: rgba(230, 126, 34, 0.34);
    border-radius: 4px;
    height: 0.9rem;
}

.index-label-code span:nth-child(even) {
    background: rgba(44, 62, 80, 0.18);
}

.index-label-chip {
    align-items: center;
    background: var(--text-primary);
    border-radius: 999px;
    color: #ffffff;
    display: flex;
    font-size: 0.78rem;
    font-weight: 700;
    height: 1.8rem;
    justify-content: center;
    position: absolute;
    right: clamp(0.72rem, 3.2vw, 1.55rem);
    top: clamp(0.72rem, 3.2vw, 1.55rem);
    width: 1.8rem;
    z-index: 1;
}

.index-label-scan {
    animation: index-label-scan 2.4s ease-in-out infinite;
    background: rgba(230, 126, 34, 0.9);
    box-shadow: 0 0 20px rgba(230, 126, 34, 0.52);
    height: 3px;
    left: 1rem;
    position: absolute;
    right: 1rem;
    top: 1rem;
    z-index: 2;
}

.index-samples {
    border-top: 1px solid var(--border-color);
    padding: 0.65rem 0.625rem 2.5rem;
}

.index-section-heading {
    margin: 0 auto 0.75rem;
    max-width: 820px;
    text-align: center;
}

.index-section-heading h2 {
    font-size: 1.6rem;
}

.index-section-heading > p:last-child {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0.5rem auto 0;
    max-width: 42rem;
}

.index-sample-grid {
    align-items: stretch;
    display: grid;
    gap: 0.55rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0 auto;
    max-width: 1180px;
}

.index-sample-card {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
    position: relative;
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.index-sample-main-link {
    border-radius: inherit;
    inset: 0;
    position: absolute;
    z-index: 2;
}

.index-sample-main-link:focus-visible {
    border-color: rgba(230, 126, 34, 0.55);
    box-shadow: 0 10px 28px rgba(44, 62, 80, 0.14);
    outline: none;
}

.index-sample-card:has(.index-sample-main-link:focus-visible) {
    border-color: rgba(230, 126, 34, 0.55);
    box-shadow: 0 10px 28px rgba(44, 62, 80, 0.14);
    transform: translateY(-2px);
}

@media (hover: hover) and (pointer: fine) {
    .index-sample-card:hover {
        border-color: rgba(230, 126, 34, 0.55);
        box-shadow: 0 10px 28px rgba(44, 62, 80, 0.14);
        transform: translateY(-2px);
    }
}

.index-sample-skeleton .index-sample-image,
.index-sample-image-shell {
    aspect-ratio: 1;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(221, 230, 227, 0.42);
    display: block;
    overflow: hidden;
    padding: 0.45rem;
    pointer-events: none;
    position: relative;
    width: 100%;
    z-index: 1;
}

.index-sample-image-shell .index-sample-image {
    display: block;
    height: 100%;
    object-fit: contain;
    opacity: 1;
    position: relative;
    transform: translateY(4px) scale(0.985);
    transition: opacity 0.56s ease, transform 0.62s cubic-bezier(0.16, 0.84, 0.24, 1);
    width: 100%;
    z-index: 2;
}

.index-sample-image-placeholder {
    animation: index-image-icon-develop 4.6s ease-in-out infinite;
    color: rgba(95, 111, 112, 0.2);
    display: block;
    height: 50%;
    left: 50%;
    opacity: 0.35;
    pointer-events: none;
    position: absolute;
    stroke-width: 1.04;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.995);
    transition: opacity 0.34s ease;
    width: 50%;
    z-index: 1;
}

.index-sample-image-placeholder svg {
    display: block;
    fill: none;
    height: 100%;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    width: 100%;
}

.index-sample-image-sun {
    animation: index-image-sun-bloom 4.6s ease-in-out infinite;
}

.index-sample-image-mountain {
    animation: index-image-mountain-bloom 4.6s ease-in-out infinite;
}

.index-sample-card:not(.is-image-ready) .index-sample-image-shell .index-sample-image {
    opacity: 0;
}

.index-sample-card.is-image-ready .index-sample-image-placeholder {
    animation: none;
    opacity: 0;
}

.index-sample-card.is-image-ready .index-sample-image-shell .index-sample-image {
    transform: translateY(0) scale(1);
}

.index-sample-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.32rem;
    padding: 0.56rem;
    pointer-events: none;
    position: relative;
    z-index: 3;
}

.index-sample-body h3 {
    display: -webkit-box;
    font-size: 0.78rem;
    line-height: 1.2;
    margin: 0;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.index-sample-color {
    color: #5f6f70;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.18;
}

.index-sample-material {
    color: var(--text-secondary);
    font-size: 0.72rem;
    line-height: 1.25;
}

.index-sample-material {
    display: none;
}

.index-sample-code-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.28rem;
    margin-top: auto;
    padding-top: 0.12rem;
    pointer-events: auto;
}

.index-sample-code-link {
    align-items: center;
    background: #f5f7f7;
    border: 1px solid rgba(95, 111, 112, 0.24);
    border-radius: 999px;
    color: #5f6f70;
    display: inline-flex;
    font-size: 0.62rem;
    font-weight: 800;
    justify-content: center;
    letter-spacing: 0;
    line-height: 1;
    min-height: 1.34rem;
    padding: 0.3rem 0.5rem;
    position: relative;
    text-decoration: none;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
    z-index: 4;
}

.index-sample-code-link.is-default {
    background: #e9eeee;
    border-color: rgba(95, 111, 112, 0.38);
    color: #2C3E50;
}

.index-sample-code-link:focus-visible {
    border-color: rgba(95, 111, 112, 0.58);
    outline: 2px solid rgba(95, 111, 112, 0.16);
    outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
    .index-sample-code-link:hover {
        background: #e9eeee;
        border-color: rgba(95, 111, 112, 0.48);
        color: #2C3E50;
        transform: translateY(-1px);
    }
}

.index-sample-status {
    color: var(--text-secondary);
    grid-column: 1 / -1;
    padding: 2rem;
    text-align: center;
}

.index-sample-skeleton {
    pointer-events: none;
}

.index-sample-skeleton .index-sample-body span {
    animation: index-skeleton-shimmer 1.35s ease-in-out infinite;
    background: linear-gradient(90deg, rgba(221, 230, 227, 0.7), rgba(247, 249, 248, 1), rgba(221, 230, 227, 0.7));
    background-size: 220% 100%;
}

.index-sample-skeleton .index-sample-image {
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(221, 230, 227, 0.42);
}

.index-sample-skeleton .index-sample-body {
    gap: 0.42rem;
}

.index-sample-skeleton .index-sample-body span {
    border-radius: 999px;
    display: block;
    height: 0.7rem;
}

.index-sample-skeleton .index-sample-body span:first-child {
    width: 88%;
}

.index-sample-skeleton .index-sample-body span:last-child {
    width: 56%;
}

@media (max-width: 719px) {
    .index-sample-skeleton:nth-child(n+7) {
        display: none;
    }
}

@keyframes index-label-scan {
    0%, 100% {
        opacity: 0;
        transform: translateY(0);
    }
    10%, 88% {
        opacity: 1;
    }
    50% {
        transform: translateY(6.5rem);
    }
}

@keyframes index-line-pulse {
    0%, 100% {
        opacity: 0.42;
    }
    50% {
        opacity: 1;
    }
}

@keyframes index-skeleton-shimmer {
    0% {
        background-position: 180% 0;
    }
    100% {
        background-position: -40% 0;
    }
}

@keyframes index-image-icon-develop {
    0%, 12%, 100% {
        opacity: 0.35;
        transform: translate(-50%, -50%) scale(0.995);
    }
    42%, 84% {
        opacity: 0.70;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes index-image-sun-bloom {
    0%, 30%, 100% {
        color: currentColor;
        stroke: currentColor;
    }
    46%, 84% {
        color: rgba(230, 126, 34, 0.58);
        stroke: currentColor;
    }
}

@keyframes index-image-mountain-bloom {
    0%, 34%, 100% {
        color: currentColor;
        stroke: currentColor;
    }
    50%, 86% {
        color: rgba(47, 125, 104, 0.5);
        stroke: currentColor;
    }
}

@media (prefers-reduced-motion: reduce) {
    .index-sample-image-placeholder,
    .index-sample-image-sun,
    .index-sample-image-mountain,
    .index-sample-skeleton .index-sample-body span {
        animation: none;
    }
}

@media (min-width: 720px) {
    .index-hero {
        gap: 1rem;
        grid-template-columns: minmax(0, 1fr) 240px;
        padding: 1.6rem clamp(1rem, 5vw, 4rem) 1.2rem;
    }

    .index-hero h1 {
        font-size: 2.35rem;
    }

    .index-section-heading h2 {
        font-size: 2.35rem;
    }

    .index-hero-copy > p:last-child {
        font-size: 1.2rem;
    }

    .index-scan-scene {
        display: flex;
        justify-self: stretch;
        min-height: 10rem;
    }

    .index-samples {
        padding: 2rem clamp(1rem, 5vw, 4rem) clamp(2.5rem, 6vw, 5rem);
    }

    .index-section-heading {
        margin-bottom: 1.5rem;
    }

    .index-section-heading > p:last-child {
        font-size: 1rem;
        line-height: 1.55;
        margin-top: 1rem;
    }

    .index-sample-grid {
        gap: 1rem;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

    .index-label-card {
        max-width: 210px;
        width: 100%;
    }

    .index-sample-image-shell {
        padding: 0.75rem;
    }

    .index-sample-body {
        gap: 0.55rem;
        padding: 0.9rem;
    }

    .index-sample-body h3 {
        display: block;
        font-size: 1rem;
        line-height: 1.25;
        min-height: 0;
        overflow: visible;
        -webkit-line-clamp: unset;
    }

    .index-sample-color {
        font-size: 0.86rem;
        line-height: 1.2;
    }

    .index-sample-material {
        font-size: 0.86rem;
        line-height: 1.35;
    }

    .index-sample-code-links {
        gap: 0.36rem;
        padding-top: 0.18rem;
    }

    .index-sample-code-link {
        font-size: 0.7rem;
        min-height: 1.52rem;
        padding: 0.34rem 0.6rem;
    }

    .index-sample-material {
        display: block;
    }

}

@media (min-width: 900px) {
    .index-hero {
        gap: 1.5rem;
        grid-template-columns: minmax(0, 1fr) 260px;
        padding: 1.75rem clamp(1rem, 5vw, 4rem) 1.25rem;
    }

    .index-hero h1 {
        font-size: 2.8rem;
    }

    .index-section-heading h2 {
        font-size: 2.8rem;
    }

    .index-label-card {
        max-width: 230px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .index-label-scan,
    .index-label-lines span,
    .index-sample-image-shell,
    .index-sample-image,
    .index-sample-code-link,
    .index-sample-card {
        animation: none;
        transition: none;
    }
}
