/* Chronodat editorial blog article layout */
:root {
  --paper: #edf0f3;
  --card: #ffffff;
  --ink: #13212d;
  --ink-soft: #4b5d6b;
  --rule: #c9d2da;
  --plum: #6c2a6b;
  --azure: #1560bd;
  --amber: #c97a0b;
  --teal: #0e7c6b;
  --gold: #f1d600;
  --shadow-sm: 0 1px 2px rgba(19, 33, 45, 0.05);
  --shadow-md: 0 4px 20px rgba(19, 33, 45, 0.07);
  --shadow-lg: 0 12px 40px rgba(19, 33, 45, 0.09);
  --radius: 6px;
  --read: 820px;
}

.article-editorial *,
.blog-comments-wrap * {
  box-sizing: border-box;
}

.article-editorial {
  scroll-behavior: smooth;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 992px) {
  /* Hero extends up behind the fixed nav; inner padding clears it.
     Avoids a sliver of page background showing under the navbar. */
  .article-editorial header.top .wrap {
    padding-top: 108px;
  }
}

.article-editorial .wrap,
.blog-comments-wrap .wrap {
  max-width: var(--read);
  margin: 0 auto;
  padding: 0 24px;
}

/* Breadcrumb */
.article-editorial .article-nav {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  margin-bottom: 20px;
}

.article-editorial .article-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.2s;
}

.article-editorial .article-nav a:hover {
  color: var(--azure);
}

.article-editorial .article-nav span {
  color: var(--rule);
  margin: 0 0.45em;
}

.article-editorial .article-nav .current {
  color: var(--ink);
}

/* Hero */
.article-editorial header.top {
  position: relative;
  background: var(--ink);
  overflow: hidden;
  min-height: 360px;
  border-bottom: none;
}

.article-editorial header.top::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url("../img/blog/power-automate-attended-hero.png") center / cover no-repeat;
}

.article-editorial header.top.hero-spfx {
  min-height: 400px;
  border-bottom: 4px solid var(--gold);
}

.article-editorial header.top.hero-spfx::before {
  background:
    radial-gradient(ellipse 75% 55% at 92% 8%, rgba(21, 96, 189, 0.28) 0%, transparent 58%),
    radial-gradient(ellipse 45% 35% at 4% 92%, rgba(241, 214, 0, 0.1) 0%, transparent 52%),
    linear-gradient(155deg, #0f1a24 0%, #13212d 42%, #1a3350 100%);
}

.article-editorial header.top.hero-spfx::after {
  background: linear-gradient(
    105deg,
    rgba(19, 33, 45, 0.92) 0%,
    rgba(19, 33, 45, 0.78) 38%,
    rgba(19, 33, 45, 0.35) 68%,
    transparent 100%
  );
}

.article-editorial header.top.hero-spfx .article-nav a {
  color: rgba(255, 255, 255, 0.55);
}

.article-editorial header.top.hero-spfx .article-nav a:hover {
  color: rgba(255, 255, 255, 0.9);
}

.article-editorial header.top.hero-spfx .article-nav span {
  color: rgba(255, 255, 255, 0.25);
}

.article-editorial header.top.hero-spfx .article-nav .current {
  color: rgba(255, 255, 255, 0.85);
}

.article-editorial header.top.hero-spfx h1 {
  color: #ffffff;
  max-width: none;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.article-editorial header.top.hero-spfx .standfirst {
  color: rgba(255, 255, 255, 0.78);
}

.article-editorial header.top.hero-spfx .byline span {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
}

.article-editorial header.top.hero-spfx .kicker {
  color: #7fded0;
}

.article-editorial header.top::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    108deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(255, 255, 255, 0.9) 36%,
    rgba(237, 240, 243, 0.55) 54%,
    rgba(19, 33, 45, 0.35) 78%,
    rgba(19, 33, 45, 0.62) 100%
  );
}

.article-editorial header.top .wrap {
  position: relative;
  z-index: 1;
  padding: 40px 24px 56px;
}

.article-editorial .kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 16px;
}

.article-editorial .kicker::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--gold);
}

.article-editorial h1 {
  font-family: "IBM Plex Sans Condensed", "IBM Plex Sans", sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 5.5vw, 3.35rem);
  line-height: 1.05;
  letter-spacing: -0.018em;
  margin: 0 0 0.45em;
  max-width: 16ch;
  color: var(--ink);
}

.article-editorial .standfirst {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 42em;
  margin: 0 0 28px;
}

.article-editorial .byline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0;
  border: none;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.article-editorial .byline span {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-soft);
  backdrop-filter: blur(6px);
}

