/* Agent page — missions + auto-apply (Deep Emerald, Warm Mint, Alabaster & Deep Charcoal) */
:root {
  --acc: #0F4C3A;
  --acc-hover: #0B3A2C;
  --acc-ink: #FFFFFF;
  --acc-soft: #E6F0EC;
  --panel: #FFFFFF;
  --panel2: #F8F9F7;
  --edge: #DCE2DD;
}

body.on-agent main.container { max-width: none; padding: 0; }
body.on-agent footer { display: none; }
.agent-view { padding: 0 !important; }
.ag { display: grid; grid-template-columns: 280px minmax(0, 1fr); min-height: calc(100vh - 60px); }
.ag > * { min-width: 0; max-width: 100%; }
@media (max-width: 860px) {
  .ag { grid-template-columns: minmax(0, 1fr); }
  .ag-side { border-right: 0; border-bottom: 1px solid var(--edge); }
}

/* Sidebar */
.ag-side {
  background: #FFFFFF;
  border-right: 1px solid var(--edge);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ag-side-head { display: flex; align-items: center; gap: 12px; padding: 2px 4px 6px; }

.ag-logo {
  position: relative;
  overflow: hidden;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #0F4C3A 0%, #16654E 100%);
  color: #FFD700;
  border: 1px solid #0B3A2C;
  box-shadow: 0 4px 12px rgba(15, 76, 58, 0.22);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.ag-logo::after {
  content: "";
  position: absolute;
  inset: -40% -80%;
  background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, 0.28) 50%, transparent 58%);
  transform: translateX(-100%);
  animation: agSheenSweep 5.5s ease-in-out infinite;
  pointer-events: none;
}
.ag-side-head:hover .ag-logo { transform: scale(1.05); }

.ag-logo svg { width: 21px; height: 21px; display: block; position: relative; z-index: 1; }
.ag-side-title { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.12rem; color: var(--ink); }
.ag-side-title b { font-weight: 800; color: var(--acc); }

#topNav a.is-active:not(.nav-agent) {
  background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
}

.ag-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--edge);
}

.ag-nav-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  font: 600 0.92rem 'DM Sans', sans-serif;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.ag-nav-btn svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  color: var(--soft);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), color 0.18s ease;
}

.ag-nav-btn:hover {
  background: #F4F7F5;
  color: var(--acc);
  transform: translateX(2px);
}

.ag-nav-btn:hover svg {
  color: var(--acc);
  transform: scale(1.08);
}

.ag-nav-btn.on {
  background: var(--acc-soft);
  border-color: var(--acc);
  color: var(--acc);
  font-weight: 700;
}

.ag-nav-btn.on svg {
  color: var(--acc);
}

.ag-missions-drawer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  flex: 1;
}
.ag-missions-drawer[hidden] { display: none !important; }

@media (max-width: 860px) {
  .ag-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }
  .ag-nav-btn {
    width: auto;
    flex: 1 1 auto;
    justify-content: center;
    padding: 8px 12px;
  }
}

.ag-new {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid var(--acc);
  background: var(--acc-soft);
  color: var(--ink);
  font: 700 0.95rem 'DM Sans', sans-serif;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}

.ag-new span {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--acc);
  color: var(--acc-ink);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
}

.ag-new:hover { background: #D7E8E1; }

.ag-search { position: relative; display: block; }
.ag-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--soft); z-index: 1; pointer-events: none; }
.ag-search input { margin: 0; padding-left: 34px; border-radius: 10px; background: #FFFFFF; border: 1px solid #141518; }

.ag-list { display: flex; flex-direction: column; gap: 4px; overflow: auto; }
.ag-group { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--soft); font-weight: 700; margin: 12px 6px 4px; }

.ag-item {
  display: flex;
  gap: 12px;
  align-items: center;
  text-align: left;
  width: 100%;
  padding: 8px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: none;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
}

.ag-item:hover, .ag-item.on { background: var(--acc-soft); border-color: var(--acc); }
.ag-item b { display: block; font-size: 0.94rem; line-height: 1.25; }
.ag-item small { color: var(--soft); font-size: 0.82rem; }

