/* =========================================
   ACCOUNTINGMINT — LAYOUT
   Structure only. Visual design lives in style.css.
========================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 5.75rem;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img,
svg,
video,
iframe {
  max-width: 100%;
  display: block;
}

img {
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 1000;
  padding: 0.5rem 0.75rem;
}

.skip-link:focus {
  top: 0.75rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.site-topbar__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 2.4rem;
  padding-block: 0.4rem;
}

.site-topbar__icon {
  display: inline-flex;
  flex-shrink: 0;
}

.site-topbar__icon svg {
  width: 1.05rem;
  height: 1.05rem;
}

.site-topbar__text {
  margin: 0;
  line-height: 1.4;
  text-align: center;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  overflow: visible;
}

.site-header__inner {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.75rem;
  min-height: 4.35rem;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  max-width: min(220px, 52vw);
}

.site-logo img {
  width: auto;
  object-fit: contain;
}

.site-header__actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 0.25rem;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  padding: 0;
}

.icon-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

.theme-toggle .theme-toggle__moon {
  display: none;
}

[data-theme="dark"] .theme-toggle .theme-toggle__sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .theme-toggle__moon {
  display: block;
}

.search-toggle .search-toggle__close {
  display: none;
}

.search-toggle[aria-expanded="true"] .search-toggle__search {
  display: none;
}

.search-toggle[aria-expanded="true"] .search-toggle__close {
  display: block;
}

.menu-toggle {
  display: none;
}

.menu-toggle .menu-toggle__close {
  display: none;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__open {
  display: none;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__close {
  display: block;
}

.site-nav__list {
  display: flex;
  flex-direction: column;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__item {
  position: relative;
}

.site-nav__link {
  display: flex;
  align-items: center;
  width: 100%;
}

.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 210;
}

body.nav-open .nav-backdrop {
  display: block;
}

html.js body.nav-open {
  overflow: hidden;
}

.search-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 210;
}

.search-panel__form {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 0 1.1rem;
}

.search-panel__form input {
  flex: 1 1 auto;
  min-width: 0;
}

.site-main {
  flex: 1 0 auto;
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: 2.5rem 3rem;
}

.hero__glow {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 2rem;
}

.hero__content {
  min-width: 0;
}

.hero__lede {
  max-width: 38rem;
}

.hero-search {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  margin-top: 1.6rem;
}

.hero-search select,
.hero-search input,
.hero-search__field {
  min-width: 0;
}

.hero-search__field {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 0.35rem;
}

.hero-search__icon {
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
}

.hero-tags {
  margin-top: 1.1rem;
  max-width: 38rem;
}

.hero-tags__title {
  margin: 0 0 0.65rem;
}

.hero-tags__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.38rem 0.78rem;
  line-height: 1.2;
  white-space: nowrap;
}

.hero__slider {
  position: relative;
  min-width: 0;
}

.hero__slider .swiper {
  overflow: hidden;
  padding-bottom: 2.75rem;
}

.hero__slider .swiper-slide {
  height: auto;
}

.post-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.post-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.post-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__slider .post-card__media img {
  display: block;
  max-width: none;
}

.post-card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 0.5rem;
  padding: 1.1rem 1.15rem 1.25rem;
}

.post-card__title,
.post-card__excerpt,
.post-card__meta {
  margin: 0;
}

.post-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.7rem;
  margin-top: auto;
  padding-top: 0.35rem;
}

.partners {
  padding-block: 1.75rem;
}

.partners__inner {
  display: grid;
  align-items: center;
  gap: 1.35rem;
}

.partners__title {
  margin: 0;
  max-width: 16rem;
}

.partners__logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 1.1rem 1.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.partners__logos img {
  display: block;
  width: auto;
  height: 2.55rem;
  max-width: 8.75rem;
  object-fit: contain;
}

.partners__logos img[alt="Xero Gold Partner"] {
  height: 3.15rem;
  max-width: 10.75rem;
}

.partners__logos img[alt="FreshBooks"] {
  height: 3.15rem;
}

.cat-feed {
  padding-block: 2.75rem 3.5rem;
}

.cat-block + .cat-block {
  margin-top: 2.75rem;
}

.cat-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.cat-block:has(.story-list) .cat-block__head {
  margin-bottom: 1.85rem;
}

.cat-block__head h2 {
  margin: 0;
}

.view-all {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

.view-all__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
}

.view-all__icon svg {
  width: 0.85rem;
  height: 0.85rem;
}

.cat-block__cards {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

.cat-feed .post-card__body {
  padding-inline: 0;
}

.story-list {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  margin-top: 1.5rem;
}

.story-row__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-row__title,
.story-row__meta {
  margin: 0;
}

.story-row__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.65rem;
}

.story-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
  min-width: 0;
}

.story-row__copy {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
  flex: 1 1 auto;
}

.story-row__thumb {
  display: block;
  flex-shrink: 0;
  width: 5.25rem;
  height: 3.5rem;
  overflow: hidden;
}

.page-hero {
  padding-block: 1.75rem 1.85rem;
}

.page-hero h1 {
  margin-bottom: 0;
}

.author-profile {
  display: grid;
  gap: 1.25rem;
  align-items: start;
}

.author-profile__photo {
  width: 6.75rem;
  height: 6.75rem;
  overflow: hidden;
}

.author-profile__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-profile__copy {
  min-width: 0;
}

.author-profile__copy p {
  margin: 0 0 1.1rem;
}

.author-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.author-social li + li {
  margin-top: 0;
}

.author-social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
}

.author-social__link svg {
  width: 1.05rem;
  height: 1.05rem;
}

.author-posts {
  padding-block: 2.25rem 3.5rem;
}

.author-posts__head {
  margin-bottom: 1.35rem;
}

.about {
  padding-block: 2.25rem 4rem;
}

.about__block + .about__block {
  margin-top: 2.35rem;
  padding-top: 2.35rem;
}

.about__block h2 {
  margin-top: 0;
  margin-bottom: 0.85rem;
}

.about__tag {
  margin: 0 0 1.1rem;
}

.about-topics,
.about-points,
.about-team {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

.about-subs {
  display: grid;
  gap: 1.35rem 2.5rem;
  grid-template-columns: 1fr;
  margin-top: 1.4rem;
}

.about-topic,
.about-point {
  display: block;
  min-width: 0;
  padding: 1.15rem 1.2rem;
}

.about-sub {
  display: block;
  min-width: 0;
}

.about-sub h3 {
  margin: 0 0 0.35rem;
}

.about-point__index {
  margin-bottom: 0.45rem;
}

.about-team .author-card {
  margin-top: 0;
  height: 100%;
}

.about__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.15rem;
}

.page-status .site-main {
  display: flex;
  flex-direction: column;
}

.page-status .page-hero {
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
  justify-content: center;
  padding-block: 2.25rem 3.25rem;
}

.page-status .page-hero .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.page-status .breadcrumb__list {
  justify-content: center;
}

.status-panel {
  width: 100%;
  max-width: 38rem;
  margin-inline: auto;
}

.status-panel__code,
.status-panel__kicker {
  margin: 0 0 0.45rem;
}

.status-panel__lede {
  margin: 0 auto 1.4rem;
  max-width: 34rem;
}

.status-panel__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.status-hits {
  margin: 0 auto 1.5rem;
  padding: 0;
  list-style: none;
}

.status-hits li + li {
  margin-top: 0;
}

.status-hits a {
  display: block;
  padding: 0.75rem 0;
}

.author-posts__head h2 {
  margin: 0;
}

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.15rem;
  margin: 0 0 0.85rem;
  padding: 0;
  list-style: none;
}

.breadcrumb__item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb__item:not(:last-child)::after {
  content: "/";
  padding-right: 0.15rem;
}

.archive-page {
  padding-block: 2.25rem 3.5rem;
}

.archive-page__grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 2.25rem;
}

.pagination__btn,
.pagination__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.7rem;
}

.pagination__btn svg {
  width: 1rem;
  height: 1rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 1.1rem;
  margin-top: 1rem;
}

.article-wrap {
  padding-block: 1.75rem 3.25rem;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.75rem;
}

.article-layout > * {
  min-width: 0;
}

.article-hero-media {
  overflow: hidden;
  max-width: 100%;
  margin-bottom: 1.5rem;
}

.toc {
  margin-bottom: 1.75rem;
}

.article-hero-media img {
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 16 / 9;
}

.toc__list,
.sidebar-posts,
.sidebar-cats {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc__list {
  display: grid;
  gap: 0.45rem;
}

.toc__list a {
  min-width: 0;
}

.article-sidebar {
  display: grid;
  gap: 1.15rem;
  align-content: start;
}

.sidebar-posts {
  display: grid;
  gap: 0.85rem;
}

.sidebar-post {
  display: flex;
  gap: 0.75rem;
  min-width: 0;
}

.sidebar-post__thumb {
  flex-shrink: 0;
  width: 4.6rem;
  height: 3.15rem;
  overflow: hidden;
}

.sidebar-post__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-post__copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.sidebar-cats li + li {
  margin-top: 0.55rem;
}

.table-wrap {
  overflow-x: auto;
  max-width: 100%;
  margin: 0 0 1.25rem;
  -webkit-overflow-scrolling: touch;
}

.article-table {
  width: 100%;
  min-width: 32rem;
  border-collapse: collapse;
}

.article-table th,
.article-table td {
  padding: 0.7rem 0.85rem;
  text-align: left;
}

.faq details + details {
  margin-top: 0.65rem;
}

.author-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-top: 2.25rem;
}

@media (max-width: 575px) {
  .page-hero {
    padding-block: 1.35rem 1.4rem;
  }

  .page-status .page-hero {
    padding-block: 1.5rem 2.4rem;
  }

  .article-wrap {
    padding-block: 1.25rem 2.4rem;
  }

  .article-hero-media {
    margin-bottom: 1.2rem;
  }

  .article-table th,
  .article-table td {
    padding: 0.55rem 0.65rem;
  }

  .related__head {
    align-items: flex-start;
  }

  .author-card {
    flex-direction: column;
  }

  .about {
    padding-block: 1.5rem 2.75rem;
  }

  .about__block + .about__block {
    margin-top: 1.85rem;
    padding-top: 1.85rem;
  }
}

.author-card__photo-link {
  flex-shrink: 0;
}

.author-card__photo {
  flex-shrink: 0;
  width: 4.5rem;
  height: 4.5rem;
}

.author-card__copy p {
  margin: 0;
}

.related {
  margin-top: 2.5rem;
}

.related__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.related__head h2 {
  margin: 0;
}

.related__grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

.site-footer {
  margin-top: auto;
  padding-block: 2.75rem 1.5rem;
}

.site-footer__grid {
  display: grid;
  gap: 2rem 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.footer-brand {
  grid-column: 1 / -1;
  max-width: 22rem;
}

.site-footer .site-logo {
  display: inline-flex;
  margin-bottom: 0.9rem;
  padding: 0.4rem 0.55rem;
}

.site-footer .site-logo img {
  height: 2.2rem;
  width: auto;
}

.footer-nav {
  min-width: 0;
}

.footer-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-nav li + li {
  margin-top: 0.55rem;
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.footer-social li + li {
  margin-top: 0;
}

.footer-social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
}

.footer-social__link svg {
  width: 1.05rem;
  height: 1.05rem;
}

.site-footer__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  margin-top: 1.75rem;
}

.site-footer__copy {
  margin: 0;
}

.site-footer__legal,
.site-footer__legal ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__legal li + li {
  margin-top: 0;
}

.scroll-top {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 80;
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
}

.scroll-top.is-visible {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.scroll-top svg {
  width: 1.2rem;
  height: 1.2rem;
}

@media (min-width: 576px) {
  .container {
    max-width: 540px;
  }

  .hero-search {
    grid-template-columns: 9.5rem 1fr auto;
    align-items: stretch;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 720px;
  }

  .hero {
    padding-block: 3.25rem 4rem;
  }

  .page-hero {
    padding-block: 2rem 2.1rem;
  }

  .page-status .page-hero {
    padding-block: 2.75rem 4rem;
  }

  .author-profile {
    grid-template-columns: 8.5rem minmax(0, 1fr);
    gap: 1.5rem 2rem;
    align-items: center;
  }

  .author-profile__photo {
    width: 8.5rem;
    height: 8.5rem;
  }

  .cat-block__cards,
  .story-list,
  .archive-page__grid,
  .related__grid,
  .about-topics,
  .about-points,
  .about-team,
  .about-subs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer__grid {
    gap: 2rem 1.5rem;
  }

  .footer-brand {
    max-width: 28rem;
  }
}

@media (min-width: 992px) {
  .container {
    max-width: 960px;
  }

  .hero__grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(18rem, 0.95fr);
    align-items: center;
    gap: 2.5rem;
  }

  .partners__inner {
    grid-template-columns: minmax(12.5rem, 0.28fr) minmax(0, 1fr);
    gap: 2rem 2.5rem;
  }

  .partners__logos {
    justify-content: space-between;
    flex-wrap: nowrap;
  }

  .cat-block__cards,
  .story-list,
  .archive-page__grid,
  .related__grid,
  .about-topics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
  }

  .about-points,
  .about-subs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-team {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .article-layout {
    grid-template-columns: minmax(0, 1fr) 17.5rem;
    gap: 2rem 2.25rem;
    align-items: start;
  }

  .article-sidebar {
    position: sticky;
    top: 6.25rem;
  }

  .site-footer__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }

  .menu-toggle {
    display: none;
  }

  .site-header__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 0.75rem 1rem;
  }

  .site-logo {
    justify-self: start;
    max-width: 210px;
  }

  .site-nav {
    justify-self: center;
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    overflow: visible;
    transform: none;
  }

  .site-nav__list {
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.1rem 1.5rem;
  }

  .site-nav__link {
    width: auto;
    padding: 0.7rem 0;
    white-space: nowrap;
  }

  .site-header__actions {
    justify-self: end;
  }

  .site-footer__grid {
    grid-template-columns: minmax(14rem, 1.45fr) repeat(3, minmax(0, 0.9fr)) minmax(11rem, 1.15fr);
    gap: 2rem 1.75rem;
  }

  .footer-brand {
    grid-column: auto;
    max-width: 18.5rem;
  }
}

@media (min-width: 1400px) {
  .container {
    max-width: 1200px;
  }
}

@media (max-width: 1199px) {
  .menu-toggle {
    display: inline-flex;
  }

  .site-header__actions {
    position: relative;
    z-index: 240;
  }

  html.js .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 220;
    display: none;
    width: 100%;
    height: auto;
    max-height: min(75vh, calc(100dvh - 6rem));
    padding: 0.35rem 1.25rem 1.25rem;
    overflow-y: auto;
    transform: none;
  }

  html.js body.nav-open .site-header {
    z-index: 230;
  }

  html.js body.nav-open .site-nav {
    display: block;
  }

  html:not(.js) .site-nav {
    grid-column: 1 / -1;
  }

  html:not(.js) .site-nav__list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
  }

  html:not(.js) .menu-toggle {
    display: none;
  }

  .site-nav__link {
    padding: 0.85rem 0;
  }
}
