/* ============================================================
   ATNS Microsite — shell & layout
   ------------------------------------------------------------
   Microsite-specific layout that sits ON TOP of the brand mirror
   (assets/brand.css). The brand mirror is never edited for layout
   tweaks — all shell / sidebar / page-chrome styling lives here.

   Loaded AFTER brand.css, so a few rules here intentionally
   override brand element defaults (notably the brand's top-bar
   <nav>) when those elements are reused inside the sidebar.

   Built to generalize: this is the prototype shell for the
   reusable client-microsite template. Keep client-specific values
   (names, section labels) in the page markup, not in here.
   ============================================================ */

  :root { --sidebar-width: 264px; }

  /* ---- App shell ---- */
  .main {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
  }

  /* ---- Sidebar rail ---- */
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: var(--sidebar-width);
    z-index: 200;
    display: flex; flex-direction: column;
    padding: 30px 22px;
    background: var(--midnight);
    color: var(--cream);
    border-right: 1px solid rgba(236, 232, 220, 0.10);
  }
  .sidebar-home { display: block; text-decoration: none; color: inherit; }
  .sidebar-client {
    margin-top: 14px;
    font-family: 'Inter', sans-serif;
    font-weight: 600; font-size: 0.6rem;
    letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--coral);
  }

  /* Reset the brand's fixed top-bar <nav> rules for the sidebar's nav */
  .side-nav {
    position: static; height: auto;
    margin-top: 44px; padding: 0; flex: 1;
    display: block;
    background: transparent; border: none;
  }
  .side-nav-label {
    font-family: 'Inter', sans-serif;
    font-weight: 600; font-size: 0.58rem;
    letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--cream); opacity: 0.35;
    margin-bottom: 14px; padding: 0 14px;
  }
  .side-nav ul { list-style: none; display: flex; flex-direction: column; gap: 2px; }

  .side-nav-link {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 12px 14px; border-radius: 8px;
    font-family: 'Playfair Display', serif;
    font-weight: 500; font-size: 1.18rem; letter-spacing: 0;
    color: var(--cream); text-decoration: none;
    opacity: 0.9; transition: opacity 0.25s, background 0.25s;
  }
  .side-nav-link:hover { opacity: 1; background: rgba(236, 232, 220, 0.05); }

  .side-nav-link.is-active {
    opacity: 1;
    background: rgba(222, 119, 90, 0.14);
    border-left: 3px solid var(--coral);
    padding-left: 11px;
  }

  /* Greyed-out / not-yet-clickable items */
  .side-nav-link.is-disabled { opacity: 0.3; cursor: not-allowed; }
  .side-nav-link.is-disabled:hover { opacity: 0.3; background: transparent; }

  /* Section sub-nav (e.g. Sitemap → Proposed structure / Prototype).
     Any top-level section can carry a subnav of child pages; mark the
     current child with .is-active. */
  .side-subnav {
    list-style: none;
    margin: 8px 0 4px 8px;
    padding: 4px 0 4px 14px;
    border-left: 1px solid rgba(236, 232, 220, 0.10);
    display: flex; flex-direction: column; gap: 2px;
  }
  .side-subnav-link {
    display: block;
    padding: 7px 12px;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-weight: 400; font-size: 0.84rem;
    letter-spacing: 0.01em;
    color: var(--cream); text-decoration: none;
    opacity: 0.65;
    transition: opacity 0.2s, background 0.2s, color 0.2s;
    line-height: 1.4;
  }
  .side-subnav-link:hover { opacity: 0.95; background: rgba(236, 232, 220, 0.04); }
  .side-subnav-link.is-active {
    opacity: 1;
    color: var(--coral);
    background: rgba(222, 119, 90, 0.10);
    font-weight: 500;
  }

  .side-nav-tag {
    font-family: 'Inter', sans-serif;
    font-weight: 600; font-size: 0.5rem;
    letter-spacing: 0.14em; text-transform: uppercase;
    padding: 3px 7px; border-radius: 100px;
    background: rgba(236, 232, 220, 0.1);
    color: var(--cream); opacity: 0.7;
  }

  .sidebar-foot {
    font-family: 'Inter', sans-serif;
    font-weight: 400; font-size: 0.62rem;
    letter-spacing: 0.06em;
    color: var(--cream); opacity: 0.25;
    padding: 0 14px;
  }

  /* ---- Sidebar sub-nav (shown on a section's own pages) ----
     Generic shell chrome: any top-level section can carry a subnav of
     child pages. Mark the current child with .is-active. */
  .side-subnav {
    list-style: none;
    margin: 8px 0 4px 8px;
    padding: 4px 0 4px 14px;
    border-left: 1px solid rgba(236, 232, 220, 0.10);
    display: flex; flex-direction: column; gap: 2px;
  }
  .side-subnav-link {
    display: block;
    padding: 7px 12px;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-weight: 400; font-size: 0.84rem;
    letter-spacing: 0.01em;
    color: var(--cream); text-decoration: none;
    opacity: 0.65;
    transition: opacity 0.2s, background 0.2s, color 0.2s;
    line-height: 1.4;
  }
  .side-subnav-link:hover { opacity: 0.95; background: rgba(236, 232, 220, 0.04); }
  .side-subnav-link.is-active {
    opacity: 1;
    color: var(--coral);
    background: rgba(222, 119, 90, 0.10);
    font-weight: 500;
  }

  /* ---- Shared content-page divider ---- */
  .page-divider {
    width: 64px; height: 2px; background: var(--coral);
    margin: 32px 0;
  }

  /* ---- Readability: larger body copy ----
     The audience skews older, so reading text is sized up site-wide while
     headings/labels stay as the brand defines them. These override the brand
     mirror (loaded first); page-specific copy is sized in each page's own
     <style> block to match. */
  .section-desc { font-size: 1.125rem; line-height: 1.75; }
  .hero-subtitle { font-size: 1.125rem; line-height: 1.75; }

  /* ---- Comments (per-page thread; progressive enhancement) ---- */
  .comments {
    background: var(--cream);
    padding: 72px 64px 104px;
    border-top: 1px solid rgba(27, 27, 33, 0.10);
  }
  .comments-inner { max-width: 760px; margin: 0 auto; }
  .comments-title {
    font-family: 'Playfair Display', serif;
    font-weight: 400; font-size: 2.1rem; margin-bottom: 8px;
  }
  .comments-intro { font-size: 1.125rem; line-height: 1.7; color: var(--text-dark); margin-bottom: 30px; }

  .comment-form { display: grid; gap: 12px; margin-bottom: 40px; }
  .comment-form input,
  .comment-form textarea {
    width: 100%; padding: 14px 16px;
    font-family: 'Inter', sans-serif; font-weight: 300; font-size: 1rem;
    color: var(--charcoal); background: var(--white);
    border: 1px solid rgba(27, 27, 33, 0.16); border-radius: 8px;
    transition: border-color 0.2s;
  }
  .comment-form textarea { min-height: 120px; resize: vertical; line-height: 1.7; }
  .comment-form input:focus,
  .comment-form textarea:focus { outline: none; border-color: var(--coral); }
  .comment-form-row {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
  }
  .comment-form button { border-radius: 8px; }
  .comment-form button:disabled { opacity: 0.5; cursor: default; }

  .comments-status { font-size: 0.85rem; color: var(--text-dark); }
  .comments-empty { font-size: 0.98rem; color: var(--text-dark); }

  .comments-list { display: flex; flex-direction: column; gap: 14px; }
  .comment {
    background: var(--white);
    border: 1px solid rgba(27, 27, 33, 0.08);
    border-radius: 12px; padding: 20px 24px;
  }
  .comment-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; }
  .comment-name { font-weight: 600; font-size: 0.95rem; color: var(--charcoal); }
  .comment-time { font-size: 0.74rem; color: var(--text-dark); }
  .comment-body {
    font-size: 1.05rem; line-height: 1.7; color: var(--charcoal);
    white-space: pre-wrap; overflow-wrap: anywhere;
  }

  /* ---- Landing hero: single-column variant (no side badge) ---- */
  .hero-content.hero-single { grid-template-columns: 1fr; max-width: 880px; }
  .hero-content.hero-single .hero-subtitle { max-width: 600px; }

  /* ---- Responsive: sidebar collapses to a top bar ---- */
  @media (max-width: 900px) {
    .sidebar {
      position: static; width: auto; bottom: auto;
      flex-direction: column;
      padding: 20px 24px;
      border-right: none;
      border-bottom: 1px solid rgba(236, 232, 220, 0.10);
    }
    .side-nav { margin-top: 20px; flex: none; }
    .side-nav-label { padding: 0; }
    .side-nav ul { flex-direction: row; flex-wrap: wrap; gap: 6px; }
    .side-nav-link { padding: 9px 14px; }
    .side-nav-link.is-active {
      border-left: none; padding-left: 14px;
      box-shadow: inset 0 -2px 0 var(--coral);
    }
    .sidebar-foot { display: none; }
    .side-subnav { display: none; }
    .main { margin-left: 0; }
    .comments { padding: 48px 24px 80px; }
  }
