@import url('document-body.css');

:root {
  --artifact-background: #ffffff;
  --artifact-foreground: #18181b;
  --artifact-muted: #52525b;
  --artifact-border: #e4e4e7;
  --artifact-surface: #f4f4f5;
  --artifact-link: #2563eb;
  --artifact-highlight: #fef08a;
  color-scheme: light;
}

@media screen {
  :root[data-surface='public'] {
    --artifact-background: #f0f0f0;
    --artifact-surface: #e4e4e7;
  }
}

:root[data-theme='dark'] {
  --artifact-background: #09090b;
  --artifact-foreground: #f4f4f5;
  --artifact-muted: #a1a1aa;
  --artifact-border: #27272a;
  --artifact-surface: #18181b;
  --artifact-link: #60a5fa;
  --artifact-highlight: #854d0e;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme='system'] {
    --artifact-background: #09090b;
    --artifact-foreground: #f4f4f5;
    --artifact-muted: #a1a1aa;
    --artifact-border: #27272a;
    --artifact-surface: #18181b;
    --artifact-link: #60a5fa;
    --artifact-highlight: #854d0e;
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--artifact-background);
  color: var(--artifact-foreground);
  font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

.artifact-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 32px;
  border-bottom: 1px solid var(--artifact-border);
}

.artifact-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  min-width: 0;
}

.artifact-logo-link {
  display: block;
  flex-shrink: 0;
  color: inherit;
}

.artifact-logo {
  display: block;
  flex-shrink: 0;
  width: auto;
  height: 20px;
}

.artifact-disclaimer {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--artifact-muted);
}

.artifact-credit {
  flex-shrink: 0;
  margin: 0;
  font-size: 0.8125rem;
  color: var(--artifact-muted);
  white-space: nowrap;
}

.artifact-login {
  margin-left: 8px;
  font-weight: 500;
  color: var(--artifact-foreground);
}

.artifact-theme-toggle {
  display: inline-flex;
  vertical-align: middle;
  margin-left: 16px;
  font-weight: 500;
  color: var(--artifact-foreground);
}

.artifact-theme-toggle svg {
  width: 16px;
  height: 16px;
}

:root:not([data-theme='dark']) .artifact-theme-toggle[data-theme-to='light'],
:root[data-theme='dark'] .artifact-theme-toggle[data-theme-to='dark'] {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme='system'] .artifact-theme-toggle[data-theme-to='light'] {
    display: inline-flex;
  }

  :root[data-theme='system'] .artifact-theme-toggle[data-theme-to='dark'] {
    display: none;
  }
}

.artifact-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
  font-weight: 600;
}

.artifact-body {
  max-width: 820px;
  margin: 0 auto;
  padding: 32px;
  overflow-wrap: break-word;
}

.artifact-body > :first-child {
  margin-top: 0;
}

@page {
  size: A4;
  margin: 18mm 16mm;
}

.artifact-selecting body {
  user-select: none;
}

.artifact-selecting [data-line] {
  cursor: pointer;
}

.artifact-hover {
  outline: 2px solid var(--artifact-link);
  outline-offset: 2px;
  border-radius: 2px;
}

@media print {
  :root,
  :root[data-theme] {
    --artifact-background: #ffffff;
    --artifact-foreground: #000000;
    --artifact-muted: #3f3f46;
    --artifact-border: #d4d4d8;
    --artifact-surface: #f4f4f5;
    --artifact-link: #000000;
    --artifact-highlight: #fef08a;
    color-scheme: light;
  }

  body {
    font-size: 11pt;
  }

  a {
    text-decoration: underline;
  }

  .artifact-header {
    padding: 0 0 12pt;
  }

  .artifact-credit {
    display: none;
  }

  .artifact-body {
    max-width: none;
    padding: 0;
  }

  table {
    display: table;
    width: 100%;
    overflow: visible;
  }

  thead {
    display: table-header-group;
  }

  table,
  figure,
  pre,
  img,
  blockquote,
  tr {
    break-inside: avoid;
  }

  h1,
  h2,
  h3,
  h4 {
    break-after: avoid;
  }

  details > * {
    display: block;
  }

  pre {
    white-space: pre-wrap;
  }
}

.artifact-unlock {
  max-width: 360px;
  margin: 15vh auto 0;
  padding: 0 24px;
}

.artifact-unlock-title {
  margin: 0 0 4px;
  font-size: 1.25rem;
}

.artifact-unlock form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.artifact-unlock label {
  font-weight: 600;
}

.artifact-unlock input {
  padding: 8px 10px;
  border: 1px solid var(--artifact-border);
  border-radius: 6px;
  background: var(--artifact-background);
  color: var(--artifact-foreground);
  font: inherit;
}

.artifact-unlock-error {
  margin: 0;
  color: var(--artifact-muted);
  font-weight: 600;
}
