@import url("https://fonts.googleapis.com/css2?family=Didact+Gothic&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Libre+Baskerville:ital,wght@0,400..700;1,400..700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Crimson+Pro:ital,wght@0,200..900;1,200..900&display=swap");
:root {
  --font-serif: 'Crimson Pro', serif;
  --font-sans: 'Inter', Arial, sans-serif;
  --font-sans-alt: 'Didact Gothic', sans-serif;
  --black: #2b2e34;
  --white: #FFFFFF;
  --grey: #CCCCCC;
  --dark-grey: #666666;
  --off-white: #fff1e5;
  --accent-dark: #AE643E;
  --green: #019950;
  --yellow: #ffdc2e;
  --red: #f62403;
  --text-primary: var(--black);
  --text-inverse: var(--white);
  --text-secondary: var(--accent-dark);
  --surface-primary: var(--off-white);
  --surface-inverse: var(--black);
  --stroke-primary: var(--black);
  --border-primary: var(--black);
  --border-secondary: var(--grey);
  --lens-border: var(--black);
  --inactive: var(--dark-grey);
  --muted: var(--dark-grey);
  --text-label: var(--dark-grey);
  --success: var(--green);
  --warning: var(--red);
  --middle: var(--yellow);
  --icon_sm: 14px;
  --icon_md: 18px;
  --icon_lg: 22px;
  --border-radius: 12px;
  --sp_sm: 5px;
  --sp_md: 10px;
  --sp_lg: 20px;
  --sp_xl: 40px;
  --sp_xxl: 80px;
}

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

html {
  font-size: 16px;
  color: var(--black);
}

body {
  font-family: var(--font-sans);
  background: var(--surface-primary);
  color: var(--text-primary);
  min-height: 100vh;
  padding: var(--sp_lg);
  line-height: 1.5;
}

a {
  color: var(--text-primary);
  text-decoration: underline;
  font-weight: 500;
}
a:hover {
  text-decoration: none;
  opacity: 0.75;
}

p {
  font-size: 1rem;
  line-height: 1.5;
}

ul li {
  list-style: disc;
  margin: 0 0 0.5rem 1rem;
  line-height: 1.6;
}

.title-icon {
  width: 1em;
  height: 1em;
  vertical-align: middle;
  display: inline-block;
}

.app {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 0 1rem;
  min-height: calc(100vh - 40px - 80px);
}
@media (min-width: 768px) {
  .app {
    padding: 0 var(--sp_lg) 1rem;
    border-left: 1px solid transparent;
    border-right: 1px solid transparent;
    border-bottom: 1px solid transparent;
    border-image: linear-gradient(to bottom, transparent, #E1C0B0 75%) 1;
  }
}

footer {
  padding: var(--sp_xl) 0 var(--sp_lg);
  text-align: center;
  font-size: 0.75rem;
}

.section-label {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-secondary);
  margin-bottom: 1.25rem;
}

.badge-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
}
.badge-row .badge {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--border-secondary);
  background: var(--white);
}

.center_wrapper {
  width: 100%;
  text-align: center;
}

h1, h2, h3 {
  font-family: var(--font-sans);
  font-weight: 500;
  color: var(--text-primary);
}

h1 {
  font-size: 1.5rem;
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.125rem;
}

h3 {
  font-size: 1rem;
}

h4 {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

h2.briefing-section-title {
  letter-spacing: 0.1em;
  color: var(--accent-dark);
}

.masthead {
  padding: 0;
  margin: 0;
  margin-bottom: 0;
  text-align: left;
}
.masthead .masthead-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}
.masthead .masthead-top img.logo {
  width: 150px;
}
.masthead .masthead-top nav {
  position: relative;
}

.logo-text {
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans-alt);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1;
  text-decoration: none;
}

.logo-line1,
.logo-line2 {
  display: block;
}

.masthead-link {
  text-decoration: none;
}

