/* home.css: the home page (Views\Home\Index.cshtml), "Five doors" design. Classes start with nlh-.
   Colors come from the --nl-* tokens in nsn-dialog.css (loaded on every page by _Layout.cshtml).
   Roboto Condensed and Roboto Mono are loaded by the home page itself (non-blocking, display=swap). */

.nlh {
    --nlh-condensed: "Roboto Condensed", "Arial Narrow", Roboto, "Helvetica Neue", Arial, sans-serif;
    --nlh-mono: "Roboto Mono", ui-monospace, Consolas, "Courier New", monospace;
    --nlh-navy-tile: #10325c;
    --nlh-navy-line: #2b4d7a;
    --nlh-on-dark: #d5deea;
    --nlh-on-dark-muted: #b8c6d8;
    --nlh-body: #3a4c63;
    --nlh-gap: clamp(1rem, 2.5vw, 1.5rem);
    color: var(--nl-ink);
    font-family: var(--nl-font);
    font-size: 1rem;
    line-height: 1.5;
}

.nlh a { color: var(--nl-blue); }
.nlh a:hover, .nlh a:focus { color: var(--nl-navy); }
.nlh h1, .nlh h2, .nlh h3 { margin: 0; }
.nlh p { margin: 0; }
.nlh-gold { color: var(--nl-gold); }
.nlh-mono { font-family: var(--nlh-mono); font-weight: 700; }

/* Small uppercase section label (used as an H2 or H3) */
.nlh-label {
    font-family: var(--nl-font);
    font-size: .875rem;
    font-weight: 700;
    letter-spacing: .09em;
    line-height: 1.3;
    text-transform: uppercase;
    color: var(--nl-blue);
}
.nlh-label--on-dark { color: var(--nlh-on-dark-muted); }

/* Large condensed section heading */
.nlh-heading {
    font-family: var(--nlh-condensed);
    font-weight: 800;
    font-size: clamp(1.75rem, 2.8vw, 2.5rem);
    line-height: 1.1;
    color: var(--nl-navy);
}

.nlh-subheading { font-size: 1.25rem; font-weight: 700; color: var(--nl-navy); }
.nlh-subheading a { color: var(--nl-navy); text-decoration: none; }
.nlh-subheading a:hover, .nlh-subheading a:focus { text-decoration: underline; }

/* ---------- Hero ---------- */
.nlh-hero {
    display: flex;
    flex-direction: column;
    gap: clamp(1.5rem, 3vw, 2.5rem);
    background: var(--nl-navy);
    color: #fff;
    border-radius: 1rem;
    padding: clamp(1.75rem, 5vw, 4.5rem) clamp(1.1rem, 4vw, 2.5rem) clamp(1.75rem, 5vw, 4rem);
    margin-bottom: 0;
}

.nlh-hero__intro { display: flex; flex-direction: column; gap: 1.1rem; max-width: 72rem; }

.nlh-hero__title {
    font-family: var(--nlh-condensed);
    font-weight: 800;
    font-size: clamp(2.4rem, 6.2vw, 5.5rem);
    line-height: .98;
    letter-spacing: -.01em;
    color: #fff;
    text-wrap: balance;
}

.nlh-hero__lead { font-size: clamp(1.06rem, 1.5vw, 1.3rem); color: var(--nlh-on-dark); max-width: 60ch; }

.nlh-search {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    max-width: 54rem;
    padding: .5rem;
    background: #fff;
    border-radius: .9rem;
}

.nlh-search__input {
    flex: 1 1 15rem;
    min-width: 0;
    min-height: 3.4rem;
    padding: 0 .9rem;
    border: 0;
    border-radius: .55rem;
    background: transparent;
    color: var(--nl-ink);
    font: 400 1.125rem/1.2 var(--nl-font);
}
.nlh-search__input::placeholder { color: var(--nl-muted); }
.nlh-search__input:focus { outline: 2px solid var(--nl-blue); outline-offset: 0; }

.nlh-search__button {
    flex: 0 0 auto;
    min-height: 3.4rem;
    padding: 0 2rem;
    border: 0;
    border-radius: .55rem;
    background: var(--nl-gold);
    color: var(--nl-navy);
    font: 700 1.06rem/1 var(--nl-font);
    cursor: pointer;
}
.nlh-search__button:hover, .nlh-search__button:focus { background: var(--nl-gold-strong); }
.nlh-search__button:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* ---------- Five doors ---------- */
.nlh-doors { display: flex; flex-direction: column; gap: .9rem; }

.nlh-doors__grid {
    display: grid;
    gap: .9rem;
    grid-template-columns: 1fr;
}