.ag-item-ic {
  flex: 0 0 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--acc-soft);
  color: var(--acc);
  border: 1px solid var(--acc);
  font-weight: 700;
}

.ag-item-ic.busy {
  background: conic-gradient(var(--acc) 0 25%, transparent 0) border-box;
  animation: spin 1s linear infinite;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  flex-basis: 22px;
  margin: 7px;
  border: 0;
  -webkit-mask: radial-gradient(circle, transparent 7px, #000 8px);
  mask: radial-gradient(circle, transparent 7px, #000 8px);
}

@keyframes spin { to { transform: rotate(360deg); } }
.ag-empty { color: var(--soft); font-size: 0.9rem; padding: 8px; }

/* Main / Panes / Home */
.ag-main { padding: 24px clamp(16px, 4vw, 40px) 60px; min-width: 0; background: #F8F9F7; }
.ag-pane { max-width: 1080px; margin: 0 auto; animation: agPaneIn 0.34s cubic-bezier(0.22, 1, 0.36, 1) both; }
.ag-pane[hidden] { display: none !important; }
.ag-pane.chat-view { padding: 0 !important; max-width: 1120px; }
@media (max-width: 1160px) {
  .ag-pane .chat-shell { grid-template-columns: 1fr; min-height: auto; }
}
.ag-home { max-width: 980px; margin: 0 auto; padding-top: 6px; text-align: center; }

/* Expressive Animated Friend Hero Stage */
.ag-hero-stage {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: clamp(26px, 4.2vw, 44px) clamp(18px, 4vw, 42px) clamp(24px, 3.6vw, 34px);
  background: linear-gradient(142deg, #0B3A2C 0%, #0F4C3A 52%, #136149 100%);
  border: 1px solid #0B3A2C;
  box-shadow: 0 20px 44px rgba(15, 76, 58, 0.16);
  color: #FFFFFF;
}

.ag-hero-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.ag-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(42px);
  opacity: 0.42;
  will-change: transform;
}
.ag-orb-a {
  width: 260px;
  height: 260px;
  top: -90px;
  left: -60px;
  background: radial-gradient(circle, #34D399 0%, transparent 72%);
  animation: agOrbFloatA 12s ease-in-out infinite alternate;
}
.ag-orb-b {
  width: 280px;
  height: 280px;
  bottom: -110px;
  right: -50px;
  background: radial-gradient(circle, #FFD700 0%, transparent 72%);
  opacity: 0.24;
  animation: agOrbFloatB 14s ease-in-out infinite alternate;
}
.ag-orb-c {
  width: 220px;
  height: 220px;
  top: 22%;
  left: 44%;
  background: radial-gradient(circle, #10B981 0%, transparent 72%);
  opacity: 0.22;
  animation: agOrbFloatA 16s ease-in-out infinite alternate-reverse;
}

.ag-hero-svg {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 310px;
  height: 100%;
  opacity: 0.9;
}
.ag-hero-svg-left { left: -12px; }
.ag-hero-svg-right { right: -12px; }
@media (max-width: 780px) {
  .ag-hero-svg { width: 200px; opacity: 0.48; }
}

.ag-orbit-ring {
  transform-box: fill-box;
  transform-origin: center;
  animation: agSlowSpin 42s linear infinite;
}
.ag-orbit-ring-rev {
  animation-direction: reverse;
  animation-duration: 54s;
}
.ag-route-arc {
  animation: agDashFlow 18s linear infinite;
}
.ag-route-arc-2 {
  animation-duration: 24s;
  animation-direction: reverse;
}

.ag-hero-inner {
  position: relative;
  z-index: 1;
}

.ag-hero-crest {
  position: relative;
  overflow: hidden;
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.06) 100%);
  border: 1px solid rgba(255, 215, 0, 0.45);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2);
  animation: agCrestFloat 4.6s ease-in-out infinite;
}
.ag-hero-crest::after {
  content: "";
  position: absolute;
  inset: -40% -80%;
  background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, 0.42) 50%, transparent 58%);
  transform: translateX(-100%);
  animation: agSheenSweep 4.8s ease-in-out infinite;
}
.ag-hero-crest svg {
  width: 36px;
  height: 36px;
  display: block;
  position: relative;
  z-index: 1;
}

.ag-hello {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
  color: #A7F3D0;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.ag-q {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: clamp(1.65rem, 3.6vw, 2.38rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  max-width: 720px;
  margin: 8px auto 12px;
  color: #FFFFFF;
}
.ag-sub {
  color: rgba(236, 253, 245, 0.86);
  max-width: 720px;
  margin: 0 auto 22px;
  font-size: 0.96rem;
  line-height: 1.55;
}
.ag-sub b { color: #FFFFFF; font-weight: 600; }

.ag-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px;
  border-radius: 999px;
  background: #FFFFFF;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  max-width: 820px;
  margin: 0 auto;
  box-shadow: 0 14px 34px rgba(7, 36, 27, 0.28);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease, border-color 0.22s ease;
}
.ag-box:focus-within {
  transform: translateY(-2px);
  border-color: #FFD700;
  box-shadow: 0 18px 40px rgba(7, 36, 27, 0.34), 0 0 0 4px rgba(167, 243, 208, 0.28);
}

.ag-box-icon {
  flex: 0 0 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #0F4C3A;
  border: 1px solid #0B3A2C;
  color: #FFD700;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}
.ag-box:focus-within .ag-box-icon { transform: scale(1.06); }

.ag-box-icon svg { width: 22px; height: 22px; display: block; }
.ag-box input { flex: 1; border: 0; background: none; color: #141518; font-size: 1.04rem; padding: 10px 4px; margin: 0; box-shadow: none; }
.ag-box input::placeholder { color: #64748B; }
.ag-box input:focus { outline: none; box-shadow: none; }
.ag-send {
  flex: 0 0 50px;
  height: 50px;
  border-radius: 50%;
  border: 0;
  background: #141518;
  color: #FFFFFF;
  font-size: 1.32rem;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background-color 0.18s ease, transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.ag-send span { display: inline-block; transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1); }
.ag-send:hover { background: #10B981; transform: scale(1.04); }
.ag-send:hover span { transform: translateX(2px); }
@media (max-width: 560px) { .ag-box-icon { display: none; } .ag-send { flex-basis: 44px; height: 44px; } .ag-box input { font-size: 0.96rem; } }

.ag-hero-stage .msg { margin-top: 10px; color: #ECFDF5; }
.ag-hero-stage .msg.err { color: #FECACA; }

.ag-flow-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(167, 243, 208, 0.2);
}
.ag-flow-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  color: rgba(236, 253, 245, 0.94);
}
.ag-flow-num {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 215, 0, 0.42);
  color: #FFD700;
  font-size: 0.72rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.ag-flow-arrow { width: 34px; height: 12px; flex-shrink: 0; }
@media (max-width: 640px) {
  .ag-flow-arrow { display: none; }
  .ag-flow-strip { gap: 10px 16px; }
}

.ag-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(185px, 1fr));
  justify-content: center;
  gap: 14px;
  margin: 22px auto 0;
  max-width: 980px;
  text-align: left;
}
.ag-cards > * { min-width: 0; }
@media (max-width: 1120px) { .ag-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ag-cards { grid-template-columns: minmax(0, 1fr); } }

.ag-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--edge);
  background: #FFFFFF;
  color: #141518;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  text-align: left;
  box-shadow: 0 2px 8px rgba(15, 76, 58, 0.04);
  animation: agCardRise 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: border-color 0.2s ease, transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.24s ease, background-color 0.2s ease;
}
.ag-card:nth-child(1) { animation-delay: 0.03s; }
.ag-card:nth-child(2) { animation-delay: 0.07s; }
.ag-card:nth-child(3) { animation-delay: 0.11s; }
.ag-card:nth-child(4) { animation-delay: 0.15s; }
.ag-card:nth-child(5) { animation-delay: 0.19s; }
.ag-card:nth-child(6) { animation-delay: 0.23s; }
.ag-card:nth-child(7) { animation-delay: 0.27s; }
.ag-card:nth-child(8) { animation-delay: 0.31s; }

.ag-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, #0F4C3A 0%, #10B981 65%, #FFD700 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.ag-card.is-open { border-color: var(--acc); background: #FAFDFB; }
.ag-card:hover {
  border-color: var(--acc);
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(15, 76, 58, 0.11);
  text-decoration: none;
}
.ag-card:hover::before { transform: scaleX(1); }

.ag-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}
.ag-card-launch {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #F4F7F5;
  color: var(--acc);
  font-size: 0.85rem;
  font-weight: 700;
  opacity: 0.65;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}
