/* ==========================================================================
   getflix.fun — stylesheet
   System font stack only: no webfont request, no third-party origin, no FOUT.
   ========================================================================== */

:root {
  --brand: #c8433f;
  --brand-strong: #a8332f;
  --brand-soft: rgba(200, 67, 63, 0.09);

  --bg-page: #f6f7f9;
  --bg-card: #ffffff;
  --bg-sunken: #eff1f4;

  --text-primary: #16181d;
  --text-secondary: #4a5160;
  --text-muted: #757d8c;

  --border-subtle: #e4e7ec;
  --border-medium: #d3d8e0;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(16, 18, 22, 0.05);
  --shadow-md: 0 2px 8px rgba(16, 18, 22, 0.07);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --content-max: 1220px;
  --sidebar-w: 232px;
}

[data-theme='dark'] {
  --brand: #f07a72;
  --brand-strong: #f5988f;
  --brand-soft: rgba(240, 122, 114, 0.12);

  --bg-page: #101216;
  --bg-card: #181b21;
  --bg-sunken: #1f232b;

  --text-primary: #eceef2;
  --text-secondary: #b0b7c3;
  --text-muted: #858d9b;

  --border-subtle: #262b34;
  --border-medium: #333a45;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 2px 10px rgba(0, 0, 0, 0.45);
}


/* Native controls (scrollbars, select dropdowns) follow the active theme. */
:root {
  color-scheme: light;
}

[data-theme="dark"] {
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  /* Reserve the scrollbar track so short pages and long pages line up
     instead of shifting horizontally between navigations. */
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.25;
  font-weight: 700;
  color: var(--text-primary);
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--brand-strong);
}

ul,
ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

table {
  border-collapse: collapse;
}

img {
  max-width: 100%;
  height: auto;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 3px;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

.muted {
  color: var(--text-muted);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  /* clip is deprecated; clip-path is the modern equivalent. Both are kept
     so the label stays hidden in older browsers too. */
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--brand);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius-md) 0;
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
  color: #fff;
}

.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------------------------------------------------------------- Navbar */

.navbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
}

.navbar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 58px;
}

.nav-left-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand-icon-pin {
  width: 20px;
  height: 20px;
  fill: var(--brand);
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  display: block;
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
}

.nav-link:hover {
  background: var(--bg-sunken);
  color: var(--text-primary);
}

.nav-link[aria-current='page'] {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}

.theme-toggle-btn,
.mobile-menu-btn,
.sidebar-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 1px solid var(--border-medium);
  background: var(--bg-card);
  color: var(--text-secondary);
  border-radius: var(--radius-pill);
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
}

.theme-toggle-btn:hover,
.mobile-menu-btn:hover,
.sidebar-close-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.mobile-menu-btn,
.sidebar-close-btn {
  padding: 0.35rem;
  border-radius: var(--radius-md);
}

.mobile-menu-btn {
  display: none;
}

/* ---------------------------------------------------------------- Layout */

.main-grid {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
  padding-top: 1.75rem;
  padding-bottom: 3rem;
}

.workbench-column {
  min-width: 0;
}

/* --------------------------------------------------------------- Sidebar */

.left-sidebar {
  position: sticky;
  top: 74px;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  padding-right: 0.5rem;
  overscroll-behavior: contain;
}

.sidebar-mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-menu-group + .sidebar-menu-group {
  margin-top: 1.5rem;
}

.sidebar-menu-heading {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.sidebar-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-menu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.34rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
}

.sidebar-menu-link:hover {
  background: var(--bg-sunken);
  color: var(--text-primary);
}

.sidebar-menu-link.active {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}

.saved-badge-pill {
  display: inline-block;
  min-width: 1.35rem;
  padding: 0 0.35rem;
  border-radius: var(--radius-pill);
  background: var(--bg-sunken);
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 700;
  text-align: center;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 16, 0.5);
  z-index: 45;
}

.sidebar-backdrop[hidden] {
  display: none;
}

/* ----------------------------------------------------------- Page header */

