@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    /* ISLdata Brand Colors */
    --amber: #d4702a;
    --amber-light: #e8985a;
    --amber-deep: #c25d1e;
    --amber-wash: #fdf5ef;

    --bark: #1a1714;
    --charcoal: #2d2a26;
    --dusk: #3d3832;
    --stone: #7a7268;
    --sand: #e8e4df;
    --parchment: #faf9f7;

    --plum: #7a3b5e;
    --sage: #8aad7a;
    --navy: #2a3450;

    /* Field colors (cross-field diagram) */
    --bio: #8aad7a;
    --health: #7a3b5e;
    --social: #2a3450;
    --commercial: #d4702a;
    --enviro: #5a8a5a;
    --agri: #b07830;

    /* Theme mappings */
    --primary-text-color: var(--charcoal);
    --bg-color: var(--parchment);

    --btn-color: #ffffff;
    --btn-bg: var(--amber);

    --header-link-hover: var(--charcoal);
    --header-link-hover-bg: rgba(212, 112, 42, 0.08);

    --input-hover-bd-color: var(--amber);

    --dropdown-bg: var(--parchment);
    --dropdown-hover-bg: var(--amber-wash);

    --faq-h-text: var(--charcoal);
    --faq-content-text: var(--dusk);

    --hr-color: var(--sand);

    --footer-link: var(--sand);
    --footer-link-hover: #ffffff;

    --header-bg: rgba(250, 249, 247, 0.92);
    --hero-gradient: var(--parchment);
    --hero-bg-img: url("../assets/images/background/dots-dark.svg");
}

/* No dark mode for now — ISLdata website is light-themed */

html {
    scroll-behavior: smooth;
    font-family: "Inter", system-ui, -apple-system, sans-serif;
}

body {
    color: var(--primary-text-color);
    background-color: var(--bg-color);
}

/* Serif headings — DM Serif Display for warm, editorial feel */
h1, h2 {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
}

body.modal-open {
    overflow: hidden;
}

/* ---- Global page gutter — consistent side buffer for all sections ---- */
/* At 1250px viewport: 8vw = 100px per side. Scales down gracefully on smaller screens. */
.page-gutter {
    padding-left: clamp(1.5rem, 8vw, 100px);
    padding-right: clamp(1.5rem, 8vw, 100px);
}

/* Standardized subtitle width under section headings */
.section-subtitle {
    max-width: 900px;
}

