.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; }



.pm-wrap { max-width: 1100px; margin: 0 auto; }
.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;
}
.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; }
  }
}