.breadcrumbs {
  margin-bottom: 0.9rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumbs li + li::before {
  content: '/';
  margin-right: 0.4rem;
  color: var(--border-medium);
}

.page-header {
  margin-bottom: 1.35rem;
}

.page-header h1 {
  font-size: clamp(1.6rem, 1.15rem + 1.6vw, 2.15rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
}

.lede {
  font-size: 1.03rem;
  color: var(--text-secondary);
  max-width: 68ch;
  margin: 0;
}

/* ------------------------------------------------------- Country select */

.country-selector-row {
  margin-bottom: 1.25rem;
}

.country-select-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 100%;
  max-width: 340px;
}

.globe-icon {
  position: absolute;
  left: 0.75rem;
  color: var(--text-muted);
  pointer-events: none;
}

.select-arrow {
  position: absolute;
  right: 0.7rem;
  color: var(--text-muted);
  pointer-events: none;
}

.country-select {
  appearance: none;
  width: 100%;
  padding: 0.55rem 2.2rem 0.55rem 2.4rem;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  color: var(--text-primary);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.country-select:hover {
  border-color: var(--brand);
}

/* --------------------------------------------------------------- Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-strong);
  color: #fff;
}

[data-theme='dark'] .btn-primary {
  color: #16181d;
}

.btn-secondary {
  background: var(--bg-card);
  border-color: var(--border-medium);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.btn-sm {
  padding: 0.34rem 0.75rem;
  font-size: 0.8rem;
}

.btn-danger:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* ------------------------------------------------------- Generator card */

.identity-hero {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  margin-bottom: 2rem;
}

.hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.hero-avatar-wrapper {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.hero-avatar {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 1.2rem;
  font-weight: 800;
}

.hero-name {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hero-meta {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.workbench-tables {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.data-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.data-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.6rem 0.85rem;
  background: var(--bg-sunken);
  border-bottom: 1px solid var(--border-subtle);
}

.card-title-left {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.copy-card-btn {
  border: none;
  background: none;
  color: var(--brand);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.15rem 0.3rem;
  border-radius: var(--radius-sm);
}

.copy-card-btn:hover {
  background: var(--brand-soft);
}

.data-table-list {
  margin: 0;
}

.data-table-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
}

.data-table-row:last-child {
  border-bottom: none;
}

.data-row-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.data-row-val-group {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  min-width: 0;
  text-align: right;
}

.data-row-value {
  font-size: 0.875rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.data-row-value.wrap {
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.copy-row-btn {
  display: inline-flex;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.15rem;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.copy-row-btn:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

.card-action-bar-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.json-section-details {
  margin-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.75rem;
}

.json-summary {
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.json-summary:hover {
  color: var(--brand);
}

.json-code-block {
  margin-top: 0.6rem;
  background: var(--bg-sunken);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  overflow-x: auto;
}

.json-code-block pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

/* ---------------------------------------------------------------- Prose */

.prose {
  max-width: 72ch;
  margin-bottom: 2.25rem;
}

.prose h2 {
  font-size: 1.3rem;
  letter-spacing: -0.015em;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-subtle);
}

.prose h3 {
  font-size: 1rem;
  margin: 1.25rem 0 0.5rem;
}

.prose p {
  color: var(--text-secondary);
}

.prose > ul li,
.prose > ol li {
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.callout {
  border-left: 3px solid var(--brand);
  background: var(--brand-soft);
  padding: 0.8rem 1rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 0.9rem;
}

.inline-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  list-style: none;
  padding: 0;
}

.compact-list {
  list-style: none;
  padding: 0;
  columns: 2;
  column-gap: 1.5rem;
  font-size: 0.875rem;
}

.compact-list li {
  break-inside: avoid;
  margin-bottom: 0.25rem;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

/* --------------------------------------------------------------- Tables */

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

.ref-table,
.spec-table {
  width: 100%;
  font-size: 0.875rem;
  background: var(--bg-card);
}

.ref-table th,
.ref-table td,
.spec-table th,
.spec-table td {
  padding: 0.55rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.ref-table th {
  background: var(--bg-sunken);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  position: sticky;
  top: 0;
}

.ref-table td {
  color: var(--text-secondary);
}

.ref-table tr:last-child td,
.spec-table tr:last-child td,
.spec-table tr:last-child th {
  border-bottom: none;
}

.spec-table {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  overflow: hidden;
}

.spec-table th {
  width: 38%;
  color: var(--text-muted);
  font-weight: 600;
  background: var(--bg-sunken);
  white-space: normal;
}

.spec-table td {
  color: var(--text-primary);
  font-weight: 600;
  white-space: normal;
}

/* -------------------------------------------------------- Address block */

.address-example {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1rem;
}

.address-example-label {
  grid-column: 1 / -1;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.address-example address {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-primary);
}

.address-example-lines {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------- Country grid */

.country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.6rem;
  list-style: none;
  padding: 0;
}

.country-card {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.65rem 0.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-decoration: none;
}

.country-card:hover {
  border-color: var(--brand);
}

.country-card-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.country-card-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ------------------------------------------------------------------ FAQ */

.faq-section .faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 0.5rem;
}

.faq-question {
  padding: 0.75rem 0.95rem;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: '+';
  color: var(--brand);
  font-size: 1.15rem;
  font-weight: 400;
  flex-shrink: 0;
}

.faq-item[open] .faq-question::after {
  content: '\2212';
}

.faq-question:hover {
  color: var(--brand);
}

.faq-answer {
  padding: 0 0.95rem 0.85rem;
}

.faq-answer p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* -------------------------------------------------------- Bulk & saved */

.section-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.bulk-qty-selector {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  background: var(--bg-sunken);
  border-radius: var(--radius-pill);
}

.bulk-qty-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
}

.bulk-qty-btn.active {
  background: var(--brand);
  color: #fff;
}

[data-theme='dark'] .bulk-qty-btn.active {
  color: #16181d;
}

.bulk-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.bulk-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem;
}

.bulk-card-name {
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.bulk-card-line {
  margin: 0 0 0.2rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}

.bulk-card .btn {
  margin-top: 0.6rem;
}

.saved-section {
  margin-bottom: 2rem;
}

.search-wrapper input {
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  color: var(--text-primary);
  font: inherit;
  font-size: 0.85rem;
  min-width: 220px;
}

#saved-records-table-wrapper {
  padding: 1rem;
}

/* --------------------------------------------------------- Contact form */

.contact-card {
  padding: 1.25rem;
  margin-bottom: 2rem;
}

.contact-card h2 {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: 480px;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  background: var(--bg-page);
  color: var(--text-primary);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 400;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--brand);
}

.contact-form .btn {
  align-self: flex-start;
}

.form-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

/* ---------------------------------------------------------- Legal prose */

.legal-prose h2 {
  font-size: 1.1rem;
  margin-top: 1.75rem;
}

.legal-prose p,
.legal-prose li {
  font-size: 0.92rem;
}

/* --------------------------------------------------------------- Toasts */

.toast-container {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  pointer-events: none;
}

.toast {
  background: var(--text-primary);
  color: var(--bg-card);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  opacity: 1;
  transition: opacity 0.35s ease;
}

.toast-out {
  opacity: 0;
}

/* --------------------------------------------------------------- Footer */

footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  padding: 2.25rem 0 1.5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 2fr;
  gap: 2rem;
  margin-bottom: 1.75rem;
}

.footer-brand-name {
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  max-width: 42ch;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.5rem;
}

.footer-column h2 {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.footer-column ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-column li {
  margin-bottom: 0.35rem;
}

.footer-column a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-column a:hover {
  color: var(--brand);
  text-decoration: underline;
}

.disclaimer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.25rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
  max-width: 90ch;
}

/* ----------------------------------------------------------- Responsive */

@media (max-width: 1024px) {
  .mobile-menu-btn {
    display: inline-flex;
  }

  .nav-links {
    display: none;
  }

  .main-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .left-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 50;
    width: 280px;
    max-height: none;
    padding: 1.1rem;
    background: var(--bg-card);
    border-right: 1px solid var(--border-subtle);
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    overflow-y: auto;
  }

  .left-sidebar.mobile-open {
    transform: translateX(0);
  }

  .sidebar-mobile-header {
    display: flex;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 15px;
  }

  .container {
    padding: 0 1rem;
  }

  .identity-hero {
    padding: 1rem;
  }

  .data-table-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
  }

  .data-row-val-group {
    text-align: left;
    width: 100%;
    justify-content: space-between;
  }

  .compact-list {
    columns: 1;
  }

  .footer-content {
    grid-template-columns: minmax(0, 1fr);
  }

  .card-action-bar-bottom .btn,
  .section-toolbar .btn {
    flex: 1 1 auto;
  }
}

@media print {
  .navbar,
  .left-sidebar,
  .card-action-bar-bottom,
  .toast-container,
  footer {
    display: none;
  }
}

/* ------------------------------------------------------- Skeleton loading */
/* Shown only in response to a user action. The first paint of every page is a
   real server-rendered record, so this never delays LCP. */

.skeleton {
  display: block;
  height: 0.85rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(
    90deg,
    var(--bg-sunken) 25%,
    var(--border-subtle) 37%,
    var(--bg-sunken) 63%
  );
  background-size: 400% 100%;
  animation: skeleton-sweep 1.4s ease infinite;
}

.data-row-val-group .skeleton {
  margin-left: auto;
}

.bulk-card .skeleton + .skeleton {
  margin-top: 0.45rem;
}

.hero-avatar.is-loading {
  color: transparent;
  background: linear-gradient(
    90deg,
    var(--bg-sunken) 25%,
    var(--border-subtle) 37%,
    var(--bg-sunken) 63%
  );
  background-size: 400% 100%;
  animation: skeleton-sweep 1.4s ease infinite;
}

@keyframes skeleton-sweep {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton,
  .hero-avatar.is-loading {
    animation: none;
  }
}

/* ---------------------------------------------------------- Use notice */

.use-notice {
  margin: 1rem 0 0;
  padding: 0.7rem 0.9rem;
  border-left: 3px solid var(--border-medium);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--bg-sunken);
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.use-notice strong {
  color: var(--text-secondary);
}