/* ---- Sugar Coating: ribbon ---- */
.ribbon-outer {
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
}
.scroll-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 14px;
}
.scroll-hint-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    color: #d4702a;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.scroll-arrow {
    display: flex;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px 6px;
    border-radius: 6px;
    transition: background 0.15s ease;
}
.scroll-arrow:hover  { background: rgba(212,112,42,0.12); }
.scroll-arrow:active { background: rgba(212,112,42,0.22); }
.scroll-arrow i { font-size: 15px; color: #d4702a; }
.scroll-arrow.left  i:first-child { animation: sc-nudge-left  1.5s ease-in-out infinite; }
.scroll-arrow.left  i:last-child  { animation: sc-nudge-left  1.5s ease-in-out infinite 0.15s; }
.scroll-arrow.right i:first-child { animation: sc-nudge-right 1.5s ease-in-out infinite 0.15s; }
.scroll-arrow.right i:last-child  { animation: sc-nudge-right 1.5s ease-in-out infinite; }
@keyframes sc-nudge-left  {
    0%, 100% { transform: translateX(0);    opacity: 0.45; }
    50%       { transform: translateX(-4px); opacity: 1;    }
}
@keyframes sc-nudge-right {
    0%, 100% { transform: translateX(0);   opacity: 0.45; }
    50%       { transform: translateX(4px); opacity: 1;    }
}
.ribbon-scroll-wrap {
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 10px 0;
}
.ribbon-scroll-wrap::-webkit-scrollbar { display: none; }
.ribbon {
    display: flex;
    gap: 0;
    min-width: 100%;
}
.tile {
    flex: 1 1 0;
    min-width: 72px;
    height: 62px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
    transition: filter 0.2s ease, transform 0.18s cubic-bezier(0.34,1.4,0.64,1);
}
.tile:hover  { filter: brightness(1.18) saturate(1.1);  transform: scaleY(1.07); z-index: 2; }
.tile.active { filter: brightness(1.22) saturate(1.12); transform: scaleY(1.12); z-index: 3; box-shadow: inset 0 -5px 0 rgba(255,255,255,0.5); }
.tile:first-child { border-radius: 12px 0 0 12px; }
.tile:last-child  { border-radius: 0 12px 12px 0; }
.tile.active::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 55%);
    animation: sc-shimmer 2.4s ease-in-out infinite alternate;
    pointer-events: none;
}
@keyframes sc-shimmer { from { opacity: 0.35; } to { opacity: 1; } }
.tile-icon {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    line-height: 1;
    transition: color 0.2s, transform 0.2s;
}
.tile:hover .tile-icon,
.tile.active .tile-icon { color: rgba(255,255,255,0.92); transform: scale(1.12); }
.tile-num {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 1.45rem;
    color: rgba(255,255,255,0.88);
    line-height: 1;
    letter-spacing: -0.03em;
    transition: color 0.2s;
}
.tile:hover .tile-num,
.tile.active .tile-num { color: #fff; }
.panel-arrow-wrap {
    height: 24px;
    position: relative;
    overflow: visible;
    margin-top: 2px;
}
.panel-arrow {
    position: absolute;
    width: 0; height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-top: 11px solid #d4702a;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    transition: left 0.3s cubic-bezier(0.4,0,0.2,1), border-top-color 0.3s ease;
}
.desc-panel {
    background: #ffffff;
    border-radius: 16px;
    padding: 26px 30px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    border-left: 5px solid #d4702a;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05), 0 10px 28px rgba(0,0,0,0.07);
    min-height: 100px;
    transition: border-left-color 0.25s ease, opacity 0.18s ease, transform 0.18s ease;
}
.desc-panel.transitioning { opacity: 0; transform: translateY(5px); }
.desc-icon {
    width: 46px; height: 46px;
    border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; color: #fff;
    flex-shrink: 0;
    transition: background 0.25s ease;
}
.desc-num {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 3rem;
    line-height: 1;
    color: rgba(26,23,20,0.07);
    flex-shrink: 0;
    align-self: center;
    letter-spacing: -0.04em;
    min-width: 48px;
    text-align: right;
}
.desc-body { flex: 1; min-width: 0; }
.desc-headline {
    font-family: 'DM Serif Display', serif;
    font-size: 1.35rem;
    color: #1a1714;
    margin-bottom: 7px;
    line-height: 1.25;
}
.desc-text {
    font-size: 0.9rem;
    color: #7a7268;
    line-height: 1.7;
}

/* ---- Header ---- */
header > .collapsible-header {
    display: flex;
    gap: 1rem;
    width: 100%;
    background-color: inherit;
    place-content: center;
    overflow: hidden;
    transition: width 0.3s ease, height 0.3s ease;
}

hr {
    border-color: var(--hr-color);
    border-style: solid;
}

.animated-collapse {
    transition: width 0.3s ease;
}

.header-links {
    position: relative;
    display: flex;
    align-items: center;
    min-width: fit-content;
    padding: 8px 15px;
    z-index: 2;
    cursor: pointer;
    font-weight: 500;
    color: var(--dusk);
    transition: background-color 0.5s, color 0.3s;
}

.header-links::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    background-color: var(--header-link-hover-bg);
    transform: scale(40%);
    opacity: 0;
    border-radius: 8px;
    transition: all 300ms;
}

.header-links:hover {
    color: var(--amber);
}

.header-links:hover::after {
    transform: scale(100%);
    opacity: 1;
}

