/*
Theme Name: LATW Docs
Theme URI: https://llm-automatic-translation.top/
Author: AdsPol / Szymon Zawadzki
Author URI: https://x.com/szymon_eryk
Description: Documentation theme for the LATW plugin family, built for the docs.* subdomain. Documentation is written as ordinary posts; the category a post is filed under says which plugin it documents. The front page is a grid of plugin tiles, a category is that plugin's article index, and a single article is read with the plugin's full article list on the left and a table of contents on the right. Visual language mirrors the LATW marketing theme.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: latw-docs
*/

/* ===== Design tokens — identical to the LATW marketing theme, so the docs
   subdomain and the landing pages read as one product. ===== */
:root {
  --accent: #006FEE;
  --accent-foreground: #fff;
  --background: #000000;
  --content1: #18181b;
  --content2: #27272a;
  --content1-foreground: #fafafa;
  --divider: rgba(255, 255, 255, .15);
  --focus: #006FEE;
  --radius-small: 8px;
  --radius-medium: 12px;
  --radius-large: 14px;
  --shadow-medium: 0px 0px 15px 0px rgb(0 0 0 / .06), 0px 2px 30px 0px rgb(0 0 0 / .22), inset 0px 0px 1px 0px rgb(255 255 255 / .15);
  --shadow-large: 0px 0px 30px 0px rgb(0 0 0 / .07), 0px 30px 60px 0px rgb(0 0 0 / .26), inset 0px 0px 1px 0px rgb(255 255 255 / .15);
  --transition: 250ms ease;

  /* Height of the sticky plugin bar, used for scroll-padding and for the `top`
     of the sticky rails so nothing hides under the chrome. */
  --docbar-h: 60px;
}

/* ===== Base ===== */
* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  /* An in-page anchor must land below the sticky plugin bar, not under it. */
  scroll-padding-top: calc(var(--docbar-h) + 24px);
}
body {
  margin: 0;
  background: var(--background);
  color: #fff;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -.01em;
  overflow-x: hidden;
}
::selection { background: rgba(0, 111, 238, .4); }
a { color: inherit; text-decoration: none; }
img { display: block; }
button { font: inherit; }

h1 { font-size: 44px; font-weight: 700; letter-spacing: -.03em; line-height: 1.12; margin: 0; }
h2 { font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; margin: 0; }
h3 { font-size: 20px; font-weight: 700; letter-spacing: -.015em; line-height: 1.3; margin: 0; }
p { margin: 0; }
@media (max-width: 767px) {
  h1 { font-size: 32px; }
  h2 { font-size: 24px; }
  h3 { font-size: 18px; }
}

.latw-wrap { max-width: 1400px; margin: 0 auto; padding: 0 24px; }
.latw-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;
}

