/* Home, the composer that sits under it, and the draft an answer can produce. */

.home {
  max-width: 1120px;
  /* Room for the composer, which floats over the foot of the page. */
  padding-bottom: 150px;
}

.home-hello {
  margin-bottom: var(--s5);
}

.home-hello h1 {
  font-size: 2.125rem;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

/* The greeting carries the one highlight on the page, the way a name is said first. */
.home-hello mark {
  background: var(--accent-soft);
  color: var(--fg);
  padding: 2px 10px;
  margin-left: -10px;
  border-radius: var(--r-md);
  box-decoration-break: clone;
}

.home-hello p {
  margin-top: var(--s3);
  font-family: var(--font-display);
  font-size: 2.125rem;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--fg-3);
}

.home-chips {
  margin-bottom: var(--s5);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  background: var(--surface);
  color: var(--fg-2);
  font-size: var(--t-small);
  white-space: nowrap;
  transition:
    background var(--fast),
    border-color var(--fast),
    color var(--fast);
}

.chip:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  color: var(--fg);
}

.chip .ico {
  color: var(--fg-3);
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--s3);
  margin-bottom: var(--s5);
}

.home-card {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  min-height: 178px;
  padding: var(--s4);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  background: var(--surface);
}

.home-card[data-accent="true"] {
  background: linear-gradient(160deg, var(--accent-soft) 0%, var(--surface) 78%);
  border-color: var(--accent-line);
}

/* A tinted card, the way the reference marks the ones worth noticing. */
.home-card[data-tint="sand"] {
  background: linear-gradient(160deg, var(--t-sand) 0%, var(--surface) 80%);
  border-color: color-mix(in oklab, var(--t-sand) 70%, var(--border));
}

.home-card[data-tint="violet"] {
  background: linear-gradient(160deg, var(--t-violet) 0%, var(--surface) 80%);
  border-color: color-mix(in oklab, var(--t-violet) 70%, var(--border));
}

.home-card[data-tint="sky"] {
  background: linear-gradient(160deg, var(--t-sky) 0%, var(--surface) 80%);
  border-color: color-mix(in oklab, var(--t-sky) 70%, var(--border));
}

.home-card-title {
  font-size: var(--t-h2);
  letter-spacing: -0.02em;
}

.home-card-foot {
  margin-top: auto;
  padding-top: var(--s2);
}

.home-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: var(--s4);
  align-items: start;
}

@media (max-width: 1100px) {
  .home-split {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ── the work list ─────────────────────────────────────────────────── */
.task-list {
  display: flex;
  flex-direction: column;
}

.task-row {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  font-size: var(--t-small);
}

.task-row:last-child {
  border-bottom: 0;
}

.task-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: var(--r-full);
  background: var(--fg-3);
}

.task-dot[data-tone="bad"] {
  background: var(--bad);
}

.task-dot[data-tone="warn"] {
  background: var(--warn);
}

.task-dot[data-tone="accent"] {
  background: var(--accent);
}

.file-row {
  display: flex;
  align-items: center;
  gap: var(--s3);
  width: 100%;
  padding: 8px;
  margin: -8px;
  border-radius: var(--r-md);
  text-align: left;
  color: inherit;
  transition: background var(--fast);
}

.file-row:hover {
  background: var(--surface-2);
}

.file-row .ico:last-child {
  color: var(--fg-3);
}

/* ── composer ──────────────────────────────────────────────────────── */
.composer {
  flex: none;
  padding: var(--s3) var(--s6) var(--s4);
  background: linear-gradient(to top, var(--bg) 70%, transparent);
}

.composer-box {
  max-width: 820px;
  margin: 0 auto;
  padding: var(--s2) var(--s3) var(--s2) var(--s2);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  background: var(--surface);
  box-shadow: var(--shadow-pop);
  transition: border-color var(--fast);
}

.composer-box:focus-within {
  border-color: var(--accent);
}

.composer-row {
  display: flex;
  align-items: center;
  gap: var(--s2);
}

.composer-input {
  flex: 1;
  min-width: 0;
  height: 34px;
  border: 0;
  background: none;
  font-size: 0.9375rem;
}

.composer-input:focus {
  outline: none;
}

.composer-input::placeholder {
  color: var(--fg-3);
}

.composer-foot {
  display: flex;
  align-items: center;
  gap: var(--s3);
  flex-wrap: wrap;
  padding: var(--s2) var(--s1) 0 var(--s1);
}

.send-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 6px 12px;
  border-radius: var(--r-full);
  background: var(--accent);
  color: var(--accent-fg);
  font-size: var(--t-small);
  font-weight: 600;
  white-space: nowrap;
  transition: background var(--fast);
}

