/* =====================
   1. BASE
   ===================== */

body {
    background-color: rgb(20, 20, 20);
    color: white;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content {
    flex: 1;
    padding-top: 1rem;
}

.muted-label {
    color: gray;
}

/* Score colour modifiers (used in index and guide pages) */
.score-value {
    font-size: 1.25em;
}

.score-green {
    color: green;
}

.score-lightgreen {
    color: lightgreen;
}

.score-yellow {
    color: yellow;
}

.score-orange {
    color: orange;
}

.score-red {
    color: red;
}

.label-short {
    display: none;
}

.metric-header {
    position: relative;
}

.metric-help {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    color: inherit;
    cursor: help;
    transition: color 0.2s ease;
}

.metric-help:hover {
    color: orange;
}

.metric-help:focus-visible {
    outline: 2px solid rgba(255, 165, 0, 0.8);
    outline-offset: 4px;
    border-radius: 8px;
}

.metric-tooltip {
    position: absolute;
    top: calc(100% + 0.75rem);
    left: 50%;
    display: none;
    width: 11.5rem;
    padding: 0.8rem 0.85rem;
    border: 1px solid rgba(255, 165, 0, 0.35);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(38, 38, 38, 0.98) 0%, rgba(22, 22, 22, 0.98) 100%);
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.45;
    text-align: left;
    white-space: normal;
    transform: translateX(-50%);
    isolation: isolate;
    z-index: 12;
}

.metric-tooltip::before {
    content: "";
    position: absolute;
    top: -0.46rem;
    left: 50%;
    width: 0.8rem;
    height: 0.8rem;
    border-top: 1px solid rgba(255, 165, 0, 0.35);
    border-left: 1px solid rgba(255, 165, 0, 0.35);
    background: rgb(33, 33, 33);
    transform: translateX(-50%) rotate(45deg);
    z-index: -1;
}

.metric-tooltip-title,
.metric-tooltip-text,
.metric-tooltip-scale {
    display: block;
}

.metric-tooltip-title {
    margin-bottom: 0.35rem;
    color: orange;
    font-size: 0.95rem;
    font-weight: 700;
}

.metric-tooltip-text {
    margin-bottom: 0.45rem;
    color: rgba(255, 255, 255, 0.82);
}

.metric-tooltip-caption {
    color: rgba(255, 255, 255, 0.64);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.metric-tooltip-config {
    display: grid;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.metric-tooltip-config-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.metric-tooltip-config-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.35rem 0.5rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.metric-tooltip-config-inline .metric-tooltip-config-item {
    justify-content: flex-start;
    gap: 0.4rem;
    padding: 0.22rem 0.45rem;
    border-radius: 999px;
}

.metric-tooltip-config-label,
.metric-tooltip-config-value {
    display: block;
}

.metric-tooltip-config-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.metric-tooltip-config-value {
    color: rgba(255, 255, 255, 0.92);
    font-weight: 600;
    font-size: 0.76rem;
}

.metric-tooltip-config-inline .metric-tooltip-config-label {
    color: orange;
    font-size: 0.68rem;
}

.metric-tooltip-config-inline .metric-tooltip-config-value {
    font-size: 0.68rem;
    font-weight: 500;
}

.metric-tooltip-scale {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.78rem;
    letter-spacing: 0.02em;
}

.metric-tooltip-scale-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 0.9rem;
    row-gap: 0.35rem;
    align-items: start;
}

.metric-tooltip-scale span {
    display: block;
}

.metric-tooltip-scale .analyst-scale-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.analyst-tooltip-icon {
    width: 0.85rem;
    text-align: center;
    flex: 0 0 0.85rem;
}

.analyst-tooltip-strong-buy {
    transform: rotate(-90deg);
}

.analyst-tooltip-buy {
    transform: rotate(-45deg);
}

.analyst-tooltip-hold {
    transform: rotate(0deg);
}

.analyst-tooltip-sell {
    transform: rotate(45deg);
}

.analyst-tooltip-strong-sell {
    transform: rotate(90deg);
}

.metric-tooltip-scale > span + span {
    margin-top: 0;
}

.metric-tooltip-scale-grid span + span {
    margin-top: 0;
}

.metric-tooltip-scale .score-green {
    color: #78c878;
}

.metric-tooltip-scale .score-lightgreen {
    color: #a7d67d;
}

.metric-tooltip-scale .score-yellow {
    color: #d8c86b;
}

.metric-tooltip-scale .score-orange {
    color: #d8a26b;
}

.metric-tooltip-scale .score-red {
    color: #d47a7a;
}

.metric-help:hover .metric-tooltip,
.metric-help:focus .metric-tooltip,
.metric-help:focus-visible .metric-tooltip,
.metric-help:active .metric-tooltip {
    display: block;
}


/* =====================
   2. HEADER
   ===================== */

/* Layout container */
.header {
    display: flex;
    justify-content: center;
    padding: 1rem 0 0.9rem;
}

.header .header-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 90%;
}

