:root {
    --color-primary: #0a4a7d;
    --color-secondary: #1e90ff;
    --color-accent: #00d4ff;
    --color-bg: #e8f4f8;
    --color-text: #16324a;
    --color-text-light: #4a667a;
    --color-border: #b7d3e0;
    --color-surface: #ffffff;
    --color-ink: #0a4a7d;
    --dfg-header-h: 72px;
    --dfg-page-w: 1120px;
    --dfg-font-display: "Abril Fatface", Georgia, serif;
    --dfg-font-body: "Crimson Text", Georgia, serif;
}

@media (max-width: 768px) {
    :root { --dfg-header-h: 64px; }
}

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

html {
    scroll-padding-top: var(--dfg-header-h);
    max-width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    padding-top: var(--dfg-header-h);
    max-width: 100%;
    overflow-x: hidden;
    font-family: var(--dfg-font-body);
    font-size: 1.125rem;
    line-height: 1.65;
    color: var(--color-text);
    background: var(--color-bg);
}

body.nav-open { overflow: hidden; }
body.dfg-cookie-open { padding-bottom: 110px; }

[hidden] { display: none !important; }

img, video, iframe {
    max-width: 100%;
    height: auto;
}

a { color: var(--color-secondary); }
a:hover { color: var(--color-primary); }

h1, h2, h3 {
    font-family: var(--dfg-font-display);
    font-weight: 400;
    line-height: 1.15;
    color: var(--color-ink);
}

.dfg-o-wrap {
    max-width: var(--dfg-page-w);
    margin: 0 auto;
    padding: 0 20px;
}

.dfg-u-center { text-align: center; }

/* header */
.dfg-c-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    min-height: var(--dfg-header-h);
    background: #e8f4f8;
    box-shadow: 0 2px 8px rgba(10, 74, 125, 0.1);
}

.dfg-c-header__row {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: var(--dfg-header-h);
}

.dfg-c-header__logo {
    flex: 0 0 auto;
    display: block;
}

.dfg-c-header__logo img {
    width: 180px;
    height: auto;
    display: block;
}

.dfg-c-header a,
.dfg-c-header a:visited { color: var(--color-primary); }

.dfg-c-nav {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1 1 auto;
    justify-content: flex-end;
    flex-wrap: nowrap;
}

.dfg-c-nav__link {
    text-decoration: none;
    font-size: 1rem;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
}

.dfg-c-nav__link.dfg-is-active,
.dfg-c-nav__link:hover {
    border-bottom-color: var(--color-accent);
}

.dfg-c-header__cta {
    flex: 0 0 auto;
    margin-left: 4px;
}

.dfg-c-burger,
.dfg-c-overlay,
.dfg-c-drawer { display: none; }

.dfg-c-burger {
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    padding: 10px;
    margin-left: auto;
    cursor: pointer;
}

.dfg-c-burger span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--color-primary);
}

/* buttons — icon left */
.dfg-c-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0.65rem 1.15rem;
    border: 1.5px solid var(--color-primary);
    background: transparent;
    color: var(--color-primary);
    text-decoration: none;
    font-family: var(--dfg-font-body);
    font-size: 1rem;
    cursor: pointer;
    border-radius: 0;
    transition: background .2s, color .2s, border-color .2s;
}

.dfg-c-btn:hover,
.dfg-c-btn:visited {
    color: var(--color-primary);
}

