/* Tech Untangled articles. Reads tokens from /colors_and_type.css. */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); }
body { font-size: 19px; line-height: 1.7; }
a { color: var(--accent-primary); text-underline-offset: 3px; }
a:hover { color: var(--accent-primary-hover); }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; border-radius: 4px; }

/* Header, matches the homepage */
.tu-header {
  max-width: 1120px; margin: 0 auto; padding: 32px 32px 24px;
  display: flex; align-items: flex-end; justify-content: space-between;
  flex-wrap: wrap; gap: 16px; border-bottom: 1px solid var(--border);
}
.tu-logo { display: inline-block; text-decoration: none; line-height: 1; }
.tu-logo-word { display: block; font-family: var(--font-display); font-weight: 500; font-size: 26px; letter-spacing: -0.01em; color: var(--accent-primary); }
.tu-logo-region { display: block; font-family: var(--font-body); font-weight: 500; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg); margin-top: 4px; }
.tu-header nav { display: flex; gap: 28px; flex-wrap: wrap; }
.tu-header nav a {
  font-family: var(--font-body); font-size: 16px; font-weight: 500; color: var(--fg);
  text-decoration: none; padding-bottom: 6px; border-bottom: 2px solid transparent;
}
.tu-header nav a.is-current, .tu-header nav a:hover { color: var(--accent-primary); border-bottom-color: var(--accent-primary); }

/* Article */
.tu-article, .tu-index { max-width: 720px; margin: 0 auto; padding: 48px 32px 80px; }
.tu-back { display: inline-block; font-size: 16px; font-weight: 500; margin-bottom: 32px; text-decoration: none; }
.tu-back::before { content: "← "; }
.tu-kicker { font-size: 14px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-primary); margin: 0 0 14px; }
.tu-article h1 { font-size: clamp(32px, 5vw, 46px); line-height: 1.12; letter-spacing: -0.01em; margin: 0 0 14px; }
.tu-byline { font-size: 16px; color: var(--fg-soft); margin: 0 0 32px; }
.tu-cover { display: block; width: 100%; height: auto; border-radius: var(--radius-3); border: 1px solid var(--border); margin: 0 0 40px; background: var(--tmsc-cream-deep); }

.tu-prose p { margin: 0 0 1.15em; }
.tu-prose h2 { font-size: clamp(24px, 3.4vw, 30px); line-height: 1.25; margin: 1.8em 0 0.6em; }
.tu-prose h3 { font-size: 22px; line-height: 1.35; margin: 1.5em 0 0.5em; }
.tu-prose strong { font-weight: 600; }
.tu-prose ul, .tu-prose ol { margin: 0 0 1.15em; padding-left: 1.3em; }
.tu-prose li { margin: 0 0 0.45em; }
.tu-prose blockquote {
  margin: 1.6em 0; padding: 20px 24px; background: var(--bg-highlight);
  border-radius: var(--radius-2); font-family: var(--font-display); font-size: 22px; line-height: 1.45;
}
.tu-prose blockquote p { margin: 0; }
.tu-prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.2em 0; }
.tu-prose .signoff { font-family: var(--font-display); font-style: italic; font-size: 21px; line-height: 1.5; color: var(--fg-soft); }

/* Host call to action */
.tu-host { margin: 56px 0 0; padding: 32px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius-3); }
.tu-host h2 { font-size: 26px; line-height: 1.25; margin: 0 0 10px; }
.tu-host p { margin: 0 0 22px; color: var(--fg-soft); font-size: 18px; }
.tu-button {
  display: inline-block; background: var(--accent-primary); color: var(--fg-inverse); text-decoration: none;
  font-weight: 600; font-size: 18px; padding: 16px 30px; border-radius: 10px;
}
.tu-button:hover { background: var(--accent-primary-hover); color: var(--fg-inverse); }

/* Older and newer articles */
.tu-pager { margin-top: 56px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.tu-pager a {
  display: flex; flex-direction: column; gap: 6px; padding: 20px 22px; text-decoration: none; color: var(--fg);
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius-3);
  transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.tu-pager a:hover { border-color: var(--tmsc-apricot); box-shadow: var(--elev-1); color: var(--fg); }
.tu-pager-newer { text-align: right; align-items: flex-end; }
.tu-pager-dir { font-size: 14px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-primary); }
.tu-pager-title { font-family: var(--font-display); font-size: 20px; line-height: 1.3; text-wrap: balance; }
.tu-pager time { font-size: 14px; color: var(--fg-muted); }
@media (max-width: 600px) { .tu-pager { grid-template-columns: 1fr; } .tu-pager > span { display: none; } }

