/* Vestar Today — brand tokens and layout.
   Colors and type come from the owner-supplied Vestar Brand Standards 2021
   (see docs/BRAND_SOURCE_RECORD_2026-09-19.md). Neutral surfaces are tints of the
   brand palette mixed with white or Dynamic Navy; no other hues are introduced. */

@font-face { font-family: 'Oswald'; font-style: normal; font-weight: 200 700; font-display: swap; src: url('./brand/fonts/Oswald-variable.woff2') format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-style: normal; font-weight: 400 900; font-display: swap; src: url('./brand/fonts/PlayfairDisplay-variable.woff2') format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-style: italic; font-weight: 400 900; font-display: swap; src: url('./brand/fonts/PlayfairDisplay-italic-variable.woff2') format('woff2'); }

:root {
  color-scheme: light dark;
  /* Vestar palette (Brand Standards 2021, Color Guide) */
  --vt-indigo: #1A519B;   /* Innovative Indigo, PMS 7686 C — primary */
  --vt-blue: #246CB6;     /* Biltmore Blue, PMS 660 C — primary */
  --vt-navy: #082949;     /* Dynamic Navy, PMS 289 C — secondary */
  --vt-violet: #5F005E;   /* Vestar Violet, PMS 2623 C — tertiary */
  --vt-fuchsia: #9A0098;  /* Focused Fuchsia, PMS 254 C — specialty */
  --vt-black: #000000;    /* Rich Black */
  --vt-white: #FFFFFF;
  /* Derived neutrals: brand colors mixed with white */
  --vt-bg: var(--vt-white);
  --vt-surface: var(--vt-white);
  --vt-surface-2: color-mix(in srgb, var(--vt-indigo) 7%, var(--vt-white));
  --vt-border: color-mix(in srgb, var(--vt-navy) 16%, var(--vt-white));
  --vt-text: var(--vt-navy);
  --vt-muted: color-mix(in srgb, var(--vt-navy) 68%, var(--vt-white));
  --vt-focus: var(--vt-blue);
  --vt-shadow: 0 12px 32px color-mix(in srgb, var(--vt-navy) 18%, transparent);
  /* Typography (Brand Standards 2021, Fonts): Playfair Display for headlines, Oswald for the message */
  --vt-font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --vt-font-body: 'Oswald', 'Arial Narrow', 'Segoe UI', sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --vt-bg: var(--vt-navy);
    --vt-surface: color-mix(in srgb, var(--vt-navy) 88%, var(--vt-white));
    --vt-surface-2: color-mix(in srgb, var(--vt-navy) 78%, var(--vt-white));
    --vt-border: color-mix(in srgb, var(--vt-white) 18%, var(--vt-navy));
    --vt-text: var(--vt-white);
    --vt-muted: color-mix(in srgb, var(--vt-white) 72%, var(--vt-navy));
    --vt-focus: var(--vt-white);
    --vt-shadow: 0 12px 32px color-mix(in srgb, var(--vt-black) 45%, transparent);
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: var(--vt-font-body); font-weight: 400; line-height: 1.5; color: var(--vt-text); background: var(--vt-bg); }
button { font: inherit; cursor: pointer; border-radius: 999px; border: 1px solid var(--vt-indigo); padding: .55rem 1.1rem; background: var(--vt-indigo); color: var(--vt-white); font-weight: 500; letter-spacing: .02em; }
button:hover { background: var(--vt-navy); border-color: var(--vt-navy); }
button:disabled { cursor: not-allowed; background: var(--vt-surface-2); border-color: var(--vt-border); color: var(--vt-muted); }
:focus-visible { outline: 3px solid var(--vt-focus); outline-offset: 3px; }
.skip-link { position: absolute; left: 1rem; top: -6rem; z-index: 2; padding: .75rem 1rem; background: var(--vt-surface); color: var(--vt-indigo); border-radius: .5rem; }
.skip-link:focus { top: 1rem; }
[hidden] { display: none !important; }

