/* Advisor portal overview (Paper: "Advisor portal — Overview" and its white view).
   The shell, tags, tracker and buttons come from portal.css; this file holds only what
   the advisor artboard draws differently. Values marked "derived" are not in Paper. */

:root { --adv-mine: #1F2023; --adv-next-line: #FFFFFF1A; --adv-case: #0B0B0C; --adv-case-ink: #FFFFFF; }
:root[data-theme="light"] { --adv-mine: #F4F4EF; --adv-next-line: #1C1D1F1F; --adv-case: #DDDDD6; --adv-case-ink: #1C1D1F; }

/* ───────── Sidebar ───────── */
.adv .side { width: 248px; padding-inline: 14px; }
.adv .side-top { gap: 22px; }
.adv .brand { padding: 0 12px; }
.adv .tree { gap: 1px; }
.adv .nav-item { padding: 8px 12px; font-size: 14px; line-height: 18px; font-weight: 500; color: var(--label); }
.adv .nav-item[aria-current="page"] { font-weight: 600; color: var(--ink); }

/* ───────── Main column ───────── */
.adv-cols { flex: 1 1 0; min-width: 0; display: flex; }
.adv-main { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 20px; padding: 28px 0 0 36px; }
.adv-head { display: flex; flex-direction: column; gap: 10px; }
.adv-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.adv-crumbs { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.14em; color: var(--muted); }
.adv-head h1 { font-size: 36px; line-height: 44px; font-weight: 300; letter-spacing: -0.02em; text-wrap: wrap; }
.adv-head .serif { font-size: 20px; line-height: 26px; }

.adv-card { display: flex; flex-direction: column; border-radius: 12px; background: var(--panel); border: 1px solid var(--p-line); }
.adv-card h2, .adv-next-head { font-size: 15px; line-height: 18px; font-weight: 600; letter-spacing: 0; text-wrap: wrap; }
.adv-card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.adv-card-text { display: flex; flex-direction: column; gap: 4px; }
.adv-card-text p, .adv-task-text span { color: var(--p-dim); }
.adv-open { position: relative; flex: none; font-weight: 500; text-decoration: underline 1px; text-underline-position: from-font; }
.adv-open::before { content: ""; position: absolute; inset: -14px -10px; }

.adv-process { gap: 18px; padding: 22px 24px; }
.adv-note { line-height: 20px; color: var(--muted); }

.adv-cases { flex: none; gap: 6px; padding: 22px 24px 10px; }
.adv-cases .adv-card-text { padding-bottom: 12px; }
.adv-table { display: flex; flex-direction: column; gap: 6px; }
.adv-row { display: flex; align-items: center; padding: 15px 12px; }
.adv-row > :first-child { flex: 1 1 0; min-width: 0; }
.adv-row-head { padding-block: 10px; border-bottom: 1px solid var(--p-line); font-weight: 500; color: var(--p-dim); }
.adv-col-status { flex: none; display: flex; width: 150px; }
.adv-col-next { flex: none; width: 80px; text-align: right; }
.adv-case { font-size: 14px; line-height: 18px; font-weight: 500; white-space: pre-wrap; }
.adv-case span { color: var(--p-dim); }

/* The task list runs off the bottom of the screen, as the files table does in the data room. */
.adv-tasks { flex: 1 1 0; gap: 14px; padding: 22px 24px 24px; border-bottom: 0; border-radius: 12px 12px 0 0; } /* bottom padding derived */
.adv-task-list, .adv-attention { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.adv-task-list { gap: 14px; }
.adv-task { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-radius: 8px; border: 1px solid var(--p-line); }
.adv-task.is-mine { border: 0; background: var(--adv-mine); }
.adv-task-text { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.adv-task-text b { font-size: 14px; line-height: 18px; font-weight: 500; }

/* ───────── Your next step ───────── */
.adv-aside { position: sticky; top: 0; flex: none; display: flex; width: 408px; height: 100svh; padding: 28px 28px 28px 24px; }
.adv-next { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 22px; padding: 24px; border-radius: 12px; background: var(--raised); border: 1px solid var(--adv-next-line); }
.adv-next-head { display: flex; align-items: center; gap: 10px; padding-bottom: 18px; border-bottom: 1px solid var(--p-line); }
.adv-next-head i { flex: none; width: 16px; height: 16px; border-radius: 999px; background: var(--accent); }
.adv-next-text { display: flex; flex-direction: column; gap: 10px; }
.adv-next-text p { line-height: 20px; color: var(--muted); }
.adv-next-text .adv-next-title { font-size: 24px; line-height: 30px; letter-spacing: -0.01em; color: var(--ink); }
.adv-next-tags { display: flex; gap: 8px; padding-top: 4px; }
.tag.is-case { background: var(--adv-case); color: var(--adv-case-ink); }
.adv-next h3 { font-size: 13px; line-height: 16px; font-weight: 600; }
.adv-attention { gap: 10px; }
.adv-attention li { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 8px; background: var(--row-2); font-weight: 500; }
.adv-attention i { flex: none; width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--p-dim); }
.adv-next-actions { display: flex; flex-direction: column; gap: 22px; margin-top: auto; }
.adv-next-actions .pbtn { padding-block: 12px; }
.adv-next-actions .pbtn.is-solid { gap: 10px; padding-block: 13px; }

@media (hover: hover) and (pointer: fine) {
  .adv-next-actions .pbtn.is-solid:hover { background: var(--glass-hover); }
  .adv-next-actions .pbtn.is-line:hover { border-color: var(--ink); }
}

/* Entrance: each block rises in, a beat after the one before it. */
.adv-in { animation: adv-in 320ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 50ms); }
@keyframes adv-in { from { opacity: 0; transform: translateY(8px); } }

/* A short window cannot pin the next-step card without cutting off its buttons. */
@media (max-height: 699px) { .adv-aside { position: static; height: auto; } }

/* ───────── Below 1000px: the next-step card moves under the main column (derived) ───────── */
@media (max-width: 999px) {
  .adv-cols { flex-direction: column; }
  .adv-main { flex: none; padding-right: 36px; }
  .adv-tasks { flex: none; border-bottom: 1px solid var(--p-line); border-radius: 12px; }
  .adv-aside { position: static; width: auto; height: auto; padding: 20px 36px 36px; }
}
@media (max-width: 700px) {
  .adv .side { width: min(300px, 86vw); }
  .adv-main { gap: 16px; padding: 12px 20px 0; }
  .adv-top { gap: 8px; }
  .adv-crumbs { display: none; }
  .adv-head h1 { padding-top: 8px; font-size: 32px; line-height: 38px; }
  .adv-head .serif { font-size: 18px; line-height: 24px; }
  .adv-process, .adv-cases, .adv-tasks { padding-inline: 16px; }
  .adv-card-head { flex-wrap: wrap; gap: 10px; }
  .adv-row-head { display: none; }
  .adv-table { gap: 0; }
  .adv-row { flex-wrap: wrap; gap: 12px; padding: 12px 0 14px; border-top: 1px solid var(--p-line); }
  .adv-row > :first-child { flex-basis: 100%; }
  .adv-col-status { flex: 1 1 0; width: auto; }
  .adv-col-next { width: auto; }
  .adv-task { flex-wrap: wrap; gap: 10px 12px; }
  .adv-task-text { flex-basis: 100%; }
  .adv-task .adv-open { margin-left: auto; }
  .adv-aside { padding: 16px 20px 32px; }
  .adv-next { padding: 20px; }
}
