/* ── Homepage (extends base.html / site-content) ──────────────────────────── */

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

.home-main {
    padding: var(--page-pad-y) var(--page-pad-x) calc(var(--page-pad-y-loose) - 4px);
    max-width: var(--page-max-standard);
    margin: 0 auto;
}

.is-native-app .home-main {
    padding-top: 16px;
}

.home-app-topbar {
    display: none;
}

.home-app-feedback-link {
    display: none;
}

.is-native-app .home-app-topbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.is-native-app .home-app-feedback-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.86);
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
}

.is-native-app .home-app-feedback-link:hover {
    background: rgba(255,255,255,0.09);
}

.home-app-dashboard {
    margin-bottom: var(--section-gap);
}

.home-app-kicker,
.home-app-status-kicker {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.38);
}

.home-app-activity {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    overflow: hidden;
}

.home-app-activity-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    list-style: none;
    cursor: pointer;
}

.home-app-activity-head::-webkit-details-marker { display: none; }

.home-app-activity-title {
    font-size: 15px;
    font-weight: 700;
    margin-top: 6px;
}

.home-app-activity-summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.52);
    font-size: 12px;
    white-space: nowrap;
}

.home-app-activity-chevron {
    font-size: 14px;
    transition: transform 0.18s ease;
}

.home-app-activity[open] .home-app-activity-chevron {
    transform: rotate(180deg);
}

.home-app-activity-body {
    padding: 0 16px 14px;
    border-top: 1px solid rgba(255,255,255,0.07);
}

.home-app-activity-list {
    display: flex;
    flex-direction: column;
}

.home-app-item-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

.home-app-item-copy,
.home-app-item-meta {
    font-size: 12px;
    line-height: 1.5;
    color: rgba(255,255,255,0.56);
    margin-top: 4px;
}

.home-app-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.home-app-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.home-app-item:first-child {
    padding-top: 0;
}

.home-app-empty {
    font-size: 13px;
    line-height: 1.6;
    color: rgba(255,255,255,0.52);
}

.home-app-inline-link {
    color: #aac4ff;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    margin-top: 2px;
}

.home-app-inline-link:hover {
    text-decoration: underline;
}

.home-app-activity-foot {
    padding-top: 10px;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.home-hero {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 22px;
    margin-bottom: calc(var(--section-gap) + 8px);
    padding: 24px 24px 22px;
    background:
        radial-gradient(circle at top right, rgba(20,102,214,0.18), transparent 34%),
        linear-gradient(180deg, rgba(255,255,255,0.055) 0%, rgba(255,255,255,0.02) 100%);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(0,0,0,0.16);
}

.home-logo-img {
    width: 170px;
    max-width: 48vw;
    height: auto;
    display: block;
    margin: 0;
}

.home-hero-copy {
    min-width: 0;
}

.home-kicker {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.48);
    margin-bottom: 8px;
}

.home-hero-title {
    margin: 0 0 10px;
    font-size: 32px;
    line-height: 1.04;
    letter-spacing: -0.02em;
    font-weight: 850;
}

.home-tagline {
    margin: 0;
    font-size: 15px;
    color: rgba(255,255,255,0.62);
    line-height: 1.65;
    max-width: 620px;
}

.home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.home-hero-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease;
}

.home-hero-link:hover {
    transform: translateY(-1px);
}

.home-hero-link--primary {
    background: linear-gradient(180deg, #1466d6 0%, #0c56bf 100%);
    color: #fff;
}

.home-hero-link--secondary {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.92);
    border: 1px solid rgba(255,255,255,0.14);
}

/* ── Search panels ────────────────────────────────────────────────────────── */
.home-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
    margin-bottom: 26px;
}

.home-panels--priority {
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.9fr);
}

.home-panel {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.065) 0%, rgba(255,255,255,0.04) 100%);
    border-radius: 16px;
    padding: 24px 24px 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 14px 32px rgba(0,0,0,0.14);
}

.home-panel-hdr {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.home-panel-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(20,102,214,0.18);
    border: 1px solid rgba(20,102,214,0.32);
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 1px;
}