.masthead-actions {
  position: absolute;
  top: 1.1rem;
  right: 0;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.masthead-share {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 0;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}
.masthead-share img {
  width: 20px;
  height: 20px;
}

.masthead-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  padding: 0;
  opacity: 0.6;
  transition: opacity 0.15s;
  display: flex;
  align-items: center;
}
.masthead-close img {
  width: 22px;
  height: 22px;
}
.masthead-close:hover {
  opacity: 1;
}

.masthead-eyebrow {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  align-items: center;
  gap: 1rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 2rem;
  margin-bottom: 0.6rem;
}

.masthead-copy {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0;
  transition: color 0.15s;
}

.masthead h1 {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
  padding-bottom: 0;
  width: 85%;
}

.color-picker {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  position: absolute;
  right: 16px;
  top: 16px;
  z-index: 50;
}
.color-picker.open {
  display: flex;
}

.color-swatch {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  border: 2px solid var(--border-primary);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: transform 0.1s;
}
.color-swatch:hover {
  transform: scale(1.15);
}

.color-picker-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.color-picker-close:hover {
  opacity: 1;
}
.color-picker-close img {
  width: 1.25rem;
  height: 1.25rem;
}

.masthead-hamburger {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 0;
}
.masthead-hamburger svg {
  width: var(--icon_lg);
}

.fullscreen-menu {
  position: fixed;
  inset: 0;
  background: var(--surface-primary);
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.fullscreen-menu[hidden] {
  display: none;
}

.fullscreen-menu-close {
  position: fixed;
  top: 28px;
  right: max(20px, 20px + (100vw - 780px) / 2);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fullscreen-menu-close img {
  width: var(--icon_lg);
}

.fullscreen-menu-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}
.fullscreen-menu-nav a {
  font-size: 1.5rem;
  text-decoration: none;
  transition: opacity 0.15s;
}
.fullscreen-menu-nav a:hover {
  opacity: 0.6;
}
.fullscreen-menu-nav a.menu-link--disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.fullscreen-menu-nav a.menu-link--disabled:hover {
  opacity: 0.35;
}

.lens-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--sp_md);
  border: none;
  border-radius: 0;
  padding: 0;
  margin-bottom: 0;
}
.lens-card[hidden] {
  display: none;
}

.section_description {
  color: var(--text-secondary);
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 500;
}

.lens-card-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--sp_sm);
  padding-bottom: var(--sp_lg);
  border-bottom: 1px dashed var(--border-primary);
}

.lens-card-header {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}
.lens-card-header h2 {
  font-size: inherit;
  font-weight: inherit;
  margin: 0;
}
.lens-card-header[hidden] {
  display: none !important;
}

.lens-card--them {
  margin-top: 0;
}

.lens-card-body {
  display: flex;
  align-items: center;
  gap: var(--sp_md);
  position: relative;
  flex-wrap: wrap;
}
.lens-card-body[hidden] {
  display: none !important;
}

.tab-conversation .lens-card--me .lens-card-wrapper {
  border: 0;
  padding-bottom: 0;
}

.lens-card-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--black);
  padding: 6px var(--sp_md);
  cursor: pointer;
}
.lens-card-pill .lens-card-flag {
  font-size: 0.9rem;
  flex-shrink: 0;
  line-height: 1;
}
.lens-card-pill .lens-card-leaning {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.lens-card-taxonomy-pills {
  display: contents;
}

.lens-card-trailing {
  display: inline-flex;
  align-items: center;
  gap: var(--sp_md);
  flex-shrink: 0;
}

.lens-card-pill--add {
  min-width: 44px;
  min-height: 28px;
  border: 1px dashed var(--black);
  background: none;
  padding: 6px var(--sp_md);
  cursor: pointer;
}
.lens-card-pill--add:hover {
  background: color-mix(in srgb, var(--black) 4%, transparent);
}
.lens-card-pill--add[hidden] {
  display: none !important;
}

body.tab-today #lensAddPill {
  display: none;
}