.ag-card:hover .ag-card-launch {
  opacity: 1;
  background: var(--acc);
  color: #FFFFFF;
  transform: translate(2px, -2px);
}

.ag-card b { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1rem; font-weight: 700; line-height: 1.25; margin-top: 8px; color: #141518; }
.ag-card span:last-child { color: var(--soft); font-size: 0.87rem; line-height: 1.42; }
.ag-card-art {
  height: 54px;
  width: 92px;
  border-radius: 12px;
  border: 1px solid var(--mint-border);
  display: grid;
  place-items: center;
  overflow: hidden;
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}
.ag-card:hover .ag-card-art { transform: scale(1.04); }
.ag-card-art svg { width: 100%; height: 100%; display: block; }
.art-1 { background: linear-gradient(135deg, #0F4C3A, #1B7A5D); }
.art-2 { background: repeating-linear-gradient(180deg, #E6F0EC 0 8px, #D1E4DC 8px 16px); }
.art-3 { background: linear-gradient(135deg, #0F4C3A, #14634C); }
.art-4 { background: linear-gradient(135deg, #E6F0EC, #C5DDD3); }
.art-ws { background: linear-gradient(135deg, #0F4C3A, #1B7A5D); }

/* Vector Micro-Animations Inside Feature Card Graphics */
.ag-art-bolt,
.ag-art-lens,
.ag-art-shield,
.ag-art-bob,
.ag-art-bar {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.ag-art-bar { transform-origin: bottom center; }
.ag-card:hover .ag-art-bolt { transform: translateY(-2px) scale(1.1); }
.ag-card:hover .ag-art-lens { transform: translate(2px, -2px) scale(1.06); }
.ag-card:hover .ag-art-shield { transform: scale(1.08); }
.ag-card:hover .ag-art-bob { transform: translateY(-2.5px); }
.ag-card:hover .ag-art-bar-1 { transform: scaleY(1.14); }
.ag-card:hover .ag-art-bar-2 { transform: scaleY(1.1); transition-delay: 0.05s; }
.ag-card:hover .ag-art-bar-3 { transform: scaleY(1.08); transition-delay: 0.1s; }
.ag-art-check {
  stroke-dasharray: 40;
  stroke-dashoffset: 0;
}
.ag-card:hover .ag-art-check {
  animation: agCheckDraw 0.55s ease forwards;
}

@keyframes agPaneIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes agCardRise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes agOrbFloatA {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(28px, 18px, 0) scale(1.08); }
}
@keyframes agOrbFloatB {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-26px, -18px, 0) scale(1.1); }
}
@keyframes agSlowSpin {
  to { transform: rotate(360deg); }
}
@keyframes agDashFlow {
  to { stroke-dashoffset: -120; }
}
@keyframes agCrestFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
@keyframes agSheenSweep {
  0%, 72% { transform: translateX(-120%); }
  100% { transform: translateX(140%); }
}
@keyframes agCheckDraw {
  0% { stroke-dashoffset: 36; }
  100% { stroke-dashoffset: 0; }
}

/* LinkedIn Kit inside Agent (Pro Membership) */
.ag-linkedin-panel {
  margin: 24px auto 0;
  max-width: 860px;
  text-align: left;
  background: #FFFFFF;
  border: 1px solid var(--acc);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
}
.ag-lk-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.ag-lk-head h3 { margin: 4px 0 0; font-size: 1.28rem; color: #141518; }
.ag-lk-head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ag-lk-rewriter {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--mint-border);
  background: #F8F9F7;
}
.ag-lk-rw-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ag-lk-rw-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: center; }
.ag-lk-rw-form input { margin: 0; background: #FFFFFF; }
@media (max-width: 700px) { .ag-lk-rw-form { grid-template-columns: 1fr; } }
.ag-lk-out { margin-top: 14px; display: grid; gap: 12px; }
.ag-lk-block {
  border: 1px solid var(--edge);
  border-radius: 12px;
  background: #F8F9F7;
  padding: 14px 16px;
}
.ag-lk-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.ag-lk-block pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.93rem;
  line-height: 1.5;
  color: #141518;
}

.ag-ext { margin: 26px auto 0; max-width: 860px; text-align: left; }
.ag-ext-card {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-radius: 14px;
  border: 1px dashed var(--acc);
  background: var(--acc-soft);
}
.ag-ext-card.ok { border-style: solid; border-color: #10B981; background: #ECFDF5; }
.ag-ext-card p { margin: 4px 0 0; color: var(--ink); font-size: 0.9rem; }
@media (max-width: 620px) { .ag-ext-card { flex-direction: column; align-items: flex-start; } }

/* Buttons */
.ag-btn {
  font: 600 0.92rem 'DM Sans', sans-serif;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid #141518;
  background: #FFFFFF;
  color: #141518;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  display: inline-block;
}
.ag-btn:hover { background: var(--acc-soft); border-color: var(--acc); color: var(--acc); text-decoration: none; }
.ag-btn.primary { background: #141518; border-color: #141518; color: #FFFFFF; }
.ag-btn.primary:hover { background: var(--acc); border-color: var(--acc); color: #FFFFFF; }
.ag-btn.ghost { background: transparent; border-color: var(--edge); }
.ag-btn.sm { padding: 7px 13px; font-size: 0.85rem; }
.ag-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.ag-link { background: none; border: 0; padding: 0; color: var(--acc); font: 600 0.88rem 'DM Sans', sans-serif; cursor: pointer; }
.ag-link.dim { color: var(--soft); }
.ag-link:hover { text-decoration: underline; }

/* Mission */
.ag-mission { max-width: 980px; margin: 0 auto; }
.ag-m-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.ag-m-head h2 { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 1.8rem; margin: 2px 0; }
.ag-m-head p { margin: 2px 0 0; }
.ag-kicker { color: var(--acc); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; }
.ag-m-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.ag-stats { display: grid; grid-template-columns: repeat(3, auto) 1fr; gap: 12px; margin: 20px 0 10px; align-items: stretch; }
.ag-stats > div { border: 1px solid var(--edge); border-radius: 12px; background: #FFFFFF; padding: 12px 16px; box-shadow: var(--shadow-sm); }
.ag-stats b { display: block; font-size: 1.55rem; line-height: 1; color: var(--acc); font-variant-numeric: tabular-nums; }
.ag-stats span { color: var(--soft); font-size: 0.82rem; }
.ag-bar { position: relative; overflow: hidden; display: flex; align-items: flex-end; }
.ag-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, #E6F0EC 0%, #D1FAE5 100%);
  border-right: 2px solid var(--acc);
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}
.ag-bar i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.55) 50%, transparent 65%);
  transform: translateX(-100%);
  animation: agSheenSweep 3.4s ease-in-out infinite;
}
.ag-bar span { position: relative; font-weight: 600; color: #141518; }
@media (max-width: 680px) { .ag-stats { grid-template-columns: repeat(3, 1fr); } .ag-bar { grid-column: 1 / -1; min-height: 44px; } }

.ag-log { border: 1px solid var(--edge); border-radius: 12px; background: #FFFFFF; padding: 10px 16px; margin: 10px 0 16px; }
.ag-log summary { cursor: pointer; color: #141518; font-weight: 600; }
.ag-log ol { margin: 8px 0 2px; padding-left: 20px; color: var(--ink-2); font-size: 0.9rem; }
.ag-log li { margin: 3px 0; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--acc); margin-right: 6px; }

.ag-apps { display: grid; gap: 10px; }
.ag-app { display: flex; gap: 16px; padding: 16px 18px; border: 1px solid var(--edge); border-radius: 14px; background: #FFFFFF; box-shadow: var(--shadow-sm); }
.ag-app.st-applied { border-color: #10B981; background: #ECFDF5; }
.ag-app.st-skipped { opacity: 0.6; }

/* Match Score in Green (#10B981) */
.ag-score {
  flex: 0 0 54px;
  height: 54px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ECFDF5;
  color: #10B981;
  font-weight: 800;
  font-size: 1.12rem;
  border: 1px solid #10B981;
  font-variant-numeric: tabular-nums;
}
.ag-score small { font-size: 0.7rem; margin-left: 1px; }
.ag-app-body { flex: 1; min-width: 0; }
.ag-app h3 { margin: 0; font-size: 1.05rem; color: #141518; }
.ag-app .meta { color: var(--soft); font-size: 0.86rem; margin-top: 2px; }
.ag-app .src { color: var(--acc); font-weight: 600; }
.ag-app .why { margin: 6px 0 0; font-size: 0.92rem; color: #141518; }
.ag-app .row { align-items: center; gap: 14px; margin-top: 10px; }

.pill {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--acc-soft);
  border: 1px solid var(--mint-border);
  color: var(--acc);
}
.st-applied .pill { color: #065F46; background: #ECFDF5; border-color: #10B981; }
.st-opened .pill { color: #92400E; background: #FFFBEB; border-color: #F59E0B; }
.ag-letter { margin-top: 10px; font-size: 0.92rem; line-height: 1.5; background: #FFFFFF; }
@media (max-width: 860px) { .ag-main { order: -1; padding-top: 12px; } .ag-home { padding-top: 20px; } .ag-side { border-top: 1px solid var(--edge); } }

/* "Where should we apply?" */
.ag-setup { border: 1px solid var(--acc); border-radius: 16px; background: #FFFFFF; padding: 20px 22px 22px; margin: 6px 0 18px; box-shadow: var(--shadow-sm); }
.ag-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; font-size: 0.86rem; color: var(--soft); font-weight: 600; }
.ag-steps div { display: flex; flex-direction: column; gap: 6px; }
.ag-steps i { height: 4px; border-radius: 4px; background: var(--edge); }
.ag-steps .done, .ag-steps .on { color: #141518; }
.ag-steps .done i { background: var(--acc); }
.ag-steps .on i { background: linear-gradient(90deg, var(--acc) 50%, var(--edge) 50%); }
.ag-setup h3 { font-size: 1.45rem; margin: 4px 0 14px; }

.ag-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: #F8F9F7; border: 1px solid var(--edge); }
.ag-seg.three { grid-template-columns: repeat(3, 1fr); }
.ag-seg button { font: 600 0.95rem 'DM Sans', sans-serif; padding: 9px; border-radius: 9px; border: 1px solid transparent; background: none; color: var(--soft); cursor: pointer; }
.ag-seg button.on { background: var(--acc-soft); color: var(--acc); border-color: var(--acc); }

.ag-portals { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 10px; margin: 14px 0 8px; }
.ag-portal {
  display: flex;
  gap: 12px;
  align-items: center;
  text-align: left;
  padding: 13px;
  border-radius: 12px;
  border: 1px solid var(--edge);
  background: #FFFFFF;
  color: #141518;
  cursor: pointer;
  font: inherit;
  min-height: 66px;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.2s ease;
}
.ag-portal:hover {
  transform: translateY(-2px);
  border-color: var(--acc);
  box-shadow: 0 8px 18px rgba(15, 76, 58, 0.08);
}
.ag-portal.on { border-color: var(--acc); background: var(--acc-soft); }
.ag-portal .tick {
  flex: 0 0 24px;
  height: 24px;
  border-radius: 7px;
  border: 1.5px solid #141518;
  background: #FFFFFF;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #FFFFFF;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.18s ease, border-color 0.18s ease;
}
.ag-portal.on .tick { background: var(--acc); border-color: var(--acc); transform: scale(1.06); }
.ag-portal b { display: block; font-size: 0.98rem; }
.ag-portal em { font-style: normal; font-size: 0.8rem; color: var(--acc); font-weight: 600; }
.ag-portal em.dim { color: var(--soft); font-weight: 400; }
.ag-portal em.warn { color: #B45309; }

.ag-q2 { font-weight: 700; margin: 16px 0 8px; color: #141518; }
.ag-fine { color: var(--soft); font-size: 0.86rem; margin: 8px 2px 0; }
.ag-email { border: 1px solid var(--edge); border-radius: 12px; padding: 14px 16px; margin: 14px 0 4px; background: #F8F9F7; }
.ag-email p { margin: 6px 0 0; color: var(--ink); }

.ag-go {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 13px;
  border-radius: 999px;
  border: 0;
  background: #141518;
  color: #FFFFFF;
  font: 700 1.04rem 'DM Sans', sans-serif;
  cursor: pointer;
}
.ag-go:hover:not(:disabled) { background: var(--acc); }
.ag-go:disabled { opacity: 0.45; cursor: not-allowed; }

.ag-where {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  border: 1px solid var(--edge);
  border-radius: 12px;
  background: #FFFFFF;
  padding: 10px 14px;
  margin: 6px 0 12px;
  color: var(--soft);
  font-size: 0.9rem;
}
.ag-where b { color: #141518; font-weight: 600; }

.ag-portal-tabs {
  border: 1px solid var(--edge);
  border-radius: 14px;
  background: #FFFFFF;
  padding: 14px 16px;
  margin: 0 0 14px;
}
.ag-portal-tabs-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.ag-portal-tabs-head b {
  display: block;
  color: #141518;
  font-size: 0.96rem;
}
.ag-portal-tabs-head p {
  margin: 2px 0 0;
}
.ag-portal-tab-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(185px, 100%), 1fr));
  gap: 8px;
}
.ag-portal-tab-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--edge);
  background: var(--panel2);
  color: #141518;
  text-decoration: none;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.2s ease;
}
.ag-portal-tab-link:hover {
  border-color: var(--acc);
  background: var(--acc-soft);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(15, 76, 58, 0.08);
}
.ag-tab-num {
  flex: 0 0 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--acc);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  display: grid;
  place-items: center;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.ag-portal-tab-link:hover .ag-tab-num { transform: scale(1.08); }
.ag-portal-tab-link b {
  display: block;
  font-size: 0.9rem;
  line-height: 1.2;
}
.ag-portal-tab-link small {
  display: block;
  font-size: 0.76rem;
  color: var(--acc);
  font-weight: 600;
}

/* Gmail Email Apply & Confirmation Modal */
.ag-mail-status { margin: 10px 0 8px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ag-mail-ok { color: #10B981; font-weight: 700; font-size: 0.9rem; }
.ag-hr-box { margin-top: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--edge); background: #F8F9F7; }
.ag-hr-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 640px) { .ag-hr-row { grid-template-columns: 1fr; } }
.ag-hr-box label { font-size: 0.8rem; color: #141518; }
.ag-hr-box input { margin-top: 4px; background: #FFFFFF; }

.ag-modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(20, 21, 24, 0.55);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
}

.ag-modal {
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow: auto;
  background: #FFFFFF;
  border: 1px solid var(--acc);
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: 0 20px 50px rgba(20, 21, 24, 0.22);
}
.ag-modal.ag-modal-wide { max-width: 780px; }

.ag-modal h3 { margin: 0 0 8px; font-size: 1.25rem; color: #141518; }
.ag-modal-lead { margin: 0 0 12px; color: #141518; font-size: 0.94rem; }
.ag-modal-meta { background: #F8F9F7; border: 1px solid var(--edge); border-radius: 10px; padding: 10px 12px; font-size: 0.88rem; color: var(--soft); display: grid; gap: 4px; margin-bottom: 12px; }
.ag-modal-meta b { color: #141518; }
.ag-modal-list { margin: 0 0 12px; padding: 10px 14px 10px 28px; max-height: 180px; overflow: auto; background: #F8F9F7; border: 1px solid var(--edge); border-radius: 10px; font-size: 0.88rem; color: #141518; }
.ag-modal-list li { margin: 4px 0; }
.ag-modal-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 0.86rem; color: var(--soft); }
.ag-modal-rows { display: grid; gap: 10px; max-height: 46vh; overflow: auto; padding-right: 4px; margin-bottom: 10px; }
.ag-modal-row { border: 1px solid var(--edge); border-radius: 12px; background: #F8F9F7; padding: 12px 14px; display: grid; gap: 8px; }
.ag-modal-row.checked { border-color: var(--acc); background: #FFFFFF; }
.ag-modal-row-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ag-modal-row-check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 0.92rem; color: #141518; margin: 0; }
.ag-modal-row-check input[type="checkbox"] { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--acc); flex-shrink: 0; }
.ag-modal-row-sub { font-size: 0.82rem; color: var(--soft); display: block; margin-top: 2px; }
.ag-hr-badge { font-size: 0.75rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--acc-soft); color: var(--acc); border: 1px solid var(--mint-border); white-space: nowrap; }
.ag-hr-badge.dim { background: #F1F5F9; color: #475569; border-color: #CBD5E1; }
.ag-modal-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 640px) { .ag-modal-fields { grid-template-columns: 1fr; } }
.ag-modal-fields label { font-size: 0.78rem; color: #141518; font-weight: 600; display: block; }
.ag-modal-fields input { margin-top: 3px; width: 100%; background: #FFFFFF; font-size: 0.88rem; padding: 7px 10px; }
.ag-m-letter-wrap { font-size: 0.84rem; }
.ag-m-letter-wrap summary { cursor: pointer; color: var(--acc); font-weight: 600; }
.ag-m-letter { width: 100%; margin-top: 8px; font-size: 0.86rem; line-height: 1.45; background: #FFFFFF; }
.ag-hr-note { margin: 0 0 8px; font-size: 0.8rem; color: var(--soft); }
.ag-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; flex-wrap: wrap; }

@media (max-width: 640px) {
  .ag-main {
    padding: 14px 12px 76px;
  }
  .ag-side {
    padding: 14px 12px;
  }
  .ag-pane,
  .ag-home,
  .ag-mission,
  .ag-setup,
  .ag-linkedin-panel,
  .ag-ext {
    max-width: 100%;
    min-width: 0;
  }
  .ag-setup,
  .ag-linkedin-panel {
    padding: 15px 14px;
  }
  .ag-box {
    border-radius: 16px;
    padding: 6px 8px;
    max-width: 100%;
  }
  .ag-box input {
    min-width: 0;
  }
  .ag-steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .ag-seg,
  .ag-seg.three {
    grid-template-columns: minmax(0, 1fr);
  }
  .ag-portals {
    grid-template-columns: minmax(0, 1fr);
  }
  .ag-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .ag-stats > div {
    padding: 10px 8px;
  }
  .ag-app {
    flex-direction: column;
    gap: 10px;
    padding: 14px;
  }
  .ag-score {
    width: fit-content;
    height: auto;
    padding: 5px 12px;
  }
  .ag-app .meta,
  .ag-app .why,
  .ag-where,
  .ag-modal-meta,
  .ag-lk-block pre {
    overflow-wrap: break-word;
    word-break: break-word;
  }
  .ag-btn {
    white-space: normal;
    text-align: center;
    line-height: 1.3;
  }
  .ag-modal-bg {
    padding: 12px;
  }
  .ag-modal {
    padding: 16px 14px;
  }
  .ag-modal-row-top,
  .ag-modal-toolbar {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ag-pane,
  .ag-card,
  .ag-orb,
  .ag-orbit-ring,
  .ag-route-arc,
  .ag-hero-crest,
  .ag-hero-crest::after,
  .ag-logo::after,
  .ag-bar i::after,
  .ag-card:hover .ag-art-check {
    animation: none !important;
  }
  .ag-card,
  .ag-portal,
  .ag-portal-tab-link,
  .ag-nav-btn,
  .ag-box,
  .ag-send {
    transition: none !important;
  }
}