/* App frame: top bar, compact sidebar, conversation, footer */
.shell { height: 100dvh; display: grid; grid-template-columns: 17rem minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: "topbar topbar" "sidebar main" "footer footer"; }
.shell[data-sidebar="closed"] { grid-template-columns: minmax(0, 1fr); grid-template-areas: "topbar" "main" "footer"; }
.shell[data-sidebar="closed"] .sidebar { display: none; }

/* Top bar: left = menu and clock, center = logo and Vestar Today, right = the signed-in person */
.topbar { grid-area: topbar; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; padding: .7rem clamp(1rem, 3vw, 2rem); border-bottom: 1px solid var(--vt-border); background: var(--vt-surface); }
.topbar-left { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.menu-toggle { padding: .45rem .9rem; background: transparent; color: var(--vt-indigo); border-color: var(--vt-border); }
.menu-toggle:hover { background: var(--vt-surface-2); color: var(--vt-indigo); border-color: var(--vt-indigo); }
.clock { display: grid; line-height: 1.2; min-width: 0; }
.clock-date { font-size: .78rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--vt-muted); white-space: nowrap; }
.clock-time { font-size: 1.05rem; font-weight: 500; color: var(--vt-text); white-space: nowrap; }
.identity { grid-column: 2; display: flex; align-items: center; justify-content: center; gap: .85rem; min-width: 0; }
.logo { height: 2.4rem; width: auto; display: block; }
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) { .logo-light { display: none; } .logo-dark { display: block; } }
.wordmark { font-family: var(--vt-font-display); font-style: italic; font-weight: 700; font-size: 1.45rem; color: var(--vt-indigo); white-space: nowrap; }
@media (prefers-color-scheme: dark) { .wordmark { color: var(--vt-white); } }

/* Account control */
.account { grid-column: 3; position: relative; display: flex; justify-content: flex-end; min-width: 0; }
.account-button { display: flex; align-items: center; gap: .65rem; padding: .35rem .9rem .35rem .4rem; background: transparent; color: var(--vt-text); border-color: var(--vt-border); max-width: 100%; text-align: left; }
.account-button:hover { background: var(--vt-surface-2); color: var(--vt-text); border-color: var(--vt-indigo); }
.account-button:disabled { background: transparent; color: var(--vt-muted); }
.account[data-state="signed-out"] .account-button { padding: .5rem 1.1rem; background: var(--vt-indigo); color: var(--vt-white); border-color: var(--vt-indigo); }
.account[data-state="signed-out"] .account-button:hover { background: var(--vt-navy); border-color: var(--vt-navy); }
.account[data-state="signed-out"] .account-button:disabled { background: var(--vt-surface-2); color: var(--vt-muted); border-color: var(--vt-border); }
.account[data-state="signed-out"] .avatar, .account[data-state="pending"] .avatar { display: none; }
.avatar { flex: none; width: 2.1rem; height: 2.1rem; border-radius: 50%; display: grid; place-items: center; background: var(--vt-indigo); color: var(--vt-white); font-size: .85rem; font-weight: 500; letter-spacing: .04em; }
.account-text { display: grid; line-height: 1.2; min-width: 0; }
.account-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-role { font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--vt-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-role:empty { display: none; }
.account-menu { position: absolute; top: calc(100% + .5rem); right: 0; z-index: 3; min-width: 16rem; padding: 1rem; border: 1px solid var(--vt-border); border-radius: .9rem; background: var(--vt-surface); box-shadow: var(--vt-shadow); }
.account-menu p { margin: 0 0 .25rem; overflow-wrap: anywhere; }
.menu-name { font-weight: 500; }
.menu-role { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--vt-muted); }
.menu-mail { font-size: .85rem; color: var(--vt-muted); }
.menu-item { width: 100%; margin-top: .85rem; }

/* Sidebar */
.sidebar { grid-area: sidebar; display: flex; flex-direction: column; gap: 1.25rem; padding: 1.25rem 1rem; border-right: 1px solid var(--vt-border); background: var(--vt-surface-2); overflow: auto; }
.new-conversation { width: 100%; }
.sidebar-section h2 { margin: 0 0 .2rem; font-size: .75rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--vt-muted); }
.sidebar-section p { margin: 0 0 1rem; font-size: .9rem; }
.muted { color: var(--vt-muted); }
.sidebar-note { margin-top: auto; font-size: .8rem; color: var(--vt-muted); }