.header .header-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 0 0 auto;
    min-width: 0;
}

.header .header-copy {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 1rem;
    justify-content: flex-end;
    min-width: 0;
    position: relative;
}

.header-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.28rem;
    width: 2.7rem;
    height: 2.7rem;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.78);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

/* Lock body scroll when mobile overlay is open */
body.mobile-menu-open {
    overflow: hidden;
}

.header-menu-toggle:hover {
    border-color: rgba(255, 165, 0, 0.28);
    background: rgba(255, 165, 0, 0.08);
}

.header-menu-toggle[aria-expanded="true"] {
    border-color: rgba(255, 165, 0, 0.32);
    background: rgba(255, 165, 0, 0.14);
}

/* Individual bars of the burger icon (animate to X when open) */
.header-menu-toggle-bar {
    display: block;
    width: 1rem;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.header-menu-toggle[aria-expanded="true"] .header-menu-toggle-bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.header-menu-toggle[aria-expanded="true"] .header-menu-toggle-bar:nth-child(2) {
    opacity: 0;
}

.header-menu-toggle[aria-expanded="true"] .header-menu-toggle-bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.header .icon-wrapper {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
}

.header .icon-wrapper img {
    display: block;
    width: 3em;
    height: 3em;
}

/* Orange tint on logo hover */
.header .icon-wrapper img:hover {
    cursor: pointer;
    filter: brightness(0) saturate(100%) invert(70%) sepia(83%) saturate(749%) hue-rotate(358deg) brightness(103%) contrast(101%);
}

/* Page title displayed next to the logo */
.header .page-name {
    font-size: 2.25em;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: orange;
    min-width: 0;
    flex: 0 1 auto;
    text-align: left;
}

.header .page-name h1 {
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

/* Primary navigation — pill links row on desktop, full-screen overlay on mobile */
.site-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin-left: auto;
    justify-content: flex-end;
}

.site-nav-item {
    position: relative;
    display: inline-flex;
}

.site-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.15rem;
    padding: 0.38rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    box-sizing: border-box;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.site-nav-dropdown-trigger {
    margin: 0;
    border-width: 1px;
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
    gap: 0.45rem;
    cursor: pointer;
}

.site-nav-caret {
    font-size: 0.8em;
    line-height: 1;
    transition: transform 0.2s ease;
}

.site-nav-dropdown:hover .site-nav-caret,
.site-nav-dropdown:focus-within .site-nav-caret,
.site-nav-dropdown.is-open .site-nav-caret {
    transform: rotate(180deg);
}

/* Desktop dropdown panel for the Dashboard submenu */
.site-nav-menu {
    position: absolute;
    top: calc(100% + 0.22rem);
    right: 0;
    display: none;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 0.35rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(34, 34, 34, 0.98) 0%, rgba(21, 21, 21, 0.98) 100%);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
    box-sizing: border-box;
    z-index: 20;
}

.site-nav-dropdown::after {
    content: "";
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    height: 0.3rem;
}

.site-nav-dropdown:hover .site-nav-menu,
.site-nav-dropdown:focus-within .site-nav-menu,
.site-nav-dropdown.is-open .site-nav-menu {
    display: grid;
    gap: 0.25rem;
}

.site-nav-menu-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 2rem;
    padding: 0.34rem 0.52rem;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.76);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.2s ease, color 0.2s ease;
}

