/* page.css — the scale every page shares: page width and padding, page
 * titles, section headings and the illustrated empty state (empty-state.js).
 *
 * A page's container carries .page and its heading .page-title (with
 * .page-sub under it); each page stylesheet keeps only its own layout. Colours
 * come from the tokens in base.css, so both themes apply as is.
 */

:root {
  /* Widest a page grows: room for two columns of cards. */
  --page-max: 1200px;
  --page-pad: 38px 44px 72px;
  /* The conversation's header (layout.css): as wide as the reading column
     and composer under it (messages.css, 960px), so its title starts where
     the answer does at any sidebar width. */
  --chat-max: 960px;
}
@media (max-width: 700px) {
  :root { --page-pad: 22px 16px max(28px, env(safe-area-inset-bottom)); }
}

.home-panel,
.conversations-panel,
.schedules-panel,
.workspaces-panel,
.tools-panel { padding: var(--page-pad); }

.page {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  box-sizing: border-box;
}

/* ===== Page head: title, one line under it, the page's buttons ===== */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
}
.page-head-text { min-width: 0; flex: 1 1 320px; }

.page-title {
  margin: 0;
  font-size: 40px; font-weight: 800; line-height: 1.1;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
  /* The text is filled with the gradient; color stays the text colour for
     anything that reads it (selection, forced colours, tests). */
  color: var(--text);
  background: var(--title-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.page-title.hero {
  font-size: clamp(36px, 4.4vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.045em;
  background-image: var(--hero-gradient);
}
.page-sub {
  margin: 8px 0 0;
  max-width: 640px;
  color: var(--text-secondary);
  font-size: 16px; line-height: 1.5;
}
.section-title {
  margin: 0;
  color: var(--text);
  font-size: 20px; font-weight: 800; line-height: 1.25;
  letter-spacing: -0.02em;
}
@media (forced-colors: active) {
  .page-title { background: none; -webkit-text-fill-color: currentColor; }
}

/* ===== Empty state: icon, title, one line, button (empty-state.js) ===== */
.ui-empty {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 44px 24px;
  border: 1px solid;
  text-align: center;
}
.ui-empty-icon {
  width: 64px; height: 64px;
  display: grid; place-items: center;
  margin-bottom: 10px;
  border-radius: var(--radius-xl);
  background: var(--empty-icon-bg);
  box-shadow: inset 0 0 0 1px var(--tone-violet-ring);
  color: var(--tone-violet-text);
}
.ui-empty-icon svg { width: 28px; height: 28px; }
.ui-empty-title { margin: 0; color: var(--text); font-size: 20px; font-weight: 800; letter-spacing: -0.015em; }
.ui-empty-text {
  margin: 0;
  max-width: 480px;
  color: var(--text-secondary);
  font-size: 15px; line-height: 1.5;
}
.ui-empty-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 14px; }

@media (max-width: 700px) {
  /* The page's buttons go under its title, full width. */
  .page-head { flex-direction: column; align-items: stretch; gap: 12px; }
  .page-head-text { flex: none; }
  .page-title { font-size: 30px; }
  .page-title.hero { font-size: clamp(30px, 8.5vw, 38px); }
  .page-sub { font-size: 15px; }
  .ui-empty { padding: 32px 18px; }
}
