:root {
  --black: #111;
  --white: #fff;

  --gray: rgb(71, 85, 105);
  --gray-100: rgb(241, 245, 249);
  --gray-200: rgb(226, 232, 240);
  --gray-300: rgb(203, 213, 225);

  --gray-700: rgb(30, 41, 59);

  --orange: rgb(217, 119, 6);
  --orange-5: color-mix(in srgb, var(--white), 5% var(--orange));
  --orange-20: color-mix(in srgb, var(--white), 20% var(--orange));
  --orange-40: color-mix(in srgb, var(--white), 40% var(--orange));

  --blue: rgb(6, 132, 217);

  --font-serif: 'Crimson Pro', serif;
  --font-sans: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --breakpoint-sm: 600px;
}

::view-transition-old(root) {
  animation: fade-out 150ms ease-out;
}
::view-transition-new(root) {
  animation: fade-in 150ms ease-in;
}

/* Reset */
* { margin: 0; }
*, *:before, *:after { box-sizing: border-box; }

input,
button,
textarea,
select {
  border: 0;
  outline: 0;
  font: inherit;
}

/* Base */
body {
  font-family: var(--font-sans);
  color: var(--black);
  line-height: 1.0;

  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-width: 320px;
}

a {
  text-decoration: none;
}

/* Components */
.App { width: 100%; min-height: 100vh; }

.Page { width: 100%; }
.Page__content { max-width: 1080px; width: 100%; }
.Page:not(.flush) { padding: 3rem; }
.Page__size-xs > * { max-width: 480px; }
.Page__size-sm > * { max-width: 640px; }
.Page__size-md > * { max-width: 800px; }
.Page__size-lg > * { max-width: 1280px; }
.Page__size-full > * { max-width: 100%; }
.Page__center > * { margin-left: auto; margin-right: auto; }

.Page__content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.Header {
  display: flex;
  height: 94px;
  width: 100%;
  border-bottom: 1px solid #e5e7eb;

  background: color-mix(in srgb, var(--white), 20% transparent);
  backdrop-filter: blur(20px);

  position: sticky;
  top: 0px;
  z-index: 40;

  /*box-shadow: 0 0px 10px 0px rgba(0, 0, 0, 0.1);*/
}

.Header__content {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

.Logo { }

.Avatar {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
}

.Footer {
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

.Hero {
  height: 800px;
}

.Textarea {
  display: flex;
  flex-direction: column;
  padding: 12px;
  border-radius: 16px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  cursor: text;
  transition: border 0.2s, box-shadow 0.2s;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
}

.Textarea > textarea {
  flex: 1;
  padding: 12px;
  font-size: 14px;
  field-sizing: content;
  min-height: 60px;
  max-height: 120px;
  resize: none;
  scrollbar-width: thin;
  scrollbar-color: #aaa transparent;
}

.Textarea > textarea::placeholder {
  color: var(--gray-700);
  opacity: 0.5;
}

.Textarea:has(textarea:focus) {
  border: 1px solid var(--orange);
}

.Textarea:has(textarea:disabled) {
  opacity: 0.5;
}

.Input {
  padding: 8px;
  transition: border 0.2s, box-shadow 0.2s;
  border-radius: 4px;
  border: 1px solid var(--gray-200);
  font-size: 14px;
}

.Input:focus {
  border-color: var(--orange);
}

.Checkbox {
  display: flex;
  flex-direction: row;
  gap: 4px;
  line-height: 1.4;
  width: 100%;
}

.Checkbox > label {
  flex: 1;
  padding: 8px;
  transition: color 0.2s;
}

.Checkbox:hover > label {
  color: var(--orange);
}

.Checkbox > input[type="checkbox"]:checked + label {
  text-decoration: line-through;
  color: var(--gray-300);
}

.Chip {
  border: 1px solid var(--gray-200);
  background: color-mix(in srgb, var(--white), 10% transparent);
  border-radius: 9999px;
  padding: 8px 16px;
  font-size: 0.875rem;
  color: var(--gray);
  backdrop-filter: blur(8px);

  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.0);
  transform: translateY(0px);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.Chip:hover {
  transform: translateY(-1px);
  border-color: var(--orange);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.12);
}

.Chip.Chip__selected {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--white);
}

