/* =========================================================
   styles.css  (cleaned + mobile overflow fixes)
   Goal: prevent right-side cutoff on mobile, keep dashboard look
   ========================================================= */

/* -------------------------
   THEME TOKENS (colors, spacing)
   ------------------------- */
:root{
  /* Palette (lighter, dashboard-style) */
  --bg: #f8f8f8;
  --bg-2: #e0e3e7;

  --surface: #f1f2f3;
  --surface-2: #e8eeee;

  --ink: #0f1011;
  --muted: #a1b7d3;
  --muted-2: #3d525e;

  --primary: #171c24;
  --accent: #EE6C4D;
  --highlight: #171c24;

  --border:#6B85A6;
  --border-2:#6B85A6;

  --ok:#EE6C4D;
  --warn:#cec8c3;
  --danger:#B85C5C;

  --radius:14px;
  --radius-lg:18px;

  --shadow: 0 10px 24px rgba(17, 100, 102, 0.10);
  --shadow-soft: 0 6px 16px rgba(44, 53, 49, 0.08);

  --pad:18px;
  --maxw:2500px;
}

/* -------------------------
   GLOBAL BASE + SAFETY
   ------------------------- */
*{ box-sizing:border-box; }

html,body{
  margin:0;
  padding:0;
  background: linear-gradient(180deg, var(--bg-2), var(--bg) 24%);
  color:var(--ink);
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;

  /* Prevent random 1–2px horizontal scrollbars */
  width:100%;
}

a{ color:inherit; text-decoration:none; }

/* Only images get global shrink-to-fit safety (NOT svg) */
img{
  max-width:100%;
  height:auto;
}

/* Common overflow “fixers” (prevents mobile cutoff) */
.main,
.content,
.card,
.row,
.kpis{
  min-width:0; /* lets grid/flex children shrink instead of overflow */
}

/* -------------------------
   APP SHELL LAYOUT
   ------------------------- */
.app{
  display:grid;
  grid-template-rows: auto 1fr; /* top menu + content */
  grid-template-columns: 1fr;
  min-height:100dvh;
  width:100%;
}

/* -------------------------
   SIDEBAR
   ------------------------- */
.sidebar{
  position: sticky;
  top: 0;
  z-index: 30;
  background: linear-gradient(180deg, #ffffff, color-mix(in oklab,var(--bg-2) 45%, white));
  border-bottom:1px solid var(--border);
  display:flex;
  align-items:center;
  padding:10px 16px;
  gap:14px;
  width:100%;
}

.brand{
  display:flex;
  align-items:center;
  text-align:left;
  gap:10px;
  margin:0;
}

.logo{
  width:44px;
  height:44px;
  border-radius:50%;
  overflow:hidden;
  border:2px solid var(--border);
  box-shadow: var(--shadow-soft);
  background: transparent;
}
.logo img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
  display:block;
}

.brand-text{
  font-weight:900;
  letter-spacing:.2px;
  line-height:1.1;
}
.brand-text small{
  display:block;
  font-weight:800;
  color:var(--muted-2);
  letter-spacing:.02em;
  margin-top:4px;
}

.menu{
  display:flex;
  flex-direction:row;
  gap:8px;
  flex:1;
  flex-wrap:wrap;
  overflow:visible;
  white-space:nowrap;
  padding:2px 0;
}
.menu::-webkit-scrollbar{ display:none; }
.menu .item{
  padding:8px 10px;
  border-radius:10px;
  color:var(--muted);
  font-weight:700;
  border:1px solid transparent;
  flex:0 0 auto;
}
.menu .item:hover{
  background:var(--surface-2);
  color:var(--ink);
  border-color: var(--border);
}
.menu .item.active{
  background: color-mix(in oklab,var(--primary) 10%, white);
  color:var(--ink);
  border-color: color-mix(in oklab,var(--primary) 25%, var(--border));
}

.divider{
  width:1px;
  height:22px;
  background:var(--border);
  margin:0 6px;
  flex:0 0 auto;
}
.sidebar-footer{
  margin-left:auto;
  color:var(--muted-2);
  font-size:12px;
  padding:4px 8px;
  white-space:nowrap;
}