.site-nav-menu-link:hover {
    background: rgba(255, 165, 0, 0.08);
    color: orange;
}

.site-nav-menu-link.is-active {
    background: transparent;
    color: rgba(255, 214, 145, 0.96);
}

.site-nav-menu-link.is-disabled {
    cursor: default;
    pointer-events: none;
}

.site-nav-link:hover {
    border-color: rgba(255, 165, 0, 0.28);
    background: rgba(255, 165, 0, 0.08);
    color: orange;
}

.site-nav-dropdown-trigger:hover {
    border-color: rgba(255, 165, 0, 0.32);
    background: rgba(255, 165, 0, 0.1);
    color: rgba(255, 214, 145, 0.96);
}

.site-nav-link.is-active {
    border-color: rgba(255, 165, 0, 0.32);
    background: rgba(255, 165, 0, 0.14);
    color: rgba(255, 214, 145, 0.96);
}

.site-nav-link.is-disabled {
    opacity: 0.42;
    cursor: default;
    pointer-events: none;
}

/* Separator line between header and page content */
hr {
    width: 90%;
    margin: 0 auto;
}

/* =====================
   3. CONTENT
   ===================== */

/* --- a. Content header (upload + last-updated date) --- */

/* Flex row: upload area left, date right */
.content .content_info {
    display: flex;
    margin: auto;
    width: 90%;
    justify-content: space-between;
    font-size: 1.125rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
/* Default spacing for direct children of the content header */
.content .content_info > * {
    padding: 0.5rem;
}

.content .content_info .date {
    display: flex;
    align-items: flex-start;
    align-self: flex-start;
    margin-left: auto;
    padding-top: 0;
}

.content .content_info .date-text {
    display: inline-flex;
    flex-direction: column;
    gap: 0.18rem;
    min-width: 12rem;
    padding: 0.05rem 0 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    font-size: 0.98rem;
    line-height: 1.2;
    align-items: flex-end;
    text-align: right;
}

.content .content_info .date-text .muted-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.content .content_info .date-text .date-value {
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.08rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    font-variant-numeric: tabular-nums;
}
/* Drop-zone box */
.content .content_info .upload #drop-area {
    border: 2px dashed #ccc;
    border-radius: 20px;
    max-width: 175px;
    padding: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}
/* Upload icon size */
.content .content_info .upload #drop-area i {
    font-size: 1.75rem;
}
/* Orange tint on upload icon hover */
.content .content_info .upload #drop-area i:hover {
    cursor: pointer;
    color: orange;
}
/* Centre text and icon inside the drop box */
.content .content_info .upload #drop-area p, #drop-area i {
    margin: 5px;
    text-align: center;
}

.content .content_info .upload #drop-area .upload-help {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: #ccc;
    cursor: help;
}

.content .content_info .upload #drop-area .upload-help i {
    margin: 0;
    font-size: 1rem;
}

.content .content_info .upload #drop-area .upload-help:hover,
.content .content_info .upload #drop-area .upload-help:focus-visible {
    color: orange;
}

.content .content_info .upload #drop-area .upload-tooltip {
    position: absolute;
    top: calc(100% + 0.4rem);
    right: 0;
    display: none;
    min-width: 12.5rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(255, 165, 0, 0.35);
    border-radius: 12px;
    background: linear-gradient(180deg, rgb(33, 33, 33) 0%, rgb(23, 23, 23) 100%);
    color: white;
    font-size: 0.95rem;
    line-height: 1.45;
    text-align: left;
    white-space: normal;
    z-index: 10;
}

.content .content_info .upload #drop-area .upload-tooltip-title,
.content .content_info .upload #drop-area .upload-tooltip-text,
.content .content_info .upload #drop-area .upload-tooltip-example {
    display: block;
}

.content .content_info .upload #drop-area .upload-tooltip-title {
    margin-bottom: 0.35rem;
    color: orange;
    font-size: 1rem;
    font-weight: 700;
}

.content .content_info .upload #drop-area .upload-tooltip-text {
    margin-bottom: 0.45rem;
    color: rgba(255, 255, 255, 0.8);
}

