/* The client's mark, the sign-in page and Pulpit. */
.brand-logo { display: block; width: auto; height: auto; max-width: 180px; max-height: 60px; object-fit: contain; }
.brand-wordmark { display: block; max-width: 240px; overflow: hidden; color: var(--color-text); font-size: var(--text-title-3); font-weight: 700; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Sign-in ---- */
.login { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-6); min-height: 100vh; min-height: 100dvh; padding: var(--space-8) 0; }
.login-card { width: 100%; max-width: 440px; padding: var(--space-10); border-radius: var(--radius-xl); background: var(--color-tile); }
.login-logo { margin-bottom: var(--space-8); }
.login-card h1 { font-size: 26px; }
.login-lead { margin-top: var(--space-2); font-size: var(--text-headline); line-height: 1.4; color: var(--color-text-3); }
.login-card form { margin-top: var(--space-6); }
.login-card input { min-height: 52px; padding: 12px 16px; border-color: transparent; border-radius: var(--radius-md); font-size: 17px; box-shadow: var(--shadow-card); }
.login-card input:hover { border-color: var(--color-border); }
.login-card input:focus { border-color: var(--color-accent); box-shadow: var(--focus-ring); }
.login-card .button-primary { min-height: 52px; margin-top: var(--space-6); font-size: 17px; }
.login-help { margin-top: var(--space-5); font-size: var(--text-footnote); color: var(--color-text-3); }

/* ---- Pulpit ---- */
/* The layout follows the width of the view itself, not the window: the Agent panel takes a third of it when open. */
.overview { container: overview / inline-size; }
.overview-summary { margin-top: 6px !important; max-width: 60ch !important; color: var(--color-text-2); font-size: var(--text-headline) !important; line-height: 1.4; }
.overview-summary strong { color: var(--color-text); font-weight: 600; }
.overview-heading-actions { display: flex; align-items: center; gap: var(--space-3); flex-shrink: 0; }
.overview-heading-actions .small-note { font-size: var(--text-footnote); color: var(--color-text-3); text-align: right; }
.overview-heading-actions .small-note:empty { display: none; }
.overview-shortcuts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: var(--space-6); }
.overview-primary-link:hover { text-decoration: none; }
.overview-shortcuts:not(:has(> :not([hidden]))) { display: none; }  /* Nothing to offer a person who cannot write. */
.overview-panel { display: flex; flex-direction: column; min-width: 0; padding: 22px; border-radius: var(--radius-xl); background: var(--color-tile); }
.overview-panel-heading { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); min-height: 32px; margin: 0 2px 14px; }
.overview-panel-heading h2 { font-size: var(--text-title-2); }
.overview-panel-heading > a, .overview-panel-heading > button { flex-shrink: 0; min-height: 32px; padding: 0 10px; margin-right: -8px; font-size: var(--text-body); font-weight: 600; white-space: nowrap; }
.overview-panel-heading > a { display: inline-flex; align-items: center; border-radius: var(--radius-control); }
.overview-panel-heading > a:hover { background: var(--color-accent-soft); text-decoration: none; }
.overview-panel-note { margin: var(--space-3) 2px 0; font-size: var(--text-footnote); }
.overview-panel-note:empty { display: none; }
.row-chevron { width: 16px; height: 16px; color: #86868b; stroke-width: 2.4; }

.overview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); align-items: start; }
.overview-col { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }

/* What waits for a decision. */
/* How many posts this week holds; opens Plan. */
.overview-week { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; margin: -6px 2px 12px; color: var(--color-text-2); font-size: var(--text-footnote); text-decoration: none; }
.overview-week:hover { color: var(--color-text); text-decoration: none; }
.overview-week strong { color: var(--color-text); font-weight: 600; }
.overview-week small { color: var(--color-text-3); font-size: var(--text-footnote); }
.overview-week small::before { content: "· "; }
/* The Agent in one card: its state, the last jobs, the way to its settings. */
.overview-agent { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--space-4); margin-bottom: var(--space-3); padding: 12px var(--space-4); border-radius: var(--radius-row); background: var(--color-surface); box-shadow: var(--shadow-card); }
.overview-agent:empty { display: none; }
.overview-agent .small-note { color: var(--color-text-3); }
.overview-agent .button-text { min-height: 32px; margin: 0 -8px 0 auto; font-size: var(--text-footnote); }
.overview-attention, .overview-upcoming { display: flex; flex-direction: column; gap: var(--space-2); }
.overview-task { display: grid; grid-template-columns: 32px minmax(0, 1fr) 16px; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 12px 14px 12px 16px; border-radius: var(--radius-row);
  background: var(--color-surface); box-shadow: var(--shadow-card); color: var(--color-text); font-weight: 400; text-align: left; }