.send-cta:hover {
  background: var(--accent-hover);
}

.thought {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--t-micro);
  color: var(--fg-3);
}

/* ── a draft an answer produced ────────────────────────────────────── */
.draft-page {
  max-width: 1160px;
}

.draft-prompt {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.35;
  max-width: 62ch;
  margin-bottom: 8px;
}

.draft-prompt mark {
  background: var(--warn-soft);
  color: var(--warn);
  padding: 0 4px;
  border-radius: var(--r-sm);
  box-decoration-break: clone;
}

.draft-layout {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 260px;
  gap: var(--s4);
  align-items: start;
}

.draft-rail {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
  position: sticky;
  top: 0;
}

.draft-rail .icon-btn {
  border: 1px solid var(--border);
  background: var(--surface);
}

.draft {
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--surface);
  overflow: hidden;
}

.draft-head {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.draft-field {
  display: flex;
  align-items: baseline;
  gap: var(--s3);
  padding: 10px var(--s4);
  border-bottom: 1px solid var(--border);
}

.draft-label {
  flex: none;
  width: 62px;
  font-size: var(--t-micro);
  color: var(--fg-3);
}

.draft-body {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  padding: var(--s4);
}

.draft-section {
  padding: var(--s3) var(--s4);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
}

.draft-section[data-tone="ok"] {
  background: var(--ok-soft);
  border-color: var(--ok-line);
}

.draft-section[data-tone="warn"] {
  background: var(--warn-soft);
  border-color: var(--warn-line);
}

.draft-section h4 {
  margin-bottom: 8px;
  font-size: var(--t-small);
}

.draft-section[data-tone="ok"] h4 {
  color: var(--ok);
}

.draft-section[data-tone="warn"] h4 {
  color: var(--warn);
}

.draft-section ul {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.draft-section li {
  position: relative;
  padding-left: 14px;
  font-size: var(--t-small);
  line-height: 1.6;
  color: var(--fg-2);
}

.draft-section li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 9px;
  width: 4px;
  height: 4px;
  border-radius: var(--r-full);
  background: var(--fg-3);
}

.draft-foot {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex-wrap: wrap;
  padding: var(--s3) var(--s4);
  border-top: 1px solid var(--border);
}

.draft-outline {
  position: sticky;
  top: 0;
  padding: var(--s4);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--surface);
}

.outline-item {
  display: flex;
  align-items: center;
  gap: var(--s2);
  width: 100%;
  padding: 7px var(--s2);
  border-radius: var(--r-sm);
  font-size: var(--t-small);
  color: var(--fg-2);
  text-align: left;
}

.outline-item:hover {
  background: var(--surface-2);
  color: var(--fg);
}

.outline-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 2px;
  background: var(--fg-3);
}

.outline-item[data-tone="ok"] .outline-dot {
  background: var(--ok);
}

.outline-item[data-tone="warn"] .outline-dot {
  background: var(--warn);
}

@media (max-width: 1100px) {
  .draft-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .draft-rail {
    flex-direction: row;
    position: static;
  }

  .draft-outline {
    position: static;
  }
}

@media (max-width: 860px) {
  .home-hello h1,
  .home-hello p {
    font-size: 1.625rem;
  }

  .composer {
    padding-inline: var(--s4);
  }
}