/* ===== Buttons — same spec as the marketing theme's HeroUI-equivalents ===== */
.latw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-medium);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  outline: none;
  transition: transform var(--transition), background-color var(--transition), color var(--transition), border-color var(--transition), opacity var(--transition);
}
.latw-btn:active { transform: scale(.97); }
.latw-btn:focus-visible { box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--focus); }
.latw-btn-sm { height: 36px; padding: 0 14px; border-radius: var(--radius-small); font-size: 13.5px; }
.latw-btn-lg { height: 48px; padding: 0 24px; border-radius: var(--radius-large); font-size: 16px; }
.latw-btn-primary { background: var(--accent); color: var(--accent-foreground); }
.latw-btn-primary:hover { opacity: .9; }
.latw-btn-bordered { background: transparent; color: #fff; border: 1px solid var(--divider); }
.latw-btn-bordered:hover { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .3); }
.latw-btn-light { background: transparent; color: #fff; }
.latw-btn-light:hover { background: rgba(255, 255, 255, .08); }

/* A whole card is one click target: an absolutely positioned link covering it,
   which keeps the real <a href> in the markup for keyboard and screen readers
   while leaving nested links (if any) clickable above it. */
.latw-stretch { position: absolute; inset: 0; z-index: 1; }

/* ===== Cards ===== */
.latw-card {
  background: var(--content1);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-medium);
  transition: transform var(--transition), background-color var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.latw-card-hoverable { cursor: pointer; }
.latw-card-hoverable:hover {
  background: var(--content2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-large);
}
.latw-card-hoverable:active { transform: translateY(-2px) scale(.99); }

/* ===== Site nav (parts/nav.php) ===== */
.latw-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 24px;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}
.latw-nav-logo img { height: 40px; width: auto; }
.latw-nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 15px;
  color: #9CA3AF;
  font-weight: 500;
  margin-left: 8px;
}
.latw-nav-links a { white-space: nowrap; transition: color var(--transition); }
.latw-nav-links a:hover { color: #fff; }
.latw-nav-ctas { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.latw-menu-checkbox { display: none; }
.latw-menu-burger { display: none; }
.latw-mobile-menu { display: none; }
@media (max-width: 1099px) {
  .latw-nav-links { display: none; }
  .latw-nav-ctas .latw-nav-cta-text { display: none; }
  .latw-menu-burger {
    display: flex; width: 26px; height: 18px; flex-direction: column;
    justify-content: space-between; cursor: pointer;
  }
  .latw-menu-burger span { display: block; height: 2px; background: #fff; border-radius: 2px; }
  .latw-menu-checkbox:checked ~ .latw-mobile-menu { display: flex; }
  .latw-mobile-menu {
    flex-direction: column; gap: 16px; position: absolute; top: 100%; left: 0; right: 0;
    background: #0b0b0d; padding: 22px 24px; border-top: 1px solid rgba(255, 255, 255, .08);
    z-index: 60; font-size: 15px; color: #9CA3AF;
  }
  .latw-mobile-menu .latw-search { width: 100%; max-width: none; margin: 0 0 4px; height: 44px; }
}
@media (max-width: 480px) {
  .latw-nav { gap: 12px; padding: 14px 16px; }
  .latw-nav-logo img { height: 32px; }
}

/* ===== Docs bar =====
   Sticky trail plus search. It used to carry the plugin's logo and full name as
   well, which meant every screen announced the plugin three times over; the
   hero and the article rail do that job now. */
.latw-docbar {
  position: sticky;
  top: 0;
  z-index: 45;
  background: rgba(11, 11, 13, .92);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, .08);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.latw-docbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--docbar-h);
}
.latw-docbar-crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: #6B7185;
  min-width: 0;
  /* Long trails scroll rather than wrap: the bar is a fixed-height strip. */
  overflow-x: auto;
  scrollbar-width: none;
}
.latw-docbar-crumbs::-webkit-scrollbar { display: none; }
.latw-docbar-crumbs a { white-space: nowrap; transition: color var(--transition); }
.latw-docbar-crumbs a:hover { color: #fff; }
.latw-docbar-sep { flex: none; color: #3A3D48; }
.latw-docbar-here { white-space: nowrap; color: #9CA3AF; font-weight: 600; }
.latw-docbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: none; }
@media (max-width: 560px) {
  .latw-docbar-inner { padding: 0 16px; gap: 10px; }
  /* Squeezed into a phone bar the search field is a two-character sliver, so it
     is dropped here and offered in full inside the burger drawer instead. The
     trail stays: with the brand gone it is all this bar has to say. */
  .latw-docbar-actions { display: none; }
  .latw-docbar-crumbs {
    font-size: 12.5px;
    /* The trail scrolls here, so fade the right edge rather than let the last
       crumb end mid-word against the screen edge with no hint that it runs on. */
    mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);
  }
}

/* ===== Plugin hero (category view) ===== */
.latw-plugin-hero {
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background:
    radial-gradient(900px 340px at 12% -40%, rgba(0, 111, 238, .22), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, .03), transparent);
}
.latw-plugin-hero-inner {
  max-width: 1400px; margin: 0 auto; padding: 54px 24px 46px;
  display: flex; align-items: flex-start; gap: 26px;
}
.latw-plugin-logo {
  width: 76px; height: 76px; border-radius: 18px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--content1);
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: var(--shadow-medium);
  overflow: hidden;
}
.latw-plugin-logo img { max-width: 56px; max-height: 44px; width: auto; height: auto; object-fit: contain; }
.latw-plugin-logo-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 800; letter-spacing: -.03em; color: #fff;
  background: var(--accent);
}
.latw-plugin-hero-meta { min-width: 0; flex: 1; }
.latw-eyebrow {
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); font-weight: 700; margin-bottom: 12px;
}
.latw-plugin-hero p.latw-lede {
  margin: 16px 0 0; color: #8A8F99; font-size: 16px; line-height: 1.65; max-width: 720px;
}
.latw-plugin-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
@media (max-width: 720px) {
  .latw-plugin-hero-inner { flex-direction: column; gap: 20px; padding: 34px 20px 32px; }
  .latw-plugin-logo { width: 60px; height: 60px; border-radius: 14px; }
}

