/* ============================================================
   Brownstone Portal — shared shell + portal styles
   Colors come ONLY from /showings/brand-vars.css variables.
   Shell rules mirror the site's canonical page styles verbatim.
   Spec: websitereorg_v2.md (2026-07-17)
   ============================================================ */

body {
    background-color: #ffffff;
    font-family: Arial, sans-serif;
    color: #444;
    padding: 0;
    margin: 0;
    line-height: 1.5;
    font-size: 15px;
}
.container { max-width: 1000px; margin: 0 auto; padding: 20px 40px; }
.logo { text-align: center; margin: 20px 0; }
.logo img { max-width: 300px; height: auto; }
h1, h2, h3 { color: var(--brand-red); margin-bottom: 15px; }
a.active { background-color: var(--brand-red); }
.button {
    display: inline-block; background-color: var(--brand-navy); color: white;
    padding: 10px 25px; font-weight: bold; text-decoration: none;
    border: 2px solid #b31919; border-radius: 6px; font-size: 16px; margin-top: 15px;
}
.footer {
    text-align: center; font-size: 13px; color: #777;
    margin-top: 40px; padding-top: 20px; border-top: 1px solid #ddd;
}

/* Mobile Navigation (canonical shell copy) */
.nav-container-mobile { display: none; align-items: center; justify-content: space-between; padding: 12px 20px; background-color: var(--brand-navy); }
.nav-logo-mobile { color: white; font-weight: bold; font-size: 16px; }
.hamburger { width: 30px; height: 25px; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; }
.hamburger span { width: 100%; height: 3px; background-color: white; border-radius: 2px; }
.mobile-menu { display: none; position: fixed; top: 0; right: -100%; width: 250px; height: 100vh; background-color: #fff; box-shadow: -2px 0 10px rgba(0,0,0,0.3); z-index: 999; transition: right 0.3s; overflow-y: auto; }
.mobile-menu.active { right: 0; }
.mobile-menu-header { background-color: var(--brand-navy); color: white; padding: 20px; font-weight: bold; font-size: 18px; }
.mobile-menu a { display: block; padding: 15px 20px; color: #333; text-decoration: none; border-bottom: 1px solid #eee; font-weight: 500; }
.mobile-menu a.active { background-color: var(--brand-red); color: white; }
.menu-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.5); z-index: 998; }
.menu-overlay.active { display: block; }

/* Portal child tabs + breadcrumbs are GENERATED by stamp_nav.py (styles emitted inline
   in the NAV region so pages without this stylesheet render them too) — no rules here. */
.portal-cards a:focus-visible {
    outline: 3px solid var(--brand-cta); outline-offset: 2px;
}