/* ---- Hero (perspective orbit) ---- */
.hero-dark {
    background-color: var(--parchment);
    background-image:
        radial-gradient(circle at 30% 15%, rgba(212,112,42,0.06) 0%, transparent 45%),
        radial-gradient(circle at 70% 75%, rgba(138,173,122,0.04) 0%, transparent 45%),
        radial-gradient(circle, rgba(122,114,104,0.10) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 32px 32px;
    padding-bottom: 50px;
}

.hero-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--amber);
    border: 1px solid rgba(212,112,42,0.18);
    background: rgba(212,112,42,0.07);
    padding: 6px 18px;
    border-radius: 999px;
    margin-bottom: 8px;
}

.hero-btn-ghost {
    background-color: transparent !important;
    color: var(--charcoal) !important;
    border: 1.5px solid var(--sand) !important;
}
.hero-btn-ghost:hover {
    border-color: var(--amber) !important;
    color: var(--charcoal) !important;
    background-color: var(--amber-wash) !important;
}

/* Orbit glow */
.hero-orbit-glow {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 700px;
    height: 450px;
    background: radial-gradient(ellipse, rgba(212,112,42,0.08) 0%, transparent 65%);
    pointer-events: none;
    z-index: 1;
}

/* Hero screenshot composition — flat layout, hover to front */
.hero-perspective-scene {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1100px;
    margin-top: 50px;
    height: 560px;
    padding: 0 24px;
}

.hero-perspective-inner {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Cards */
.hero-card {
    position: absolute;
    border-radius: 12px;
    overflow: hidden;
    background: var(--parchment);
    border: 1px solid rgba(26,23,20,0.08);
    transition: transform 0.5s cubic-bezier(0.23,1,0.32,1), box-shadow 0.5s ease, z-index 0s;
}

/* Hovered card always comes to front */
.hero-card:hover {
    z-index: 10 !important;
}

.hero-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Main card — dashboard, centered and dominant */
.hero-card-main {
    width: 680px;
    height: 400px;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    border-radius: 16px;
    box-shadow:
        0 8px 16px rgba(26,23,20,0.06),
        0 32px 80px rgba(26,23,20,0.14),
        0 0 0 1px rgba(26,23,20,0.06);
}
.hero-card-main:hover {
    transform: translateX(-50%) translateY(-4px);
    box-shadow:
        0 12px 24px rgba(26,23,20,0.08),
        0 48px 100px rgba(26,23,20,0.18),
        0 0 0 1px rgba(212,112,42,0.12);
}

/* Satellite cards */
.hero-card-sat {
    box-shadow:
        0 4px 12px rgba(26,23,20,0.06),
        0 16px 40px rgba(26,23,20,0.10),
        0 0 0 1px rgba(26,23,20,0.05);
}
.hero-card-sat:hover {
    box-shadow:
        0 8px 20px rgba(26,23,20,0.08),
        0 24px 50px rgba(26,23,20,0.14),
        0 0 0 1px rgba(212,112,42,0.15);
}

/* Top-left: data view — slight tilt */
.hero-card-tl {
    width: 340px;
    height: 210px;
    top: 0;
    left: 0;
    z-index: 3;
    transform: rotate(-4deg);
}
.hero-card-tl:hover { transform: rotate(-1deg) translateY(-6px) scale(1.03); }

/* Top-right: sources — slight tilt */
.hero-card-tr {
    width: 300px;
    height: 200px;
    top: 10px;
    right: 0;
    z-index: 3;
    transform: rotate(3deg);
}
.hero-card-tr:hover { transform: rotate(0.5deg) translateY(-6px) scale(1.03); }

/* Bottom-right: report — slight tilt */
.hero-card-br {
    width: 260px;
    height: 320px;
    bottom: 0;
    right: 20px;
    z-index: 4;
    transform: rotate(2deg);
}
.hero-card-br:hover { transform: rotate(0deg) translateY(-6px) scale(1.03); }

/* Card labels */
.hero-card-label {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(26,23,20,0.72);
    backdrop-filter: blur(12px);
    color: rgba(255,255,255,0.9);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.hero-label-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--amber);
}

/* Connector lines */
.hero-connector-svg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 1;
}
.hero-connector-svg line {
    stroke: var(--sand);
    stroke-width: 1;
    stroke-dasharray: 6 4;
    opacity: 0.6;
}