.article-editorial .byline .badge-preview {
  border-color: rgba(201, 122, 11, 0.35);
  background: rgba(201, 122, 11, 0.08);
  color: #8a5a08;
}

/* Article sheet — card overlapping hero */
.article-editorial .article-main {
  position: relative;
  margin-top: -28px;
  padding-bottom: 48px;
}

.article-editorial .article-sheet {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px 36px 44px;
}

.article-editorial section {
  padding: 36px 0;
  border-top: 1px solid var(--rule);
}

.article-editorial section:first-of-type {
  border-top: none;
  padding-top: 28px;
}

.article-editorial h2 {
  font-family: "IBM Plex Sans Condensed", "IBM Plex Sans", sans-serif;
  font-weight: 700;
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
  padding-bottom: 14px;
  border-bottom: 3px solid var(--gold);
  max-width: none;
  color: var(--ink);
}

.article-editorial h3 {
  font-family: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  font-weight: 600;
  font-size: 1.08rem;
  line-height: 1.4;
  letter-spacing: normal;
  word-spacing: normal;
  margin: 28px 0 10px;
  color: var(--ink);
}

/* Numbered benefit headings */
.article-editorial .benefit-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-family: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1.4;
  letter-spacing: normal;
  word-spacing: normal;
  margin: 32px 0 14px;
  padding: 16px 18px 16px 16px;
  background: linear-gradient(90deg, #f4f7fa 0%, #fafbfc 100%);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--azure);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow-sm);
}

.article-editorial .benefit-heading:first-of-type {
  margin-top: 4px;
}

.article-editorial .benefit-num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-top: 1px;
  background: var(--gold);
  color: var(--ink);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  border-radius: 50%;
  line-height: 1;
}

.article-editorial p {
  margin: 0 0 1.05em;
  color: var(--ink);
}

.article-editorial ul {
  margin: 0 0 1.1em;
  padding-left: 1.2em;
}

.article-editorial li {
  margin-bottom: 0.55em;
  padding-left: 0.15em;
}

.article-editorial li::marker {
  color: var(--azure);
}

.article-editorial strong {
  font-weight: 600;
  color: var(--ink);
}

.article-editorial code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.86em;
  background: #e8eef3;
  padding: 2px 7px;
  border-radius: 3px;
  border: 1px solid rgba(201, 210, 218, 0.8);
}

.article-editorial a {
  color: var(--azure);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.2s;
}

.article-editorial a:hover {
  color: var(--plum);
}

.article-editorial a:focus-visible {
  outline: 2px solid var(--plum);
  outline-offset: 2px;
}

/* Key takeaways / TL;DR */
.article-editorial .takeaways {
  background: linear-gradient(180deg, #fbfcfd 0%, var(--card) 100%);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 22px 24px 20px;
  margin: 4px 0 8px;
  box-shadow: var(--shadow-sm);
}

.article-editorial .takeaways .takeaways-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.article-editorial .takeaways .takeaways-label::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--gold);
}

.article-editorial .takeaways ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.article-editorial .takeaways li {
  margin: 0;
  padding: 0 0 0 26px;
  position: relative;
  font-size: 0.97rem;
  line-height: 1.5;
}

.article-editorial .takeaways li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--azure);
  box-shadow: 0 0 0 3px rgba(21, 96, 189, 0.12);
}

@media (min-width: 620px) {
  .article-editorial .takeaways ul {
    grid-template-columns: 1fr 1fr;
    gap: 12px 28px;
  }
}

/* Callouts */
.article-editorial .callout {
  background: linear-gradient(90deg, rgba(201, 122, 11, 0.06) 0%, var(--card) 12%);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--amber);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 28px 0;
  font-size: 0.96rem;
  box-shadow: var(--shadow-sm);
}

.article-editorial .callout.plum {
  background: linear-gradient(90deg, rgba(108, 42, 107, 0.06) 0%, var(--card) 12%);
  border-left-color: var(--plum);
}

.article-editorial .callout p {
  margin: 0;
  font-size: 0.96rem;
}

.article-editorial .callout strong {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: block;
  color: var(--ink-soft);
  margin-bottom: 6px;
  font-weight: 500;
}

/* Figures */
.article-editorial figure {
  margin: 32px 0;
  background: #fafbfc;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 24px 22px 16px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.article-editorial figure:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.article-editorial figure svg,
.article-editorial figure img {
  display: block;
  width: 100%;
  height: auto;
}

.article-editorial figure img {
  border-radius: 4px;
}

.article-editorial figcaption {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11.5px;
  color: var(--ink-soft);
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
  line-height: 1.55;
}

/* Table */
.article-editorial .table-wrap {
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  -webkit-overflow-scrolling: touch;
}

.article-editorial table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  margin: 0;
  background: var(--card);
  font-size: 0.93rem;
}