/* Service cards — each card is ONE link */
.portal-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 22px; }
.portal-cards.roles { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); max-width: 760px; margin-left: auto; margin-right: auto; }
.portal-card {
    display: block; border: 1px solid var(--brand-stone); border-radius: 8px;
    padding: 18px 20px; background-color: #fff; text-decoration: none;
    transition: box-shadow 0.15s, border-color 0.15s;
}
.portal-card:hover { border-color: var(--brand-cta); box-shadow: 0 2px 8px rgba(38,74,130,0.12); }
.portal-card .card-title { color: var(--brand-navy); font-size: 16px; font-weight: bold; margin-bottom: 6px; }
.portal-card .card-sub { color: #666; font-size: 13px; }
.portal-card .card-domain { color: var(--brand-grey); font-size: 13px; margin-top: 8px; }
.portal-cards.roles .portal-card { padding: 26px 24px; text-align: center; }
.portal-cards.roles .card-title { font-size: 19px; color: var(--brand-red); }

/* Interim-channel note on tool pages */
.interim-note {
    background-color: var(--brand-paper); border: 1px solid var(--brand-stone);
    border-radius: 8px; padding: 14px 18px; margin: 18px 0; font-size: 14px;
}
.back-link { display: inline-block; margin: 10px 0 0 0; font-size: 14px; color: var(--brand-navy); text-decoration: underline; }

/* ---- Chunk 3: MATCH THE MOVE-IN INSPECTION LAYOUT EXACTLY -----------------
   Move-In caps its WHOLE .container to 720px (move-in/style.css) so heading,
   intro, banner, and form all align in one 720px column. Portal tool pages use
   the same via `.container.portal-narrow`. Field metrics also mirror move-in
   (.mi-field: 16px font [stops iOS zoom], 46px min-height). Drew redline 2026-07-17. */
.container.portal-narrow { max-width: 720px; }
.portal-form { max-width: none; margin: 20px 0; }
.portal-form.centered { margin: 20px auto; }
.portal-form label { display: block; font-weight: bold; color: var(--brand-black); font-size: 15px; margin: 16px 0 6px; }
.portal-form input[type="text"], .portal-form input[type="email"],
.portal-form input[type="password"], .portal-form input[type="date"],
.portal-form textarea, .portal-form input[type="file"] {
    width: 100%; box-sizing: border-box; min-height: 46px; padding: 10px 12px; font-size: 16px;
    font-family: inherit; border: 1px solid var(--brand-stone); border-radius: 8px; background: #fff;
}
.portal-form textarea { min-height: 120px; resize: vertical; }
.portal-form input:focus-visible, .portal-form textarea:focus-visible,
.portal-form button:focus-visible, .portal-form a:focus-visible {
    outline: 3px solid var(--brand-cta); outline-offset: 2px;
}
.portal-form .field-hint { font-size: 12.5px; color: var(--brand-grey); margin-top: 3px; }
.portal-form .field-err { display: none; font-size: 13px; color: var(--brand-red); font-weight: bold; margin-top: 4px; }
.portal-form .field-err.show { display: block; }
.portal-form button[type="submit"] {
    display: block; width: 100%; box-sizing: border-box; text-align: center; min-height: 46px;
    background-color: var(--brand-navy); color: #fff; cursor: pointer;
    padding: 12px 25px; font-weight: bold; font-size: 16px; font-family: inherit;
    border: 2px solid #b31919; border-radius: 8px; margin-top: 22px;
}
.portal-form button[type="submit"]:disabled { opacity: 0.6; cursor: default; }

/* Portal-door login/signup gate — 720px centered, matching the move-in column */
.portal-gate { max-width: 720px; margin: 0 auto; }
.portal-gate .gate-divider { border: 0; border-top: 1px solid var(--brand-stone); margin: 26px 0; }
.portal-gate .gate-alt { font-size: 15px; color: #555; }
.portal-gate .gate-alt a { color: var(--brand-navy); font-weight: bold; }
.portal-gate .provisioned-note {
    background-color: var(--brand-paper); border: 1px solid var(--brand-stone);
    border-radius: 8px; padding: 14px 18px; margin: 22px 0 0; font-size: 14px; max-width: 700px;
}
.form-msg { display: none; margin-top: 14px; padding: 11px 14px; border-radius: 6px; font-size: 14px; }
.form-msg.ok { display: block; background: #eef7ee; border: 1px solid #9fc99f; color: #1e5c1e; }
.form-msg.bad { display: block; background: #fbeeee; border: 1px solid #d9a0a0; color: #8f1d1d; }
.auth-links { margin-top: 16px; font-size: 14px; }
.auth-links a { color: var(--brand-navy); font-weight: bold; }

/* Role-aware views: all hidden until the /me check resolves; JS shows exactly one. */
.role-view { display: none; }
.role-view.show { display: block; }

/* ---- Chunk 2: Contacts widget (generated by stamp_nav.py) ---------------- */
.portal-contacts { margin-top: 34px; border-top: 1px solid var(--brand-stone); padding-top: 18px; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-top: 6px; }
.contact-item { border: 1px solid var(--brand-stone); border-radius: 8px; padding: 13px 15px; background: var(--brand-paper); }
.contact-item .contact-label { font-size: 12.5px; font-weight: bold; color: var(--brand-grey); text-transform: uppercase; letter-spacing: 0.03em; }
.contact-item .contact-value { font-size: 15px; margin-top: 3px; overflow-wrap: anywhere; word-break: break-word; }
.contact-item .contact-value a { color: var(--brand-navy); font-weight: bold; text-decoration: none; overflow-wrap: anywhere; word-break: break-word; }
.contact-item .contact-value a:hover, .contact-item .contact-value a:focus-visible { text-decoration: underline; }
.contact-item .contact-strong { color: var(--brand-red); font-weight: bold; }
.contact-item .contact-sub { font-size: 12.5px; color: var(--brand-grey); margin-top: 4px; }

@media (max-width: 768px) {
    #desktop-nav { display: none !important; }
    .nav-container-mobile { display: flex !important; }
    .mobile-menu { display: block; }
    body { overflow-x: hidden; }
    .container { padding: 15px 20px; }
}
