html {
  background: #fffef8;
}

body {
  margin: 0;
  padding: 0;
  background: #fffef8;
  color: #101010;
  font-family: monospace;
  font-size: 16px;
  line-height: 1.6;
}

* {
  box-sizing: border-box;
}

a {
  color: #0645ad;
  text-decoration: underline;
}

a:hover,
a:focus {
  background: #ebe7da;
}

p {
  margin: 0 0 24px;
}

h1,
h2,
h3 {
  letter-spacing: 0;
}

h1 {
  margin: 0 0 14px;
  font-size: 46px;
  line-height: 1.04;
}

h2 {
  margin: 0 0 16px;
  font-size: 24px;
  line-height: 1.2;
}

code,
pre {
  font-family: monospace;
}

code {
  background: #ebe7da;
  padding: 2px 5px;
}

pre {
  max-width: 100%;
  overflow-x: auto;
  margin: 18px 0 0;
  padding: 14px;
  border: 1px solid #101010;
  background: #f4f1e8;
}

pre code {
  padding: 0;
  background: transparent;
}

input[type="text"] {
  width: 100%;
  min-width: 0;
  margin: 0 0 14px;
  padding: 12px 10px;
  border: 1px solid #101010;
  border-radius: 0;
  background: #fffef8;
  color: #101010;
  font: inherit;
}

.send-button,
.suggestion-button {
  min-height: 44px;
  padding: 12px 16px;
  border: 1px solid #101010;
  border-radius: 0;
  background: #fffef8;
  color: #101010;
  cursor: pointer;
  font: inherit;
}

.send-button:hover,
.send-button:focus,
.send-button:active,
.suggestion-button:hover,
.suggestion-button:focus,
.suggestion-button:active {
  background: #101010;
  color: #fffef8;
}

.visually-hidden {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Explicit URL themes apply to chat pages. The static pages remain light. */
[data-theme="dark"] {
  background: #141414;
  color: #eeeeea;
}

[data-theme="dark"] a {
  color: #92b7ff;
}

[data-theme="dark"] a:hover,
[data-theme="dark"] a:focus {
  background: #2b2b27;
}

[data-theme="dark"] input[type="text"] {
  border-color: #eeeeea;
  background: #141414;
  color: #eeeeea;
}

[data-theme="dark"] .send-button {
  border-color: #eeeeea;
  background: #141414;
  color: #eeeeea;
}

[data-theme="dark"] .send-button:hover,
[data-theme="dark"] .send-button:focus,
[data-theme="dark"] .send-button:active {
  background: #eeeeea;
  color: #141414;
}

[data-theme="dark"] code,
[data-theme="dark"] pre {
  background: #2b2b27;
}

[data-theme="dark"] pre {
  border-color: #eeeeea;
}

/* Public pages */
.site-main {
  max-width: 1080px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px;
}

.site-nav {
  padding-bottom: 24px;
  border-bottom: 2px solid #101010;
}

.site-nav:after {
  content: "";
  display: block;
  clear: both;
}

.site-wordmark,
.site-nav-link {
  text-decoration: none;
}

.site-wordmark {
  float: left;
  color: #101010;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.15;
}

.site-nav-link {
  float: right;
  padding-top: 11px;
  color: #101010;
}

.site-nav-link.active,
.eyebrow {
  color: #0f6b52;
}

.hero,
.doc-hero {
  padding: 52px 0 34px;
  border-bottom: 1px solid #101010;
}

.eyebrow {
  margin-bottom: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

.hero-copy {
  max-width: 720px;
  color: #5a5a52;
  font-size: 19px;
}

.hero-form {
  max-width: 760px;
  margin-top: 32px;
}

.hero-form input[type="text"] {
  display: inline-block;
  width: 74%;
  margin: 0 8px 0 0;
  vertical-align: top;
}

.hero-form .send-button {
  display: inline-block;
  width: 22%;
  vertical-align: top;
}

.home-note {
  margin: 16px 0 0;
  color: #5a5a52;
}

.model-note {
  margin: 6px 0 0;
  color: #5a5a52;
  font-size: 13px;
}

[data-theme="dark"] .model-note {
  color: #c7c7c1;
}

.doc-byline {
  margin: 18px 0 0;
  color: #5a5a52;
  font-size: 14px;
}

.suggestions-container,
.document-section {
  padding: 34px 0;
  border-bottom: 1px solid #101010;
}

.suggestions-list form {
  display: inline-block;
  width: 48%;
  margin: 0 1% 10px 0;
  vertical-align: top;
}

.suggestion-button {
  width: 100%;
  min-height: 76px;
  padding: 10px 12px;
  background: #f4f1e8;
  text-align: left;
}

.document-article {
  max-width: 980px;
}

.flow-panel {
  background: #e6f2ed;
}

.flow-list {
  margin: 0;
  padding-left: 24px;
  border-top: 1px solid #101010;
}

.flow-list li {
  padding: 16px 0;
  border-bottom: 1px solid #101010;
}

.flow-list strong,
.flow-list span {
  display: block;
}

.flow-list span {
  color: #5a5a52;
}

.decision-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid #101010;
}

.decision-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: #fffef8;
}

