/* ============================================================
   tailwind-compat.css
   Minimal utility layer that reproduces the subset of Tailwind
   classes used by the scraped RWI pages. Loaded AFTER style.css.
   Scoped to the watch-guide pages only (this file is served only
   from /www/wwwroot/watch-guide/assets/).
   ============================================================ */

:root {
  --tw-ring: hsl(var(--primary));
}

/* ---------- design tokens (fallback if style.css lacks them) ---------- */
:root {
  --muted: 20 14% 10%;
  --muted-foreground: 30 6% 62%;
  --accent: 20 14% 10%;
  --accent-foreground: 60 9% 98%;
  --border: 20 8% 18%;
  --input: 20 8% 18%;
  --ring: 38 60% 55%;
  --destructive: 0 62% 50%;
  --success: 142 60% 45%;
  --warning: 38 92% 55%;
}

/* ---------- base typography for the utility-driven article body ---------- */
body {
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: Geist, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
.font-mono, .tabular-nums {
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
.tabular-nums { font-variant-numeric: tabular-nums; }

h1, h2, h3, h4 { line-height: 1.2; }
img { max-width: 100%; }
a { color: inherit; }

/* ---------- layout ---------- */
.block { display: block; }
.hidden { display: none; }
.flex { display: flex; }
.grid { display: grid; }
.inline-flex { display: inline-flex; }
.relative { position: relative; }
.sticky { position: sticky; }
.object-cover { object-fit: cover; }
.overflow-hidden { overflow: hidden; }

.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.ml-auto { margin-left: auto; }
.mt-auto { margin-top: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }

.w-full { width: 100%; }
.h-full { height: 100%; }
.min-w-0 { min-width: 0; }
.h-7 { height: 1.75rem; }
.w-7 { width: 1.75rem; }

.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* gaps */
.gap-1 { gap: .25rem; }
.gap-1\.5 { gap: .375rem; }
.gap-2 { gap: .5rem; }
.gap-3 { gap: .75rem; }
.gap-4 { gap: 1rem; }
.gap-x-3 { column-gap: .75rem; }
.gap-x-4 { column-gap: 1rem; }
.gap-y-0\.5 { row-gap: .125rem; }
.gap-y-1\.5 { row-gap: .375rem; }
.gap-y-4 { row-gap: 1rem; }
.space-y-1\.5 > * + * { margin-top: .375rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

/* ---------- spacing ---------- */
.m-0 { margin: 0; }
.mb-0\.5 { margin-bottom: .125rem; }
.mb-2 { margin-bottom: .5rem; }
.mb-3 { margin-bottom: .75rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-1 { margin-top: .25rem; }
.mt-1\.5 { margin-top: .375rem; }
.mt-2 { margin-top: .5rem; }
.mt-4 { margin-top: 1rem; }
.mt-12 { margin-top: 3rem; }
.my-6 { margin-top: 1.5rem; margin-bottom: 1.5rem; }
.my-8 { margin-top: 2rem; margin-bottom: 2rem; }
.my-12 { margin-top: 3rem; margin-bottom: 3rem; }

.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.px-1\.5 { padding-left: .375rem; padding-right: .375rem; }
.px-2\.5 { padding-left: .625rem; padding-right: .625rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.py-0 { padding-top: 0; padding-bottom: 0; }
.py-1\.5 { padding-top: .375rem; padding-bottom: .375rem; }
.py-3 { padding-top: .75rem; padding-bottom: .75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.pt-3 { padding-top: .75rem; }
.pt-5 { padding-top: 1.25rem; }
.pt-8 { padding-top: 2rem; }
.pb-12 { padding-bottom: 3rem; }
.top-20 { top: 5rem; }

/* ---------- sizing helpers ---------- */
.aspect-\[4\/3\] { aspect-ratio: 4 / 3; }
.max-w-\[1240px\] { max-width: 1240px; }

/* ---------- typography ---------- */
.text-xs { font-size: .75rem; line-height: 1.5; }
.text-sm { font-size: .875rem; line-height: 1.55; }
.text-base { font-size: 1rem; line-height: 1.6; }
.text-xl { font-size: 1.25rem; line-height: 1.4; }
.text-\[10px\] { font-size: 10px; line-height: 1.4; }
.text-\[15px\] { font-size: 15px; line-height: 1.65; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.uppercase { text-transform: uppercase; }
.capitalize { text-transform: capitalize; }
.leading-snug { line-height: 1.375; }
.tracking-tight { letter-spacing: -0.015em; }
.tracking-\[0\.18em\] { letter-spacing: .18em; }
.tracking-\[0\.2em\] { letter-spacing: .2em; }

/* ---------- colors (HSL custom props) ---------- */
.text-foreground { color: hsl(var(--foreground)); }
.text-muted-foreground { color: hsl(var(--muted-foreground)); }
.text-muted-foreground\/40 { color: hsl(var(--muted-foreground) / .4); }
.text-primary { color: hsl(var(--primary)); }
.text-warning { color: hsl(var(--warning)); }
.bg-card { background-color: hsl(var(--card)); }
.bg-muted { background-color: hsl(var(--muted)); }
.bg-primary\/5 { background-color: hsl(var(--primary) / .05); }
.bg-warning\/5 { background-color: hsl(var(--warning) / .05); }

/* ---------- borders ---------- */
.border { border-width: 1px; border-style: solid; border-color: hsl(var(--border)); }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; border-color: hsl(var(--border)); }
.border-t { border-top-width: 1px; border-top-style: solid; border-color: hsl(var(--border)); }
.border-y { border-top-width: 1px; border-bottom-width: 1px; border-top-style: solid; border-bottom-style: solid; border-color: hsl(var(--border)); }
.border-border { border-color: hsl(var(--border)); }
.border-primary\/30 { border-color: hsl(var(--primary) / .3); }
.border-warning\/30 { border-color: hsl(var(--warning) / .3); }
.last\:border-b-0:last-child { border-bottom-width: 0; }

/* ---------- radii ---------- */
.rounded-md { border-radius: .375rem; }
.rounded-lg { border-radius: .5rem; }
.rounded-full { border-radius: 9999px; }

/* ---------- interaction ---------- */
.transition-colors { transition: color .18s ease, background-color .18s ease, border-color .18s ease; }
.transition-transform { transition: transform .18s ease; }
.transition-all { transition: all .18s ease; }
.duration-200 { transition-duration: .2s; }
.hover\:text-primary:hover { color: hsl(var(--primary)); }
.hover\:text-foreground:hover { color: hsl(var(--foreground)); }
.hover\:border-primary\/40:hover { border-color: hsl(var(--primary) / .4); }
.group:hover .group-hover\:text-primary { color: hsl(var(--primary)); }
.group:hover .group-hover\:-translate-y-0\.5 { transform: translateY(-2px); }
.group:hover .group-hover\:translate-x-0\.5 { transform: translateX(2px); }
.focus\:outline-none:focus { outline: none; }
.focus\:ring-2:focus { box-shadow: 0 0 0 2px hsl(var(--ring) / .6); }

/* accordion state helpers */
.group-data-\[state\=open\]\:rotate-45[data-state="open"] .lucide-plus { transform: rotate(45deg); }
[data-state="closed"] .data-\[state\=closed\]\:animate-accordion-up { animation: none; }
[data-state="open"] .data-\[state\=open\]\:animate-accordion-down { animation: none; }

/* lucide icon defaults */
.lucide { width: 1em; height: 1em; display: inline-block; vertical-align: -0.125em; }

/* prose child selectors used inline in the pages */
.\[\\&\\>p\]\:m-0 > p { margin: 0; }
.\[\\&\\>p\\+p\]\:mt-2 > p + p { margin-top: .5rem; }
.\[\\&\\>p\]\:text-\[15px\] > p { font-size: 15px; line-height: 1.65; }
.\[\\&\\>ul\]\:m-0 > ul { margin: 0; }
.\[\\&\\>ul\]\:mt-2 > ul { margin-top: .5rem; }
.\[\\&\\>ul\]\:text-\[15px\] > ul { font-size: 15px; line-height: 1.65; }

/* ---------- responsive ---------- */
@media (min-width: 640px) {
  .sm\:inline { display: inline; }
  .sm\:p-5 { padding: 1.25rem; }
  .sm\:p-6 { padding: 1.5rem; }
  .sm\:px-3 { padding-left: .75rem; padding-right: .75rem; }
  .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  .sm\:gap-3 { gap: .75rem; }
  .sm\:text-2xl { font-size: 1.5rem; line-height: 1.3; }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sm\:aspect-\[16\/9\] { aspect-ratio: 16 / 9; }
}
@media (min-width: 768px) {
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .lg\:block { display: block; }
  .lg\:grid { display: grid; }
  .lg\:grid-cols-\[minmax\(0\,1fr\)_220px\] { grid-template-columns: minmax(0, 1fr) 220px; }
  .lg\:gap-x-12 { column-gap: 3rem; }
  .lg\:mb-8 { margin-bottom: 2rem; }
  .lg\:mb-10 { margin-bottom: 2.5rem; }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
}
@media (min-width: 1280px) {
  .xl\:gap-x-16 { column-gap: 4rem; }
}

/* ---------- article body ---------- */
.prose-editorial { max-width: 100%; }
.prose-editorial p { margin: 1rem 0; }
.prose-editorial h2 { margin: 2rem 0 .75rem; font-size: 1.5rem; font-weight: 600; }
.prose-editorial h3 { margin: 1.5rem 0 .5rem; font-size: 1.15rem; font-weight: 600; }
.prose-editorial ul, .prose-editorial ol { margin: 1rem 0; padding-left: 1.35rem; }
.prose-editorial li { margin: .375rem 0; }
.prose-editorial a { color: hsl(var(--primary)); text-decoration: underline; text-underline-offset: 2px; }
.prose-editorial blockquote {
  margin: 1.5rem 0; padding: .75rem 1rem;
  border-left: 3px solid hsl(var(--primary) / .5);
  background: hsl(var(--card)); border-radius: .375rem;
  color: hsl(var(--foreground) / .9);
}
.prose-editorial figure { margin: 1.5rem 0; }
.prose-editorial figcaption { margin-top: .5rem; font-size: .8125rem; color: hsl(var(--muted-foreground)); }
.prose-editorial table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; font-size: .9rem; }
.prose-editorial th, .prose-editorial td {
  border: 1px solid hsl(var(--border)); padding: .5rem .65rem; text-align: left; vertical-align: top;
}
.prose-editorial th { background: hsl(var(--card)); font-weight: 600; }
.prose-editorial code {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: .875em; padding: .1em .35em; border-radius: .25rem;
  background: hsl(var(--muted));
}
.not-prose { margin-left: 0; margin-right: 0; }

/* placeholder slots for the two intentionally-empty sections */
.empty-slot {
  border: 1px dashed hsl(var(--border));
  border-radius: .5rem;
  padding: 1.5rem;
  color: hsl(var(--muted-foreground));
  font-size: .875rem;
  text-align: center;
}

/* ---------- arbitrary-variant children (HTML-escaped selectors) ---------- */
[class*="[&amp;&gt;p]:m-0"] > p { margin: 0; }
[class*="[&amp;&gt;p+p]:mt-2"] > p + p { margin-top: .5rem; }
[class*="[&amp;&gt;p]:text-[15px]"] > p { font-size: 15px; line-height: 1.65; }
[class*="[&amp;&gt;ul]:m-0"] > ul { margin: 0; }
[class*="[&amp;&gt;ul]:mt-2"] > ul { margin-top: .5rem; }
[class*="[&amp;&gt;ul]:text-[15px]"] > ul { font-size: 15px; line-height: 1.65; }
/* focus ring helpers */
.focus\:ring-ring:focus { --tw-ring: hsl(var(--ring)); box-shadow: 0 0 0 2px hsl(var(--ring) / .55); }
.focus\:ring-offset-2:focus { outline-offset: 2px; }
/* lucide icon names are cosmetic only */
.lucide-chevron-right, .lucide-quote, .lucide-clock,
.lucide-arrow-left, .lucide-arrow-up-right,
.lucide-triangle-alert, .lucide-info, .lucide-plus { display: inline-block; }
html.dark { color-scheme: dark; }

/* remaining arbitrary-variant children, matched attributes exactly as authored */
[class*="[&amp;&gt;p]:m-0"] > p { margin: 0 !important; }
[class*="[&amp;&gt;p+p]:mt-2"] > p + p { margin-top: .5rem !important; }
[class*="[&amp;&gt;p]:text-[15px]"] > p { font-size: 15px !important; }
[class*="[&amp;&gt;ul]:m-0"] > ul { margin: 0 !important; }
[class*="[&amp;&gt;ul]:mt-2"] > ul { margin-top: .5rem !important; }
[class*="[&amp;&gt;ul]:text-[15px]"] > ul { font-size: 15px !important; }
.narrow { max-width: 720px; margin-left: auto; margin-right: auto; }

/* ---- 补齐缺失类（图片容器高度、卡片排版）---- */
.aspect-\[16\/10\] { aspect-ratio: 16 / 10; }
.lg\:grid-cols-3 { }
@media (min-width: 1024px) {
  .grid.lg\:grid-cols-3, .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
.sm\:grid-cols-2 { }
@media (min-width: 640px) {
  .grid.sm\:grid-cols-2, .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.mb-4 { margin-bottom: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.leading-relaxed { line-height: 1.625; }
.duration-500 { transition-duration: .5s; }
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


/* ---- 尺寸类补齐 ---- */
.h-7 { height: 1.75rem; }
.w-7 { width: 1.75rem; }
.h-8 { height: 2rem; }
.w-8 { width: 2rem; }
.rounded-full { border-radius: 9999px; }

/* ---------- 缺失的工具类补充 ---------- */
.gap-0\.5 { gap: 0.125rem; }
.gap-x-0\.5 { column-gap: 0.125rem; }
.gap-y-0\.5 { row-gap: 0.125rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-x-1\.5 { column-gap: 0.375rem; }
.gap-y-1\.5 { row-gap: 0.375rem; }
.gap-2\.5 { gap: 0.625rem; }
.space-y-0\.5 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.125rem; }
.space-y-1\.5 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.375rem; }

/* nav 里的 ul 基础重置（Tailwind 版 header） */
header nav ul { list-style: none; margin: 0; padding: 0; }
header nav ul > li { list-style: none; }
header nav ul > li::marker { content: none; }

/* header 导航项间距兜底（gap 失效时靠 padding 撑开） */
header nav ul { display: flex; align-items: center; }
header nav ul > li { display: flex; }
header nav ul > li > a { padding-left: .5rem; padding-right: .5rem; white-space: nowrap; }