/* -------------------------
   MAIN / TOPBAR
   ------------------------- */
.main{
  display:flex;
  flex-direction:column;
}

.topbar{
  position:sticky;
  top:0;
  z-index:20;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  padding:12px 16px;
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  backdrop-filter:saturate(140%) blur(10px);
  border-bottom:1px solid var(--border);
}
/* Topbar layout helpers */
.topbar .brand{
  flex:0 0 auto;
  margin:0;
}
.topbar .logo{
  width:66px;
  height:66px;
  position: relative;
  z-index: 40;
  transform-origin: left center;
  transition: transform .2s ease, box-shadow .2s ease;
}
.topbar .logo img{
  image-rendering: auto;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
}
.topbar .logo:hover{
  animation: profile-pop .34s cubic-bezier(.22,1,.36,1) forwards;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}
.topbar .logo:not(:hover){
  animation: profile-reset .24s ease forwards;
}

@keyframes profile-pop{
  0%   { transform: scale(1) rotate(0deg); }
  65%  { transform: scale(2.55) rotate(-2deg); }
  100% { transform: scale(2.4) rotate(-1deg); }
}

@keyframes profile-reset{
  0%   { transform: scale(2.4) rotate(-1deg); }
  100% { transform: scale(1) rotate(0deg); }
}
.topbar .menu.topbar-menu{
  flex:1 1 420px;
  justify-content:center;
}
.topbar .user{
  flex:0 0 auto;
}

.search input{
  width:min(560px, 52vw);
  background: var(--surface);
  border:1px solid var(--border);
  border-radius:999px;
  padding:10px 14px;
  color:var(--ink);
  box-shadow: 0 2px 10px rgba(44,53,49,0.05);
}
.search input::placeholder{ color: var(--muted-2); }

.user{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:800;
  color:var(--ink);
  white-space:nowrap;
}
.user .status{
  width:10px;
  height:10px;
  border-radius:999px;
  background: var(--ok);
  box-shadow:0 0 0 4px color-mix(in oklab,var(--ok) 18%, transparent);
}
.user .name{ color: var(--muted); }

/* Page content wrapper */
.content{
  padding:22px;
  width:100%;
  max-width:min(var(--maxw), 100%);
  margin: 0 auto;
}

/* -------------------------
   KPI CARDS
   ------------------------- */
.kpis{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:14px;
}

.kpi{
  background: color-mix(in oklab, var(--surface) 70%, transparent);
  border:1px solid var(--border);
  border-radius: var(--radius);
  padding:16px;
  padding-right: 62px;
  position: relative;
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(120, 160, 255, 0.25),
    0 0 18px rgba(120, 160, 255, 0.35);
}
.kpi-icon{
  position:absolute;
  bottom:8px;
  right:8px;
  width:36px;
  height:36px;
  color: var(--accent);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index: 2;
}
.kpi-icon svg,
.kpi-icon img{
  width:22px;
  height:22px;
  display:block;
}

.kpi:hover{
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(120, 160, 255, 0.6),
    0 0 28px rgba(120, 160, 255, 0.7),
    0 0 48px rgba(120, 160, 255, 0.45);
}

.kpi-title{
  color: var(--muted-2);
  font-size:24px;
  text-transform:uppercase;
  letter-spacing:.14em;
  font-weight:800;
  margin-bottom:6px;
}

.kpi-value{
  font-size:15px;
  font-weight:600;
  letter-spacing:-.02em;
}
.kpi-value .link{
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: color-mix(in oklab,var(--primary) 30%, transparent);
  text-underline-offset: 4px;
}

.kpi-trend{
  margin-top:6px;
  font-weight:800;
  color: var(--muted);
}
.kpi-trend.up{ color: var(--primary); }
.kpi-trend.down{ color: var(--danger); }
.kpi-trend.stable{ color: var(--muted-2); }


/* -------------------------
   ROWS + CARDS
   ------------------------- */
.row{
  display:grid;
  grid-template-columns: 2fr 1fr;
  gap:14px;
  margin-top:18px;
}

