/* base.css */

/* Import component styles (same folder) */
@import url('components/header.css');
@import url('components/footer.css');

/* Reset / base */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f5f5f7;
    color: #111827;
}

/* Wrapper between header and footer */
.lh-page-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Main content area */
.lh-main {
    max-width: 1120px;
    margin: 96px auto 40px; /* space for fixed header */
    padding: 0 24px;
    width: 100%;
}

/* RESET */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, -apple-system,
                 "SF Pro Text", -apple-system, sans-serif;
    background: #f9fafb;
    color: #111827;
}

/* PAGE SHELL: header on top, footer at bottom */
.lh-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Main content wrapper */
.lh-page-main {
    flex: 1;
    max-width: 1120px;
    margin: 40px auto 40px;
    padding: 0 24px;
}

/* Layout shell */
.lh-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }
  
  .lh-main {
    flex: 1 0 auto;
    padding: 3.5rem 6rem 3rem;
  }
  
  /* Two-column layout: main + recent updates sidebar */
  .lh-layout {
    display: grid;
    grid-template-columns: minmax(0, 2.4fr) minmax(260px, 0.9fr);
    gap: 2rem;
    margin-top: 2.5rem;
    align-items: flex-start;
  }
  
  /* Generic card */
  .lh-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 1.6rem 1.8rem 1.5rem;
    border: 1px solid rgba(148, 163, 253, 0.18);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  }
  
  /* Intro banners */
  .lh-banner {
    margin-top: 1.4rem;
    padding: 1.3rem 1.4rem;
    border-radius: 16px;
    border: 1px solid rgba(226, 232, 240, 0.9);
  }
  
  .lh-banner-gold {
    background: #fef6e7;
    border-color: #fcd9a4;
  }
  
  .lh-banner-note {
    background: #f8fafc;
  }
  
  /* Policies list */
  .lh-policies h2 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.02em;
  }
  
  .lh-policy-item {
    margin-bottom: 0.75rem;
    padding: 1rem 1.1rem 0.9rem;
    border-radius: 14px;
    background: linear-gradient(to right, #f9fafb, #f8fafc);
    border: 1px solid rgba(226, 232, 240, 0.9);
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.3fr) auto;
    column-gap: 1rem;
    row-gap: 0.3rem;
    align-items: center;
    transition: all 0.22s ease;
  }
  
  .lh-policy-item:hover {
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
    transform: translateY(-1px);
  }
  
  .lh-policy-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  
  .lh-policy-name {
    font-size: 1.02rem;
    font-weight: 600;
    margin: 0;
  }
  
  .lh-badge.lh-code {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.6rem;
    font-size: 0.72rem;
    border-radius: 999px;
    background: #e5e7eb;
    color: #111827;
    letter-spacing: 0.06em;
  }
  
  .lh-policy-meta {
    font-size: 0.78rem;
    color: #6b7280;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  
  .lh-status {
    padding: 0.08rem 0.4rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }
  
  .lh-status-active {
    background: #ecfdf5;
    color: #15803d;
    border: 1px solid #bbf7d0;
  }
  
  .lh-policy-summary {
    margin: 0.15rem 0 0.25rem;
    grid-column: 1 / 3;
    font-size: 0.82rem;
    color: #4b5563;
  }
  
  .lh-policy-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
  }
  
  /* Buttons */
  .lh-btn-ghost {
    border: 1px solid #e5e7eb;
    background: #ffffff;
    border-radius: 999px;
    padding: 0.28rem 0.8rem;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    color: #374151;
  }
  
  .lh-btn-ghost:hover {
    background: #f9fafb;
  }
  
  .lh-btn-solid {
    border: none;
    background: #111827;
    color: #ffffff;
    border-radius: 999px;
    padding: 0.32rem 1rem;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
  }
  
  .lh-btn-solid:hover {
    background: #0f172a;
  }
  
  /* Arrow icon */
  .lh-policy-toggle-icon {
    width: 8px;
    height: 8px;
    border-right: 2px solid #4b5563;
    border-bottom: 2px solid #4b5563;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    display: inline-block;
  }
  
  /* Preview panel */
  .lh-policy-preview {
    grid-column: 1 / 4;
    margin-top: 0.3rem;
    padding: 0.6rem 0.75rem 0.7rem;
    border-radius: 10px;
    background: #f9fafb;
    color: #4b5563;
    font-size: 0.8rem;
    display: none;
  }
  
  .lh-policy-item.is-open .lh-policy-preview {
    display: block;
  }
  
  .lh-policy-item.is-open .lh-policy-toggle-icon {
    transform: rotate(-135deg);
  }
  
  /* Recent updates sidebar */
  .lh-recent h2 {
    font-size: 1.02rem;
    margin-bottom: 0.6rem;
  }
  
  .lh-recent-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .lh-recent-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.25rem 0;
    font-size: 0.82rem;
  }
  
  .lh-recent-list a {
    color: #111827;
    text-decoration: none;
    font-weight: 500;
  }
  
  .lh-recent-list a:hover {
    text-decoration: underline;
  }
  
  .lh-recent-date {
    color: #6b7280;
    font-size: 0.76rem;
    margin-left: 0.5rem;
  }
  
  .lh-recent-note {
    margin-top: 0.6rem;
    font-size: 0.7rem;
    color: #9ca3af;
  }
  
  /* Sections below list */
  .lh-section h2 {
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
  }
  
  .lh-section p {
    font-size: 0.82rem;
    color: #4b5563;
  }
  
  /* Full policy page */
  .lh-policy-page h1 {
    font-size: 1.6rem;
    margin-bottom: 0.3rem;
  }
  
  .lh-policy-full {
    margin-top: 0.8rem;
    font-size: 0.9rem;
    line-height: 1.6;
  }
  
  /* Sticky footer alignment with your existing footer */
  .lh-footer-wrap {
    flex-shrink: 0;
  }

  /* Layout shell */
