/* Workshop manual: start page, login page and messages (2026-10-30).
   The login and club boxes follow the forum's own style (Kayjey theme): dark red #ab0030 borders and buttons,
   light peach #fde9d6 panels, #ffc58b header bars. Phone first; two columns from 760px. */

:root {
  --wm-red: #ab0030;
  --wm-red-dark: #8a0027;
  --wm-panel: #fde9d6;
  --wm-panel-2: #fce1c7;
  --wm-head: #ffc58b;
  --wm-text: #222222;
  --wm-muted: #5c5c5c;
  --wm-link: #0066cc;
  --wm-fiat: #1d4f9c;
}

* { box-sizing: border-box; }

html { background: #ffffff; }

body.wm-page {
  margin: 0;
  color: var(--wm-text);
  background: #ffffff;
  font: 15px/1.5 Arial, Helvetica, sans-serif;
}

a { color: var(--wm-link); text-decoration: none; }
a:hover { color: #000000; text-decoration: underline; }

/* header: FIAT logo, Coupe, Service/Workshop Manuals, Volumes 1 - 4 (as on the old header picture) */
.wm-hero {
  padding: 28px 16px 22px;
  text-align: center;
  border-bottom: 4px solid var(--wm-red);
  background: #ffffff;
}
.wm-hero h1 { margin: 0; font-weight: normal; }
.wm-hero h1 img { display: block; width: 280px; max-width: 80%; height: auto; margin: 0 auto 18px; }
.wm-model { display: block; font-size: 52px; line-height: 1.05; color: #111111; letter-spacing: 0.5px; }
.wm-sub { display: block; margin-top: 6px; font-size: 19px; color: #222222; }
.wm-volumes {
  margin: 12px 0 0;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #111111;
}

.wm-main { max-width: 980px; margin: 0 auto; padding: 24px 16px 8px; }

/* boxes in the forum's style */
.wm-box {
  border: 1px solid var(--wm-red);
  padding: 10px;
  background: #ffffff;
  margin-bottom: 16px;
}
.wm-boxhead {
  padding: 4px 8px;
  background: var(--wm-head);
  color: var(--wm-red);
  font-size: 13px;
  font-weight: bold;
}
.wm-boxbody {
  padding: 14px 16px 16px;
  background: var(--wm-panel);
  border-top: 1px solid var(--wm-red);
}

.wm-columns { display: grid; gap: 16px; }
.wm-columns .wm-box { margin-bottom: 0; }

/* login form (as the forum's login page: "Log in to join the conversation") */
.wm-form { max-width: 340px; margin: 0 auto; }
.wm-form h2 { margin: 2px 0 6px; font-size: 20px; font-weight: normal; color: #000000; }
.wm-explain { margin: 0 0 12px; font-size: 13px; color: var(--wm-muted); }
.wm-label { display: block; margin: 8px 0 3px; font-size: 13px; font-weight: bold; }
.wm-input {
  display: block;
  width: 100%;
  padding: 7px;
  border: 1px solid #b9a796;
  background: #ffffff;
  color: #000000;
  font: 15px Arial, Helvetica, sans-serif;
}
.wm-input:focus { outline: 2px solid var(--wm-red); outline-offset: 0; border-color: var(--wm-red); }
.wm-error {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-left: 4px solid var(--wm-red);
  background: #ffffff;
  color: var(--wm-red);
  font-size: 13px;
}
.wm-links { margin: 10px 0 0; font-size: 13px; }

/* buttons: the forum's button (dark red, light text, bold, lower case) */
.wm-button {
  display: inline-block;
  padding: 7px 14px;
  border: 0;
  background: var(--wm-red);
  color: var(--wm-panel);
  font: bold 14px Arial, Helvetica, sans-serif;
  text-transform: lowercase;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.wm-button:hover, .wm-button:focus { background: var(--wm-red-dark); color: #ffffff; text-decoration: none; }
.wm-wide { display: block; width: 100%; margin-top: 14px; }

/* club box */
.wm-banner { display: block; max-width: 318px; margin: 0 auto; }
.wm-banner img { display: block; width: 100%; height: auto; border: 1px solid #c9b29c; }
.wm-pitch { margin: 14px 0 6px; font-size: 14px; }
.wm-benefits { margin: 0; padding-left: 20px; font-size: 14px; }
.wm-benefits li { margin: 2px 0; }

.wm-note { margin: 16px 0 0; font-size: 13px; color: var(--wm-muted); text-align: center; }

/* what's in the manual */
.wm-contents { margin-top: 30px; }
.wm-contents h2 {
  margin: 26px 0 8px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--wm-red);
  font-size: 21px;
  color: #111111;
}
.wm-intro, .wm-models { margin: 0 0 10px; font-size: 14px; }
.wm-groups { display: grid; gap: 12px 24px; }
.wm-group h3 { margin: 10px 0 4px; font-size: 15px; color: var(--wm-red); }
.wm-group ul { margin: 0; padding-left: 18px; font-size: 13px; color: #333333; }
.wm-group li { margin: 1px 0; }
.wm-pages { font-weight: normal; font-size: 12px; color: var(--wm-muted); }

.wm-footer {
  max-width: 980px;
  margin: 28px auto 0;
  padding: 14px 16px 26px;
  border-top: 1px solid #ddd2c6;
  font-size: 13px;
  color: var(--wm-muted);
  text-align: center;
}

/* members: search the manual (above the complete manual banner) */
.wm-search { max-width: 760px; margin: 0 auto 26px; }
.wm-searchform {
  padding: 14px 16px;
  border: 1px solid var(--wm-red);
  border-top: 4px solid var(--wm-red);
  background: var(--wm-panel);
}
.wm-searchform label { display: block; margin-bottom: 6px; font-size: 17px; font-weight: bold; color: #111111; }
.wm-searchrow { display: flex; gap: 8px; }
.wm-searchrow .wm-input { flex: 1; min-width: 0; }
.wm-searchrow .wm-button { flex: none; font-size: 15px; }
.wm-searchhelp { margin: 8px 0 0; font-size: 12px; color: var(--wm-muted); }
.wm-results { margin-top: 14px; }
.wm-searchnote { margin: 0 0 8px; padding: 6px 10px; background: #fff7e8; border-left: 4px solid var(--wm-head); font-size: 13px; }
.wm-resultcount { margin: 0 0 6px; font-size: 13px; color: var(--wm-muted); }
.wm-noresults { margin: 8px 0; font-size: 14px; }
.wm-resultlist { margin: 0; padding-left: 26px; }
.wm-result { margin: 0 0 14px; padding-left: 4px; }
.wm-result::marker { color: var(--wm-muted); font-size: 13px; }
.wm-resulttitle { font-size: 15px; font-weight: bold; color: var(--wm-red); }
.wm-resulttitle:hover { color: #000000; }
.wm-resultwhere { display: block; font-size: 12px; color: var(--wm-muted); }
.wm-snippet { display: block; margin-top: 3px; font-size: 13px; line-height: 1.5; color: #333333; }
.wm-snippet mark { padding: 0 1px; background: #ffd9a8; color: #000000; }
.wm-pager { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; font-size: 13px; }
.wm-pager a, .wm-pager span { display: inline-block; min-width: 28px; padding: 3px 7px; border: 1px solid #d9c3ad; text-align: center; }
.wm-pager .wm-current { background: var(--wm-red); border-color: var(--wm-red); color: var(--wm-panel); font-weight: bold; }

@media (min-width: 760px) {
  .wm-columns { grid-template-columns: 1.15fr 1fr; align-items: stretch; }
  .wm-columns .wm-box { display: flex; flex-direction: column; }
  .wm-columns .wm-boxbody { flex: 1; }
  .wm-groups { grid-template-columns: repeat(3, 1fr); }
  .wm-volumelist { grid-template-columns: repeat(2, 1fr); }
  .wm-model { font-size: 60px; }
}

@media (max-width: 420px) {
  .wm-model { font-size: 44px; }
  .wm-sub { font-size: 17px; }
  .wm-boxbody { padding: 12px; }
}

/* ===== members' page: contents pane + PDF viewer on one page (2026-10-30) =====
   body.wm-home: the start (header, search, volumes, complete manual) with the contents on the left (phones: below the search).
   body.wm-doc: a chapter in the viewer; the contents on the left (phones: a drawer behind the Contents button).
   In the contents, rows with an arrow open a list, rows with a page mark open that page. */
[hidden] { display: none !important; }
.wm-skip { position: absolute; left: -9999px; top: 8px; z-index: 60; padding: 6px 10px; background: #ffffff; }
.wm-skip:focus { left: 8px; }

.wm-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 16px 0;
}
.wm-home .wm-topbar { justify-content: flex-end; }
.wm-home .wm-brand, .wm-home .wm-topsearch { display: none; }
.wm-brand { display: flex; align-items: center; gap: 8px; flex: none; color: #111111; }
.wm-brand:hover { color: #111111; text-decoration: none; }
.wm-brandname { font-size: 22px; line-height: 1; }
.wm-brandsub { font-size: 13px; color: var(--wm-muted); }
.wm-topsearch { display: flex; gap: 6px; flex: 1; max-width: 560px; margin-left: auto; }
.wm-topsearch .wm-input { flex: 1; min-width: 0; padding: 5px 8px; font-size: 14px; }
.wm-topsearch .wm-button { padding: 6px 12px; font-size: 13px; }
.wm-user { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--wm-muted); white-space: nowrap; }
.wm-user .wm-button { padding: 5px 12px; font-size: 12px; }

/* "Clear": next to Search, the same shape but light, so Search stays the main button */
.wm-clear { background: #ffffff; color: var(--wm-red); box-shadow: inset 0 0 0 1px var(--wm-red); }
.wm-clear:hover, .wm-clear:focus { background: var(--wm-panel); color: #000000; }

.wm-layout { display: grid; gap: 18px 26px; max-width: 1280px; margin: 0 auto; padding: 22px 16px 0; }
.wm-home .wm-viewer { display: none; }
.wm-homesearch .wm-search { max-width: none; margin: 0; }
.wm-doc .wm-hero, .wm-doc .wm-homesearch, .wm-doc .wm-homeextra, .wm-doc .wm-footer { display: none; }

/* the contents pane */
.wm-pane { min-width: 0; }
.wm-panehead { display: flex; align-items: center; justify-content: space-between; }
.wm-panehead h2 { margin: 0 0 8px; font-size: 18px; color: #111111; }
.wm-paneclose { display: none; border: 0; background: none; font-size: 26px; line-height: 1; color: var(--wm-muted); cursor: pointer; }
.wm-filter { padding: 6px 8px; font-size: 14px; }
.wm-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 8px 0 6px; font-size: 12px; color: var(--wm-muted); }
.wm-lg { display: inline-flex; align-items: center; gap: 6px; }
.wm-tree { font-size: 14px; }
.wm-t { list-style: none; margin: 0; padding: 0; }
.wm-t .wm-t, .wm-topics { list-style: none; margin: 0; padding: 0 0 2px 15px; }
.wm-tree summary {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 5px 6px;
  border-radius: 3px;
  cursor: pointer;
  list-style: none;
}
.wm-tree summary::-webkit-details-marker { display: none; }
.wm-tree summary:hover { background: var(--wm-panel); }
.wm-tree summary:focus-visible, .wm-leaf:focus-visible { outline: 2px solid var(--wm-red); outline-offset: -2px; }
/* arrow = opens a list */
.wm-tree summary::before, .wm-lg-list::before {
  content: "";
  flex: none;
  width: 0;
  height: 0;
  border-left: 6px solid var(--wm-red);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  transition: transform 0.15s;
}
.wm-tree details[open] > summary::before { transform: rotate(90deg); }
/* page mark = opens the page */
.wm-leaf::before, .wm-lg-page::before {
  content: "";
  flex: none;
  width: 8px;
  height: 10px;
  border: 1.5px solid currentColor;
  border-radius: 1px 4px 1px 1px;
  opacity: 0.8;
}
.wm-tl { flex: 1; min-width: 0; }
.wm-count, .wm-pg { flex: none; font-size: 11px; color: var(--wm-muted); white-space: nowrap; }
.wm-count { padding: 0 6px; border-radius: 8px; background: #f4e7da; }
.wm-vol { border-top: 1px solid #ecdccb; }
.wm-vol > details > summary { padding: 8px 6px; font-size: 15px; }
.wm-volsub { display: block; font-size: 12px; color: var(--wm-muted); }
.wm-section > details > summary { font-weight: bold; color: #333333; }
.wm-leaf {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 3px 6px;
  border-radius: 3px;
  color: var(--wm-link);
  font-size: 13px;
  line-height: 1.35;
}
.wm-leaf:hover { background: #eef4fb; color: #000000; text-decoration: none; }
.wm-chap > .wm-leaf { font-size: 14px; }
.wm-topics .wm-whole .wm-tl { font-style: italic; }
.wm-sec > .wm-leaf { font-weight: bold; }
.wm-insec > .wm-leaf { padding-left: 18px; }
.wm-leaf.wm-onpage { background: #fff1e2; color: #000000; box-shadow: inset 3px 0 0 #e9a8b8; }
.wm-leaf[aria-current] { background: #ffe2c2; color: #000000; box-shadow: inset 3px 0 0 var(--wm-red); }
.wm-nomatch { margin: 8px 6px; font-size: 13px; color: var(--wm-muted); }

/* start: the volumes as text buttons, the complete manual */
.wm-volumecards h2 { margin: 0 0 10px; font-size: 18px; color: #111111; }
.wm-cards { display: grid; gap: 10px; }
.wm-card {
  display: block;
  padding: 10px 12px;
  border: 1px solid var(--wm-red);
  border-left-width: 5px;
  background: var(--wm-panel);
  color: #111111;
}
.wm-card:hover { background: var(--wm-head); color: #000000; text-decoration: none; }
.wm-card strong { display: block; font-size: 16px; color: var(--wm-red); }
.wm-card span { display: block; font-size: 14px; }
.wm-card small { display: block; margin-top: 2px; font-size: 12px; color: var(--wm-muted); }
.wm-tip { margin: 10px 0 0; font-size: 13px; color: var(--wm-muted); }
.wm-fullpdf {
  display: block;
  overflow: hidden;
  max-width: 420px;
  margin: 22px 0 0;
  padding: 9px 12px;
  border: 1px solid #0f3470;
  border-radius: 4px;
  background: var(--wm-fiat);
  color: #ffffff;
}
.wm-fullpdf:hover { background: #163f7d; color: #ffffff; text-decoration: none; }
.wm-pdftag { float: left; margin: 1px 10px 0 0; padding: 4px 6px; border-radius: 2px; background: #ffffff; color: #c8102e; font-size: 12px; font-weight: bold; }
.wm-fullpdf strong { display: block; font-size: 13px; }
.wm-fullpdf small { display: block; font-size: 11px; color: #d6e2f5; }

/* a chapter open: the page fills the window; the viewer takes all the room next to the contents */
body.wm-doc { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }
.wm-doc .wm-topbar { flex: none; max-width: none; width: 100%; padding: 6px 12px; border-bottom: 3px solid var(--wm-red); }
.wm-doc .wm-layout {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: none;
  padding: 0;
  gap: 0;
  grid-template-columns: 340px minmax(0, 1fr);
  grid-template-areas: "pane viewer";
}
.wm-doc .wm-pane { grid-area: pane; overflow: auto; padding: 10px 10px 20px 12px; border-right: 1px solid #e3d3c3; background: #fffaf5; }
.wm-doc.wm-nopane .wm-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "viewer"; }
.wm-doc.wm-nopane .wm-pane { display: none; }
.wm-viewer { grid-area: viewer; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.wm-viewbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-bottom: 1px solid #e3d3c3;
  background: var(--wm-panel);
  font-size: 13px;
}
.wm-viewbar .wm-button { padding: 5px 12px; font-size: 13px; }
.wm-crumbs { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wm-crumbpath, .wm-here { color: var(--wm-muted); }
.wm-here:not(:empty)::before { content: "\00b7\00a0"; }
.wm-viewlink { flex: none; white-space: nowrap; }
.wm-short { display: none; }
.wm-frame { flex: 1; width: 100%; min-height: 0; border: 0; background: #d4d4d7; }

@media (min-width: 900px) {
  .wm-home .wm-layout { grid-template-columns: 330px minmax(0, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "pane search" "pane extra"; align-items: start; }
  .wm-homesearch { grid-area: search; }
  .wm-home .wm-pane { grid-area: pane; position: sticky; top: 10px; max-height: calc(100vh - 20px); overflow: auto; padding-right: 4px; }
  .wm-homeextra { grid-area: extra; }
  .wm-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* phones and small tablets: the contents is a drawer while a chapter is open */
@media (max-width: 899px) {
  .wm-doc .wm-topbar { flex-wrap: wrap; gap: 6px 10px; }
  .wm-doc .wm-topsearch { order: 3; flex-basis: 100%; max-width: none; }
  .wm-doc .wm-brandsub, .wm-doc .wm-username, .wm-crumbpath { display: none; }
  .wm-doc .wm-user { margin-left: auto; }
  .wm-doc .wm-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "viewer"; }
  .wm-doc .wm-pane {
    position: fixed;
    z-index: 40;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(88vw, 380px);
    transform: translateX(-105%);
    transition: transform 0.2s;
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.3);
  }
  .wm-doc.wm-nopane .wm-pane { display: block; }
  .wm-doc.wm-drawer .wm-pane { transform: none; }
  .wm-doc .wm-paneclose { display: block; }
  .wm-backdrop { position: fixed; z-index: 35; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0, 0, 0, 0.35); }
  .wm-viewbar { gap: 8px; }
  .wm-long { display: none; }
  .wm-short { display: inline; }
  .wm-tree summary, .wm-leaf { padding-top: 7px; padding-bottom: 7px; }
}
