/* Demo landing + sample-resume tab. Board layout: ../shared/board.css */

:root { --foot-h: 3.6rem; }

/* ---------- sample resume tab ---------- */
.resume-head { display: flex; justify-content: space-between; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin-bottom: 0.5rem; }
.live-tag {
  font-family: var(--font-body); font-size: 0.64rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--accent-ink); background: rgba(18, 165, 148, 0.12); padding: 0.15rem 0.4rem; border-radius: 999px; margin-left: 0.3rem;
}
.resume-actions { display: flex; gap: 0.3rem; }
.resume-actions .btn { padding: 0.3rem 0.65rem; font-size: 0.78rem; }
.resume-body {
  margin: 0; flex: 1; overflow: auto; min-height: 0;
  font-family: ui-monospace, "IBM Plex Mono", monospace; font-size: 0.76rem; line-height: 1.45;
  white-space: pre-wrap; background: #f0f4f7; border-radius: 10px; padding: 0.7rem 0.8rem;
}
.r-name { font-weight: 700; font-size: 1.05em; }
.r-h { font-weight: 700; color: var(--ink-soft); }
.r-adapt { background: rgba(18, 165, 148, 0.16); outline: 1px solid rgba(18, 165, 148, 0.35); border-radius: 4px; }
/* Brief pulse when Documents adapt to a newly selected job. */
.r-flash {
  display: inline; border-radius: 3px;
  background: rgba(212, 160, 23, 0.42);
  box-shadow: 0 0 0 2px rgba(18, 165, 148, 0.28);
  animation: r-flash-fade 1.8s ease forwards;
}
@keyframes r-flash-fade {
  0% { background: rgba(212, 160, 23, 0.5); box-shadow: 0 0 0 3px rgba(18, 165, 148, 0.35); }
  55% { background: rgba(18, 165, 148, 0.28); box-shadow: 0 0 0 2px rgba(18, 165, 148, 0.22); }
  100% { background: rgba(18, 165, 148, 0.14); box-shadow: none; }
}
.notify-plans {
  margin: 0 0 0.85rem; padding-left: 1.1rem;
  color: var(--ink-soft); font-size: 0.86rem; line-height: 1.45;
}
.notify-plans li { margin: 0.25rem 0; }
.toast {
  position: fixed;
  right: 16px;
  bottom: calc(var(--foot-h) + 16px);
  max-width: min(20rem, calc(100vw - 2rem));
  width: max-content;
  margin: 0;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  line-height: 1.35;
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
  z-index: 100;
  /* body is a flex column on browse — keep toast out of that layout */
  flex: none;
  align-self: flex-end;
}
.toast.show { opacity: 1; }
.toast:not(.show) { visibility: hidden; }

/* ---------- chrome ---------- */
.top-nav { display: flex; align-items: center; gap: 0.35rem; margin-left: auto; }
.nav-link, .top .nav-cta {
  appearance: none; border: 0; cursor: pointer;
  font: inherit; font-size: 0.88rem; font-weight: 600;
  padding: 0.35rem 0.65rem; border-radius: 999px; text-decoration: none;
}
.nav-link {
  background: transparent; color: var(--ink-soft);
}
.nav-link:hover { color: var(--ink); background: rgba(7, 17, 26, 0.05); }
.top .nav-cta {
  background: var(--ink); color: #e8f4f2; font-weight: 700; font-size: 0.85rem; padding: 0.4rem 0.85rem;
}
.top .tagline { display: none; } /* hero carries the message */

/* ---------- hero (first viewport) ---------- */
.hero {
  max-width: 48rem; margin: 0 auto;
  padding: clamp(0.5rem, 2vh, 1.5rem) 1.25rem 0;
  text-align: center;
}
/* Brand leads the composition; tagline stays secondary. */
.hero-brand {
  margin: 0 0 clamp(0.4rem, 1.4vh, 0.85rem); font-family: var(--font-display); font-weight: 600;
  font-size: clamp(3rem, 9vmin, 5rem); letter-spacing: -0.03em; color: var(--ink); line-height: 0.95;
  animation: hero-rise 0.7s ease-out both;
}
.hero-tagline {
  margin: 0 0 clamp(0.4rem, 1.2vh, 0.75rem); font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.2rem, 2.8vmin, 1.65rem); color: var(--ink-soft); line-height: 1.3;
  animation: hero-rise 0.7s ease-out 0.08s both;
}
.hero-tagline em { font-style: italic; color: var(--ink); }
.hero-lead {
  margin: 0 auto clamp(0.9rem, 2vh, 1.35rem); max-width: 38rem;
  color: color-mix(in srgb, var(--ink) 72%, var(--ink-soft));
  font-size: clamp(1rem, 2vmin, 1.15rem); line-height: 1.45;
  animation: hero-rise 0.7s ease-out 0.16s both;
}
.hero-actions {
  display: flex; flex-wrap: wrap; gap: 0.7rem; justify-content: center;
  animation: hero-rise 0.7s ease-out 0.24s both;
}
.hero-actions .btn {
  font-size: clamp(0.95rem, 1.6vmin, 1.08rem);
  padding: 0.72rem 1.4rem;
}