.lh-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }
  
  .lh-main {
    flex: 1 0 auto;
    padding: 2.2rem 5.5rem 3rem; /* tighter to header */
  }
  
  /* Top layout: intro + recent updates */
  .lh-top-layout {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(260px, 0.9fr);
    gap: 2rem;
    align-items: flex-start;
  }
  
  .lh-top-left,
  .lh-top-right {
    min-width: 0;
  }
  
  /* Bottom: full-width stack */
  .lh-bottom-layout {
    margin-top: 2.4rem;
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
  }
  
  /* Intro + banners */
  .lh-intro h1 {
    font-size: 1.9rem;
    margin: 0 0 0.4rem;
    font-weight: 600;
  }
  
  .lh-intro-lede {
    margin: 0 0 1.1rem;
    font-size: 0.92rem;
    color: #4b5563;
  }
  
  .lh-banner {
    margin-top: 0.7rem;
    padding: 1rem 1.1rem;
    border-radius: 14px;
    border: 1px solid rgba(226, 232, 240, 0.95);
  }
  
  .lh-banner-gold {
    background: #fef6e7;
    border-color: #fcd9a4;
  }
  
  .lh-banner-note {
    background: #f8fafc;
  }
  
  /* Generic card */
  .lh-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 1.4rem 1.6rem 1.3rem;
    border: 1px solid rgba(148, 163, 253, 0.18);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
  }
  
  /* Registered Policies */
  .lh-policies h2 {
    margin: 0 0 0.8rem;
    font-size: 1.18rem;
    font-weight: 600;
  }
  
  .lh-policies-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
  }
  
  .lh-policy-item {
    border-radius: 14px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    background: linear-gradient(to right, #f9fafb, #ffffff);
    overflow: hidden;
    transition: all 0.22s ease;
  }
  
  .lh-policy-item:hover {
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
    transform: translateY(-1px);
  }
  
  /* Clickable row */
  .lh-policy-row {
    width: 100%;
    padding: 0.65rem 0.9rem;
    display: grid;
    grid-template-columns: minmax(0, 2.4fr) minmax(0, 1.4fr) auto;
    gap: 0.75rem;
    align-items: center;
    background: transparent;
    border: none;
    cursor: pointer;
  }
  
  .lh-policy-row-main {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
  }
  
  .lh-policy-title {
    font-size: 0.98rem;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
  }
  
  .lh-badge.lh-code {
    padding: 0.16rem 0.6rem;
    font-size: 0.7rem;
    border-radius: 999px;
    background: #e5e7eb;
    color: #111827;
    letter-spacing: 0.06em;
  }
  
  .lh-policy-row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    font-size: 0.74rem;
    color: #6b7280;
    justify-content: flex-start;
  }
  
  .lh-status {
    padding: 0.05rem 0.4rem;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  
  .lh-status-active {
    background: #ecfdf5;
    color: #15803d;
    border: 1px solid #bbf7d0;
  }
  
  .lh-version,
  .lh-updated {
    opacity: 0.9;
  }
  
  /* Arrow */
  .lh-policy-arrow {
    width: 9px;
    height: 9px;
    border-right: 2px solid #6b7280;
    border-bottom: 2px solid #6b7280;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    margin-left: auto;
  }
  
  /* Panel */
  .lh-policy-panel {
    display: none;
    padding: 0 0.9rem 0.75rem;
    border-top: 1px solid rgba(229, 231, 235, 0.9);
    background: #f9fafb;
  }
  
  .lh-policy-summary {
    margin: 0.6rem 0 0.25rem;
    font-size: 0.8rem;
    color: #374151;
  }
  
  .lh-policy-panel-meta {
    margin: 0 0 0.55rem;
    font-size: 0.7rem;
    color: #9ca3af;
  }
  
  .lh-btn-solid {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.32rem 1rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
    border: none;
    background: #111827;
    color: #ffffff;
    text-decoration: none;
    cursor: pointer;
  }
  
  .lh-btn-solid:hover {
    background: #020817;
  }
  
  /* Open state */
  .lh-policy-item.is-open .lh-policy-panel {
    display: block;
  }
  
  .lh-policy-item.is-open .lh-policy-arrow {
    transform: rotate(-135deg);
  }
  
  /* Recent updates */
  .lh-recent h2 {
    margin: 0 0 0.5rem;
    font-size: 1.02rem;
  }
  
  .lh-recent-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
  }
  
  .lh-recent-line {
    display: flex;
    justify-content: space-between;
    gap: 0.4rem;
    align-items: baseline;
  }
  
  .lh-recent-list a {
    font-size: 0.82rem;
    font-weight: 500;
    color: #111827;
    text-decoration: none;
  }
  
  .lh-recent-list a:hover {
    text-decoration: underline;
  }
  
  .lh-recent-date {
    font-size: 0.74rem;
    color: #6b7280;
  }
  
  .lh-recent-summary {
    font-size: 0.72rem;
    color: #6b7280;
  }
  
  .lh-recent-note {
    margin-top: 0.5rem;
    font-size: 0.68rem;
    color: #9ca3af;
  }
  
  /* Sections below */
  .lh-section h2 {
    font-size: 1.05rem;
    margin: 0 0 0.4rem;
  }
  
  .lh-section p {
    font-size: 0.82rem;
    color: #4b5563;
  }
  
  /* Full policy page */
  .lh-policy-page h1 {
    font-size: 1.6rem;
    margin-bottom: 0.3rem;
  }
  
  .lh-policy-full {
    margin-top: 0.8rem;
    font-size: 0.9rem;
    line-height: 1.6;
  }

  /* ============================
   Most Recent Updates — Legal-grade timeline
   ============================ */