.card{
  background: var(--surface);
  border:1px solid var(--border);
  border-radius: 6px;
  padding:16px;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(120, 160, 255, 0.2),
    0 0 22px rgba(120, 160, 255, 0.25);
}

.card:hover{
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(120, 160, 255, 0.6),
    0 0 28px rgba(120, 160, 255, 0.7),
    0 0 48px rgba(120, 160, 255, 0.45);
}

.card-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;

}
.card h3{
  margin:0;
  font-size:16px;
  letter-spacing:.2px;
}
.legend{ display:flex; gap:8px; flex-wrap:wrap; }

/* Pills (buttons/links) */
.pill{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  width: 90px;
  height: 20px;
  padding: 0;

  border-radius: 6px;
  background: #EE6C4D;
  border: 1px solid #d85c40;
  color: #0e0d0d;

  font-weight: 600;
  font-size: 11px;
  letter-spacing: .02em;
  cursor: pointer;
  user-select: none;
  transition: transform .08s ease, box-shadow .08s ease;
}
.pill:hover{
  transform: translateY(-1px);
  box-shadow:
    0 4px 0 #c74f35,
    0 7px 14px rgba(0,0,0,.25);
}
.pill:active{
  transform: translateY(1px);
  box-shadow:
    0 2px 0 #c74f35,
    0 4px 8px rgba(0,0,0,.2);
}
.pill img{
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.pill-stack{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.pill.alt{
  background: color-mix(in oklab,var(--accent) 18%, white);
  border-color: color-mix(in oklab,var(--accent) 28%, var(--border));
  color: var(--ink);
}

/* -------------------------
   CHARTS + BARS
   ------------------------- */
.chart > svg{
  width:100%;
  height:auto;
  background: linear-gradient(180deg, color-mix(in oklab, var(--bg-2) 35%, transparent), transparent);
  border-radius: 14px;
}
.chart .grid path{
  stroke: color-mix(in oklab, var(--border-2) 70%, transparent);
  stroke-width:1;
  opacity:.9;
}
.chart .series{ stroke-width:2; }

.bars{
  display:grid;
  grid-template-columns:repeat(14, minmax(0, 1fr));
  gap:8px;
  align-items:end;
  height:180px;
}
.bars div{
  height:calc(var(--v) - 6%);
  background: linear-gradient(180deg, color-mix(in oklab,var(--primary) 70%, white), transparent);
  border:1px solid var(--border);
  border-radius:8px;
}

/* -------------------------
   TABLES (mobile overflow fix is here)
   ------------------------- */
.table-wrap{
  overflow:auto;
  max-width:100%;
  -webkit-overflow-scrolling:touch;
}

.table{
  width:100%;
  border-collapse:separate;
  border-spacing:0 10px;
}

.table th{
  color: var(--muted-2);
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.14em;
  text-align:left;
  padding:8px 10px;

  /* Prevent long headers from pushing layout */
  overflow-wrap:anywhere;
}

.table td{
  background: var(--surface);
  border:1px solid var(--border);
  padding:12px 10px;
  vertical-align: top;

  /* Prevent long words/URLs from forcing overflow on mobile */
  overflow-wrap:anywhere;
  word-break:break-word;
}

.table tr:hover td{
  background: #dde3e7;
  border-color: color-mix(in oklab, var(--accent) 25%, var(--border));
}
.table tr td:first-child{
  border-top-left-radius:2px;
  border-bottom-left-radius:2px;
}
.table tr td:last-child{
  border-top-right-radius:2px;
  border-bottom-right-radius:2px;
}

/* Tool rows (icons + text) */
.tool-row{
  display:flex;
  align-items:center;
  gap:8px;
  line-height:1.2;
  margin: 6px 0;
  flex-wrap:wrap; /* important on small screens */
}
.tool-icon{
  width:22px;
  height:22px;
  flex:0 0 22px;
  display:block;
  object-fit:contain;
}

/* Status dots */
.status-dot{
  display:inline-block;
  width:10px;height:10px;
  border-radius:999px;
  margin-right:6px;
  vertical-align:middle;
}
.status-dot.ok{ background: var(--ok); }
.status-dot.warn{ background: var(--warn); }
.status-dot.danger{ background: var(--danger); }

/* -------------------------
   SECTION LABELS
   ------------------------- */
.section-label{
  display:flex;
  align-items:center;
  gap:10px;
  margin: 18px 0 10px;
  width: 100%;
}
.section-label .dot{
  width:10px;
  height:10px;
  border-radius:999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 18%, transparent);
}
.section-label .text{
  font-weight: 900;
  color: var(--muted);
}
.section-rule{
  border: 0;
  height: 1px;
  background: var(--border);
  margin: 0 0 14px;
  width: 100%;
}

/* Filters + chips */
.filters{ display:flex; gap:8px; flex-wrap:wrap; }
.chip{
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background: var(--surface-2);
  color: var(--ink);
  font-weight:800;
  font-size:12px;
}
.chip:hover{
  border-color: color-mix(in oklab,var(--primary) 30%, var(--border));
}

/* Tools row (side-by-side icons) */
.tools-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:8px;
}
.tool-pill{
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:8px 10px;
  border-radius:10px;
  background: transparent;
  border:0;
  font-weight:800;
  font-size:12px;
  color: var(--ink);
}
.tool-pill img{
  width:22px;
  height:22px;
  flex-shrink:0;
}