.overview-task:hover, .overview-post:hover { box-shadow: var(--shadow-card), 0 6px 18px rgba(0, 0, 0, .08); }
.overview-task-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-md); background: var(--color-tile); color: var(--color-text-2); }
.overview-task-icon .ui-icon { width: 18px; height: 18px; stroke-width: 2; }
.overview-task-copy { min-width: 0; }
.overview-task-copy strong { display: block; font-size: var(--text-body); font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.overview-task-copy small { display: block; margin-top: 2px; font-size: var(--text-footnote); color: var(--color-text-3); }
.overview .empty-state { padding: var(--space-5); border-radius: var(--radius-row); background: var(--color-surface); box-shadow: var(--shadow-card); text-align: left; }
.overview .empty-state p { margin-left: 0; font-size: var(--text-footnote); }

.overview-post { display: grid; grid-template-columns: 46px minmax(0, 1fr) 16px; align-items: center; gap: 6px 14px; width: 100%; min-height: 74px; padding: 12px 14px 12px 12px; border-radius: var(--radius-row);
  background: var(--color-surface); box-shadow: var(--shadow-card); color: var(--color-text); font-weight: 400; text-align: left; }
.overview-post > .status-badge { grid-column: 2; grid-row: 2; justify-self: start; }
.overview-post > .row-chevron { grid-column: 3; grid-row: 1 / span 2; }
.overview-post-date { grid-row: 1 / span 2; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 46px; height: 50px; border-radius: var(--radius-md); background: var(--color-tile); color: var(--color-text-3); font-size: 11px; font-weight: 600; line-height: 1.1; }
.overview-post-date b { color: var(--color-text); font-size: 19px; font-weight: 700; line-height: 1.15; }
.overview-post-date.is-today { background: var(--color-accent); color: #fff; }
.overview-post-date.is-today b { color: #fff; }
.overview-post-copy { min-width: 0; }
.overview-post-copy strong { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; font-size: var(--text-body); line-height: 1.3; }
.overview-post-copy small { display: block; margin-top: 2px; font-size: var(--text-footnote); color: var(--color-text-3); }

.overview-week-channels { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: -8px 2px 12px; color: var(--color-text-3); font-size: var(--text-footnote); }
.overview-week-channels strong { color: var(--color-text-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.overview-services { display: flex; flex-wrap: wrap; gap: 6px; }
.overview-service { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px; border-radius: var(--radius-badge); background: var(--color-success-soft); color: var(--color-success); font-size: var(--text-footnote); font-weight: 600; }
.overview-service::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--color-success-fill); }
.overview-service.is-unavailable { background: var(--color-fill); color: #48484a; }
.overview-service.is-unavailable::before { background: var(--color-text-3); }
.overview-activity { margin-top: var(--space-3); padding: 2px var(--space-4); border-radius: var(--radius-row); background: var(--color-surface); box-shadow: var(--shadow-card); }
.overview-activity:empty { display: none; }
.overview-activity-row { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); padding: 12px 0; font-size: var(--text-body); color: var(--color-text); }
.overview-activity-row + .overview-activity-row { border-top: 1px solid var(--color-separator); }
.overview-activity-row small { display: block; font-size: var(--text-footnote); color: var(--color-text-3); }
.overview-activity > .small-note, .overview-activity > p { padding: 12px 0; }
.overview-autonomy { margin-top: var(--space-3); }
.overview-footnote { margin-top: var(--space-6); font-size: var(--text-footnote); color: var(--color-text-3); }
.overview-footnote strong { color: var(--color-text); }

@container overview (max-width: 680px) {
  .overview-grid { grid-template-columns: minmax(0, 1fr); }
  /* One column: what to do, what is coming, then the Agent. */
  .overview-col { display: contents; }
  .overview-agent-panel { order: 3; }
}
@media (max-width: 760px) {
  .login { justify-content: flex-start; padding-top: 8vh; }
  .login-card { padding: var(--space-8) var(--space-6); border-radius: var(--radius-xl); }
  .login-card h1 { font-size: 24px; }
  .overview-summary { font-size: var(--text-body) !important; }
  /* The refresh button stays beside the greeting; a failed refresh is spelled out under it. */
  .overview-heading { flex-wrap: nowrap; }
  .overview-heading-actions { flex-direction: column-reverse; align-items: flex-end; gap: 4px; max-width: 45%; }
  .overview-shortcuts { margin-bottom: var(--space-4); }
  .overview-shortcuts > * { flex: 1 1 100%; min-height: 50px; font-size: 17px; }
  .overview-panel { padding: var(--space-4); border-radius: var(--radius-lg); }
}
