/* Accountant AI: AI agents for accounting teams.
   New sections for the home page and the agent blog posts. Built on the colours and fonts in styles.css. */

.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 2000; background: #fff; padding: 8px 14px; border-radius: 8px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.hero.hero-agents { min-height: auto; }
.hero-agents .hero-visual { width: 100%; }
.jobs .section-header h2, .how .section-header h2, .team .section-header h2, .control .section-header h2,
.compare .section-header h2, .faq .section-header h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); }
.jobs .section-header, .how .section-header, .team .section-header, .control .section-header,
.compare .section-header, .faq .section-header { margin-bottom: 2.5rem; }
.compare-table th[scope="row"] { font-weight: 600; color: var(--text-primary); background: #fff; }
.compare-table td:nth-child(2) { background: var(--mint-50); color: var(--text-primary); }
.compare-table td:first-child { font-weight: 400; }

/* hero */
.hero-agents { padding: 140px 0 70px; background: linear-gradient(180deg, var(--mint-50) 0%, #fff 100%); }
.hero-agents .hero-container { align-items: center; }
.hero-agents .hero-title { font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
.hero-agents .hero-subtitle { max-width: 560px; }
.hero-note { margin-top: 18px; font-size: .95rem; color: var(--text-secondary); }
.hero-note i { color: var(--mint-600); margin-right: 6px; }

/* screenshots from Slack */
.slack-shot { margin: 0; background: #fff; border: 1px solid var(--border-color); border-radius: 14px; box-shadow: 0 18px 50px rgba(15, 118, 110, .14); overflow: hidden; }
.slack-shot img { display: block; width: 100%; height: auto; }
.slack-shot figcaption { padding: 10px 16px; font-size: .88rem; color: var(--text-secondary); border-top: 1px solid var(--border-color); background: var(--bg-secondary); }
/* Slack screenshots in posts: wider than the text column so the text in them stays readable */
.post-body figure.slack-shot { width: min(1120px, calc(100vw - 32px)); position: relative; left: 50%; transform: translateX(-50%); }
.post-body figure.slack-shot a { display: block; cursor: zoom-in; }
.slack-shot figcaption i { color: #611f69; margin-right: 6px; }

/* the one-paragraph answer near the top of a page */
.answer-block { max-width: 860px; margin: 0 auto; padding: 28px 32px; background: #fff; border: 1px solid var(--border-color); border-left: 5px solid var(--primary-color); border-radius: 12px; }
.answer-block h2 { font-size: 1.5rem; margin: 0 0 10px; }
.answer-block p { margin: 0; font-size: 1.08rem; line-height: 1.7; color: var(--text-primary); }
.section-answer { padding: 60px 0 20px; }

/* jobs */
.jobs { padding: 80px 0; }
.jobs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; }
.job-card { display: flex; flex-direction: column; gap: 10px; padding: 24px; border: 1px solid var(--border-color); border-radius: 14px; background: #fff; color: inherit; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.job-card:hover, .job-card:focus-visible { transform: translateY(-3px); border-color: var(--primary-color); box-shadow: 0 12px 30px rgba(42, 225, 200, .18); }
.job-card .job-tag, .post-row .job-tag { align-self: flex-start; font-size: .75rem; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--mint-700); background: var(--mint-50); border: 1px solid var(--mint-100); padding: 3px 10px; border-radius: 999px; }
.job-card h3 { margin: 0; font-size: 1.12rem; line-height: 1.35; color: var(--text-primary); }
.job-card p { margin: 0; font-size: .95rem; line-height: 1.55; color: var(--text-secondary); }
.job-card .job-link { margin-top: auto; font-size: .92rem; font-weight: 600; color: var(--mint-600); }

/* how it works */
.how { padding: 80px 0; background: var(--bg-secondary); }
.steps-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step-card { position: relative; padding: 30px 26px 26px; background: #fff; border: 1px solid var(--border-color); border-radius: 14px; }
.step-card::before { counter-increment: step; content: counter(step); position: absolute; top: -18px; left: 24px; width: 36px; height: 36px; border-radius: 50%; background: var(--gradient-primary); color: #fff; font-weight: 700; display: grid; place-items: center; }
.step-card h3 { margin: 6px 0 8px; font-size: 1.15rem; }
.step-card p { margin: 0; color: var(--text-secondary); line-height: 1.6; }

/* team */
.team { padding: 80px 0; }
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.team-card { padding: 24px; border-radius: 14px; border: 1px solid var(--border-color); background: #fff; }
.team-card i { font-size: 1.4rem; color: var(--mint-600); }
.team-card h3 { margin: 12px 0 8px; font-size: 1.08rem; }
.team-card p { margin: 0; color: var(--text-secondary); font-size: .95rem; line-height: 1.55; }

/* control and security */
.control { padding: 80px 0; background: var(--mint-50); }
.control-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.control-card { padding: 24px; background: #fff; border-radius: 14px; border: 1px solid var(--mint-100); }
.control-card h3 { margin: 0 0 8px; font-size: 1.08rem; }
.control-card h3 i { color: var(--mint-600); margin-right: 8px; }
.control-card p { margin: 0; color: var(--text-secondary); font-size: .95rem; line-height: 1.55; }

/* compare */
.compare { padding: 80px 0; }
.compare-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; font-size: .97rem; }
.compare-table th, .compare-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border-color); vertical-align: top; }
.compare-table thead th { background: var(--bg-secondary); font-family: var(--font-heading); }
.compare-table td:first-child { font-weight: 600; color: var(--text-primary); }
.compare-wrap { overflow-x: auto; }

/* FAQ without JavaScript */
.faq-list { max-width: 860px; margin: 0 auto; display: grid; gap: 12px; }
.faq-list details { background: #fff; border: 1px solid var(--border-color); border-radius: 12px; padding: 0 22px; }
.faq-list summary { cursor: pointer; list-style: none; padding: 18px 0; font-family: var(--font-heading); font-weight: 600; font-size: 1.05rem; color: var(--text-primary); display: flex; justify-content: space-between; gap: 16px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; color: var(--mint-600); font-size: 1.3rem; line-height: 1; }
.faq-list details[open] summary::after { content: "–"; }
.faq-list details p { margin: 0 0 18px; color: var(--text-secondary); line-height: 1.65; }

/* blog post */
.post-hero { background: var(--gradient-primary); padding: 130px 0 60px; color: #fff; }
.post-hero .container { max-width: 900px; }
.post-crumbs { font-size: .9rem; opacity: .95; margin-bottom: 14px; }
.post-crumbs a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.post-hero h1 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); line-height: 1.2; margin: 0 0 16px; color: #fff; }
.post-meta { font-size: .95rem; opacity: .95; display: flex; flex-wrap: wrap; gap: 16px; }
.post-body { max-width: 820px; margin: 0 auto; padding: 50px 20px 30px; }
.post-body h2 { font-size: 1.65rem; margin: 44px 0 16px; padding-bottom: 8px; border-bottom: 3px solid var(--primary-color); }
.post-body h3 { font-size: 1.2rem; margin: 28px 0 10px; }
.post-body p, .post-body li { font-size: 1.07rem; line-height: 1.75; color: #374151; }
.post-body ol, .post-body ul { padding-left: 26px; margin: 0 0 20px; }
.post-body li { margin-bottom: 8px; }
.post-body .tldr { padding: 22px 26px; background: var(--mint-50); border: 1px solid var(--mint-100); border-radius: 12px; margin: 0 0 30px; }
.post-body .tldr p { margin: 0; }
.post-body .tldr strong { color: var(--mint-800); }
.post-body figure { margin: 26px 0; }
.post-body .ask { margin: 22px 0; padding: 16px 20px; background: #f8f5fb; border-left: 4px solid #611f69; border-radius: 8px; font-family: var(--font-heading); }
.post-body .ask span { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: #611f69; margin-bottom: 4px; }
.credit-card { display: grid; grid-template-columns: 1fr; gap: 14px; padding: 22px; border: 1px solid var(--border-color); border-radius: 12px; background: var(--bg-secondary); margin: 20px 0 28px; }
.credit-card p { margin: 0; }
.video-embed { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.data-table { width: 100%; border-collapse: collapse; margin: 16px 0 24px; font-size: .96rem; }
.data-table th, .data-table td { border: 1px solid var(--border-color); padding: 10px 12px; text-align: left; vertical-align: top; }
.data-table th { background: var(--bg-secondary); }
.table-wrap { overflow-x: auto; }
.post-cta { margin: 44px 0 10px; padding: 34px; border-radius: 16px; background: var(--gradient-primary); color: #fff; text-align: center; }
.post-cta h2 { color: #fff; border: 0; margin: 0 0 10px; padding: 0; }
.post-cta p { color: #fff; margin: 0 0 20px; }
.post-cta .btn { background: #fff; color: var(--mint-700); }
.related { max-width: 1100px; margin: 0 auto; padding: 20px 20px 70px; }
.related h2 { font-size: 1.4rem; margin-bottom: 18px; }

/* blog index */
.blog-hero { background: var(--gradient-primary); padding: 130px 0 60px; color: #fff; text-align: center; }
.blog-hero h1 { color: #fff; font-size: clamp(2rem, 4vw, 2.8rem); margin: 0 0 12px; }
.blog-hero p { color: #fff; max-width: 720px; margin: 0 auto; font-size: 1.1rem; }
.blog-list { padding: 60px 0 80px; }

/* job groups: two rows of five tiles on the home page, two lists on the blog index */
.job-groups { display: flex; flex-direction: column; gap: 36px; }
.job-group-title { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 1.1rem; color: var(--text-primary); }
.job-group-title i { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--mint-50); border: 1px solid var(--mint-100); color: var(--mint-700); font-size: .85rem; }
.job-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.job-tile { display: flex; flex-direction: column; gap: 6px; min-height: 124px; padding: 16px 16px 14px; border: 1px solid var(--border-color); border-radius: 12px; background: #fff; color: inherit; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.job-tile:hover, .job-tile:focus-visible { transform: translateY(-2px); border-color: var(--primary-color); box-shadow: 0 10px 24px rgba(42, 225, 200, .16); }
.job-tool { font-size: .72rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--mint-700); }
.job-name { font-family: var(--font-heading); font-weight: 700; font-size: 1.02rem; line-height: 1.3; color: var(--text-primary); }
.job-go { margin-top: auto; padding-top: 8px; font-size: .86rem; font-weight: 600; color: var(--mint-600); }
.job-go i { font-size: .75rem; margin-left: 4px; transition: transform .2s ease; }
.job-tile:hover .job-go i { transform: translateX(3px); }
.blog-groups { max-width: 980px; margin: 0 auto; }
.blog-list .job-group-title { font-size: 1.3rem; }
.post-rows { border: 1px solid var(--border-color); border-radius: 14px; background: #fff; overflow: hidden; }
.post-row { display: grid; grid-template-columns: 180px minmax(0, 1fr) 18px; gap: 20px; align-items: center; padding: 18px 22px; border-top: 1px solid var(--border-color); color: inherit; text-decoration: none; transition: background .2s ease; }
.post-row:first-child { border-top: 0; }
.post-row:hover, .post-row:focus-visible { background: var(--mint-50); }
.post-row .job-tag { justify-self: start; white-space: nowrap; }
.post-row-title { display: block; font-family: var(--font-heading); font-weight: 700; font-size: 1.05rem; line-height: 1.35; color: var(--text-primary); }
.post-row-desc { display: block; margin-top: 4px; font-size: .94rem; line-height: 1.5; color: var(--text-secondary); }
.post-row > i { color: var(--mint-600); }

/* hero: an agent doing three example jobs (hero-chat.js) */
.agent-chat { width: 100%; max-width: 560px; margin-left: auto; text-align: left; background: #fff; border: 1px solid var(--border-color); border-radius: 16px; box-shadow: 0 18px 50px rgba(15, 118, 110, .14); overflow: hidden; }
.ac-bar { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border-color); }
.ac-logo { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--gradient-primary); color: #063b35; }
.ac-who { display: flex; flex-direction: column; line-height: 1.3; }
.ac-who strong { font-family: var(--font-heading); font-size: .98rem; color: var(--text-primary); }
.ac-who span { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--text-secondary); }
.ac-dot { width: 7px; height: 7px; border-radius: 50%; background: #16a34a; }
.ac-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 18px 0; }
.ac-tab { font: 600 .8rem/1 var(--font-primary); padding: 8px 13px; border-radius: 999px; border: 1px solid var(--border-color); background: #fff; color: var(--text-secondary); cursor: pointer; transition: background .2s ease, color .2s ease, border-color .2s ease; }
.ac-tab:hover { border-color: var(--mint-200); color: var(--mint-800); }
.ac-tab[aria-pressed="true"] { background: var(--mint-50); border-color: var(--mint-200); color: var(--mint-800); }
.ac-tab:focus-visible { outline: 2px solid var(--mint-600); outline-offset: 2px; }
.ac-body { display: flex; flex-direction: column; gap: 12px; padding: 14px 18px 16px; transition: opacity .35s ease; }
.ac-body.is-out { opacity: 0; }
.ac-anim { opacity: 0; transform: translateY(6px); transition: opacity .35s ease, transform .35s ease; }
.ac-anim.is-in { opacity: 1; transform: none; }
.ac-you { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.ac-bubble { max-width: 90%; min-height: 2.4em; padding: 10px 14px; border-radius: 14px 14px 4px 14px; background: var(--mint-50); border: 1px solid var(--mint-100); font-size: .92rem; line-height: 1.5; color: var(--text-primary); }
.ac-caret { display: inline-block; width: 2px; height: 1em; margin-left: 1px; vertical-align: -2px; background: var(--mint-700); animation: acBlink 1s steps(2) infinite; }
.ac-caret.is-off { display: none; }
.ac-files { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 100%; }
.ac-file { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 5px 10px; border: 1px solid var(--border-color); border-radius: 8px; background: #fff; font-size: .76rem; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-file i { color: #1d6f42; }
.ac-agent { display: flex; align-items: flex-start; gap: 10px; }
.ac-avatar { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--gradient-primary); color: #063b35; font-size: .8rem; }
.ac-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.ac-typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 10px 12px; border-radius: 12px; background: var(--bg-tertiary); }
.ac-typing[hidden] { display: none; }
.ac-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--text-light); animation: acBounce 1s ease-in-out infinite; }
.ac-typing span:nth-child(2) { animation-delay: .15s; }
.ac-typing span:nth-child(3) { animation-delay: .3s; }
.ac-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.ac-step { display: flex; align-items: center; gap: 9px; font-size: .87rem; line-height: 1.4; color: var(--text-secondary); }
.ac-ico { flex: 0 0 16px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--mint-200); border-top-color: var(--mint-600); display: grid; place-items: center; }
.ac-ico i { display: none; font-size: .55rem; color: #fff; }
.ac-step.is-run .ac-ico { animation: acSpin .8s linear infinite; }
.ac-step.is-done { color: var(--text-primary); }
.ac-step.is-done .ac-ico { border: 0; background: var(--mint-600); }
.ac-step.is-done .ac-ico i { display: block; }
.ac-result { padding: 12px 14px; border: 1px solid var(--border-color); border-radius: 12px; background: var(--bg-secondary); }
.ac-result-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-family: var(--font-heading); font-weight: 700; font-size: .95rem; color: var(--text-primary); }
.ac-result-head i { color: var(--mint-600); }
.ac-result ul { margin: 0 0 10px; padding-left: 18px; font-size: .86rem; line-height: 1.5; color: var(--text-primary); }
.ac-result-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ac-wait { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; font-size: .76rem; font-weight: 600; }
.ac-note { margin: 0; padding: 10px 18px 12px; border-top: 1px solid var(--border-color); background: var(--bg-secondary); font-size: .8rem; color: var(--text-secondary); }
.ac-note a { color: var(--mint-700); font-weight: 600; }
@keyframes acBlink { 50% { opacity: 0; } }
@keyframes acBounce { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-3px); opacity: 1; } }
@keyframes acSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .ac-anim, .ac-body, .job-tile { transition: none; }
  .ac-caret, .ac-typing span, .ac-step.is-run .ac-ico { animation: none; }
}

@media (max-width: 1100px) {
  .job-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .job-tile:last-child { grid-column: 1 / -1; }
  .job-tile { min-height: 0; }
}
@media (max-width: 1024px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .control-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .hero-agents { padding: 110px 0 50px; }
  .hero-agents .hero-container { grid-template-columns: 1fr; gap: 32px; padding: 0 16px; }
  .hero-agents .hero-content { padding-right: 0; }
  .compare-table { font-size: .9rem; min-width: 720px; }
  .steps-3, .control-grid, .team-grid { grid-template-columns: 1fr; }
  .agent-chat { margin: 0 auto; }
  .hero-agents .hero-content { order: 1; }
  .hero-agents .hero-visual { order: 2; }
  .post-row { grid-template-columns: minmax(0, 1fr) 16px; gap: 10px 14px; padding: 16px 18px; }
  .post-row .job-tag { grid-column: 1 / -1; }
  .answer-block { padding: 22px; }
  .post-hero, .blog-hero { padding: 110px 0 44px; }
  .post-body { padding: 36px 16px 20px; }
}

/* footer: brand line link readable on the dark footer */
.footer .brand-text a { color: #4ee7d1; text-decoration: underline; text-underline-offset: 2px; }
.footer .brand-text a:hover { color: #fff; }
