/* The Machine Shop Journal — Blueprint drafting visual.
   Drafting grid, dimension lines, crisp white sheets on blue. No rounded corners. */

:root {
  --bg: #eef1f4;       /* page ground */
  --accent: #16477e;   /* blueprint blue */
  --ink: #202a34;      /* body ink */
  --sheet: #ffffff;    /* drawing paper */
  --line: #c3ced9;     /* thin line */
  --grid: #dde6ee;     /* faint grid */
  --muted: #5c6b78;
  --k-design: #16477e;
  --k-mfg: #2f5d7c;
  --k-mat: #8a6a2b;
  --k-thermo: #a8552b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "Helvetica Neue", Helvetica, Arial, "Segoe UI", sans-serif;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.62;
  background-color: var(--bg);
  /* drafting grid motif */
  background-image:
    repeating-linear-gradient(0deg, var(--grid) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(90deg, var(--grid) 0 1px, transparent 1px 24px);
  background-position: -1px -1px;
}

.sheet-width { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- title block (header) ---------- */
.titleblock {
  background: var(--accent);
  border-bottom: 4px solid var(--ink);
  color: #eef4fb;
}
.tb-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; }
.tb-brand { display: flex; align-items: center; gap: 14px; color: #ffffff; }
.tb-mark {
  width: 44px; height: 44px; flex: 0 0 44px;
  border: 1px solid #9db8d6;
  background:
    linear-gradient(to top right, transparent 47%, #9db8d6 47%, #9db8d6 53%, transparent 53%),
    linear-gradient(to bottom right, transparent 47%, #9db8d6 47%, #9db8d6 53%, transparent 53%);
}
.tb-text { display: flex; flex-direction: column; line-height: 1.2; }
.tb-name { font-weight: 700; letter-spacing: .4px; }
.tb-tag { font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: #a8c2de; }
.tb-nav { display: flex; gap: 22px; }
.tb-nav a { color: #dce8f5; font-size: 14px; letter-spacing: .4px; }
.tb-nav a:hover { color: #ffffff; text-decoration: none; border-bottom: 2px solid #ffffff; }

/* ---------- rack head (hero) ---------- */
.rack-head { background: var(--sheet); border-bottom: 1px solid var(--line); padding: 46px 0 40px; position: relative; }
.rack-kicker { color: var(--accent); font-size: 12px; letter-spacing: 3px; font-weight: 700; margin-bottom: 14px; }
.rack-head h1 { font-size: 36px; line-height: 1.12; font-weight: 700; max-width: 780px; letter-spacing: -.3px; }
.rack-lede { max-width: 680px; color: var(--muted); font-size: 17px; margin-top: 16px; }

/* ---------- section labels / key ---------- */
section { padding: 34px 0; }
.block-label {
  font-size: 12px; letter-spacing: 2.4px; text-transform: uppercase; color: var(--muted);
  font-weight: 700; margin-bottom: 16px; border-bottom: 1px solid var(--line); padding-bottom: 8px;
}
.key-list { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 28px; }
.key-list li { font-size: 14px; color: var(--ink); }

/* category tags (used on cards + key) */
.pc-tag {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase;
  padding: 3px 9px; border: 1px solid currentColor; background: var(--sheet);
}
.k-design { color: var(--k-design); }
.k-mfg { color: var(--k-mfg); }
.k-mat { color: var(--k-mat); }
.k-thermo { color: var(--k-thermo); }

/* ---------- class nav ---------- */
.class-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.class-card {
  background: var(--sheet); border: 1px solid var(--line); border-left: 5px solid currentColor;
  padding: 16px; display: flex; flex-direction: column; gap: 6px;
  background-image: repeating-linear-gradient(90deg, var(--grid) 0 1px, transparent 1px 12px);
}
.class-card:hover { text-decoration: none; border-top-color: currentColor; }
.cc-count { font-size: 12px; color: var(--muted); letter-spacing: .5px; }
.cc-name { font-weight: 700; font-size: 17px; color: var(--ink); }

/* ---------- trays (home grouping) ---------- */
.tray-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; }
.tray-head h2 { font-size: 23px; font-weight: 700; letter-spacing: -.2px; }
.tray-more { font-size: 13px; letter-spacing: .4px; }

/* ---------- part cards (drawing rack) ---------- */
.part-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.part-card {
  position: relative; background: var(--sheet); border: 1px solid var(--line);
  padding: 18px; display: flex; flex-direction: column; gap: 12px; color: var(--ink);
  background-image: repeating-linear-gradient(0deg, var(--grid) 0 1px, transparent 1px 20px);
}
/* corner tick marks — drafting sheet */
.part-card::before, .part-card::after {
  content: ""; position: absolute; width: 10px; height: 10px; pointer-events: none;
  border-color: var(--accent);
}
.part-card::before { top: -1px; left: -1px; border-top: 2px solid; border-left: 2px solid; }
.part-card::after { bottom: -1px; right: -1px; border-bottom: 2px solid; border-right: 2px solid; }
.part-card:hover { border-color: var(--accent); text-decoration: none; }
.pc-title { font-weight: 700; font-size: 16px; line-height: 1.3; }
.pc-dims { display: flex; flex-direction: column; gap: 0; border-top: 1px dashed var(--line); }
.pc-dim { display: flex; gap: 10px; font-size: 13px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.pc-dim b {
  flex: 0 0 88px; font-size: 10px; letter-spacing: .6px; text-transform: uppercase;
  color: var(--muted); font-weight: 700; padding-top: 2px;
}
.pc-dim .spec-multi { list-style: none; }
.pc-note { font-size: 13px; color: var(--muted); }

/* ---------- page head ---------- */
.sheet-head { padding: 40px 0 10px; }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 10px; letter-spacing: .3px; }
.crumb a { color: var(--muted); }
.sheet-head h1 { font-size: 32px; line-height: 1.15; font-weight: 700; letter-spacing: -.3px; }
.lede { color: var(--muted); margin-top: 10px; }

/* ---------- item layout (part spec + prose) ---------- */
.plan-view { display: grid; grid-template-columns: 320px 1fr; gap: 30px; padding-top: 26px; padding-bottom: 44px; }
.spec-block {
  align-self: start; background: var(--sheet); border: 1px solid var(--accent);
  border-top: 5px solid var(--accent); position: sticky; top: 16px;
}
.spec-cap {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--line); background: #f3f7fb;
}
.spec-cap-name { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.spec-list { }
.spec-line { display: flex; border-bottom: 1px solid var(--line); font-size: 14px; }
.spec-line:last-child { border-bottom: 0; }
.spec-line dt {
  flex: 0 0 42%; padding: 10px 14px; color: var(--muted); border-right: 1px solid var(--line);
  font-size: 12px; letter-spacing: .3px; background: #fafcfd;
}
.spec-line dd { flex: 1; padding: 10px 14px; }
.spec-multi { list-style: none; }
.spec-multi li { position: relative; padding-left: 12px; }
.spec-multi li::before { content: "\2013"; position: absolute; left: 0; color: var(--accent); }

/* ---------- prose (sections) ---------- */
.sheet-prose {
  background: var(--sheet); border: 1px solid var(--line); padding: 30px 34px;
  position: relative;
  background-image: repeating-linear-gradient(0deg, var(--grid) 0 1px, transparent 1px 26px);
}
.sheet-prose::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 14px, transparent 14px 28px);
}
.sheet-prose .sec { margin-bottom: 26px; }
.sheet-prose .sec:last-child { margin-bottom: 0; }
.sheet-prose h2 {
  font-size: 20px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: baseline; gap: 12px;
  letter-spacing: -.2px;
}
.sec-num {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  color: var(--accent); font-size: 13px; font-weight: 700;
  border: 1px solid var(--accent); padding: 1px 6px;
}
.sheet-prose p { margin-bottom: 13px; }
.sheet-prose p:last-child { margin-bottom: 0; }
.sheet-prose h2 + p { }
.cross-ref .xref-list { list-style: none; }
.xref-list li { padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }

/* legal prose uses same sheet feel */
.sheet-prose h2:not(.sec h2) { display: block; }

/* ---------- colophon (footer) ---------- */
.colophon { background: var(--ink); color: #cdd7e0; margin-top: 24px; padding: 34px 0; }
.colo-inner { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; }
.colo-brand { flex: 1 1 340px; }
.colo-brand .tb-name { color: #ffffff; }
.colo-brand p { color: #9aa8b5; font-size: 14px; margin-top: 8px; }
.colo-nav { display: flex; gap: 18px; }
.colo-nav a { color: #cdd7e0; font-size: 14px; }
.colo-nav a:hover { color: #ffffff; }
.colo-fine { flex: 1 1 100%; font-size: 12px; color: #8593a1; margin-top: 12px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .class-grid { grid-template-columns: repeat(2, 1fr); }
  .part-grid { grid-template-columns: repeat(2, 1fr); }
  .key-list { grid-template-columns: 1fr; }
  .plan-view { grid-template-columns: 1fr; }
  .spec-block { position: static; }
}
@media (max-width: 580px) {
  .class-grid, .part-grid { grid-template-columns: 1fr; }
  .tb-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
  .tb-nav { gap: 16px; }
  .rack-head h1 { font-size: 28px; }
  .sheet-head h1 { font-size: 26px; }
  .sheet-prose { padding: 22px 18px; }
}