.content .content_info .upload #drop-area .upload-tooltip-example {
    margin-bottom: 0.45rem;
    padding: 0.55rem 0.65rem;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.content .content_info .upload #drop-area .upload-tooltip-filename {
    display: block;
    margin-bottom: 0.35rem;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.content .content_info .upload #drop-area .upload-help:hover .upload-tooltip,
.content .content_info .upload #drop-area .upload-help:focus-visible .upload-tooltip {
    display: block;
}
/* Highlight state while a file is dragged over the drop zone */
.content .content_info .upload #drop-area.highlight {
    border-color: orange;
}
/* Hide native file input — triggered programmatically */
.content .content_info .upload #drop-area #file {
    display: none;
}

/* --- b. Flash message (upload feedback) --- */

.message {
    border: 1px solid #f3ff00;
    border-radius: 10px;
    color: #f3ff00;
    font-size: 1.25rem;
    letter-spacing: 2px;
    text-align: center;
    margin: 1rem auto;
    white-space: pre-line;
    padding: 5px;
    max-width: 300px;
}

/* --- c. Profile tables (index page watchlist) --- */

/* Wrapper for a single portfolio profile */
.content .profiles {
    display: flex;
    flex-direction: column;
    margin: 0 auto 4rem;
    max-width: 78%;
    padding: 1rem 1.15rem 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: transparent;
}

.content .profiles:last-child {
    margin-bottom: 0;
}
/* Profile name heading row */
.content .profiles .table-name {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-size: 1.875em;
    text-align: center;
    padding-bottom: 0.7em;
    cursor: unset;
}
.content .profiles .table-name a {
    text-decoration: none;
    min-width: 0;
    display: inline-flex;
    justify-content: center;
}
/* Profile name text */
.content .profiles .table-name span {
    color: aquamarine;
    text-transform: uppercase;
    cursor: default;
    transition: color 0.2s ease;
}
/* Hover colour for the profile name link */
.content .profiles .table-name a span:hover {
    color: mediumaquamarine;
}

.content .profiles .table-name .table-name-meta {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(calc(-50% - 0.42em));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.56rem 1.02rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: transparent;
    color: rgba(255, 214, 145, 0.88);
    font-size: 0.52em;
    font-weight: 700;
    letter-spacing: 0.08em;
    white-space: nowrap;
    text-transform: uppercase;
    cursor: default;
}

.table-head-label-short {
    display: none;
}

/* Base row (shared by head and data rows) */
.content .profiles .table {
    display: flex;
    align-items: center;
    padding: 0.8rem 0.6rem;
    border-bottom: none;
}
/* Column header row */
.content .profiles .table.head {
    font-size: 1.375em;
    font-weight: 700;
    margin-bottom: 0.3rem;
    border-radius: 0;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.68);
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08);
}

.content .profiles .table.head .col-1 {
    color: rgba(255, 255, 255, 0.96);
}
/* Data row */
.content .profiles .table.row {
    position: relative;
    font-size: 1.25em;
    margin-bottom: 0.12rem;
    border-radius: 0;
    border: none;
    background: transparent;
    transition: background 0.2s ease;
}

.content .profiles .table.row:last-child {
    margin-bottom: 0;
}

.content .profiles .table.row::after {
    content: "";
    position: absolute;
    left: 0.6rem;
    right: 0.6rem;
    bottom: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    pointer-events: none;
}

.content .profiles .table.row:last-child::after {
    display: none;
}

.content .profiles .table.row:hover {
    background: rgba(255, 255, 255, 0.025);
}

.content .profiles .table.row.table-row-empty:hover {
    background: transparent;
}
/* Column base padding */
.content .profiles .table .col {
    padding: 0 0.75rem;
}

.content .profiles .table .col-empty {
    width: 100%;
    text-align: center;
    color: rgba(255, 255, 255, 0.58);
    font-weight: 500;
}
/* Col 1: Security name */
.content .profiles .table .col-1 {
    text-align: left;
    width: 40%;
}
/* Name link colour */
.content .profiles .table .col-1 a {
    color: white;
    text-decoration: none;
    transition: color 0.2s ease;
}

