.dashboard {
  padding-block: 28px 56px;
  color: var(--color-ink);
  font-variant-numeric: tabular-nums;
}
.dashboard ul, .dashboard dl, .dashboard dd { margin: 0; }
.dashboard ul { padding: 0; list-style: none; }
.dashboard-heading, .dashboard-section-head, .dashboard-shortcuts {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dashboard-heading {
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}
.dashboard-heading p { font-size: 13px; color: var(--color-ink-secondary); margin-bottom: 4px; }
.dashboard .action-link { gap: 7px; text-decoration: none; }
.dashboard-section-head { min-height: 36px; margin-bottom: 8px; }
.dashboard-section-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  margin-left: auto;
  color: var(--color-primary-strong);
  font-size: 13px;
  font-weight: 550;
  text-decoration: none;
}
.dashboard-section-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.dashboard-section-link:active { color: var(--color-ink); }
.dashboard-empty { color: var(--color-ink-secondary); font-size: 14px; padding-block: 12px; }

.suggestions { min-width: 0; margin-top: 22px; }
.suggestions .dashboard-section-head { justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; }
.suggestions-title-group { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.dashboard button.dashboard-refresh {
  flex: none;
  min-height: 34px;
  height: 34px;
  padding-inline: 10px;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 550;
  color: var(--color-primary-strong);
  border-color: color-mix(in srgb, var(--color-primary) 26%, var(--color-border));
  background: var(--color-surface);
}
.dashboard button.dashboard-refresh:hover:not(:disabled) {
  background: var(--color-primary-soft);
  border-color: var(--color-primary);
  color: var(--color-primary-strong);
}
.dashboard-refresh .icon { width: 14px; height: 14px; }
.dashboard-refresh[data-spinning="true"] .icon {
  animation: dashboard-spin-once 520ms var(--motion-ease);
}
@keyframes dashboard-spin-once {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.dashboard-browse { gap: 4px; white-space: nowrap; }
.dashboard-browse .icon, .stats-link .icon { width: 14px; height: 14px; }
.suggestions ul {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  border: 1px solid #d8e0e5;
  border-radius: var(--radius-card);
  background: var(--color-surface);
}
.suggestion {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  gap: 2px 8px;
  padding: 14px 16px;
  min-width: 0;
}
.suggestion + .suggestion + .suggestion { border-top: 1px solid var(--color-border-subtle); }
.suggestion-featured {
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  padding: 20px;
  background: #eaf2f8;
  border-radius: 11px 0 0 11px;
  border-right: 1px solid #d8e0e5;
}
.suggestion-featured:only-child { grid-column: 1 / -1; border: 0; border-radius: 11px; }
.suggestion-featured + .suggestion:last-child { grid-row: span 2; }
.suggestion-brand { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 550; }
.suggestion-brand > span:not(.company-mark) { overflow-wrap: anywhere; }
.suggestion-brand .card-controls { display: flex; gap: 2px; margin-inline: auto 0; flex: none; }
.suggestion-brand .icon-button { width: var(--control-height); height: var(--control-height); border-color: transparent; }
.dashboard .suggestion-brand button.icon-button:hover:not(:disabled) {
  background: var(--color-primary-soft);
  color: var(--color-primary-strong);
}
.dashboard .suggestion-featured .suggestion-brand button.icon-button:hover:not(:disabled) {
  background: color-mix(in srgb, var(--color-primary) 14%, transparent);
  color: var(--color-primary-strong);
}
.dashboard .company-mark { border: 0; border-radius: 7px; color: white; font-weight: 650; }
.dashboard .company-mark.tone-0 { background: #2f5d62; }
.dashboard .company-mark.tone-1 { background: #7a4e36; }
.dashboard .company-mark.tone-2 { background: #38598b; }
.dashboard .company-mark.tone-3 { background: #5a4a78; }
.dashboard .company-mark.tone-4 { background: #2e6f56; }
.dashboard .company-mark.tone-5 { background: #8a5a2b; }
.suggestion-brand .company-mark { width: 30px; height: 30px; font-size: 11px; }
.suggestion-brand small { color: var(--color-ink-secondary); font-size: 11px; font-weight: 400; }
.suggestion-featured .suggestion-brand { width: 100%; }
.suggestion h3 { grid-column: 1 / -1; margin-top: 4px; }
.suggestion-featured h3 { margin-top: 14px; }
.suggestion .role-link {
  border: 0; background: transparent; color: inherit; padding: 0;
  height: auto; text-align: left; font: inherit;
}
.suggestion-featured .role-link { font-size: clamp(23px, 2.1vw, 30px); letter-spacing: -.035em; line-height: 1.18; }
.suggestion-work {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-top: 4px;
  color: var(--color-ink-secondary);
  font-size: 12.5px;
}
.dashboard .work-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.45;
}
.dashboard .work-remote { background: #eaf6ee; color: #24633c; }
.dashboard .work-hybrid { background: #eaf2fb; color: #22548a; }
.dashboard .work-onsite { background: #fdf3e4; color: #8b4e13; }
.suggestion-featured .work-remote { background: rgb(255 255 255 / 72%); }
.suggestion-featured .work-hybrid { background: rgb(255 255 255 / 72%); }
.suggestion-featured .work-onsite { background: rgb(255 255 255 / 72%); }
.suggestion-summary { max-width: 40ch; margin: 10px 0 16px; font-size: 14px; line-height: 1.5; color: #334c61; }
.suggestion-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; width: 100%; grid-column: 1 / -1; margin-top: 4px; }
.suggestion-featured .suggestion-footer { margin-top: auto; }
.suggestion-footer strong { font-size: 14px; font-weight: 600; }
.suggestion-footer .salary-missing { color: var(--color-ink-secondary); font-size: 12px; font-weight: 400; }
.suggestion .quick-apply { height: auto; line-height: 1.3; }
.dashboard .suggestion :is(button, a).quick-apply:hover:not(:disabled),
.dashboard a.dashboard-saved:hover {
  background: var(--color-primary-soft);
  border-color: var(--color-primary);
  color: var(--color-primary-strong);
}

.dashboard-next {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
}
.dashboard-next-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-control);
  color: #875a21;
  background: #f7ecd7;
}
.dashboard-next-copy { display: grid; min-width: 0; gap: 2px; }
.dashboard-next-copy strong { font-size: 14px; font-weight: 600; }
.dashboard-next-copy span { color: var(--color-ink-secondary); font-size: 12px; overflow-wrap: anywhere; }
.dashboard-review-row { margin-left: auto; flex: none; }
.dashboard-recent { min-width: 0; margin-top: 24px; }
.dashboard-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.dashboard-filters button {
  position: relative; display: flex; align-items: center; gap: 6px; min-height: 36px; height: auto;
  padding: 4px 12px; border: 1px solid transparent; border-radius: var(--radius-control);
  background: transparent; font-size: 12px; color: var(--color-ink-secondary);
}
.dashboard-filters [aria-pressed="true"] { color: var(--color-primary-strong); background: var(--color-primary-soft); font-weight: 600; }
.counter-value { color: var(--color-ink-muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dashboard-recent ul { border-top: 1px solid var(--color-border); }
.dashboard-recent-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto 48px 14px;
  align-items: center; gap: 10px; min-height: 60px; padding: 8px 4px;
  border-bottom: 1px solid var(--color-border-subtle);
  color: var(--color-ink); text-decoration: none;
}
.dashboard-recent-row:hover { background: var(--color-surface); }
.dashboard-recent-row:hover strong { color: var(--color-primary-strong); text-decoration: underline; text-underline-offset: 3px; }
.dashboard-recent-row .company-mark { width: 30px; height: 30px; font-size: 10px; }
.dashboard-identity { display: grid; min-width: 0; overflow-wrap: anywhere; gap: 3px; }
.dashboard-identity strong { font-size: 14px; font-weight: 600; line-height: 1.32; }
.dashboard-identity small, .dashboard-recent time { color: var(--color-ink-secondary); font-size: 12px; }
.dashboard-status {
  display: inline-flex; align-items: center; gap: 5px; width: fit-content;
  padding: 3px 7px; border-radius: 5px;
  color: #505963; background: #eaedf0; font-size: 12px; font-weight: 550;
}
.dashboard-status .icon { width: 13px; height: 13px; }
.status-submitted { color: var(--color-success-dark); background: var(--color-success-bg); }
.status-recorded { color: var(--color-primary-strong); background: var(--color-primary-soft); }
.status-review { color: var(--color-warning-text); background: #fff0d8; }
.status-preparing, .status-submitting { color: var(--color-primary-strong); background: var(--color-primary-soft); }

.dashboard-list-footer a {
  display: flex; align-items: center; gap: 8px; min-height: 42px; padding-inline: 4px;
  color: var(--color-primary-strong); text-decoration: none; font-size: 13px; font-weight: 550;
}
.dashboard-list-footer a:hover { background: var(--color-surface); text-decoration: underline; text-underline-offset: 3px; }
.dashboard-list-footer a .icon:last-child { margin-left: auto; }
.dashboard-overview {
  margin-block: 0 16px;
  padding: 12px 16px 14px;
  border: 1px solid #dce4ea;
  border-radius: var(--radius-card);
  background: #f2f6f9;
  font-variant-numeric: tabular-nums;
}
.dashboard-progress-body {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}
.dashboard-breakdown {
  display: grid;
  grid-template-columns: minmax(64px, 96px) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding-inline-start: 20px;
  border-inline-start: 1px solid #dce4ea;
}
.weekly-activity { min-width: 0; }
.weekly-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.weekly-heading h3 { font-size: 12px; font-weight: 500; color: var(--color-ink-secondary); }
.weekly-heading > span { color: var(--color-ink-secondary); font-size: 11px; }
.weekly-total { display: block; margin-top: 2px; font-size: 25px; font-weight: 600; line-height: 1.1; }
.weekly-plot { --plot-height: 72px; position: relative; margin-top: 4px; padding-bottom: 24px; }
.weekly-plot > svg { display: block; width: 100%; height: var(--plot-height); }
.weekly-guides { stroke: #d9e2e9; stroke-width: 1; }
.weekly-area { fill: #deeaf4; }
.weekly-line { fill: none; stroke: #336d9e; stroke-width: 2; stroke-linejoin: round; }
.weekly-dot-edge { stroke: #336d9e; stroke-width: 6; }
.weekly-dot-core { stroke: #f2f6f9; stroke-width: 3.5; }
.weekly-days { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.dashboard-overview .weekly-days button {
  position: relative; display: flex; align-items: flex-end; justify-content: center; height: 100%; min-width: 0;
  padding: 0 0 2px; border: 0; border-radius: 4px; background: transparent;
  color: var(--color-ink-secondary); font-size: 11px;
}
.dashboard-overview .weekly-plot .weekly-days > button:is(:hover, :focus) {
  background-color: rgb(133 186 232 / 30%);
  color: var(--color-primary-strong);
}
.weekly-days button { --point-y: attr(data-point-y type(<number>), .5); }
.weekly-tip {
  position: absolute; z-index: 2; bottom: calc(100% - var(--plot-height) * var(--point-y) + 6px); left: 50%; transform: translateX(-50%); display: none;
  padding: 5px 7px; border-radius: 5px; color: white; background: #24394a;
  font-size: 11px; line-height: 1.4; white-space: nowrap; pointer-events: none;
}
.weekly-tip strong { display: block; font-weight: 600; }
.weekly-days button:is(:hover,:focus) .weekly-tip { display: block; }
.weekly-days button:nth-child(-n+2) .weekly-tip { left: 0; transform: none; }
.weekly-days button:nth-last-child(-n+2) .weekly-tip { left: auto; right: 0; transform: none; }
.status-chart { position: relative; width: 100%; aspect-ratio: 1; }
.status-chart svg { display: block; width: 100%; fill: none; stroke-width: 8; }
.status-chart circle { stroke: var(--segment); }
.status-chart > div { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; pointer-events: none; }
.status-chart > div > strong { color: #273f53; font-size: 24px; font-weight: 600; line-height: 1; }
.status-chart > div > span { font-size: 10px; color: var(--color-ink-secondary); margin-top: 3px; }
.chart-track { --segment: #e1e8ee; }
.part-review { --segment: #b58445; }
.part-progress { --segment: #487ba5; }
.part-sent { --segment: #488578; }
.part-draft { --segment: #8898aa; }
.status-chart [data-stat] { cursor: help; }
.status-chart a [data-stat] { cursor: pointer; }
.status-chart:has(.is-highlighted) [data-stat]:not(.is-highlighted) { opacity: .46; }
.dashboard-overview dl > div { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 12px; border-radius: 5px; padding-inline: 5px; }
.dashboard-overview dl > div:is(:hover, :focus-within, .is-highlighted) { background: #dcecf9; }
.dashboard-overview dt i { display: inline-block; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--segment); }
.dashboard-overview dd { flex: none; color: #273f53; font-weight: 600; text-align: end; }
.dashboard-overview dt :is(button, a), .dashboard-overview dt button:hover:not(:disabled), .dashboard-overview dt button:active:not(:disabled) {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; min-height: 28px;
  height: auto; border: 0; border-radius: 2px; background: transparent; color: inherit; font: inherit; text-decoration: none;
}
.dashboard-overview dt a::after { content: ""; position: absolute; inset: 0; border-radius: 5px; }
.dashboard-overview dt a:focus-visible { outline: none; }
.dashboard-overview dt a:focus-visible::after { outline: 2px solid var(--color-focus); outline-offset: 1px; }
.stats-link { gap: 5px; white-space: nowrap; }
.chart-tip {
  position: absolute; z-index: 2; bottom: calc(100% + 18px); left: 0; width: 214px; max-width: 68vw;
  padding: 8px 10px; border-radius: 7px; background: #24394a; color: white; font-size: 12px;
  line-height: 1.4; box-shadow: 0 3px 12px #10233625;
}
.chart-tip[hidden] { display: none; }
.chart-tip strong { font-weight: 600; }
.chart-tip span { display: block; margin-top: 3px; color: #e1ebf1; }

@media (max-width: 600px) {
  .dashboard-recent-row { grid-template-columns: auto minmax(0, 1fr) auto; row-gap: 3px; }
  .dashboard-recent-row .company-mark { grid-row: span 2; }
  .dashboard-recent-row .dashboard-status { grid-row: 2; grid-column: 2; }
  .dashboard-recent-row time { grid-column: 3; grid-row: 1; }
  .dashboard-recent-row > .icon { display: none; }
}
@media (max-width: 680px) {
  .dashboard { padding-block: 18px 24px; }
  .dashboard-heading { flex-wrap: wrap; margin-bottom: 18px; padding-bottom: 12px; }
  .dashboard-shortcuts .icon { display: none; }
  .suggestions .dashboard-section-head { flex-wrap: wrap; gap: 6px 8px; }
  .dashboard .section-title { font-size: 22px; }
  .suggestions-title-group { gap: 8px; }
  .dashboard-browse { font-size: 12px; }
  .dashboard-browse .icon { width: 14px; height: 14px; }
  .dashboard-next { flex-wrap: wrap; gap: 6px 10px; }
  .dashboard-next-copy { flex: 1; }
  .dashboard-review-row { flex-shrink: 0; }
  .dashboard-filters { margin-top: 12px; }
  .dashboard-filters button { min-height: var(--control-height); }
  .dashboard-review-row .action-link .icon { display: none; }
  .dashboard-overview { padding: 10px 12px; }
  .dashboard-progress-body { grid-template-columns: 1fr; gap: 10px; }
  .dashboard-breakdown { grid-template-columns: 68px minmax(0, 1fr); gap: 4px 12px; padding: 8px 0 0; border-inline-start: 0; border-top: 1px solid #dce4ea; }
  .weekly-plot { --plot-height: 52px; }

  .dashboard-next-icon { width: 28px; height: 28px; }

  .suggestions ul { grid-template-columns: 1fr; }
  .suggestion { padding: 10px 12px; }
  .suggestion-featured { grid-row: auto; border-right: 0; border-radius: 11px 11px 0 0; padding: 14px 12px; }
  .suggestion-featured + .suggestion:last-child { grid-row: auto; }
  .suggestion + .suggestion { border-top: 1px solid var(--color-border-subtle); }
  .suggestion-featured h3 { margin-top: 8px; }
  .suggestion-summary { margin: 6px 0 8px; font-size: 13px; }
  .suggestion:not(.suggestion-featured) .suggestion-brand .company-mark { width: 22px; height: 22px; font-size: 9px; }
  .suggestion:not(.suggestion-featured) .role-link { font-size: 16px; }
  .suggestion:not(.suggestion-featured) .suggestion-work { margin-bottom: 2px; }
  .suggestion:not(.suggestion-featured) .suggestion-footer { margin-top: -2px; }
}
@media (max-width: 375px) {
  .dashboard-next-icon { display: none; }

}
@media (375px < width <= 680px) {
  .dashboard-breakdown { grid-template-columns: 58px minmax(0, 1fr); }
  .dashboard-breakdown dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 8px; }
  .dashboard-overview dl > div { padding-inline: 3px; font-size: 11px; }
}
@media (hover: none) { .chart-tip { pointer-events: none; } }

/* Apply For Me controls shared by Dashboard and the Auto Apply toolbar. */
@property --ai-glow-angle {
  syntax: "<angle>";
  initial-value: 120deg;
  inherits: false;
}

@keyframes ai-glow-orbit {
  to { --ai-glow-angle: 480deg; }
}

.apply-for-me-card {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  margin-bottom: 18px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  transition: border-color var(--motion-base) var(--motion-ease),
    box-shadow 280ms var(--motion-ease),
    background-color var(--motion-base) var(--motion-ease);
}
.apply-for-me-card[data-mode="on"]:where(:has(input:checked)) {
  border: 1.5px solid transparent;
  background:
    linear-gradient(var(--color-surface), var(--color-surface)) padding-box,
    conic-gradient(
      from var(--ai-glow-angle),
      #5aa4f5,
      #2bc4b6,
      #7c86f2,
      #d684c4,
      #5aa4f5
    ) border-box;
  box-shadow:
    -18px 0 28px -10px rgb(43 196 182 / 24%),
    0 2px 22px -6px rgb(90 164 245 / 22%),
    18px 0 28px -10px rgb(124 134 242 / 24%);
  animation: ai-glow-orbit 10s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .apply-for-me-card[data-mode="on"]:where(:has(input:checked)) {
    animation: none;
  }
}
.apply-for-me-card[data-mode="locked"] {
  background: var(--color-surface-subtle);
}
.afm-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-control);
  background: #eceee9;
  color: var(--color-ink-secondary);
  transition: background-color var(--motion-base) var(--motion-ease),
    color var(--motion-base) var(--motion-ease);
}
[data-mode="on"]:where(:has(input:checked)) > .afm-icon {
  background: color-mix(in srgb, var(--color-ai) 14%, var(--color-surface));
  color: var(--color-ai-strong);
}
[data-mode="locked"] > .afm-icon {
  background: var(--color-ai-soft);
  color: var(--color-ai-strong);
}
.afm-icon .icon { width: 18px; height: 18px; }
.afm-heading, .afm-control-row, .afm-plan-demo, .afm-badge, .afm-help {
  display: flex;
  align-items: center;
}
.afm-heading { position: relative; gap: 8px; }
.afm-heading > strong, .apply-for-me-card .afm-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.015em;
  color: var(--color-ink);
}
.afm-description, .afm-tooltip p {
  color: var(--color-ink-secondary);
  font-size: 13.5px;
  line-height: 1.48;
}
.afm-description { margin-top: 3px; }
.afm-description a { color: var(--color-ai-strong); font-weight: 550; white-space: nowrap; }
.afm-badge {
  flex: none;
  gap: 5px;
  width: fit-content;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 11.5px;
  line-height: 16px;
  font-weight: 600;
}
.afm-badge-on {
  color: var(--color-ai-strong);
  background: color-mix(in srgb, var(--color-ai) 12%, var(--color-surface));
}
.afm-badge-pro {
  color: var(--color-ai-strong);
  background: var(--color-ai-soft);
}
.afm-badge-off { color: var(--color-ink-secondary); background: #eceae5; }
.afm-badge-on::before, .afm-badge-off::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.afm-badge-on::before { background: var(--color-ai); }
.afm-badge .icon { width: 12px; height: 12px; }
.afm-help { position: relative; }
button.afm-tip-trigger {
  width: 26px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  color: var(--color-ink-muted);
  border-radius: 50%;
}
.afm-tip-trigger .icon { width: 15px; height: 15px; }
button.afm-tip-trigger:hover:not(:disabled), .afm-plan-demo button:hover:not(:disabled) {
  background: color-mix(in srgb, var(--color-ink) 7%, transparent);
  color: var(--color-ink);
}
.afm-popover {
  position: absolute;
  z-index: 8;
  top: 100%;
  left: 0;
  width: 292px;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  color: var(--color-ink);
  background: var(--color-surface);
  box-shadow: 0 6px 20px rgb(40 40 37 / 10%);
  text-align: left;
}
.afm-tooltip strong { display: block; margin-bottom: 4px; font-size: 14px; }
.afm-controls {
  display: grid;
  justify-items: end;
  gap: 6px;
  padding-inline-start: 20px;
  border-inline-start: 1px solid var(--color-border-subtle);
}
[data-mode="on"]:where(:has(input:checked)) > .afm-controls {
  border-inline-start-color: var(--color-ai-border);
}
.afm-control-row { gap: 12px; flex-wrap: wrap; }
.afm-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 2px 0;
  color: var(--color-ink-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
[data-mode="on"] .afm-switch:where(:has(input:checked)) {
  color: var(--color-ai-strong);
}
.afm-switch input[role="switch"] {
  width: 48px;
  height: 28px;
  border-radius: 14px;
  border: 1px solid #c9c3b8;
  background: #e7e3dc;
}
.afm-switch input[role="switch"]::before {
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  background: var(--color-surface);
  box-shadow: 0 1px 2px rgb(40 40 37 / 18%);
}
.afm-switch input[role="switch"]:checked { background: var(--color-ai); border-color: var(--color-ai); }
.afm-switch input[role="switch"]:checked::before { background: #fff; transform: translateX(20px); }
.afm-switch input[role="switch"]:active::before { transform: scaleX(1.1); }
.afm-switch input[role="switch"]:checked:active::before { transform: translateX(20px) scaleX(1.1); }
.afm-switch input[role="switch"]:enabled:checked:hover { background: var(--color-ai-hover); border-color: var(--color-ai-hover); }
.afm-switch input[role="switch"]:focus-visible { outline: 2px solid var(--color-ai); outline-offset: 2px; }
.afm-switch span { min-width: 24px; text-align: left; }
.afm-switch:has(:disabled), :is(.afm-switch, .aa-afm-pill) input:disabled { cursor: default; }
:is(.afm-switch, .aa-afm-pill) input:disabled { opacity: .55; background: #e7e5e0; border-color: #d6d2ca; }
:is(.afm-switch, .aa-afm-pill) input:enabled:not(:checked):hover { background: #dcd7ce; border-color: #b7b0a4; }
.afm-plan-demo { gap: 2px; font-size: 11px; color: var(--color-ink-muted); }
.afm-plan-demo span { margin-right: 3px; }
.afm-plan-demo button {
  min-height: 24px;
  height: 24px;
  padding: 0 7px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 6px;
  font-size: inherit;
  color: var(--color-ink-secondary);
}
.afm-plan-demo button[aria-pressed="true"] {
  border-color: var(--color-border);
  background: var(--color-surface);
  color: var(--color-ink);
}
a.afm-upgrade {
  min-height: 38px;
  height: 38px;
  padding-inline: 16px;
  border-radius: var(--radius-control);
  color: #fff;
  border-color: var(--color-ai);
  background: var(--color-ai);
  font-size: 13px;
  font-weight: 600;
}
a.afm-upgrade:hover {
  color: #fff;
  background: var(--color-ai-hover);
  border-color: var(--color-ai-hover);
}
@media (max-width: 680px) {
  .apply-for-me-card { grid-template-columns: 36px minmax(0, 1fr); align-items: start; gap: 10px 12px; padding: 14px; }
  .afm-controls {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 12px;
    padding-inline-start: 0;
    padding-top: 10px;
    border-inline-start: 0;
    border-top: 1px solid var(--color-border-subtle);
  }
  [data-mode="on"]:where(:has(input:checked)) > .afm-controls {
    border-top-color: var(--color-ai-border);
  }
  .afm-heading .afm-help { position: static; }
  .afm-heading .afm-popover { width: min(292px, 100%); }
}