.decision-table th,
.decision-table td {
  padding: 12px;
  border: 1px solid #101010;
  text-align: left;
  vertical-align: top;
}

.decision-table th {
  background: #f4f1e8;
}

.notes-grid > div {
  display: inline-block;
  width: 48%;
  margin-right: 1%;
  vertical-align: top;
}

/* Chat pages */
.chat-main {
  max-width: 800px;
  min-height: 100vh;
  margin: 0;
  padding: 20px;
  position: relative;
}

.chat-main h1 {
  margin-bottom: 10px;
  padding-right: 200px;
  font-size: 36px;
  line-height: 1.15;
}

.chat-main h1 a {
  color: #0645ad;
}

.logo-link {
  color: inherit !important;
  border-bottom: 0 !important;
  text-decoration: none !important;
}

.logo-link:hover,
.logo-link:focus {
  background: transparent !important;
  text-decoration: none !important;
}

.header-controls {
  position: absolute;
  top: 20px;
  right: 20px;
}

.new-chat-link {
  display: inline-block;
  min-height: 34px;
  margin-left: 8px;
  border: 1px solid #101010;
  background: #fffef8;
  color: #101010;
  text-align: center;
  text-decoration: none;
  padding: 5px 10px;
  font-size: 14px;
}

.new-chat-link:hover {
  background: #101010;
  color: #fffef8;
}

.chat-main form {
  margin-top: 20px;
}

