.pm-body { --pm-accent: #5a6772; --pm-bg: #f6f7f8; }
.pm-hero { padding: 3rem 1rem; background: var(--pm-bg); border-bottom: 1px solid #e6e8ea; }
.pm-hero h1 { margin: 0 0 .25rem 0; letter-spacing: .5px; }
.pm-sub { color: #666; }

/* Blog image grid */
.pm-img-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  align-items: start;
  margin: 0.75rem 0;
}

/* Remove markdown paragraph margins inside grid */
.pm-img-grid p{ margin: 0; }

.pm-img-grid img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  background: #fff;
}
/* In a grid, disable floats so layout stays grid-driven */
.pm-img-grid figure{ float: none !important; max-width: none !important; margin: 0 !important; }
.pm-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding-inline: clamp(12px, 3vw, 28px); /* ← add uniform page gutters */
  box-sizing: border-box;
}
.pm-wrap, .pm-wrap * { box-sizing: border-box; }
.pm-section { padding: 1.25rem; }
.pm-intro { max-width: 70ch; line-height: 1.6; }
.pm-pins { margin-top: 1.5rem; background:#fff; border:1px solid #eee; padding:1rem; border-radius:.5rem; }

.pm-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap:1rem; }
.pm-card { background:#fff; border:1px solid #e9ecef; border-radius:.5rem; overflow:hidden; display:flex; flex-direction:column; }
.pm-card-img img { width:100%; height:auto; display:block; }
.pm-card-body { padding: .9rem; display:flex; flex-direction:column; gap:.5rem; }
/* Thumbs immediately under the hero image on cards */
.pm-card .pm-thumbs.pm-thumbs-top {
  padding: .4rem .9rem .2rem; /* a bit tighter than default */
  border-top: 1px solid #eef1f3;
}
.pm-meta { color:#777; font-size:.9rem; display:flex; gap:.5rem; flex-wrap:wrap; }
.pm-desc { color:#333; }
.pm-specs { display:grid; grid-template-columns:auto 1fr; gap:.15rem .75rem; font-size:.95rem; }
.pm-specs dt { color:#666; }
.pm-dl { display:flex; flex-wrap:wrap; gap:.5rem; margin-top:.25rem; }
.pm-dl a { border:1px solid #dfe3e6; padding:.25rem .5rem; border-radius:.35rem; text-decoration:none; }
.pm-dl a:hover { background:#f1f3f5; }

.pm-list { display:grid; gap:1rem; }
.pm-log { background:#fff; border:1px solid #e9ecef; border-radius:.5rem; padding:1rem; }
.pm-log time { display:block; color:#777; margin-bottom:.35rem; }
.pm-notes { display:grid; gap:.75rem; padding-left:1.1rem; }
.pm-notes li { margin-left:.5rem; }
.pm-hidden { display: none; }

.pm-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  padding: .5rem .9rem .9rem;
}

.pm-thumbs img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border: 1px solid #e2e5e9;
  border-radius: 4px;
  display: block;
}

.pm-thumbs a:hover img { outline: 2px solid #bbb; }

/* Toggle buttons */
.pm-viewtoggle { display:flex; gap:.5rem; padding: .5rem 1rem 0; }
.pm-viewtoggle .btn {
  border:1px solid #dfe3e6; padding:.3rem .6rem; border-radius:.35rem; text-decoration:none; color:#333;
}
.pm-viewtoggle .btn.active { background:#333; color:#fff; }
/* Base row container */


/* parent row: clip inner borders to the rounded corners */
.pm-row {
  display:block;
  border:1px solid transparent;
  border-radius:.5rem;
  background:#fff;
  overflow:hidden;             /* <-- fixes divider extending past edges */
}

/* Header row layout (unchanged) */
.pm-row-toggle {
  all: unset;
  display: grid;
  grid-template-columns: 20px 64px 1fr; /* caret | thumb | text */
  gap: .6rem 1rem;
  align-items: center;
  width: 100%;
  padding: .4rem .75rem;
  cursor: pointer;
}

.pm-row-toggle:focus-visible { outline: 2px solid #99b; outline-offset: 2px; }

.pm-row-thumb img {
  width:64px; height:64px; object-fit:cover;
  border-radius:4px; display:block; border:1px solid #e2e5e9;
}

.pm-row-meta { color:#777; font-size:.9rem; display:flex; gap:.5rem; }



/* Base: keep the details hidden clean */
.pm-row-details {
  display: block;
  width: 100%;
  padding: .5rem .75rem .75rem;
  border-top: 0; /* parent handles the divider */
}

/* When open, highlight the ENTIRE row (header + details) */
.pm-row.is-open {
  background:#fafafa;
  border-color:#e0e4e8;
}


/* header line divider only when open; now it won’t bleed past the radius */
.pm-row-toggle { border-bottom:1px solid transparent; }
.pm-row.is-open .pm-row-toggle { border-bottom-color:#eef1f3; }




/* indent content so the left edge aligns with the thumbnail column */
.pm-row.is-open .pm-row-details {
  background:transparent;      /* parent provides shading */
  padding-left:calc(.75rem + 20px + 1rem); /* .75rem left pad + 20px caret + 1rem gap */
  padding-right:.75rem;
}

.pm-row-details .pm-thumbs { padding: .25rem 0 0; }

/* ensure hidden panel truly disappears even if a base rule sets display:block */
.pm-row-details[hidden] { display: none !important; }

.pm-row-desc { margin:.25rem 0 .5rem; color:#333; line-height:1.45; }

.pm-row-specs {
  display:grid; grid-template-columns:auto 1fr; gap:.15rem .75rem; font-size:.95rem; margin:.25rem 0 .5rem;
}
.pm-row-specs dt { color:#666; }

.pm-row-dl { display:flex; flex-wrap:wrap; gap:.5rem; margin:.25rem 0 .25rem; }
.pm-row-dl a { border:1px solid #dfe3e6; padding:.25rem .5rem; border-radius:.35rem; text-decoration:none; }
.pm-row-dl a:hover { background:#f1f3f5; }

.pm-row-actions { margin-top:.25rem; }
.pm-row-actions a { text-decoration:none; }
.pm-row-actions a:hover { text-decoration:underline; }


.pm-row-caret {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;            /* matches first grid column */
  font-size: 14px;
  line-height: 1;
}

/* default (desktop) you can keep nowrap if you like */
.pm-row-title { margin:0; font-size:1rem; line-height:1.2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* mobile adjustments */
@media (max-width: 560px) {
  .pm-row-toggle {
    grid-template-columns: 20px 48px 1fr; /* caret | smaller thumb | text */
    gap:.5rem .75rem;
  }
  .pm-row-thumb img { width:48px; height:48px; }
  .pm-row-title { white-space:normal; }   /* allow wrapping inside the grey box */
  .pm-row-meta { flex-wrap:wrap; }
}

/* Already present */
.pm-hidden { display:none; }

/* 3D button styling */
.pm-3d, .pm-row-actions { margin-top:.25rem; }
.pm-3d-link {
  display:inline-flex; gap:.4rem; align-items:center;
  border:1px solid #dfe3e6; border-radius:.35rem;
  padding:.25rem .5rem; text-decoration:none; color:#333;
}
.pm-3d-link:hover { background:#f1f3f5; }
.pm-3d-ico { display:block; width:16px; height:16px; }

/* Recent updates (overview) */
.pm-recent { margin: 1.25rem 0; }
.pm-recent h2 { margin: 0 0 .5rem; }

.pm-recent ul { margin: 0; padding: 0; list-style: none; }
.pm-recent li {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  padding: .35rem 0;
  border-bottom: 1px dashed #e9edf0;   /* subtle divider to match site vibe */
}

.pm-recent time {
  flex: 0 0 auto;
  color: #6b7280;                       /* muted date */
  font-size: .9rem;
  min-width: 7.5ch;                     /* keeps dates aligned */
}

/* Make the title link look like your site’s body links */
.pm-recent a,
.pm-recent a:visited {
  color: inherit;                        /* use your normal text color */
  text-decoration: none;                 /* no default underline */
  font-weight: 400;                      /* mild emphasis (adjust if needed) */
}

/* Hover/active state consistent with site */
.pm-recent a:hover,
.pm-recent a:focus {
  text-decoration: underline;            /* or border-bottom if you prefer */
  text-underline-offset: 2px;
}

/* Long titles wrap nicely without escaping the container */
.pm-recent a { overflow-wrap: anywhere; }

/* In-Progress cards */
.grid.cards .card .thumb {
  /* keep all card thumbs a consistent box */
  aspect-ratio: 16 / 9;            /* adjust to taste */
  max-height: 240px;               /* safety for huge screens */
  overflow: hidden;
  background: #f4f4f4;
  border-radius: 6px;
}

.grid.cards .card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;               /* fills box without distortion */
  display: block;
}

/* Base: centered, responsive on mobile */
.build-log .entry-body img,
.build-log .media img {
  display: block;
  height: auto;
  max-width: min(100%, 400px);
  margin: 1em auto;
  border-radius: 4px;
}

.build-log .entry-body figure,
.build-log .media figure {
  margin: 0 0 1.5em;
  text-align: center; /* keep caption under image */
}

.build-log .entry-body figcaption,
.build-log .media figcaption {
  font-size: 0.9em;
  color: #666;
  margin-top: 0.4em;
}
/* Build log entry styling */
.build-log .entry {
  margin: 2.5rem 0;
}

.build-log .entry h2 {
  margin-bottom: 0.25rem;
}

/* Date element */
.build-log .entry time {
  display: block;               /* ensures consistent spacing */
  color: #6b7280;               /* same muted gray as .pm-recent time */
  font-size: 0.9rem;            /* slightly smaller than body text */
  font-weight: 400;
  letter-spacing: 0.02em;
  margin-bottom: 0.75rem;       /* gives breathing room before the entry text */
  text-transform: uppercase;    /* optional — matches design if you like */
}

.build-log .entry time {
  border-left: 3px solid #e1e5e8;
  padding-left: 0.5rem;
  margin-bottom: 0.75rem;
  color: #777;
  font-size: 0.9rem;
  font-style: italic;
}
/* Entry header line: title on left, edit on right */
.entry-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap: 12px;
}

/* Make sure long titles wrap but keep the edit link on the right */
.entry-title{
  margin:0;
  line-height:1.2;
  flex: 1 1 auto;
  min-width:0;
}

/* Make the underline span the whole header row (title + [Edit]) */
.build-log .entry .entry-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;

  border-bottom: 1px solid #e6e8ea;   /* ← full-width rule */
  padding-bottom: .35rem;
  margin-bottom:  .5rem;
}

/* Ensure no leftover underline on the title itself */
.build-log .entry .entry-title{
  margin:0;
  line-height:1.2;
  flex:1 1 auto;
  min-width:0;
  border-bottom: none;
}

/* Bracketed, right-aligned edit link */
.entry-edit{
  white-space:nowrap;
  color: #5a6772;
  text-decoration:none;
  font-size:.8rem;
}
.entry-edit::before{ content:"["; margin-right:.25ch; color:#9aa3ab; }
.entry-edit::after { content:"]"; margin-left:.25ch;  color:#9aa3ab; }
.entry-edit:hover{ color:#000; }

/* Date sits just under the header line */
.entry-date{
  display:block;
  margin: .2rem 0 .4rem;
  color:#6b7280;
  font-size:.95rem;
}

/* Mobile: keep layout tidy */
@media (max-width:720px){
  .entry-edit{ font-size:.9rem; }
}


.timecard-link { margin: .25rem 0 .75rem; }
.timecard-link a { text-decoration:none; border-bottom:1px dotted #cfd6db; color:#374151; }
.timecard-link a:hover { border-bottom-style:solid; }
/* Desktop: float figure so text wraps; caption stays inside the float */
@media (min-width: 600px) {
  .build-log .entry-body figure,
  .build-log .media figure {
    float: right;
    max-width: 400px;
    margin: 0 0 1em 1em; /* gap to left */
  }
  .build-log .entry-body figure.float-left,
  .build-log .media figure.float-left {
    float: left;
    margin: 0 1em 1em 0;  /* gap to right */
  }
  .build-log .entry-body img,
  .build-log .media img {
    max-width: 100%;
    margin: 0; /* no centering while floated */
  }
  .build-log .entry::after { content: ""; display: block; clear: both; }
}

.build-log .entry hr { clear: both; margin-top: 1.5em; }


/* Make ANY .grid.cards container behave like your plane grid */
.grid.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

/* Give .card anchors the same base look as .pm-card */
.grid.cards .card {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: .5rem;
  overflow: hidden;
}
/* Consistent card link styling (planes + in-progress + others) */
.grid.cards a.card {
  color: inherit;              /* no default blue */
  text-decoration: none;       /* remove underline */
  display: block;              /* whole card is clickable */
}

.grid.cards a.card:visited {
  color: inherit;              /* no purple visited */
}

.grid.cards a.card:hover,
.grid.cards a.card:focus {
  text-decoration: none;       /* keep it clean */
  box-shadow: 0 0 0 2px var(--pm-accent, #5a6772); /* subtle hover cue */
  border-radius: 6px;          /* match card corners */
}

/* Consistent link styling for References & Notes */
.pm-notes a {
  color: inherit;              /* match surrounding text */
  text-decoration: none;       /* remove default underline */
  font-weight: 600;            /* keep the title bold */
}

.pm-notes a:visited {
  color: inherit;              /* no purple visited */
}

.pm-notes a:hover,
.pm-notes a:focus {
  text-decoration: underline;  /* or box-shadow if you prefer */
  color: var(--pm-accent, #5a6772);
}

/* later in the file — keep this together */
.pm-intro {
  position: relative;
  display: flow-root;   /* clearfix for the float */
  max-width: none;      /* <-- override the earlier 70ch cap */
}

/* only the text column gets the measure cap */
.pm-intro .intro-copy {
  max-width: 80ch;
  line-height: 1.6;
}

/* floated image stays the same */
.pm-intro img.intro-workshop {
  max-width: 300px;
  height: auto;
  margin: 0 0 1em 1.5em;
  border-radius: 6px;
  float: right;
}

@media (max-width: 700px) {
  .pm-intro img.intro-workshop {
    float: none;
    display: block;
    margin: 0 auto 1em;
    max-width: 90%;
  }
  .pm-intro .intro-copy { max-width: 100%; }
  .about-portrait{ float:none; margin:0 auto 1rem; max-width:220px; }
}
/* Timecard: show up to 3 tiny thumbs per row (then wrap) */
.tc-photos{
  display: grid;
  grid-template-columns: repeat(3, 56px); /* 3 across */
  gap: .35rem;                            /* same spacing you liked */
}

/* grid items */
.tc-photos a{ display:block; }            /* no extra margins needed */
.tc-photos img{
  width:56px; height:56px;
  object-fit:cover; border-radius:4px; display:block;
  box-shadow: 0 0 0 1px rgba(0,0,0,.06);
}
/* Keep the date on one line and slightly smaller */
.tc-table td:first-child {
  white-space: nowrap;
  font-size: 0.9rem;
  color: #374151;  /* matches time text color */
}
/* Make start, end, and minutes match the date styling */
.tc-table td.time,
.tc-table td.min {
  font-size: 0.9rem;
  color: #374151;
  white-space: nowrap;
}
/* Use a single row divider so lines align perfectly across all columns */
.tc-table th,
.tc-table td { border-bottom: 0; }

.tc-table tr { border-bottom: 1px solid #eef1f3; }

/* (Optional) ensure the photos grid doesn't add extra bottom space */
.tc-photos { align-items: start; }
/* On narrow screens, drop to 2 across */
@media (max-width:560px){
  .tc-photos{ grid-template-columns: repeat(2, 48px); gap: .3rem; }
  .tc-photos img{ width:48px; height:48px; }
}
/* Shop Log link (was "View timecard") */
.timecard-link { margin: .25rem 0 .75rem; }
.timecard-link .shoplog-link{
  display:inline-flex; align-items:center; gap:.35rem;
  color:#374151; text-decoration:none;
  border-bottom:1px dotted #cfd6db;
}
.timecard-link .shoplog-link:hover{ border-bottom-style:solid; }
.timecard-link .shoplog-link svg{
  width:16px; height:16px; stroke:currentColor; fill:none;
}
/* Inline meta row (Started • Status • Shop Log) */
.build-meta{
  color:#374151;
  font-size:.95rem;
  display:flex;
  align-items:center;
  gap:.4rem;
  margin:.25rem 0 .75rem;
  justify-content: center;   /* center the row */
  text-align: center;        /* keeps things centered if it wraps */
}

/* Shop Log link inline style */
.shoplog-link{
  display:inline-flex;
  align-items:center;
  gap:.25rem;
  text-decoration:none;
  border-bottom:1px dotted #cfd6db;
  color:#374151;
}
.shoplog-link:hover{ border-bottom-style:solid; }
.shoplog-link svg{ width:14px; height:14px; stroke:currentColor; fill:none; }
/* Match "Shop Log" link style for the back link */
.tc-back {
  text-align: center;
  margin-top: 1.5rem;
}
.tc-back .shoplog-link {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  color: #374151;
  text-decoration: none;
  border-bottom: 1px dotted #cfd6db;
  font-size: .95rem;
}
.tc-back .shoplog-link:hover {
  border-bottom-style: solid;
}
/* allow horizontal scroll when needed (desktop + wide phones) */
.tc-table-wrap { overflow-x:auto; }

/* ===== Timecard: Mobile ledger layout ===== */
@media (max-width: 720px){

  /* Table itself behaves like a normal block on mobile */
  .tc-table-wrap { overflow-x: visible; }
  .tc-table      { display:block; width:100%; border-collapse:collapse; }
  .tc-table tbody{ display:block; width:100%; }

  /* Kill any desktop widths so grid can control sizing */
  .tc-table td,
  .tc-table th { width:auto !important; max-width:none !important; }

  /* ----- Header: Date | Minutes | Activity ----- */
  .tc-table thead{
    display:block;                      /* break out of table layout */
    border-bottom:1px solid #eef1f3;
    padding:.25rem 0 .35rem;
  }
  .tc-table thead tr{
    display:grid;                       /* grid lives on the row */
    grid-template-columns: 7.5ch 5.5ch minmax(0,1fr);
    column-gap:.9rem;                   /* spacing between Date & Minutes */
    align-items:baseline;
  }
  .tc-table thead th{
    display:block;                      /* grid items, not table-cells */
    text-align:left;
    font-weight:600;
    font-size:.8rem;
    color:#6b7280;
    text-transform:uppercase;
    letter-spacing:.02em;
    padding:0;
    white-space:nowrap;
  }
  /* Hide headers for columns not shown on mobile */
  .tc-table thead tr th:nth-child(2),   /* Start */
  .tc-table thead tr th:nth-child(3),   /* End   */
  .tc-table thead tr th:nth-child(6) {  /* Pictures header not needed (thumbs sit below) */
    display:none;
  }

  /* ----- Body rows: Date | Minutes | Activity (+ thumbs below) ----- */
  .tc-table tr{
    display:grid;
    grid-template-columns: 7.5ch 5.5ch minmax(0,1fr);  /* Activity gets the rest */
    column-gap:.9rem;
    row-gap:.2rem;
    align-items:baseline;
    padding:.45rem 0 .55rem;
    border-bottom:1px solid #eef1f3;    /* ledger divider */
    background:transparent;
    border-radius:0;
    margin:0;
  }
  .tc-table td{
    display:block;
    border:0;
    padding:0;
    font-size:.95rem;
    min-width:0;                        /* let the grid track flex */
  }

  /* Hide Start/End cells on mobile */
  .tc-table td[data-label="Start"],
  .tc-table td[data-label="End"] { display:none; }

  /* Date & Minutes: compact, non-wrapping */
  .tc-table td:first-child,  /* Date */
  .tc-table td.min{
    white-space:nowrap;
    color:#374151;
    font-size:.9rem;
  }
  .tc-table td.min{ padding-right:.15rem; }

  /* Activity: use all remaining space; wrap naturally */
  .tc-table td.act{
    grid-column:3;
    overflow-wrap:anywhere;
    min-width:0;
  }

  /* Thumbnails line directly under Activity */
  .tc-table td[data-label="Pictures"]{
    grid-column:3 / -1;
    margin-top:.3rem;
    min-width:0;
  }

  /* Thumbs: 3 across (wrap to more rows as needed) */
  .tc-photos{
    display:grid !important;
    grid-template-columns:repeat(3,56px) !important;
    gap:.35rem;
    justify-content:start;
    align-items:start;
  }
  .tc-photos a{ display:block; }
  .tc-photos img{
    width:56px; height:56px; object-fit:cover; border-radius:4px;
    box-shadow:0 0 0 1px rgba(0,0,0,.06);
  }

  /* Very narrow phones */
  @media (max-width:420px){
    .tc-table thead tr{
      grid-template-columns: 7ch 5ch minmax(0,1fr);
      column-gap:.7rem;
    }
    .tc-table tr{
      grid-template-columns: 7ch 5ch minmax(0,1fr);
      column-gap:.7rem;
    }
    .tc-photos{
      grid-template-columns:repeat(3,48px) !important;
      gap:.3rem;
    }
    .tc-photos img{ width:48px; height:48px; }
  }
}

@media (min-width: 900px){
  .pm-section .grid.cards{
    padding-left: 24px;
    padding-right: 24px;
    gap: 24px;
  }
}


/* Card layout */
.grid.cards .card{
  display:flex;
  flex-direction:column;
  border-radius:10px;
  overflow:hidden;
  background:#fff;
  border:1px solid #e7e7e7;
}

/* Thumb: keep aspect & crop gracefully */
.grid.cards .thumb{
  aspect-ratio: 16 / 9;        /* adjust if you prefer 4/3 */
  overflow:hidden;
}

.grid.cards .thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* Meta padding */
.grid.cards .meta{
  padding:12px 14px;
}
.build-header {
  margin-bottom: 1.25rem;
  text-align: center;
}

.build-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: .35rem 0 1rem;
}

.build-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: .35rem .6rem;
  border: 1px solid #d0d7e3;
  border-radius: 6px;
  font-size: .9rem;
  color: #2a2d33;
  text-decoration: none;
}

.build-link:hover {
  background: #eef4ff;
  border-color: #9bb2dd;
}
/* Turn off pill styling just for build header links */
.build-header .build-links a {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}
.build-header .build-links a:hover {
    background: none !important;
    text-decoration: underline;
}
/* Match woodworking-build styling */
.build-header {
  text-align: center;
  margin-bottom: 1rem;
}

.build-header h1 {
  font-size: 1.65rem;
  margin: 0 0 .25rem;
}

.build-subnav {
  font-size: .95rem;
  margin: .25rem 0 .5rem;
  color: #333;
}

.build-subnav a.build-action {
  color: #333;
  text-decoration: none;
}

.build-subnav a.build-action svg {
  vertical-align: -2px;
  margin-right: 4px;
}

.build-subnav a.build-action:hover {
  text-decoration: underline;
}

.build-meta {
  margin: 0 0 1.25rem;
  color: #555;
  font-size: .9rem;
}
.build-action .icon {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
  margin-right: 4px;
}

/* Planemaking subnav pills */
.pm-subnav{
  display:flex;
  flex-wrap: wrap;
  justify-content:center;
  gap: .6rem;
  margin: 1.1rem 0 1.1rem;
}

.pm-subnav a{
  display:inline-block;
  padding: .18rem .65rem;      /* smaller */
  font-size: .92rem;           /* smaller */
  line-height: 1.2;
  border: 1px solid #cfd6db;
  border-radius: 999px;
  background: transparent;     /* NO gray */
  color: #333;
  text-decoration: none;
}

.pm-subnav a:hover{
  border-color: #9aa3ab;
}

.pm-subnav a.active,
.pm-subnav a[aria-current="page"]{
  background: #333;            /* active only */
  border-color: #333;
  color: #fff;
}

/* =========================================================
   Plane page (plane.php)
   ========================================================= */

.pm-plane-page .pm-plane-top{
  display:grid;
  grid-template-columns: 460px 1fr;
  gap: 22px;
  align-items: start;
  margin-top: 14px;
}

.pm-plane-page .pm-plane-hero-col{
  background: transparent;
  border: 0;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
}

/* Plane hero image (DO NOT use .pm-hero — that’s the planemaking header band) */
.pm-plane-page .pm-plane-hero{
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.pm-plane-page .pm-plane-hero img{
  display:block;
  width:100%;
  height: 300px;
  object-fit: contain;
  background: #fff;
  border-radius: 12px;
}

.pm-plane-page .pm-plane-side{
  display:flex;
  flex-direction: column;
  gap: 12px;
  justify-content: flex-start;
}

.pm-plane-page .pm-plane-head{
  text-align: center;
  margin: 0;
}
.pm-plane-page .pm-plane-head h1{
  margin: 0 0 8px;
}

.pm-plane-page .pm-plane-panel{
  background: transparent;
  border: 0;
  padding: 0;
}

/* Technical drawing title-block vibe */
.pm-plane-page .pm-stats{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}

.pm-plane-page .pm-statcard{
  background:#fff;
  border: 1px solid rgba(0,0,0,.25);
  border-radius: 0;
  padding: 0;
}

.pm-plane-page .pm-statcard h2{
  margin: 0;
  padding: 8px 10px;
  font-size: .85rem;
  letter-spacing: .10em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(0,0,0,.25);
}

.pm-plane-page .pm-statrow{
  display:grid;
  grid-template-columns: 1fr 1.2fr;
  border-bottom: 1px solid rgba(0,0,0,.18);
}
.pm-plane-page .pm-statrow:last-child{ border-bottom: 0; }

.pm-plane-page .pm-statkey,
.pm-plane-page .pm-statval{
  padding: 7px 10px;
  line-height: 1.15;
}

.pm-plane-page .pm-statkey{
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .78rem;
  border-right: 1px solid rgba(0,0,0,.18);
  white-space: nowrap;
}

.pm-plane-page .pm-statval{
  text-align: right;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

/* Gallery thumb grid */
.pm-plane-page .pm-thumbgrid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pm-plane-page .pm-thumbgrid a{
  display:block;
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  border-radius:14px;
  overflow:hidden;
}

.pm-plane-page .pm-thumbgrid img{
  width:100%;
  height: 140px;
  object-fit: cover;
  display:block;
}

/* =========================================================
   References & Notes — annotated bibliography layout
   ========================================================= */

/* Use our own list styling (no bullets/indents) */
.pm-biblio{
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1rem;                 /* ← breathing room between entries */
}

.pm-biblio .ref{
  margin: 0;
}

/* Citation line: hanging indent, readable measure */
.pm-biblio .ref-cite{
  margin: 0;
  padding-left: 1.6rem;
  text-indent: -1.6rem;
  line-height: 1.55;
}

/* Title styling (italic), link inherits text color */
.pm-biblio .ref-title{ font-style: italic; }

/* KILL visited purple + unify link color */
.pm-biblio a,
.pm-biblio a:visited{
  color: inherit;
  text-decoration: none;
}

/* Hover: subtle underline only */
.pm-biblio a:hover,
.pm-biblio a:focus{
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pm-biblio .ref-author{
  font-variant-caps: normal;
  letter-spacing: 0;
  font-style: normal;
  color: #333;        /* or #444 if you want it a touch softer */
}
.pm-biblio .ref-author{ color:#444; }
.pm-biblio .ref-cite{ color:#222; } /* keep overall line dark */

/* Notes block: offset + visual separation */
.pm-biblio .ref-notes{
  margin-top: .5rem;
  margin-left: 1.6rem;       /* align with citation body */
  padding-left: .9rem;
  border-left: 2px solid #e1e5e8;
  color: #555;
  font-size: .95em;
  line-height: 1.55;
}

/* Optional: make section headings breathe */
.pm-note-cat{
  margin: 1.8rem 0 .75rem;
}

/* Mobile */
@media (max-width: 900px){
  .pm-plane-page .pm-plane-top{ grid-template-columns: 1fr; }
  .pm-plane-page .pm-plane-hero img{ height: 320px; }
  .pm-plane-page .pm-stats{ grid-template-columns: 1fr; }
}