/* ===== Docs layout — the three tracks =====
   article list · content · table of contents. The rails are sticky and scroll
   independently; below 1200px the TOC folds into the article, below 900px the
   article list folds into a dropdown above it.

   The track widths are fixed, and a rail with nothing to show leaves its track
   empty rather than collapsing it: the article must be the same width on every
   page, or the text shifts sideways as the reader moves between one article
   with sections and the next without. */
.latw-docs-layout {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr) 232px;
  gap: 44px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 36px 24px 80px;
  align-items: start;
}
.latw-docs-main { min-width: 0; }
.latw-docs-rail {
  position: sticky;
  top: calc(var(--docbar-h) + 20px);
  max-height: calc(100vh - var(--docbar-h) - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .18) transparent;
  padding-bottom: 8px;
}
.latw-docs-rail::-webkit-scrollbar { width: 6px; }
.latw-docs-rail::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .14); border-radius: 3px; }
.latw-docs-rail::-webkit-scrollbar-track { background: transparent; }

@media (max-width: 1199px) {
  .latw-docs-layout { grid-template-columns: 248px minmax(0, 1fr); gap: 32px; }
  .latw-docs-toc-rail { display: none; }
}
@media (max-width: 899px) {
  .latw-docs-layout { grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 22px 20px 60px; }
  .latw-docs-nav-rail { position: static; max-height: none; overflow: visible; }
}