.content .profiles .table .col-1 a:hover {
    color: orange;
}
/* Col 2: Close price */
.content .profiles .table .col-2 {
    text-align: right;
    width: 15%;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.96);
}
/* Col 3: Dividend yield */
.content .profiles .table .col-3 {
    text-align: right;
    width: 15%;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
}
/* Col 4: Trading signal */
.content .profiles .table .col-4 {
    text-align: center;
    width: 10%;
}
/* Col 5: Analyst rating */
.content .profiles .table .col-5 {
    text-align: center;
    width: 15%;
}
/* Col 6: Piotroski F-Score */
.content .profiles .table .col-6 {
    text-align: center;
    width: 5%;
}
/* Font Awesome icon size override inside table cells */
.content .profiles .table .col .fa-lg {
    font-weight: 600;
}

.content .profiles .table.row .col-4,
.content .profiles .table.row .col-5,
.content .profiles .table.row .col-6 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.2rem;
}

.score-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.8rem;
}

/* Analyst rating arrow icons (rotated to indicate direction) */
#strong-buy {
    color: green;
    transform: rotate(-90deg);
}
/* Buy — arrow 45° upward */
#buy {
    color: yellowgreen;
    transform: rotate(-45deg);
}
/* Sell — arrow 45° downward */
#sell {
    color: orangered;
    transform: rotate(45deg);
}
/* Neutral / Hold — arrow pointing right */
#neutral {
    color: #d8c86b;
    transform: rotate(0deg);
}
/* Strong sell — arrow 90° downward */
#strong-sell {
    color: red;
    transform: rotate(90deg);
}
/* Signal cell colour overrides */
#signal.buy {
    color: green;
}
#signal.sell {
    color: red;
}

/* =====================
   4. RESPONSIVE
   ===================== */

/* Large desktop — 1200 px and below */
@media (max-width: 1200px) {
    /* Header */
    .header .page-name {
        font-size: 2em;
        letter-spacing: 1.5px;
    }

    .header .header-brand {
        gap: 0.85rem;
    }

    /* Content */
    .content .content_info {
        font-size: 1.0625rem;
    }

    .content .profiles .table-name {
        font-size: 1.625em;
    }

    .content .profiles .table.head {
        font-size: 1.25em;
    }

    .content .profiles .table.row {
        font-size: 1.125em;
    }
}

/* Small desktop / large tablet — 1024 px and below */
@media (max-width: 1024px) {
    /* Header */
    .header .header-inner {
        gap: 0.9rem;
    }

    .header .header-copy {
        gap: 0.85rem;
    }

    .header .page-name {
        font-size: 1.875em;
        letter-spacing: 1.5px;
    }

    .site-nav-link {
        padding: 0.36rem 0.72rem;
        font-size: 0.84rem;
    }

    /* Content */
    .content .profiles {
        max-width: 84%;
    }

    .content .content_info {
        font-size: 1rem;
    }

    .content .content_info .upload #drop-area i {
        font-size: 1.5rem;
    }

    .content .profiles .table-name {
        font-size: 1.5em;
    }

    .label-full {
        display: none;
    }

    .label-short {
        display: inline;
    }

    .metric-tooltip {
        width: 9.75rem;
        padding: 0.65rem 0.65rem;
        font-size: 0.72rem;
        left: auto;
        right: 0;
        transform: none;
    }

    .metric-tooltip::before {
        top: -0.3rem;
        left: auto;
        right: 0.22rem;
        transform: rotate(48deg);
    }

    .metric-header:not(.fscore-header) .metric-tooltip::before {
        top: -0.42rem;
        right: 0.5rem;
    }

    .fscore-header .metric-tooltip::before {
        transform: rotate(62deg);
    }

    .metric-tooltip-title {
        font-size: 0.78rem;
    }

    .metric-tooltip-scale {
        font-size: 0.68rem;
        line-height: 1.35;
    }

    .metric-tooltip-config-item {
        padding: 0.3rem 0.45rem;
    }

    .metric-tooltip-config-inline .metric-tooltip-config-item {
        padding: 0.2rem 0.4rem;
    }

    .metric-tooltip-caption {
        font-size: 0.62rem;
    }

    .metric-tooltip-config-label {
        font-size: 0.66rem;
    }

    .metric-tooltip-config-value {
        font-size: 0.7rem;
    }

    .metric-tooltip-scale-grid {
        grid-template-columns: 1fr;
        row-gap: 0.35rem;
    }

    .content .profiles .table.head {
        font-size: 1.2em;
    }
    .content .profiles .table.row {
        font-size: 1.1em;
    }
}

