@import url("/iv.css?v=20260721s");

/* Shared redesign for State Navigate download and embed tools. */

.sn-resource-page {
  --iv-max: 1320px;
  margin: 0 !important;
  background: var(--iv-page-bg);
  color: var(--iv-ink);
  font-family: var(--iv-font-sans);
  visibility: visible !important;
}

.sn-resource-page h1,
.sn-resource-page h1 * {
  font-family: var(--iv-font-sans) !important;
}

.sn-resource-page * { box-sizing: border-box; }
.sn-resource-page .resource-shell { width: min(calc(100% - 72px), var(--iv-max)); margin: 0 auto; }

.sn-resource-page .resource-main {
  min-height: 70vh;
  padding: 34px 0 clamp(80px, 8vw, 120px);
  background: var(--iv-page-bg);
  color: var(--iv-ink);
}
.sn-resource-page .resource-main:focus { outline: none; }
.sn-resource-page .resource-main a { color: inherit; }
.sn-resource-page .resource-main a:focus-visible,
.sn-resource-page .resource-main button:focus-visible,
.sn-resource-page .resource-main input:focus-visible,
.sn-resource-page .resource-main select:focus-visible,
.sn-resource-page .resource-main summary:focus-visible {
  outline: 3px solid var(--iv-blue);
  outline-offset: 4px;
}

.sn-resource-page .resource-breadcrumb {
  display: flex;
  gap: 9px;
  margin-bottom: clamp(44px, 6vw, 80px);
  color: var(--iv-neutral);
  font-family: var(--iv-font-mono);
  font-size: 11px;
  text-transform: uppercase;
}
.sn-resource-page .resource-breadcrumb a { text-underline-offset: 4px; }

