/*
 * NLCo article styles
 *
 * Adapted from the Distill Template styles (Copyright 2018 The Distill
 * Template Authors), licensed under the Apache License, Version 2.0:
 * https://github.com/distillpub/template
 */

@font-face {
  font-family: "NLCo Iowan Old Style";
  src: url("./iowan-old-style/iowan-old-style_regular.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: "NLCo Iowan Old Style";
  src: url("./iowan-old-style/iowan-old-style_italic.woff2") format("woff2");
  font-display: swap;
  font-style: italic;
  font-weight: 400;
}

@font-face {
  font-family: "NLCo Iowan Old Style";
  src: url("./iowan-old-style/iowan-old-style_bold.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 700;
}

:root {
  --text-font: "NLCo Iowan Old Style", "Iowan Old Style BT", "Iowan Old Style", Iowan, Georgia, "Times New Roman", serif;
  --ui-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif;
  --ink: rgba(0, 0, 0, 0.8);
  --quiet-ink: rgba(0, 0, 0, 0.55);
  --hairline: rgba(0, 0, 0, 0.1);
  --link: #004276;
  --content-min: 280px;
  --content-max: 1920px;
  --content-width: clamp(var(--content-min), 80vw, var(--content-max));
  --toc-width: 15rem;
  --toc-gap: clamp(2rem, 4vw, 6rem);
}

* { box-sizing: border-box; }

html {
  font-size: 14px;
  line-height: 1.6em;
  scroll-behavior: smooth;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

@media (min-width: 768px) {
  html { font-size: 16px; }
}

body { color: var(--ink); font-family: var(--text-font); margin: 0; }
a {
  color: var(--link);
  text-decoration-line: underline;
  text-decoration-style: dashed;
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
}
a:hover { text-decoration-style: solid; }
p { margin: 0 0 1em; }

.site-footer {
  display: grid;
  grid-template-columns: [screen-start] 8px [page-start text-start] 1fr [text-end page-end] 8px [screen-end];
  column-gap: 8px;
}

.site-footer .copyright {
  grid-column: screen-start / screen-end;
  text-align: center;
}

.site-header {
  border-bottom: 1px solid var(--hairline);
  padding: .85rem clamp(1rem, 3vw, 3rem);
}

.site-header,
.site-footer,
.toc,
.article-header,
.article-body h2,
.article-body h3,
.article-body h4 {
  font-family: var(--ui-font);
}

.header-brand {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  gap: 1.35rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-decoration: none;
}

.site-logo {
  display: block;
  height: 26px;
  max-width: min(134px, 36vw);
  object-fit: contain;
  width: auto;
}

.site-footer {
  color: var(--quiet-ink);
  font-size: .75rem;
  margin-top: 4rem;
  padding: 1.4rem 0;
}

.site-footer::before {
  content: "";
  grid-column: text;
}

.home {
  display: grid;
  grid-template-columns: [screen-start] 8px [page-start text-start] 1fr [text-end page-end] 8px [screen-end];
  column-gap: 8px;
  padding: 4rem 0;
}

.home-intro,
.post-list { grid-column: text; }
.home-intro { margin-bottom: 4rem; max-width: 620px; }

.eyebrow,
.tags {
  color: var(--quiet-ink);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .08em;
  line-height: 1.4em;
  text-transform: uppercase;
}

.home h1 {
  font-size: 3rem;
  letter-spacing: -.045em;
  line-height: 1.05em;
  margin: .35rem 0 .7rem;
}

.home-intro > p:last-child { font-size: 1.15rem; line-height: 1.55em; }
.post-list { border-top: 1px solid var(--hairline); max-width: 680px; }
.post-card { border-bottom: 1px solid var(--hairline); padding: 2rem 0; }
.post-card .eyebrow { margin-bottom: .5rem; }
.post-card h2 { font-size: 1.65rem; letter-spacing: -.025em; line-height: 1.25em; margin: 0 0 .5rem; }
.post-card h2 a { color: inherit; text-decoration: none; }
.post-card h2 a:hover { border-bottom: 1px solid var(--ink); }
.post-card p { color: var(--quiet-ink); }
.post-card .card-authors { color: var(--ink); font-size: .82rem; margin-bottom: 0; }

/* Distill's title measure and scale, adapted for plain generated HTML. */
.article-header {
  width: var(--content-width);
  max-width: calc(100vw - 32px);
  margin: 0 auto;
  padding: 2rem 0 1.5rem;
}

.article-header .eyebrow { margin: 0 0 .7rem; }

.article-header h1 {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.1em;
  margin: 0 0 .5rem;
}

.dek {
  font-size: 1.2rem;
  font-weight: 300;
  line-height: 1.55em;
  margin: .5rem 0 1.4rem;
}

.authors { font-size: .85rem; font-weight: 500; line-height: 1.8em; margin: 0; }
.authors a { color: var(--ink); text-decoration: none; }
.authors a:hover { text-decoration: underline; }
.affiliations { color: var(--quiet-ink); font-size: .75rem; line-height: 1.8em; margin: 0; }

.tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: 1rem; }
.tags span { border-bottom: 1px solid var(--hairline); padding-bottom: .15rem; }

.article-body {
  border-top: 1px solid var(--hairline);
  color: var(--ink);
  min-width: 0;
  padding: 2rem 0 0;
}

.article-body > * {
  max-width: 100%;
}

.article-body h2 {
  border-bottom: 1px solid var(--hairline);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.25em;
  margin-top: 2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
}

.article-body h3 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4em;
  margin-top: 2em;
  margin-bottom: 1em;
}

.article-body h4 {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4em;
  text-transform: uppercase;
}

.article-body a {
  color: inherit;
  text-decoration-color: rgba(0, 0, 0, .5);
}

.article-body a:hover { text-decoration-color: rgba(0, 0, 0, .85); }
.article-body ul, .article-body ol { padding-left: 24px; }
.article-body li { margin-bottom: 1em; }
.article-body blockquote {
  border-left: 2px solid rgba(0, 0, 0, .2);
  color: rgba(0, 0, 0, .6);
  font-style: italic;
  padding-left: 2em;
}

.article-body figure { margin-top: 1.5em; margin-bottom: 2.5em; }
.article-body figure img { display: block; width: 100%; }
.article-body figcaption {
  color: rgba(0, 0, 0, .6);
  font-size: 12px;
  line-height: 1.5em;
  margin-top: .6rem;
}

.article-body figure.l-page { max-width: 1000px; }
.article-body pre {
  background: #f6f8fa;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: .45rem;
  font-size: 14px;
  overflow: auto;
  padding: 1rem;
  position: relative;
}

.article-body pre code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
.copy-code-button {
  align-items: center;
  appearance: none;
  background: rgba(246, 248, 250, .92);
  border: 1px solid rgba(0, 0, 0, .14);
  border-radius: .3rem;
  color: var(--quiet-ink);
  cursor: pointer;
  display: inline-flex;
  height: 2rem;
  justify-content: center;
  padding: 0;
  position: absolute;
  right: .55rem;
  top: .55rem;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
  width: 2rem;
}

.copy-code-button:hover,
.copy-code-button:focus-visible {
  background: #fff;
  border-color: rgba(0, 0, 0, .3);
  color: var(--ink);
  outline: none;
}

.copy-code-button.is-copied { color: #1a7f37; }
.copy-code-button svg { display: block; height: 1rem; width: 1rem; }
.copy-code-button .check-icon { display: none; }
.copy-code-button.is-copied .copy-icon { display: none; }
.copy-code-button.is-copied .check-icon { display: block; }
.hljs-comment,
.hljs-quote { color: #6a737d; }
.hljs-keyword,
.hljs-selector-tag,
.hljs-subst { color: #d73a49; }
.hljs-string,
.hljs-doctag { color: #032f62; }
.hljs-number,
.hljs-literal,
.hljs-attr,
.hljs-attribute { color: #005cc5; }
.hljs-title,
.hljs-title.function_,
.hljs-section { color: #6f42c1; }
.hljs-params,
.hljs-variable,
.hljs-template-variable { color: #e36209; }
.hljs-meta { color: #22863a; }

.backmatter {
  color: rgba(0, 0, 0, .68);
  font-family: var(--ui-font);
  font-size: .78rem;
  line-height: 1.5;
  margin-top: 4rem;
}

.backmatter-section + .backmatter-section { margin-top: 1.7rem; }

.article-body .backmatter h3 {
  border-bottom: 0;
  color: rgba(0, 0, 0, .72);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .06em;
  line-height: 1.35;
  margin: 0 0 .65rem;
  padding: 0;
  text-transform: uppercase;
}

.backmatter p,
.backmatter ul,
.backmatter ol {
  margin-bottom: .75rem;
}

.backmatter ol { padding-left: 1.35rem; }
.backmatter li { margin-bottom: .55rem; padding-left: .25rem; }
.references ol { margin-top: 0; }
.citation { color: var(--link); }

.article-body table {
  border-collapse: separate;
  border-spacing: 0;
  font-size: .85em;
  line-height: 1.45;
  margin: 2rem 0;
  overflow: hidden;
  width: 100%;
}

.article-body th,
.article-body td {
  border-bottom: 1px solid var(--hairline);
  padding: .7rem .85rem;
  text-align: left;
}

.article-body th {
  background: rgba(0, 66, 118, .06);
  color: rgba(0, 0, 0, .7);
  font-size: .78em;
  font-weight: 600;
  letter-spacing: .03em;
}

.article-body tbody tr:hover { background: rgba(0, 0, 0, .025); }

.benchmark-gain {
  color: #2e7d32;
}

.benchmark-decline {
  color: #c62828;
}

.chart-container {
  height: clamp(240px, 32vw, 420px);
  margin: 2rem 0;
  max-width: 100%;
  position: relative;
}

.chart-container canvas {
  height: 100% !important;
  width: 100% !important;
}

.article-layout {
  max-width: calc(100vw - 32px);
  width: var(--content-width);
  margin: 0 auto;
}

.toc { display: none; }

mjx-container[jax="CHTML"][display="true"] {
  display: block;
  margin: 1.5rem 0 !important;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

@media (min-width: 768px) {
  .site-footer,
  .home {
    grid-template-columns: [screen-start] 1fr [page-start text-start] repeat(8, 45px) [text-end page-end] 1fr [screen-end];
    column-gap: 16px;
  }
  .site-footer .copyright {
    grid-column: screen-start / screen-end;
    text-align: center;
  }
  .article-header { padding: 4rem 0 1.5rem; }
}

@media (min-width: 1024px) {
  .article-header h1 { font-size: 50px; }
  .article-body { font-size: 1.06rem; line-height: 1.7em; }
  .article-body h2 { font-size: 36px; }
  .article-body h3 { font-size: 20px; }
  .article-body figcaption { font-size: 13px; }
}

@media (min-width: 1100px) {
  .article-header {
    padding-left: calc(var(--toc-width) + var(--toc-gap));
  }

  .article-layout {
    display: grid;
    grid-template-columns: var(--toc-width) minmax(0, 1fr);
    column-gap: var(--toc-gap);
    align-items: start;
  }

  .toc {
    display: block;
    position: sticky;
    top: 2rem;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    color: var(--quiet-ink);
    font-size: .8rem;
    line-height: 1.35;
    padding: 2rem 0 1rem;
  }

  .toc ol { list-style: none; margin: 0; padding: 0; }
  .toc li + li { margin-top: .28rem; }
  .toc .toc-level-3 { padding-left: 1rem; }
  .toc a {
    border-radius: .45rem;
    color: inherit;
    display: block;
    padding: .42rem .55rem;
    text-decoration: none;
  }

  .toc a:hover,
  .toc a.active {
    background: rgba(0, 0, 0, .06);
    color: var(--ink);
  }
}

@media (max-width: 767px) {
  .site-header { padding: .75rem 1rem; }

  /* Better font size for mobile readability */
  html {
    font-size: 15px !important;
  }

  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  /* Article layout - better padding */
  .article-header {
    padding: 1.5rem 1rem 1rem;
  }

  .article-body {
    padding: 1.5rem 1rem 0;
  }

  /* Improve paragraph readability */
  .article-body p {
    line-height: 1.75em;
  }

  /* Images - ensure they fit on mobile */
  figure img,
  .article-body img {
    max-width: 100% !important;
    height: auto !important;
    width: 100% !important;
    object-fit: contain;
  }

  /* Prevent image overflow */
  figure,
  .article-body figure {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
    overflow: hidden;
  }

  /* Figure captions - better readability */
  figcaption {
    font-size: 12px !important;
    line-height: 1.6em !important;
    padding: 0.6rem 0 !important;
  }

  /* L-page figures on mobile - full bleed */
  figure.l-page {
    margin-left: -1rem !important;
    margin-right: -1rem !important;
    width: calc(100% + 2rem) !important;
    max-width: calc(100% + 2rem) !important;
  }

  figure.l-page img {
    border-radius: 0;
  }

  /* Tables - horizontal scroll with better UX */
  .article-body table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 13px !important;
    margin-left: -1rem;
    margin-right: -1rem;
    width: calc(100% + 2rem);
    max-width: calc(100% + 2rem);
  }

  .article-body th,
  .article-body td {
    padding: .6rem .7rem;
    white-space: nowrap;
  }

  .table-caption {
    font-size: 12px !important;
    padding: 0 1rem;
    margin-bottom: 0.8rem;
  }

  /* Headers - optimized hierarchy */
  .article-header h1 {
    font-size: 28px !important;
    line-height: 1.15em !important;
  }

  .dek {
    font-size: 1.05rem !important;
    line-height: 1.6em !important;
  }

  .article-body h2 {
    font-size: 22px !important;
    margin-top: 2rem !important;
    margin-bottom: 1.2rem !important;
  }

  .article-body h3 {
    font-size: 18px !important;
    margin-top: 1.8rem !important;
    margin-bottom: 1rem !important;
  }

  .article-body h4 {
    font-size: 15px !important;
    margin-top: 1.5rem !important;
  }

  /* Code blocks - better mobile experience */
  .article-body pre {
    margin-left: -1rem;
    margin-right: -1rem;
    border-radius: 0;
    font-size: 13px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .article-body pre code {
    font-size: 13px;
  }

  /* Lists - better spacing */
  .article-body ul,
  .article-body ol {
    padding-left: 1.5rem;
  }

  .article-body li {
    margin-bottom: 0.8em;
    line-height: 1.7em;
  }

  /* Training charts grid - mobile optimization */
  .training-charts-grid {
    margin-left: -1rem !important;
    margin-right: -1rem !important;
    width: calc(100% + 2rem) !important;
  }

  /* Chart containers - prevent overflow */
  .chart-container {
    height: clamp(220px, 50vw, 320px) !important;
    max-width: 100%;
    overflow: hidden;
  }

  /* Backmatter - better mobile layout */
  .backmatter {
    font-size: 0.85rem;
    padding: 0 0.5rem;
  }

  .backmatter li {
    margin-bottom: 0.6rem;
  }

  /* Math equations - ensure they don't overflow */
  mjx-container[jax="CHTML"][display="true"] {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    padding: 0.5rem 0;
  }

  /* Footer adjustments */
  .site-footer {
    font-size: 0.8rem;
    padding: 1.2rem 1rem;
  }

  .site-footer .copyright {
    grid-column: screen-start / screen-end;
    text-align: center;
  }
}

/* Tablet optimizations (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  /* Images - maintain aspect ratio */
  figure.l-page img {
    max-width: 100%;
    height: auto;
  }

  /* Tables - better readability */
  .article-body table {
    font-size: 13px;
  }

  figcaption {
    font-size: 12px;
  }
}

/* Landscape tablets */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
  figure.l-page {
    max-width: 95vw;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Small phones - enhanced optimization (iPhone SE, small Android) */
@media (max-width: 480px) {
  html {
    font-size: 14px !important;
  }

  .article-header {
    padding: 1.2rem 0.8rem 0.8rem;
  }

  .article-body {
    padding: 1.2rem 0.8rem 0 !important;
  }

  .article-header h1 {
    font-size: 24px !important;
  }

  .dek {
    font-size: 1rem !important;
  }

  .article-body h2 {
    font-size: 20px !important;
  }

  .article-body h3 {
    font-size: 16px !important;
  }

  .article-body h4 {
    font-size: 14px !important;
  }

  figcaption {
    font-size: 11px !important;
  }

  .table-caption {
    font-size: 11px !important;
  }

  /* Adjust margins for smaller screens */
  figure.l-page {
    margin-left: -0.8rem !important;
    margin-right: -0.8rem !important;
    width: calc(100% + 1.6rem) !important;
  }

  .article-body table {
    margin-left: -0.8rem;
    margin-right: -0.8rem;
    width: calc(100% + 1.6rem);
    font-size: 12px !important;
  }

  .article-body pre {
    margin-left: -0.8rem;
    margin-right: -0.8rem;
    font-size: 12px;
  }

  /* Chart container adjustments */
  .chart-container {
    height: clamp(200px, 55vw, 280px) !important;
  }

  .training-charts-grid {
    margin-left: -0.8rem !important;
    margin-right: -0.8rem !important;
    width: calc(100% + 1.6rem) !important;
  }
}

/* High DPI displays - retina optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  figure img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* iPhone notch and safe areas */
@supports (padding: max(0px)) {
  .site-header {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }

  .article-header,
  .article-body {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Larger touch targets for links */
  .article-body a {
    padding: 2px 0;
    margin: -2px 0;
  }

  /* Better tap highlighting */
  a, button, .terminal-tab, .control-button {
    -webkit-tap-highlight-color: rgba(0, 66, 118, 0.1);
    tap-highlight-color: rgba(0, 66, 118, 0.1);
  }

  /* Smoother scrolling */
  .article-body,
  .terminal-content,
  .step-content {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }

  /* Prevent text selection on interactive elements */
  .terminal-tab,
  .control-button,
  .step-header {
    -webkit-user-select: none;
    user-select: none;
  }
}

/* Landscape mobile optimization */
@media (max-width: 767px) and (orientation: landscape) {
  html {
    font-size: 14px;
  }

  .terminal-content {
    max-height: 350px !important;
  }

  .chart-container {
    height: clamp(200px, 40vh, 280px) !important;
  }
}

/* Extra wide screens - limit content width */
@media (min-width: 1920px) {
  .article-layout {
    max-width: 1400px;
  }
}
/* Table caption styling - matches figure caption style */
.table-caption {
  color: rgba(0, 0, 0, .6);
  font-size: 12px;
  line-height: 1.5em;
  margin-bottom: .6rem;
  text-align: left;
}

.table-caption strong {
  color: rgba(0, 0, 0, .7);
}

/* More Works Widget Styles - GitHub Theme */
.more-works-container {
  position: relative;
  margin-left: auto;
  z-index: 1001;
}

.more-works-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  background: #ffffff;
  color: #24292f;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  font-family: var(--ui-font);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 0 rgba(27, 31, 35, 0.04);
  position: relative;
  z-index: 1002;
}

.more-works-btn:hover {
  background: #f6f8fa;
  border-color: #b0b7bf;
}

.more-works-btn svg {
  width: 14px;
  height: 14px;
}

.more-works-btn .dropdown-arrow {
  transition: transform 0.2s ease;
  width: 12px;
  height: 12px;
}

.more-works-btn:hover .dropdown-arrow {
  transform: translateY(1px);
}

.more-works-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  width: 420px;
  max-width: calc(100vw - 2rem);
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(140, 149, 159, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateX(10px) translateY(-8px);
  transform-origin: top right;
  transition: all 0.2s ease;
  z-index: 1000;
  border: 1px solid #d0d7de;
}

.more-works-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) translateY(0);
}

.dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #d0d7de;
  background: #f6f8fa;
  border-radius: 6px 6px 0 0;
}

.dropdown-header h4 {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #24292f;
}

.close-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  color: #57606a;
  transition: color 0.15s ease;
  border-radius: 4px;
}

.close-btn:hover {
  color: #24292f;
  background: #eaeef2;
}

.close-btn svg {
  width: 16px;
  height: 16px;
}

.works-list {
  max-height: 360px;
  overflow-y: auto;
  padding: 0.5rem;
}

.work-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  text-decoration: none;
  color: #24292f;
  border-radius: 6px;
  margin-bottom: 0.25rem;
}

.work-item:hover {
  background: #f6f8fa;
}

.work-info {
  flex: 1;
}

.work-item h5 {
  margin: 0 0 0.3rem 0;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.35;
  color: #0969da;
}

.work-venue {
  display: inline;
  font-size: 0.7rem;
  color: #24292f;
  background: #f6f8fa;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-weight: 500;
  border: 1px solid #d0d7de;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

.work-item > svg {
  width: 14px;
  height: 14px;
  color: #57606a;
  flex-shrink: 0;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
  .site-header {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .more-works-container {
    margin-left: auto;
    margin-right: 0;
    z-index: 1001;
  }

  .more-works-btn {
    position: relative;
    z-index: 1002;
  }

  .more-works-dropdown {
    position: fixed !important;
    top: auto !important;
    right: 1rem !important;
    left: 1rem !important;
    width: auto !important;
    max-width: none !important;
    transform: translateX(20px) !important;
    transform-origin: top right;
    max-height: 70vh;
    overflow-x: hidden;
  }

  .more-works-dropdown.active {
    transform: translateX(0) !important;
  }

  .works-list {
    max-height: calc(70vh - 60px);
    overflow-x: hidden;
    overflow-y: auto;
  }

  .work-item {
    padding: 0.5rem 0.6rem;
    gap: 0.6rem;
    min-width: 0;
    overflow: hidden;
  }

  .work-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
  }

  .work-item h5 {
    font-size: 0.75rem;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .work-venue {
    font-size: 0.65rem;
    padding: 0.12rem 0.4rem;
  }

  .work-item > svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
  }

  .dropdown-header {
    padding: 0.6rem 0.8rem;
  }

  .dropdown-header h4 {
    font-size: 0.8rem;
  }

  .close-btn svg {
    width: 14px;
    height: 14px;
  }

  .more-works-btn {
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
  }

  .more-works-btn svg {
    width: 12px;
    height: 12px;
  }

  .more-works-btn .dropdown-arrow {
    width: 10px;
    height: 10px;
  }
}

/* Tablet specific (iPad) */
@media (min-width: 769px) and (max-width: 1024px) {
  .more-works-dropdown {
    width: 400px;
  }

  .more-works-btn {
    padding: 0.38rem 0.7rem;
    font-size: 0.78rem;
  }

  .work-item h5 {
    font-size: 0.78rem;
  }
}

/* Small phones */
@media (max-width: 480px) {
  .site-header {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .more-works-dropdown {
    position: fixed !important;
    right: 0.5rem !important;
    left: 0.5rem !important;
    width: auto !important;
    max-width: none !important;
    transform: translateX(20px) !important;
    max-height: 75vh;
    overflow-x: hidden;
  }

  .works-list {
    max-height: calc(75vh - 55px);
    padding: 0.4rem;
    overflow-x: hidden;
  }

  .work-item {
    padding: 0.45rem 0.5rem;
    gap: 0.5rem;
    min-width: 0;
  }

  .work-item h5 {
    font-size: 0.7rem;
    margin-bottom: 0.25rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .work-venue {
    font-size: 0.6rem;
    padding: 0.1rem 0.35rem;
  }

  .dropdown-header {
    padding: 0.5rem 0.6rem;
  }

  .dropdown-header h4 {
    font-size: 0.75rem;
  }

  .more-works-btn {
    padding: 0.3rem 0.5rem;
    font-size: 0.7rem;
    gap: 0.3rem;
  }

  .more-works-btn svg {
    width: 11px;
    height: 11px;
  }

  .more-works-btn .dropdown-arrow {
    width: 9px;
    height: 9px;
  }
}

/* Landscape mode on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .more-works-dropdown {
    max-height: 85vh;
  }

  .works-list {
    max-height: calc(85vh - 55px);
  }
}