/* Tablet and mobile — 768 px and below */
@media (max-width: 768px) {
    /* Header */
    .header {
        padding-top: 0.9rem;
        padding-bottom: 0.8rem;
        position: relative;
        z-index: 60;
    }

    .header .header-inner {
        align-items: center;
        gap: 0.75rem;
    }

    .header .header-brand {
        flex: 1 1 auto;
        width: auto;
        justify-content: flex-start;
    }

    .header .header-copy {
        flex: 0 0 auto;
        width: auto;
        align-items: center;
        justify-content: flex-end;
    }

    .header .page-name {
        font-size: 1.625em;
        letter-spacing: 1px;
        text-align: left;
    }

    .header-menu-toggle {
        display: inline-flex;
        position: relative;
        z-index: 70;
    }

    .site-nav {
        position: fixed;
        inset: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        height: 100vh;
        padding: 6.5rem 1.2rem 2rem;
        box-sizing: border-box;
        border: 0;
        border-radius: 0;
        background: linear-gradient(180deg, rgba(18, 18, 18, 0.66) 0%, rgba(10, 10, 10, 0.74) 100%);
        backdrop-filter: blur(12px);
        box-shadow: none;
        margin-left: 0;
        gap: 0.75rem;
        z-index: 50;
        overflow-y: auto;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateX(100%);
        will-change: transform, opacity;
        transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease, visibility 0.3s ease;
    }

    .site-nav > .site-nav-link,
    .site-nav > .site-nav-link.is-disabled,
    .site-nav-item {
        width: 100%;
        max-width: min(24rem, 100%);
    }

    .site-nav-dropdown {
        flex-direction: column;
        align-items: stretch;
    }

    .site-nav-menu {
        position: static;
        display: grid;
        width: 100%;
        min-width: 0;
        max-width: none;
        max-height: 0;
        margin-top: 0;
        padding: 0 0.3rem;
        box-sizing: border-box;
        box-shadow: none;
        border: 1px solid transparent;
        background: rgba(255, 255, 255, 0.045);
        opacity: 0;
        overflow: hidden;
        pointer-events: none;
        transform: translateY(-8px);
        transition: max-height 0.42s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease, transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), margin-top 0.3s ease, padding 0.3s ease, border-color 0.3s ease;
    }

    .site-nav-link {
        width: 100%;
        min-height: 2.9rem;
        padding: 0.7rem 1rem;
        box-sizing: border-box;
        font-size: 0.95rem;
        letter-spacing: 0.08em;
        justify-content: center;
        text-align: center;
        border-radius: 14px;
    }

    .site-nav-dropdown-trigger {
        position: relative;
        padding-right: 2.5rem;
        justify-content: center;
    }

    .site-nav-dropdown-trigger .site-nav-caret {
        position: absolute;
        right: 1rem;
    }

    .site-nav-menu-link {
        width: 100%;
        min-height: 2.5rem;
        padding: 0.55rem 0.8rem;
        box-sizing: border-box;
        font-size: 0.84rem;
        letter-spacing: 0.05em;
        justify-content: center;
        text-align: center;
    }

    .site-nav-dropdown:hover .site-nav-menu,
    .site-nav-dropdown:focus-within .site-nav-menu {
        max-height: 0;
        opacity: 0;
        transform: translateY(-8px);
        margin-top: 0;
        padding-top: 0;
        padding-bottom: 0;
        border-color: transparent;
        pointer-events: none;
    }

    .site-nav-dropdown.is-open .site-nav-menu {
        max-height: 16rem;
        gap: 0.25rem;
        margin-top: 0.35rem;
        padding-top: 0.3rem;
        padding-bottom: 0.3rem;
        border-color: rgba(255, 255, 255, 0.08);
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .site-nav.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateX(0);
    }

    /* Content */
    .content .content_info {
        font-size: 0.9375rem;
        flex-wrap: wrap;
    }

    .content .content_info .upload #drop-area i {
        font-size: 1.375rem;
    }

    .content .profiles {
        max-width: 88%;
    }

    .content .profiles .table-name {
        font-size: 1.375em;
    }

    .content .profiles .table.head {
        font-size: 1em;
    }

    .content .profiles .table.row {
        font-size: 0.95em;
    }

    .content .profiles .table .col {
        padding: 0 6px;
    }

    /* Footer */
    footer {
        font-size: 0.8rem;
        padding: 1.5rem 3%;
    }
}
/* Small tablet — 600 px and below */
@media (max-width: 600px) {
    .content .content_info {
        font-size: 0.8438rem;
        flex-wrap: wrap;
    }

    .content .content_info .upload #drop-area {
        max-width: 13.5rem;
        padding: 0.55rem 0.7rem 0.65rem;
    }

    .content .content_info .upload #drop-area i {
        font-size: 1.4rem;
    }

    .content .content_info .upload #drop-area p {
        font-size: 1.02em;
    }

    .content .profiles {
        width: min(100%, 31rem);
        max-width: calc(100% - 1.4rem);
        margin: 0 auto 2.2rem;
        padding: 0.2rem 0;
        border: none;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .content .profiles .table-name {
        position: relative;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: center;
        justify-content: initial;
        font-size: 1.25em;
        gap: 0.42rem;
        padding-bottom: 0.6rem;
    }

    .content .profiles .table-name a {
        grid-column: 2;
        width: auto;
        max-width: 100%;
    }

    .content .profiles .table-name a span {
        display: inline-block;
        width: auto;
        text-align: center;
        color: rgba(127, 255, 212, 0.96);
        letter-spacing: 0.05em;
        text-shadow: 0 0 12px rgba(127, 255, 212, 0.08);
    }

    .content .profiles .table {
        padding: 0.42rem 0;
    }

    .content .profiles .table.head {
        font-size: 0.9em;
        margin-bottom: 0.32rem;
        padding-bottom: 0.38rem;
        border: none;
        border-radius: 0;
        background: transparent;
        color: rgba(255, 255, 255, 0.58);
        box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08);
    }

    .content .profiles .table.row {
        position: relative;
        font-size: 0.88em;
        margin-bottom: 0.2rem;
        border: none;
        border-radius: 0;
        background: transparent;
    }

    .content .profiles .table.row::after {
        content: "";
        position: absolute;
        left: 0.18rem;
        right: 0.18rem;
        bottom: -0.08rem;
        height: 1px;
        background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0));
        pointer-events: none;
    }

    .content .profiles .table.row:last-child::after {
        display: none;
    }

    .content .profiles .table .col {
        padding: 0 0.18rem;
        box-sizing: border-box;
        flex: 0 0 auto;
    }

    .content .profiles .table .col-1 {
        width: 33%;
    }

    .content .profiles .table .col-2 {
        width: 18%;
    }

    .content .profiles .table .col-3 {
        width: 18%;
    }

    .content .profiles .table .col-4 {
        width: 11%;
    }

    .content .profiles .table .col-5 {
        width: 14%;
    }

    .content .profiles .table .col-6 {
        width: 6%;
    }

    .content .profiles .table.head .col {
        font-weight: 600;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.52);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: clip;
    }

    .content .profiles .table.head .col-1,
    .content .profiles .table.head .col-2,
    .content .profiles .table.head .col-3 {
        color: rgba(255, 255, 255, 0.96);
    }

    .content .profiles .table.head .metric-header {
        overflow: visible;
    }

    .table-head-label-full {
        display: none;
    }

    .table-head-label-short {
        display: inline;
    }

    .content .profiles .table.row .col-1 a {
        color: rgba(255, 255, 255, 0.96);
    }

    .content .profiles .table.row .col-2,
    .content .profiles .table.row .col-3 {
        font-variant-numeric: tabular-nums;
    }

    .content .profiles .table.row .col-2,
    .content .profiles .table.row .col-3,
    .content .profiles .table.row .col-6 {
        color: rgba(255, 255, 255, 0.94);
    }

    .content .profiles .table-name .table-name-meta {
        grid-column: 3;
        justify-self: end;
        position: static;
        transform: none;
        padding: 0.36rem 0.86rem;
        font-size: 0.56em;
        border: 1px solid rgba(255, 190, 90, 0.1);
        background: linear-gradient(180deg, rgba(255, 165, 0, 0.08), rgba(255, 165, 0, 0.03));
        color: rgba(255, 214, 145, 0.96);
        letter-spacing: 0.08em;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    }

    .content .profiles .table.row:hover {
        transform: none;
        border-color: transparent;
        background: transparent;
    }

    .content .profiles .table.row .col-4,
    .content .profiles .table.row .col-5,
    .content .profiles .table.row .col-6 {
        min-height: auto;
        justify-content: center;
    }
}