.lens-tax-pill-x {
  background: none;
  border: none;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  padding: 0;
  margin: 0 -4px 0 0;
}
.lens-tax-pill-x:hover {
  color: var(--text-primary);
}

.lens-card-tax-pill {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  border: 1px solid var(--black);
  padding: 6px var(--sp_md);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lens-settings {
  background: var(--accent-dark-bg);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  padding: var(--sp_sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lens-settings img {
  width: var(--icon_md);
}
.lens-settings--them {
  background: var(--accent-light-bg);
}

.lens-settings-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface-primary);
  border-radius: var(--border-radius);
  padding: 4px;
  z-index: 50;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 4px 8px 3px rgba(0, 0, 0, 0.15);
  margin-top: 4px;
}
.lens-settings-dropdown[hidden] {
  display: none;
}

.lens-dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--sp_md);
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 8px var(--sp_md);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: #1D1B20;
  border-radius: 8px;
}
.lens-dropdown-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

.lens-dropdown-flag {
  font-size: 0.9rem;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.lens-card-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.lens-kebab-btn {
  display: none;
}

.lens-kebab-item[hidden] {
  display: none !important;
}

.timeline-filter {
  position: relative;
  margin-top: -30px;
  padding: 0 0 var(--sp_xl);
}
.timeline-filter #timelineCountryPill {
  background: transparent;
}

.timeline-filter-label {
  font-size: 1.125rem;
  margin: 0 0 var(--sp_md);
}

.timeline-filter-divider {
  border-bottom: 1px dashed var(--border-primary);
}

.timeline-date-range {
  margin: var(--sp_md) 0 0;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 400;
  color: var(--text-primary);
  line-height: normal;
}

.hex-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: var(--sp_lg) 0 var(--sp_xl);
}

.hex-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp_md);
  padding: 11px var(--sp_sm);
  position: relative;
  border: none;
  background: none;
  cursor: pointer;
  overflow: hidden;
  transition: opacity 0.18s ease;
}
.hex-tile:hover, .hex-tile:focus-visible {
  opacity: 0.75;
}

.hex-tile-hex {
  position: relative;
  flex-shrink: 0;
  aspect-ratio: 1/1;
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  background: var(--black);
}
.hex-tile[data-size=large] .hex-tile-hex {
  width: 100px;
  height: 100px;
}
.hex-tile[data-size=medium] .hex-tile-hex {
  width: 75px;
  height: 75px;
}
.hex-tile[data-size=small] .hex-tile-hex {
  width: 50px;
  height: 50px;
}

.hex-tile-img,
.hex-tile-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  filter: grayscale(1) contrast(145%) brightness(1.05);
  clip-path: polygon(26.24% 2%, 73.76% 2%, 97.76% 50%, 73.76% 98%, 26.24% 98%, 2.24% 50%);
}

.hex-tile-placeholder {
  background: var(--accent-dark);
}

.hex-tile-name {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  color: var(--text-primary);
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hex-tile[data-size=small] .hex-tile-name {
  font-size: 0.75rem;
}

.hex-tile-count {
  min-width: 30px;
  height: 30px;
  padding: 6px 4px;
  border-radius: 15px;
  border: 1px solid var(--accent-dark);
  background: #f4dccd;
  color: var(--black);
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  position: absolute;
  top: 5px;
  left: 5px;
  pointer-events: none;
}

.profile-drawer-top {
  display: flex;
  gap: var(--sp_lg);
  align-items: flex-start;
  padding: 0 var(--sp_lg) 0 var(--sp_md);
}

.profile-drawer-headshot {
  position: relative;
  flex-shrink: 0;
  width: 80px;
  height: 80px;
}

.hex-thumb {
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  background: var(--black);
}

.profile-drawer-headshot .hex-thumb,
.personality-headshot .hex-thumb {
  position: absolute;
  top: 5px;
  left: 3px;
  width: 75px;
  height: 75px;
}

.hex-thumb-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(150%) brightness(1.2);
  clip-path: polygon(26.24% 2%, 73.76% 2%, 97.76% 50%, 73.76% 98%, 26.24% 98%, 2.24% 50%);
}