.home-panel-title {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.2;
}

.home-panel-sub {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    margin-top: 5px;
    line-height: 1.55;
}

.home-panel--search {
    gap: 16px;
}

/* ── Shared inputs ────────────────────────────────────────────────────────── */
.home-input {
    width: 100%;
    background: rgba(0,0,0,0.22);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    padding: 10px 14px;
    outline: none;
    font-family: inherit;
    height: 46px;
}

.home-input:focus {
    border-color: rgba(255,255,255,0.32);
    background: rgba(0,0,0,0.32);
    box-shadow: 0 0 0 3px rgba(20,102,214,0.18);
}

.home-input::placeholder { color: rgba(255,255,255,0.26); }

input[type="date"].home-input,
input[type="time"].home-input { color-scheme: dark; }

.home-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: rgba(255,255,255,0.4);
    margin-bottom: 5px;
}

.home-optional {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

.home-ac-wrap { position: relative; min-width: 0; }

.home-dropdown {
    position: fixed;
    background: #001a50;
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 6px;
    z-index: 600;
    max-height: 220px;
    overflow-y: auto;
    box-shadow: 0 6px 20px rgba(0,0,0,0.45);
}
.home-dropdown[hidden] { display: none !important; }

.home-drop-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 12px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    font-size: 13px;
    gap: 8px;
}

.home-drop-item:last-child { border-bottom: none; }
.home-drop-item:hover,
.home-drop-item.active     { background: rgba(255,255,255,0.1); }

.home-drop-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-drop-crs  { font-size: 10px; font-weight: 700; letter-spacing: 0.05em; color: rgba(255,255,255,0.33); flex-shrink: 0; }

.home-form { display: flex; flex-direction: column; gap: 14px; }

.home-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.home-field { display: flex; flex-direction: column; min-width: 0; }

.home-btn {
    display: block;
    width: 100%;
    min-height: 46px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    padding: 12px 16px;
    text-align: center;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    border: none;
    transition: filter 0.15s;
}

.home-btn--primary {
    background: linear-gradient(180deg, #1466d6 0%, #0c56bf 100%);
    color: #fff;
}

.home-btn--primary:hover  { filter: brightness(1.1); }
.home-btn--primary:active { filter: brightness(0.92); }

.home-btn--secondary {
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.9);
    border: 1px solid rgba(255,255,255,0.14);
}

.home-btn--secondary:hover {
    background: rgba(255,255,255,0.1);
}

.home-btn-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.home-pin-note {
    min-height: 18px;
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    margin-top: -2px;
}

.home-pin-note.is-error {
    color: #ff9c9c;
}

.home-quicklinks {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}

.home-ql {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.5);
    font-size: 12px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.home-ql:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-color: rgba(255,255,255,0.3);
}

.home-pins {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 18px;
}

.home-pins--embedded {
    margin-top: 4px;
    margin-bottom: 0;
    background: rgba(0,0,0,0.16);
}

.home-pins-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.home-pins-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.home-pin-card {
    background: rgba(0,0,0,0.22);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.home-pin-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

.home-pin-meta {
    font-size: 12px;
    line-height: 1.5;
    color: rgba(255,255,255,0.55);
}

.home-pin-actions {
    display: flex;
    gap: 8px;
}

.home-pin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.home-pin-btn:hover {
    background: rgba(255,255,255,0.11);
}

.home-pin-btn--primary {
    background: rgba(20,102,214,0.24);
    border-color: rgba(20,102,214,0.5);
    color: #dceaff;
}

.home-pin-btn--primary:hover {
    background: rgba(20,102,214,0.34);
}

/* ── Quick tools ──────────────────────────────────────────────────────────── */
.home-tools {
    margin-bottom: 26px;
}

.home-tools-head {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 14px;
}

.home-tools-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.home-tool-card {
    display: block;
    background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.03) 100%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 18px 18px 17px;
    color: inherit;
    text-decoration: none;
    transition: background 0.14s ease, border-color 0.14s ease, transform 0.14s ease, box-shadow 0.14s ease;
}