/* ===== Left rail: every article in this plugin's docs ===== */
.latw-sidenav-head {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 14px; margin-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
/* Square well, same footprint whatever the logo's aspect ratio — vendor marks
   range from a wide wordmark to a round glyph, and only a fixed box makes the
   rail heads of different plugins look like one design. */
.latw-sidenav-logo {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .08);
  overflow: hidden;
}
.latw-sidenav-logo img { max-width: 22px; max-height: 18px; width: auto; height: auto; object-fit: contain; }
.latw-sidenav-logo .latw-plugin-logo-fallback { font-size: 12px; border-radius: 0; }
.latw-sidenav-head-name { font-size: 13px; font-weight: 700; color: #fff; }
.latw-sidenav-title {
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: #5C6173; font-weight: 700; margin-bottom: 12px;
}
.latw-sidenav-group + .latw-sidenav-group { margin-top: 22px; }
.latw-sidenav-group-title {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: #6B7185; font-weight: 700; margin: 0 0 10px;
}
.latw-sidenav-list { list-style: none; margin: 0; padding: 0; }
.latw-sidenav-list a {
  display: block;
  padding: 7px 12px;
  margin-left: -12px;
  border-radius: var(--radius-small);
  font-size: 14px;
  line-height: 1.45;
  color: #9CA3AF;
  border-left: 2px solid transparent;
  transition: color var(--transition), background-color var(--transition), border-color var(--transition);
}
.latw-sidenav-list a:hover { color: #fff; background: rgba(255, 255, 255, .05); }
.latw-sidenav-list a[aria-current="page"] {
  color: #fff;
  font-weight: 600;
  background: rgba(0, 111, 238, .14);
  border-left-color: var(--accent);
}
.latw-sidenav-empty { color: #5C6173; font-size: 14px; }

/* Below 900px the whole rail becomes one collapsible block. */
.latw-sidenav-mobile { display: none; }
@media (max-width: 899px) {
  .latw-sidenav-mobile {
    display: block;
    background: var(--content1);
    border-radius: var(--radius-large);
    border: 1px solid rgba(255, 255, 255, .08);
    padding: 14px 18px;
  }
  .latw-sidenav-desktop { display: none; }
  .latw-sidenav-mobile > summary {
    list-style: none; cursor: pointer;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    font-size: 14px; font-weight: 600; color: #fff;
  }
  .latw-sidenav-mobile > summary::-webkit-details-marker { display: none; }
  .latw-sidenav-mobile > summary::after {
    content: ''; width: 8px; height: 8px; flex: none;
    border-right: 2px solid #6B7185; border-bottom: 2px solid #6B7185;
    transform: rotate(45deg) translateY(-2px);
    transition: transform var(--transition);
  }
  .latw-sidenav-mobile[open] > summary::after { transform: rotate(225deg) translateY(-2px); }
  .latw-sidenav-mobile-body { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .08); }
}

/* ===== Right rail: table of contents ===== */
.latw-toc-title {
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: #5C6173; font-weight: 700; margin-bottom: 14px;
}
.latw-toc-list { list-style: none; margin: 0; padding: 0; border-left: 1px solid rgba(255, 255, 255, .1); }
.latw-toc-list a {
  display: block;
  padding: 6px 0 6px 14px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  font-size: 13.5px;
  line-height: 1.45;
  color: #8A8F99;
  transition: color var(--transition), border-color var(--transition);
}
.latw-toc-list a:hover { color: #fff; }
.latw-toc-list .latw-toc-h3 a { padding-left: 26px; font-size: 13px; color: #6B7185; }
.latw-toc-list a.is-active { color: #fff; border-left-color: var(--accent); font-weight: 600; }
.latw-toc-list .latw-toc-h3 a.is-active { color: #fff; }

/* Inline copy of the TOC, shown where the rail is hidden. */
.latw-toc-inline { display: none; margin-bottom: 28px; }
@media (max-width: 1199px) {
  .latw-toc-inline {
    display: block;
    background: var(--content1);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: var(--radius-large);
    padding: 16px 20px;
  }
  .latw-toc-inline > summary {
    list-style: none; cursor: pointer;
    font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
    font-weight: 700; color: #9CA3AF;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
  }
  .latw-toc-inline > summary::-webkit-details-marker { display: none; }
  .latw-toc-inline > summary::after {
    content: ''; width: 8px; height: 8px; flex: none;
    border-right: 2px solid #6B7185; border-bottom: 2px solid #6B7185;
    transform: rotate(45deg) translateY(-2px);
    transition: transform var(--transition);
  }
  .latw-toc-inline[open] > summary::after { transform: rotate(225deg) translateY(-2px); }
  .latw-toc-inline .latw-toc-list { margin-top: 14px; }
}

/* ===== Article ===== */
.latw-article-head { margin-bottom: 34px; }
.latw-article-head .latw-eyebrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.latw-article-meta {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 18px; font-size: 13px; color: #5C6173;
}
.latw-article-meta .latw-dot { width: 3px; height: 3px; border-radius: 50%; background: #3A3D48; }

/* Editor output. Same prose rules as the marketing theme, plus docs-specific
   affordances: anchored headings, callouts and wide tables. */
.latw-prose { color: #C7CCDA; line-height: 1.75; font-size: 16px; }
.latw-prose > * + * { margin-top: 22px; }
.latw-prose h2 {
  font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25;
  color: #fff; margin-top: 52px; padding-top: 4px;
}
.latw-prose h3 {
  font-size: 19px; font-weight: 700; letter-spacing: -.015em; line-height: 1.35;
  color: #fff; margin-top: 36px;
}
.latw-prose h4 { font-size: 16px; font-weight: 700; color: #fff; margin-top: 28px; }
.latw-prose > h2:first-child, .latw-prose > h3:first-child { margin-top: 0; }
.latw-prose p { margin: 0; }
.latw-prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.latw-prose strong { color: #fff; }
.latw-prose ul, .latw-prose ol { margin: 0; padding-left: 1.4em; }
.latw-prose li + li { margin-top: 8px; }
.latw-prose li > ul, .latw-prose li > ol { margin-top: 8px; }
.latw-prose blockquote {
  margin: 0; padding: 4px 20px;
  border-left: 3px solid var(--accent);
  color: #9CA3AF; font-style: italic;
}
.latw-prose img { max-width: 100%; height: auto; border-radius: var(--radius-medium); display: block; }
.latw-prose figure { margin: 0; }
.latw-prose figcaption { margin-top: 8px; font-size: 13px; color: #6B7185; text-align: center; }
.latw-prose pre {
  background: var(--content1);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: var(--radius-medium);
  padding: 18px 20px;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.6;
}
.latw-prose code {
  background: var(--content1);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 5px;
  padding: 2px 6px;
  font-size: .88em;
  color: #E6E8EF;
}
.latw-prose pre code { background: none; border: none; padding: 0; }
.latw-prose hr { border: none; border-top: 1px solid rgba(255, 255, 255, .08); }
.latw-prose table {
  width: 100%; border-collapse: collapse; font-size: 14.5px;
  display: block; overflow-x: auto;
}
.latw-prose th, .latw-prose td {
  border: 1px solid rgba(255, 255, 255, .1);
  padding: 10px 14px; text-align: left; vertical-align: top;
}
.latw-prose th { background: var(--content1); color: #fff; font-weight: 600; }
.latw-prose kbd {
  background: var(--content2); border: 1px solid rgba(255, 255, 255, .16);
  border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px;
  font-size: .85em; color: #fff;
}

/* Heading anchors — the link icon appears on hover, the whole heading is a
   click target for copying a deep link. */
.latw-prose .latw-anchor {
  float: left;
  margin-left: -26px;
  width: 26px;
  color: #3A3D48;
  text-decoration: none;
  opacity: 0;
  transition: opacity var(--transition), color var(--transition);
}
.latw-prose h2:hover .latw-anchor,
.latw-prose h3:hover .latw-anchor,
.latw-prose .latw-anchor:focus-visible { opacity: 1; }
.latw-prose .latw-anchor:hover { color: var(--accent); }
@media (max-width: 899px) {
  .latw-prose .latw-anchor { display: none; }
}

/* ===== Prev / next article ===== */
.latw-post-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-top: 56px; padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.latw-post-nav a {
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px 20px;
  border: 1px solid var(--divider);
  border-radius: var(--radius-large);
  transition: background-color var(--transition), border-color var(--transition);
}
.latw-post-nav a:hover { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .3); }
.latw-post-nav .latw-post-nav-dir { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #5C6173; font-weight: 700; }
.latw-post-nav .latw-post-nav-title { font-size: 15px; font-weight: 600; color: #fff; line-height: 1.4; }
.latw-post-nav .is-next { text-align: right; align-items: flex-end; grid-column: 2; }
@media (max-width: 640px) {
  .latw-post-nav { grid-template-columns: 1fr; }
  .latw-post-nav .is-next { grid-column: 1; text-align: left; align-items: flex-start; }
}

/* ===== Article index (category view) =====
   No rails on this page — it is itself the list of articles — so the cards get
   one centred column instead of a layout grid. */
.latw-docs-index {
  max-width: 1160px;
  margin: 0 auto;
  padding: 44px 24px 88px;
}
@media (max-width: 899px) {
  .latw-docs-index { padding: 28px 20px 64px; }
}

/* ===== Article index (category view) ===== */
.latw-article-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 900px) { .latw-article-grid { grid-template-columns: 1fr; } }
.latw-article-card {
  position: relative;
  display: flex; flex-direction: column; gap: 9px;
  padding: 24px 26px;
  border: 1px solid rgba(255, 255, 255, .07);
}
.latw-article-card h3 { font-size: 17px; line-height: 1.35; }
.latw-article-card p { color: #8A8F99; font-size: 14px; line-height: 1.6; }
.latw-article-card .latw-article-card-more {
  margin-top: auto; padding-top: 10px;
  font-size: 13px; font-weight: 600; color: var(--accent);
}

.latw-section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  margin: 0 0 20px;
}
.latw-section-head h2 { font-size: 22px; }
.latw-section-count { font-size: 13px; color: #5C6173; font-weight: 600; }
.latw-docs-section + .latw-docs-section { margin-top: 52px; }

/* ===== Front page ===== */
.latw-home-hero { padding: 84px 24px 46px; text-align: center; }
.latw-home-hero h1 { max-width: 820px; margin: 0 auto; }
.latw-home-hero p {
  max-width: 620px; margin: 20px auto 0;
  color: #8A8F99; font-size: 17px; line-height: 1.65;
}
@media (max-width: 767px) { .latw-home-hero { padding: 48px 20px 32px; } }

.latw-search {
  display: flex; align-items: center; gap: 10px;
  max-width: 560px; margin: 32px auto 0;
  background: var(--content1);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius-large);
  padding: 0 16px;
  height: 52px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.latw-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 111, 238, .22); }
.latw-search svg { flex: none; color: #5C6173; }
.latw-search input {
  flex: 1; min-width: 0; height: 100%;
  background: none; border: none; outline: none;
  color: #fff; font-size: 15px;
}
.latw-search input::placeholder { color: #5C6173; }
.latw-search-sm { height: 40px; margin: 0; max-width: 320px; border-radius: var(--radius-medium); }
.latw-search-sm input { font-size: 14px; }

.latw-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 22px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px 96px;
}
@media (max-width: 700px) {
  .latw-tiles { grid-template-columns: 1fr; padding: 0 20px 64px; gap: 16px; }
}
.latw-tile {
  position: relative;
  display: flex; flex-direction: column;
  padding: 30px 30px 26px;
  border: 1px solid rgba(255, 255, 255, .07);
  overflow: hidden;
}
.latw-tile-logo {
  width: 54px; height: 54px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .08);
  margin-bottom: 20px; overflow: hidden; flex: none;
}
.latw-tile-logo img { max-width: 38px; max-height: 32px; width: auto; height: auto; object-fit: contain; }
.latw-tile h2 { font-size: 20px; margin-bottom: 10px; }
.latw-tile p { color: #8A8F99; font-size: 14.5px; line-height: 1.6; margin-bottom: 22px; }
.latw-tile-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  /* Pinned to the bottom so the row of tiles shares one baseline whatever the
     description length. */
  margin-top: auto; padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .07);
  font-size: 13px; color: #6B7185;
}
.latw-tile-foot .latw-tile-cta { color: var(--accent); font-weight: 600; }

/* ===== Search results / archive rows ===== */
.latw-result-list { display: flex; flex-direction: column; gap: 14px; }
.latw-result {
  position: relative;
  padding: 22px 24px;
  border: 1px solid rgba(255, 255, 255, .07);
}
.latw-result-crumb { font-size: 12px; color: var(--accent); font-weight: 600; margin-bottom: 8px; }
.latw-result h3 { font-size: 17px; margin-bottom: 8px; }
.latw-result p { color: #8A8F99; font-size: 14px; line-height: 1.6; }
.latw-result mark { background: rgba(0, 111, 238, .28); color: #fff; padding: 0 2px; border-radius: 3px; }

/* ===== Pagination ===== */
.latw-pagination { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.latw-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 14px;
  border-radius: var(--radius-medium);
  border: 1px solid var(--divider);
  color: #fff; font-size: 14px; font-weight: 600;
  transition: background-color var(--transition), border-color var(--transition);
}
.latw-pagination .page-numbers:hover { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .3); }
.latw-pagination .page-numbers.current { background: var(--accent); border-color: var(--accent); }
.latw-pagination .page-numbers.dots { border-color: transparent; }

/* ===== Empty state ===== */
.latw-empty {
  padding: 56px 32px; text-align: center;
  border: 1px dashed rgba(255, 255, 255, .12);
  border-radius: var(--radius-large);
  color: #6B7185;
}
.latw-empty h2 { color: #fff; margin-bottom: 10px; }

/* ===== Footer ===== */
.latw-footer {
  padding: 54px 24px 42px;
  margin-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.latw-footer-inner {
  max-width: 1160px; margin: 0 auto;
  display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 30px;
}
.latw-footer img { height: 52px; width: auto; margin-bottom: 18px; }
.latw-footer p { color: #6B7185; font-size: 14px; line-height: 1.7; max-width: 320px; }
.latw-footer-col { display: flex; flex-direction: column; gap: 11px; font-size: 15px; color: #9CA3AF; }
.latw-footer-col a { transition: color var(--transition); }
.latw-footer-col a:hover { color: #fff; }
.latw-footer-label {
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: #5C6173; font-weight: 700; margin-bottom: 12px;
}
/* A second label inside a column starts a new block, so it needs the air that
   the column's own gap does not give it. */
.latw-footer-col .latw-footer-label + a { margin-top: -2px; }
.latw-footer-col .latw-footer-label:not(:first-child) { margin-top: 18px; }
/* The support address is longer than a narrow column, so let it wrap rather
   than push the footer sideways. */
.latw-footer-email { overflow-wrap: anywhere; }

.latw-footer-legal {
  max-width: 1160px; margin: 34px auto 0; padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .06);
  font-size: 14px; font-weight: 300; color: #5C6173;
}
.latw-footer-legal a { color: #5C6173; text-decoration: underline; }
@media (max-width: 860px) {
  .latw-footer-inner { grid-template-columns: 1fr; gap: 26px; }
}

/* Reduced motion: no smooth scrolling, no hover lifts. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: .001ms !important; }
  .latw-card-hoverable:hover { transform: none; }
}
