@import url('https://fonts.googleapis.com/css2?family=Titillium+Web:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
  /* LILAS4SOILS Branding Book — core colour palette */
  --teal: #268D9E;
  --green: #3E8745;
  --green-bright: #3FA025;
  --green-dark: #394233;
  --brown: #6E4931;
  --white: #FFFFFF;

  --bg: #F5F6F3;
  --card: #FFFFFF;
  --border: #E3E0D8;
  --text: #262622;
  --text-muted: #6B6A63;
  --danger: #B3432B;
  --info: var(--teal);
  --gold: var(--brown);
  --radius: 10px;

  --sidebar-width: 240px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Titillium Web', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
}
h1, h2, h3, h4 { font-family: 'Titillium Web', sans-serif; font-weight: 700; color: var(--green-dark); }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- shell */

.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 8px;
  padding: 18px 16px; border-bottom: 1px solid var(--border);
}
.sidebar-brand img { height: 30px; width: auto; display: block; }
.sidebar-nav { flex: 1; padding: 10px 10px; }
.sidebar-section-label {
  font-size: .72em; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-muted); padding: 16px 10px 6px;
}
.sidebar-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 8px; color: var(--text);
  font-size: .93em; margin-bottom: 2px;
}
.sidebar-nav a:hover { background: var(--bg); text-decoration: none; }
.sidebar-nav a.active { background: rgba(63,160,37,.12); color: var(--green); font-weight: 600; }
.sidebar-nav a .nav-icon { flex-shrink: 0; opacity: .85; }
.sidebar-nav a:hover .nav-icon, .sidebar-nav a.active .nav-icon { opacity: 1; }

.sidebar-footer {
  padding: 14px 16px; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.sidebar-footer img { max-width: 100%; height: auto; }

.app-content { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  padding: 12px 24px; border-bottom: 1px solid var(--border); background: var(--white);
}
.nav-user { display: flex; align-items: center; gap: 8px; font-size: .88em; color: var(--text); }
.view-as-switcher { display: flex; align-items: center; gap: 6px; }
.view-as-switcher select {
  font-size: .85em; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text);
}
.nav-user .user-avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--green-dark); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: .8em; font-weight: 700;
}
.role-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: #ccc; }
.role-dot.role-admin { background: var(--brown); }
.role-dot.role-editor { background: var(--green-bright); }
.role-dot.role-viewer { background: var(--teal); }
.role-badge {
  background: var(--bg);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .8em;
  text-transform: capitalize;
}
.logout-link { margin-left: 4px; color: var(--teal); }