/* Smartphone — 500 px and below */
@media (max-width: 500px) {
    /* Header */
    .header .icon-wrapper img {
        width: 2.5em;
        height: 2.5em;
    }

    .header .page-name {
        font-size: 1.375em;
        letter-spacing: 0.75px;
    }

    .header-menu-toggle {
        width: 2.45rem;
        height: 2.45rem;
    }

    .site-nav {
        padding: 5.8rem 1rem 1.6rem;
    }

    .site-nav-link {
        min-height: 2.65rem;
        padding: 0.62rem 0.85rem;
        font-size: 0.86rem;
    }

    /* Content */
    .content .content_info .upload #drop-area .upload-tooltip {
        min-width: 10.5rem;
        max-width: 12rem;
        padding: 0.7rem 0.8rem;
        font-size: 0.82rem;
    }

    .content .content_info .upload #drop-area .upload-tooltip-title {
        font-size: 0.9rem;
    }

    .content .content_info .upload #drop-area .upload-tooltip-text {
        margin-bottom: 0.35rem;
    }

    .content .content_info .upload #drop-area .upload-tooltip-example {
        padding: 0.45rem 0.55rem;
        font-size: 0.78rem;
        line-height: 1.45;
    }

    .content .content_info {
        font-size: 0.75rem;
        flex-direction: column;
        align-items: center;
        gap: 0.85rem;
    }

    .content .content_info .date {
        width: 100%;
        justify-content: center;
    }

    .content .content_info .date-text {
        min-width: 0;
        align-items: center;
        text-align: center;
    }

    .content .content_info .upload #drop-area i {
        font-size: 1.3rem;
    }

    /* Footer */
    footer {
        font-size: 0.7rem;
        padding: 1rem 3%;
    }
}

