/* The dashboard (lib/dashboard.ts). Uses the tokens in styles.css; nothing
   here redefines them. Quiet by design: one band of colour for the flow, small
   tinted tags for kinds and stages, everything else ink on paper. */

.d { padding: 8px 0 40px; }
.d-h { font-size: 1.15rem; line-height: 1.3; letter-spacing: -0.01em; font-weight: 700; display: flex; align-items: center; gap: 8px; margin: 0; }
.d-count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--sun); color: var(--ink); font-size: 13px; font-weight: 700; }
.d-sample { margin: 4px 0 0; padding: 10px 14px; border-radius: var(--r-ctl); background: var(--sun-soft); color: #5c4400; font-size: 14.5px; }
.d-sample a { font-weight: 600; }

/* the hero: a pine slab like the home page's, what needs you laid over its bottom edge */
.d-hero { position: relative; isolation: isolate; overflow: hidden; margin-top: 8px; padding: clamp(26px, 4vw, 44px) clamp(20px, 4vw, 44px) 92px; border-radius: clamp(22px, 3vw, 34px); background: var(--pine); color: var(--on-pine); }
.d-hero-sun { position: absolute; z-index: -1; right: -220px; top: -320px; width: 760px; height: 760px; border-radius: 50%; background: radial-gradient(circle, rgba(245, 197, 66, .36), rgba(245, 197, 66, .08) 40%, rgba(245, 197, 66, 0) 64%); pointer-events: none; animation: d-glow 9s ease-in-out infinite alternate; }
.d-hero-rings { position: absolute; z-index: -1; right: -320px; top: -260px; width: 980px; height: 980px; border-radius: 50%; pointer-events: none;
  background: repeating-radial-gradient(circle at center, transparent 0 70px, rgba(238, 246, 242, .08) 71px 72px);
  -webkit-mask-image: radial-gradient(circle, #000 28%, transparent 70%); mask-image: radial-gradient(circle, #000 28%, transparent 70%); animation: d-spin 120s linear infinite; }
@keyframes d-glow { to { transform: translate(-40px, 30px) scale(1.06); } }
@keyframes d-spin { to { transform: rotate(360deg); } }
.d-hero-in { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px 32px; flex-wrap: wrap; }
.d-hero-copy { min-width: 0; }
.d-hi { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0; font-size: 15px; font-weight: 650; color: #fff; }
.d-hi span { font-weight: 400; font-size: 13.5px; color: var(--on-pine-2); }
.d-hero h1 { margin: 10px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 14px; color: #fff; line-height: .95; }
.d-hero h1 .num { font-size: clamp(4rem, 2.6rem + 6vw, 7.5rem); font-weight: 750; letter-spacing: -.06em; }
.d-hero-w { font-size: clamp(1.3rem, 1rem + 1vw, 1.9rem); font-weight: 650; letter-spacing: -.02em; color: var(--on-pine); }
.d-hero-sub { margin: 10px 0 0; font-size: 15.5px; color: var(--on-pine-2); }
.d-hero-side { display: grid; gap: 10px; justify-items: stretch; min-width: min(100%, 290px); }
/* the auto-apply switch */
.d-auto { margin: 0; }
.d-auto button, div.d-auto { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 18px 14px 14px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 18px; background: rgba(255, 255, 255, .08); color: #fff; font: inherit; text-align: left; cursor: pointer; backdrop-filter: blur(6px); transition: background .2s, border-color .2s; }
div.d-auto { cursor: default; }
.d-auto button:hover { background: rgba(255, 255, 255, .14); }
.d-auto button:focus-visible { outline: 2px solid var(--sun); outline-offset: 3px; }
.d-sw { position: relative; flex: none; width: 50px; height: 30px; border-radius: 999px; background: rgba(255, 255, 255, .22); transition: background .25s; }
.d-sw i { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); transition: left .3s var(--ease-out); }
.d-auto.on .d-sw { background: var(--sun); }
.d-auto.on .d-sw i { left: 23px; }
.d-auto-t { display: grid; gap: 2px; }
.d-auto-t b { font-size: 16px; font-weight: 700; }
.d-auto-t span { font-size: 13.5px; color: var(--on-pine-2); }
/* after the free ones have gone out: the nudge to go faster */
.d-up { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; padding: 11px 16px; border-radius: 14px; background: var(--sun); color: var(--ink); text-decoration: none; box-shadow: 0 10px 24px -12px rgba(245, 197, 66, .8); transition: transform .15s var(--ease-out); }
.d-up:hover { transform: translateY(-1px); text-decoration: none; }
.d-up b { font-weight: 750; }
.d-up span { font-size: 13.5px; color: #5c4400; }
/* what needs you, laid over the hero */
.d-hero + .d-needs { position: relative; z-index: 1; margin: -64px clamp(8px, 2vw, 22px) 0; background: var(--paper); border-color: transparent; box-shadow: 0 2px 6px rgba(9, 40, 31, .08), 0 30px 60px -28px rgba(9, 40, 31, .45); }
.d-hero + .d-needs.calm { background: var(--paper); }
.d-flow { background: var(--paper); box-shadow: var(--shadow-card); }
/* everything arrives once, in order */
.d > * { animation: d-rise .7s var(--ease-out) both; }
.d > :nth-child(2) { animation-delay: 90ms; } .d > :nth-child(3) { animation-delay: 170ms; } .d > :nth-child(4) { animation-delay: 240ms; } .d > :nth-child(5) { animation-delay: 300ms; }
@keyframes d-rise { from { opacity: 0; transform: translateY(18px); } }
.d-band { animation: d-draw 1.6s cubic-bezier(.45, 0, .2, 1) .35s both; }
@keyframes d-draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@media (max-width: 600px) {
  .d-hero { padding-bottom: 80px; }
  .d-hero-side { width: 100%; }
  .d-hero + .d-needs { margin: -56px 6px 0; }
}
@media (prefers-reduced-motion: reduce) { .d > *, .d-band, .d-hero-sun, .d-hero-rings { animation: none; } }

/* header */
.d-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 20px 0 22px; flex-wrap: wrap; }
.d-head h1 { font-size: clamp(2rem, 1.6rem + 1.6vw, 2.8rem); }
.d-head p { margin: 6px 0 0; }

/* needs you */
.d-needs { border: 1px solid var(--line); border-radius: var(--r-panel); padding: 20px 20px 8px; background: var(--paper); box-shadow: var(--shadow-card); }
.d-needs.calm { padding-bottom: 20px; box-shadow: none; background: var(--mist); border-color: transparent; }
.d-calm { display: flex; align-items: center; gap: 12px; margin: 12px 0 0; color: var(--ink-2); font-size: 15.5px; }
.d-ok { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--pine); color: #fff; }
.d-ok svg { width: 15px; height: 15px; }
.d-need-list { list-style: none; margin: 10px 0 0; padding: 0; }
.d-need { display: grid; grid-template-columns: 74px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.d-need:first-child { border-top: 0; }
.d-need > .d-kind { justify-self: stretch; text-align: center; }
.d-need-what { min-width: 0; display: grid; gap: 1px; }
.d-need-what b { font-weight: 650; font-size: 16.5px; }
.d-need-what span { color: var(--ink-2); font-size: 15px; overflow-wrap: anywhere; }
.d-need-what .d-when { font-size: 14px; color: var(--ink); }
.d-need.urgent .d-when { color: var(--err); font-weight: 600; }
.d-need.urgent .d-when .muted { font-weight: 400; }
.d-act { white-space: nowrap; }
.d-act svg { width: 14px; height: 14px; }
.d-more { border-top: 1px solid var(--line); }
.d-more summary { cursor: pointer; padding: 12px 0; font-size: 15px; font-weight: 600; color: var(--pine); list-style: none; }
.d-more summary::-webkit-details-marker { display: none; }
.d-more[open] summary { display: none; }
.d-more .d-need-list { margin: 0; }
.d-more .d-need:first-child { border-top: 0; }
@media (max-width: 600px) {
  .d-needs { padding: 16px 16px 4px; }
  .d-need { grid-template-columns: auto 1fr; gap: 4px 12px; align-items: start; padding: 12px 0; }
  .d-need .d-kind { margin-top: 2px; justify-self: start; }
  .d-need .d-act { grid-column: 2; justify-self: start; min-height: 36px; padding: 6px 12px; font-size: 14px; margin-top: 6px; }
  .d-need-what b { font-size: 16px; }
  .d-need-what span { font-size: 14.5px; }
}

/* kinds and stages: small tinted tags */
.d-kind, .d-stage { display: inline-block; justify-self: start; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .02em; line-height: 1.35; white-space: nowrap; background: var(--mist); color: var(--ink-2); }
.k-oa, .s-oa, .s-oa_done { background: #efe8fd; color: var(--oa); }
.k-reply, .k-recruiter { background: #fdecc8; color: #7a5200; }
.k-interview, .s-interview { background: #e3eefc; color: var(--interview); }
.k-offer, .s-offer { background: var(--sun); color: var(--ink); }
.k-rejected, .s-rejected { background: var(--err-soft); color: var(--err); }
.k-send { background: var(--pine); color: #fff; }
.k-setup, .k-form { background: var(--mint); color: var(--pine); }
.k-applied, .s-waiting { background: var(--mint); color: var(--pine); }
.s-no_reply { background: var(--mist); color: var(--slate); }

/* the flow: five steps over one band */
.d-flow { margin-top: 18px; border: 1px solid var(--line); border-radius: var(--r-panel); padding: 18px 12px 16px; }
.d-steps { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.d-step { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; padding: 6px 10px 132px; border-radius: 14px; text-decoration: none; color: var(--ink); transition: background-color .15s ease; }
.d-step:hover { background: rgba(14, 74, 59, .05); text-decoration: none; }
.d-step:hover .d-step-l { color: var(--pine); text-decoration: underline; text-underline-offset: 3px; }
.d-step-l { font-size: 14.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.d-step-n { font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.5rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.d-step-s { font-size: 13px; color: var(--slate); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.d-band { position: absolute; left: 0; right: 0; bottom: 6px; width: 100%; height: 120px; pointer-events: none; }
.d-rest { margin: 12px 10px 0; font-size: 14.5px; color: var(--slate); display: flex; flex-wrap: wrap; gap: 4px 0; }
.d-rest a { color: var(--ink-2); }
.d-dot { margin: 0 8px; color: var(--line-2); }
@media (max-width: 600px) {
  .d-flow { padding: 14px 10px 12px; }
  .d-step { padding: 4px 3px 92px; }
  .d-band { height: 84px; bottom: 4px; }
  .d-step-l { font-size: 11.5px; letter-spacing: -0.01em; }
  .d-step-n { font-size: 1.55rem; }
  .d-step-s { font-size: 11px; white-space: normal; line-height: 1.25; }
  .d-rest { margin: 12px 4px 0; }
}

/* latest + next */
.d-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin-top: 18px; }
.d-card { border: 1px solid var(--line); border-radius: var(--r-panel); padding: 18px 20px 10px; min-width: 0; }
.d-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.d-card-head a { display: inline-flex; align-items: center; gap: 4px; font-size: 14.5px; color: var(--ink-2); white-space: nowrap; }
.d-card-head svg { width: 14px; height: 14px; }
.d-sending { margin: 8px 0 0; font-size: 14.5px; color: var(--pine); font-weight: 600; }
.d-li { list-style: none; margin: 8px 0 0; padding: 0; }
.d-li li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; }
.d-li li:first-child { border-top: 0; }
.d-li.plain li { grid-template-columns: minmax(0, 1fr) auto; }
.d-li-what { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.d-li-what b { color: var(--ink); font-weight: 650; }
.d-li-when { font-size: 13.5px; white-space: nowrap; }
@media (max-width: 600px) { .d-li li { align-items: start; } .d-li-what { white-space: normal; } }

/* sub-pages */
.d-subhead { padding: 18px 0 14px; }
.d-subhead h1 { font-size: clamp(1.9rem, 1.5rem + 1.5vw, 2.6rem); margin-top: 10px; }
.d-subhead p { margin: 6px 0 0; }
.d-back { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; color: var(--slate); text-decoration: none; }
.d-back:hover { color: var(--ink); }
.d-back svg { width: 14px; height: 14px; }
.d-tools { margin: 4px 0 18px; }
.d-tools a:not(.btn) { color: var(--pine); }
.d .d-h + .d-rows { margin-top: 10px; }
.d-rows + .d-h { margin-top: 28px; }
.d-rows { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.d-row { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--line); }
.d-row:first-child { border-top: 0; }
.d-row.past { color: var(--slate); }
.d-row.past b { color: var(--ink-2); font-weight: 600; }
.d-row-main { display: grid; gap: 1px; min-width: 0; }
.d-row-main b { font-weight: 650; }
.d-row-main span { font-size: 15px; color: var(--ink-2); overflow-wrap: anywhere; }
.d-row.past .d-row-main span { color: var(--slate); }
.d-meta { font-size: 13.5px !important; color: var(--slate) !important; }
.d-row-side { display: flex; align-items: center; gap: 14px; font-size: 14.5px; text-align: right; flex-wrap: wrap; justify-content: flex-end; }
.d-soon { color: var(--err); }
.d-go { display: inline-flex; align-items: center; gap: 5px; color: var(--pine); font-weight: 600; font-size: 14.5px; white-space: nowrap; }
.d-go svg { width: 13px; height: 13px; }
.d-go.small { font-size: 13px; font-weight: 500; margin-left: 8px; }
.d-empty { margin: 14px 0; padding: 22px; border-radius: var(--r-card); background: var(--mist); color: var(--ink-2); }
@media (max-width: 600px) {
  .d-row { grid-template-columns: 1fr; gap: 6px; padding: 12px 14px; }
  .d-row-side { justify-content: flex-start; text-align: left; }
}

/* applications */
.d-filters { display: grid; gap: 12px; margin: 4px 0 16px; }
.d-filters .chip { text-decoration: none; }
.d-search { width: 100%; max-width: 360px; font: 400 16px/1.3 var(--font); padding: 10px 14px; border: 1px solid var(--line-2); border-radius: var(--r-ctl); background: var(--paper); color: var(--ink); }
.d-apps { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.d-app { border-top: 1px solid var(--line); }
.d-app:first-child, .d-app[hidden] + .d-app:not([hidden]) { border-top-color: var(--line); }
.d-app summary { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; padding: 13px 18px; cursor: pointer; list-style: none; }
.d-app summary::-webkit-details-marker { display: none; }
.d-app summary:hover { background: var(--mist); }
.d-app details[open] summary { background: var(--mist); }
.d-app-main { display: grid; min-width: 0; }
.d-app-main b { font-weight: 650; }
.d-app-main span { font-size: 15px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-app-side { display: grid; justify-items: end; gap: 4px; }
.d-app-more { padding: 6px 18px 16px; background: var(--mist); }
.d-tl { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; font-size: 14.5px; }
.d-tl li { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.d-tl .d-kind { min-width: 72px; text-align: center; }
@media (max-width: 600px) { .d-app summary { padding: 12px 14px; } .d-app-more { padding: 6px 14px 14px; } }

/* on the way: what they launched, until the tracker counts it (lib/dashboard.ts onTheWay) */
.d-way-card { margin-top: 18px; background: var(--paper); }
.d-way-lede { margin: 8px 0 4px; font-size: 15.5px; color: var(--ink-2); }
.d-way { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--mist); color: var(--ink-2); }
.d-way svg { width: 12px; height: 12px; }
.d-way.w-queued { background: var(--sun-soft); color: #5c4400; }
.d-way.w-sending { background: #e3efe8; color: var(--pine); }
.d-way.w-sent { background: var(--pine); color: #fff; }
.d-way.w-blocked, .d-way.w-stalled { background: #fbe9e7; color: #8a2a1a; }
.d-way-card { padding-bottom: 6px; }
.d-way-card .d-rows { border: 0; border-radius: 0; margin: 0 -20px; }
.d-way-card .d-row { padding: 12px 20px; }
.d-way-card .d-row:first-child { border-top: 1px solid var(--line); }
.d-way-card .d-more summary { margin: 8px 0; }