/* -------------------------
   DONUT + LEGEND
   ------------------------- */


/* -------------------------
   PROJECTS BY TOOL (vertical bars)
   ------------------------- */

.hbars{
  display:grid;
  grid-template-columns: repeat(9, 1fr);
  align-items:end;
  gap:14px;
  height:160px;
  margin-top:10px;
}

.hbar{
  --w:50;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-end;
  gap:6px;
  height:100%;
}

.hbar-track{
  width:20px;
  height:100%;
  border-radius:8px;
  border:1px solid var(--border);
  background: color-mix(in oklab, var(--bg-2) 55%, white);
  display:flex;
  align-items:flex-end;
  overflow:hidden;
}

.hbar-fill{
  width:100%;
  height: calc(var(--w) * 1%);
}

/* numbers on LEFT */
.hbar-val{
  font-size:12px;
  font-weight:900;
  color:var(--muted-2);
  order:-1;
}

/* tool names on bottom */
.hbar-label{
  font-size:11px;
  font-weight:800;
  text-align:center;
  white-space:nowrap;
}

/* same donut palette */
.hbar:nth-child(1) .hbar-fill{ background:#EE6C4D; }
.hbar:nth-child(2) .hbar-fill{ background:#171c24; }
.hbar:nth-child(3) .hbar-fill{ background:#6B85A6; }
.hbar:nth-child(4) .hbar-fill{ background:#9fb3c8; }
.hbar:nth-child(5) .hbar-fill{ background:#d7dee7; }
.hbar:nth-child(6) .hbar-fill{ background:#EE6C4D; }
.hbar:nth-child(7) .hbar-fill{ background:#171c24; }
.hbar:nth-child(8) .hbar-fill{ background:#6B85A6; }
.hbar:nth-child(9) .hbar-fill{ background:#9fb3c8; }

@media (max-width:900px){
  .hbars{
    grid-template-columns: repeat(4,1fr);
    height:140px;
  }
}


.hbars{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.hbar{
  --w: 50; /* percent (0-100) */
  display:grid;
  grid-template-columns: 120px 1fr 28px;
  align-items:center;
  gap:10px;
}

.hbar-label{
  font-weight:900;
  color: var(--ink);
  font-size:12px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.hbar-val{
  text-align:right;
  color: var(--muted-2);
  font-weight:900;
  font-size:12px;
}

.hbar-track{
  height:12px;
  border-radius:999px;
  border:1px solid var(--border);
  background: color-mix(in oklab, var(--bg-2) 55%, white);
  overflow:hidden;
}

.hbar-fill{
  height:100%;
  width: calc(var(--w) * 1%);
  border-radius:999px;
}

/* Use the same palette as the donut chart */
.hbar:nth-child(1) .hbar-fill{ background:#EE6C4D; } /* s1 */
.hbar:nth-child(2) .hbar-fill{ background:#171c24; } /* s2 */
.hbar:nth-child(3) .hbar-fill{ background:#6B85A6; } /* s3 */
.hbar:nth-child(4) .hbar-fill{ background:#9fb3c8; } /* s4 */
.hbar:nth-child(5) .hbar-fill{ background:#d7dee7; } /* s5 */
.hbar:nth-child(6) .hbar-fill{ background:#EE6C4D; }
.hbar:nth-child(7) .hbar-fill{ background:#171c24; }
.hbar:nth-child(8) .hbar-fill{ background:#6B85A6; }
.hbar:nth-child(9) .hbar-fill{ background:#9fb3c8; }

/* Mobile: stack rows and keep bars readable */
@media (max-width: 900px){
  .hbar{ grid-template-columns: 110px 1fr 26px; }
}
/* -------------------------
   RESUME EMBED
   ------------------------- */
.resume-embed{
  width:100%;
  height:80vh;          /* desktop */
  border-radius:12px;
  overflow:hidden;
  border:1px solid var(--border);
}
.resume-embed iframe{
  width:100%;
  height:100%;
  border:0;
}

/* =========================================================
   RESPONSIVE BREAKPOINTS
   ========================================================= */

/* Medium screens */
@media (max-width: 1100px){
  .app{ grid-template-columns: 1fr; }
  .brand-text{ display:none; }

  .menu .item{
    padding:10px 10px;
    text-align:center;
    font-size:12px;
  }

  .table th{ font-size:10px; padding:8px 8px; }
  .table td{ padding:10px 8px; }
}

/* Tablets / small laptops */
@media (max-width: 900px){
  .content{ padding:18px; }

  /* Keep 4 KPI cards side-by-side (smaller) */
  .kpis{ gap:10px; }
  .kpi{ padding:12px; border-radius:12px; }
  .kpi{ padding-right: 52px; }
  .kpi-icon{
    width:30px;
    height:30px;
    bottom:8px;
    right:8px;
  }
  .kpi-icon svg,
  .kpi-icon img{
    width:18px;
    height:18px;
  }

  .kpi-title{ font-size:16px; letter-spacing:.12em; margin-bottom:4px; }
  .kpi-value{ font-size:10px; line-height:1.2; }
  .kpi-trend{ font-size:8px; margin-top:4px; }

  .row{ grid-template-columns: 1fr; }

  .table th{ font-size:10px; letter-spacing:.12em; padding:6px 7px; }
  .table td{ padding:9px 7px; font-size:13px; line-height:1.25; }

  .tool-row{ gap:6px; margin:4px 0; }
  .tool-icon{ width:18px; height:18px; flex-basis:18px; }

  .pill{ width:78px; height:18px; font-size:10px; }
  .pill img{ width:14px; height:14px; }

  .resume-embed{ height:65vh; }
}

/* Phones */
@media (max-width: 600px){
  /* Keep topbar layout */
  .app{ grid-template-columns: 1fr; }

  .sidebar{
    position:sticky;
    top:0;
    z-index:30;

    flex-direction:row;
    align-items:center;
    gap:10px;

    padding:10px 10px;
    border-right:none;
    border-bottom:1px solid var(--border);
  }

  .brand{
    margin:0;
    flex-direction:row;
    align-items:center;
    gap:10px;
  }
  .logo{ width:44px; height:44px; }

  .menu{
    flex:1;
    flex-direction:row;
    gap:8px;
    overflow-x:auto;
    overflow-y:hidden;
    padding:2px 0;
    white-space:nowrap;
    scrollbar-width:none;
  }
  .menu::-webkit-scrollbar{ display:none; }

  .menu .item{
    flex:0 0 auto;
    padding:8px 10px;
    font-size:13px;
    border-radius:10px;
  }

  .divider, .sidebar-footer{ display:none; }

  .content{ padding:14px; }

  /* Extra compact KPIs */
  .kpis{ gap:8px; }
  .kpi{ padding:10px; border-radius:10px; }
  .kpi{ padding-right: 44px; }
  .kpi-icon{
    width:24px;
    height:24px;
    bottom:8px;
    right:8px;
  }
  .kpi-icon svg,
  .kpi-icon img{
    width:14px;
    height:14px;
  }
  .kpi-title{ font-size:12px; letter-spacing:.10em; margin-bottom:3px; }
  .kpi-value{ font-size: 9px; line-height:1.15; }
  .kpi-trend{ font-size:9px; margin-top:3px; }

  /* Table: NO forced min-width (prevents “cut off” on mobile) */
  .table{
    border-spacing:0 8px;
    table-layout:fixed;   /* distributes columns; allows wrapping */
  }
  .table th{ font-size:9px; letter-spacing:.10em; padding:6px 6px; }
  .table td{ padding:8px 6px; font-size:10px; line-height:1.2; }

  .tool-icon{ width:16px; height:16px; flex-basis:16px; }
  .tool-row{ gap:6px; margin:3px 0; }

  .pill{ width:72px; height:17px; font-size:9px; border-radius:6px; }
  .pill img{ width:12px; height:12px; }

  .resume-embed{ height:55vh; }
}

/* Ultra-small phones */
@media (max-width: 420px){
  .topbar{
    gap:8px;
    padding:10px 10px;
  }
  .topbar .brand{
    flex:1 1 100%;
    justify-content:center;
    text-align:center;
  }
  .topbar .menu.topbar-menu{
    flex:1 1 100%;
    justify-content:flex-start;
  }
  .topbar .user{
    flex:1 1 100%;
    justify-content:center;
  }

  .menu{
    justify-content:flex-start;
    flex-wrap:nowrap;
    overflow-x:auto;
    white-space:nowrap;
  }
  .menu::-webkit-scrollbar{ display:none; }
  .menu .item{
    padding:6px 7px;
    font-size:10px;
  }

  .kpis{ gap:6px; }
  .kpi{ padding:8px; }
  .kpi{ padding-right: 38px; }
  .kpi-icon{
    width:20px;
    height:20px;
    bottom:7px;
    right:7px;
  }
  .kpi-icon svg,
  .kpi-icon img{
    width:12px;
    height:12px;
  }
  .kpi-title{ font-size:10px; letter-spacing:.06em; }
  .kpi-value{
    font-size:7px;
    line-height:1.2;
    white-space:normal;
    overflow-wrap:anywhere;
  }
  .kpi-trend{ font-size:9px; }

  .table th{ font-size:8px; padding:5px 5px; }
  .table td{ font-size:11px; padding:7px 5px; }

  .pill{ width:66px; height:16px; font-size:8px; }
  .pill img{ width:11px; height:11px; }

  .resume-embed{ height:48vh; }
}

@media (max-width: 400px){
  .kpi-title{
    font-size:9px;
    letter-spacing:.05em;
  }
  .kpi-value{
    font-size:6px;
    line-height:1.15;
  }
  .kpi-trend{
    font-size:8px;
  }
}

/* Ultra small: prevent label overflow on project pages */
@media (max-width: 380px){
  .pill{
    height:16px;
    font-size:8px;
    padding:0 6px;
  }
  .pill img{
    width:10px;
    height:10px;
  }
  .cta-row{ gap:6px; flex-wrap:wrap; }
  .btn{
    font-size:9px !important;
    padding:3px 6px !important;
    border-radius:8px !important;
  }
  .pipe-step{
    padding:6px 8px !important;
    gap:6px !important;
  }
  .pipe-step img{
    width:12px !important;
    height:12px !important;
  }
  .pipe-step strong{
    font-size:9px !important;
  }
  .pipe-step span{
    font-size:8px !important;
  }
}

/* 360px tweaks: smaller titles + bar chart scale */
@media (max-width: 360px){
  .card h3{
    font-size:9px;
  }
}


/* =========================================================
   PROJECT CARDS (Dashboard style)
   Replaces the Projects <table> with clickable cards.
   ========================================================= */
.projects-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.project-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  min-width: 0;
  transition: transform .08s ease, box-shadow .08s ease, border-color .08s ease;
}

.project-card:hover{
  transform: translateY(-1px);
  border-color: color-mix(in oklab, var(--accent) 30%, var(--border));
  box-shadow:
    0 10px 24px rgba(17, 100, 102, 0.12),
    0 0 0 1px rgba(120, 160, 255, 0.6),
    0 0 28px rgba(120, 160, 255, 0.7),
    0 0 48px rgba(120, 160, 255, 0.45);
}

.project-card:focus{
  outline: 3px solid color-mix(in oklab, var(--accent) 35%, transparent);
  outline-offset: 2px;
}

/* Header row: title + status */
.project-card__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.project-card__title{
  margin:0;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .2px;
}

.project-card__status{
  display:flex;
  align-items:center;
  gap: 8px;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-weight: 900;
  font-size: 11px;
  color: var(--muted-2);
}

.project-card__desc{
  margin: 0 0 12px 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap:anywhere;
}

/* Two-column meta area: Tools | Links */
.project-card__meta{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
  min-width: 0;
}

.project-card__block{
  min-width: 0;
}

.project-card__label{
  font-size: 11px;
  font-weight: 900;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 8px;
}

/* Projects section card: no background */
.projects-card{
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  border-radius: var(--radius-lg);
  padding: 14px;
}

/* =========================================================
   PROJECT CARDS: Tools Used grid (2 columns)
   ========================================================= */
.project-card .tools-list{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px; /* row gap, column gap */
}

/* Each tool becomes a compact chip inside cards */
.project-card .tools-list .tool-row{
  /* Keep 2-column tools grid clean at narrow widths */
  margin: 0;
  padding: 0;

  background: transparent;
  border: none;
  border-radius: 0;

  /* Key fix: icon column + label column */
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  column-gap: 8px;

  /* Allow labels to wrap without pushing the icon around */
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}



/* Mobile: 1 column for tools (keeps it readable) */
/* Keep tools compact */
.tools-list .tool-row{
  margin: 6px 0;
}

/* In cards, links should wrap horizontally (not a tall column) */
.project-card .pill-stack{
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
}

/* Make pills less cramped inside cards */
.project-card .pill{
  width:auto;
  height:28px;
  padding:0 12px;
  font-size:11px;
}
.project-card .pill img{
  width:14px;
  height:14px;
}

/* Responsive: stack cards and stack meta blocks on small screens */
@media (max-width: 900px){
  .projects-grid{
    grid-template-columns: 1fr;
  }
  .project-card__meta{
    grid-template-columns: 1fr; /* Tools then Links */
  }
}

/* Phones: keep cards clean + readable */
@media (max-width: 600px){
  .project-card{
    padding: 12px;
  }
  .project-card__title{
    font-size: 14px;
  }
  .project-card__desc{
    font-size: 12px;
  }
  .project-card__label{
    font-size: 10px;
  }
}

/* =========================================================
   RETAIL PAGE: Reproduce table (tight rows, no floating gaps)
   Add class="table reproduce-table" on the retail reproduce table.
   ========================================================= */
.table.reproduce-table{
  border-collapse: collapse;        /* remove row gaps from border-spacing style */
  border-spacing: 0;               /* override .table border-spacing */
  table-layout: fixed;
}

.table.reproduce-table th,
.table.reproduce-table td{
  background: transparent;          /* remove per-cell card background */
  border: 1px solid var(--border);
  padding: 10px 10px;
}

.table.reproduce-table thead th{
  background: var(--surface-2);
}

.table.reproduce-table tbody tr:hover td{
  background: color-mix(in oklab, var(--accent) 10%, var(--surface));
}

/* Column sizing: Step small, Output compact */
.table.reproduce-table th:first-child,
.table.reproduce-table td:first-child{
  width: 72px;
  text-align: center;
  font-weight: 900;
}

.table.reproduce-table th:last-child,
.table.reproduce-table td:last-child{
  width: 170px;
}

/* On narrow screens, keep it readable */
@media (max-width: 600px){
  .table.reproduce-table th:last-child,
  .table.reproduce-table td:last-child{
    width: 140px;
  }
}