.banner {
  padding: 10px 20px;
  font-size: .92em;
}
.banner-warn { background: #FCEFD9; color: #7A5417; border-bottom: 1px solid #F0D9A8; }
.banner-info { background: #E7F0FA; color: #1E4A75; border-bottom: 1px solid #C7DDF0; }

.app-main {
  flex: 1;
  padding: 24px 28px 60px;
}

@media (max-width: 860px) {
  .app-shell { flex-direction: column; }
  .sidebar { position: static; height: auto; width: 100%; }
}

.auth-wrap {
  max-width: 380px;
  margin: 80px auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.auth-wrap h1 { font-size: 1.3em; margin-top: 0; }
.auth-wrap .brand-mark { color: var(--green); font-weight: 700; margin-bottom: 4px; display: block; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: .85em; font-weight: 600; margin-bottom: 4px; color: var(--text-muted); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: .95em;
  font-family: inherit;
  background: #fff;
}
.field textarea { resize: vertical; }

.btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid var(--green);
  background: var(--green);
  color: #fff;
  cursor: pointer;
  font-size: .92em;
}
.btn:hover { background: var(--green-dark); text-decoration: none; }
.btn.secondary { background: #fff; color: var(--green-dark); }
.btn.danger { background: var(--danger); border-color: var(--danger); }
.btn.block { display: block; width: 100%; text-align: center; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.error-box {
  background: #FBEAE6;
  color: #7A2E1B;
  border: 1px solid #F0C7BB;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: .9em;
  margin-bottom: 14px;
}
.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 20px;
}

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.tabs a {
  padding: 8px 16px;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
}
.tabs a.active { color: var(--green-dark); border-bottom-color: var(--green); font-weight: 600; }

.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar input[type=search] { flex: 1; min-width: 200px; }

table.data-table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
table.data-table th, table.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; font-size: .92em; }
table.data-table th { background: #F0EEE7; font-weight: 600; color: var(--text-muted); }
table.data-table tr:last-child td { border-bottom: none; }
table.data-table tr:hover td { background: #FAFAF7; }

.tag { display: inline-block; background: #EFEAE0; color: var(--green-dark); border-radius: 999px; padding: 2px 10px; font-size: .8em; margin: 2px 4px 2px 0; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.card h2, .card h3 { margin-top: 0; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; font-size: .92em; }
.kv dt { color: var(--text-muted); }
.kv dd { margin: 0; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 800px) { .grid-2 { grid-template-columns: 1fr; } }

.stat-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.stat-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; text-align: center;
}
.stat-card-value { font-family: 'Titillium Web', sans-serif; font-weight: 700; font-size: 2.2em; line-height: 1.1; }
.stat-card-label { color: var(--text-muted); font-size: .85em; margin-top: 4px; }

#map-canvas, #graph-canvas { width: 100%; height: 640px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }

.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: var(--green); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.filters-bar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.filters-bar select { padding: 6px 8px; border-radius: 6px; border: 1px solid var(--border); }

.stepper { display: flex; gap: 8px; margin-bottom: 20px; }
.stepper span { padding: 4px 12px; border-radius: 999px; background: #EFEAE0; font-size: .85em; }
.stepper span.active { background: var(--green); color: #fff; }

/* Provenance flag: value filled automatically, not yet checked by staff (migration 06). */
.prov-badge { display: inline-block; background: #FCEFD9; color: #7A5417; border: 1px solid #F0D9A8; border-radius: 999px; padding: 1px 8px; font-size: .72em; font-weight: 600; margin-left: 6px; vertical-align: middle; cursor: help; white-space: nowrap; }

/* ================================================================ round 3
   Directory, profile, network explorer, admin area (migration 09). */

[hidden] { display: none !important; }
.muted { color: var(--text-muted); }
.small { font-size: .85em; }
.hint { font-size: .85em; color: var(--text-muted); margin: 4px 0 10px; }
.btn.small { padding: 4px 10px; font-size: .82em; }
.link-btn { background: none; border: 0; padding: 0 4px; color: var(--teal); cursor: pointer; font: inherit; font-size: .85em; }
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: var(--danger); }
.error-inline { color: var(--danger); }
.ok-inline { color: var(--green); }
.flash-ok { background: #E8F3E4; color: #26562B; border: 1px solid #C6E0BD; border-radius: 6px; padding: 10px 14px; font-size: .9em; margin-bottom: 14px; }
.table-scroll { width: 100%; overflow-x: auto; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .grid-3 { grid-template-columns: 1fr; } }
.check { display: flex; align-items: center; gap: 6px; font-size: .9em; margin: 4px 0; cursor: pointer; }
.check input { width: auto; margin: 0; }
.check.inline { display: inline-flex; margin-right: 10px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0 10px; }
.tag-ll { background: #DDEFE9; color: #1D5F52; font-weight: 600; }
.tag-demo { background: #E8F3E4; color: #2E6B32; }
.tag-type { background: var(--green-dark); color: #fff; }
.tag-strong { background: #E3EFF1; color: #1E5964; }
.mini-badge { display: inline-block; font-size: .72em; background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 0 7px; margin: 2px 3px 0 0; }
.count-badge { background: var(--danger); color: #fff; border-radius: 999px; font-size: .72em; padding: 0 7px; margin-left: 4px; font-weight: 700; }

/* ---------------------------------------------------------------- page head */
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.page-head h1 { margin: 0; }
.page-head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dropdown { position: relative; }
.dropdown-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 280px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.08); padding: 14px; }
.dropdown-panel .btn { margin-top: 8px; }

/* ---------------------------------------------------------------- directory */
.directory-layout, .explorer-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px; align-items: start; }
.explorer-layout { grid-template-columns: 240px minmax(0, 1fr) 230px; }
@media (max-width: 1200px) { .explorer-layout { grid-template-columns: 240px minmax(0, 1fr); } .explorer-layout .graph-legend { grid-column: 1 / -1; } }
@media (max-width: 860px) { .directory-layout, .explorer-layout { grid-template-columns: 1fr; } }
.filter-panel { padding: 16px; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; margin-bottom: 0; }
.filter-panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.filter-panel .field { margin-bottom: 12px; }
.filter-panel .field input, .filter-panel .field select { padding: 6px 8px; font-size: .9em; }
.chip-group { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; font-size: .82em; background: #fff; }
.chip input:checked + span { background: var(--green); border-color: var(--green); color: #fff; }
.chip input:focus-visible + span { outline: 2px solid var(--teal); }
.more-filters { border-top: 1px solid var(--border); padding-top: 10px; margin-top: 4px; }
.more-filters summary { cursor: pointer; font-weight: 600; font-size: .9em; color: var(--green-dark); margin-bottom: 10px; }
.results-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: .9em; }
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable:hover { color: var(--green-dark); }
th.sorted { color: var(--green-dark); }
.sort-arrow { font-size: .75em; opacity: .7; }
.name-cell { display: flex; gap: 10px; align-items: center; min-width: 200px; }
.row-logo { width: 32px; height: 32px; border-radius: 6px; object-fit: contain; background: #fff; border: 1px solid var(--border); flex-shrink: 0; }
.row-logo-empty { display: inline-flex; align-items: center; justify-content: center; background: var(--bg); color: var(--text-muted); font-weight: 700; }
.row-sub { display: block; font-size: .8em; color: var(--text-muted); }
.eng { display: inline-block; border-radius: 999px; padding: 1px 8px; font-size: .78em; background: var(--bg); }
.eng-1 { background: #EEF0EA; } .eng-2 { background: #DDEFE9; } .eng-3 { background: #C7E6D2; } .eng-4 { background: #A9D7B4; } .eng-5 { background: #7FC08E; color: #fff; }
.pager { display: flex; gap: 10px; align-items: center; justify-content: center; margin-top: 14px; }

/* ---------------------------------------------------------------- admin area */
.admin-head { margin: -4px 0 20px; border-bottom: 1px solid var(--border); }
.admin-head-title { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--green-dark); margin-bottom: 8px; }
.subnav { display: flex; gap: 2px; flex-wrap: wrap; }
.subnav a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; color: var(--text-muted); border-bottom: 2px solid transparent; font-size: .9em; }
.subnav a:hover { color: var(--text); text-decoration: none; }
.subnav a.active { color: var(--green-dark); border-bottom-color: var(--green); font-weight: 600; }
.subnav .nav-icon { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- profile */
.crumbs { margin: 0 0 10px; font-size: .9em; }
.profile-hero { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; }
.profile-hero-banner { height: 220px; background: linear-gradient(120deg, #DDEFE9, #EFEAE0 60%, #E3EFF1); overflow: hidden; }
.profile-hero-banner img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.profile-hero-banner[data-empty] { height: 90px; }
.profile-hero-body { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; padding: 0 24px 18px; align-items: start; }
.profile-hero-logo { margin-top: -42px; background: #fff; border-radius: 16px; padding: 6px; box-shadow: 0 2px 10px rgba(0,0,0,.08); line-height: 0; }
.profile-hero-text h1 { margin: 14px 0 6px; font-size: 1.7em; line-height: 1.2; }
.profile-hero-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: .9em; }
.profile-hero-meta .tag { margin: 0; }
.profile-lead { margin: 10px 0 0; font-size: 1.05em; max-width: 760px; }
.profile-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin-top: 14px; align-items: center; }
.profile-hero-note { padding: 0 24px 12px; font-size: .82em; }
#enrich-status { padding: 0 24px; }
@media (max-width: 760px) { .profile-hero-body { grid-template-columns: 1fr; } .profile-hero-actions { justify-content: flex-start; margin-top: 0; } .profile-hero-banner { height: 150px; } }
.claim-status { font-size: .85em; }
.claim-form { flex-basis: 100%; margin: 8px 0 0; text-align: left; }
.avatar { display: inline-block; border-radius: 12px; object-fit: contain; background: #fff; border: 1px solid var(--border); vertical-align: middle; }
.avatar.round { border-radius: 50%; object-fit: cover; }
.avatar-initials { display: inline-flex; align-items: center; justify-content: center; background: #E3EFF1; color: #1E5964; font-weight: 700; border: 0; width: 56px; height: 56px; }
.profile-hero-logo .avatar-initials { width: 84px; height: 84px; font-size: 1.6em; }
.graph-swatch { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; flex-shrink: 0; vertical-align: middle; }
.profile-hero-logo .graph-swatch { border-radius: 14px; }

.profile-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .profile-layout { grid-template-columns: 1fr; } }
.profile-card .card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.profile-card .card-head h3 { margin: 0; }
.card-warn { border-color: #F0D9A8; background: #FFFBF2; }
.profile-description { margin-bottom: 14px; white-space: normal; }
.sub-head { margin: 14px 0 6px; font-size: .92em; color: var(--green-dark); display: flex; align-items: center; gap: 6px; }
.class-row { display: grid; grid-template-columns: 170px 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--border); }
.class-row:last-of-type { border-bottom: 0; }
.class-label { color: var(--text-muted); font-size: .88em; padding-top: 2px; }
.class-values { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.class-values .tag { margin: 0; }
@media (max-width: 600px) { .class-row { grid-template-columns: 1fr; } }
.tag-x { background: none; border: 0; padding: 0 0 0 2px; cursor: pointer; color: var(--text-muted); font-size: 1.05em; line-height: 1; }
.tag-x:hover { color: var(--danger); }
.tag-add { font-size: .8em; padding: 2px 6px; border: 1px dashed var(--border); border-radius: 999px; background: #fff; color: var(--teal); max-width: 220px; }
.inline-add { margin-top: 10px; }
.inline-add select { padding: 6px 8px; border: 1px dashed var(--border); border-radius: 6px; }
.inline-form { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; padding: 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; }
.inline-form input, .inline-form select, .inline-form textarea { width: 100%; padding: 7px 9px; border: 1px solid var(--border); border-radius: 6px; font: inherit; font-size: .9em; background: #fff; }
.inline-form .field { margin-bottom: 4px; }
.inline-form details summary { cursor: pointer; font-size: .9em; color: var(--teal); margin-bottom: 6px; }
.form-actions { display: flex; gap: 8px; }
.plain-list { list-style: none; padding: 0; margin: 0; }
.plain-list li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.plain-list li:last-child { border-bottom: 0; }
.conn-list { list-style: none; padding: 0; margin: 0 0 6px; columns: 2 280px; }
.conn-list li { padding: 3px 0; break-inside: avoid; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.tiles-compact { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.tile { border: 1px solid var(--border); border-radius: 10px; padding: 14px 12px; background: #fff; display: flex; flex-direction: column; transition: box-shadow .15s, border-color .15s; }
.tile:hover { border-color: #CFCBBF; box-shadow: 0 3px 12px rgba(0,0,0,.05); }
.tile-main { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; color: inherit; }
a.tile-main:hover, a.tile:hover { text-decoration: none; }
.tile-main .avatar, .tile-main .graph-swatch { margin-bottom: 6px; }
.tile-name { font-weight: 600; font-size: .93em; line-height: 1.25; }
.tile-role { font-size: .82em; color: var(--green-dark); }
.tile-sub { font-size: .78em; color: var(--text-muted); }
.tile-desc { font-size: .78em; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-top: 4px; }
.tile-badges { text-align: center; margin-top: 6px; }
.tile-contact { font-size: .78em; text-align: center; margin-top: 6px; word-break: break-all; }
.tile-actions { display: flex; justify-content: center; gap: 4px; margin-top: auto; padding-top: 8px; }
.tile-edit { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
.tile-edit input, .tile-edit select { font-size: .82em; padding: 4px 6px; border: 1px solid var(--border); border-radius: 5px; width: 100%; }
.tile-edit .check { font-size: .8em; margin: 0; }
.tile-edit-actions { display: flex; gap: 6px; }

.contact-line { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; font-size: .92em; word-break: break-word; }
.social-links { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.social-link { font-size: .8em; border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; color: var(--text); background: var(--bg); }
.social-link:hover { border-color: var(--teal); color: var(--teal); text-decoration: none; }
.social-linkedin { border-color: #9FC3DE; } .social-youtube { border-color: #E6A6A6; } .social-instagram { border-color: #E2B2D6; }
.profile-map { height: 200px; border-radius: 8px; overflow: hidden; margin-top: 10px; }
.mini-graph { height: 280px; border: 1px solid var(--border); border-radius: 8px; background: #FCFCFA; }
.mini-legend { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: .75em; color: var(--text-muted); margin-top: 8px; }
.mini-legend span { display: inline-flex; align-items: center; gap: 4px; }

.edit-form fieldset { border: 1px solid var(--border); }
.edit-form legend { font-weight: 700; color: var(--green-dark); padding: 0 6px; }
.edit-actions { position: sticky; bottom: 0; background: rgba(245,246,243,.95); padding: 12px 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--border); }
.edit-actions .hint { margin: 0; }

/* ---------------------------------------------------------------- explorer */
.actor-search { position: relative; min-width: 260px; }
.actor-search input[type=search] { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; font: inherit; font-size: .92em; }
.actor-search-results { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 40; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.08); max-height: 300px; overflow-y: auto; }
.actor-search-results button { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--border); padding: 8px 10px; cursor: pointer; font: inherit; font-size: .9em; }
.actor-search-results button:hover { background: var(--bg); }
.explorer-main { min-width: 0; }
.graph-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; font-size: .9em; }
.graph-toolbar-spacer { flex: 1; }
.segmented { display: inline-flex; align-items: center; gap: 0; }
.segmented .muted { margin-right: 6px; }
.segmented button { border: 1px solid var(--border); background: #fff; padding: 5px 12px; cursor: pointer; font: inherit; font-size: .9em; margin-left: -1px; }
.segmented button:first-of-type { border-radius: 6px 0 0 6px; }
.segmented button:last-of-type { border-radius: 0 6px 6px 0; }
.segmented button.active { background: var(--green); border-color: var(--green); color: #fff; }
.icon-btn { width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 6px; background: #fff; cursor: pointer; font-size: 1.1em; line-height: 1; }
.icon-btn:hover { border-color: var(--green); color: var(--green); }
.graph-wrap { position: relative; }
.graph-wrap #graph-canvas { height: calc(100vh - 230px); min-height: 520px; }
.graph-info { position: absolute; top: 12px; right: 12px; width: 280px; margin: 0; padding: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.graph-info-head { display: flex; gap: 10px; align-items: center; padding-right: 18px; }
.graph-info-close { position: absolute; top: 6px; right: 8px; border: 0; background: none; font-size: 1.3em; cursor: pointer; color: var(--text-muted); }
.graph-legend { font-size: .85em; padding: 14px; position: sticky; top: 12px; margin-bottom: 0; }
.graph-legend-section { margin-bottom: 12px; }
.graph-legend-section strong { display: block; margin-bottom: 6px; color: var(--green-dark); }
.graph-legend-row { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.graph-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.graph-line { display: inline-block; width: 22px; border-top: 3px solid #999; vertical-align: middle; flex-shrink: 0; }
.graph-line.dashed { border-top-style: dashed; }
#nx-otype .check, #nx-cats .check { font-size: .85em; }
.eng-block { border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; }
.eng-ll { font-weight: 700; color: var(--green-dark); margin-bottom: 8px; }
.eng-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 14px; font-size: .9em; }
.eng-grid label { display: block; font-size: .8em; color: var(--text-muted); font-weight: 600; margin-bottom: 3px; }
.eng-grid select { width: 100%; padding: 4px 6px; border: 1px solid var(--border); border-radius: 5px; font: inherit; font-size: .92em; }
.eng-pi { display: flex; gap: 4px; align-items: center; }
.eng-roles { grid-column: 1 / -1; }

/* ================================================================ public questionnaire (q.php) */
.q-page { background: var(--bg); }
.q-header { background: #fff; border-bottom: 1px solid var(--border); }
.q-header-inner { max-width: 820px; margin: 0 auto; padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.q-logo { height: 34px; width: auto; }
.q-langs { display: flex; flex-wrap: wrap; gap: 4px; }
.q-langs a { font-size: .85em; padding: 3px 9px; border-radius: 999px; color: var(--text-muted); border: 1px solid transparent; }
.q-langs a.active { border-color: var(--green); color: var(--green-dark); font-weight: 600; }
.q-main { max-width: 820px; margin: 0 auto; padding: 20px 16px 60px; }
.q-card { padding: 28px; }
.q-card h1 { margin-top: 0; }
.q-intro { font-size: 1.05em; }
.q-section { border-top: 1px solid var(--border); margin-top: 22px; padding-top: 6px; }
.q-section.q-empty { display: none; }
.q-section h2 { font-size: 1.2em; margin: 14px 0 6px; }
.q-item { margin: 16px 0; }
.q-item > label, .q-item legend { display: block; font-weight: 600; margin-bottom: 6px; color: var(--text); padding: 0; }
.q-item fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.q-item input[type=text], .q-item input[type=email], .q-item input[type=tel], .q-item input[type=url], .q-item input[type=number],
.q-item input[type=date], .q-item select, .q-item textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 6px; font: inherit; background: #fff;
}
.q-help { font-size: .87em; color: var(--text-muted); margin: 0 0 6px; }
.req { color: var(--danger); }
.q-choices { display: flex; flex-direction: column; gap: 6px; }
.q-choices.inline { flex-direction: row; gap: 18px; }
.q-choice { display: flex; gap: 8px; align-items: flex-start; font-weight: normal; cursor: pointer; }
.q-choice input { margin-top: 4px; flex-shrink: 0; }
.q-info { background: var(--bg); border-radius: 8px; padding: 12px 14px; font-size: .92em; }
.q-rating { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.q-rating-end { font-size: .82em; color: var(--text-muted); }
.q-rating-step { cursor: pointer; }
.q-rating-step input { position: absolute; opacity: 0; }
.q-rating-step span { display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.q-rating-step input:checked + span { background: var(--green); color: #fff; border-color: var(--green); }
.q-rating-step input:focus-visible + span { outline: 2px solid var(--teal); }
.q-ranking { padding-inline-start: 22px; margin: 0; }
.q-ranking li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; margin: 4px 0; background: #fff; border: 1px solid var(--border); border-radius: 6px; }
.q-ranking li span { flex: 1; }
.q-ranking button { border: 1px solid var(--border); background: var(--bg); border-radius: 5px; cursor: pointer; padding: 2px 8px; }
.q-cat { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.q-cat label { font-weight: normal; font-size: .87em; color: var(--text-muted); display: block; margin-bottom: 4px; }
@media (max-width: 600px) { .q-cat { grid-template-columns: 1fr; } .q-card { padding: 18px; } }
.q-submit { margin-top: 18px; padding: 11px 26px; font-size: 1em; }
.q-preview-banner { border-radius: 8px; margin-bottom: 12px; }
[dir=rtl] .q-choice input { margin-left: 0; }

/* ================================================================ questionnaire creator */
.status-pill { display: inline-block; font-size: .75em; padding: 1px 9px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); text-transform: capitalize; }
.status-published { background: #E8F3E4; border-color: #C6E0BD; color: #26562B; }
.status-closed { background: #F4E4DF; border-color: #E8C3B8; color: #7A2E1B; }
.lang-pill { display: inline-block; font-size: .72em; padding: 0 6px; margin: 1px 2px 1px 0; border-radius: 4px; background: #E3EFF1; color: #1E5964; text-transform: uppercase; font-weight: 600; }
.lang-pill.draft { background: #FCEFD9; color: #7A5417; }
.qb-head h1 { margin: 0 0 4px; }
.qb-meta { font-size: .88em; color: var(--text-muted); }
.qb-lang { display: inline-flex; align-items: center; gap: 6px; font-size: .88em; color: var(--text-muted); }
.qb-lang select { padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; font: inherit; }
.qb-note { border-radius: 8px; margin-bottom: 12px; }
.qb-layout { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .qb-layout { grid-template-columns: 1fr; } }
.qb-section { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px; }
.qb-section-head { display: flex; align-items: flex-start; gap: 8px; }
.qb-section-title { flex: 1; }
.qb-cond { font-size: .8em; color: #7A5195; }
.qb-handle { cursor: grab; color: var(--text-muted); user-select: none; padding: 0 2px; }
.qb-items { list-style: none; margin: 8px 0 0; padding: 0; }
.qb-item { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 6px; cursor: pointer; background: #FCFCFA; }
.qb-item:hover { border-color: #CFCBBF; }
.qb-item.selected { border-color: var(--green); box-shadow: 0 0 0 2px rgba(62,135,69,.15); background: #fff; }
.qb-item.inactive { opacity: .55; }
.qb-item.dragging { opacity: .4; }
.drag-over { outline: 2px dashed var(--teal); outline-offset: 2px; }
.qb-dropzone { min-height: 8px; border-radius: 6px; }
.qb-dropzone.drag-over { min-height: 30px; }
.qb-type { display: inline-flex; min-width: 30px; height: 24px; padding: 0 4px; align-items: center; justify-content: center; border-radius: 5px; background: #E3EFF1; color: #1E5964; font-size: .75em; font-weight: 700; flex-shrink: 0; }
.qb-item-text { flex: 1; font-size: .92em; }
.qb-badges { display: block; }
.qb-badge { display: inline-block; font-size: .7em; padding: 0 6px; margin: 3px 4px 0 0; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); color: var(--text-muted); }
.qb-badge-cond { border-color: #D8C6E2; color: #7A5195; }
.qb-badge-ll { border-color: #BFE0D6; color: #1D5F52; }
.qb-badge-map { border-color: #C9DDF0; color: #1E4A75; }
.qb-missing { display: inline-block; font-size: .7em; padding: 0 6px; margin-top: 3px; border-radius: 999px; background: #FCEFD9; color: #7A5417; text-transform: uppercase; }
.qb-add { margin-top: 4px; }
.qb-type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; margin-top: 8px; }
.qb-type-grid button { display: flex; align-items: center; gap: 8px; text-align: left; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; background: #fff; cursor: pointer; font: inherit; font-size: .85em; }
.qb-type-grid button:hover { border-color: var(--green); }
.qb-type-grid .qb-bank-btn { grid-column: 1 / -1; justify-content: center; background: var(--bg); }
.qb-editor { position: sticky; top: 12px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; max-height: calc(100vh - 24px); overflow-y: auto; }
.qb-editor-head { display: flex; justify-content: space-between; align-items: center; }
.qb-editor-head h3 { margin: 0 0 10px; }
.qb-editor .field input, .qb-editor .field select, .qb-editor .field textarea { padding: 7px 9px; font-size: .92em; }
.qb-editor-actions { flex-wrap: wrap; margin-top: 14px; }
.qb-ref { font-size: .8em; color: var(--text-muted); margin-top: 3px; padding: 4px 8px; background: var(--bg); border-radius: 5px; }
.qb-options { width: 100%; border-collapse: collapse; }
.qb-options th { font-size: .78em; color: var(--text-muted); text-align: left; font-weight: 600; }
.qb-options td { padding: 2px 3px 2px 0; }
.qb-options input { width: 100%; padding: 5px 7px; border: 1px solid var(--border); border-radius: 5px; font: inherit; font-size: .88em; }
.qb-options input[readonly] { background: var(--bg); color: var(--text-muted); }
.qb-cond-editor { display: flex; flex-wrap: wrap; gap: 6px; }
.qb-cond-editor select, .qb-cond-editor input { flex: 1 1 140px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; font: inherit; font-size: .88em; }
.qb-section-form { margin-top: 10px; }
.qb-modal { position: fixed; inset: 0; background: rgba(38,38,34,.35); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; }
.qb-modal-box { width: 100%; max-width: 720px; max-height: 84vh; overflow-y: auto; margin: 0; }
.qb-bank-search { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; font: inherit; margin-bottom: 8px; }
.qb-bank-item { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 7px 9px; margin-bottom: 4px; border: 1px solid var(--border); border-radius: 6px; background: #fff; cursor: pointer; font: inherit; font-size: .9em; }
.qb-bank-item:hover { border-color: var(--green); }
.qb-settings .card h3 { margin-top: 0; }
.qb-ll { border-top: 1px solid var(--border); padding: 8px 0; }
.qb-ll summary { cursor: pointer; font-size: .9em; word-break: break-all; }
.q-hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* ---- questionnaire: grids, organisation lookup, other / unit fields (migration 11) ---- */
.q-var[hidden] { display: none; }
.q-matrix { display: flex; flex-direction: column; gap: 2px; }
.q-mx-head, .q-mx-row { display: grid; grid-template-columns: minmax(10rem, 2.2fr) repeat(var(--q-cols), minmax(0, 1fr)) 24px; gap: 4px; align-items: center; }
.q-mx-head { font-size: .78em; color: var(--text-muted); text-align: center; position: sticky; top: 0; background: #fff; padding: 4px 0; z-index: 1; }
.q-mx-head span { display: flex; flex-direction: column; align-items: center; line-height: 1.15; }
.q-mx-head b { color: var(--text); }
.q-mx-row { padding: 6px 4px; border-radius: 6px; }
.q-mx-row:nth-child(even) { background: var(--bg); }
.q-mx-label { font-size: .95em; }
.q-mx-cell { display: flex; justify-content: center; cursor: pointer; }
.q-mx-cell input { position: absolute; opacity: 0; }
.q-mx-num { display: inline-flex; min-width: 34px; height: 34px; padding: 0 4px; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 8px; background: #fff; font-size: .9em; text-align: center; }
.q-matrix-choice .q-mx-num { font-size: .75em; line-height: 1.1; width: 100%; height: auto; min-height: 34px; padding: 4px; }
.q-mx-pl { display: none; }
.q-mx-cell input:checked + .q-mx-num { background: var(--green); color: #fff; border-color: var(--green); }
.q-mx-cell input:focus-visible + .q-mx-num { outline: 2px solid var(--teal); }
.q-mx-clear { border: 0; background: none; color: var(--text-muted); cursor: pointer; font-size: 1.1em; padding: 0; }
.q-matrix-choice .q-mx-head { display: none; }
@media (max-width: 700px) {
  .q-mx-head { display: none; }
  .q-mx-row { grid-template-columns: repeat(var(--q-cols), minmax(0, 1fr)); gap: 3px; padding: 8px 4px; }
  .q-mx-label { grid-column: 1 / -2; grid-row: 1; font-weight: 600; }
  .q-mx-clear { grid-column: -2 / -1; grid-row: 1; justify-self: end; align-self: start; }
  .q-matrix-rating .q-mx-num { min-width: 0; width: 100%; height: 32px; }
  .q-matrix-rating .q-mx-row { align-items: start; }
  .q-matrix-rating .q-mx-cell { flex-direction: column; align-items: center; }
  .q-matrix-rating .q-mx-pl { display: block; font-size: .65em; color: var(--text-muted); text-align: center; line-height: 1.1; margin-top: 2px; word-break: break-word; }
  .q-matrix-choice .q-mx-row { grid-template-columns: 1fr 24px; }
  .q-matrix-choice .q-mx-label { grid-column: 1; }
  .q-matrix-choice .q-mx-cell { justify-content: flex-start; grid-column: 1 / -1; }
}
.q-other { margin-top: 6px; }
.q-number { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.q-number input[type=number] { max-width: 140px; }
.q-unit { color: var(--text-muted); }
.q-org { position: relative; }
.q-org-list { position: absolute; z-index: 5; left: 0; right: 0; margin: 2px 0 0; padding: 4px 0; list-style: none; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.08); max-height: 280px; overflow: auto; }
.q-org-list li { padding: 7px 12px; cursor: pointer; }
.q-org-list li.active, .q-org-list li:hover { background: var(--bg); }
.q-org-list li.q-org-new { border-top: 1px solid var(--border); color: var(--text-muted); font-style: italic; }
.q-org.linked input[type=text] { border-color: var(--green); }
.q-org-status { margin-top: 4px; }
.q-org.linked .q-org-status { color: var(--green-dark); }

/* ---- questionnaire results dashboard ---- */
.qd-scope { margin: -4px 0 12px; }
.qd-filters summary { cursor: pointer; }
.qd-filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px 20px; margin-top: 10px; }
.qd-varfilters { grid-column: 1 / -1; }
.qd-varfilter { font-size: .9em; }
.qd-explore { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.qd-itemlist { position: sticky; top: 10px; max-height: calc(100vh - 40px); overflow: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; padding: 6px 0; font-size: .86em; }
.qd-itemlist a { display: block; padding: 4px 12px; color: var(--text); line-height: 1.3; }
.qd-itemlist a:hover { background: var(--bg); text-decoration: none; }
.qd-itemlist a.active { background: #e8f1e9; border-inline-start: 3px solid var(--green); }
.qd-itemlist code { font-size: .85em; color: var(--text-muted); }
.qd-sec { font-weight: 700; color: var(--green-dark); padding: 8px 12px 2px; font-size: .9em; }
.qd-detail { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; min-width: 0; }
.qd-q { font-size: 1.1em; margin: 10px 0; }
.qd-compare { margin-bottom: 6px; }
.qd-svg { width: 100%; height: auto; display: block; margin: 8px 0; font-family: inherit; }
.qd-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .8em; color: var(--text-muted); margin: 6px 0; }
.qd-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-inline-end: 5px; vertical-align: -2px; }
.qd-num td, .qd-num th { font-variant-numeric: tabular-nums; }
.qd-num td { text-align: end; white-space: nowrap; }
.qd-num td.qd-test, .qd-num td.qd-mc-test { text-align: start; white-space: normal; font-size: .9em; }
.qd-bars { display: flex; flex-direction: column; gap: 4px; }
.qd-bar-row { display: grid; grid-template-columns: minmax(120px, 1.2fr) 2fr auto; gap: 8px; align-items: center; font-size: .9em; }
.qd-bar-track { background: var(--bg); border-radius: 4px; height: 14px; overflow: hidden; }
.qd-bar { display: block; height: 100%; background: #2a78d6; border-radius: 4px; }
.qd-bar-val { font-variant-numeric: tabular-nums; white-space: nowrap; }
.qd-texts { max-height: 360px; overflow: auto; padding-inline-start: 18px; }
.qd-texts li { margin: 4px 0; }
.qd-scale-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.qd-sc-items { max-height: 380px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; }
.qd-sc-items fieldset { border: 0; padding: 4px 0; margin: 0 0 6px; display: grid; grid-template-columns: 1fr auto; gap: 0 8px; }
.qd-sc-items legend { font-weight: 600; font-size: .9em; }
.qd-weak { color: var(--danger); font-weight: 600; }
.qd-ex-items { max-height: 420px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; columns: 2 380px; }
.qd-ex-items label { display: block; break-inside: avoid; font-size: .9em; }
.qd-link-actions { min-width: 150px; }
.qd-link-actions .btn { margin: 2px 0; }
.qd-link-form td { background: var(--bg); }
.badge { display: inline-block; font-size: .72em; border-radius: 999px; padding: 1px 8px; font-weight: 600; vertical-align: middle; white-space: nowrap; }
.badge-muted { background: var(--bg); border: 1px solid var(--border); color: var(--text-muted); }
.badge-ok { background: #e3f1e4; color: var(--green-dark); }
@media (max-width: 900px) { .qd-explore { grid-template-columns: 1fr; } .qd-itemlist { position: static; max-height: 260px; } }

.qa-block { border-top: 1px solid var(--border); padding: 8px 0; }
.qa-block summary { cursor: pointer; }
.qa-list { display: grid; grid-template-columns: minmax(180px, 1fr) 1.4fr; gap: 6px 14px; margin: 10px 0; font-size: .9em; }
.qa-list dt { color: var(--text-muted); }
.qa-list dd { margin: 0; }
@media (max-width: 700px) { .qa-list { grid-template-columns: 1fr; } .qa-list dd { margin-bottom: 6px; } }

/* ---- questionnaire creator: pictures + share tab ---- */
.qb-pic-row { display: flex; gap: 10px; align-items: center; }
.qb-pic-thumb { width: 120px; height: 40px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); flex: 0 0 auto; }
.qb-pic-row select { flex: 1; min-width: 0; }
.qb-share-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.qb-share-card { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.qb-share-card.is-closed { opacity: .7; }
.qb-share-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.qb-share-head h3 { margin: 0 0 2px; }
.qb-qr { width: 110px; height: 110px; border: 1px solid var(--border); border-radius: 8px; flex: 0 0 auto; }
.qb-share-url { display: flex; gap: 6px; }
.qb-share-url input { flex: 1; min-width: 0; font-family: ui-monospace, monospace; font-size: .85em; }
.qb-share-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.qb-share-card .hint { margin: 0; word-break: break-all; }
.banner-warn { background: #FFFBF2; border: 1px solid #F0D9A8; color: #7A5417; border-radius: 8px; padding: 10px 14px; margin-bottom: 12px; }

/* ---- Update from the stakeholder table (stakeholder_update.php) ---- */
.badge-warn { background: #FCEFD9; color: #7A5417; }
.badge-new { background: #E1F0F3; color: #1D6B78; }
.badge-err { background: #F6E0DA; color: var(--danger); }
.su-stats { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 4px; }
.su-stat { border: 1px solid var(--border); border-radius: 8px; padding: 8px 14px; min-width: 110px; font-size: .85em; color: var(--text-muted); }
.su-stat-n { font-size: 1.6em; font-weight: 700; color: var(--text); line-height: 1.2; }
.su-stat.warn .su-stat-n { color: #7A5417; }
.su-stat.err .su-stat-n { color: var(--danger); }
.su-table td { vertical-align: top; font-size: .9em; }
.su-table select { max-width: 280px; font-size: .9em; }
.su-table select.su-unresolved { border-color: #D9A441; background: #FFFBF2; }
.su-tab { font-size: .8em; color: var(--text-muted); }
.su-sub { font-size: .85em; color: var(--text-muted); word-break: break-word; }
.su-list { margin: 6px 0 0; padding-left: 16px; font-size: .92em; }
.su-list li { margin-bottom: 2px; }
.su-kept li, .su-kept-n { color: #7A5417; }
.su-unmapped li { color: var(--text-muted); }
.su-table details summary { cursor: pointer; }
.su-commit { position: sticky; bottom: 0; z-index: 5; box-shadow: 0 -2px 10px rgba(0,0,0,.06); }
.table-wrap { overflow-x: auto; }
.su-drop { display: block; border: 2px dashed var(--border); border-radius: 10px; padding: 22px; text-align: center; cursor: pointer; color: var(--text); background: var(--bg); }
.su-drop span { font-size: .85em; color: var(--text-muted); }
.su-drop.over, .su-drop:hover { border-color: var(--green); background: #EEF5EC; }
.su-drop input[type=file] { display: block; margin: 0 auto 10px; }