.Card {
  display: flex;
  flex-direction: column;
  padding: 32px;
  border-radius: 16px;
  background: var(--white);
  cursor: text;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
}

.MessageList {
  overflow-y: auto;
}

.Sidebar {
  max-width: 480px;
  height: 100%;
  position: sticky;
  top: 0px;

  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: width 0.2s;
  width: 0px;

  border-left: 1px solid #e5e7eb;
}

.Sidebar__toggle {
  position: absolute;
  left: -64px;
  top: 10px;
  padding: 8px 16px;

  color: var(--orange);
  background: var(--orange-20);
  border-radius: 4px;

  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: bold;

  opacity: 0.5;
  transition: opacity 0.2s;
}

.Sidebar__toggle:hover {
  opacity: 1;
}

.Sidebar__contents {
  padding: 32px;
}

.Sidebar.open {
  width: 640px;
}


.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 8px;
  width: fit-content;
  height: 40px;

  background: var(--orange);
  color: var(--white);

  flex-shrink: 0;
  padding: 0 16px;

  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}
.btn:hover { background: color-mix(in srgb, var(--orange), 10% var(--white)); box-shadow: 0 4px 8px rgba(0,0,0,0.1); }
.btn-primary { background: var(--orange); color: var(--white); }
.btn-primary:hover { background: color-mix(in srgb, var(--orange), 10% var(--white)); }
.btn-secondary { background: var(--gray-200); color: var(--black); }
.btn-secondary:hover { background: var(--gray-300); color: color-mix(in srgb, var(--black), 10% var(--white)); }
.btn-tertiary { }
.btn-outline { background: transparent; border: 1px solid var(--white); color: var(--white); }
.btn-outline:hover { background: color-mix(in srgb, transparent, 20% var(--white)); }
.btn-sm { font-size: 14px; height: 32px; border-radius: 6px; padding: 0 12px; }
.btn-md { }
.btn-lg { font-size: 18px; height: 64px; padding: 0 80px; }

.btn.disabled { cursor: not-allowed; }

.link {
  color: var(--gray);
  transition: color 0.2s ease;
}
.link:hover { color: var(--black); }

koch-icon { display: contents; }
*[onclick], *[href] { cursor: pointer; }

/* Markdown */
.content {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
}

.markdown {
  line-height: 1.6;

  h1, h2, h3, h4, h5, h6 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 600;
    line-height: 1.25;
  }

  h1 { font-size: 2em; }
  h2 { font-size: 1.5em; }
  h3 { font-size: 1.25em; }
  h4 { font-size: 1em; }

  a {
    text-decoration: underline;
  }

  p {
    margin-bottom: 1.5em;
  }

  strong, b {
    font-weight: 700;
  }

  ul, ol {
    margin-bottom: 1em;
    padding-left: 2em;
  }

  ul { list-style-type: disc; }
  ol { list-style-type: decimal; }

  li {
    margin-bottom: 0.25em;

    & > ul, & > ol {
      margin-bottom: 0;
    }
  }

  blockquote {
    margin: 1em 0;
    padding-left: 1em;
    border-left: 4px solid #ddd;
    color: #666;
  }

  pre {
    margin: 1em 0;
    padding: 1em;
    overflow-x: auto;
    background: #f5f5f5;
    border-radius: 4px;
  }

  code {
    font-family: monospace;
    font-size: 0.9em;
  }

  :not(pre) > code {
    padding: 0.2em 0.4em;
    background: #f0f0f0;
    border-radius: 3px;
  }

  a {
    color: #0066cc;
    text-decoration: underline;

    &:hover {
      color: #004499;
    }
  }

  hr {
    margin: 2em 0;
    border: none;
    border-top: 1px solid #ddd;
  }

  table {
    width: 100%;
    margin: 1em 0;
    border-collapse: collapse;
  }

  th, td {
    padding: 0.5em;
    border: 1px solid #ddd;
    text-align: left;
  }

  th {
    background: #f5f5f5;
    font-weight: 600;
  }

  img, video {
    max-width: 100%;
    height: auto;
  }

  & > *:first-child {
    margin-top: 0;
  }

  & > *:last-child {
    margin-bottom: 0;
  }
}

