/* How it works: a scripted walk through the app. Depends on base.css tokens. */

.how {
  padding: 24px 0 64px;
}

.how__title {
  margin: 0;
  color: var(--text);
  font-size: clamp(28px, 3.8vw, 41px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.05;
  margin-bottom: 22px;
  text-align: center;
}

.how__i {
  position: relative;
  display: inline-block;
}

.how__i::after {
  content: "";
  position: absolute;
  left: calc(0.14em - 0.105em);
  top: calc(0.8833em - 0.7em - 0.105em);
  width: 0.21em;
  height: 0.21em;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #6d5bd0);
}

.how__sub {
  max-width: 560px;
  margin: 16px auto 36px;
  color: var(--text-secondary);
  font-size: 17px;
  line-height: 1.55;
  text-align: center;
}

/* Player */
.player {
  max-width: 1000px;
  margin: 0 auto;
}

.player__stage {
  position: relative;
  container-type: inline-size;
  overflow: hidden;
  aspect-ratio: 960 / 652;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fbfbfc;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 30px 70px -24px rgba(15, 23, 42, 0.25);
  cursor: pointer;
}

.player__stage[style*="height"] {
  aspect-ratio: auto;
}

.player__bar {
  margin-bottom: 20px;
}

/* Video-style controls in their own strip under the picture (52px, matches BAR in demo.js). */
.player__controls {
  position: absolute;
  z-index: 6;
  right: 0;
  bottom: 0;
  left: 0;
  height: 52px;
  padding: 2px 14px 0;
  background: #16161b;
  color: #fff;
  cursor: default;
}

.player__btn {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background 0.15s ease;
}

.player__btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.player__speed {
  margin-left: auto;
}

.player__speed.is-on {
  background: rgba(255, 255, 255, 0.16);
}

.player__btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.player__btn .i-exit,
.is-fullscreen .player__btn .i-full {
  display: none;
}

.is-fullscreen .player__btn .i-exit {
  display: inline;
}

.player__stage:fullscreen {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: #0b0b0e;
}

.is-full .player__stage {
  position: fixed;
  z-index: 1000;
  inset: 0;
  height: 100% !important;
  border: 0;
  border-radius: 0;
  background: #0b0b0e;
}

.no-scroll,
.no-scroll body {
  overflow: hidden;
}

.player__track {
  --at: 0%;
  position: relative;
  display: flex;
  gap: 3px;
  height: 14px;
  align-items: center;
  cursor: pointer;
}

.player__seg {
  position: relative;
  flex-basis: 0;
  height: 3px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.3);
  transition: height 0.15s ease;
}

.player__seg i {
  display: block;
  width: 0;
  height: 100%;
  background: #fff;
}

.player__track:hover .player__seg {
  height: 5px;
}

/* The playhead dot rides on top of the line at the current time. */
.player__track::after {
  content: "";
  position: absolute;
  top: 50%;
  left: var(--at);
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(22, 22, 26, 0.25), 0 1px 4px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, -50%) scale(0.85);
  transition: transform 0.15s ease;
  pointer-events: none;
}

.player__track:hover::after {
  transform: translate(-50%, -50%) scale(1.1);
}

.player__row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 2px;
}