/* Feature tags */
.hero-feature-tags {
    display: flex;
    gap: 12px;
    padding-top: 30px;
    z-index: 10;
    position: relative;
    flex-wrap: wrap;
    justify-content: center;
}
.hero-ftag {
    font-size: 12px;
    font-weight: 500;
    color: var(--stone);
    background: #fff;
    border: 1px solid var(--sand);
    padding: 6px 16px;
    border-radius: 999px;
    white-space: nowrap;
}
.hero-ftag strong { color: var(--charcoal); font-weight: 600; }

/* Hero responsive */
@media (max-width: 900px) {
    .hero-perspective-scene {
        height: auto;
    }
    .hero-perspective-inner {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 14px;
        height: auto;
    }
    .hero-card {
        position: relative !important;
        width: 100% !important;
        height: 180px !important;
        top: auto !important; left: auto !important;
        right: auto !important; bottom: auto !important;
        transform: none !important;
    }
    .hero-card-main { grid-column: 1 / -1; height: 240px !important; }
    .hero-connector-svg { display: none; }
}

/* Legacy hero (kept for reference) */
.hero-section {
    background-color: var(--parchment);
    background-image: none;
}

.hero-bg-gradient {
    background: linear-gradient(180deg, var(--parchment) 23%, rgba(0,0,0,0) 87%, var(--parchment) 97%);
}