.home-tool-card:hover {
    background: rgba(255,255,255,0.075);
    border-color: rgba(255,255,255,0.16);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.14);
}

.home-tool-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    font-size: 17px;
    border-radius: 12px;
    margin-bottom: 10px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.08);
}

.home-tool-title {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 7px;
}

.home-tool-body {
    font-size: 13px;
    color: rgba(255,255,255,0.52);
    line-height: 1.6;
}

/* ── About text ───────────────────────────────────────────────────────────── */
.home-about {
    border-top: 1px solid rgba(255,255,255,0.07);
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.home-about--compact {
    gap: 0;
}

.home-about p {
    margin: 0;
    font-size: 13px;
    color: rgba(255,255,255,0.46);
    line-height: 1.65;
}

.home-about a {
    color: rgba(255,255,255,0.6);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.home-about a:hover { color: #fff; }

.is-native-app .home-features,
.is-native-app .home-tools,
.is-native-app .home-about {
    display: none;
}

.is-native-app .home-hero {
    margin-bottom: 16px;
    padding: 12px 14px 14px;
}

.is-native-app .home-logo-img {
    width: 146px;
}

.is-native-app .home-hero-title {
    font-size: 24px;
}

.is-native-app .home-panels {
    margin-bottom: 18px;
}

/* ── Banners ──────────────────────────────────────────────────────────────── */
.home-banner-wrap {
    margin-bottom: 20px;
}

.home-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    transition: opacity 0.35s ease;
}

.home-banner--info {
    background: rgba(26,115,232,0.18);
    border: 1px solid rgba(26,115,232,0.45);
    color: #a8ceff;
}

.home-banner--warning {
    background: rgba(217,119,6,0.18);
    border: 1px solid rgba(217,119,6,0.45);
    color: #fcd34d;
}

.home-banner--disruption {
    background: rgba(192,57,43,0.18);
    border: 1px solid rgba(192,57,43,0.45);
    color: #fca5a5;
}

.home-banner-icon { font-size: 15px; flex-shrink: 0; }
.home-banner-msg  { flex: 1; }
.home-banner-counter { flex-shrink: 0; font-size: 11px; opacity: 0.5; font-variant-numeric: tabular-nums; }

.disruption-link { color: inherit; text-decoration: underline; text-underline-offset: 2px; opacity: 0.8; }
.disruption-link:hover { opacity: 1; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
    .home-hero      { grid-template-columns: 1fr; text-align: left; }
    .home-logo-img  { width: 158px; max-width: 58vw; }
    .home-hero-title { font-size: 26px; }
    .home-panels,
    .home-panels--priority { grid-template-columns: 1fr; }
    .home-pins-list { grid-template-columns: 1fr; }
    .home-tools-grid  { grid-template-columns: 1fr; }
}

@media (max-width: 440px) {
    .home-logo-img     { width: 144px; }
    .home-hero         { margin-bottom: var(--section-gap); padding: 18px 16px; }
    .home-hero-title   { font-size: 22px; }
    .home-tagline      { font-size: 14px; }
    .home-hero-actions { flex-direction: column; }
    .home-hero-link    { width: 100%; }
    .home-field-row    { grid-template-columns: 1fr; }
    .home-btn-row      { grid-template-columns: 1fr; }
    .home-app-activity-head,
    .home-app-item { flex-direction: column; gap: 6px; }
    .home-app-activity-head,
    .home-app-activity-body { padding-left: 14px; padding-right: 14px; }
    .home-app-inline-link { margin-top: 0; }
    .home-pins         { padding: 16px 14px; }
    .home-pin-actions  { flex-direction: column; }

    .is-native-app .home-main { padding: var(--page-pad-y-tight) var(--page-pad-x) 22px; }
    .is-native-app .home-logo-img { width: 138px; }
    .is-native-app .home-panel { padding: 20px 18px 18px; gap: 14px; }
    .is-native-app .home-hero-title { font-size: 21px; }
}