.dfg-c-btn--primary {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.dfg-c-btn--primary,
.dfg-c-btn--primary:visited { color: #fff; }

.dfg-c-btn--primary:hover {
    background: var(--color-secondary);
    border-color: var(--color-secondary);
    color: #fff;
}

.dfg-c-btn--icon .dfg-c-btn__ico {
    width: 10px;
    height: 10px;
    border-right: 2px solid currentColor;
    border-top: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform .2s;
}

.dfg-c-btn--icon:hover .dfg-c-btn__ico {
    transform: rotate(45deg) scale(1.15);
}

.dfg-c-header a.dfg-c-btn--primary,
.dfg-c-header a.dfg-c-btn--primary:visited {
    color: #fff;
    background: var(--color-primary);
}

.dfg-c-hero a.dfg-c-btn,
.dfg-c-hero a.dfg-c-btn:visited {
    color: var(--color-primary);
}

.dfg-c-hero a.dfg-c-btn--primary,
.dfg-c-hero a.dfg-c-btn--primary:visited {
    color: #fff;
}

.dfg-c-cta a.dfg-c-btn--primary,
.dfg-c-cta a.dfg-c-btn--primary:visited {
    color: #fff;
}

/* hero — numbers first, arctic gradient soft */
.dfg-c-hero {
    background: linear-gradient(165deg, #d4eef7 0%, #e8f4f8 45%, #c5e4f2 100%);
    padding: 56px 0 48px;
}

.dfg-c-hero__title {
    font-size: clamp(2rem, 4vw, 3.1rem);
    margin: 0 0 28px;
    max-width: 18ch;
}

.dfg-c-hero__nums {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.dfg-c-hero__num {
    border: 1.5px solid var(--color-primary);
    background: rgba(255, 255, 255, 0.55);
    padding: 18px 14px;
    text-align: center;
}

.dfg-c-hero__figure {
    display: block;
    font-family: var(--dfg-font-display);
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    color: var(--color-primary);
    line-height: 1;
}

.dfg-c-hero__label {
    display: block;
    margin-top: 8px;
    font-size: 0.95rem;
    color: var(--color-text-light);
}

.dfg-c-hero__text {
    max-width: 62ch;
    margin: 0 0 24px;
}

.dfg-c-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* tabs */
.dfg-c-tabs {
    padding: 48px 0 24px;
}

.dfg-c-tabs__bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 12px;
}

.dfg-c-tabs__tab {
    min-height: 44px;
    padding: 0.5rem 1rem;
    border: 1.5px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-primary);
    font-family: var(--dfg-font-body);
    font-size: 1rem;
    cursor: pointer;
}

.dfg-c-tabs__tab.dfg-is-active {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: #fff;
}

.dfg-c-section__title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    margin: 0 0 16px;
}

.dfg-c-note {
    color: var(--color-text-light);
    font-size: 1rem;
}

/* ranking — outline cards, stagger */
.dfg-c-rank {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dfg-c-rank__item {
    display: grid;
    grid-template-columns: auto 96px minmax(0, 1fr) auto;
    gap: 16px 20px;
    align-items: start;
    padding: 20px;
    border: 1.5px solid var(--color-primary);
    background: transparent;
    animation: dfg-stagger .55s ease both;
}

.dfg-c-rank__item:nth-child(1) { animation-delay: .05s; }
.dfg-c-rank__item:nth-child(2) { animation-delay: .12s; }
.dfg-c-rank__item:nth-child(3) { animation-delay: .19s; }
.dfg-c-rank__item:nth-child(4) { animation-delay: .26s; }

@keyframes dfg-stagger {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .dfg-c-rank__item { animation: none; }
}

.dfg-c-rank__pos {
    margin: 0;
    font-family: var(--dfg-font-display);
    font-size: 1.1rem;
    color: var(--color-secondary);
    grid-column: 1;
}

.dfg-c-rank__item .dfg-c-app__icon {
    grid-column: 2;
    width: 96px;
    height: 96px;
    border-radius: 22%;
    object-fit: contain;
}

.dfg-c-rank__body { grid-column: 3; min-width: 0; }

.dfg-c-rank__item .dfg-c-app__preview {
    grid-column: 4;
    width: auto;
    max-width: 160px;
    max-height: 220px;
    object-fit: contain;
}

.dfg-c-rank__name {
    margin: 0 0 4px;
    font-size: 1.45rem;
}

.dfg-c-rank__dev,
.dfg-c-rank__desc,
.dfg-c-rank__facts,
.dfg-c-rank__tag {
    margin: 0 0 8px;
    font-size: 1rem;
}

.dfg-c-rank__tag {
    color: var(--color-secondary);
    font-style: italic;
}

.dfg-c-rank__facts {
    color: var(--color-text-light);
    overflow-wrap: anywhere;
}

.dfg-c-rank__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

/* chart */
.dfg-c-chart {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dfg-c-chart__row {
    display: grid;
    grid-template-columns: minmax(8rem, 14rem) 1fr auto;
    gap: 12px;
    align-items: center;
}

.dfg-c-chart__track {
    display: block;
    height: 14px;
    background: #cfe6f0;
    border: 1px solid var(--color-border);
}

.dfg-c-chart__fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
}

.dfg-c-chart__val {
    font-family: var(--dfg-font-display);
    color: var(--color-primary);
}

/* table */
.dfg-c-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 12px;
}

.dfg-c-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
    background: var(--color-surface);
}

