/* Scoped to the supplemental visual and its native modal viewer. */
.freedoms-visual {
  padding: 0 var(--pad) clamp(3rem, 6vw, 5rem);
  background: var(--ink);
  color: var(--paper);
  color-scheme: dark;
}
.freedoms-visual .eyebrow { margin: 0 0 1rem; color: var(--paper); }
.freedoms-visual h2 {
  max-width: 30ch;
  margin: 0;
  font-size: clamp(1.65rem, 3.3vw, 2.75rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.freedoms-visual-intro { margin: 1.25rem 0 2rem; font-size: 1.125rem; }
.freedoms-visual-image {
  display: block;
  width: 100%;
  padding: clamp(0.25rem, 0.7vw, 0.625rem);
  border: 1px solid #b9bec2;
  border-radius: 3px;
  background: #fff;
  cursor: zoom-in;
}
.freedoms-visual-image img { display: block; width: 100%; height: auto; }
/* Mobile model is native text, not a scaled raster. All lengths can reflow. */
.ff-native-model { display:none; }
.freedoms-page #main .ff-native-model {
  min-width:0;
  max-width:100%;
  color:#0B0C0E;
  background:#F8F6F1;
  color-scheme:light;
  border:1px solid #b9bec2;
  border-radius:.5rem;
  font-size:1rem;
  line-height:1.6;
  overflow-wrap:anywhere;
}
.ff-native-model * { box-sizing:border-box; min-width:0; }
.ff-native-model :is(p,h3,h4,h5,ul) { margin:0; padding:0; max-width:none; }
.ff-native-model :is(h3,h4,h5) { color:#0B0C0E; line-height:1.3; letter-spacing:0; }
.ff-native-title { padding:1.25rem 1rem; border-bottom:1px solid #0B0C0E; }
.ff-native-title p:first-child { font-size:1.25rem; line-height:1.35; font-weight:750; }
.ff-native-title p + p { margin-top:.75rem; }
.ff-native-model :is(.ff-native-compact,.ff-native-expanded) { padding:1.25rem 1rem; }
.ff-native-section-heading h3 { font-size:1.25rem; font-weight:750; }
.ff-native-section-heading :is(h4,p) { margin-top:.75rem; font-size:1rem; font-weight:400; }
.ff-native-connections { display:block; width:100%; height:auto; max-width:22rem; margin:1.25rem auto; }
.ff-native-center { border:2px solid #0B0C0E; border-radius:.5rem; padding:1rem; }
.ff-native-center h5 { font-size:1.125rem; font-weight:750; }
.ff-native-center p { margin-top:.75rem; }
.ff-native-emphasis { font-style:italic; }
.ff-native-model :is(.ff-native-compact-list,.ff-native-teaching-list) {
  display:grid; grid-template-columns:minmax(0,1fr); gap:1rem;
  margin-top:1.25rem; list-style:none;
}
.ff-native-model :is(.ff-native-compact-card,.ff-native-teaching-card) {
  padding:1rem; border:1px solid #b9bec2; border-left:5px solid var(--ff-color);
  border-radius:.35rem;
}
.ff-native-label { display:flex; flex-wrap:wrap; gap:.75rem; align-items:center; }
.ff-native-label :is(h4,h5) { font-size:1.25rem; font-weight:750; }
.ff-native-symbol { display:block; width:2.5rem; height:2.5rem; flex:0 0 2.5rem; color:var(--ff-color); }
.ff-native-model :is(.ff-native-compact-card,.ff-native-teaching-card) p { margin-top:1rem; }
.ff-native-compact-close { padding-top:1.25rem; }
.ff-native-compact-close p + p { margin-top:.75rem; }
.ff-native-expanded { border-top:2px solid #0B0C0E; }
.ff-native-focus { padding-top:1rem; border-top:1px solid #b9bec2; }
.ff-native-model .ff-native-governing { list-style:none; display:grid; gap:.75rem; margin-top:1.5rem; }
.ff-native-governing li { border-left:3px solid #0B0C0E; padding:.5rem 0 .5rem .75rem; font-weight:650; }
.ff-native-distinctions { margin-top:1.5rem; padding-top:1.25rem; border-top:1px solid #0B0C0E; }
.ff-native-distinctions h4 { font-size:1.125rem; font-weight:750; }
.ff-native-distinctions ul { list-style:disc; padding-left:1.25rem; margin-top:.75rem; }
.ff-native-distinctions li + li { margin-top:.75rem; }
@media (max-width:1100px) {
  .freedoms-visual-image { display:none; }
  .ff-native-model { display:block; }
}
.freedoms-visual-launch {
  display: block;
  max-width: 100%;
  min-height: 44px;
  margin: 1rem 0 0;
  padding: 0.75rem 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 0.35em;
  cursor: pointer;
}
.freedoms-page #main .freedoms-visual button:focus-visible,
.freedoms-visual-dialog :is(button, .visual-viewer-viewport):focus-visible {
  outline: 3px solid #fff !important;
  outline-offset: 4px;
  box-shadow: 0 0 0 2px #080808;
}
.freedoms-visual-dialog {
  width: calc(100% - 2rem);
  max-width: 1600px;
  height: calc(100% - 2rem);
  height: calc(100dvh - 2rem);
  max-height: calc(100% - 2rem);
  padding: 1.25rem;
  margin: auto;
  border: 1px solid #b9bec2;
  background: #111;
  color: #f3f0e8;
  color-scheme: dark;
  font-family: inherit;
  overflow: auto;
  overscroll-behavior: contain;
}
.freedoms-visual-dialog::backdrop { background: rgb(0 0 0 / 85%); }
.freedoms-visual-dialog[open] {
  display: grid;
  grid-template-rows: auto auto minmax(6rem, 1fr);
  gap: 1rem;
}
.visual-viewer-header { display: flex; align-items: flex-start; gap: 1rem; }
.visual-viewer-header h2 { flex: 1; min-width: 0; margin: 0; font-size: 1rem; line-height: 1.4; }
.visual-viewer-header h2 span { display: block; font-weight: 400; }
.visual-viewer-header .visual-viewer-close { flex: 0 0 auto; }
.freedoms-visual-dialog button {
  min-width: 44px;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border: 1px solid #b9bec2;
  border-radius: 2px;
  background: #111;
  color: #fff;
  font: inherit;
  font-size: 0.9375rem;
  cursor: pointer;
}
.freedoms-visual-dialog button:hover { background: #333; }
.freedoms-visual-dialog button[aria-disabled="true"] { opacity: 0.5; cursor: default; }
.visual-viewer-zoom { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.visual-viewer-zoom output { min-width: 3.5rem; text-align: center; font-variant-numeric: tabular-nums; }
.visual-viewer-tools p { margin: 0.75rem 0 0; max-width: 75ch; font-size: 0.875rem; }
.visual-viewer-viewport {
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #b9bec2;
  background: #fff;
  color-scheme: light;
  scroll-behavior: auto;
}
.visual-viewer-viewport img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  margin: 0 auto;
}
@media (max-width: 480px) {
  .freedoms-visual-dialog { width: calc(100% - 1rem); max-width: none; padding: 0.75rem; }
  .visual-viewer-header { flex-wrap: wrap; gap: 0.5rem; }
  .visual-viewer-header h2 { flex-basis: 100%; }
  .visual-viewer-header .visual-viewer-close { margin-left: auto; }
}