/* Full-width 3×2 peer grid — matches mail page content width (~1100px). */
.landing-stack {
  width: 100%;
  max-width: min(1100px, 94vw);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 3vw, 2rem);
}
.capabilities {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.8vh, 1.85rem) clamp(1.5rem, 3.5vw, 2.75rem);
  margin: clamp(1rem, 2.8vh, 1.75rem) 0 0;
  padding: clamp(1rem, 2.4vh, 1.5rem) 0 0;
  border-top: 1px solid var(--line);
  text-align: left;
  animation: hero-rise 0.7s ease-out 0.32s both;
}
.cap h2 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vmin, 1.3rem);
  font-weight: 600;
  color: var(--accent-ink);
  letter-spacing: 0.01em;
}
.cap p {
  margin: 0;
  font-size: clamp(0.95rem, 1.65vmin, 1.08rem);
  line-height: 1.45;
  /* Darker than ink-soft so body copy stays readable at a glance */
  color: color-mix(in srgb, var(--ink) 78%, var(--ink-soft));
}
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(0.55rem); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-brand, .hero-tagline, .hero-lead, .hero-actions, .capabilities { animation: none; }
}
@media (max-width: 720px) {
  .capabilities {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 480px) {
  .capabilities {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* Compact hero once the board is open — no page scroll behind the chart. */
body.is-browsing .hero { padding: 0.55rem 1rem 0.35rem; flex: none; }
body.is-browsing .hero-brand { font-size: 1.35rem; margin-bottom: 0; animation: none; }
body.is-browsing .hero-tagline,
body.is-browsing .hero-lead,
body.is-browsing .hero-actions,
body.is-browsing .capabilities { display: none; }

.shell { display: block; }
.browse { max-width: 1440px; margin: 0 auto 1.5rem; }
.browse[hidden] { display: none !important; }

/* ---------- landing: fixed viewport (hero + foot; no page scroll) ---------- */
html.is-landing, body.is-landing {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}
body.is-landing {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-height: 100dvh;
  padding-bottom: 0;
}
body.is-landing .top { flex: none; width: 100%; max-width: none; }
body.is-landing .nav-link,
body.is-landing .top .nav-cta {
  font-size: 0.95rem;
  padding: 0.42rem 0.8rem;
}
body.is-landing .brand { font-size: 1.35rem; }
body.is-landing .shell {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(0.35rem, 1.5vh, 1rem) 0;
  /* Scale type from free shell height (header/footer already accounted for) */
  container-type: size;
  container-name: landing;
}
body.is-landing .landing-stack {
  width: 100%;
  max-width: min(1100px, 94vw);
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden; /* hard no-scroll on the landing composition */
  overscroll-behavior: none;
  display: flex;
  flex-direction: column;
  justify-content: safe center;
  gap: clamp(0.5rem, 2.8cqh, 1.75rem);
  padding-bottom: 0;
}
body.is-landing .landing-stack .hero {
  padding: 0;
  max-width: none;
  flex: none;
}
/*
 * Type scales with shell height (cqh): ~17–18px body on a normal laptop shell,
 * larger brand/tagline, and it compresses instead of scrolling when the shell is short.
 */
body.is-landing .landing-stack .hero-brand {
  font-size: clamp(2.4rem, 11cqh, 5rem);
  margin-bottom: clamp(0.3rem, 1.4cqh, 0.85rem);
}
body.is-landing .landing-stack .hero-tagline {
  font-size: clamp(1.15rem, 3.4cqh, 1.7rem);
  margin-bottom: clamp(0.3rem, 1.2cqh, 0.75rem);
}
body.is-landing .landing-stack .hero-lead {
  font-size: clamp(0.98rem, 2.6cqh, 1.18rem);
  margin-bottom: clamp(0.65rem, 2.2cqh, 1.35rem);
}
body.is-landing .landing-stack .hero-actions .btn {
  font-size: clamp(0.95rem, 2.3cqh, 1.1rem);
  padding: clamp(0.55rem, 1.6cqh, 0.78rem) clamp(1.15rem, 2.2vw, 1.5rem);
}
body.is-landing .landing-stack .capabilities {
  flex: none;
  margin-top: 0;
  width: 100%;
  gap: clamp(0.65rem, 3cqh, 1.75rem) clamp(1.5rem, 3.5vw, 2.75rem);
  padding-top: clamp(0.65rem, 2.4cqh, 1.5rem);
}
body.is-landing .landing-stack .cap h2 {
  font-size: clamp(1.1rem, 2.9cqh, 1.35rem);
  margin-bottom: 0.35rem;
}
body.is-landing .landing-stack .cap p {
  font-size: clamp(0.95rem, 2.55cqh, 1.12rem);
  line-height: 1.45;
}
body.is-landing .foot {
  flex: none;
  margin: 0;
  padding: 0.4rem 1.25rem;
  max-width: none;
  width: 100%;
  font-size: 0.88rem;
  line-height: 1.4;
}
body.is-landing .foot-copy { font-size: 0.78rem; }
body.is-landing .foot-center p + p { margin-top: 0.15rem; }
/* Short shell: drop secondary lead first; only clamp copy on very short panels */
@container landing (max-height: 560px) {
  .landing-stack .hero-lead { display: none; }
}
@container landing (max-height: 400px) {
  .landing-stack {
    justify-content: flex-start;
    gap: 0.45rem;
  }
  .landing-stack .hero-brand { font-size: clamp(2rem, 9cqh, 2.6rem); }
  .landing-stack .hero-tagline { font-size: clamp(1rem, 2.8cqh, 1.2rem); }
  .landing-stack .cap h2 { font-size: 1rem; margin-bottom: 0.15rem; }
  .landing-stack .cap p {
    font-size: 0.84rem;
    line-height: 1.32;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }
  .landing-stack .capabilities {
    gap: 0.45rem 1.1rem;
    padding-top: 0.45rem;
  }
}
@media (max-height: 720px) {
  body.is-landing .foot { font-size: 0.78rem; padding-top: 0.2rem; }
}
/* Height is driven by visualViewport in notify.js when the keyboard opens. */

/* ---------- locked browsing shell: only .main-col / pane scroll ---------- */
html.is-browsing, body.is-browsing {
  height: 100%;
  overflow: hidden;
}
body.is-browsing {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-height: 100dvh;
}
body.is-browsing .top { flex: none; width: 100%; max-width: none; }
body.is-browsing .shell {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
body.is-browsing .browse {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
}
body.is-browsing .browse .app {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 1rem 0.5rem;
  height: 100%;
  align-items: stretch;
  overflow: hidden;
}
body.is-browsing .main-col {
  height: auto;
  max-height: 100%;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
body.is-browsing .side-pane {
  display: flex;
  flex-direction: column;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
  position: static;
}
body.is-browsing .side-pane .pane {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
/* Compact always-on site footer under the board shell / mail page. */
body.is-browsing .foot {
  display: block;
  flex: none;
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0.3rem 1rem;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 94%, #fff);
  font-size: 0.72rem;
  line-height: 1.35;
}
body.is-browsing .foot-copy { margin-top: 0.1rem !important; font-size: 0.65rem; }
body.is-browsing .notify-blurb { font-size: 0.78rem; }

/* ---------- footer: Fidajo centered, notify CTA on the right ---------- */
.foot {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0.45rem 1.25rem;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 94%, #fff);
  color: var(--ink-soft);
  font-size: 0.82rem;
  text-align: center;
}
.foot-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem 1rem;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}
.foot-center {
  grid-column: 2;
  text-align: center;
  min-width: 0;
}
.foot-center p { margin: 0; }
.foot-copy { margin-top: 0.25rem !important; font-size: 0.72rem; opacity: 0.85; }
.pronounce { opacity: 0.75; }

.notify-bar {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  text-align: left;
}
.notify-blurb {
  margin: 0;
  font-size: 0.84rem;
  color: var(--ink-soft);
  line-height: 1.3;
  max-width: 16rem;
}
.notify-bar .btn { flex: none; white-space: nowrap; }

/* Fixed overlay so the form stays above the mobile keyboard (not trapped in the footer). */
.notify-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(7, 17, 26, 0.45);
  cursor: pointer;
}
.notify-backdrop[hidden] { display: none !important; }
.notify-panel {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 91;
  width: min(32rem, calc(100vw - 1.75rem));
  max-height: min(85dvh, 34rem);
  margin: 0;
  padding: 1rem 1.05rem 1.1rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  box-sizing: border-box;
}
.notify-panel[hidden] { display: none !important; }
.notify-panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  margin-bottom: 0.35rem;
}
.notify-panel-head h2 {
  margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 1.2rem;
}
.notify-panel-lead {
  margin: 0 0 0.75rem; color: var(--ink-soft); font-size: 0.9rem; line-height: 1.4;
}
body.notify-open .notify-bar { display: none; }
body.notify-open .notify-panel { display: block; }
body.notify-open { overflow: hidden; }
body.notify-open .foot-row {
  grid-template-columns: 1fr;
}
body.notify-open .foot-center { grid-column: 1; }

.wait-form {
  display: grid; gap: 0.55rem;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1rem;
}
.wait-form input {
  font: inherit; border: 1px solid var(--line); border-radius: 10px;
  padding: 0.7rem 0.85rem; background: #fff; color: var(--ink);
}
.wait-form input:focus { outline: 2px solid rgba(18, 165, 148, 0.35); border-color: var(--accent); }
#waitMsg { margin-top: 0.6rem; min-height: 1.2em; }

@media (max-width: 980px) {
  .resume-body { max-height: 360px; }
  /*
   * Phones / tablets: drop the desktop twin-pane lock. Two short independent
   * scroll regions feel cramped; one document scroll + a capped job list is easier.
   */
  html.is-browsing,
  body.is-browsing {
    height: auto;
    max-height: none;
    overflow: auto;
  }
  body.is-browsing .shell,
  body.is-browsing .browse {
    flex: none;
    overflow: visible;
    min-height: 0;
  }
  body.is-browsing .browse .app {
    height: auto;
    overflow: visible;
    padding-bottom: 1rem;
  }
  body.is-browsing .main-col {
    max-height: none;
    height: auto;
    overflow: visible;
  }
  body.is-browsing .side-pane {
    max-height: none;
    overflow: visible;
  }
  body.is-browsing .side-pane .pane {
    flex: none;
    min-height: 0;
    overflow: visible;
  }
  .notify-blurb { font-size: 0.78rem; max-width: 12rem; }
}
@media (max-width: 720px) {
  /*
   * Phone: breathing room from screen edges, less empty air above the hero,
   * and a scrollable shell when the composition no longer fits.
   */
  :root {
    --page-pad-x: max(1.15rem, env(safe-area-inset-left, 0px));
    --page-pad-r: max(1.15rem, env(safe-area-inset-right, 0px));
  }
  .top,
  .foot,
  body.is-browsing .browse .app,
  body.is-landing .landing-stack {
    padding-left: var(--page-pad-x);
    padding-right: var(--page-pad-r);
  }
  body.is-landing .shell {
    padding: 0.1rem 0 0;
    align-items: stretch;
  }
  body.is-landing .shell,
  body.is-landing .landing-stack {
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  body.is-landing .landing-stack {
    justify-content: flex-start;
    gap: 0.55rem;
    padding-top: 0.15rem;
    padding-bottom: 0.75rem;
    max-width: none;
  }
  body.is-landing .landing-stack .hero-brand {
    font-size: clamp(2rem, 11vw, 2.65rem);
    margin-bottom: 0.35rem;
  }
  body.is-landing .landing-stack .hero-tagline {
    font-size: clamp(1.05rem, 4.2vw, 1.25rem);
  }
  body.is-landing .landing-stack .capabilities {
    padding-top: 0.55rem;
  }
  .foot-row {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 0.55rem;
  }
  .foot-center,
  .notify-bar { grid-column: 1; justify-self: center; }
  .notify-blurb { max-width: none; text-align: center; }
  .notify-panel {
    width: calc(100vw - 1.5rem);
    padding: 0.9rem 1rem 1rem;
  }
  .notify-plans { font-size: 0.8rem; }
}