.player__play {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-left: -8px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.player__play:hover {
  background: rgba(255, 255, 255, 0.14);
}

.player__play:active {
  transform: scale(0.92);
}

.player__play svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.player__time {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

/* Phones have no hover, so the bar is always there, just smaller. */
@media (hover: none) {
  .player__controls {
    padding: 2px 8px 0;
  }

  .player__play {
    width: 32px;
    height: 32px;
  }

  .player__play svg {
    width: 18px;
    height: 18px;
  }

  .player__time {
    font-size: 12px;
  }
}

.player__play .i-play,
.is-paused .player__play .i-pause {
  display: none;
}

.is-paused .player__play .i-play {
  display: inline;
}

.player__caption {
  margin: 0;
  color: var(--text);
  font-size: clamp(17px, 2.2vw, 21px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.4;
  text-align: center;
  transition: opacity 0.3s ease, transform 0.3s ease, filter 0.3s ease;
}

.player__caption.is-swap {
  opacity: 0;
  filter: blur(4px);
  transform: translateY(4px);
}

/* Chapters: a timeline, not a set of boxes. The line on top is the progress. */
.chapters {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.chapters button {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  padding: 0 0 4px;
  border: 0;
  background: none;
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition: color 0.25s ease;
}

.chapters button:hover {
  color: var(--text-secondary);
}

.chapters .is-on button {
  color: var(--text);
}

.chapters b {
  color: inherit;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  opacity: 0.7;
}

.chapters .bar {
  order: -1;
  display: block;
  height: 2px;
  margin-bottom: 10px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--border);
}

.chapters .bar i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--text);
}

.chapters .is-on .bar i {
  background: var(--accent);
}

@media (max-width: 860px) {
  .chapters {
    display: flex;
    gap: 16px;
    margin: 24px 0 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .chapters::-webkit-scrollbar {
    display: none;
  }

  .chapters li {
    flex: 0 0 132px;
    scroll-snap-align: start;
  }

  .player__caption {
    text-align: left;
  }
}

/* The canvas: drawn at 960x600, scaled to fit. Always light, like paper. */
.d {
  --s: 1;
  position: absolute;
  top: 0;
  left: 0;
  width: 960px;
  height: 600px;
  transform: scale(var(--s));
  transform-origin: 0 0;
  color: #16161a;
  font-family: var(--font-sans);
  font-size: 13px;
  cursor: default;
  --b: #e6e6ea;
  --t2: #5b5b68;
  --t3: #8b8b98;
  --ac: #2c7196;
  --acs: #ebf4f9;
  --ok: #15803d;
  --oks: rgba(34, 197, 94, 0.14);
}

.d.is-fast,
.d.is-fast * {
  transition: none !important;
  animation: none !important;
}

.d-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-bottom: 1px solid var(--b);
  background: #fff;
}

.d-chrome i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.12);
}

.d-chrome i:nth-child(2) {
  background: #febc2e;
}

.d-chrome i:nth-child(3) {
  background: #28c840;
}

.d-url {
  margin: 0 auto;
  padding: 3px 14px;
  border-radius: 6px;
  background: #f1f1f3;
  color: var(--t3);
  font-size: 11px;
}

.d-view {
  position: absolute;
  top: 36px;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 20px 22px;
  transition: opacity 0.5s ease, transform 0.5s ease, filter 0.5s ease;
}

.d-result {
  display: grid;
  grid-template-columns: 1fr 250px;
  gap: 18px;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
}

.d.is-result .d-compose {
  opacity: 0;
  transform: translateY(-14px);
  filter: blur(3px);
}

.d.is-result .d-result {
  opacity: 1;
  transform: none;
}

/* Compose: mirrors the real form on the home page. */
.d-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.d-area {
  position: relative;
  height: 300px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 14px;
  background: #f6f6f7;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.d-area.is-focus {
  border-color: var(--ac);
  background: #fff;
  box-shadow: 0 0 0 3px var(--acs);
}

.d-dropzone {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 2px dashed var(--ac);
  border-radius: 14px;
  background: color-mix(in srgb, var(--ac) 8%, #fff);
  color: var(--ac);
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.d-dropzone.is-on {
  opacity: 1;
}

.d-placeholder {
  position: absolute;
  top: 16px;
  left: 18px;
  margin: 0;
  color: var(--t3);
  font-size: 12.5px;
  transition: opacity 0.2s ease;
}

.d-placeholder.is-gone {
  opacity: 0;
}

.d-reading {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  color: var(--ac);
  font-size: 12.5px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.d-reading.is-reading {
  opacity: 1;
}

.d-drop__bar {
  width: 160px;
  height: 4px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--b);
}

.d-drop__bar span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--ac);
}

