.service-page {
  width: min(100% - 2rem, 70rem);
  margin: auto;
  padding-bottom: 5rem;
}

.service-page nav {
  position: sticky;
  top: 14px;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 14px;
  padding: 8px 8px 8px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: light-dark(rgba(255, 244, 236, .72), rgba(20, 9, 30, .62));
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
}

.service-page nav a {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.service-page nav a:last-child {
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--acid);
  color: var(--ink);
  white-space: nowrap;
}

.service-page header {
  padding: clamp(4rem, 10vw, 8rem) 0 1rem;
}

.service-page h1 {
  font-size: clamp(1.75rem, 6.4vw, 4.8rem);
  hyphens: manual;
  line-height: 1.04;
  margin-bottom: 1.5rem;
}

.service-page header p,
.pilot p {
  max-width: 58ch;
  font-size: 1.08rem;
}

.service-page header > a {
  display: inline-flex;
  margin-top: 2rem;
  padding: 14px 24px;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  transition: border-color .2s;
}

.service-page header > a:hover {
  border-color: var(--text);
}

.service-page section {
  margin-top: clamp(4rem, 9vw, 7rem);
}

.service-page h2 {
  font-size: clamp(1.6rem, 3.6vw, 2.8rem);
  margin: 0 0 1rem;
}

.service-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 2rem;
  counter-reset: svc;
}

.service-list div {
  position: relative;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  counter-increment: svc;
  transition: border-color .3s, transform .4s var(--ease);
}

.service-list div:hover {
  border-color: var(--border-2);
  transform: translateY(-4px);
}

.service-list div::before {
  content: counter(svc, decimal-leading-zero);
  display: block;
  margin-bottom: 18px;
  font: 600 .8rem/1 var(--mono);
  color: var(--accent);
}

.service-list dt,
.demo h3 {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.2;
}

.service-list dd {
  margin-top: 10px;
  color: var(--muted);
}

.demo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 2rem;
}

.demo {
  min-width: 0;
  border: 1px solid var(--border-2);
  border-radius: 24px;
  background: light-dark(rgba(255, 255, 255, .82), rgba(24, 12, 34, .78));
  box-shadow: 0 40px 100px -40px rgba(0, 0, 0, .55);
  overflow: hidden;
  scroll-margin-top: 90px;
}

.demo-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font: 500 .78rem/1 var(--mono);
}

.demo-bar i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.demo-bar i:nth-child(1) { background: #ff5f57; }
.demo-bar i:nth-child(2) { background: #febc2e; }
.demo-bar i:nth-child(3) { background: #28c840; }

.demo-bar span {
  margin-left: 10px;
}

.demo-inner {
  padding: clamp(20px, 3vw, 30px);
}

.demo h3 {
  margin-bottom: .65rem;
}

.demo label,
.demo-body {
  display: block;
  margin-top: 1.4rem;
}

.demo label {
  color: var(--text);
  font-weight: 700;
  font-size: .92rem;
}

.demo select {
  display: block;
  margin-top: .5rem;
  width: 100%;
}

.demo select,
.demo button {
  min-height: 48px;
  padding: .7rem 1rem;
  border: 1px solid var(--border-2);
  border-radius: 14px;
  font: inherit;
  background: light-dark(#fff, rgba(0, 0, 0, .25));
  color: var(--text);
}

.demo button {
  cursor: pointer;
  font-weight: 700;
  transition: border-color .2s, background-color .2s, color .2s;
}

.demo button:hover {
  border-color: var(--accent);
}

#parse-brief,
.demo .actions button:first-child {
  border-color: var(--acid);
  background: var(--acid);
  color: var(--ink);
}

.demo blockquote,
.demo .result:not(:empty) {
  margin: 1.2rem 0;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--violet);
  border-radius: 0 14px 14px 0;
  font-family: var(--mono);
  font-size: .9rem;
}

.demo .result:not(:empty) {
  border-left-color: var(--acid);
  animation: result-in .5s var(--ease);
}

@keyframes result-in {
  from { opacity: 0; transform: translateY(8px); }
}

.demo .result dl {
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: .97rem;
}

.demo .result p {
  margin-top: .45rem;
}

.demo .result dt {
  margin-top: .6rem;
  font: 700 .74rem/1.3 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
}

.demo .result dt:first-child {
  margin-top: 0;
}

.demo .result dd {
  color: var(--text);
}

.demo-body > p {
  color: var(--text);
  font-weight: 600;
}

.demo .actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .85rem;
}

.pilot {
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid var(--border-2);
  border-radius: 32px;
  background: radial-gradient(70% 120% at 0% 0%, var(--glow-a), transparent 70%), var(--surface);
}

@media (max-width: 760px) {
  .service-list,
  .demo-grid {
    grid-template-columns: 1fr;
  }

  .service-page nav {
    font-size: .88rem;
  }
}

.select {
  position: relative;
  margin-top: .5rem;
}

.demo .select select {
  margin-top: 0;
}

.select-native {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.demo .select-btn {
  display: block;
  width: 100%;
  padding-right: 48px;
  text-align: left;
  font-weight: 600;
}

.demo .select-btn:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--acid) 22%, transparent);
}

.select.is-enhanced::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 22px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  border-radius: 1px;
  pointer-events: none;
  transform: translateY(-70%) rotate(45deg);
  transition: transform .25s var(--ease), border-color .2s;
}

.select.is-open::after {
  border-color: var(--accent);
  transform: translateY(-25%) rotate(-135deg);
}

.select-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 20;
  display: block;
  padding: 6px;
  border: 1px solid var(--border-2);
  border-radius: 16px;
  background: var(--surface-2);
  box-shadow: 0 24px 50px -16px rgba(0, 0, 0, .5);
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .2s, transform .2s var(--ease), visibility .2s;
}

.select.is-open .select-list {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.select-option {
  padding: 11px 14px;
  border-radius: 10px;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}

.select-option.is-active {
  background: var(--border);
}

.select-option[aria-selected="true"] {
  color: var(--accent);
}

.demo {
  overflow: visible;
}

.demo-bar {
  border-radius: 24px 24px 0 0;
}
