/* Shared visual tokens and native controls for the career assistant and workspace. */
:root {
  color-scheme: light;
  --ui-page: #f4f6f5;
  --ui-surface: #ffffff;
  --ui-subtle: #f7f9f8;
  --ui-ink: #202d2b;
  --ui-muted: #596b66;
  --ui-line: #dce4e0;
  --ui-input-line: #81958a;
  --ui-brand: #176454;
  --ui-brand-hover: #104e41;
  --ui-tint: #eaf3ef;
  --ui-selected-line: #669b88;
  --ui-danger: #a4363c;
  --ui-danger-bg: #fdf0f0;
  --ui-warning: #805b1c;
  --ui-warning-bg: #fbf5e8;
  --ui-success: #216746;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
body { background: var(--ui-page); color: var(--ui-ink); font-size: 14px; line-height: 1.65; }
a { color: var(--ui-brand); text-underline-offset: 4px; }
button, .button, .btn, .mini, .button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--ui-input-line);
  border-radius: 10px;
  background: var(--ui-surface);
  color: var(--ui-ink);
  font: 600 13px/1.5 "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}
button:hover, .button:hover, .btn:hover, .mini:hover, .button-link:hover {
  background: var(--ui-subtle); border-color: var(--ui-selected-line);
}
button:active:not(:disabled), .button:active, .btn:active:not(:disabled) { background: var(--ui-tint); }
button.primary, a.primary, .btn.primary {
  background: var(--ui-brand); border-color: var(--ui-brand); color: #fff;
  box-shadow: inset 0 1px 0 #ffffff18, 0 2px 3px #173b2410;
}
button.primary:hover, a.primary:hover, .btn.primary:hover { background: var(--ui-brand-hover); border-color: var(--ui-brand-hover); }
button.quiet, .btn.quiet, a.button.quiet { background: transparent; border-color: transparent; color: var(--ui-muted); box-shadow: none; }
button.quiet:hover, .btn.quiet:hover, a.button.quiet:hover { background: #e8eeeb; color: var(--ui-ink); }
button.danger, .btn.danger { color: var(--ui-danger); background: var(--ui-surface); border-color: #e3c5c6; }
button.danger:hover, .btn.danger:hover { background: var(--ui-danger-bg); border-color: #bd7d81; }
button:disabled, .btn:disabled, .primary:disabled, .record .actions button:disabled {
  opacity: 1; color: #708079; background: #eaf0ec; border-color: #dce4df; box-shadow: none; cursor: not-allowed;
}
input, select, textarea, .select {
  color: var(--ui-ink); background: var(--ui-surface); border-color: var(--ui-input-line);
  border-radius: 9px; min-height: 44px; font-size: 14px;
}
input::placeholder, textarea::placeholder { color: #718078; opacity: 1; }
input:disabled, select:disabled, textarea:disabled { background: #edf1ee; color: #67766e; opacity: 1; }
input[type="checkbox"] { accent-color: var(--ui-brand); min-height: auto; }
input[type="file"] { overflow: hidden; }
input[type="file"]::file-selector-button {
  color: var(--ui-brand); background: var(--ui-tint); border: 0; border-radius: 6px;
  padding: 7px 10px; margin-right: 10px; font: inherit; cursor: pointer;
}
button:focus-visible, a:focus-visible, summary:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible, .card-head:focus-visible {
  outline: 3px solid var(--ui-brand); outline-offset: 3px; box-shadow: 0 0 0 5px #fff;
}
input:focus, select:focus, textarea:focus { border-color: var(--ui-brand); }
summary { touch-action: manipulation; }
summary:hover { color: var(--ui-brand); }
.muted, .hint, .sub { color: var(--ui-muted); }
.message:not(:empty) {
  padding: 11px 14px; margin-block: 10px; background: var(--ui-tint);
  border: 1px solid #cbded3; border-radius: 9px; color: var(--ui-brand);
}
.message.error:not(:empty) { color: var(--ui-danger); border-color: #ebced0; background: var(--ui-danger-bg); }
.message.success:not(:empty) { color: var(--ui-success); }
.pill { color: var(--ui-brand); background: var(--ui-tint); border-color: #c9ddd2; border-radius: 6px; font-size: 12px; }
.pill.warning { color: var(--ui-warning); background: var(--ui-warning-bg); border-color: #e5d4ae; }
.empty { color: var(--ui-muted); background: var(--ui-subtle); border-color: #c7d5cc; padding: 28px 20px; line-height: 1.9; }
.auth-layer, .login { background: var(--ui-page); backdrop-filter: none; }
.auth-box, .login-box { background: var(--ui-surface); border-color: var(--ui-line); box-shadow: 0 16px 56px #2444340d; border-radius: 18px; padding: 32px; }
.auth-box .eyebrow { color: var(--ui-brand); font-weight: 700; }
.auth-box h1, .login-box h2 { color: var(--ui-ink); }
.login-error, .alert { color: var(--ui-danger); }
.brand-mark, .mark { background: var(--ui-brand); color: #fff; border-radius: 10px; }
.small, .hint { font-size: 13px; }
.record .actions button { min-height: 44px; padding: 9px 13px; font-size: 13px; }
.record h3, .section-heading h3 { margin-bottom: 0; }
.section-heading > *, .page-header > *, .top > * { min-width: 0; }
h1, h2, h3, .version-title, .resume-choice { overflow-wrap: anywhere; }
form[aria-busy="true"] button[type="submit"], form[aria-busy="true"] button.primary,
button[aria-busy="true"] { cursor: progress; }
form[aria-busy="true"] button[type="submit"]::before,
button[aria-busy="true"]::before {
  content: ""; display: inline-block; width: 14px; height: 14px; flex: 0 0 14px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: ui-spin 800ms linear infinite;
}
.action-highlight { position: relative; overflow: hidden; isolation: isolate; }
.action-highlight::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, #ffffff20 48%, transparent 62%);
  transform: translateX(-120%);
}
.action-highlight:not(:disabled):hover::after,
.action-highlight:not(:disabled):focus-visible::after { animation: ui-sheen 650ms ease-out; }
@keyframes ui-spin { to { transform: rotate(360deg); } }
@keyframes ui-sheen { to { transform: translateX(120%); } }
@media (max-width: 560px) {
  input, select, textarea, .select { font-size: 16px; }
  summary { min-height: 44px; align-content: center; }
  .auth-box, .login-box { padding: 25px; }
  .top-actions { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  button, .button, .btn, .mini { border: 1px solid ButtonText; }
  button:disabled { color: GrayText; border-color: GrayText; }
}