/* A job link pasted into the box, read, then swapped for the job text. */
.d-link {
  position: absolute;
  top: 12px;
  left: 14px;
  right: 14px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--b);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 6px 18px -12px rgba(22, 22, 26, 0.35);
  color: #16161a;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.d-link.is-on {
  opacity: 1;
  transform: none;
}

.d-link svg {
  flex: none;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--ac);
  stroke-width: 2;
  stroke-linecap: round;
}

.d-link.is-on .d-caret {
  display: inline-block;
}

.d-link.is-read {
  border-color: color-mix(in srgb, var(--ac) 40%, var(--b));
}

.d-fetch {
  position: absolute;
  inset: 46px 0 0;
  display: grid;
  place-content: center;
  grid-auto-flow: column;
  align-items: center;
  gap: 8px;
  color: var(--ac);
  font-size: 12.5px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.d-fetch.is-on {
  opacity: 1;
}

.d-fetch i {
  width: 12px;
  height: 12px;
  border: 1.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: d-spin 0.8s linear infinite;
}

@keyframes d-spin {
  to { transform: rotate(360deg); }
}

.d-text {
  padding: 14px 18px;
  font-size: 12px;
  line-height: 1.5;
}

.d-hint {
  margin: 8px 2px 0;
  color: var(--t3);
  font-size: 11.5px;
}

.d-hint kbd {
  display: inline-block;
  margin: 0 1px;
  padding: 0 4px;
  border: 1px solid var(--b);
  border-radius: 4px;
  background: #fff;
  font-family: var(--font-sans);
  font-size: 10px;
  line-height: 16px;
}

.d-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

.d-upload {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--b);
  border-radius: 999px;
  background: #fff;
  color: var(--t2);
  font-size: 12px;
  transition: transform 0.15s ease;
}

.d-upload svg {
  width: 13px;
  height: 13px;
}

.d-remember {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--t2);
  font-size: 12px;
}

.d-remember i {
  width: 13px;
  height: 13px;
  border: 1.5px solid var(--t3);
  border-radius: 3px;
}

.ln {
  margin: 0 0 2px;
  opacity: 0;
  filter: blur(4px);
  transform: translateY(5px);
  transition: opacity 0.35s ease, filter 0.35s ease, transform 0.35s ease, background 0.6s ease;
}

.ln.in {
  opacity: 1;
  filter: none;
  transform: none;
}

.kw {
  padding: 0 2px;
  border-radius: 3px;
  font-weight: inherit;
  transition: background 0.4s ease;
}

.kw.is-lit {
  background: rgba(44, 113, 150, 0.16);
}

.d-notes {
  height: 52px;
  margin-top: 14px;
  padding: 12px 16px;
  border: 1.5px dashed var(--b);
  border-radius: 14px;
  color: var(--t3);
  font-size: 12px;
}

.d-notes {
  position: relative;
  color: #16161a;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.d-notes.is-focus {
  border-color: var(--ac);
  border-style: solid;
  box-shadow: 0 0 0 3px var(--acs);
}

.d-notes__ph {
  position: absolute;
  left: 16px;
  color: var(--t3);
}

.d-notes.is-focus .d-caret {
  display: inline-block;
  vertical-align: middle;
}

.d-opts {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

.d-seg {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--b);
  border-radius: 999px;
  background: #f1f1f3;
}

.d-seg span {
  padding: 6px 13px;
  border-radius: 999px;
  color: var(--t2);
  font-size: 12.5px;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.d-seg span.is-on {
  background: #fff;
  color: #16161a;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.d-seg em {
  padding: 0 10px 0 6px;
  color: var(--t3);
  font-size: 12.5px;
  font-style: normal;
}

.d-btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  background: #16161a;
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.15s ease, opacity 0.2s ease;
}