/* Index: topic pills and a card grid */
.tu-index { max-width: 1184px; }
.tu-index-head { max-width: 720px; }
.tu-index h1 { font-size: clamp(36px, 6vw, 52px); margin: 0 0 16px; }
.tu-lede { font-size: 20px; color: var(--fg-soft); margin: 0 0 32px; }
.tu-pills { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 12px; }
.tu-pill {
  font-family: var(--font-body); font-size: 16px; font-weight: 500; line-height: 1;
  min-height: 44px; padding: 12px 20px; border-radius: 999px; cursor: pointer;
  background: var(--bg-alt); color: var(--fg); border: 1px solid var(--border);
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.tu-pill:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
.tu-pill[aria-pressed="true"] { background: var(--accent-primary); border-color: var(--accent-primary); color: var(--fg-inverse); }
.tu-count { font-size: 15px; color: var(--fg-muted); margin: 0 0 20px; min-height: 1.5em; }
.tu-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.tu-card[hidden] { display: none; }
.tu-card a {
  display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--fg);
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius-3); overflow: hidden;
  transition: transform var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.tu-card a:hover { transform: translateY(-3px); border-color: var(--tmsc-apricot); box-shadow: var(--elev-1); color: var(--fg); }
.tu-card img, .tu-card-noimg { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover; background: var(--tmsc-cream-deep); border-bottom: 1px solid var(--border); }
.tu-card-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 18px 20px; flex: 1; }
.tu-card-topic { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-primary); }
.tu-card-title { font-family: var(--font-display); font-weight: 500; font-size: 20px; line-height: 1.28; text-wrap: balance; flex: 1; }
.tu-card time { font-size: 14px; color: var(--fg-muted); }
.tu-kicker a { color: inherit; text-decoration: none; }
.tu-kicker a:hover { text-decoration: underline; }
@media (max-width: 1100px) { .tu-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px) { .tu-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; } }
@media (max-width: 540px) {
  .tu-cards { grid-template-columns: 1fr; }
  .tu-pills { gap: 8px; }
  .tu-pill { font-size: 15px; padding: 11px 16px; }
}
@media (prefers-reduced-motion: reduce) { .tu-card a, .tu-pill { transition: none; } .tu-card a:hover { transform: none; } }

/* Footer, matches the homepage */
.tu-footer { border-top: 1px solid var(--border); padding: 56px 32px 64px; }
.tu-footer-inner { max-width: 1080px; margin: 0 auto; }
.tu-footer-grid { margin-top: 18px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; font-size: 15px; line-height: 1.6; }
.tu-footer-grid p { margin: 0; color: var(--fg-soft); max-width: 420px; }
.tu-footer-contact { text-align: right; }
.tu-footer-contact a { font-weight: 500; text-decoration: underline; }
.tu-footer-contact span { color: var(--fg-muted); }
.tu-footer-legal { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 13px; color: var(--fg-muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

@media (max-width: 720px) {
  .tu-header { padding: 20px 20px 16px; gap: 12px; }
  .tu-header nav { gap: 16px; }
  .tu-header nav a { font-size: 15px; padding-bottom: 4px; }
  .tu-article, .tu-index { padding: 32px 20px 64px; }
  .tu-host { padding: 24px 20px; }
  .tu-footer { padding: 48px 20px 56px; }
  .tu-footer-grid { grid-template-columns: 1fr; gap: 16px; }
  .tu-footer-contact { text-align: left; }
}

/* Follow line for readers outside Cherokee County */
.tu-host .tu-follow { margin: 32px 0 0; padding-top: 24px; border-top: 1px solid var(--border); font-size: 17px; color: var(--fg-soft); }
.tu-index-follow { font-size: 17px; color: var(--fg-soft); margin: -16px 0 32px; }

/* Closing tagline, set apart from the article */
.tu-signoff {
  margin: 48px 0 0; padding: 32px 32px 28px; text-align: center;
  background: var(--bg-highlight); border-radius: var(--radius-3);
}
.tu-signoff p { margin: 14px auto 0; max-width: 520px; font-size: 17px; line-height: 1.6; color: var(--fg-soft); }
.tu-signoff .tu-signoff-tag {
  margin: 0 auto; max-width: 560px; font-family: var(--font-display); font-weight: 500;
  font-size: clamp(22px, 3vw, 26px); line-height: 1.35; color: var(--accent-primary); text-wrap: balance;
}
@media (max-width: 540px) { .tu-signoff { padding: 26px 20px 22px; } }

/* Issue number and date, with the topic underneath in a softer tone */
.tu-kicker { margin-bottom: 4px; }
.tu-kicker-sep { margin: 0 6px; opacity: 0.5; }
.tu-topic { font-size: 15px; color: var(--fg-muted); margin: 0 0 16px; }
.tu-topic a { color: inherit; text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; }
.tu-topic a:hover { color: var(--accent-primary); text-decoration-color: currentColor; }
.tu-prose h2, .tu-prose h3 { font-weight: 600; }
