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

body {
  font-family: "Yrsa", serif;
  line-height: 1.6;
  font-size: 18px;
}

* {
  box-sizing: border-box;
}

body {
  background: #1e1e2e;
  color: #f8f8f2;
  font-family: "Yrsa", serif;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.demo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
  padding: 1.25rem 2rem;
}
.demo__stages {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  width: 100%;
  max-width: 1100px;
}
.demo__stage {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.demo__stage-label {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.demo__stage-sublabel {
  font-size: 0.72rem;
  opacity: 0.4;
  font-family: "Courier New", monospace;
  margin-bottom: 0.25rem;
}
.demo__status {
  font-family: "Courier New", monospace;
  font-size: 0.72rem;
  color: #6272a4;
  margin-top: 0.35rem;
  min-height: 1.2em;
  transition: color 0.2s;
}
.demo__status[data-state=loaded] {
  color: #50fa7b;
}
@keyframes pulse {
  0%, 100% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
}
.demo__status[data-state=loading] #foit-icon, .demo__status[data-state=loading] #fout-icon {
  animation: pulse 1.2s ease-in-out infinite;
}
.demo #foit-timer, .demo #fout-timer {
  color: #f1fa8c;
  font-variant-numeric: tabular-nums;
}
.demo__btn {
  padding: 0.6rem 2rem;
  border: none;
  border-radius: 8px;
  font-family: "Yrsa", serif;
  font-size: 0.9rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.1);
  color: #f8f8f2;
  cursor: pointer;
  transition: background 0.2s;
}
.demo__btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.18);
}
.demo__btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.mock-page {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.5);
}

.mock-nav {
  background: #12121f;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.25rem;
  font-size: 0.8rem;
  color: #f8f8f2;
}
.mock-nav__brand {
  font-weight: 700;
  letter-spacing: 0.04em;
}
.mock-nav__links {
  display: flex;
  gap: 1.25rem;
  opacity: 0.55;
  font-size: 0.75rem;
}

.mock-hero {
  background: linear-gradient(135deg, #44005e 0%, #1a0030 100%);
  padding: 1.5rem 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 130px;
}

.mock-tag {
  display: inline-block;
  background: #bd93f9;
  color: #1a0030;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2em 0.7em;
  border-radius: 20px;
  align-self: flex-start;
}

.mock-title {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
}

.mock-byline {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.5);
}

.mock-body {
  padding: 1.1rem 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: #fff;
}

.mock-lead {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.5;
  color: #111;
}

.mock-text {
  font-size: 0.82rem;
  line-height: 1.65;
  color: #444;
}

#foit-page[data-state=idle] .mock-nav__brand,
#foit-page[data-state=idle] .mock-nav__links,
#foit-page[data-state=idle] .mock-tag,
#foit-page[data-state=idle] .mock-title,
#foit-page[data-state=idle] .mock-byline,
#foit-page[data-state=idle] .mock-lead,
#foit-page[data-state=idle] .mock-text,
#foit-page[data-state=loading] .mock-nav__brand,
#foit-page[data-state=loading] .mock-nav__links,
#foit-page[data-state=loading] .mock-tag,
#foit-page[data-state=loading] .mock-title,
#foit-page[data-state=loading] .mock-byline,
#foit-page[data-state=loading] .mock-lead,
#foit-page[data-state=loading] .mock-text {
  opacity: 0;
  transition: none;
}

#foit-page[data-state=loaded] {
  font-family: "Playfair Display", Georgia, serif;
}
#foit-page[data-state=loaded] .mock-title {
  font-style: italic;
  font-size: 1.4rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
#foit-page[data-state=loaded] .mock-lead {
  font-size: 0.95rem;
  line-height: 1.7;
}
#foit-page[data-state=loaded] .mock-text {
  font-size: 0.85rem;
  line-height: 1.8;
}

#fout-page[data-state=idle] .mock-nav__brand,
#fout-page[data-state=idle] .mock-nav__links,
#fout-page[data-state=idle] .mock-tag,
#fout-page[data-state=idle] .mock-title,
#fout-page[data-state=idle] .mock-byline,
#fout-page[data-state=idle] .mock-lead,
#fout-page[data-state=idle] .mock-text {
  opacity: 0;
  transition: none;
}

#fout-page[data-state=loading] {
  font-family: "Comic Sans MS", "Chalkboard SE", cursive;
}
#fout-page[data-state=loading] .mock-title {
  font-size: 1.1rem;
  font-style: normal;
  line-height: 1.3;
  letter-spacing: 0.01em;
}
#fout-page[data-state=loading] .mock-lead {
  font-size: 0.82rem;
  line-height: 1.5;
}
#fout-page[data-state=loading] .mock-text {
  font-size: 0.78rem;
  line-height: 1.55;
}

#fout-page[data-state=loaded] {
  font-family: "Playfair Display", Georgia, serif;
}
#fout-page[data-state=loaded] .mock-title {
  font-style: italic;
  font-size: 1.4rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
#fout-page[data-state=loaded] .mock-lead {
  font-size: 0.95rem;
  line-height: 1.7;
}
#fout-page[data-state=loaded] .mock-text {
  font-size: 0.85rem;
  line-height: 1.8;
}