.gradient-text {
    background: linear-gradient(90deg, var(--amber) 18%, var(--amber-deep) 71%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Orange glow accent instead of purple */
.amber-bg-grad {
    background: linear-gradient(90deg, rgba(212,112,42,0.5) 8%, rgba(232,152,90,0.5) 50%, rgba(138,173,122,0.4) 89%);
    filter: blur(60px);
    opacity: 0.4;
}

/* ---- Buttons ---- */
.btn {
    padding: 12px 24px;
    width: max-content;
    border-radius: 8px;
    color: var(--btn-color);
    background-color: var(--btn-bg);
    justify-content: center;
    align-items: center;
    display: flex;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: background-color 0.2s, transform 0.1s;
}

.btn:hover {
    background-color: var(--amber-deep);
}

.btn:active {
    transform: scale(0.98);
}

.btn-secondary {
    background-color: transparent;
    color: var(--amber);
    border: 2px solid var(--amber);
}

.btn-secondary:hover {
    background-color: var(--amber-wash);
}

.btn-dark {
    background-color: var(--charcoal);
    color: var(--parchment);
}

.btn-dark:hover {
    background-color: var(--dusk);
}

.btn:disabled {
    cursor: default;
    opacity: 0.5;
}

/* ---- Inputs ---- */
.input {
    padding: 12px 16px;
    background-color: transparent;
    border-radius: 8px;
    outline: none;
    min-width: 100px;
    border: 1.5px solid var(--sand);
    transition: border 0.3s;
    font-family: inherit;
}

.input:active, .input:focus, .input:focus-within {
    border: 1.5px solid var(--amber) !important;
}

/* ---- Cards ---- */
.feature-card {
    background: #ffffff;
    border: 1px solid var(--sand);
    border-radius: 12px;
    padding: 28px 24px;
    transition: box-shadow 0.3s, transform 0.2s;
}

.feature-card:hover {
    box-shadow: 0 8px 30px rgba(42, 52, 80, 0.08);
    transform: translateY(-2px);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
}

/* ---- Dark section (hero footer, CTA blocks) ---- */
.dark-section {
    background-color: var(--charcoal);
    color: var(--sand);
}

.dark-section h2, .dark-section h3 {
    color: var(--amber-light);
}

.dark-section p {
    color: var(--sand);
}

/* ---- Warm section ---- */
.warm-section {
    background-color: var(--amber-wash);
}

/* ---- Pricing cards ---- */
.pricing-card {
    background: #ffffff;
    border: 1.5px solid var(--sand);
    border-radius: 12px;
    padding: 24px 22px;
    transition: box-shadow 0.3s;
}

.pricing-card.featured {
    border-color: var(--amber);
    box-shadow: 0 4px 20px rgba(212, 112, 42, 0.15);
}

.pricing-card:hover {
    box-shadow: 0 8px 30px rgba(42, 52, 80, 0.08);
}

/* ---- Scrollbar ---- */
.scrollbar::-webkit-scrollbar {
    width: 5px;
    height: 20px;
}

.scrollbar::-webkit-scrollbar-track {
    border-radius: 25px;
}

.scrollbar::-webkit-scrollbar-thumb {
    background: var(--sand);
    border-radius: 25px;
}

/* ---- Carousel (brand logos) ---- */
.carousel-container {
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
    max-width: 800px;
}

.carousel {
    display: inline-block;
    animation: scroll 10s linear infinite;
}

.carousel-img {
    display: inline-block;
    margin: 0 20px;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ---- FAQ ---- */
.faq-accordion {
    background-color: inherit;
    color: var(--faq-h-text);
    cursor: pointer;
    padding: 15px 18px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    transition: height 0.4s;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
}

.faq .content {
    padding: 0px 18px;
    color: var(--faq-content-text);
    height: max-content;
    overflow: hidden;
    background-color: transparent;
    text-align: left;
    max-height: 0px;
    transition: max-height 0.4s, padding 0.4s;
    line-height: 1.7;
}

/* ---- Footer ---- */
.footer-link {
    width: -moz-fit-content;
    width: fit-content;
    color: var(--footer-link);
    transition: color 0.3s;
}

.footer-link:hover {
    color: var(--footer-link-hover);
}

/* ---- Animated border accent ---- */
.animated-border {
    position: relative;
    overflow: visible;
}

.animated-border::after {
    content: '';
    position: absolute;
    top: 0px;
    left: -100%;
    width: 30%;
    height: 100%;
    border-radius: inherit;
    background-color: var(--amber);
    background-repeat: no-repeat;
    background-position: 0% 0%;
    filter: blur(1.5rem);
    opacity: 0.6;
    box-shadow: inset 0px 0px 20px 5px var(--amber);
    z-index: -2;
    pointer-events: none;
    animation: slide 10s ease-in-out infinite;
}

.animated-border::before {
    filter: blur(1.5rem);
    opacity: 0.3;
    will-change: transform;
}

@keyframes slide {
    0% { left: -100%; right: 100%; }
    100% { left: 100%; right: -100%; }
}

/* ---- Screenshot showcase ---- */
.screenshot-frame {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 48px rgba(26, 23, 20, 0.12);
    border: 1px solid var(--sand);
}

.screenshot-frame img {
    width: 100%;
    display: block;
}

/* ---- Mobile responsive header ---- */
@media not all and (min-width: 1024px) {
    header .collapsible-header {
        position: fixed;
        top: 60px;
        left: 0px;
        flex-direction: column;
        opacity: 0;
        height: 0vh;
        min-height: 0vh;
        width: 100vw;
        justify-content: space-between;
        padding: 5px;
        padding-top: 5%;
        padding-bottom: 5%;
        place-items: center;
        text-align: center;
        background-color: var(--header-bg);
        overflow-y: auto;
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        box-shadow: 0px 2px 3px 2px rgba(159, 159, 159, 0.3);
    }
}

/* ---- Section spacing ---- */
section {
    scroll-margin-top: 80px;
    padding-top: 6rem;
    padding-bottom: 6rem;
}

/* Extra breathing room between major content sections */
section + section {
    margin-top: 1rem;
}

/* Even more space for sections that change background */
.warm-section,
.dark-section {
    margin-top: 2rem;
}

.warm-section + section:not(.warm-section),
section:not(.warm-section) + .warm-section {
    margin-top: 2.5rem;
}

/* ---- Utility ---- */
.opacity-0 { opacity: 0 !important; }
.opacity-100 { opacity: 100 !important; }

.text-amber { color: var(--amber); }
.text-amber-light { color: var(--amber-light); }
.bg-amber-wash { background-color: var(--amber-wash); }
.border-amber { border-color: var(--amber); }

/* ---- Cross-field ring diagram ---- */
.cf-diagram-wrap {
    position: relative;
    width: 780px;
    height: 700px;
    margin: 0 auto;
}

.cf-hub {
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: 220px; height: 220px;
    border-radius: 50%;
    background: var(--charcoal);
    border: 3px solid var(--amber);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 20;
    box-shadow: 0 0 50px rgba(212,112,42,0.10), 0 0 0 12px rgba(212,112,42,0.04);
}

.cf-hub-title {
    font-size: 24px;
    font-weight: 700;
    color: #faf9f7;
    letter-spacing: 0.03em;
}

.cf-hub-subtitle {
    font-size: 12px;
    color: #b0aaa2;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.cf-hub-divider {
    width: 45%;
    height: 1px;
    background: var(--amber);
    opacity: 0.3;
    margin: 10px 0;
}

.cf-hub-functions {
    font-size: 12px;
    color: #d8d3cd;
    text-align: center;
    line-height: 1.6;
}

.cf-fn-initial {
    font-size: 16px;
    font-weight: 700;
    color: var(--amber-light);
}

.cf-ring-svg {
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: 460px; height: 460px;
    z-index: 10;
}

.cf-ring-segment {
    fill-opacity: 0.85;
    stroke: var(--parchment);
    stroke-width: 3;
    cursor: pointer;
    transition: fill-opacity 0.3s ease, filter 0.3s ease;
    transform-origin: center;
}

.cf-ring-segment:hover {
    fill-opacity: 1;
    filter: brightness(1.12) drop-shadow(0 0 8px rgba(0,0,0,0.15));
}

.cf-ring-svg:hover .cf-ring-segment:not(:hover) {
    fill-opacity: 0.45;
}

.cf-ring-label {
    font-size: 12px;
    font-weight: 600;
    fill: #ffffff;
    pointer-events: none;
    text-anchor: middle;
    letter-spacing: 0.02em;
}

.cf-spoke-svg {
    position: absolute;
    left: 0; top: 0;
    width: 780px; height: 780px;
    z-index: 5;
    pointer-events: none;
    overflow: visible;
}

.cf-spoke-path {
    transition: opacity 0.4s ease;
}

.cf-detail-card {
    position: absolute;
    z-index: 15;
    width: 215px;
    background: #ffffff;
    border-radius: 10px;
    border: 1.5px solid var(--sand);
    overflow: hidden;
    opacity: 0;
    transform: scale(0.92);
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 8px 32px rgba(26, 23, 20, 0.10);
}

.cf-detail-card.visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.cf-detail-card-accent {
    height: 4px;
    width: 100%;
}

.cf-detail-card-body {
    padding: 10px 14px 12px;
}

.cf-detail-table {
    width: 100%;
    border-collapse: collapse;
}

.cf-detail-table td {
    padding: 4px 0;
    vertical-align: middle;
    font-size: 13px;
    color: var(--dusk);
    line-height: 1.4;
}

.cf-detail-table .cf-fn-letter {
    width: 24px;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    padding-right: 0;
    opacity: 0.7;
}

.cf-detail-table .cf-fn-divider {
    width: 1px;
    padding: 0 8px;
}

.cf-detail-table .cf-fn-divider span {
    display: block;
    width: 1px;
    height: 14px;
    background: var(--sand);
}

.cf-detail-table .cf-fn-text {
    font-size: 13px;
}

.cf-detail-note {
    font-size: 12px;
    font-style: italic;
    margin-top: 7px;
    line-height: 1.4;
}

/* Responsive: stack on small screens */
@media (max-width: 840px) {
    .cf-diagram-wrap {
        width: 340px;
        height: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }

    .cf-hub {
        position: relative;
        left: auto; top: auto;
        transform: none;
    }

    .cf-ring-svg,
    .cf-spoke-svg { display: none; }

    .cf-detail-card {
        position: relative !important;
        left: auto !important; top: auto !important; right: auto !important; bottom: auto !important;
        opacity: 1;
        transform: scale(1);
        pointer-events: auto;
        width: 100%;
        max-width: 300px;
    }
}