.hex-thumb-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--yellow);
  clip-path: polygon(26.24% 2%, 73.76% 2%, 97.76% 50%, 73.76% 98%, 26.24% 98%, 2.24% 50%);
}

.profile-drawer-headshot-badge {
  min-width: 30px;
  height: 30px;
  padding: 6px 4px;
  border-radius: 15px;
  border: 1px solid var(--accent-dark);
  background: #f4dccd;
  color: var(--black);
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  position: absolute;
  top: 0;
  left: 0;
}

.profile-drawer-bio {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp_md);
  padding-top: var(--sp_md);
}

.profile-drawer-bio-name {
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.333;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-drawer-bio-text {
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-primary);
}

.profile-drawer-bio-text-inner {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.profile-drawer-bio-text-inner.expanded {
  display: block;
  overflow: visible;
}

.profile-drawer-read-more {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--accent-dark);
  line-height: 1.6;
}

.profile-drawer-chart-wrap {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.profile-drawer-chart-heading {
  padding-left: 25px; /* aligns with chart left edge: 20px container padding + 5px chartArea.left */
  margin-bottom: -10px;
}

.profile-drawer-chart {
  box-sizing: border-box;
  width: 100%;
  height: 199px;
  padding: 0 var(--sp_md);
  flex-shrink: 0;
}

.profile-drawer-entries,
.mention-drawer-entries {
  display: flex;
  flex-direction: column;
  gap: var(--sp_lg);
  padding: 0 var(--sp_lg);
}

.mention-entry {
  display: flex;
  flex-direction: column;
  gap: var(--sp_lg);
  padding: var(--sp_lg);
  border: 1px dashed var(--border-primary);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.mention-entry-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp_md);
}

.mention-entry-date {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  flex-shrink: 0;
}

.mention-entry-chips {
  display: flex;
  gap: var(--sp_md);
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mention-entry-body {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--text-primary);
}

.mention-entry-source {
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-primary);
}
.mention-entry-source strong {
  font-weight: 600;
  text-decoration: underline;
}

.sources-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(40, 37, 35, 0.45);
  z-index: 212;
}
.sources-drawer-backdrop.open {
  display: block;
}

.sources-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 740px;
  margin: 0 auto;
  background: var(--surface-primary);
  border-top: 2px solid var(--border-primary);
  z-index: 213;
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
  transform: translateY(100%);
  transition: transform 0.28s ease;
  max-height: 60vh;
  overflow-y: auto;
}
.sources-drawer.open {
  transform: translateY(0);
}

.sources-drawer-close-row {
  display: flex;
  justify-content: flex-end;
  padding: 0 var(--sp_lg) 12px;
  flex-shrink: 0;
}

.sources-drawer-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 1rem;
  height: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.sources-drawer-close:hover {
  opacity: 0.65;
}
.sources-drawer-close img {
  width: 1rem;
  height: 1rem;
}

.sources-drawer-heading {
  padding: 0 var(--sp_lg) 12px;
  margin: 0;
}

.sources-drawer-inner {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 var(--sp_lg) 32px;
}

.sources-entry {
  display: flex;
  flex-direction: column;
  gap: var(--sp_md);
  padding: 14px 0;
  border-bottom: 1px solid var(--border-primary);
}
.sources-entry:last-child {
  border-bottom: none;
}

.sources-entry-outlet {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-label);
}

.sources-entry-title {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-primary);
  text-decoration: underline;
}

.sources-empty {
  font-size: 0.875rem;
  color: var(--muted);
  font-style: italic;
  padding: 8px 0;
}

.chip_small, .profiles-row-chip {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  background: none;
  border: 1px solid var(--border-primary);
  border-radius: 4px;
  padding: 7px 12px;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  line-height: 1;
  transition: opacity 0.15s;
}
.chip_small:hover, .profiles-row-chip:hover {
  opacity: 0.5;
}
.chip_small--positive {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}
.chip_small--negative {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

.save-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 90;
}
.save-drawer-backdrop.open {
  display: block;
}

