/* Dashboard-only visual layer. Shared theme tokens and all workflow state stay intact. */
:root {
  --dashboard-width: 1600px;
  --dashboard-gutter: 24px;
  --dashboard-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --dashboard-border: #e1e7f0;
  --dashboard-muted: #596579;
  --dashboard-ink: #202b3d;
}
body {
  font-family: var(--dashboard-font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--dashboard-ink);
  background: #f7f9fc;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; }
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--dashboard-border);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.site-header > .container, footer > .container, .toolset-layout {
  width: min(var(--dashboard-width), calc(100% - var(--dashboard-gutter) * 2));
  margin-inline: auto;
}
.header-inner, body.has-active-project .header-inner {
  min-height: 80px;
  padding-block: 14px;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "brand lang";
  gap: 16px 24px;
}
.header-brand { gap: 24px; flex-wrap: wrap; }
.header-brand .brand { flex: 0 1 auto; min-width: 0; max-width: 100%; }
.brand { gap: 0; }
.brand .brand-main { font-family: var(--dashboard-font); font-size: 26px; }
.brand .brand-product { font-size: 18px; }
.brand .brand-sub { font-size: 13px; color: var(--dashboard-muted); }
.header-project-link {
  max-width: 44ch; padding: 8px 12px;
  background: var(--brand-soft); color: var(--brand-text);
  border: 1px solid #dce3ff; border-radius: 8px;
  font-size: 13px; line-height: 1.5; font-weight: 500;
}
.header-project-link:hover { background: #e1e8ff; }
.header-actions { gap: 8px; margin: 0; }
.lang, .login {
  min-height: 40px; height: auto; padding: 8px 12px;
  border: 1px solid var(--dashboard-border); border-radius: 8px;
  background: #fff; color: var(--dashboard-ink);
  font-size: 14px; font-weight: 500; line-height: 1.4;
}
.lang:hover, .login:hover:not(:disabled) { background: #f3f6fc; border-color: #b9c7e2; }
.toolset-layout {
  grid-template-columns: clamp(320px, 31vw, 510px) minmax(380px, 1fr) clamp(210px, 17vw, 280px);
  gap: 24px; padding: 32px 0 56px;
  width: calc(100% - 48px); margin-inline: 24px;
}
.workflow-column {
  min-width: 0; padding: 24px;
  border: 1px solid var(--dashboard-border); border-radius: 14px;
  background: #fff;
}
.workflow-column .pw-tabs {
  width: 100%; margin: 0; padding: 0;
  display: flex; align-items: stretch; justify-content: flex-start;
  gap: 28px; border: 0; border-radius: 0;
  background: transparent;
}
.workflow-column .pw-tab {
  justify-content: flex-start; min-height: 44px; padding: 8px 0 9px;
  border: 0; border-bottom: 4px solid transparent; border-radius: 0;
  background: transparent; color: #171920; font-size: 14px;
  font-weight: 400 !important; line-height: 1.5; text-align: left;
}
.workflow-column .pw-tab[aria-selected="true"] { border-bottom-color: var(--brand); }
.workflow-column .pw-tab:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.workflow-column .pw-toolbar {
  display: flex; flex-wrap: wrap;
  padding: 20px 0; gap: 8px; align-items: center;
}
.workflow-column .btn, .pw-sort-trigger, .pw-apply {
  min-width: 0; min-height: 40px; height: auto;
  padding: 9px 14px; border-radius: 8px;
  font-size: 14px; line-height: 1.5; font-weight: 500;
}
.workflow-column .pw-toolbar .pw-start, .workflow-column .pw-toolbar .pw-sort-trigger {
  box-sizing: border-box; min-height: 0; height: auto; padding: 3px 6px;
  border: 1px solid var(--brand-text); border-radius: 6px;
  font-size: 12px; line-height: 1.3; font-weight: 500;
}
.workflow-column .pw-toolbar .pw-start {
  flex: 0 0 auto; width: max-content; max-width: 100%;
  background: var(--brand-text); color: #fff;
}
.workflow-column .pw-start:hover { background: var(--brand-hover); }
.workflow-column .pw-sort-picker { flex: 0 0 auto; width: max-content; max-width: 100%; min-width: 0; margin-left: auto; }
.workflow-column .pw-toolbar .pw-sort-trigger {
  width: 100%; height: var(--project-action-height, auto);
  justify-content: center; gap: 3px; white-space: normal;
  background: #fff; color: #171920; border-color: #171920;
}
.workflow-column .pw-toolbar .pw-sort-trigger[aria-expanded="true"],
.workflow-column .pw-toolbar .pw-sort-trigger:active,
.workflow-column .pw-toolbar .pw-sort-trigger:focus-visible { border-color: var(--brand); }
#pw-sort-label { flex: 0 0 auto; }
#pw-sort-current { min-width: 0; overflow-wrap: anywhere; }
.pw-sort-trigger svg { width: 14px; height: 14px; }
.workflow-column .pw-sort-panel {
  box-sizing: border-box; width: min(200px, calc(100vw - 70px)); padding: 10px;
  border: 1px solid var(--dashboard-border); border-radius: 8px;
}
.pw-sort-panel-head { gap: 8px; margin-bottom: 4px; }
.pw-sort-panel-head h3 { font-size: 14px; line-height: 1.4; }
.pw-menu-trigger { width: 40px; height: 40px; min-width: 40px; border-radius: 8px; }
.pw-sort-close { width: 28px; height: 28px; min-width: 28px; border-radius: 6px; }
.pw-sort-close svg { width: 18px; height: 18px; }
.pw-sort-options { gap: 2px; margin: 6px 0; }
.pw-sort-option { min-height: 28px; font-size: 13px; line-height: 1.4; gap: 8px; }
.pw-sort-option input { width: 15px; height: 15px; }
.workflow-column .pw-apply { width: 100%; min-height: 32px; margin-top: 6px; padding: 5px 10px; font-size: 13px; }
.workflow-column .pw-grid { border-top: 1px solid var(--dashboard-border); }
.workflow-column .pw-card {
  min-height: 88px; padding: 18px 48px 18px 4px;
  border-bottom-color: var(--dashboard-border);
  background: transparent; box-shadow: none; border-radius: 0;
}
.workflow-column .pw-card-title { font-size: 16px; font-weight: 500; line-height: 1.5; color: var(--dashboard-ink); }
.workflow-column .pw-meta { font-size: 13px; line-height: 1.6; color: var(--dashboard-muted); margin-top: 4px; }
.pw-tag { font-size: 12px; line-height: 1.5; }
.workflow-column .pw-card:hover, .workflow-column .pw-card:focus-within { background: #f5f8ff; }
.pw-row-menu { min-width: 160px; border-color: var(--dashboard-border); border-radius: 8px; }
.pw-archive-action { min-height: 40px; padding: 10px 14px; font-size: 14px; }
.workflow-column .pw-banner { margin-bottom: 16px; padding: 16px; border-radius: 8px; background: var(--brand-soft); }
.workflow-column .pw-banner-msg { font-size: 14px; line-height: 1.6; }
/* Tool rows retain their requested large type, small flat icons and no arrows. */
:is(#toolset, #writing-tools) .tool-grid { gap: 10px; }
:is(#toolset, #writing-tools) .tool {
  display: grid; grid-template-columns: 28px 28px minmax(0, 1fr);
  gap: 16px; align-items: center;
  min-height: 76px; height: auto; padding: 18px 24px;
  border: 1px solid var(--dashboard-border); border-radius: 10px;
  background: #fff; box-shadow: none; transform: none;
  transition: background-color .15s ease, border-color .15s ease;
}
:is(#toolset, #writing-tools) .tool .tool-step {
  position: static; transform: none;
  width: 28px; height: 28px; border-radius: 8px;
  color: var(--brand-text); background: var(--brand-soft);
  font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums;
}
:is(#toolset, #writing-tools) .tool .tool-icon { width: 28px; height: 28px; margin: 0; background: none; border: 0; border-radius: 0; box-shadow: none; transform: none; }
:is(#toolset, #writing-tools) .tool .tool-icon svg { width: 24px; height: 24px; stroke: var(--brand-text); filter: none; }
:is(#toolset, #writing-tools) .tool .tool-title { margin: 0; font-size: 19px; line-height: 1.45; font-weight: 500; letter-spacing: -.015em; color: var(--dashboard-ink); overflow-wrap: anywhere; }
:is(#toolset, #writing-tools) .tool:hover { background: #f2f6ff; border-color: #aebfe9; box-shadow: none; transform: none; }
/* Form and summary typography scales with content, never with viewport width. */
body.project-create-mode .workflow-column .pw-create-title { font-size: 22px; line-height: 1.4; font-weight: 500; letter-spacing: -.02em; margin: 0 0 20px; }
.workflow-column .pw-form { padding: 0; margin: 0; border: 0; border-radius: 0; background: #fff; box-shadow: none; backdrop-filter: none; }
.workflow-column .pw-form h3 { font-size: 16px; line-height: 1.5; font-weight: 500; margin-bottom: 20px; }
.field { margin-bottom: 20px; }
.field label { font-size: 14px; line-height: 1.5; font-weight: 500; }
.field input, .field select { min-height: 44px; height: auto; padding-block: 11px; font-size: 15px; line-height: 1.5; border-color: #c7d1e0; border-radius: 8px; }
.field .hint, .field .error { font-size: 13px; line-height: 1.6; }
.field .hint { color: var(--dashboard-muted); }
.field input::placeholder, .field select.is-empty { color: #637086; }
.workflow-column .form-actions { gap: 10px; margin-top: 24px; }
.workflow-column .form-actions .btn { flex: 1 1 120px; }
.workflow-column .project-workspace { margin-top: 24px; padding-top: 24px; border-color: var(--dashboard-border); }
.workspace-summary-header { margin-bottom: 16px; }
.workspace-heading h1 { font-size: 20px; line-height: 1.4; font-weight: 500; color: var(--dashboard-ink); }
.workspace-heading h2 { font-size: 16px; line-height: 1.5; font-weight: 500; color: var(--dashboard-ink); }
.workflow-column .workspace-topbar { min-height: 0; padding: 16px; gap: 12px; border-color: var(--dashboard-border); border-radius: 8px 8px 0 0; }
.workflow-column .workspace-controls { gap: 10px; }
.workspace-progress-label { font-size: 13px; color: var(--dashboard-muted); font-variant-numeric: tabular-nums; }
.workspace-setup-button { min-height: 40px; padding: 8px 12px; border-radius: 7px; font-size: 14px; line-height: 1.5; font-weight: 500; background: var(--brand-text); }
.workspace-toggle { width: 40px; height: 40px; border-radius: 7px; }
.workflow-column .workspace-setup-overview { padding: 16px; border-color: var(--dashboard-border); border-radius: 0 0 8px 8px; }
.workspace-setup-intro { font-size: 14px; line-height: 1.6; color: var(--dashboard-muted); }
.workflow-column .workspace-setup-links { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-flow: row; gap: 4px; }
.workspace-setup-link { font-size: 14px; line-height: 1.5; min-height: 40px; gap: 10px; }
.workspace-setup-status { flex-shrink: 0; }
.workspace-steps { gap: 12px; margin-top: 20px; }
.workspace-accordion { border-color: var(--dashboard-border); border-radius: 8px; }
.workflow-column .workspace-accordion summary { min-height: 60px; padding: 16px; gap: 12px; flex-wrap: wrap; font-size: 15px; line-height: 1.5; font-weight: 500; }
.workspace-step-name { color: var(--dashboard-ink); }
.workspace-accordion[open] summary { border-bottom-color: var(--dashboard-border); }
.workflow-column .workspace-panel { padding: 16px; font-size: 14px; line-height: 1.6; color: var(--dashboard-muted); }
.workspace-summary-metrics { font-size: 12px; line-height: 1.5; white-space: normal; gap: 10px; }
.workspace-dashboard h3 { font-size: 15px; line-height: 1.5; color: var(--dashboard-ink); margin-bottom: 16px; }
.workspace-dashboard-side p, .workspace-team-note { font-size: 13px; line-height: 1.6; color: var(--dashboard-muted); }
.workspace-progress-track { height: 8px; border-radius: 4px; margin-bottom: 20px; background: #e7ecf5; }
.workspace-progress-track span { background: var(--brand); }
.workspace-stat { font-size: 13px; line-height: 1.5; gap: 8px; color: var(--dashboard-muted); }
.workspace-stat strong { font-size: 16px; font-weight: 500; color: var(--dashboard-ink); font-variant-numeric: tabular-nums; }
.workflow-column .workspace-stats { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.workspace-stat-dot { width: 8px; height: 8px; flex-basis: 8px; }
.workflow-column .workspace-search-summary { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.workspace-search-stat { padding: 12px; border-color: var(--dashboard-border); border-radius: 6px; background: #f7f9fc; }
.workspace-search-stat span { font-size: 13px; line-height: 1.5; color: var(--dashboard-muted); }
.workspace-search-stat strong { font-size: 18px; line-height: 1.5; color: var(--dashboard-ink); }
.workspace-data-table, .workspace-data-table th { font-size: 13px; line-height: 1.6; color: var(--dashboard-muted); }
.workspace-data-table th { font-weight: 500; }
.workspace-data-table th, .workspace-data-table td { padding: 10px 8px; overflow-wrap: anywhere; }
.login-card { border-radius: 12px; border-color: var(--dashboard-border); }
.login-card h2 { font-size: 22px; line-height: 1.4; }
.login-card p, .login-status { font-size: 14px; line-height: 1.6; }
.login-card .btn, .login-card .btn-google { min-width: 0; min-height: 44px; height: auto; padding: 10px 16px; font-size: 14px; line-height: 1.5; border-radius: 8px; }
.login-close { width: 40px; height: 40px; }
:is(#toolset, #writing-tools) .tool:focus-visible, .workflow-column :is(button,a):focus-visible, .header-actions button:focus-visible {
  outline: 2px solid var(--brand-text); outline-offset: 3px;
}
footer { padding: 20px 0; background: transparent; border-color: var(--dashboard-border); }
.footer-inner { gap: 12px 24px; font-size: 13px; line-height: 1.6; color: var(--dashboard-muted); }
.footer-contact-trigger {
  padding: 0; border: 0; background: transparent; color: inherit;
  font: inherit; cursor: pointer;
}
.footer-contact-trigger:hover { color: var(--brand-text); }
.footer-contact-dialog {
  width: 190px; max-width: calc(100vw - 32px);
  position: fixed; top: auto; left: auto;
  right: 16px;
  bottom: 66px; max-height: calc(100dvh - 90px); overflow-y: auto;
  margin: 0; padding: 0; border: 1px solid var(--dashboard-border);
  border-radius: 12px; background: #fff; color: var(--dashboard-ink);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.2);
}
.footer-contact-card { position: relative; padding: 16px 12px; }
.footer-contact-card h2 {
  margin: 0 0 18px; font-size: 20px; line-height: 1.4; font-weight: 500;
}
.footer-contact-close {
  position: absolute; top: 10px; right: 10px; width: 32px; height: 32px;
  padding: 0; border: 0; border-radius: 6px; background: transparent;
  color: var(--dashboard-muted); font-size: 22px; line-height: 1; cursor: pointer;
}
.footer-contact-close:hover { background: #f3f6fc; color: var(--dashboard-ink); }
.footer-contact-list {
  display: flex; flex-direction: column; gap: 4px;
  margin: 0; white-space: normal;
}
.footer-contact-row {
  display: flex; flex-direction: column; align-items: stretch; gap: 2px;
  line-height: 1.5;
}
.footer-contact-list { gap: 16px; }
.footer-contact-row a { font-size: 13px; }
.footer-contact-row a { color: var(--brand-text); overflow-wrap: anywhere; }
.footer-contact-row a:hover { color: var(--brand-hover); }
@media (max-width: 1100px) {
  .workflow-column { padding: 20px; }
  .toolset-layout { gap: 24px; }
}
@media (max-width: 980px) {
  .toolset-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .workflow-column { padding: 24px; }
}
@media (max-width: 600px) {
  :root { --dashboard-gutter: 16px; }
  .header-inner, body.has-active-project .header-inner { grid-template-columns: minmax(0, 1fr); grid-template-areas: "brand" "lang"; min-height: 0; padding-block: 16px; gap: 12px; }
  .header-brand { gap: 12px; }
  .header-actions { justify-self: start; }
  .header-project-link { max-width: 100%; }
  .toolset-layout { padding: 24px 0 32px; }
  .workflow-column { padding: 18px; border-radius: 12px; }
  .workflow-column .pw-tabs { gap: 20px; }
  .workflow-column .pw-tab { padding-inline: 0; font-size: 13px; }
  .workflow-column .btn, .pw-sort-trigger, .lang, .login { min-height: 44px; }
  :is(#toolset, #writing-tools) .tool { grid-template-columns: 26px 24px minmax(0, 1fr); min-height: 72px; padding: 16px; gap: 12px; }
  :is(#toolset, #writing-tools) .tool .tool-step { width: 26px; height: 26px; }
  :is(#toolset, #writing-tools) .tool .tool-icon { width: 24px; height: 24px; }
  :is(#toolset, #writing-tools) .tool .tool-title { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  :is(#toolset, #writing-tools) .tool, .lang, .login, .btn { transition: none; }
}

.pw-delete-action { color: #b42318; }

#writing-tools { min-width: 0; padding: 0; background: none; }
#writing-tools .tool { grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding-inline: 16px; }
@media (max-width: 1100px) { .toolset-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); } #writing-tools { grid-column: 1 / -1; } #writing-tools .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 980px) { .toolset-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .toolset-layout { width: calc(100% - 32px); margin-left: 16px; } #writing-tools .tool-grid { grid-template-columns: minmax(0, 1fr); } }

/* Match the project heading to the tool names. */
#projects .pw-head { width: auto; margin: 0; padding: 24px 0 12px; border: 0; }
#projects .pw-head h2 { margin: 0; font-size: 19px; line-height: 1.45; font-weight: 500; letter-spacing: -.015em; color: var(--dashboard-ink); }
@media (max-width: 600px) { #projects .pw-head h2 { font-size: 17px; } }

.proposal-tool-group { min-width: 0; }
.dashboard-proposals { list-style: none; padding: 8px 16px 4px; margin: 0; }
.dashboard-proposals[hidden] { display: none; }
.dashboard-proposals li { display: flex; align-items: flex-start; gap: 8px; padding: 8px 0; }
.dashboard-proposal-name { min-width: 0; flex: 1; font-size: 13px; line-height: 1.6; color: var(--dashboard-ink); overflow-wrap: anywhere; }
.dashboard-proposal-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.dashboard-proposal-delete { flex: 0 0 24px; border: 0; padding: 0; background: none; color: var(--dashboard-muted); font: inherit; font-size: 20px; line-height: 24px; cursor: pointer; }
.dashboard-proposal-delete:focus-visible { outline: 2px solid var(--brand-text); outline-offset: 2px; }

#writing-tools .tool-grid { align-items: start; }

/* Projects are the home view; tools and writing live in the shared header. */
body .toolset-layout { grid-template-columns: minmax(0, 1fr); width: min(1120px, calc(100% - 48px)); margin: 0 auto; padding: 36px 0 56px; }
body .workflow-column { width: 100%; }
body .header-inner, body.has-active-project .header-inner { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "brand nav lang"; gap: 24px; }
.header-products { grid-area: nav; display: flex; align-items: center; gap: 12px; position: static; }
.product-nav-item { position: static; }
.product-nav-trigger { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 14px; border: 0; border-radius: 8px; background: transparent; font: inherit; font-weight: 600; color: var(--dashboard-ink); cursor: pointer; }
.product-nav-trigger:hover, .product-nav-trigger[aria-expanded="true"] { background: #eef2ff; color: #3454d1; }
.product-nav-trigger svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; transition: transform .15s; }
.product-nav-trigger[aria-expanded="true"] svg { transform: rotate(180deg); }
.site-header { position: sticky; z-index: 50; }
.product-dropdown { position: absolute; top: 100%; right: 24px; width: min(720px, calc(100vw - 48px)); padding: 20px; border: 1px solid var(--dashboard-border); border-top: 3px solid #4d6bfe; border-radius: 0 0 14px 14px; background: #fff; box-shadow: 0 18px 40px #24334820; max-height: calc(100dvh - 110px); overflow-y: auto; }
.product-dropdown-bank { width: min(560px, calc(100vw - 48px)); }
.header-products :is(#toolset, #writing-tools) { display: block; padding: 0; margin: 0; background: transparent; }
.header-products #toolset .container { width: 100%; margin: 0; }
.header-products :is(#toolset, #writing-tools) .tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.header-products :is(#toolset, #writing-tools) .tool { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; min-height: 76px; height: auto; padding: 14px; margin: 0; border: 1px solid transparent; border-radius: 8px; background: #fff; text-align: left; }
.header-products :is(#toolset, #writing-tools) .tool:hover { background: #f2f5ff; border-color: #e1e7fa; }
.header-products :is(#toolset, #writing-tools) .tool .tool-step { display: none; }
.header-products :is(#toolset, #writing-tools) .tool .tool-title { font-size: 14px; line-height: 1.5; font-weight: 500; }
.header-products :is(#toolset, #writing-tools) .tool .tool-icon { width: 28px; height: 28px; }
.header-products .proposal-tool-group { min-width: 0; }
.header-products #dashboard-proposals { display: none; }
.product-nav-trigger:focus-visible { outline: 2px solid #4d6bfe; outline-offset: 3px; }
@media (max-width: 1100px) {
  body .header-inner, body.has-active-project .header-inner { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand lang" "nav nav"; gap: 10px 16px; }
  .header-products { justify-self: start; }
  .product-dropdown { max-height: calc(100dvh - 160px); }
}
@media (max-width: 600px) {
  body .header-inner, body.has-active-project .header-inner { grid-template-columns: minmax(0, 1fr); grid-template-areas: "brand" "nav" "lang"; gap: 8px; }
  .header-products { width: 100%; }
  .product-nav-trigger { min-height: 40px; padding: 8px 12px; }
  .product-dropdown, .product-dropdown-bank { right: 16px; width: calc(100vw - 32px); padding: 12px; max-height: calc(100dvh - 220px); }
  .header-products :is(#toolset, #writing-tools) .tool-grid { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .header-products :is(#toolset, #writing-tools) .tool { min-height: 58px; padding: 10px 12px; }
  body .toolset-layout { width: calc(100% - 32px); padding-top: 24px; }
}
@media (prefers-reduced-motion: reduce) { .product-nav-trigger svg { transition: none; } }

/* Direct writing destinations and a focused, searchable project workspace. */
.header-products { gap: 4px; }
.header-products .product-nav-link { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 14px; border: 0; border-radius: 8px; color: var(--dashboard-ink); font-size: 15px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.header-products .product-nav-link:hover, .header-products .product-nav-link[aria-current="page"] { color: #3454d1; background: #eef2ff; }
body .toolset-layout { width: min(1080px, calc(100% - 64px)); padding-top: 40px; }
body .workflow-column { padding: 32px; border-radius: 16px; box-shadow: 0 4px 20px #26395905; }
#projects .pw-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 0 28px; }
#projects .pw-head h2 { font-size: 28px; line-height: 1.3; font-weight: 600; letter-spacing: -.035em; }
#projects .pw-intro { margin-top: 8px; color: var(--dashboard-muted); font-size: 14px; line-height: 1.6; }
#projects .pw-head .pw-start { flex: 0 0 auto; min-height: 44px; padding: 10px 18px; border: 1px solid #4d6bfe; border-radius: 8px; background: #4d6bfe; color: #fff; font-size: 14px; font-weight: 600; line-height: 1.5; }
#projects .pw-head .pw-start:hover { background: #3c55df; border-color: #3c55df; }
#projects .pw-tabs { gap: 28px; border-bottom: 1px solid var(--dashboard-border); }
#projects .pw-tab { padding: 10px 0 12px; border-bottom-width: 2px; margin-bottom: -1px; font-size: 14px; color: var(--dashboard-muted); }
#projects .pw-tab[aria-selected="true"] { color: #3454d1; }
#projects .pw-toolbar { justify-content: space-between; gap: 16px; padding: 22px 0; }
.pw-search { display: flex; align-items: center; gap: 10px; width: min(380px, 100%); min-height: 42px; padding: 8px 12px; border: 1px solid var(--dashboard-border); border-radius: 8px; background: #fff; color: var(--dashboard-muted); cursor: text; }
.pw-search:focus-within { border-color: #4d6bfe; box-shadow: 0 0 0 3px #4d6bfe16; }
.pw-search svg { flex: 0 0 18px; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.pw-search-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.pw-search input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; color: var(--dashboard-ink); font: inherit; font-size: 14px; line-height: 1.6; }
.pw-search input::placeholder { color: #7c8799; }
#projects .pw-toolbar .pw-sort-trigger { min-height: 42px; padding: 8px 12px; border-color: var(--dashboard-border); border-radius: 8px; color: var(--dashboard-muted); font-size: 13px; line-height: 1.5; }
#projects .pw-grid { border-top: 0; }
#projects .pw-card { min-height: 96px; padding: 20px 96px 20px 16px; border-bottom: 1px solid #edf0f5; border-radius: 8px; gap: 6px; }
#projects .pw-card-title { order: 0; font-size: 16px; font-weight: 600; line-height: 1.5; letter-spacing: -.01em; }
#projects .pw-meta { order: 1; margin: 0; font-size: 12px; line-height: 1.5; color: #728096; }
#projects .pw-card::after { content: '→'; position: absolute; right: 64px; top: 50%; transform: translateY(-50%); color: #8996ad; font-size: 18px; pointer-events: none; }
#projects .pw-card:hover::after { color: #4d6bfe; }
#projects .pw-list-empty { margin: 0; padding: 44px 20px; border: 1px dashed #dce3ee; border-radius: 10px; background: #fafbfd; text-align: center; color: var(--dashboard-muted); font-size: 14px; line-height: 1.7; }
@media (max-width: 760px) {
  body .toolset-layout { width: calc(100% - 32px); padding-top: 24px; }
  body .workflow-column { padding: 24px; }
  #projects .pw-head { align-items: flex-start; flex-wrap: wrap; gap: 18px; padding-bottom: 22px; }
  #projects .pw-head h2 { font-size: 25px; }
}
@media (max-width: 480px) {
  body .workflow-column { padding: 20px 16px; }
  #projects .pw-intro { font-size: 13px; }
  #projects .pw-toolbar { gap: 12px; padding: 18px 0; }
  .pw-search { width: 100%; }
  #projects .pw-sort-picker { margin-left: auto; }
  .header-products .product-nav-link, .product-nav-trigger { padding-inline: 10px; font-size: 14px; }
  .brand .brand-sub { white-space: normal; }
}

/* The summary belongs to the expanded project and stays hidden without one. */
#project-workspace[hidden] { display: none !important; }
#projects .pw-card[data-summary-open="true"] { background: #f1f5ff; box-shadow: inset 3px 0 #4d6bfe; }
#projects .pw-card[data-summary-open="true"]::after { content: '⌃'; color: #4d6bfe; }
.workspace-summary-project { margin-top: 6px; color: var(--dashboard-muted); font-size: 14px; overflow-wrap: anywhere; }