/* Utilities */
.flex { display: flex; }
.flex-inline { display: inline-flex; }
.flex-inline-row { display: inline-flex; flex-direction: row; width: fit-content; }
.flex-inline-col { display: inline-flex; flex-direction: column; }
.flex-row { display: flex; flex-direction: row; }
.flex-col { display: flex; flex-direction: column; }
.flex-center, .center { display: flex; justify-content: center; align-items: center; }
.center { text-align: center; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.align-center { align-items: center; }
.align-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.csx-4  { gap: 4px; }
.csx-8  { gap: 8px; }
.csx-16 { gap: 16px; }
.csx-20 { gap: 20px; }
.csx-24 { gap: 24px; }
.csx-32 { gap: 32px; }
.csx-40 { gap: 40px; }
.csx-64 { gap: 64px; }

.csy-4  { gap: 4px; }
.csy-8  { gap: 8px; }
.csy-16 { gap: 16px; }
.csy-20 { gap: 20px; }
.csy-24 { gap: 24px; }
.csy-32 { gap: 32px; }
.csy-40 { gap: 40px; }
.csy-64 { gap: 64px; }

.ml-auto { margin-left: auto; }
.mb-auto { margin-bottom: auto; }

.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mt-64 { margin-top: 64px; }

.mb-2 { margin-bottom: 2px; }
.mb-12 { margin-bottom: 12px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }

.pt-8 { padding-top: 8px; }

.pb-20 { padding-bottom: 20px; }

.pad-4 { padding: 4px; }
.pad-8 { padding: 8px; }
.pad-12 { padding: 12px; }
.pad-16 { padding: 16px; }
.pad-32 { padding: 32px; }
.pad-40 { padding: 40px; }
.pad-64 { padding: 64px; }
.pad-80 { padding: 80px; }

.padx-10 { padding-left: 10px; padding-right: 10px; }
.padx-12 { padding-left: 12px; padding-right: 12px; }
.padx-16 { padding-left: 16px; padding-right: 16px; }
.padx-20 { padding-left: 20px; padding-right: 20px; }
.padx-32 { padding-left: 32px; padding-right: 32px; }
.padx-40 { padding-left: 40px; padding-right: 40px; }
.padx-64 { padding-left: 64px; padding-right: 64px; }

.pady-4 { padding-top: 4px; padding-bottom: 4px; }
.pady-5 { padding-top: 5px; padding-bottom: 5px; }
.pady-6 { padding-top: 6px; padding-bottom: 6px; }
.pady-8 { padding-top: 8px; padding-bottom: 8px; }
.pady-10 { padding-top: 10px; padding-bottom: 10px; }
.pady-12 { padding-top: 12px; padding-bottom: 12px; }
.pady-16 { padding-top: 16px; padding-bottom: 16px; }
.pady-20 { padding-top: 20px; padding-bottom: 20px; }
.pady-32 { padding-top: 32px; padding-bottom: 32px; }
.pady-40 { padding-top: 40px; padding-bottom: 40px; }
.pady-64 { padding-top: 64px; padding-bottom: 64px; }
.pady-80 { padding-top: 80px; padding-bottom: 80px; }

.icon {
  background-color: currentColor;
  mask-image: var(--icon);
  mask-size: contain;
  mask-repeat: no-repeat; 
  flex-shrink: 0;
}

.s-fill { width: 100%; height: 100%; }

.s-4  { width: 4px; height: 4px; }
.s-8  { width: 8px; height: 8px; }
.s-12 { width: 12px; height: 12px; }
.s-16 { width: 16px; height: 16px; }
.s-20 { width: 20px; height: 20px; }
.s-24 { width: 24px; height: 24px; }
.s-32 { width: 32px; height: 32px; }
.s-40 { width: 40px; height: 40px; }
.s-48 { width: 48px; height: 48px; }
.s-64 { width: 64px; height: 64px; }

.w-fill, .w-full { width: 100%; }
.h-fill, .h-full { height: 100%; }
.w-100 { width: 100vw; }
.h-100 { height: 100vh; }
.w-fit { width: fit-content; }

.h-1 { height: 1px; }
.h-2 { height: 2px; }

.bg-white { background: var(--white); }
.bg-black { background: var(--black); }
.bg-gray { background: var(--gray); }
.bg-gray-100 { background: var(--gray-100); }
.bg-gray-200 { background: var(--gray-200); }
.bg-orange { background: var(--orange); }
.bg-orange-5 { background: var(--orange-5); }
.bg-orange-20 { background: var(--orange-20); }
.bg-orange-40 { background: var(--orange-40); }

.c-white { color: var(--white); }
.c-black { color: var(--black); }
.c-gray { color: var(--gray); }
.c-gray-700 { color: var(--gray-700); }
.c-orange { color: var(--orange); }
.c-orange-5 { color: var(--orange-5); }
.c-orange-20 { color: var(--orange-20); }

.border-1 { border: 1px solid black; }
.border-orange { border-color: var(--orange); }
.border-orange-5 { border-color: var(--orange-5); }
.border-orange-20 { border-color: var(--orange-20); }

.h0, .h1, .h2, .h3, .h4, .h5, .h6 {
  line-height: 1.1;
  font-weight: 700;
  font-family: var(--font-serif);
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.h0 { font-size: 3.75rem; }
.h1 { font-size: 2.75rem; }
.h2 { font-size: 2rem; }
.h3 { font-size: 1.5rem; }
.h4 { font-size: 1.25rem; }

.font-serif { font-family: var(--font-serif); }
.font-sans { font-family: var(--font-sans); }
.font-mono { font-family: var(--font-mono); }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.font-normal { font-weight: 400; }

.text-xxs, .text-xs, .text-sm, .text-md, .text-mm, .text-lg, .text-15px { line-height: 1.6; }
.text-xxs { font-size: 0.625rem; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-md { font-size: 1rem; }
.text-mm { font-size: 1.1rem; }
.text-lg { font-size: 1.25rem; }
.text-15px { font-size: 0.9375rem; }

.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-balance { text-wrap: balance; }
.text-nowrap { white-space: nowrap; }

.text-upper { text-transform: uppercase; }

.opacity-50 { opacity: 0.5; }

.tracking-tigher { letter-spacing: -0.05em; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }

.lh-0, .line-height-0 { line-height: 0; }
.lh-1, .line-height-1 { line-height: 1; }
.lh-1\.6, .line-height-1\.6 { line-height: 1.6; }

.round-full { border-radius: 99999px; }

.overflow-hidden { overflow: hidden; }

.hide-empty:empty { display: none; }

.relative {
  position: relative;
}

.absolute-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.text-invert {
  mix-blend-mode: difference;
  backdrop-filter: opacity(1);
}

.click { cursor: pointer; }

/* Animations */

.animate-fadeIn {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-dotPulse {
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.animate-slideIn {
  animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-progress {
  animation: progress 2.5s ease-in-out;
}

@keyframes progress {
    0% { width: 0%; }
    100% { width: 100%; }
}

.animate-fadeInScale {
    animation: fadeInScale 0.4s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive */
@media (min-width: calc(600px + 1px)) {
    .show-sm {
        display: none !important;
    }
}

@media (max-width: 600px) {
    .hide-sm {
        display: none !important;
    }
}