/* Conversation */
main { grid-area: main; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.intro { width: min(100% - 2rem, 46rem); margin: 0 auto; padding: clamp(2rem, 8vh, 5rem) 0 1rem; }
.eyebrow { margin: 0 0 .75rem; font-size: .8rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--vt-blue); }
h1 { margin: 0 0 1rem; font-family: var(--vt-font-display); font-style: italic; font-weight: 700; font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.12; letter-spacing: -.01em; color: var(--vt-indigo); }
@media (prefers-color-scheme: dark) { h1 { color: var(--vt-white); } }
.lead { margin: 0; max-width: 36rem; font-size: 1.05rem; font-weight: 300; }
.status { width: min(100% - 2rem, 46rem); margin: 1.25rem auto; padding: 1rem 1.2rem; border: 1px solid var(--vt-border); border-left: 4px solid var(--vt-blue); border-radius: .75rem; background: var(--vt-surface); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.status p { margin: 0; }
.canvas { flex: 1; min-height: 0; display: flex; width: min(100%, 60rem); margin: 0 auto; padding: 0 clamp(.5rem, 2vw, 1.5rem) .5rem; }
.canvas-mount { flex: 1; min-height: 0; min-width: 0; }

/* Composer attach control (owner direction): Web Chat's upload button rendered as a "+" like
   ChatGPT and Claude. Only the icon is replaced; behavior stays Microsoft's. */
.webchat__upload-button .webchat__attachment-icon svg { display: none; }
.webchat__upload-button .webchat__attachment-icon { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; border: 1.5px solid var(--vt-indigo); color: var(--vt-indigo); background: transparent; }
.webchat__upload-button .webchat__attachment-icon::before { content: '+'; font-family: var(--vt-font-body); font-size: 1.45rem; font-weight: 400; line-height: 1; transform: translateY(-1px); }
.webchat__upload-button .webchat__icon-button:hover .webchat__attachment-icon { background: var(--vt-indigo); color: var(--vt-white); }
.webchat__upload-button .webchat__icon-button:focus-visible .webchat__attachment-icon { outline: 3px solid var(--vt-focus); outline-offset: 2px; }

.footer { grid-area: footer; padding: .7rem clamp(1rem, 3vw, 2rem); font-size: .78rem; letter-spacing: .04em; color: var(--vt-muted); border-top: 1px solid var(--vt-border); background: var(--vt-surface); }

@media (max-width: 64rem) {
  .clock-date { display: none; }
  .account-role { display: none; }
}

@media (max-width: 48rem) {
  .shell, .shell[data-sidebar="closed"] { grid-template-columns: minmax(0, 1fr); grid-template-areas: "topbar" "main" "footer"; }
  .sidebar { display: none; }
  .shell[data-sidebar="open"] .sidebar { display: flex; grid-area: main; border-right: 0; }
  .shell[data-sidebar="open"] main { display: none; }
  .topbar { grid-template-columns: auto 1fr auto; padding: .6rem 1rem; gap: .6rem; }
  .identity { justify-content: center; }
  .wordmark { font-size: 1.15rem; }
  .logo { height: 2rem; }
  .clock { display: none; }
  .account-text { display: none; }
  .account[data-state="signed-in"] .account-button { padding: .25rem; }
  .intro { padding-top: 2rem; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }

/* Workspace sidebar: projects, pins, past conversations */
.new-scope { margin: -.6rem 0 0; font-size: .8rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.section-action { padding: .15rem .6rem; font-size: .78rem; background: transparent; color: var(--vt-indigo); border-color: var(--vt-border); }
.section-action:hover { background: var(--vt-surface); border-color: var(--vt-indigo); color: var(--vt-indigo); }
.section-list { list-style: none; margin: .25rem 0 .5rem; padding: 0; display: grid; gap: .2rem; }
.section-note { font-size: .85rem; margin: 0 0 .5rem; }
.list-item { display: flex; align-items: stretch; gap: .2rem; }
.list-item.is-active .item-open { background: var(--vt-surface); border-color: var(--vt-indigo); }
.list-item.is-open .item-primary::before { content: ''; display: inline-block; width: .45rem; height: .45rem; margin-right: .4rem; border-radius: 50%; background: var(--vt-blue); vertical-align: middle; }
.item-open { flex: 1; min-width: 0; display: grid; gap: .1rem; text-align: left; padding: .45rem .6rem; border-radius: .6rem; background: transparent; color: var(--vt-text); border: 1px solid transparent; font-weight: 400; letter-spacing: 0; }
.item-open:hover { background: var(--vt-surface); color: var(--vt-text); border-color: var(--vt-border); }
.item-primary { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-secondary { font-size: .74rem; color: var(--vt-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-remove, .item-edit { flex: none; width: 1.9rem; padding: 0; border-radius: .5rem; background: transparent; color: var(--vt-muted); border-color: transparent; font-weight: 400; }
.item-remove:hover, .item-edit:hover { background: var(--vt-surface); color: var(--vt-indigo); border-color: var(--vt-border); }

/* Pin control on canvas messages */
.webchat__basic-transcript__activity { position: relative; }
.vt-pin { position: absolute; right: .25rem; top: .25rem; padding: .1rem .55rem; font-size: .72rem; border-radius: 999px; background: var(--vt-surface); color: var(--vt-indigo); border: 1px solid var(--vt-border); opacity: 0; transition: opacity .15s; }
.webchat__basic-transcript__activity:hover .vt-pin, .vt-pin:focus-visible { opacity: 1; }
.vt-pin:disabled { opacity: 1; color: var(--vt-muted); background: var(--vt-surface-2); }

/* Read-only transcript of a past conversation */
.transcript { width: min(100% - 2rem, 52rem); margin: 1.25rem auto; }
.transcript-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: flex-start; border-bottom: 1px solid var(--vt-border); padding-bottom: 1rem; }
.transcript-head h2 { margin: 0 0 .25rem; font-family: var(--vt-font-display); font-style: italic; font-weight: 700; font-size: 1.6rem; color: var(--vt-indigo); }
@media (prefers-color-scheme: dark) { .transcript-head h2 { color: var(--vt-white); } }
.transcript-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.transcript-back { background: transparent; color: var(--vt-indigo); border-color: var(--vt-border); }
.transcript-back:hover { background: var(--vt-surface-2); color: var(--vt-indigo); border-color: var(--vt-indigo); }
.transcript-list { list-style: none; margin: 1rem 0 2rem; padding: 0; display: grid; gap: .9rem; }
.transcript-message { max-width: 42rem; padding: .8rem 1rem; border-radius: 14px; background: var(--vt-surface-2); }
.transcript-message.from-user { margin-left: auto; background: var(--vt-indigo); color: var(--vt-white); }
.transcript-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.transcript-meta { display: flex; gap: .75rem; align-items: center; margin-top: .4rem; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.transcript-pin { margin-left: auto; padding: .1rem .55rem; font-size: .72rem; background: transparent; color: inherit; border-color: currentColor; text-transform: none; letter-spacing: 0; }

/* Project dialog */
.project-dialog { border: 1px solid var(--vt-border); border-radius: 1rem; padding: 0; width: min(100% - 2rem, 34rem); background: var(--vt-surface); color: var(--vt-text); box-shadow: var(--vt-shadow); }
.project-dialog::backdrop { background: color-mix(in srgb, var(--vt-navy) 45%, transparent); }
.project-form { display: grid; gap: .6rem; padding: 1.25rem; }
.project-form h2 { margin: 0 0 .25rem; font-family: var(--vt-font-display); font-style: italic; font-weight: 700; color: var(--vt-indigo); }
.project-form label { font-size: .8rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--vt-muted); }
.project-form input, .project-form textarea { font: inherit; width: 100%; padding: .6rem .75rem; border: 1px solid var(--vt-border); border-radius: .6rem; background: var(--vt-bg); color: var(--vt-text); }
.project-form .hint { margin: 0; font-size: .8rem; color: var(--vt-muted); }
.dialog-actions { display: flex; gap: .5rem; justify-content: flex-end; margin-top: .5rem; }
.dialog-delete { margin-right: auto; background: transparent; color: var(--vt-fuchsia); border-color: var(--vt-border); }
.dialog-delete:hover { background: var(--vt-fuchsia); color: var(--vt-white); border-color: var(--vt-fuchsia); }
.dialog-cancel { background: transparent; color: var(--vt-indigo); border-color: var(--vt-border); }
.dialog-cancel:hover { background: var(--vt-surface-2); color: var(--vt-indigo); border-color: var(--vt-indigo); }

/* Project files in the dialog */
.files-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .4rem; }
.dialog-add-files { padding: .3rem .8rem; font-size: .8rem; background: transparent; color: var(--vt-indigo); border-color: var(--vt-border); }
.dialog-add-files:hover { background: var(--vt-surface-2); color: var(--vt-indigo); border-color: var(--vt-indigo); }
.project-files { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; max-height: 10rem; overflow: auto; }
.project-file { display: flex; align-items: center; gap: .6rem; padding: .3rem .5rem; border: 1px solid var(--vt-border); border-radius: .5rem; background: var(--vt-surface-2); }
.project-file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-file-size { font-size: .74rem; color: var(--vt-muted); }

/* Conversation tabs (owner direction): several conversations open at once, like editor tabs.
   Each tab keeps its own live canvas or read-only transcript; switching hides the others. */
.tabstrip { flex: none; display: flex; align-items: flex-end; gap: .15rem; padding: .5rem clamp(.5rem, 2vw, 1.5rem) 0; border-bottom: 1px solid var(--vt-border); background: var(--vt-surface); overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.tab { position: relative; flex: 0 1 14rem; min-width: 7rem; display: flex; align-items: center; gap: .4rem; padding: .5rem .45rem .5rem .85rem; margin-bottom: -1px; border: 1px solid transparent; border-bottom-color: var(--vt-border); border-radius: .65rem .65rem 0 0; color: var(--vt-muted); cursor: pointer; user-select: none; }
.tab:hover { background: var(--vt-surface-2); color: var(--vt-text); }
.tab[aria-selected="true"] { background: var(--vt-bg); color: var(--vt-text); border-color: var(--vt-border); border-bottom-color: var(--vt-bg); }
.tab[aria-selected="true"]::before { content: ''; position: absolute; left: .65rem; right: .65rem; top: -1px; height: 3px; border-radius: 0 0 3px 3px; background: var(--vt-indigo); }
.tab[data-state="connecting"] .tab-title { opacity: .7; }
.tab[data-state="failed"]::before { background: var(--vt-fuchsia); }
.tab-kind { flex: none; font-size: .66rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--vt-blue); }
.tab-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; font-weight: 400; }
.tab-close { flex: none; width: 1.45rem; height: 1.45rem; padding: 0; border-radius: 50%; background: transparent; color: inherit; border-color: transparent; font-size: 1rem; line-height: 1; font-weight: 400; opacity: .55; }
.tab:hover .tab-close, .tab[aria-selected="true"] .tab-close, .tab-close:focus-visible { opacity: 1; }
.tab-close:hover { background: var(--vt-surface); color: var(--vt-indigo); border-color: var(--vt-border); }
.tab-new { flex: none; align-self: center; width: 1.9rem; height: 1.9rem; margin: 0 0 .25rem .25rem; padding: 0; border-radius: 50%; background: transparent; color: var(--vt-indigo); border-color: transparent; font-size: 1.3rem; line-height: 1; font-weight: 400; }
.tab-new:hover { background: var(--vt-surface-2); color: var(--vt-indigo); border-color: var(--vt-border); }
.tab-new:disabled { background: transparent; border-color: transparent; }
.panes { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.pane { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: auto; }
.pane-chat { overflow: hidden; }
.status-close { background: transparent; color: var(--vt-indigo); border-color: var(--vt-border); }
.status-close:hover { background: var(--vt-surface-2); color: var(--vt-indigo); border-color: var(--vt-indigo); }
@media (max-width: 48rem) {
  .tabstrip { padding-left: .5rem; padding-right: .5rem; }
  .tab { min-width: 6rem; padding-left: .6rem; }
}