.dfg-c-table th,
.dfg-c-table td {
    border: 1px solid var(--color-border);
    padding: 10px 12px;
    text-align: left;
    font-size: 1rem;
}

.dfg-c-table th {
    background: #d7ebf4;
    font-family: var(--dfg-font-display);
    font-weight: 400;
}

/* cta */
.dfg-c-cta {
    margin: 32px 0 0;
    padding: 48px 0;
    background: linear-gradient(180deg, #cfe8f4, #b9daf0);
    text-align: center;
}

.dfg-c-cta p {
    max-width: 52ch;
    margin: 0 auto 20px;
}

/* inner pages */
.dfg-c-page {
    padding: 36px 0 56px;
}

.dfg-c-page__title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    margin: 0 0 12px;
}

.dfg-c-page__lead {
    max-width: 60ch;
    margin: 0 0 24px;
}

.dfg-c-crumbs {
    margin: 0 0 18px;
}

.dfg-c-crumbs__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.95rem;
    color: var(--color-text-light);
}

.dfg-c-crumbs__item:not(:last-child)::after {
    content: "/";
    margin-left: 8px;
    color: var(--color-border);
}

.dfg-c-prose {
    max-width: 68ch;
}

.dfg-c-prose h2 {
    margin-top: 1.6em;
}

.dfg-c-prose .dfg-c-sidefacts {
    float: right;
    width: min(100%, 240px);
    margin: 0 0 16px 20px;
    padding: 14px;
    border: 1.5px solid var(--color-primary);
    background: rgba(255, 255, 255, 0.7);
    font-size: 0.98rem;
}

.dfg-c-prose .dfg-c-sidefacts h3 {
    margin: 0 0 8px;
    font-size: 1.15rem;
}

.dfg-c-prose .dfg-c-sidefacts ul {
    margin: 0;
    padding-left: 1.1rem;
}

.dfg-c-review-hero {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.dfg-c-columns-table {
    width: 100%;
    border-collapse: collapse;
}

.dfg-c-columns-table th,
.dfg-c-columns-table td {
    border-bottom: 1px solid var(--color-border);
    padding: 12px 8px;
    text-align: left;
}

.dfg-c-contact-card {
    border: 1.5px solid var(--color-primary);
    padding: 24px;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.65);
}

.dfg-c-steps {
    counter-reset: dfg-step;
    list-style: none;
    margin: 0;
    padding: 0;
}

.dfg-c-steps li {
    counter-increment: dfg-step;
    position: relative;
    padding-left: 48px;
    margin-bottom: 18px;
}

.dfg-c-steps li::before {
    content: counter(dfg-step);
    position: absolute;
    left: 0;
    top: 0;
    width: 32px;
    height: 32px;
    border: 1.5px solid var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--dfg-font-display);
    color: var(--color-primary);
}