.d-btn--go {
  padding: 10px 20px;
  font-size: 13.5px;
}

.d-btn--soft {
  margin-top: 12px;
  background: var(--acs);
  color: var(--ac);
}

.d-btn.is-busy {
  animation: d-busy 0.8s ease-in-out infinite alternate;
}

@keyframes d-busy {
  to { opacity: 0.55; }
}

.is-press {
  transform: scale(0.93);
}

.d-status {
  height: 18px;
  margin: 10px 0 0;
  color: var(--t2);
  font-size: 12.5px;
  text-align: center;
}

/* Result */
.d-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.d-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.d-tab {
  padding: 5px 13px;
  border-radius: 999px;
  color: var(--t2);
  font-size: 12.5px;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.d-tab.is-on {
  background: #fff;
  color: #16161a;
  box-shadow: 0 1px 3px rgba(22, 22, 26, 0.12);
}

.d-tabtrack {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: #f1f1f3;
}

.d-dlbtn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  padding: 6px 11px 6px 14px;
  border-radius: 999px;
  background: #16161a;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  transition: transform 0.15s ease;
}

.d-dlbtn svg {
  width: 12px;
  height: 12px;
  transition: transform 0.18s ease;
}

.d-dlbtn.is-open svg {
  transform: rotate(180deg);
}

.d-dlbtn.is-press {
  transform: scale(0.95);
}

.d-dlmenu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 5;
  display: none;
  min-width: 170px;
  padding: 4px;
  border: 1px solid var(--b);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(22, 22, 26, 0.14);
}

.d-dlmenu.is-on {
  display: grid;
}

.d-dlmenu > span {
  display: grid;
  gap: 1px;
  padding: 7px 10px;
  border-radius: 8px;
}

.d-dlmenu b {
  font-size: 12px;
  font-weight: 600;
}

.d-dlmenu i {
  color: var(--t3);
  font-size: 11px;
  font-style: normal;
}

.d-dlmenu > span.is-press {
  background: #f1f1f3;
}

.d-tabs {
  position: relative;
}

.d-dlpop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px 8px 10px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.28);
  opacity: 0;
  transform: translateY(-6px) scale(0.92);
  transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.3, 1.5, 0.5, 1);
  pointer-events: none;
}

.d-dlpop svg {
  width: 16px;
  height: 16px;
  padding: 3px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2c7196, #6d5bd0);
}

.d-dlpop.is-on {
  opacity: 1;
  transform: none;
}

.d-dlpop.is-on svg path {
  animation: d-dl-drop 0.7s ease-in-out 2;
}

@keyframes d-dl-drop {
  0% { transform: translateY(-5px); opacity: 0; }
  50% { transform: none; opacity: 1; }
  100% { transform: translateY(2px); opacity: 1; }
}

.d-paper {
  position: relative;
  flex: 1;
  overflow: hidden;
  padding: 22px 34px;
  border: 1px solid var(--b);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.18);
  font-family: "Times New Roman", Times, Georgia, serif;
  font-size: 11.5px;
  line-height: 1.4;
}

.d-doc {
  transition: opacity 0.3s ease;
}

.d-letter {
  position: absolute;
  inset: 22px 34px;
  opacity: 0;
  font-size: 12.5px;
  line-height: 1.55;
}

.d.is-cl #d-doc-cv-body {
  opacity: 0;
}

.d.is-cl .d-letter {
  opacity: 1;
}

.d-letter p {
  margin: 0 0 10px;
}

.d-letter p:first-child strong {
  font-size: 18px;
  letter-spacing: 0.02em;
}

.d-letter small {
  color: #6b7280;
  font-size: 11px;
}

.d-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
}

.d-contact {
  color: #444;
  text-align: center;
}

.d-h {
  margin-top: 8px;
  padding-bottom: 1px;
  border-bottom: 1px solid #222;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.d-job span {
  float: right;
}

