/* AI Career Coach member app. Builds on /styles.css. */
.app-main { padding-bottom: 24px; }
.paper.app { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
.top-link.plain { background: none; border: 0; cursor: pointer; font: inherit; font-weight: 600; font-size: 14px; color: var(--muted); border-bottom: 0; text-decoration: underline; min-height: 44px; }

/* Bottom tab bar */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: #fff; border-top: 1.5px solid var(--rule); display: flex; justify-content: center; padding-bottom: env(safe-area-inset-bottom, 0px); }
.tabbar-in { display: flex; width: 100%; max-width: 600px; }
.tab { flex: 1 1 0; min-height: 60px; border: 0; background: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-weight: 600; font-size: 13px; color: var(--muted); position: relative; }
.tab svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tab[aria-current="page"] { color: var(--ink); }
.tab[aria-current="page"]::before { content: ''; position: absolute; top: 0; left: 24%; right: 24%; height: 4px; border-radius: 0 0 4px 4px; background: var(--hl); }
.tab .dotbadge { position: absolute; top: 10px; right: calc(50% - 20px); width: 9px; height: 9px; border-radius: 50%; background: var(--margin); border: 2px solid #fff; }

/* Today */
.hello { display: flex; flex-direction: column; gap: 4px; }
.week-card { background: #fff; border: 2px solid var(--ink); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 4px 0 var(--q, var(--hl)); }
.week-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.week-head h2 { font-size: 24px; }
.pill { font-size: 13px; font-weight: 700; background: var(--q, var(--hl)); border-radius: 99px; padding: 2px 10px; white-space: nowrap; }
.bar { height: 8px; border-radius: 99px; background: #E9EEF6; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--ink); border-radius: 99px; transition: width .25s ease; }
.steps-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.step { display: flex; gap: 12px; align-items: flex-start; padding: 10px 6px; border-radius: 12px; cursor: pointer; min-height: 48px; }
.step:hover { background: var(--paper-2); }
.step input { width: 26px; height: 26px; margin: 1px 0 0; accent-color: var(--ink); flex: 0 0 auto; cursor: pointer; }
.step span { font-size: 16px; line-height: 1.45; }
.step input:checked + span { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--hl); text-decoration-thickness: 3px; }
.two { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.mini-grid-wrap { display: flex; gap: 14px; align-items: center; }
.mini-grid-wrap .grid { height: 120px; width: 120px; flex: 0 0 auto; gap: 4px; }
.mini-grid-wrap .cell { font-size: 0; padding: 0; }
.mini-grid-wrap .dot { width: 16px; height: 16px; border-width: 2px; }
.tasks { display: flex; flex-direction: column; gap: 2px; }
.task { display: flex; align-items: center; gap: 10px; padding: 4px 4px; min-height: 48px; border-bottom: 1px dashed var(--rule); }
.task label { display: flex; gap: 12px; align-items: center; flex: 1 1 auto; min-width: 0; cursor: pointer; min-height: 44px; }
.task input[type=checkbox] { width: 26px; height: 26px; accent-color: var(--ink); flex: 0 0 auto; }
.task .t { font-size: 16px; overflow-wrap: anywhere; }
.task input:checked + .t { color: var(--muted); text-decoration: line-through; }
.task .due { font-size: 12px; color: var(--muted); white-space: nowrap; }
.task .src { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; background: var(--paper-2); border-radius: 99px; padding: 1px 8px; color: var(--muted); }
.x { border: 0; background: none; cursor: pointer; width: 44px; height: 44px; font-size: 22px; color: var(--muted); border-radius: 10px; }
.x:hover { background: var(--paper-2); color: var(--ink); }
.add-row { display: flex; gap: 8px; margin-top: 8px; }
.add-row input[type=text] { flex: 1 1 auto; min-width: 0; min-height: 48px; border: 1.5px solid #C9D3E3; border-radius: 12px; padding: 8px 14px; font-size: 16px; }
.add-row .btn { min-height: 48px; font-size: 16px; padding: 8px 18px; flex: 0 0 auto; }

/* Plan */
.weeks { display: flex; flex-direction: column; gap: 10px; }
.weeks details { background: #fff; border: 1.5px solid var(--rule); border-radius: 16px; padding: 0 16px; }
.weeks details[open] { border-color: var(--ink); }
.weeks summary { cursor: pointer; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 19px; list-style-position: inside; }
.weeks summary small { font-family: var(--body); font-weight: 600; font-size: 13px; color: var(--muted); }
.weeks details > div { padding: 0 0 14px; display: flex; flex-direction: column; gap: 10px; }

/* Coach */
.chat { display: flex; flex-direction: column; gap: 10px; }
.msgs { display: flex; flex-direction: column; gap: 10px; min-height: 120px; }
.msg { max-width: 88%; padding: 11px 15px; border-radius: 18px; font-size: 16px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.assistant { align-self: flex-start; background: #fff; border: 1.5px solid var(--rule); border-radius: 18px 18px 18px 4px; }
.msg.user { align-self: flex-end; background: var(--hl); border: 2px solid var(--ink); border-radius: 18px 18px 4px 18px; font-weight: 500; }
.msg.typing { color: var(--muted); letter-spacing: 3px; }
.starters { display: flex; flex-wrap: wrap; gap: 8px; }
.composer { position: sticky; bottom: calc(68px + env(safe-area-inset-bottom, 0px)); display: flex; gap: 8px; align-items: flex-end; background: #fff; border-top: 1.5px solid var(--rule); box-shadow: 0 -10px 14px -10px rgba(21,32,59,.22); padding: 10px 0 6px; }
.composer textarea { flex: 1 1 auto; min-width: 0; min-height: 52px; max-height: 140px; resize: none; border: 1.5px solid #C9D3E3; border-radius: 14px; padding: 13px 14px; font-size: 16px; line-height: 1.4; font-family: var(--body); }
.composer .btn { min-height: 52px; font-size: 16px; padding: 8px 18px; flex: 0 0 auto; }
.crisis { background: #FFF4F0; border: 2px solid var(--margin); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }

/* Me */
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.stmt { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-bottom: 1px dashed var(--rule); }
.stmt p { font-weight: 600; }
.hist { display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.hist li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--rule); }
.mem { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 4px 0; border-bottom: 1px dashed var(--rule); }
.mem .link-btn { min-width: 0; max-width: 100%; text-align: left; overflow-wrap: anywhere; }
.mem span { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; font-size: 15px; }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; font-size: 15px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.loading { padding: 60px 0; text-align: center; color: var(--muted); }
@media (min-width: 700px) { .two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ── Tools hub, planner, Compass, documents ── */
.toolgrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.toolcard { text-align: left; background: #fff; border: 2px solid var(--ink); border-radius: 16px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; font: inherit; color: var(--ink); min-height: 96px; }
.toolcard:hover { background: var(--paper-2); }
.toolcard b { font-family: var(--display); font-size: 20px; }
.toolcard span { font-size: 15px; color: var(--muted); line-height: 1.4; }
.toolcard small { font-weight: 700; font-size: 13px; background: var(--hl); border-radius: 99px; padding: 2px 10px; align-self: flex-start; margin-top: 4px; }
.coach-pick { margin: 2px 0; }
.row { display: flex; flex-wrap: wrap; gap: 10px; }
.when { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.when label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; min-width: 0; max-width: 100%; }
.when select, .when input { max-width: 100%; min-width: 0; }
.plan-add { display: flex; flex-direction: column; gap: 10px; }
.plan-add input[type=text], .plan-edit input[type=text], .goal-date, .when input, .when select, .plan-add select { min-height: 48px; border: 1.5px solid var(--rule); border-radius: 12px; padding: 8px 12px; font: inherit; font-size: 16px; background: #fff; color: var(--ink); }
.plan-add input[type=text], .plan-edit input[type=text] { width: 100%; }
.plan-task { flex-wrap: wrap; }
.plan-task .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: 100%; padding-left: 34px; margin-top: -4px; }
.plan-task .time { font-size: 13px; font-weight: 700; background: var(--hl); border-radius: 99px; padding: 1px 9px; }
.plan-task .cal { font-size: 13px; font-weight: 600; color: var(--ink); background: none; border: 0; padding: 6px 4px; cursor: pointer; text-decoration: underline; font-family: inherit; min-height: 32px; }
.plan-edit { display: flex; flex-direction: column; gap: 10px; padding: 10px; background: var(--paper-2); border-radius: 12px; }
.goal-date { max-width: 160px; }
.goal-row { flex-wrap: wrap; } .goal-row input[type=text] { flex: 1 1 100%; }
.cp-steps { display: flex; gap: 5px; }
.cp-steps span { flex: 1 1 0; height: 7px; border-radius: 99px; background: #E9EEF6; }
.cp-steps span.past { background: var(--ink); } .cp-steps span.on { background: var(--hl); outline: 2px solid var(--ink); }
.cp-body { display: flex; flex-direction: column; gap: 14px; padding-bottom: 72px; }
.cp-body h3 { font-size: 24px; }
.cp-footer { position: sticky; bottom: calc(68px + env(safe-area-inset-bottom, 0px)); background: var(--paper, #fff); padding: 10px 0; display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--rule); }
.cp-footer .btn[aria-disabled="true"] { opacity: .55; }
.rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rank li { display: flex; align-items: center; gap: 8px; background: #fff; border: 1.5px solid var(--rule); border-radius: 12px; padding: 4px 6px 4px 12px; min-height: 48px; }
.rank li:first-child { border-color: var(--ink); background: var(--hl); }
.rank .n { font-weight: 700; width: 20px; } .rank .v { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.rank .mv, .tag button { border: 0; background: none; cursor: pointer; min-width: 40px; min-height: 40px; font-size: 18px; color: var(--ink); border-radius: 10px; }
.rank .mv:disabled { opacity: .25; cursor: default; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 2px; background: #fff; border: 1.5px solid var(--rule); border-radius: 99px; padding: 2px 4px 2px 12px; font-size: 15px; }
.tag.got { background: var(--hl); padding-right: 12px; }
.tag button { min-width: 32px; min-height: 32px; font-size: 16px; }
.add-row .pre { align-self: center; font-weight: 600; white-space: nowrap; font-size: 15px; }
.anchor { display: flex; gap: 12px; flex-wrap: wrap; } .anchor > div { flex: 1 1 140px; background: #fff; border: 2px solid var(--ink); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; } .anchor span { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.prompts { margin: 0; padding-left: 20px; color: var(--muted); }
.trio { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-weight: 700; margin-bottom: 8px; } .trio span { background: var(--hl); border-radius: 99px; padding: 2px 12px; font-weight: 600; }
.pick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid var(--rule); } .pick span { flex: 1 1 160px; }
.sugg { padding: 8px 0; border-bottom: 1px solid var(--rule); }
.docs textarea { width: 100%; }
.doc-page { background: #fff; border: 1.5px solid var(--rule); border-radius: 8px; padding: 22px 24px; font-size: 15px; line-height: 1.5; }
.doc-page h3 { font-size: 26px; margin: 0; } .doc-page h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1.5px solid var(--ink); margin: 16px 0 6px; padding-bottom: 2px; }
.doc-page ul { margin: 4px 0 8px; padding-left: 20px; } .doc-page p { margin: 0 0 8px; }
.doc-actions { margin-top: 12px; }
@media (min-width: 700px) { .toolgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media print {
  body * { visibility: hidden !important; }
  .doc-page, .doc-page * { visibility: visible !important; }
  .doc-page { position: absolute; left: 0; top: 0; width: 100%; border: 0; padding: 0; }
}

/* ── Layout fixes ── */
.back { display: flex; margin: 0 0 6px; }
.top { background: #fff; }
.cp-body h3 { margin: 0; } .cp-body p { margin: 0; }
.cp-footer { background: #fff; margin: 0; padding: 10px 0; box-shadow: 0 -10px 14px -10px rgba(21,32,59,.22); border-top: 1px solid var(--rule); z-index: 4; }
.mixgrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.plan-cols, .docs-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.plan-cols .col-a, .plan-cols .col-b { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.docs-cols > div { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.docs-empty { display: none; }
@media (min-width: 900px) {
  .paper.wide .tabbar-in, .tabbar-in { max-width: 600px; }
  .mixgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan-cols { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 24px; }
  .docs-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
  .docs-empty { display: flex; align-items: center; justify-content: center; border: 1.5px dashed var(--rule); border-radius: 16px; min-height: 240px; }
  .cp-body { max-width: 860px; }
  .cp-steps, .compass > p { max-width: 860px; }
  .paper.wide .cp-footer { max-width: 860px; }
}

.stepper-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.step-btn { width: 48px; height: 48px; border-radius: 12px; border: 2px solid var(--ink); background: #fff; font-size: 24px; cursor: pointer; color: var(--ink); }
.step-btn:disabled { opacity: .35; cursor: default; }
.stepper-row output { min-width: 80px; text-align: center; font-weight: 700; }

.gs-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.gs-list li { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.gs-list li > span:nth-child(2) { flex: 1 1 auto; }
.gs-list .gs-done { color: var(--muted); } .gs-list .gs-done span:nth-child(2) { text-decoration: line-through; }

/* Today and Plan use the width on desktop */
.today-grid { display: contents; }
.weeks.cols { display: flex; }
@media (min-width: 900px) {
  .today-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px 24px; align-items: start; }
  .today-grid > .week-card { grid-column: 1; grid-row: 1 / span 6; }
  .today-grid > :not(.week-card) { grid-column: 2; }
  .today-grid .two { grid-template-columns: minmax(0, 1fr); }
}

.tool-callout { display: flex; flex-direction: column; gap: 10px; background: var(--hl); border: 2px solid var(--ink); border-radius: 14px; padding: 14px 16px; }
.tool-callout p { margin: 2px 0 0; }
.tool-callout .btn { background: #fff; }

/* Program: tasks with tools, readings, templates */
.step { flex-wrap: wrap; }
.mins { color: var(--muted); font-weight: 500; }
.task-action { padding: 0 0 6px 40px; margin-top: -6px; }
.steps-list > li { display: flex; flex-direction: column; }
.deliverables { margin: 4px 0 8px; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.lessons { list-style: none; margin: 4px 0 8px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lesson-btn { width: 100%; text-align: left; background: #fff; border: 1.5px solid var(--rule); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; cursor: pointer; font: inherit; color: var(--ink); min-height: 56px; }
.lesson-btn:hover { border-color: var(--ink); } .lesson-btn small { color: var(--muted); }
.tmpl { background: #fff; border: 1.5px solid var(--rule); border-radius: 12px; padding: 0 14px; margin: 4px 0; }
.tmpl summary { cursor: pointer; min-height: 48px; display: flex; align-items: center; font-weight: 600; }
.tmpl pre { white-space: pre-wrap; font-family: var(--body); font-size: 15px; line-height: 1.5; background: var(--paper-2); border-radius: 10px; padding: 12px; margin: 0 0 10px; }
.tmpl .btn { margin-bottom: 12px; }
.prose { display: flex; flex-direction: column; gap: 12px; font-size: 17px; line-height: 1.6; max-width: 640px; }
.prose p, .prose ul { margin: 0; } .prose ul { padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.prose h4 { margin: 8px 0 0; font-family: var(--display); font-size: 20px; }
.group { margin: 10px 0 -4px; font-size: 22px; }
.weeks details .label { display: block; margin: 10px 0 2px; }

/* ── Resume and cover letter writers ── */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.doc-form { gap: 14px; }
.doc-step { display: flex; gap: 12px; align-items: flex-start; margin-top: 6px; }
.doc-step .num { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; background: var(--hl); border: 2px solid var(--ink); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.doc-step p { margin: 2px 0 0; }
.page-preview { border: 1.5px solid var(--rule); border-radius: 8px; overflow: hidden; background: #fff; }
.stepper { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.stepper li { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--muted); }
.stepper li span { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--rule); display: flex; align-items: center; justify-content: center; font-size: 13px; }
.stepper li + li::before { content: ''; width: 18px; border-top: 2px solid var(--rule); }
@media (max-width: 420px) { .stepper { flex-direction: column; align-items: flex-start; gap: 4px; } .stepper li + li::before { display: none; } }
.stepper li.on { color: var(--ink); } .stepper li.on span { background: var(--hl); border-color: var(--ink); }
.stepper li.past span { background: var(--ink); border-color: var(--ink); color: #fff; }
.kw-list { display: flex; flex-direction: column; gap: 8px; }
.kw, .reqs, .edit-text { background: #fff; border: 1.5px solid var(--rule); border-radius: 12px; padding: 0 14px; }
.kw[open], .edit-text[open] { border-color: var(--ink); }
.kw summary, .reqs summary, .edit-text summary { cursor: pointer; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 600; }
.kw .st { font-size: 13px; font-weight: 700; border-radius: 99px; padding: 1px 10px; white-space: nowrap; }
.kw .ok { background: var(--hl); } .kw .part { background: #fff3cd; } .kw .gap { background: #f1f1f1; color: var(--muted); }
.kw .ask { margin: 0 0 12px; font-weight: 600; line-height: 1.45; }
.kw p.small { margin: 0 0 8px; } .kw-drop { margin-bottom: 12px; font-size: 14px; }
.kw > .field, .edit-text > .field { margin-bottom: 10px; }
.reqs ul { margin: 0 0 12px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.edit-text > button { margin-bottom: 12px; }
.review { background: #fff; border: 1.5px solid var(--ink); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.review-head { align-items: center; justify-content: space-between; } .review .score { font-weight: 700; background: var(--hl); border-radius: 99px; padding: 2px 12px; }
.review p { margin: 0; } .review ul { margin: 4px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.review .para { font-weight: 600; } .review .fix { color: var(--muted); }
.revise { border-top: 1.5px solid var(--rule); padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.revise .field label { font-weight: 600; font-size: 14px; }
.base-draft { background: #fff; border: 1.5px solid var(--rule); border-radius: 8px; padding: 18px 20px; font-size: 15px; line-height: 1.5; } .base-draft p { margin: 0 0 10px; }

/* ── Sky, the AI Coach: header and the slide-in panel ── */
.sky-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; }
.sky-head h2 { margin: 0; }
.sky-focus { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.focus-btn { display: inline-flex; gap: 4px; align-items: center; }
body.no-scroll { overflow: hidden; }
.drawer-wrap { position: fixed; inset: 0; z-index: 50; display: flex; justify-content: flex-end; pointer-events: none; }
.drawer-wrap.open { pointer-events: auto; }
.drawer-back { position: absolute; inset: 0; background: rgba(21, 32, 59, 0); transition: background .2s ease; }
.drawer-wrap.open .drawer-back { background: rgba(21, 32, 59, .45); }
.drawer { position: relative; background: #fff; width: min(440px, 100%); height: 100%; display: flex; flex-direction: column; box-shadow: -10px 0 30px rgba(21, 32, 59, .2); transform: translateX(100%); transition: transform .22s ease; }
.drawer-wrap.open .drawer { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 18px 18px 10px; border-bottom: 1.5px solid var(--rule); }
.drawer-head h2 { margin: 0; }
.drawer-body { overflow-y: auto; padding: 14px 18px calc(24px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 14px; flex: 1 1 auto; }
.drawer-body p { margin: 0; }
.sky-facts { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.focus-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.focus-card { border: 1.5px solid var(--rule); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.focus-card.on { border: 2px solid var(--ink); background: var(--paper-2); }
.fc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fc-head h3 { margin: 0; font-size: 19px; }
.focus-card p { font-size: 15px; }
.fc-info { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; font-size: 14px; }
.fc-info dt { color: var(--muted); font-weight: 600; } .fc-info dd { margin: 0; }
.focus-card .btn { align-self: flex-start; min-height: 44px; font-size: 15px; padding: 6px 16px; margin-top: 4px; }
@media (max-width: 699px) {
  .drawer-wrap { align-items: flex-end; }
  .drawer { width: 100%; height: 88%; border-radius: 18px 18px 0 0; transform: translateY(100%); box-shadow: 0 -10px 30px rgba(21, 32, 59, .2); }
  .fc-info { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .drawer, .drawer-back { transition: none; } }

/* ── Notes ── */
.notes-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.notes-list { gap: 10px; }
.notes-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.notes-top .btn { min-height: 44px; font-size: 15px; padding: 6px 16px; }
.note-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow-y: auto; }
.note-item { width: 100%; text-align: left; background: #fff; border: 1.5px solid var(--rule); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; cursor: pointer; font: inherit; color: var(--ink); min-height: 52px; }
.note-item small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-item.on { border: 2px solid var(--ink); background: var(--hl); }
.note-editor { gap: 12px; }
.note-editor textarea { min-height: 340px; }
.note-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.note-back { display: none; }
@media (max-width: 899px) {
  .notes.show-editor .notes-list { display: none; }
  .notes:not(.show-editor) .note-editor, .notes:not(.show-editor) .docs-empty { display: none; }
  .notes.show-editor .note-back { display: flex; }
}
@media (min-width: 900px) { .notes-cols { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 24px; } .note-editor textarea { min-height: 420px; } }
.field textarea, .composer textarea { font-family: var(--body); }
.task .src.vik, .plan-task .src.vik { background: var(--hl); color: var(--ink); }

/* ── Your context ── */
.ctx-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.ctx-cols > div { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.radios { display: flex; flex-direction: column; gap: 8px; }
.radio-card { text-align: left; background: #fff; border: 1.5px solid var(--rule); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; cursor: pointer; font: inherit; color: var(--ink); min-height: 56px; }
.radio-card span { font-size: 14px; color: var(--muted); line-height: 1.4; }
.radio-card.on { border: 2px solid var(--ink); background: var(--hl); } .radio-card.on span { color: var(--ink); }
.field select { min-height: 48px; border: 1.5px solid #C9D3E3; border-radius: 12px; padding: 8px 12px; font: inherit; font-size: 16px; background: #fff; color: var(--ink); }
@media (min-width: 900px) { .ctx-cols { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 24px; } }
.link-btn.inline { display: inline; min-height: 0; vertical-align: baseline; }
.share-btn { align-self: flex-start; min-height: 44px; font-size: 15px; padding: 6px 16px; }
.share-form { gap: 10px; }

/* Focus icons */
.focus-icon { flex: 0 0 auto; width: var(--size, 36px); height: var(--size, 36px); border-radius: 50%; background: var(--tint, #EEF2F9); display: inline-flex; align-items: center; justify-content: center; border: 1.5px solid var(--ink); }
.focus-icon svg { width: 58%; height: 58%; stroke: var(--ink); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fc-head { gap: 10px; } .fc-head h3 { flex: 1 1 auto; }

/* The hidden file input stays focusable; show focus on its button-label */
input.sr-only:focus-visible + label.btn { outline: 3px solid var(--ink); outline-offset: 2px; }

/* ── Demo bar ── */
.demobar { position: sticky; top: 0; z-index: 40; background: var(--ink); color: #fff; padding: 8px 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; font-size: 14px; }
.demobar-actions { display: flex; gap: 8px; }
.demobar-btn { border: 1.5px solid #fff; background: none; color: #fff; border-radius: 99px; padding: 5px 12px; font: inherit; font-weight: 600; cursor: pointer; min-height: 32px; text-decoration: none; display: inline-flex; align-items: center; }
.demobar-btn.solid { background: var(--hl); color: var(--ink); border-color: var(--hl); }
.fb-form { flex: 1 1 100%; background: #fff; color: var(--ink); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.fb-form textarea, .fb-form input { width: 100%; border: 1.5px solid #C9D3E3; border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 15px; box-sizing: border-box; }
.fb-stars { display: flex; gap: 2px; }
.fb-star { border: 0; background: none; font-size: 26px; color: #C9D3E3; cursor: pointer; padding: 0 2px; line-height: 1; min-width: 36px; min-height: 36px; }
.fb-star.on { color: #E0A800; }
/* ── Resume writer conversation ── */
.ra-conv { display: flex; flex-direction: column; gap: 14px; }
.ra-conv > .row:first-child { justify-content: space-between; align-items: center; }
.ra-msg { background: #fff; border: 1.5px solid var(--rule); border-radius: 12px; padding: 14px 16px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.ra-msg p { margin: 0; overflow-wrap: anywhere; }
.ra-user { align-self: flex-end; max-width: 85%; background: var(--hl); border-color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.ra-ok { border-color: #12b76a; } .ra-fail { border-color: #d92d20; }
.ra-draft, .ra-json { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--paper-2, #f7f8fb); border-radius: 8px; padding: 12px; max-height: 70vh; overflow: auto; font-size: 14px; line-height: 1.45; }
.ra-draft { font-family: Calibri, Carlito, var(--font, system-ui), sans-serif; }
.ra-json { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.ra-notes { background: #fffaeb; border: 1px solid #fedf89; border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.ra-notes ul { margin: 4px 0 0; padding-left: 18px; }
.ra-prompt { font-weight: 700; }
.ra-checks { list-style: none; padding: 0; margin: 6px 0; font-size: 14px; }
.ra-checks .ok { color: #067647; } .ra-checks .bad { color: #b42318; }
.ra-reply { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; position: sticky; bottom: calc(68px + env(safe-area-inset-bottom, 0px)); background: #fff; padding: 8px 0; }
.ra-reply textarea { flex: 1 1 220px; min-width: 0; }

/* ── Resume writer: the two paths and the tailored result ── */
.path-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-bottom: 14px; }
@media (min-width: 560px) { .path-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.path { text-align: left; background: #fff; border: 1.5px solid var(--rule); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; color: var(--ink); font: inherit; min-height: 48px; }
.path.on { border: 2px solid var(--ink); background: var(--paper-2); }
.path .small { color: var(--muted); }
.tl-result { display: flex; flex-direction: column; gap: 14px; }
.tl-result > p { margin: 0; }
.tl-sum { font-size: 17px; line-height: 1.5; }
.tl-block { display: flex; flex-direction: column; gap: 8px; }
.tl-block > b { font-size: 17px; }
.tl-changes { display: flex; flex-direction: column; gap: 8px; }
.tl-change { background: #fff; border: 1.5px solid var(--rule); border-radius: 12px; padding: 0 14px; }
.tl-change[open] { border-color: var(--ink); }
.tl-change summary { cursor: pointer; min-height: 48px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 15px; }
.tl-kind { font-size: 13px; font-weight: 700; border-radius: 99px; padding: 1px 10px; background: #f1f1f1; white-space: nowrap; }
.tl-kind.k-rewritten, .tl-kind.k-sharpened { background: var(--hl); } .tl-kind.k-reordered { background: #e3edff; } .tl-kind.k-removed { background: #fde7e7; } .tl-kind.k-added { background: #fff3cd; }
.tl-sec { font-weight: 600; } .tl-what { color: var(--muted); }
.tl-diff { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 0 0 14px; }
@media (min-width: 700px) { .tl-diff { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tl-diff > div { border-radius: 8px; padding: 10px 12px; font-size: 15px; line-height: 1.45; }
.tl-before { background: #f6f6f6; } .tl-after { background: var(--paper-2); border: 1px solid var(--rule); }
.tl-diff p { margin: 4px 0 0; overflow-wrap: anywhere; }
.tl-tag { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.tl-match { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tl-match li { background: #fff; border: 1.5px solid var(--rule); border-radius: 12px; padding: 10px 14px; }
.tl-match p { margin: 4px 0 0; }
.tl-req { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 600; font-size: 15px; }
.tl-match .st { font-size: 13px; font-weight: 700; border-radius: 99px; padding: 1px 10px; white-space: nowrap; }
.tl-match .ok { background: var(--hl); } .tl-match .part { background: #fff3cd; } .tl-match .gap { background: #f1f1f1; color: var(--muted); }
.tl-ev { color: var(--ink); }
.tl-thin { border: 1.5px solid var(--ink); border-radius: 12px; padding: 12px 14px; background: #fff; }
.tl-thin p { margin: 0; }
.mem-group { display: flex; flex-direction: column; }
.mem.sub { padding-left: 18px; }
.mem .link-btn.small { font-size: 14px; flex: 0 0 auto; }
.rn-form { padding: 6px 0 8px; } .rn-form input { flex: 1 1 200px; min-height: 44px; border: 1.5px solid #C9D3E3; border-radius: 10px; padding: 8px 10px; font-size: 16px; }
.ra-stack { display: flex; flex-direction: column; gap: 16px; }

/* ── Wide screens: the tabs move to a rail on the left, so nothing sits over the bottom of the page ── */
@media (min-width: 900px) {
  .tabbar { top: 0; bottom: auto; right: auto; left: 0; width: 92px; height: 100vh; height: 100dvh; border-top: 0; border-right: 1.5px solid var(--rule); justify-content: flex-start; padding: 84px 0 0; }
  .tabbar-in, .paper.wide .tabbar-in { flex-direction: column; max-width: none; width: 100%; }
  .tab { flex: 0 0 auto; min-height: 72px; }
  .tab[aria-current="page"]::before { top: 16%; bottom: 16%; left: 0; right: auto; width: 4px; height: auto; border-radius: 0 4px 4px 0; }
  .paper.app { padding-bottom: 32px; padding-left: 92px; }
  .composer, .cp-footer, .ra-reply { bottom: 0; }
}

/* ── Applications ── */
.ap-card { gap: 10px; }
.ap-done { border-color: var(--ok, #2e7d4f); }
.ap-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
@media (min-width: 700px) { .ap-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ap-fields .field span, .ap-target span { font-size: 14px; font-weight: 600; display: block; margin-bottom: 4px; }
.ap-big { font-size: 22px; font-weight: 700; margin: 0; }
.ap-big .small { font-weight: 400; }
.ap-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ap-row { background: #fff; border: 1.5px solid var(--rule); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.ap-closed { opacity: .75; }
.ap-main { display: flex; flex-direction: column; gap: 4px; }
.ap-status { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 4px; }
.ap-status .st { font-size: 13px; font-weight: 700; border-radius: 99px; padding: 2px 10px; background: var(--hl); }
.ap-status .s-interview, .ap-status .s-offer { background: #d9f2e3; }
.ap-status .s-rejected, .ap-status .s-no_reply, .ap-status .s-withdrawn { background: #eee; }
.ap-more { border-top: 1px solid var(--rule); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.ap-more .row { align-items: center; }
.ap-group { margin-top: 8px; }
.ap-target input { max-width: 120px; }
.ok { color: var(--ok, #2e7d4f); }
.ap-offer { border-color: var(--ink); }
.ap-switch { align-items: flex-start; gap: 10px; cursor: pointer; }
.ap-switch input { margin-top: 4px; }
.ap-alerts .ap-new { border-color: var(--ink); }
.ap-verdict { margin: 4px 0 0; }
.ap-dismiss { font: inherit; font-size: 14px; border: 1.5px solid #C9D3E3; border-radius: 10px; padding: 4px 8px; background: #fff; color: var(--ink); }
.btn.small { min-height: 36px; padding: 6px 14px; font-size: 14px; }

/* Document titles carry a job ad's own heading: a normal heading, at most three lines. */
.doc-title { margin: 0; font-family: var(--display); font-size: 19px; line-height: 1.3; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-width: 0; flex: 1 1 200px; }
.tmpl-opt { min-height: 44px; }
.card h3 small, .card .label small { font-size: 12px; letter-spacing: 0; text-transform: none; }

/* Small phones: the chat's first message should be on screen without scrolling. */
@media (max-width: 359px) { .screen.chat .sky-head .note, .screen.chat > p.small.muted { display: none; } }

/* Phones held sideways, and any short window: keep the conversation and the composer on screen. */
@media (max-height: 520px) {
  .top-in { padding-top: 8px; padding-bottom: 6px; }
  .screen.chat .sky-head .note, .screen.chat > p.small.muted, .screen.chat .tool-callout { display: none; }
  .screen.chat .sky-head h2 { font-size: 22px; }
  .tab { min-height: 44px; font-size: 11px; gap: 1px; } .tab svg { width: 18px; height: 18px; }
  .paper.app { padding-bottom: calc(52px + env(safe-area-inset-bottom, 0px)); }
  .composer { bottom: calc(44px + env(safe-area-inset-bottom, 0px)); padding: 6px 0 4px; }
  .composer textarea { min-height: 44px; max-height: 88px; }
}

/* ── The demo screen: the conversation first, what Sky knows beside it ── */
.keep-form { display: flex; flex-direction: column; gap: 10px; }
.toolcard.held { opacity: .7; border-style: dashed; }

body.demo-mode #foot { display: none; }
body.demo-mode .paper.app { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 900px) { body.demo-mode .paper.app { padding-left: 0; padding-bottom: 12px; } }
.demo-back { margin: 4px 0 10px; }
.demo-screen { gap: 0; }
.demo-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.demo-chat { display: flex; flex-direction: column; gap: 12px; min-width: 0; min-height: calc(100dvh - 180px); }
.demo-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.demo-head h2 { margin: 0; font-family: var(--display); font-size: 28px; }
.demo-head .hand { font: 600 21px var(--hand); color: var(--note); }
.demo-chat .msgs { min-height: 0; flex: 1 1 auto; }
.demo-dock { position: sticky; bottom: 0; z-index: 5; background: #fff; padding-top: 6px; }
.demo-dock .composer { position: static; border-top: 0; box-shadow: none; padding: 6px 0 0; }
.fine { margin: 6px 0 0; font-size: 12px; line-height: 1.4; color: var(--muted); }

.demo-know { background: #fff; border: 1.5px solid var(--rule); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.dk-title { margin: 0; font: 700 12px var(--body); letter-spacing: .8px; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.dk-title em { font-style: normal; font-weight: 500; letter-spacing: 0; text-transform: none; }
.dk-notes { list-style: none; margin: 0; padding: 0; min-height: 96px; }
.dk-notes li { margin: 0 0 10px; padding: 7px 10px; border-radius: 10px; font-size: 15px; line-height: 1.4; border-left: 4px solid var(--hl); background: var(--paper-2); overflow-wrap: anywhere; }
.dk-notes li.new { animation: dk-flash 1.8s ease-out; }
.dk-notes li.ph { height: 14px; padding: 0; border: 0; background: linear-gradient(90deg, var(--rule-line), #F7F9FC); width: 86%; margin: 14px 0; }
.dk-notes li.ph:nth-child(2) { width: 68%; } .dk-notes li.ph:nth-child(3) { width: 76%; }
@keyframes dk-flash { 0% { background: var(--hl); transform: translateX(-6px); opacity: .2; } 25% { opacity: 1; transform: none; } 100% { background: var(--paper-2); } }
@media (prefers-reduced-motion: reduce) { .dk-notes li.new { animation: none; } }
.dk-empty { margin: 0; font-size: 14px; color: var(--muted); }
.dk-keep { border-top: 1.5px solid var(--rule); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.dk-keep .btn { width: 100%; }
.dk-keep p { margin: 0; }
.dk-tools { align-self: flex-start; font-size: 14px; }
.demo-pill, .sheet-close, .demo-scrim { display: none; }

/* Computer: the panel sits beside the chat and stays in view while it scrolls. */
@media (min-width: 900px) {
  .demo-grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 26px; align-items: start; }
  .demo-know { position: sticky; top: 64px; }
}

/* Phone and tablet: a pill above the message box opens the panel as a sheet. */
@media (max-width: 899px) {
  .demo-pill { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; margin: 0 0 4px; padding: 9px 14px; border: 1.5px solid var(--ink); border-radius: 99px; background: #fff; font-weight: 600; font-size: 14px; min-height: 44px; }
  .demo-pill .dk-dot { display: inline-block; width: 9px; height: 9px; margin-right: 8px; border-radius: 50%; background: var(--hl); border: 1.5px solid var(--ink); }
  .demo-know { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; max-height: 86dvh; overflow-y: auto; border: 0; border-top: 2px solid var(--ink); border-radius: 22px 22px 0 0; box-shadow: 0 -12px 30px rgba(21, 32, 59, .22); padding: 18px 18px calc(22px + env(safe-area-inset-bottom, 0px)); transform: translateY(110%); visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s; }
  .demo-know.open { transform: none; visibility: visible; transition: transform .25s ease; }
  .sheet-close { display: block; align-self: center; color: var(--muted); font-size: 14px; }
  .demo-scrim { display: block; position: fixed; inset: 0; z-index: 65; background: rgba(21, 32, 59, .35); }
}