.dfg-c-archive {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dfg-c-archive li {
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
}

/* footer centred stack */
.dfg-c-footer {
    background: #0a4a7d;
    color: #e8f4f8;
    padding: 40px 0 32px;
    text-align: center;
}

.dfg-c-footer a,
.dfg-c-footer a:visited {
    color: #00d4ff;
}

.dfg-c-footer__stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.dfg-c-footer__brand img {
    width: 160px;
    height: auto;
    filter: brightness(1.15);
}

.dfg-c-footer__lead,
.dfg-c-footer__legal,
.dfg-c-footer__copy {
    margin: 0;
    max-width: 62ch;
    font-size: 1rem;
}

.dfg-c-footer__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 18px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.dfg-c-footer__cookie {
    background: none;
    border: 0;
    color: #00d4ff;
    font: inherit;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

/* cookie bar L10 #2 */
.dfg-c-cookie { display: none; }

.dfg-c-cookie:not([hidden]) {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 110;
    background: #16324a;
    color: #e8f4f8;
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.18);
}

.dfg-c-cookie__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 0;
}

.dfg-c-cookie p {
    margin: 0;
    flex: 1 1 240px;
    font-size: 1rem;
}

.dfg-c-cookie a { color: #00d4ff; }

.dfg-c-cookie__actions {
    display: flex;
    gap: 8px;
}

.dfg-c-cookie .dfg-c-btn {
    box-shadow: none;
    min-height: 44px;
}

.dfg-c-cookie .dfg-c-btn--primary {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #0a4a7d;
}

.dfg-c-cookie .dfg-c-btn:not(.dfg-c-btn--primary) {
    border-color: #e8f4f8;
    color: #e8f4f8;
}

/* mobile nav L9 #4 top sheet */
@media (max-width: 1100px) {
    .dfg-c-nav { display: none; }
    .dfg-c-header__cta { display: none; }
    .dfg-c-burger { display: block; }

    .dfg-c-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 200;
        background: rgba(0, 0, 0, 0.45);
        opacity: 0;
        visibility: hidden;
        transition: opacity .25s, visibility .25s;
    }

    .dfg-c-drawer {
        display: block;
        position: fixed;
        z-index: 210;
        background: #e8f4f8;
        overflow-y: auto;
        visibility: hidden;
        transition: transform .3s ease, opacity .3s ease, visibility .3s;
    }

    .dfg-c-drawer--top {
        top: var(--dfg-header-h);
        left: 0;
        right: 0;
        max-height: calc(100dvh - var(--dfg-header-h));
        padding: 56px 20px 20px;
        transform: translateY(-16px);
        opacity: 0;
    }

    .dfg-c-drawer a {
        display: block;
        padding: 14px 8px;
        color: var(--color-primary);
        text-decoration: none;
        border-bottom: 1px solid var(--color-border);
    }

    .dfg-c-drawer__close {
        position: absolute;
        top: 8px;
        right: 12px;
        width: 44px;
        height: 44px;
        border: 0;
        background: transparent;
        font-size: 1.8rem;
        color: var(--color-primary);
        cursor: pointer;
    }

    body.nav-open .dfg-c-overlay {
        opacity: 1;
        visibility: visible;
    }

    body.nav-open .dfg-c-drawer--top {
        visibility: visible;
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 900px) {
    .dfg-c-rank__item {
        grid-template-columns: auto 72px minmax(0, 1fr);
    }
    .dfg-c-rank__item .dfg-c-app__preview {
        grid-column: 1 / -1;
        margin: 8px auto 0;
        max-width: 200px;
    }
    .dfg-c-chart__row {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .dfg-c-prose .dfg-c-sidefacts {
        float: none;
        width: 100%;
        margin: 0 0 16px;
    }
}

@media (max-width: 768px) {
    .dfg-c-header__logo img { width: 120px; }
    .dfg-c-hero__nums { grid-template-columns: 1fr; }
    .dfg-c-hero__actions { flex-direction: column; }
    .dfg-c-hero__actions .dfg-c-btn { width: 100%; }
    .dfg-c-rank__item {
        grid-template-columns: 1fr;
    }
    .dfg-c-rank__item .dfg-c-app__icon {
        width: 72px;
        height: 72px;
    }
    .dfg-c-cookie__inner {
        padding: 12px;
    }
    .dfg-c-cookie__actions {
        width: 100%;
    }
    .dfg-c-cookie__actions .dfg-c-btn {
        flex: 1;
    }
}

@media (max-width: 480px) {
    body { font-size: 1.05rem; }
}