.chat-container {
  width: 100%;
  margin-bottom: 18px;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.chat-container > div {
  margin: 0;
  line-height: 1.6;
}

.message-row {
  width: 100%;
}

.message-row:after {
  content: "";
  display: block;
  clear: both;
}

.message-label {
  display: block;
  float: left;
  width: 44px;
  min-height: 28px;
  padding: 0 3px;
  border: 1px solid transparent;
  color: #5a5a52;
  font-weight: 700;
  line-height: 1.6;
  text-align: center;
}

.message-content {
  display: block;
  margin-left: 60px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.chat-user {
  text-align: right;
}

.chat-user .message-row {
  display: inline-block;
  max-width: 80%;
  margin-left: 20%;
  padding: 10px 12px;
  border-right: 3px solid #0f6b52;
  background: #f4f1e8;
  text-align: left;
}

.chat-user .message-label {
  border-color: #0f6b52;
  background: #fffef8;
  color: #0f6b52;
}

.chat-user .message-content {
  max-width: none;
}

.user-content {
  padding-top: 1px;
}

.chat-assistant .message-row {
  padding: 2px 0 0;
}

.chat-assistant .message-content {
  max-width: none;
}

.perf-report {
  margin: 20px 0;
  padding: 12px;
  border: 1px solid #101010;
  background: #f4f1e8;
}

.perf-report summary {
  cursor: pointer;
  font-weight: 700;
}

.perf-report ul {
  margin-bottom: 0;
}

[data-theme="dark"] .chat-main h1 a {
  color: #92b7ff;
}

[data-theme="dark"] .new-chat-link {
  border-color: #eeeeea;
  background: #141414;
  color: #eeeeea;
}

[data-theme="dark"] .new-chat-link:hover {
  background: #eeeeea;
  color: #141414;
}

[data-theme="dark"] .message-label {
  color: #b8b7ad;
}

[data-theme="dark"] .chat-user .message-row,
[data-theme="dark"] .perf-report {
  background: #20201d;
}

[data-theme="dark"] .chat-user .message-row {
  border-color: #72d6b2;
}

[data-theme="dark"] .chat-user .message-label {
  border-color: #72d6b2;
  background: #141414;
  color: #72d6b2;
}

[data-theme="dark"] .perf-report {
  border-color: #eeeeea;
}

/* AI-generated Markdown content */
.chat-container h1,
.chat-container h2,
.chat-container h3,
.chat-container h4,
.chat-container h5,
.chat-container h6 {
  margin: 20px 0 10px;
  color: #101010;
  line-height: 1.2;
}

.chat-container h3 {
  font-size: 1.4em;
  font-weight: bold;
}

.chat-container h4 {
  font-size: 1.2em;
  font-weight: bold;
}

.chat-container h5 {
  font-size: 1.1em;
  font-weight: bold;
}

.chat-container h6 {
  font-size: 1em;
  font-weight: bold;
}

.chat-container p {
  margin: 15px 0;
}

.chat-container ul,
.chat-container ol {
  margin: 15px 0;
  padding-left: 30px;
}

.chat-container li {
  margin: 5px 0;
  line-height: 1.5;
}

.chat-container code {
  border-radius: 0;
  background: #ebe7da;
  font-size: 0.9em;
}

.chat-container pre {
  margin: 15px 0;
  padding: 15px;
  border: 1px solid #101010;
  background: #ebe7da;
}

.chat-container pre code {
  padding: 0;
  background: transparent;
}

.chat-container blockquote {
  margin: 15px 0;
  padding: 10px 0 10px 20px;
  border-left: 4px solid #101010;
  background: #ebe7da;
  font-style: italic;
}

.chat-container strong,
.chat-container b {
  font-weight: bold;
}

.chat-container em,
.chat-container i {
  font-style: italic;
}

.chat-container a {
  color: #0645ad;
  text-decoration: underline;
}

.chat-container hr {
  margin: 20px 0;
  border: 0;
  border-top: 1px solid #101010;
}

.assistant-content > :first-child {
  margin-top: 0;
}

.assistant-content > :last-child {
  margin-bottom: 0;
}

[data-theme="dark"] .chat-container h1,
[data-theme="dark"] .chat-container h2,
[data-theme="dark"] .chat-container h3,
[data-theme="dark"] .chat-container h4,
[data-theme="dark"] .chat-container h5,
[data-theme="dark"] .chat-container h6 {
  color: #eeeeea;
}

[data-theme="dark"] .chat-container code,
[data-theme="dark"] .chat-container pre,
[data-theme="dark"] .chat-container blockquote {
  background: #2b2b27;
}

[data-theme="dark"] .chat-container pre,
[data-theme="dark"] .chat-container blockquote,
[data-theme="dark"] .chat-container hr {
  border-color: #eeeeea;
}

[data-theme="dark"] .chat-container a {
  color: #92b7ff;
}

@media (max-width: 1100px) {
  body {
    font-size: 20px;
    line-height: 1.55;
  }

  h1 {
    font-size: 44px;
  }

  h2 {
    font-size: 28px;
  }

  input[type="text"],
  .send-button,
  .suggestion-button {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .hero-copy {
    font-size: 22px;
  }

  .suggestion-button {
    min-height: 92px;
  }

  .message-label {
    width: 48px;
  }

  .message-content {
    margin-left: 66px;
  }

  .chat-main h1 {
    font-size: 38px;
  }
}

@media (max-width: 760px) {
  .site-main,
  .chat-main {
    padding: 18px;
  }

  .site-wordmark,
  .site-nav-link {
    float: none;
    display: inline-block;
    margin-right: 14px;
  }

  h1 {
    font-size: 38px;
  }

  .hero,
  .doc-hero {
    padding-top: 34px;
  }

  .hero-form input[type="text"],
  .hero-form .send-button,
  .suggestions-list form,
  .notes-grid > div {
    display: block;
    width: 100%;
    margin-right: 0;
  }

  .hero-form input[type="text"] {
    margin-bottom: 10px;
  }

  .suggestion-button {
    padding-left: 8px;
    padding-right: 8px;
    font-size: 16px;
  }

  .chat-main h1 {
    padding-right: 0;
  }

  .header-controls {
    position: static;
    margin-bottom: 20px;
  }

  .new-chat-link {
    min-height: 44px;
    margin: 0 8px 8px 0;
    font-size: 16px;
  }

  .chat-user .message-row {
    max-width: 100%;
    margin-left: 0;
  }

  .message-content {
    max-width: none;
  }
}
