:root {
    --bg-gradient: radial-gradient(140% 100% at 0% 0%, #0b1220 0%, #0a0f1c 45%, #060913 100%);
    --text-primary: #f6f7fb;
    --text-secondary: rgba(246, 247, 251, 0.64);
    --accent: #6aa9ff;
    --accent-strong: #9fc4ff;
    --nextindustry-red: #ff3b30;
    --card-bg: rgba(17, 20, 31, 0.5);
    --card-border: rgba(255, 255, 255, 0.08);
    --inner-card-bg: rgba(20, 25, 40, 0.72);
    --inner-card-border: rgba(255, 255, 255, 0.08);
    --divider: rgba(255, 255, 255, 0.12);
    --success: #2fd39f;
    --warning: #f4c948;
    --info: #6ad0ff;
    --danger: #ff7d7d;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --elev-shadow: 0 10px 30px rgba(0, 0, 0, 0.32);
    --hairline: 1px solid rgba(255, 255, 255, 0.08);
    --timing: cubic-bezier(0.4, 0, 0.2, 1);
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    /* ✅ Previene overflow orizzontale */
    overscroll-behavior: none;
    touch-action: pan-y;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg-gradient);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
    letter-spacing: 0.003em;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 180ms var(--timing);
}

a:hover,
a:focus-visible {
    color: var(--accent-strong);
}

main h2 {
    font-size: 2.5rem;
    text-align: center;
}

.app-header,
.app-footer {
    padding: 0.9rem 1.5rem;
    background: var(--card-bg);
    border-bottom: var(--hairline);
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: saturate(160%) blur(18px);
    -webkit-backdrop-filter: saturate(160%) blur(18px);
    width: 100%;
    max-width: 100%;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 40;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.app-header h1 {
    text-align: center;
}

.app-footer {
    margin-top: auto;
    border-top: var(--hairline);
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.brand {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    position: relative;
    align-self: stretch;
}

.brand-logo {
    width: clamp(140px, 32vw, 220px);
    height: auto;
    display: block;
    margin: 0 auto;
}

.app-header--with-back {
    align-items: center;
}

.back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.4);
    color: var(--text-secondary);
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.back-link:hover,
.back-link:focus-visible {
    background: rgba(96, 165, 250, 0.18);
    border-color: rgba(96, 165, 250, 0.45);
    color: var(--text-primary);
}

.back-link[hidden] {
    display: none !important;
}

.brand .back-link {
    position: absolute;
    left: 0;
}

.back-link .nav-icon {
    width: 1.1rem;
    height: 1.1rem;
}

.app-logo {
    width: clamp(150px, 35vw, 220px);
    max-height: 46px;
    height: auto;
    flex-shrink: 0;
}

.brand-title {
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    margin: 0;
}

.app-header nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.app-header nav a {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 1.1rem;
    min-height: 2.5rem;
    border-radius: 999px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1;
    transition: background 180ms var(--timing), border-color 180ms var(--timing), transform 180ms var(--timing), color 180ms var(--timing);
}

.app-header nav a:hover,
.app-header nav a:focus-visible {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.app-header nav a[aria-current="page"] {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

/* News tabs, scrollabili (stile Google News) */
.news-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.25rem 0.75rem 0.75rem;
    margin: 0 auto 0.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    max-width: 100%;
}

.news-tab {
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    border-radius: 999px;
    padding: 0.55rem 1.1rem;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    line-height: 1;
    transition: background 160ms var(--timing), border-color 160ms var(--timing), color 160ms var(--timing), box-shadow 160ms var(--timing);
}

.news-tab:hover,
.news-tab:focus-visible {
    border-color: rgba(59, 130, 246, 0.35);
    background: rgba(59, 130, 246, 0.18);
    color: var(--text-primary);
}

.news-tab--active {
    border-color: rgba(59, 130, 246, 0.65);
    background: #3b82f6;
    color: #ffffff;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset, 0 10px 28px rgba(0,0,0,0.28);
}

/* Mantieni stile attivo anche in hover/focus sull'attiva */
.news-tab--active:hover,
.news-tab--active:focus-visible {
    border-color: rgba(59, 130, 246, 0.75);
    background: #3b82f6;
    color: #ffffff;
}

.news-section {
    scroll-margin-top: 88px;
}

.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom));
    margin: 0;
    background: rgba(20, 24, 36, 0.6);
    border-top: var(--hairline);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.25);
    backdrop-filter: saturate(160%) blur(18px);
    -webkit-backdrop-filter: saturate(160%) blur(18px);
    z-index: 80;
}

.mobile-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-height: 2.75rem;
    padding: 0.5rem 0.4rem;
    border-radius: 14px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: color 180ms var(--timing), background 180ms var(--timing);
}