.sn-resource-page .resource-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: clamp(46px, 6vw, 76px);
}
.sn-resource-page .resource-hero h1 {
  margin: 0 0 14px;
  color: var(--iv-ink);
  font-family: var(--iv-font-sans);
  font-size: clamp(45.9px, 5.1vw, 70px);
  font-weight: 650;
  letter-spacing: -0.06em;
  line-height: 0.92;
}
.sn-resource-page .resource-hero p {
  max-width: 750px;
  margin: 0;
  color: var(--iv-neutral);
  font-family: var(--iv-font-mono);
  font-size: clamp(14px, 1.45vw, 18px);
  line-height: 1.55;
}
.sn-resource-page .resource-doc-link {
  flex: 0 0 auto;
  padding-bottom: 7px;
  border-bottom: 1px solid currentColor;
  color: var(--iv-accent-text) !important;
  font-family: var(--iv-font-mono);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.sn-resource-page .catalog-controls {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) auto minmax(180px, auto);
  gap: 18px;
  align-items: end;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--iv-ink);
}
.sn-resource-page .catalog-search > span,
.sn-resource-page .catalog-view-switch legend {
  display: block;
  margin-bottom: 9px;
  font-family: var(--iv-font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.sn-resource-page .catalog-search input {
  width: 100%;
  height: 52px;
  padding: 0 17px;
  border: 2px solid var(--iv-ink);
  border-radius: 4px;
  background: transparent;
  color: var(--iv-ink);
  font-family: var(--iv-font-mono);
  font-size: 14px;
}
.sn-resource-page .catalog-view-switch { display: flex; margin: 0; padding: 0; border: 0; }
.sn-resource-page .catalog-view-switch legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.sn-resource-page .catalog-view-switch label { cursor: pointer; }
.sn-resource-page .catalog-view-switch input { position: absolute; opacity: 0; }
.sn-resource-page .catalog-view-switch span {
  display: grid;
  place-items: center;
  min-width: 112px;
  height: 52px;
  border: 1px solid var(--iv-ink);
  color: var(--iv-ink);
  font-family: var(--iv-font-mono);
  font-size: 13px;
  font-weight: 700;
}
.sn-resource-page .catalog-view-switch label:first-of-type span { border-radius: 4px 0 0 4px; }
.sn-resource-page .catalog-view-switch label:last-of-type span { margin-left: -1px; border-radius: 0 4px 4px 0; }
.sn-resource-page .catalog-view-switch input:checked + span { position: relative; z-index: 1; border: 2px solid var(--iv-orange); color: var(--iv-accent-text); }
.sn-resource-page .catalog-view-switch input:focus-visible + span { outline: 3px solid var(--iv-blue); outline-offset: 4px; }
.sn-resource-page .catalog-summary { margin: 0 0 14px; color: var(--iv-neutral); font-family: var(--iv-font-mono); font-size: 12px; text-align: right; }

.sn-resource-page .catalog-list { border-bottom: 2px solid var(--iv-ink); }
.sn-resource-page .catalog-group { border-bottom: 1px solid var(--iv-rule); }
.sn-resource-page .catalog-group:last-child { border-bottom: 0; }
.sn-resource-page .catalog-group summary {
  display: grid;
  grid-template-columns: 28px 50px minmax(150px, 0.55fr) 1.45fr 60px;
  gap: 18px;
  align-items: center;
  min-height: 62px;
  padding: 10px 6px;
  color: var(--iv-ink);
  cursor: pointer;
  list-style: none;
}
.sn-resource-page .catalog-group summary::-webkit-details-marker { display: none; }
.sn-resource-page .catalog-group summary::before { content: "+"; color: var(--iv-accent-text); font-family: var(--iv-font-mono); font-size: 20px; font-weight: 800; }
.sn-resource-page .catalog-group[open] summary::before { content: "−"; }
.sn-resource-page .catalog-group-code { font-family: var(--iv-font-mono); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.sn-resource-page .catalog-group-title { font-family: var(--iv-font-sans); font-size: 21px; font-weight: 650; }
.sn-resource-page .catalog-group-description { color: var(--iv-neutral); font-size: 13px; line-height: 1.4; white-space: normal; }
.sn-resource-page .catalog-group-count { color: var(--iv-neutral); font-family: var(--iv-font-mono); font-size: 11px; text-align: right; }
.sn-resource-page .catalog-group[open] { border: 2px solid var(--iv-orange); }
.sn-resource-page .catalog-group[open] summary { padding-inline: 14px; border-bottom: 1px solid var(--iv-rule); }
.sn-resource-page .catalog-files { padding: 0 16px 14px; }
.sn-resource-page .catalog-file-head,
.sn-resource-page .catalog-file {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) minmax(150px, 0.8fr) 80px 90px;
  gap: 18px;
  align-items: center;
}
.sn-resource-page .catalog-file-head { min-height: 38px; color: var(--iv-neutral); font-family: var(--iv-font-mono); font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.sn-resource-page .catalog-file {
  min-height: 54px;
  border-top: 1px solid var(--iv-rule);
  color: var(--iv-ink);
  text-decoration: none;
}
.sn-resource-page .catalog-file:hover .catalog-file-title { color: var(--iv-accent-text); text-decoration: underline; text-underline-offset: 4px; }
.sn-resource-page .catalog-file-title { font-family: var(--iv-font-mono); font-size: 12px; font-weight: 700; }
.sn-resource-page .catalog-file-chamber { color: var(--iv-neutral); font-size: 13px; }
.sn-resource-page .catalog-file-format { font-family: var(--iv-font-mono); font-size: 11px; font-weight: 800; }
.sn-resource-page .catalog-file-download { color: var(--iv-blue); font-family: var(--iv-font-mono); font-size: 12px; font-weight: 800; text-align: right; }

.sn-resource-page .resource-loading,
.sn-resource-page .resource-error,
.sn-resource-page .catalog-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 150px;
  color: var(--iv-neutral);
  font-family: var(--iv-font-mono);
  font-size: 13px;
  text-align: center;
}
.sn-resource-page .resource-loading > span { width: 13px; height: 13px; border: 2px solid var(--iv-rule); border-top-color: var(--iv-orange); border-radius: 50%; animation: resource-spin 800ms linear infinite; }
.sn-resource-page .resource-error { color: var(--iv-red); }
@keyframes resource-spin { to { transform: rotate(360deg); } }

.sn-resource-page .resource-help,
.sn-resource-page .embed-note {
  display: flex;
  gap: 24px;
  align-items: baseline;
  margin-top: 38px;
  padding: 26px 0;
  border-top: 1px solid var(--iv-rule);
  border-bottom: 1px solid var(--iv-rule);
}
.sn-resource-page .resource-help strong,
.sn-resource-page .embed-note strong { flex: 0 0 auto; color: var(--iv-accent-text); font-family: var(--iv-font-mono); font-size: 13px; }
.sn-resource-page .resource-help p,
.sn-resource-page .embed-note p { margin: 0; color: var(--iv-neutral); font-size: 14px; }
.sn-resource-page .resource-help a { text-underline-offset: 4px; }

/* Embed builder */
.sn-resource-page .embed-builder {
  display: grid;
  grid-template-columns: minmax(440px, 0.9fr) minmax(500px, 1.1fr);
  border-top: 2px solid var(--iv-ink);
  border-bottom: 2px solid var(--iv-ink);
}
.sn-resource-page .embed-controls-column { min-width: 0; padding: 30px clamp(30px, 4vw, 58px) 34px 0; border-right: 1px solid var(--iv-ink); }
.sn-resource-page .embed-preview-column { min-width: 0; padding: 30px 0 34px clamp(30px, 4vw, 58px); }
.sn-resource-page .embed-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 0 0 34px; padding: 0; list-style: none; }
.sn-resource-page .embed-steps li { display: flex; align-items: center; gap: 10px; font-family: var(--iv-font-mono); font-size: 13px; font-weight: 800; }
.sn-resource-page .embed-steps li::after { content: ""; flex: 1; height: 1px; background: var(--iv-rule); }
.sn-resource-page .embed-steps li:last-child::after { display: none; }
.sn-resource-page .embed-steps b { color: var(--iv-accent-text); }
.sn-resource-page .embed-form { display: grid; grid-template-columns: minmax(170px, 1fr) minmax(190px, 1fr) 110px; gap: 18px; align-items: end; }
.sn-resource-page .embed-form > label,
.sn-resource-page .embed-form fieldset { margin: 0; padding: 0; border: 0; font-family: var(--iv-font-mono); font-size: 11px; font-weight: 800; }
.sn-resource-page .embed-form > label { display: grid; gap: 9px; }
.sn-resource-page .embed-form select,
.sn-resource-page .embed-form input[type="text"] { width: 100%; height: 48px; padding: 0 12px; border: 2px solid var(--iv-ink); border-radius: 4px; background: transparent; color: var(--iv-ink); font-family: var(--iv-font-mono); font-size: 14px;margin:0px }
.sn-resource-page .embed-form fieldset { display: grid; grid-template-columns: 1fr 1fr; }
.sn-resource-page .embed-form legend { margin-bottom: 9px; }
.sn-resource-page .embed-form fieldset input { position: absolute; opacity: 0; }
.sn-resource-page .embed-form fieldset span { display: grid; place-items: center; height: 48px; border: 1px solid var(--iv-ink); cursor: pointer; }
.sn-resource-page .embed-form fieldset label:first-of-type span { border-radius: 4px 0 0 4px; }
.sn-resource-page .embed-form fieldset label:last-of-type span { margin-left: -1px; border-radius: 0 4px 4px 0; }
.sn-resource-page .embed-form fieldset input:checked + span { position: relative; z-index: 1; border: 2px solid var(--iv-orange); background: var(--iv-orange); color: var(--iv-dark); }
.sn-resource-page .embed-form fieldset input:focus-visible + span { outline: 3px solid var(--iv-blue); outline-offset: 4px; }
.sn-resource-page .embed-availability { display: flex; align-items: center; gap: 10px; min-height: 25px; margin: 24px 0 26px; color: var(--iv-neutral); font-family: var(--iv-font-mono); font-size: 12px; }
.sn-resource-page .embed-availability span { width: 11px; height: 11px; border-radius: 50%; background: var(--iv-neutral); }
.sn-resource-page .embed-availability.is-available span { background: var(--iv-green); }
.sn-resource-page .embed-availability.is-unavailable { color: var(--iv-red); }
.sn-resource-page .embed-availability.is-unavailable span { background: var(--iv-red); }
.sn-resource-page .embed-availability.is-checking span { animation: resource-pulse 900ms ease-in-out infinite alternate; }
@keyframes resource-pulse { to { opacity: 0.25; } }
.sn-resource-page .embed-code-heading,
.sn-resource-page .embed-preview-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.sn-resource-page .embed-code-heading h3,
.sn-resource-page .embed-preview-heading h3 { margin: 0; color: var(--iv-ink); font-family: var(--iv-font-mono); font-size: 12px; }
.sn-resource-page #copy-embed-code,
.sn-resource-page #refresh-embed { padding: 0; border: 0; background: transparent; color: var(--iv-blue); font-family: var(--iv-font-mono); font-size: 11px; font-weight: 800; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.sn-resource-page #copy-embed-code { display: inline-flex; align-items: center; min-height: 42px; padding-inline: 8px; }
.sn-resource-page .embed-code { min-height: 210px; margin: 0; padding: 18px; overflow: auto; border-radius: 4px; background: var(--iv-dark); color: var(--iv-light); font-family: var(--iv-font-mono); font-size: 11px; line-height: 1.55; white-space: pre-wrap; }
.sn-resource-page .embed-code code { display: block; color: var(--iv-light); font: inherit; white-space: inherit; }
.sn-resource-page .embed-actions { display: flex; align-items: center; gap: 28px; margin-top: 14px; }
.sn-resource-page .embed-actions button { min-height: 48px; padding: 0 18px; border: 0; border-radius: 4px; background: var(--iv-orange); color: var(--iv-dark); font-family: var(--iv-font-mono); font-size: 12px; font-weight: 800; cursor: pointer; }
.sn-resource-page .embed-actions a { color: var(--iv-blue); font-family: var(--iv-font-mono); font-size: 12px; font-weight: 800; text-decoration: none; }
.sn-resource-page .embed-preview { min-height: 680px; overflow: hidden; border: 2px solid var(--iv-ink); border-radius: 5px; background: var(--iv-panel); }
.sn-resource-page .embed-preview iframe { display: block; width: 100%; height: 680px; border: 0; background: var(--iv-panel); }
.sn-resource-page .available-embeds { display: grid; grid-template-columns: minmax(220px, 0.35fr) 1.65fr; gap: 46px; padding: 34px 0; border-bottom: 1px solid var(--iv-rule); }
.sn-resource-page .available-embeds h2 { margin: 0 0 7px; color: var(--iv-ink); font-family: var(--iv-font-sans); font-size: 23.8px; letter-spacing: -0.03em; }
.sn-resource-page .available-embeds p { margin: 0; color: var(--iv-neutral); font-size: 13px; line-height: 1.45; }
.sn-resource-page .embed-state-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 22px; }
.sn-resource-page .embed-state-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 42px; border-bottom: 1px solid var(--iv-rule); }
.sn-resource-page .embed-state-item button { align-self: stretch; display: flex; flex: 1; align-items: center; min-height: 42px; padding: 0; border: 0; background: transparent; color: var(--iv-ink); font-family: var(--iv-font-mono); font-size: 12px; font-weight: 750; text-align: left; cursor: pointer; }
.sn-resource-page .embed-state-item button:hover { color: var(--iv-accent-text); }
.sn-resource-page .embed-state-item a { display: inline-flex; align-items: center; min-height: 42px; color: var(--iv-blue); font-family: var(--iv-font-mono); font-size: 11px; font-weight: 800; text-decoration: none; }