.save-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface-primary);
  border-radius: 1.25rem 1.25rem 0 0;
  padding: 1rem 1.75rem 2.5rem;
  z-index: 91;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0, 0.67, 0);
  max-width: 600px;
  margin: 0 auto;
}
.save-drawer.open {
  transform: translateY(0);
}

.save-drawer-handle {
  width: 2.5rem;
  height: 4px;
  background: var(--border-secondary);
  border-radius: 2px;
  margin: 0 auto 1.25rem;
}

.save-drawer-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.save-drawer-sub {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.save-drawer-form {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.save-drawer-input {
  flex: 1 1 180px;
  padding: 0.6rem 0.9rem;
  border: 1.5px solid var(--border-secondary);
  font-size: 1rem;
  background: transparent;
  outline: none;
  min-width: 0;
}
.save-drawer-input:focus {
  border-color: var(--border-primary);
}

.save-drawer-btn {
  padding: 0.6rem 1.4rem;
  background: var(--surface-inverse);
  color: var(--surface-primary);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.save-drawer-btn:hover {
  opacity: 0.82;
}
.save-drawer-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.save-drawer-confirm {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.save-drawer-error {
  font-size: 0.85rem;
  color: #8b1a1a;
  margin-bottom: 0.75rem;
}

.save-drawer-skip {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}

.profile-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(40, 37, 35, 0.45);
  z-index: 200;
}
.profile-drawer-backdrop.open {
  display: block;
}

.profile-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 740px;
  margin: 0 auto;
  background: var(--surface-primary);
  border-top: 2px solid var(--border-primary);
  z-index: 201;
  padding-top: 21px;
  display: flex;
  flex-direction: column;
  gap: var(--sp_md);
  transform: translateY(100%);
  transition: transform 0.28s ease;
  max-height: 80vh;
  overflow-y: auto;
}
.profile-drawer.open {
  transform: translateY(0);
}

.profile-drawer-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 1rem;
  height: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.profile-drawer-close:hover {
  opacity: 1;
}
.profile-drawer-close img {
  width: 1rem;
  height: 1rem;
}

.profile-drawer-handle {
  width: 2.5rem;
  height: 4px;
  background: var(--border-secondary);
  border-radius: 2px;
  margin: 0 auto;
}

.profile-drawer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--sp_xl);
  padding-bottom: var(--sp_xl);
}
.profile-drawer-inner h2 {
  margin: 0;
}

.profile-drawer-name-row {
  display: flex;
  align-items: center;
  gap: var(--sp_lg);
}

.profile-drawer-link-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  opacity: 0.85;
  transition: opacity 0.15s;
}
.profile-drawer-link-icon:hover {
  opacity: 1;
}
.profile-drawer-link-icon img {
  width: 20px;
  height: 20px;
  display: block;
}