.mobile-nav a:hover,
.mobile-nav a:focus-visible {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

.mobile-nav a[aria-current="page"] {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    color: inherit;
    position: relative;
}

.nav-icon svg {
    width: 100%;
    height: 100%;
}

.nav-label {
    display: inline-block;
}

.mobile-nav .nav-icon {
    width: 1.45rem;
    height: 1.45rem;
}

.mobile-nav .nav-label {
    font-size: 0.68rem;
}

.container,
section,
.report-section,
.report-grid {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    /* ✅ Evita overflow da contenuti lunghi */
}

.container {
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
}

.card {
    background: var(--card-bg);
    border: var(--hairline);
    border-radius: var(--radius-lg);
    padding: 2rem 2.25rem;
    box-shadow: var(--elev-shadow);
}

.card h2 {
    margin-top: 0;
    margin-bottom: 0.35rem;
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: 0.015em;
}

.card-description {
    margin: 0 0 0.35rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.report {
    margin-top: 1.75rem;
}

.report--plain {
    background: var(--inner-card-bg);
    border-radius: var(--radius-lg);
    border: var(--hairline);
    padding: 1.5rem;
    font-family: "SFMono-Regular", ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    white-space: pre-wrap;
    line-height: 1.55;
    color: var(--text-secondary);
}

.report-section {
    background: var(--inner-card-bg);
    border: var(--hairline);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    margin: 0.85rem 0;
}

.report-section--ok {
    border-color: rgba(52, 211, 153, 0.4);
}

.report-section--critical {
    border-color: rgba(248, 113, 113, 0.45);
}

.report-section--secondary {
    border-color: rgba(251, 191, 36, 0.35);
}

.report-section--seo {
    border-color: rgba(56, 189, 248, 0.35);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.section-toggle {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    text-align: left;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    cursor: pointer;
}

.section-toggle:focus-visible {
    outline: none;
    border-radius: 18px;
}


/* Rimuove l'effetto hover dagli accordion espandibili */

.section-toggle:hover {
    background: transparent;
}

.section-toggle-icon {
    flex: 0 0 auto;
    width: 40px;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.section-toggle-icon::before {
    content: "";
    width: 0.65rem;
    height: 0.65rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 180ms var(--timing);
}

.section-toggle[aria-expanded="true"] .section-toggle-icon::before {
    transform: rotate(-135deg);
}

.section-title {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.005em;
}

.section-pill {
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.section-pill--ok {
    background: rgba(52, 211, 153, 0.14);
    color: var(--success);
}

.section-pill--critical {
    background: rgba(248, 113, 113, 0.18);
    color: var(--danger);
}

.section-pill--secondary {
    background: rgba(251, 191, 36, 0.14);
    color: var(--warning);
}

.section-pill--seo {
    background: rgba(56, 189, 248, 0.14);
    color: var(--info);
}

.section-summary {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.section-summary--static {
    justify-content: flex-start;
    gap: 0.65rem;
}

.report-section--static .section-summary {
    margin-top: 0.45rem;
}

.section-summary-text {
    display: inline-block;
    flex: 1 1 auto;
}

.report-section--static .section-content {
    margin-top: 0.85rem;
}

.section-content {
    margin-top: 1.1rem;
}

.section-content--collapsible {
    margin-top: 0;
}

.section-content--collapsible.section-content--expanded {
    margin-top: 1.1rem;
}

.section-content[hidden] {
    display: none !important;
}

.section-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.section-list li {
    padding: 0.9rem 1rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    border: var(--hairline);
    color: var(--text-secondary);
    line-height: 1.5;
    box-shadow: none;
    margin: 0.8rem 0;
}

.section-item-primary {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: 0.015em;
}

.section-item-secondary {
    display: block;
    margin-top: 0.35rem;
    color: var(--text-secondary);
}

.section-item-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.8rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: var(--hairline);
    background: rgba(255, 255, 255, 0.06);
    color: var(--accent-strong);
    font-size: 0.85rem;
    transition: border-color 180ms var(--timing), background 180ms var(--timing);
}

.section-item-link::after {
    content: "\2197";
    font-size: 0.8rem;
}

.section-item-link:hover,
.section-item-link:focus-visible {
    border-color: rgba(147, 197, 253, 0.4);
    background: rgba(96, 165, 250, 0.14);
}

.section-empty {
    padding: 1rem;
    border-radius: 18px;
    border: 1px dashed rgba(148, 163, 184, 0.28);
    text-align: center;
    color: var(--text-secondary);
}

.report-meta {
    margin-top: 1.75rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-align: center;
}

.news-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.news-toolbar--hidden {
    display: none;
}

.news-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    width: 100%;
}

.news-filter-chips[aria-disabled="true"] {
    opacity: 0.45;
    pointer-events: none;
}

.news-filter-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.2rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.45);
    font-family: inherit;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.news-filter-chip--active {
    color: var(--nextindustry-red);
    border-color: var(--nextindustry-red);
    background: rgba(15, 23, 42, 0.6);
    box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.12);
}

.news-sections {
    display: grid;
    gap: 1.1rem;
}

.news-updated-date {
    margin-top: 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.news-loading,
.news-error,
.news-empty {
    padding: 1.5rem;
    border-radius: 20px;
    border: 1px dashed rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.5);
    color: var(--text-secondary);
    text-align: center;
    font-size: 0.95rem;
}

.news-error {
    border-style: solid;
    border-color: rgba(239, 68, 68, 0.3);
    color: #fda4af;
}

.news-empty {
    border-style: solid;
}

.news-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.news-section[hidden] {
    display: none !important;
}

.news-section-header {
    display: flex;
    margin: 0.95rem 0;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
}

.news-section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
}

.news-section-meta {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.news-items {
    display: grid;
    gap: 0.95rem;
}

.news-section-description {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.55;
    text-align: center;
}

.news-item {
    display: grid;
    grid-template-columns: minmax(0, min(20vw, 220px)) minmax(0, 1fr);
    gap: 1.1rem;
    align-items: center;
    padding: 1.1rem 1.25rem;
    border-radius: 18px;
    border: 1px solid rgba(96, 165, 250, 0.18);
    background: rgba(15, 23, 42, 0.65);
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.08);
}

.news-item-cover {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    background: rgba(148, 163, 184, 0.18);
    aspect-ratio: 1 / 1;
    width: 100%;
    min-width: 0;
    justify-self: start;
}

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

.news-item-cover img.news-cover-placeholder {
    object-fit: cover;
    padding: 0;
    background: white;
}

.news-item-cover img.news-cover-image {
    object-fit: cover;
}

.news-item-content {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.news-item h3 {
    margin: 0;
    font-size: 1.05rem;
}

.news-item h3 a {
    color: var(--accent-strong);
}

.news-item h3 a:hover,
.news-item h3 a:focus-visible {
    text-decoration: underline;
}

.news-item p {
    margin: 0.4rem 0 0;
    line-height: 1.6;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.news-item p:first-of-type {
    margin-top: 0;
}

.news-item-source {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    line-height: 1.45;
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.news-item-source a {
    color: var(--accent-strong);
}

.news-item-source-thumbnail {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.news-item-source-thumbnail.news-cover-placeholder {
    background: white;
}

.news-item-source-label {
    display: inline-flex;
    align-items: baseline;
    gap: 0.2rem;
    font-style: italic;
}

.history-list {
    display: grid;
    gap: 1rem;
}

.date-picker-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 0 1rem;
}

.date-picker-label {
    text-transform: uppercase;
    font-weight: 300;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    color: var(--text-primary);
    width: 100%;
    text-align: center;
}

.date-picker-input {
    position: relative;
    display: block;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.date-picker-input input[type="date"] {
    appearance: none;
    -webkit-appearance: none;
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 0.65rem 0.95rem;
    padding-right: 2.8rem;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.85), rgba(30, 41, 59, 0.88));
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02), 0 10px 24px rgba(15, 23, 42, 0.28);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.date-picker-input input[type="date"]:focus-visible {
    outline: none;
    border-color: rgba(96, 165, 250, 0.5);
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.3), 0 10px 24px rgba(96, 165, 250, 0.18);
}

.date-picker-input input[type="date"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

.date-picker-input input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.date-picker-input input[type="date"] {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 0.8rem 1rem;
    min-height: 44px;
    width: 100%;
    color: var(--text-primary);
    font-size: 0.95rem;
    appearance: none;
    -webkit-appearance: none;
}

.date-picker-input input[type="date"]:disabled {
    opacity: 0.6;
}


/* Icona del datepicker disegnata come pseudo-elemento del wrapper */

.date-picker-input::after {
    content: "";
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.25rem;
    height: 1.25rem;
    pointer-events: none;
    background-color: var(--text-secondary);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3.5' y='5.5' width='17' height='15' rx='3.2' fill='%23000'/%3E%3Crect x='7.2' y='2.5' width='1.6' height='5' rx='0.8' fill='%23000'/%3E%3Crect x='15.2' y='2.5' width='1.6' height='5' rx='0.8' fill='%23000'/%3E%3Crect x='3.5' y='9.7' width='17' height='1.6' fill='%23000'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3.5' y='5.5' width='17' height='15' rx='3.2' fill='%23000'/%3E%3Crect x='7.2' y='2.5' width='1.6' height='5' rx='0.8' fill='%23000'/%3E%3Crect x='15.2' y='2.5' width='1.6' height='5' rx='0.8' fill='%23000'/%3E%3Crect x='3.5' y='9.7' width='17' height='1.6' fill='%23000'/%3E%3C/svg%3E") no-repeat center / contain;
}

.date-picker-hint {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
    width: 100%;
    text-align: center;
}

.history-loading,
.history-empty {
    padding: 1.5rem;
    border-radius: 20px;
    border: 1px dashed rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.5);
    color: var(--text-secondary);
    text-align: center;
    font-size: 0.95rem;
}

.history-empty {
    border-style: solid;
}

.history-list .day {
    background: rgba(255, 255, 255, 0.03);
    border: var(--hairline);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    box-shadow: none;
}

.day-info {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    width: 100%;
}

.day-date {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
    text-transform: capitalize;
}

.day-count {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.day-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.history-list .day a {
    font-size: 0.9rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(96, 165, 250, 0.24);
    background: rgba(96, 165, 250, 0.12);
    color: var(--accent-strong);
}

.history-list .day a:hover,
.history-list .day a:focus-visible {
    border-color: rgba(147, 197, 253, 0.5);
    background: rgba(147, 197, 253, 0.2);
}

.login-card {
    max-width: 360px;
    margin: auto;
    padding: 2.5rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 28px;
    text-align: center;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
}

.login-card h1 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.login-card p {
    margin: 0 0 0.75rem;
    color: var(--text-secondary);
}

.login-card input,
.login-card button {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-top: 0.75rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.65);
    color: var(--text-primary);
    font-size: 1rem;
}

.login-card input:focus-visible {
    outline: 2px solid rgba(96, 165, 250, 0.45);
    outline-offset: 2px;
}

.login-card button {
    cursor: pointer;
    border: none;
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-card button:hover,
.login-card button:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(96, 165, 250, 0.3);
}

.centered {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
}

input {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.65);
    color: var(--text-primary);
}

button {
    cursor: pointer;
    border: var(--hairline);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.6rem 0.9rem;
    transition: background 180ms var(--timing), border-color 180ms var(--timing), transform 180ms var(--timing);
}

button:hover,
button:focus-visible {
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 720px) {
    .app-header,
    .app-footer {
        padding: 1rem 1.25rem;
    }
    .app-footer {
        padding-bottom: 3.5rem;
        padding-bottom: calc(3.5rem + env(safe-area-inset-bottom));
    }
    .app-header nav {
        display: none;
    }
    .container {
        padding: 1.35rem 1rem 2.4rem;
        padding-bottom: 5.5rem;
        padding-bottom: calc(5.5rem + env(safe-area-inset-bottom));
    }
    .card {
        padding: 1.25rem 1.1rem;
        border-radius: 22px;
        box-shadow: 0 16px 38px rgba(15, 23, 42, 0.28);
    }
    .card h2 {
        font-size: 1.35rem;
        line-height: 1.25;
    }
    .card-description {
        font-size: 0.92rem;
        line-height: 1.45;
    }
    .mobile-nav {
        display: flex;
    }
    .mobile-nav a {
        font-size: 0.75rem;
    }
    .news-sections {
        gap: 1rem;
    }
    .news-section-header {
        align-items: center;
        gap: 0.45rem;
    }
    .news-section-title {
        font-size: 1.5rem;
    }
    .news-section-meta {
        font-size: 0.85rem;
    }
    .news-section-description {
        margin-top: 0;
        font-size: 0.92rem;
        line-height: 1.5;
    }
    .news-toolbar {
        justify-content: center;
        gap: 0.6rem;
    }
    .news-filter-chips {
        justify-content: center;
    }
    .news-items {
        gap: 0.75rem;
    }
    .news-item {
        grid-template-columns: 1fr;
        padding: 0.9rem 1rem;
        border-radius: 16px;
    }
    .news-item-cover {
        display: none;
    }
    .news-item h3 {
        font-size: 1rem;
    }
    .news-item p {
        font-size: 0.9rem;
        line-height: 1.55;
    }
    .news-item-source-thumbnail {
        display: block;
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }
    .news-item-source {
        align-items: center;
        gap: 0.5rem;
    }
    .section-toggle-icon {
        top: 1.6rem;
    }
    .news-updated-date {
        margin-top: 1.5rem;
        font-size: 0.9rem;
    }
    /* Date picker mobile: full-width and better vertical rhythm */
    .date-picker-input input[type="date"] {
        max-width: 100%;
        width: 100%;
        padding: 0.75rem 1rem;
        padding-right: 2.8rem;
        /* space for icon */
        font-size: 1rem;
    }
    .date-picker-input::after {
        right: 1rem;
        width: 1.25rem;
        height: 1.25rem;
    }
    .day-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }
}
