:root {
    --primary: #003366;
    /* Deep Globe Blue */
    --accent: #b71c1c;
    /* Alert Red (Subtle) */
    --text: #2c3e50;
    --grey-text: #596e79;
    --bg: #ffffff;
    --light-bg: #f8f9fa;
    --border: #dee2e6;
    --serif: "Merriweather", serif;
    --sans: "Noto Sans JP", sans-serif;
}

body {
    font-family: var(--sans);
    color: var(--text);
    background-color: var(--bg);
    margin: 0;
    padding: 0;
    line-height: 1.7;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Header */
.header {
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo img {
    height: 50px;
}

.logo-text h1 {
    font-family: var(--serif);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

.logo-text .sub {
    font-size: 0.8rem;
    color: var(--grey-text);
    letter-spacing: 1px;
}

.header-info {
    text-align: right;
    font-size: 0.8rem;
    color: var(--grey-text);
}

.update-label {
    display: block;
    font-weight: bold;
    color: var(--accent);
}

/* Ticker */
.ticker-wrap {
    background: var(--primary);
    color: #fff;
    overflow: hidden;
    height: 30px;
    line-height: 30px;
    font-size: 0.85rem;
}

.ticker {
    display: flex;
    animation: ticker 30s linear infinite;
    white-space: nowrap;
}

.ticker-item {
    padding: 0 50px;
}

.ticker-item::before {
    content: "●";
    color: var(--accent);
    /* actually maybe white or light red */
    color: #ff5252;
    margin-right: 10px;
}

@keyframes ticker {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* Hero */
.hero {
    padding: 60px 0;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.hero-inner {
    display: flex;
    align-items: center;
    gap: 50px;
}

.hero-text {
    flex: 1;
    z-index: 2;
}

.category {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 10px;
    display: block;
}

.hero-text h2 {
    font-family: var(--serif);
    font-size: 2.2rem;
    color: var(--text);
    margin: 0 0 20px;
    line-height: 1.4;
}

.hero-text p {
    color: var(--grey-text);
    font-size: 1.05rem;
}

/* CSS Map - Enhanced Dotted Grid */
.hero-map {
    flex: 0 0 450px;
    height: 300px;
    background-color: #f0f4f8;
    /* Light gray-blue background */
    background-image: radial-gradient(#cbd5e0 1.5px, transparent 1.5px);
    background-size: 20px 20px;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.05);
}

.hero-map::before {
    /* World Map Silhouette (Abstract) */
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 80%;
    background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 50" xmlns="http://www.w3.org/2000/svg"><path d="M20,15 Q30,5 50,15 T90,15 T80,35 T50,40 T20,30 Z" fill="%23dbe2e8" /></svg>') no-repeat center center;
    background-size: contain;
    opacity: 0.5;
    /* Since we don't have a real map SVG handy, this abstract blob + dots will suffice for the "tech" feel, or we rely on the points. 
       Actually, let's remove the blob if it looks bad and just keep the dots which look professional. */
    display: none;
}

/* Pins with pulse effect */
.pin {
    width: 12px;
    height: 12px;
    background: #b71c1c;
    /* Deep Red */
    border-radius: 50%;
    position: absolute;
    z-index: 10;
    box-shadow: 0 0 0 4px rgba(183, 28, 28, 0.15);
}

.pin::before {
    /* Halo */
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background: rgba(183, 28, 28, 0.1);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.pin::after {
    /* Label */
    content: attr(data-loc);
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: bold;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.7);
    padding: 2px 6px;
    border-radius: 4px;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.8;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* Adjust Positions to relatively match a world map projection */
.pin-jp {
    top: 38%;
    left: 82%;
}

/* Tokyo */
.pin-sg {
    top: 58%;
    left: 74%;
}

/* Singapore */
.pin-uk {
    top: 28%;
    left: 47%;
}

/* London */
.pin-us {
    top: 32%;
    left: 24%;
}

/* New York */

/* Ranking */
.ranking-area {
    padding: 60px 0;
}

.section-head {
    margin-bottom: 40px;
}

.section-head h3 {
    font-size: 0.9rem;
    color: var(--grey-text);
    margin: 0 0 5px;
    letter-spacing: 1px;
}

.section-head h2 {
    font-family: var(--serif);
    font-size: 2rem;
    margin: 0 0 15px;
    color: var(--primary);
}

.divider {
    width: 60px;
    height: 3px;
    background: var(--accent);
}

.divider.center {
    margin: 0 auto;
}

.section-head.center {
    text-align: center;
}

/* Rank Card */
.rank-card {
    display: flex;
    border-bottom: 1px solid var(--border);
    padding: 30px 0;
}

.rank-card:last-child {
    border-bottom: none;
}

.rank-col {
    flex: 0 0 80px;
    text-align: center;
}

.rank-num {
    font-family: var(--serif);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.info-col {
    flex: 1;
}

.company-head {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.company-head h3 {
    margin: 0;
    font-size: 1.4rem;
}

.auth-badge {
    background: var(--primary);
    color: #fff;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 2px;
    font-weight: bold;
}

.summary {
    font-size: 0.95rem;
    color: var(--grey-text);
    margin-bottom: 20px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
    max-width: 500px;
}

.metric .lbl {
    font-size: 0.8rem;
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
    color: var(--text);
}

.bar-wrap {
    background: #e9ecef;
    height: 6px;
    border-radius: 3px;
}

.bar {
    background: var(--primary);
    height: 100%;
    border-radius: 3px;
}

.action-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed var(--border);
    padding-top: 15px;
}

.meta-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
    font-size: 0.85rem;
    color: var(--grey-text);
}

.btn {
    display: inline-block;
    padding: 8px 20px;
    font-size: 0.85rem;
    font-weight: bold;
    border-radius: 2px;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: #d32f2f;
}

.btn-outline {
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    background: var(--light-bg);
}

/* Data Table */
.bg-light {
    background: var(--light-bg);
    padding: 60px 0;
}

.table-wrap {
    overflow-x: auto;
    margin-top: 30px;
}

.geo-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.geo-table th,
.geo-table td {
    padding: 15px;
    text-align: center;
    border: 1px solid var(--border);
}

.geo-table th {
    background: #fff;
    font-family: var(--serif);
    color: var(--primary);
}

.geo-table .agency {
    text-align: left;
    font-weight: bold;
}

.tick {
    color: var(--primary);
    font-weight: 500;
}

/* Flow */
.flow-section {
    padding: 60px 0;
    text-align: center;
}

.flow-section h3 {
    font-family: var(--serif);
    color: var(--text);
    margin-bottom: 40px;
    font-size: 1.5rem;
}

.flow-steps {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
}

.f-step {
    width: 200px;
}

.f-num {
    font-family: var(--serif);
    font-size: 2rem;
    color: var(--border);
    font-weight: 700;
    margin-bottom: 10px;
}

.f-step h4 {
    margin: 0 0 10px;
    color: var(--primary);
}

.f-step p {
    font-size: 0.85rem;
    color: var(--grey-text);
}

.f-arrow {
    height: 100px;
    /* Approximate height */
    width: 30px;
    border-top: 2px solid var(--border);
    margin-top: 40px;
}

/* Footer */
.footer {
    background: var(--primary);
    color: #fff;
    padding: 40px 0;
}

.footer-row {
    display: flex;
    justify-content: space-between;
}

.footer-row h4 {
    margin: 0 0 10px;
    font-family: var(--serif);
}

.footer-row p {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-inner {
        flex-direction: column;
    }

    .hero-map {
        width: 100%;
        flex: auto;
    }

    .rank-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .rank-col {
        margin-bottom: 10px;
    }

    .company-head {
        justify-content: center;
        flex-direction: column;
    }

    .action-row {
        flex-direction: column;
        gap: 15px;
    }

    .metrics-grid {
        margin: 0 auto 20px;
    }

    .flow-steps {
        flex-direction: column;
        align-items: center;
    }

    .f-arrow {
        width: 0;
        height: 30px;
        border-top: none;
        border-left: 2px solid var(--border);
        margin: 0;
    }

    .container {
        padding: 0 15px;
    }
}