/* =====================
   5. FOOTER
   ===================== */

footer {
    position: relative; /* wichtig */
    text-align: center;
    padding: 2rem 5%;
    margin-top: auto;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

footer p {
    margin: 0;
}

/* =====================
   6. GUIDE PAGE
   ===================== */

.guide-layout {
    width: min(100%, 70rem);
    margin: 0 auto;
    padding: 0 5%;
    box-sizing: border-box;
}

.guide-hero {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.guide-kicker {
    color: rgba(255, 214, 145, 0.92);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.guide-hero h2 {
    margin: 0;
    font-size: clamp(1.9rem, 1.55rem + 1.3vw, 2.8rem);
    line-height: 1.08;
    color: white;
}

.guide-hero p {
    margin: 0;
    max-width: 48rem;
    color: rgba(255, 255, 255, 0.74);
    font-size: clamp(1rem, 0.96rem + 0.22vw, 1.08rem);
    line-height: 1.65;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.guide-card {
    padding: 1.15rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(31, 31, 31, 0.9) 0%, rgba(21, 21, 21, 0.92) 100%);
}

.guide-card h3 {
    margin: 0 0 0.7rem;
    color: rgba(255, 214, 145, 0.96);
    font-size: 1.02rem;
    letter-spacing: 0.03em;
}

.guide-card p,
.guide-card li {
    color: rgba(255, 255, 255, 0.74);
    line-height: 1.6;
}

.guide-card p {
    margin: 0;
}

.guide-card ul {
    margin: 0;
    padding-left: 1.15rem;
}

@media (max-width: 900px) {
    .guide-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 500px) {
    .guide-layout {
        padding: 0 1rem;
        overflow: hidden;
    }

    .guide-card {
        padding: 1rem;
    }
}