.lh-recent {
    padding: 1.4rem 1.5rem 1.2rem;
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 253, 0.28);
    box-shadow:
      0 14px 40px rgba(15, 23, 42, 0.06),
      0 0 0 1px rgba(255, 255, 255, 0.96) inset;
  }
  
  .lh-recent-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 0.65rem;
  }
  
  .lh-recent h2 {
    margin: 0;
    font-size: 1.06rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #111827;
  }
  
  .lh-recent-subtitle {
    margin: 0.14rem 0 0;
    font-size: 0.7rem;
    color: #6b7280;
  }
  
  .lh-recent-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(22, 163, 74, 0.03);
    border: 1px solid rgba(22, 163, 74, 0.2);
    font-size: 0.6rem;
    font-weight: 500;
    color: #166534;
    white-space: nowrap;
  }
  
  .lh-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 5px rgba(34, 197, 94, 0.9);
  }
  
  /* Vertical timeline */
  .lh-recent-timeline {
    list-style: none;
    padding: 0.35rem 0 0;
    margin: 0;
    position: relative;
  }
  
  .lh-recent-timeline::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 0.35rem;
    bottom: 0.4rem;
    width: 1px;
    background: linear-gradient(
      to bottom,
      rgba(148, 163, 253, 0.35),
      rgba(203, 213, 225, 0.05)
    );
    pointer-events: none;
  }
  
  .lh-recent-item {
    position: relative;
    padding: 0.32rem 0 0.4rem 1.6rem;
  }
  
  .lh-recent-item::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 0.78rem;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #ffffff;
    border: 2px solid #4f46e5;
    box-shadow: 0 0 4px rgba(79, 70, 229, 0.5);
  }
  
  /* Row layout */
  .lh-recent-link {
    display: grid;
    grid-template-columns: minmax(0, 2fr) auto;
    gap: 0.6rem;
    align-items: center;
    padding: 0.45rem 0.55rem 0.5rem;
    border-radius: 12px;
    text-decoration: none;
    background: transparent;
    transition: all 0.18s ease;
  }
  
  .lh-recent-link:hover {
    background: #f9fafb;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
    transform: translateY(-1px);
  }
  
  /* Left: code + full title + summary */
  .lh-recent-main {
    min-width: 0;
  }
  
  .lh-recent-title-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.3rem;
    min-width: 0;
  }
  
  .lh-badge.lh-badge-soft {
    padding: 0.12rem 0.5rem;
    font-size: 0.6rem;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.95);
    color: #111827;
    letter-spacing: 0.08em;
  }
  
  .lh-recent-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.35;
    white-space: normal;          /* <-- show full legal title */
    word-break: break-word;
  }
  
  .lh-recent-summary {
    margin-top: 0.16rem;
    font-size: 0.68rem;
    color: #6b7280;
    line-height: 1.4;
  }
  
  /* Right: date + status */
  .lh-recent-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.14rem;
    font-size: 0.64rem;
  }
  
  .lh-recent-date {
    color: #6b7280;
  }
  
  .lh-status-pill {
    padding: 0.1rem 0.46rem;
    border-radius: 999px;
    border: 1px solid rgba(17, 24, 39, 0.15);
    background: #f9fafb;
    color: #111827;
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.09em;
  }
  
  /* Footer note */
  .lh-recent-footer {
    margin-top: 0.5rem;
    padding-top: 0.4rem;
    border-top: 1px solid rgba(226, 232, 240, 0.95);
  }
  
  .lh-recent-footer p {
    margin: 0;
    font-size: 0.64rem;
    color: #9ca3af;
  }
  
  .lh-muted {
    font-size: 0.74rem;
    color: #9ca3af;
  }