.article-editorial thead {
  background: #f4f7fa;
}

.article-editorial th,
.article-editorial td {
  text-align: left;
  padding: 13px 16px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

.article-editorial tbody tr:last-child td {
  border-bottom: none;
}

.article-editorial tbody tr:nth-child(even) td {
  background: #f8fafb;
}

.article-editorial tbody tr:hover td {
  background: rgba(21, 96, 189, 0.06);
}

.article-editorial th {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
}

.article-editorial td:first-child {
  font-weight: 500;
  color: var(--ink);
  width: 42%;
}

/* Article footer / sources */
.article-editorial .article-end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}

.article-editorial .back-link {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none !important;
  color: var(--ink-soft) !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s, gap 0.2s;
}

.article-editorial .back-link:hover {
  color: var(--azure) !important;
  gap: 10px;
}

.article-editorial .back-link::before {
  content: "←";
  font-size: 14px;
}

.article-editorial .article-share {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.article-editorial .article-share a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  color: var(--ink-soft) !important;
  text-decoration: none !important;
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s;
}

.article-editorial .article-share a:hover {
  color: #fff !important;
  background: var(--azure);
  border-color: var(--azure);
  transform: translateY(-2px);
}

.article-editorial .article-share i {
  font-size: 16px;
}

.article-editorial footer.src {
  border-top: 1px solid var(--rule);
  background: transparent;
  margin-top: 0;
  padding: 36px 0 0;
}

.article-editorial footer.src h3 {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
  margin: 0 0 16px;
  word-spacing: normal;
}

.article-editorial footer.src ol {
  margin: 0;
  padding-left: 1.25em;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.article-editorial footer.src li {
  margin-bottom: 10px;
  line-height: 1.5;
}

/* Comments */
.blog-comments-wrap {
  background: var(--paper);
  border-top: 1px solid var(--rule);
  padding: 56px 0 72px;
  color: var(--ink);
}

.blog-comments-wrap .comments-kicker {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 8px;
}

.blog-comments-wrap h2 {
  font-family: "IBM Plex Sans Condensed", "IBM Plex Sans", sans-serif;
  font-weight: 700;
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 24px;
  color: var(--ink);
}

.blog-comments-wrap .comments-panel {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 28px 24px 36px;
  box-shadow: var(--shadow-md);
}

.blog-comments-wrap #disqus_thread {
  display: block;
  min-height: 120px;
  color: var(--ink);
}

.blog-comments-wrap #disqus_thread iframe {
  display: block;
  width: 100% !important;
  min-height: 420px;
  border: 0;
  background: var(--card);
}

.blog-comments-wrap #disqus_thread,
.blog-comments-wrap #disqus_thread p,
.blog-comments-wrap #disqus_thread span,
.blog-comments-wrap #disqus_thread label,
.blog-comments-wrap #disqus_thread a {
  color: var(--ink-soft);
}

.blog-comments-wrap #disqus_thread a:hover {
  color: var(--azure);
}

.blog-comments-wrap #disqus_thread .textarea-wrapper textarea,
.blog-comments-wrap #disqus_thread input[type="text"] {
  color: var(--ink) !important;
  background: #fff !important;
  border: 1px solid var(--rule) !important;
  border-radius: var(--radius) !important;
}

.blog-comments-wrap #disqus_thread .textarea-wrapper textarea::placeholder,
.blog-comments-wrap #disqus_thread input::placeholder {
  color: var(--ink-soft) !important;
  opacity: 1 !important;
}

/* Responsive */
@media (max-width: 768px) {
  .article-editorial header.top {
    min-height: 300px;
  }

  .article-editorial header.top .wrap {
    padding: 32px 24px 48px;
  }

  .article-editorial .article-sheet {
    padding: 4px 20px 32px;
  }

  .article-editorial h1 {
    max-width: none;
  }

  .article-editorial section {
    padding: 28px 0;
  }
}

@media (max-width: 600px) {
  .article-editorial {
    font-size: 16px;
  }

  .article-editorial .standfirst {
    font-size: 1.05rem;
  }

  .article-editorial figure {
    padding: 16px 14px 12px;
  }

  .article-editorial table {
    font-size: 14px;
  }

  .article-editorial th,
  .article-editorial td {
    padding: 10px 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .article-editorial {
    scroll-behavior: auto;
  }
}