.d-bul {
  position: relative;
  padding-left: 12px;
}

.d-bul::before {
  content: "\2022";
  position: absolute;
  left: 0;
}

.d-paper mark {
  padding: 0 1px;
  border-radius: 2px;
  background: var(--oks);
  color: inherit;
}

.ln.is-flash {
  background: rgba(34, 197, 94, 0.22);
}

.d-sel {
  background: linear-gradient(rgba(44, 113, 150, 0.24), rgba(44, 113, 150, 0.24)) no-repeat 0 0 / 0 100%;
}

.d-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(44, 113, 150, 0.12) 50%, transparent 70%) no-repeat;
  background-size: 250% 100%;
  opacity: 0;
  pointer-events: none;
}

.d.is-regen .d-shimmer {
  opacity: 1;
  animation: d-shine 1.1s linear infinite;
}

@keyframes d-shine {
  from { background-position: 120% 0; }
  to { background-position: -120% 0; }
}

.d-key {
  position: absolute;
  z-index: 2;
  padding: 2px 8px;
  border: 1px solid var(--b);
  border-bottom-width: 3px;
  border-radius: 6px;
  background: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.15s ease;
}

.d-key.is-on {
  opacity: 1;
  transform: none;
}

.d-key.is-press {
  border-bottom-width: 1px;
  transform: translateY(2px);
}

.d-ai {
  position: absolute;
  z-index: 2;
  left: 34px;
  padding: 10px 12px;
  border: 1px solid var(--b);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 34px -10px rgba(15, 23, 42, 0.28);
  font-family: var(--font-sans);
  opacity: 0;
  transform: translateY(6px) scale(0.98);
  transform-origin: top left;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.d-ai.is-on {
  opacity: 1;
  transform: none;
}

.d-ai__title {
  display: block;
  margin-bottom: 8px;
  color: var(--ac);
  font-size: 11.5px;
  font-weight: 600;
}

.d-ai__opts {
  display: flex;
  gap: 6px;
}

.d-ai__opts span {
  padding: 4px 10px;
  border: 1px solid var(--b);
  border-radius: 999px;
  color: var(--t2);
  font-size: 12px;
  transition: transform 0.15s ease;
}

.d-ai__opts span.is-on {
  border-color: var(--ac);
  background: var(--acs);
  color: var(--ac);
}

.d-ai__row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.d-ai__input {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  min-width: 280px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--b);
  border-radius: 8px;
  color: #16161a;
  font-size: 12px;
  white-space: nowrap;
}

.d-ai__ph {
  position: absolute;
  left: 12px;
  color: var(--t3);
}

.d-ai__go {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #16161a;
  color: #fff;
  font-size: 12px;
  transition: transform 0.15s ease;
}

.d-ai__go.is-busy {
  animation: d-busy 0.8s ease-in-out infinite alternate;
}

.d-ai__opts span.is-busy {
  border-color: var(--ac);
  background: var(--acs);
  color: var(--ac);
  animation: d-busy 0.8s ease-in-out infinite alternate;
}

