:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #171717;
  background: #f5f5f3;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 0;
  margin: 0;
  background: #f5f5f3;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
}

.prompt-page-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 8px 18px;
  border-bottom: 1px solid #dededb;
  background: rgba(250, 250, 248, 0.94);
  backdrop-filter: blur(14px);
}

.prompt-page-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
}

.prompt-page-brand span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #b8d959;
  border-radius: 4px;
  background: #161713;
  color: #c9f06b;
  font-size: 12px;
  font-weight: 800;
}

.prompt-page-brand strong {
  font-size: 15px;
}

.prompt-page-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.language-toggle {
  display: inline-flex;
  padding: 2px;
  border: 1px solid #d8d8d5;
  border-radius: 5px;
  background: #fff;
}

.language-toggle button {
  min-width: 42px;
  min-height: 30px;
  padding: 4px 8px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #6b6b67;
  cursor: pointer;
}

.language-toggle button.is-active {
  background: #20211e;
  color: #fff;
}

.back-link {
  padding: 7px 10px;
  color: #4d4d49;
  font-size: 13px;
  text-decoration: none;
}

.prompt-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(330px, 0.75fr);
  min-height: calc(100vh - 59px);
}

.prompt-page-media {
  display: grid;
  min-width: 0;
  min-height: calc(100vh - 59px);
  padding: 28px;
  place-items: center;
  background: #ebebe8;
}

.prompt-page-media img,
.prompt-page-media video {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 115px);
  border-radius: 4px;
  background: #111;
  object-fit: contain;
  box-shadow: 0 10px 32px rgba(30, 30, 25, 0.08);
}

.prompt-page-media img {
  width: auto;
  height: auto;
}

.prompt-page-media video {
  width: min(100%, 1120px);
}

.prompt-page-content {
  min-width: 0;
  padding: 34px 30px 54px;
  border-left: 1px solid #dededb;
  background: #fff;
}

.prompt-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 14px;
  color: #777771;
  font-size: 12px;
}

.prompt-breadcrumbs a {
  text-decoration: none;
}

.prompt-breadcrumbs a:hover,
.prompt-breadcrumbs a:focus-visible {
  color: #20211e;
  text-decoration: underline;
}

.prompt-kicker {
  margin: 0 0 10px;
  color: #70706b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.14;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.prompt-description {
  margin: 14px 0 0;
  color: #555550;
  font-size: 15px;
  line-height: 1.65;
}

.prompt-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 18px 0;
}

.prompt-facts span {
  padding: 5px 7px;
  border: 1px solid #e2e2df;
  border-radius: 3px;
  background: #f7f7f5;
  color: #5f5f5a;
  font-size: 12px;
}

.prompt-actions,
.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.prompt-actions button,
.source-links a {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid #d7d7d3;
  border-radius: 4px;
  background: #fff;
  color: #30302d;
  cursor: pointer;
  font-size: 13px;
  text-decoration: none;
}

.prompt-actions button:first-child {
  border-color: #20211e;
  background: #20211e;
  color: #fff;
}

.prompt-actions button.is-saved {
  border-color: #a4c84e;
  color: #547415;
}

.source-links {
  margin-top: 9px;
}

.prompt-overview,
.prompt-usage {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e4e4e1;
}

.prompt-overview h2,
.prompt-usage h2 {
  margin: 0 0 10px;
  font-size: 14px;
}

.prompt-overview > p {
  margin: 0;
  color: #4f4f4a;
  font-size: 14px;
  line-height: 1.65;
}

.prompt-data-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 16px 0 0;
  overflow: hidden;
  border: 1px solid #e1e1de;
  border-radius: 4px;
  background: #e1e1de;
}

.prompt-data-grid div {
  min-width: 0;
  padding: 9px 10px;
  background: #fafaf8;
}

.prompt-data-grid dt {
  margin-bottom: 3px;
  color: #777771;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.prompt-data-grid dd {
  margin: 0;
  color: #30302d;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.prompt-usage ul {
  margin: 0;
  padding-left: 20px;
  color: #4f4f4a;
  font-size: 13px;
  line-height: 1.65;
}

.prompt-usage li + li {
  margin-top: 5px;
}

.prompt-usage + .prompt-actions {
  margin-top: 20px;
}

.prompt-block {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid #e4e4e1;
}

.prompt-block[hidden] {
  display: none;
}

.prompt-block h2 {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.3;
}

.prompt-block pre {
  margin: 0;
  color: #2d2d2a;
  font: inherit;
  font-size: 14px;
  line-height: 1.68;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.prompt-toast {
  position: fixed;
  z-index: 20;
  right: 18px;
  bottom: 18px;
  max-width: min(360px, calc(100vw - 36px));
  padding: 10px 13px;
  border-radius: 4px;
  background: #20211e;
  color: #fff;
  font-size: 13px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}

.prompt-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .prompt-page-layout {
    display: block;
  }

  .prompt-page-media {
    min-height: 52vh;
    padding: 14px;
  }

  .prompt-page-media img,
  .prompt-page-media video {
    max-height: 72vh;
  }

  .prompt-page-content {
    padding: 24px 18px 42px;
    border-top: 1px solid #dededb;
    border-left: 0;
  }
}

@media (max-width: 520px) {
  .prompt-page-header {
    padding: 7px 10px;
  }

  .prompt-page-brand strong {
    display: none;
  }

  .back-link {
    padding-inline: 6px;
  }

  .prompt-page-media {
    min-height: 44vh;
    padding: 8px;
  }

  h1 {
    font-size: 25px;
  }

  .prompt-data-grid {
    grid-template-columns: 1fr;
  }
}
