/* The demo's additions to site.css (web/demo/README.md): the preview bar and the map of the
   United States on the home page. Colours come from site.css's tokens. */

/* Long localized hero chips must not overlap the fixed sun and cloud artwork. */
html:not([lang="en-US"]) .hero-deco {
  display: none;
}

/* Hebrew follows the page direction; keep English exam content and fixed US signs readable. */
html[dir="rtl"] .nav {
  margin-left: 0;
  margin-right: 12px;
}
html[dir="rtl"] .header-end {
  margin-left: 0;
  margin-right: auto;
}
html[dir="rtl"] .lang-list {
  right: auto;
  left: 0;
}
html[dir="rtl"] .skip {
  left: auto;
  right: 12px;
}
html[dir="rtl"] ul,
html[dir="rtl"] ol {
  padding-left: 0;
  padding-right: 24px;
}
html[dir="rtl"] .answer-btn,
html[dir="rtl"] .answer-card,
html[dir="rtl"] .prose th,
html[dir="rtl"] .prose td {
  text-align: right;
}
html[dir="rtl"] .q-stem [lang="en"],
html[dir="rtl"] .a-text[lang="en"],
html[dir="rtl"] .answer-card [lang="en"] {
  direction: ltr;
  unicode-bidi: isolate;
}

.usmap-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
@media (min-width: 960px) {
  .usmap-grid {
    grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
  }
}
.usmap {
  margin: 0;
  align-self: center;
  background: var(--sky);
  border-radius: var(--radius-panel);
  box-shadow: inset 0 0 0 2px var(--sky-line);
  padding: clamp(8px, 2vw, 20px);
}
.usmap svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
}
.usmap .st {
  stroke: none;
}
.usmap .st-off {
  fill: #eef3f7;
}
.usmap .st-soon {
  fill: var(--sand);
}
.usmap .st-live path {
  fill: var(--sun);
  transition: fill 0.15s ease;
}
.usmap .st-live {
  cursor: pointer;
}
.usmap .st-live:hover path,
.usmap .st-live:focus-visible path {
  fill: var(--sun-deep);
}
.usmap .st-live:focus-visible {
  outline: none;
}
.usmap .st-live:focus-visible path {
  stroke: var(--ink);
  stroke-width: 3;
}
.usmap .borders {
  fill: none;
  stroke: #fff;
  stroke-width: 1.2;
  stroke-linejoin: round;
  pointer-events: none;
}
.usmap .pin {
  pointer-events: none;
}
.usmap .pin-live {
  pointer-events: auto;
  cursor: pointer;
}
.usmap a:hover .pin-live rect {
  fill: var(--sun);
}
.usmap .pin rect {
  stroke: var(--ink);
  stroke-width: 3.5;
}
.usmap .pin text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 30px;
  text-anchor: middle;
  fill: var(--ink);
}
.usmap .pin-live rect {
  fill: #fff;
}
.usmap .pin-soon rect {
  fill: #fff;
  stroke: var(--lock-line);
}
.usmap .pin-soon text {
  fill: var(--lock-text);
}
.usmap-key {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 12px;
  font-size: 1rem;
  color: var(--ink);
}
.usmap-key span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.usmap-key .key {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  box-shadow: inset 0 0 0 2px var(--lock-line);
}
.usmap-key .key--live {
  background: var(--sun);
}
.usmap-key .key--soon {
  background: var(--sand);
}
.usmap-key .key--off {
  background: #eef3f7;
}
.usmap-list {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 600px) and (max-width: 959px) {
  .usmap-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* "Sign in" in the header of a build with accounts: after the language, before "Practice". A phone's
   header has no room for it; the menu and the home page's first button carry it there. */
.header-end > .lang {
  order: -1;
}
@media (max-width: 640px) {
  .header-end > .signin {
    display: none;
  }
}

/* NY, CA and TX guides use the same article layout as Florida. */
.guide-card {
  display: grid;
  gap: 12px;
}
.guide-card > .code {
  width: max-content;
  padding: 6px 12px;
  border-radius: 12px;
  background: var(--sun);
  font: 800 30px/1 var(--font-display);
}
.guide-card p {
  margin: 0;
}
.guide-card .btn {
  justify-content: center;
}
.guide-card .sub {
  font-size: 14px;
  line-height: 1.45;
}
.guide-facts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.guide-facts li {
  min-height: 132px;
  padding: 20px;
  border-radius: var(--radius-card);
  background: var(--sky-50);
  box-shadow: inset 0 0 0 2px var(--sky-line);
}
.guide-fact-value {
  font: 800 clamp(30px, 5vw, 50px) / 1.1 var(--font-display);
  color: var(--ink);
}
html[dir="rtl"] .guide-fact-value {
  direction: ltr;
  unicode-bidi: isolate;
}
.guide-other,
.guide-sources {
  margin: 0;
  padding-inline-start: 24px;
}
.guide-other li {
  margin-block: 8px;
}
.guide-sources li {
  overflow-wrap: anywhere;
}
@media (max-width: 600px) {
  .guide-facts {
    grid-template-columns: minmax(0, 1fr);
  }
  .guide-facts li {
    min-height: 0;
  }
}

/* Optional analytics consent. Google Analytics is not loaded until the visitor accepts. */
.analytics-consent {
  position: fixed;
  z-index: 1000;
  left: 50%;
  bottom: 1rem;
  width: min(760px, calc(100% - 2rem));
  transform: translateX(-50%);
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 16px;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
}
.analytics-consent p {
  margin: 0;
  line-height: 1.45;
}
.analytics-consent a {
  text-decoration: underline;
}
.analytics-consent__actions {
  display: flex;
  gap: 0.6rem;
  flex: 0 0 auto;
}
.analytics-consent button,
.analytics-settings {
  font: inherit;
  cursor: pointer;
}
.analytics-consent__accept,
.analytics-consent__reject {
  min-height: 42px;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  border: 1px solid #0f172a;
}
.analytics-consent__accept {
  background: #0f172a;
  color: #fff;
}
.analytics-consent__reject {
  background: #fff;
  color: #0f172a;
}
.analytics-settings {
  position: fixed;
  z-index: 900;
  left: 0.75rem;
  bottom: 0.75rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(15, 23, 42, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #334155;
  font-size: 0.78rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
}
@media (max-width: 680px) {
  .analytics-consent {
    align-items: stretch;
    flex-direction: column;
  }
  .analytics-consent__actions {
    width: 100%;
  }
  .analytics-consent__actions button {
    flex: 1;
  }
}