.d-prompt {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.d-chips {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
}

.d-chip {
  padding: 4px 10px;
  border: 1px solid var(--line, #e4e4ea);
  border-radius: 999px;
  background: #fff;
  color: var(--t2, #555);
  font-size: 11.5px;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.d-chip.is-on {
  border-color: var(--ac);
  background: var(--acs);
  color: var(--ac);
}

.d-prompt__input {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid var(--b);
  border-radius: 999px;
  background: #fff;
  font-size: 12.5px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.d-prompt__input.is-focus {
  border-color: var(--ac);
  box-shadow: 0 0 0 3px var(--acs);
}

.d-prompt__ph {
  position: absolute;
  left: 14px;
  color: var(--t3);
}

.d-caret {
  display: none;
  width: 1px;
  height: 14px;
  margin-left: 1px;
  background: #16161a;
  animation: d-blink 1s steps(1) infinite;
}

.d-prompt__input.is-focus .d-caret {
  display: inline-block;
}

@keyframes d-blink {
  50% { opacity: 0; }
}

/* The side column scrolls under a fixed frame, like the sticky one on the site. */
.d-side {
  position: relative;
  overflow: hidden;
  padding-top: 40px;
}

.d-side > * {
  transform: translateY(var(--y, 0));
  transition: transform 0.8s cubic-bezier(0.5, 0, 0.2, 1);
}

.d-side > * + * {
  margin-top: 10px;
}

.d-card__label--caps {
  color: var(--t3);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.d-take__text {
  margin: 0;
  color: var(--t2);
  font-size: 12px;
  line-height: 1.5;
}

.d-checks {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  font-size: 12.5px;
  font-weight: 600;
}

.d-count {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fdf2e3;
  color: #93610f;
  font-size: 11px;
}

.d-save {
  display: grid;
  gap: 7px;
  background: #f7f7f8;
}

.d-save .d-card__label--caps {
  margin: 0 0 2px;
}

.d-field {
  padding: 7px 10px;
  border: 1px solid var(--b);
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
}

.d-btn--block {
  text-align: center;
}

.d-btn.is-done {
  background: #22a05a;
}

.d-save__done {
  display: none;
  margin: 0;
  color: var(--t2);
  font-size: 11px;
  text-align: center;
}

.d-save__done b {
  color: var(--ac);
}

.d-save__done.is-on {
  display: block;
  animation: d-save-in 0.25s ease;
}

@keyframes d-save-in {
  from { opacity: 0; transform: translateY(-3px); }
}

#t-menu-jd {
  top: calc(50% + 18px);
  right: 16px;
}

.d-result > .d-toast {
  position: absolute;
  top: 20px;
  right: 22px;
  width: 250px;
  margin: 0;
  z-index: 2;
}

/* Tracker */
.d-tracker {
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  padding: 16px 28px 14px;
}

.d.is-tracker .d-result {
  opacity: 0;
  transform: translateY(-14px);
  filter: blur(3px);
}

.d.is-tracker .d-tracker {
  opacity: 1;
  transform: none;
}

[data-tone="saved"] { --tone: #8b8b98; }
[data-tone="applied"] { --tone: #3b6fd4; }
[data-tone="interview"] { --tone: #d9911c; }
[data-tone="offer"] { --tone: #22a05a; }
[data-tone="rejected"] { --tone: #d0534d; }
[data-tone="all"] { --tone: #16161a; }

.t-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 12px;
}

.t-title {
  margin: 0;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.t-i {
  position: relative;
  display: inline-block;
}

.t-i::after {
  content: "";
  position: absolute;
  left: calc(0.14em - 0.105em);
  top: calc(0.8833em - 0.7em - 0.105em);
  width: 0.21em;
  height: 0.21em;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ac), #6d5bd0);
}

.t-bar {
  display: flex;
  gap: 3px;
  height: 6px;
  margin-bottom: 12px;
  overflow: hidden;
  border-radius: 6px;
  background: #f1f1f3;
}

.t-bar i {
  display: block;
  border-radius: 6px;
  background: var(--tone);
  transition: width 0.5s ease;
}

.t-tiles {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.t-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.t-search {
  display: flex;
  align-items: center;
  flex: 1;
  height: 30px;
  padding: 0 12px 0 30px;
  border: 1px solid var(--b);
  border-radius: 999px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%238b8b98' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 11px center;
  color: var(--t1, #16161a);
  font-size: 12px;
}

.t-search.is-on {
  border-color: #16161a;
  box-shadow: 0 0 0 3px var(--acs);
}

#t-search-ph {
  color: var(--t3);
}

#t-search-ph[hidden] {
  display: none;
}

.t-sort {
  height: 30px;
  padding: 0 26px 0 12px;
  border: 1px solid var(--b);
  border-radius: 999px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%238b8b98' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: var(--t2);
  font-size: 12px;
  line-height: 28px;
}

.t-count {
  margin-left: auto;
  color: var(--t3);
  font-size: 12px;
  white-space: nowrap;
}

.t-tile {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--b);
  border-radius: 12px;
  background: #fff;
}

.t-tile b {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--t2);
  font-size: 11px;
  font-weight: 500;
}

.t-tile b::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tone);
}

.t-tile strong {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.t-list {
  padding: 5px;
  border: 1px solid var(--b);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 40px -24px rgba(22, 22, 26, 0.18);
}

.t-row {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr 100px auto;
  gap: 14px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
}

.d.is-found .t-row:not(.t-row--new) {
  display: none;
}

.t-row + .t-row {
  box-shadow: inset 0 1px 0 var(--b);
}

.t-row--new {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.4s ease, transform 0.4s ease, background 1.2s ease;
}

.t-row--new.is-in {
  opacity: 1;
  transform: none;
  background: var(--acs);
}

.t-row--new.is-in.is-rest {
  background: transparent;
}

.t-logo {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: hsl(var(--hue) 70% 94%);
  color: hsl(var(--hue) 45% 36%);
  font-size: 14px;
  font-weight: 700;
}

.t-main {
  display: grid;
  gap: 1px;
  font-size: 11.5px;
}

.t-main b {
  font-size: 13.5px;
}

.t-main span {
  color: var(--t3);
}

/* The note: a hint until it is written, then a soft chip that stays. */
.t-note {
  justify-self: start;
  margin-top: 4px;
  padding: 3px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 11.5px;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.t-note.is-edit {
  min-width: 210px;
  border-color: #16161a;
  background: #fff;
  box-shadow: 0 0 0 3px var(--acs);
}

.t-note.is-on {
  background: #fdf6e3;
  color: #6b5a2e !important;
}

#t-note-ph[hidden] {
  display: none;
}

.t-status {
  justify-self: start;
  padding: 4px 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--tone) 12%, #fff);
  color: color-mix(in srgb, var(--tone) 80%, #000);
  font-size: 11.5px;
  font-weight: 600;
  transition: background 0.3s ease, color 0.3s ease, transform 0.15s ease;
}

.t-docs {
  display: flex;
  gap: 5px;
}

.t-docs span {
  padding: 4px 10px;
  border: 1px solid var(--b);
  border-radius: 999px;
  color: var(--t2);
  font-size: 11px;
}

.t-menu {
  position: absolute;
  top: 34px;
  right: 78px;
  z-index: 3;
  display: none;
  min-width: 84px;
  padding: 4px;
  border: 1px solid var(--b);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(22, 22, 26, 0.12);
}

.t-menu.is-on {
  display: grid;
}

.t-menu span {
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
}

.t-toast {
  position: absolute;
  right: 28px;
  bottom: 14px;
  margin: 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: #16161a;
  color: #fff;
  font-size: 12px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.t-toast.is-on {
  opacity: 1;
  transform: none;
}

.d-card {
  padding: 16px;
  border: 1px solid var(--b);
  border-radius: 14px;
  background: #fff;
}

.d-ats {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.d-ring {
  --n: 0;
  position: relative;
  display: grid;
  flex: none;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: conic-gradient(#22c55e calc(var(--n) * 1%), var(--b) 0);
  font-size: 16px;
  font-weight: 700;
  transition: transform 0.3s ease;
}

.d-ring::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: #fff;
}

.d-ring span {
  position: relative;
}

.d-ring.is-pulse {
  transform: scale(1.1);
}

.d-card__title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.d-card__sub {
  margin: 2px 0 0;
  color: var(--t3);
  font-size: 11.5px;
}

.d-card__label {
  margin: 0 0 8px;
  color: var(--t2);
  font-size: 11.5px;
}

.d-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.d-chip {
  padding: 4px 10px;
  border: 1px solid var(--b);
  border-radius: 999px;
  color: var(--t2);
  font-size: 12px;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease, opacity 0.3s ease;
}

.d-chip.is-on {
  border-color: rgba(34, 197, 94, 0.45);
  background: var(--oks);
  color: var(--ok);
}

.d-chip.is-gone {
  opacity: 0;
  transform: scale(0.8);
}

.d-chip.is-out {
  display: none;
}

.d-toast {
  margin: 12px 0 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--oks);
  color: var(--ok);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.d-toast.is-on {
  opacity: 1;
}

/* Props */
.d-file {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 8px 8px;
  border: 1px solid var(--b);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 28px -10px rgba(15, 23, 42, 0.3);
  font-size: 12px;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.d-file svg {
  width: 22px;
  height: 22px;
}

.d-file.is-on {
  opacity: 1;
}

.d-cursor {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  width: 22px;
  height: 22px;
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25));
  transition: opacity 0.3s ease;
}

.d-cursor.is-on {
  opacity: 1;
}

.d-ripple {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 4;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border-radius: 50%;
  background: rgba(44, 113, 150, 0.3);
  opacity: 0;
  pointer-events: none;
}

.d-ripple.is-on {
  animation: d-ripple 0.45s ease-out;
}

@keyframes d-ripple {
  from { opacity: 1; scale: 0.3; }
  to { opacity: 0; scale: 1.4; }
}

.d-end {
  position: absolute;
  inset: 36px 0 0;
  z-index: 6;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 6px;
  background: rgba(251, 251, 252, 0.9);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.d-end.is-on {
  opacity: 1;
  pointer-events: auto;
}

.d-end__title {
  margin: 0;
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.d-end__dot {
  display: inline-block;
  width: 0.21em;
  height: 0.21em;
  margin-left: 0.07em;
  border-radius: 50%;
  background: linear-gradient(135deg, #2c7196, #6d5bd0);
}

.d-end__sub {
  margin: 0 0 18px;
  color: var(--t2);
  font-size: 16px;
}

.d-end__row {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

/* Landing page preview (?embed=1) ------------------------------------------ */

.is-embed,
.is-embed body {
  overflow: hidden;
  background: transparent;
}

.is-embed .nav,
.is-embed .footer,
.is-embed footer,
.is-embed .how__title,
.is-embed .chapters,
.is-embed .player__controls {
  display: none !important;
}

.is-embed .how {
  padding: 0;
}

.is-embed .how > .container {
  max-width: none;
  padding: 0;
}

.is-embed .player {
  display: flex;
  flex-direction: column;
  max-width: none;
}

.is-embed .player__stage {
  aspect-ratio: 960 / 600;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  cursor: default;
}

.is-embed .player__bar {
  order: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9em;
  margin: 0;
  padding: 18px 20px 22px;
  font-size: clamp(16px, 2.6vw, 24px);
}

.is-embed .player__caption {
  max-width: 34em;
  color: #5b5b68;
  font-size: 1em;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.3;
  text-wrap: balance;
}

.c-w {
  white-space: nowrap;
}

.c-i {
  position: relative;
  display: inline-block;
  line-height: 1.02;
}

.c-i::after,
.c-dot {
  width: 0.21em;
  height: 0.21em;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #6d5bd0);
}

.c-i::after {
  content: "";
  position: absolute;
  left: calc(0.14em - 0.105em);
  top: calc(0.8626em - 0.7em - 0.105em);
}

.c-dot {
  display: inline-block;
  margin-left: 0.07em;
}

.c-mark {
  background: linear-gradient(135deg, var(--accent), #6d5bd0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.c-hl {
  padding: 0.04em 0.16em 0.08em;
  margin: 0 -0.04em;
  border-radius: 0.28em;
  background: linear-gradient(135deg, rgba(44, 113, 150, 0.16), rgba(109, 91, 208, 0.2));
  color: #16161a;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