.nlh .nlh-door {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    min-width: 0;
    padding: 1.35rem;
    border: 1px solid var(--nlh-navy-line);
    border-radius: .9rem;
    background: var(--nlh-navy-tile);
    color: #fff;
    text-decoration: none;
    transition: transform .12s ease, background-color .12s ease;
}
.nlh .nlh-door:hover, .nlh .nlh-door:focus { background: #163d6d; color: #fff; transform: translateY(-2px); }
.nlh .nlh-door:focus-visible { outline: 3px solid var(--nl-gold); outline-offset: 2px; }
.nlh-door__icon { color: var(--nl-gold); flex: 0 0 auto; }
.nlh-door__title { font-family: var(--nlh-condensed); font-weight: 700; font-size: 1.45rem; line-height: 1.1; }
.nlh-door__text { flex-grow: 1; font-size: .95rem; color: var(--nlh-on-dark); }
.nlh-door__go { font-weight: 700; color: var(--nl-gold); }

.nlh .nlh-door--gold { background: var(--nl-gold); border-color: var(--nl-gold); color: var(--nl-navy); }
.nlh .nlh-door--gold:hover, .nlh .nlh-door--gold:focus { background: #ffd166; color: var(--nl-navy); }
.nlh .nlh-door--gold:focus-visible { outline-color: #fff; }
.nlh-door--gold .nlh-door__icon,
.nlh-door--gold .nlh-door__text,
.nlh-door--gold .nlh-door__go { color: var(--nl-navy); }

/* ---------- Stat strip ---------- */
.nlh-stats {
    display: grid;
    gap: 1.1rem 2rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: var(--nlh-gap) 0 0;
    padding: 1.4rem clamp(1.1rem, 4vw, 2.5rem);
    background: var(--nl-soft);
    border: 1px solid var(--nl-line);
    border-radius: 1rem;
}
.nlh-stat { display: flex; flex-direction: column; min-width: 0; }
.nlh-stat b { font-family: var(--nlh-condensed); font-weight: 800; font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.1; color: var(--nl-navy); }
.nlh-stat span { font-size: .875rem; color: var(--nl-muted); }

/* ---------- Sections ---------- */
.nlh-section {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    margin-top: var(--nlh-gap);
    padding: clamp(1.5rem, 3.5vw, 3rem) 0;
}
.nlh-section--soft {
    padding-left: clamp(1.1rem, 4vw, 2.5rem);
    padding-right: clamp(1.1rem, 4vw, 2.5rem);
    background: var(--nl-soft);
    border-radius: 1rem;
}
.nlh-section--narrow { max-width: 56rem; margin-left: auto; margin-right: auto; width: 100%; }

/* ---------- Four panels ---------- */
.nlh-panels { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }

.nlh-panel {
    display: flex;
    flex-direction: column;
    gap: .9rem;
    min-width: 0;
    padding: clamp(1.35rem, 2.6vw, 2.25rem);
    border: 1px solid var(--nl-line);
    border-radius: 1rem;
    background: #fff;
}
.nlh-panel--soft { background: var(--nl-soft); }
.nlh-panel--dark { background: var(--nl-navy); border-color: var(--nl-navy); color: #fff; }

.nlh-kicker { font-size: .8rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--nl-blue); }
.nlh-panel--dark .nlh-kicker { color: var(--nl-gold); }

.nlh-panel__title {
    font-family: var(--nlh-condensed);
    font-weight: 800;
    font-size: clamp(1.6rem, 2.6vw, 2.35rem);
    line-height: 1.08;
    color: var(--nl-navy);
}
.nlh-panel--dark .nlh-panel__title { color: #fff; }

.nlh-panel__list { display: flex; flex-direction: column; gap: .4rem; margin: 0; padding-left: 1.25rem; color: var(--nlh-body); }
.nlh-panel__text { color: var(--nlh-body); }
.nlh-panel--dark .nlh-panel__text { color: var(--nlh-on-dark); }
.nlh-panel__price { color: var(--nlh-body); }
.nlh-panel__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.1rem; margin-top: auto; padding-top: .35rem; }

.nlh .nlh-btn {
    display: inline-flex;
    align-items: center;
    min-height: 3rem;
    padding: .55rem 1.35rem;
    border-radius: .55rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
}
.nlh .nlh-btn--gold { background: var(--nl-gold); color: var(--nl-navy); }
.nlh .nlh-btn--gold:hover, .nlh .nlh-btn--gold:focus { background: #ffd166; color: var(--nl-navy); }
.nlh .nlh-btn--blue { background: var(--nl-blue); color: #fff; }
.nlh .nlh-btn--blue:hover, .nlh .nlh-btn--blue:focus { background: var(--nl-navy); color: #fff; }
.nlh .nlh-more { font-weight: 700; }
.nlh .nlh-more--on-dark { color: #fff; }
.nlh .nlh-more--on-dark:hover, .nlh .nlh-more--on-dark:focus { color: var(--nl-gold); }

.nlh-code { overflow-x: auto; padding: .9rem 1rem; background: #071a33; border: 1px solid var(--nlh-navy-line); border-radius: .65rem; }
.nlh-code pre { margin: 0; font: 500 .875rem/1.6 var(--nlh-mono); color: var(--nlh-on-dark); white-space: pre; }

.nlh-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.nlh-chips li { padding: .35rem .75rem; font-size: .875rem; background: #fff; border: 1px solid var(--nl-line); border-radius: 999px; }

/* ---------- How to read an NSN ---------- */
.nlh-anatomy {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: clamp(1.25rem, 3vw, 2rem);
    background: #fff;
    border: 1px solid var(--nl-line);
    border-radius: 1rem;
}
.nlh-anatomy__parts { display: grid; gap: 1rem 1.4rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }

.nlh .nlh-part {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    min-width: 0;
    padding-top: .6rem;
    border-top: 5px solid var(--nl-navy);
    text-decoration: none;
}
.nlh-part__digits { font-family: var(--nlh-mono); font-weight: 700; font-size: clamp(2.2rem, 5.4vw, 4.75rem); line-height: 1; color: var(--nl-navy); overflow-wrap: anywhere; }
.nlh-part__label { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--nl-muted); }
.nlh-part__name { font-weight: 500; }
.nlh .nlh-part:hover .nlh-part__name, .nlh .nlh-part:focus .nlh-part__name { text-decoration: underline; }
.nlh .nlh-part--fsc { border-top-color: var(--nl-blue); }
.nlh-part--fsc .nlh-part__digits { color: var(--nl-blue); }
.nlh .nlh-part--ncb { border-top-color: #b07a00; }
.nlh-part--ncb .nlh-part__digits { color: #8a5f00; }
.nlh .nlh-part--item { border-top-color: var(--nl-muted); grid-column: 1 / -1; }
.nlh-part--item .nlh-part__digits { color: var(--nl-ink); }
.nlh-anatomy__note { font-size: .95rem; color: var(--nlh-body); }

/* ---------- Federal Supply Groups ---------- */
.nlh-fsg { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.nlh-fsg a {
    display: inline-block;
    padding: .55rem .75rem;
    font-size: .95rem;
    text-decoration: none;
    background: #fff;
    border: 1px solid var(--nl-line);
    border-radius: .5rem;
}
.nlh-fsg a:hover, .nlh-fsg a:focus { border-color: var(--nl-blue); }
.nlh-fsg .nlh-mono, .nlh-fsg-more .nlh-mono { color: var(--nl-navy); }

.nlh-fsg-more { padding: .25rem 1rem; background: #fff; border: 1px solid var(--nl-line); border-radius: .65rem; }
.nlh-fsg-more summary { min-height: 2.75rem; line-height: 2.75rem; font-weight: 700; color: var(--nl-blue); cursor: pointer; }
.nlh-fsg-more__list { display: grid; gap: 0 1.75rem; grid-template-columns: 1fr; margin: 0; padding: 0 0 .6rem; list-style: none; }
.nlh-fsg-more__list a { display: flex; gap: .75rem; padding: .55rem 0; font-size: .95rem; text-decoration: none; border-bottom: 1px solid #e6eaf0; }
.nlh-fsg-more__list a:hover span:last-child, .nlh-fsg-more__list a:focus span:last-child { text-decoration: underline; }

.nlh-linkrow { display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem 1.5rem; padding-top: .9rem; font-size: .95rem; border-top: 1px solid var(--nl-line); }
.nlh-linkrow strong { color: var(--nl-navy); }

/* ---------- Common questions ---------- */
.nlh-faq { display: flex; flex-direction: column; gap: .35rem; padding-bottom: 1rem; border-bottom: 1px solid var(--nl-line); }
.nlh-faq__q { font-size: 1.125rem; font-weight: 700; color: var(--nl-navy); }
.nlh-faq__a { color: var(--nlh-body); }

/* ---------- Reference library ---------- */
.nlh-intro { max-width: 75ch; color: var(--nlh-body); }
.nlh-refs { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.nlh .nlh-ref {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    min-width: 0;
    padding: .9rem;
    text-decoration: none;
    border: 1px solid var(--nl-line);
    border-radius: .75rem;
}
.nlh .nlh-ref:hover, .nlh .nlh-ref:focus { border-color: var(--nl-blue); }
.nlh-ref img { flex: 0 0 auto; width: 4.5rem; height: 4.5rem; border-radius: .5rem; object-fit: cover; }
.nlh-ref__body { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.nlh-ref__title { display: block; font-size: 1.06rem; font-weight: 700; line-height: 1.25; color: var(--nl-navy); }
.nlh-ref__text { font-size: .9rem; color: var(--nlh-body); }

.nlh-disclosure { margin: 0 0 1rem; font-size: .875rem; font-style: italic; text-align: center; color: var(--nl-muted); }

/* ---------- Phones: the whole placeholder fits and the button spans the box ---------- */
@media (max-width: 575.98px) {
    .nlh-search__input { font-size: 1rem; }
    .nlh-search__button { flex: 1 1 100%; }
}

/* ---------- Wider screens ---------- */
@media (min-width: 576px) {
    .nlh-doors__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nlh-fsg-more__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nlh-refs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
    .nlh-doors__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .nlh-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .nlh-anatomy__parts { grid-template-columns: 1fr 1fr 1fr 2fr; }
    .nlh .nlh-part--item { grid-column: auto; }
}

@media (min-width: 992px) {
    .nlh-panels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nlh-fsg-more__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .nlh-refs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .nlh-refs--platforms { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1200px) {
    .nlh-doors__grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .nlh-refs--platforms { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
    .nlh .nlh-door { transition: none; }
    .nlh .nlh-door:hover, .nlh .nlh-door:focus { transform: none; }
}