.profile-drawer-subsection {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.profile-drawer-subsection .profile-drawer-chart-wrap {
  max-width: none;
}

.profile-drawer-section-title {
  color: var(--accent-dark);
  padding: 0 var(--sp_lg);
  margin: 0 0 var(--sp_md) 0 !important;
}

.shim_standing {
  margin: 0 !important;
}

.profile-drawer-loading {
  color: var(--muted);
  font-size: 0.875rem;
  padding: 1rem var(--sp_lg);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: var(--sp_xl);
  flex-wrap: wrap;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border: 1px solid var(--border-primary);
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  line-height: 1;
  transition: background 0.12s;
  background: none;
  cursor: pointer;
  font-family: inherit;
}
.page-btn:hover {
  background: var(--surface-secondary, #f5f3f0);
}
.page-btn--current {
  background: var(--black);
  border-color: var(--black);
  color: var(--white);
  pointer-events: none;
}
.page-btn--disabled {
  opacity: 0.35;
  pointer-events: none;
}

.page-ellipsis {
  font-size: 0.875rem;
  color: var(--muted);
  padding: 0 4px;
  line-height: 36px;
}

.personalities-main {
  max-width: 500px;
  margin: 2rem auto 0;
  padding: 0;
}

.personalities-title {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin: 0 0 var(--sp_xl);
}

.personalities-empty {
  color: var(--muted);
  font-style: italic;
  margin-top: var(--sp_lg);
}

.profiles-filter {
  display: flex;
  flex-direction: column;
  gap: var(--sp_sm);
  padding-bottom: var(--sp_lg);
  border-bottom: 1px dashed var(--border-primary);
  margin-bottom: var(--sp_lg);
}

.profiles-filter-label {
  font-size: 0.75rem;
  font-weight: 600;
}

.profiles-country-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.profiles-country-row[hidden] {
  display: none !important;
}

.profiles-search-row {
  display: flex;
  align-items: center;
  gap: var(--sp_md);
  width: 100%;
}
.profiles-search-row[hidden] {
  display: none !important;
}

.profiles-country-pill-wrap {
  position: relative;
}
.profiles-country-pill-wrap .lens-settings-dropdown {
  width: 200px;
  right: auto;
}

.profiles-icon-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--text-primary);
}

.profiles-search-input {
  flex: 1;
  min-width: 0;
  background: var(--yellow);
  border: none;
  border-radius: 8px;
  padding: var(--sp_sm) var(--sp_md);
  font-size: 0.875rem;
  font-family: var(--font-sans);
  height: 32px;
  outline: none;
  color: var(--text-primary);
}
.profiles-search-input::placeholder {
  color: var(--text-primary);
  opacity: 0.6;
}

.profiles-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp_lg);
  margin-bottom: var(--sp_xl);
}
.profiles-list[hidden] {
  display: none !important;
}

.profiles-row {
  display: flex;
  gap: var(--sp_lg);
  align-items: flex-start;
  text-decoration: none;
  color: var(--text-primary);
}
.profiles-row:hover .profiles-row-name {
  text-decoration: underline;
}

.profiles-row .hex-thumb {
  width: 65px;
  height: 65px;
  flex-shrink: 0;
}

.profiles-row-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp_lg);
  padding-bottom: var(--sp_lg);
  border-bottom: 1px dashed var(--border-primary);
}

.profiles-row-name {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
}

.profiles-row-summary {
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.6;
}

.profiles-row-chip {
  white-space: nowrap;
  cursor: inherit;
}

.personality-main {
  max-width: 720px;
  margin: 2rem auto 0;
  padding: 0 0 var(--sp_xl);
}

.personality-breadcrumb {
  font-size: 0.85rem;
  margin-bottom: var(--sp_lg);
  padding: 0 var(--sp_lg);
}
.personality-breadcrumb a {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  white-space: nowrap;
  color: var(--text-primary);
  text-decoration: none;
}
.personality-breadcrumb a:hover {
  text-decoration: underline;
}

.personality-header {
  display: flex;
  gap: var(--sp_lg);
  align-items: flex-start;
  margin-bottom: var(--sp_lg);
}

.personality-headshot {
  position: relative;
  flex-shrink: 0;
  width: 85px;
  height: 85px;
}

.personality-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 12px;
}

.personality-name {
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  color: var(--text-primary);
}

.personality-wiki-link {
  font-size: 0.8125rem;
  color: var(--accent-dark);
  text-decoration: none;
}
.personality-wiki-link:hover {
  text-decoration: underline;
}

.personality-summary {
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-primary);
  margin: 0 0 var(--sp_xl);
}

.personality-section-heading {
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-primary);
  margin: 0 0 var(--sp_lg);
}

.personality-chart-section {
  margin-bottom: var(--sp_xl);
}

.personality-entries-section {
  margin-bottom: var(--sp_xl);
}

.personality-no-mentions {
  color: var(--muted);
  font-style: italic;
  padding: 0 var(--sp_lg);
}