@media (max-width: 1000px) {
  .sn-resource-page .resource-shell { width: min(calc(100% - 40px), var(--iv-max)); }
  .sn-resource-page .catalog-controls { grid-template-columns: 1fr auto; }
  .sn-resource-page .catalog-summary { grid-column: 1 / -1; text-align: left; }
  .sn-resource-page .embed-builder { grid-template-columns: 1fr; }
  .sn-resource-page .embed-controls-column { padding-right: 0; border-right: 0; border-bottom: 1px solid var(--iv-ink); }
  .sn-resource-page .embed-preview-column { padding-left: 0; }
  .sn-resource-page .available-embeds { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .sn-resource-page .resource-shell { width: min(calc(100% - 30px), var(--iv-max)); }
  .sn-resource-page .resource-main { padding-top: 24px; }
  .sn-resource-page .resource-breadcrumb { margin-bottom: 42px; }
  .sn-resource-page .resource-hero { align-items: flex-start; flex-direction: column; gap: 24px; }
  .sn-resource-page .resource-hero h1 { font-size: clamp(40.8px, 12.75vw, 57px); }
  .sn-resource-page .resource-hero p { font-size: 13px; }
  .sn-resource-page .catalog-controls { grid-template-columns: 1fr; }
  .sn-resource-page .catalog-view-switch span { min-width: 50%; }
  .sn-resource-page .catalog-view-switch label { flex: 1; }
  .sn-resource-page .catalog-group summary { grid-template-columns: 28px 1fr auto; gap: 10px; }
  .sn-resource-page .catalog-group-code { display: none; }
  .sn-resource-page .catalog-group-description { grid-column: 2 / -1; white-space: normal; }
  .sn-resource-page .catalog-file-head { display: none; }
  .sn-resource-page .catalog-file { grid-template-columns: 1fr auto; gap: 6px 14px; padding: 12px 0; }
  .sn-resource-page .catalog-file-chamber { grid-column: 1; }
  .sn-resource-page .catalog-file-format { grid-column: 2; grid-row: 1; }
  .sn-resource-page .catalog-file-download { grid-column: 2; grid-row: 2; }
  .sn-resource-page .resource-help,
  .sn-resource-page .embed-note { align-items: flex-start; flex-direction: column; }
  .sn-resource-page .embed-form { grid-template-columns: 1fr; }
  .sn-resource-page .embed-form > label,
  .sn-resource-page .embed-form fieldset,
  .sn-resource-page .embed-form select,
  .sn-resource-page .embed-form input[type="text"] { min-width: 0; max-width: 100%; }
  .sn-resource-page .embed-steps { gap: 8px; }
  .sn-resource-page .embed-steps li { font-size: 11px; }
  .sn-resource-page .embed-code-heading { align-items: flex-start; }
  .sn-resource-page .embed-preview { min-height: 560px; }
  .sn-resource-page .embed-preview iframe { height: 560px; }
  .sn-resource-page .embed-state-list { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .sn-resource-page *, .sn-resource-page *::before, .sn-resource-page *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
