/* Shared approved brand palette for public pages and signed-in workspaces. */
.product-themed {
  --ink: var(--product-ink);
  --muted: var(--product-muted);
  --line: var(--product-border);
  --teal: var(--product-accent);
  --theme-control-border: var(--product-muted);
  --theme-error-ink: #832f25;
  --theme-error-surface: #fff3f1;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-dori-theme]) .product-themed {
    --theme-error-ink: #ffd0c8;
    --theme-error-surface: #3d2929;
    color-scheme: dark;
  }
}
:root[data-dori-theme="dark"] .product-themed {
  --theme-error-ink: #ffd0c8;
  --theme-error-surface: #3d2929;
  color-scheme: dark;
}
.product-themed main :is(.hero,.faq-hero,.detail-hero,.faq-layout,.signup-layout) {
  background: var(--product-bg);
  color: var(--product-ink);
}
.product-themed main :is(.card,.focus-card,.three-steps article,.launch-panel,.signup-panel,.plan-card,.membership-plan-card,.dori-details,.faq-item,.faq-sidebar,.faq-contact,.support-category-card,.support-form-panel,.booking,.ai-intro,.fafsa-dropdown,.application-card,.document-section,.document-dori,.document-delivery-options article,.presentation-workspace [data-presentation-panel],.resource-step,.mock-question-library,.mock-ai-feedback,.financial-table,.financial-help) {
  background: var(--product-surface);
  color: var(--product-ink);
  border-color: var(--product-border);
}
.product-themed main :is(.prep,.risk-notice,.launch-label,.calendar-status,.support-subject,.support-excerpt,.support-status-note,.support-feedback,.task-information,.task-information-body,.fafsa-question,.fafsa-source-note,.fafsa-checklist,.financial-privacy,.public-mock-invite,.mock-dori-prompt,#mock-reflection,#mock-status,.presentation-proposal,.document-kind-guide,.document-dori-invite,.document-dori-tag,.tool-availability,.plan-status,.career-tool-open) {
  background: var(--product-surface-tint);
  color: var(--product-ink);
  border-color: var(--product-border);
}
.product-themed main :is(.faq-item summary,.faq-sidebar a,.fafsa-dropdown summary,.service-topic summary,.dashboard-details>summary,.dashboard-toolkit-links a,.dori-chat-sidebar a,.presentation-timer output,#presentation-practice-cues,.document-dori-invite h3,.mock-ai-feedback h3,.booking h2,.pricing-roadmap h4,.membership-plan-card h4,.document-preview-reference) {
  color: var(--product-ink);
}
.product-themed main :is(.lead,.caption,.notice,.account-caption,.support-secondary,.support-category-card p,.faq-context,.dashboard-details-body>p,.dashboard-details>p,.dashboard-details>summary>span,.dashboard-tool-copy>span,.dashboard-tool-end,.document-dori-invite-note,.booking dt,#resource-step-count) {
  color: var(--product-muted);
}
.product-themed main :is(.eyebrow,.number,.card-link,.text-link,.crumb,.fafsa-source,.fafsa-secondary) { color: var(--product-accent); }
.product-themed main :is(p,li,.service-actions,.faq-answer) a:not(.button,.product-button,.document-dori-cta):not(.document-preview a,.deck-preview-page a),
.product-themed main :is(.account-text-button,.financial-clear,.financial-help-close,.career-tool-nav a,.roadmap-resource-links a,.financial-learning-card a) {
  color: var(--product-accent);
}
.product-themed main :is(p,li,.service-actions,.faq-answer) a:not(.button,.product-button,.document-dori-cta):hover { text-decoration-thickness: 2px; }
.product-themed main :is(input:not([type="checkbox"],[type="radio"],[type="hidden"],[type="range"],[type="color"]),textarea,select) {
  background: var(--product-surface);
  color: var(--product-ink);
  border-color: var(--theme-control-border);
}
.product-themed main :is(input,textarea)::placeholder { color: var(--product-muted); opacity: 1; }
.product-themed main :is(input[type="checkbox"],input[type="radio"],input[type="range"]) { accent-color: var(--product-accent); }
.product-themed main :is(.button,.document-dori-cta,.dori-agent-send,.dori-agent-proposal button) {
  background: var(--product-strong);
  color: #fff;
  border-color: var(--product-strong);
}
.product-themed main :is(.button.light,.button.secondary,.button-outline) {
  background: var(--product-surface);
  color: var(--product-accent);
  border: 1px solid var(--theme-control-border);
}
.product-themed main :is(#resource-steps button,#roadmap-steps button,.presentation-tabs button,#presentation-slide-list button,.application-actions button,.financial-info) {
  background: var(--product-surface-tint);
  color: var(--product-ink);
  border-color: var(--theme-control-border);
}
.product-themed main :is(#resource-steps button[aria-current="step"],#roadmap-steps button[aria-current="step"],.presentation-tabs button[aria-selected="true"],.presentation-tabs button[aria-current],#presentation-slide-list button[aria-current],.dori-chat-sidebar .dori-chat-current) {
  background: var(--product-strong);
  color: #fff;
  border-color: var(--product-strong);
}
.product-themed main :is(.faq-item summary:hover,.faq-sidebar a:hover,.service-topic summary:hover,.fafsa-dropdown summary:hover) { background: var(--product-surface-tint); }
.product-themed main :is(table,.plan-table-scroll,.plan-comparison) { background: var(--product-surface); color: var(--product-ink); }
.product-themed main :is(th,td) { border-color: var(--product-border); }
.product-themed main :is(th,.plan-comparison thead th) { background: var(--product-surface-tint); color: var(--product-ink); }
.product-themed main :is(.plan-comparison caption,.fafsa-dropdown summary:after) { color: var(--product-muted); }
.product-themed main :is(.support-feedback-error,.account-feedback.error,.account-save-feedback.error,#loan-error,#budget-error):not(:empty) {
  background: var(--theme-error-surface);
  color: var(--theme-error-ink);
}
.product-themed :is(a,button,input,textarea,select,summary):focus-visible { outline: 3px solid var(--product-accent); outline-offset: 4px; }
.product-themed main .dori-agent-assistant :is(.dori-agent-links a,.dori-agent-proposal button) { color: var(--chat-reply-ink,#fff); }
.product-themed main .dori-agent-assistant .dori-agent-proposal button { background: transparent; border-color: currentColor; }
.product-themed main .dori-agent-assistant :is(a,button):focus-visible { outline-color: var(--chat-reply-ink,#fff); }
/* Keep print-ready content on paper regardless of the surrounding theme. */
.product-themed main :is(.document-preview,.deck-preview-page) { color-scheme: light; background: #fff; color: #123840; }
.product-themed main :is(.document-preview,.deck-preview-page) :is(h1,h2,h3,h4,p,li,footer) { color: #123840; }
@media (forced-colors: active) {
  .product-themed :is(a,button,input,textarea,select,summary):focus-visible { outline-color: Highlight; }
}
/* The public Ask DORI widget shares the same readable theme surfaces. */
.product-themed:not(.product-account) .dori-agent-root {
  --dori-ink: var(--product-ink);
  --dori-green: var(--product-accent);
  --dori-line: var(--product-border);
}
.product-themed:not(.product-account) :is(.dori-agent-panel,.dori-agent-header,.dori-agent-form,.dori-agent-root textarea) {
  background: var(--product-surface);
  color: var(--product-ink);
  border-color: var(--theme-control-border);
}
.product-themed:not(.product-account) :is(.dori-agent-prompts button,.dori-agent-message) {
  background: var(--product-surface-tint);
  color: var(--product-ink);
  border-color: var(--product-border);
}
.product-themed:not(.product-account) .dori-agent-message.dori-agent-assistant,
.product-themed:not(.product-account) .dori-agent-send {
  background: var(--product-strong);
  color: #fff;
  border-color: var(--product-strong);
}
.product-themed:not(.product-account) :is(.dori-agent-clear,.dori-agent-info a,.dori-agent-links a,.dori-agent-signin) { color: var(--product-accent); }
.product-themed:not(.product-account) .dori-agent-assistant .dori-agent-links a { color: #fff; }
.product-themed main :is(h1,h2,h3,h4,h5,h6,label,legend,summary):not(.document-preview *,.deck-preview-page *) { color: var(--product-ink); }
.product-themed main :is(.dori-hero h1 em,.eyebrow) { color: var(--product-accent); }
.product-themed main :is(.faq-item[open]>summary,.dori-details[open]>summary,.direction-photo,.service-topic,.financial-metrics>div,.document-delivery-options article) {
  background: var(--product-surface-tint);
  border-color: var(--product-border);
  color: var(--product-ink);
}
.product-themed main .strip { background: var(--product-strong); color: #fff; }
.product-themed main .strip :is(h2,p) { color: #fff; }
.product-themed main .strip .button { background: #fff; color: #004d5b; }
.product-themed main :is(.support-attachment,.fafsa-secondary,.financial-clear) {
  background: var(--product-surface);
  border-color: var(--theme-control-border);
}
.product-themed main #support-form :is(input:not([type="checkbox"]),select,textarea) {
  background: var(--product-surface);
  color: var(--product-ink);
  border-color: var(--theme-control-border);
}
.product-themed input::file-selector-button {
  background: var(--product-surface-tint);
  color: var(--product-ink);
  border: 1px solid var(--theme-control-border);
  border-radius: 5px;
}
/* Student career resources stay compact and follow the shared palette. */
.product-themed main .student-resource-group { margin: 14px 0; border: 1px solid var(--product-border); border-radius: 12px; overflow: hidden; background: var(--product-surface); }
.product-themed main .student-resource-group>summary { padding: 18px 20px; cursor: pointer; font-weight: 700; background: var(--product-surface-tint); }
.product-themed main .student-resource-group>p { margin: 18px 20px; }
.student-resource-list { list-style: none; padding: 0 20px; margin: 0; }
.student-resource-list li { padding: 20px 0; }
.student-resource-list li+li { border-top: 1px solid var(--product-border); }
.student-resource-list h3 { font-size: 18px; line-height: 1.4; margin: 0 0 8px; }
.student-resource-list p { margin: 0; font-size: 16px; line-height: 1.6; }
.product-themed main .student-resource-list h3 a { color: var(--product-accent); text-decoration: underline; text-underline-offset: 3px; }
.product-themed main :is(#student-resources,#networking) { display: block; }
.product-themed main .tool-account-gate { max-width: 760px; padding: 28px; border: 1px solid var(--product-border); border-radius: 16px; background: var(--product-surface); color: var(--product-ink); }
