
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=Inter:wght@400;500;600;700;800&family=Space+Mono:wght@400;700&display=swap');

:root{
  --deep:      #06294f;
  --blue-1:    #0b3c74;
  --blue-2:    #12558f;
  --blue-3:    #1c74b8;
  --sky:       #3fb6ea;
  --sky-pale:  #eaf6fd;
  --page-bg:   #eef4f9;
  --ink:       #0d2338;
  --ink-soft:  #5b7086;
  --line:      #dbe7ef;
  --card:      #ffffff;
  --peach:     #fbe3b8;
  --peach-line:#e3ac52;
  --amber-text:#8a5300;
  --red-bg:    #fdecec;
  --red-line:  #f0b7b7;
  --red-text:  #a12626;
  --info-bg:   #eaf3fb;
  --info-line: #b9d8ef;
  --info-text: #1c4d78;
}

*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{
  font-family:'Inter',sans-serif;
  background:var(--page-bg);
  color:var(--ink);
  min-height:100vh;
  padding-bottom:44px;
}
.page-container{max-width:980px; margin:0 auto; padding:0 28px;}

/* ============ HEADER ============ */
header{
  position:relative;
  background:
    radial-gradient(700px 260px at 88% 0%, #1f7fb8 0%, transparent 60%),
    linear-gradient(120deg, var(--deep) 0%, var(--blue-1) 45%, var(--blue-2) 100%);
  padding:30px 40px 22px 40px;
  overflow:hidden;
  border-bottom:4px solid var(--sky);
}
.hex-pattern{
  position:absolute; inset:0; opacity:.09; z-index:0;
  background-image:
    repeating-linear-gradient(120deg, transparent 0 38px, #ffffff 38px 39px),
    repeating-linear-gradient(60deg, transparent 0 38px, #ffffff 38px 39px);
  background-size: 76px 66px;
}
.header-inner{
  position:relative; z-index:2;
  display:flex; align-items:flex-start; justify-content:space-between; gap:24px;
}
.title-block .eyebrow{
  font-family:'Space Mono',monospace;
  letter-spacing:.24em; text-transform:uppercase;
  font-size:11px; color:#9fd6f2; font-weight:700; margin:0 0 8px 0;
}
.title-block h1{
  font-family:'Oswald',sans-serif; font-weight:600;
  font-size:clamp(24px,3vw,36px); line-height:1.05; letter-spacing:.005em;
  color:#ffffff; margin:0 0 8px 0;
}
.title-block .sub{
  color:#cfe7f6; font-size:14px; font-weight:500; max-width:560px; line-height:1.5;
}
.logo-wrap{
  flex-shrink:0;
  width:min(190px, 24vw);
  display:flex; align-items:center; justify-content:center;
  padding-top:2px;
}
.logo-wrap img{width:100%; height:auto; display:block; filter:drop-shadow(0 3px 10px rgba(0,0,0,.25));}

/* ============ TRUCK LANE ============ */
.truck-lane{
  position:relative; z-index:2;
  margin-top:20px;
  height:56px;
  display:flex; align-items:center;
}
.truck-lane .dotted{
  position:absolute; left:36px; right:16px; top:50%; height:0; transform:translateY(-50%);
  border-top:2px dotted #7bbfe0;
}
.milestone{
  position:absolute; top:50%; width:8px; height:8px; border-radius:50%;
  background:#bfe3f6; transform:translate(-50%,-50%); z-index:2;
}
.truck-anim{
  position:absolute; top:50%; left:-70px; transform:translateY(-62%);
  animation:driveforward 8s linear infinite;
  filter:drop-shadow(0 2px 4px rgba(0,0,0,.35));
  z-index:3;
}
@keyframes driveforward{
  0%{ left:-70px; }
  100%{ left:100%; }
}

/* floating data-as-of card */
.meta-float{
  margin:-20px auto 0 auto; padding:0; display:flex; justify-content:flex-end;
  position:relative; z-index:5;
}
.meta-card{
  background:#fff; border:1px solid var(--line); border-radius:10px;
  padding:9px 16px; font-family:'Space Mono',monospace; font-size:11.5px; color:var(--ink-soft);
  box-shadow:0 4px 14px rgba(10,60,100,.10); text-align:right; line-height:1.6;
}
.meta-card b{color:var(--blue-1); font-weight:700;}

/* ============ STATS ============ */
.stats{
  display:grid; grid-template-columns:repeat(4,1fr); gap:16px;
  padding:20px 0 6px 0;
}
.stat-card{
  background:var(--card); border:1px solid var(--line); border-left:4px solid var(--blue-3);
  border-radius:8px; padding:16px 18px; box-shadow:0 2px 8px rgba(10,60,100,.05);
}
.stat-card.warn{border-left-color:#e08a1e; background:#fffaf2;}
.stat-card .value{
  font-family:'Oswald',sans-serif; font-weight:700; font-size:28px; color:var(--deep); line-height:1;
}
.stat-card.warn .value{color:#b8620a;}
.stat-card .label{
  font-size:12px; color:var(--ink-soft); margin-top:6px; font-weight:600;
}
.stat-card .foot{font-size:11px; color:#8fa3b6; margin-top:3px;}

/* ============ ALERT / INFO BOXES ============ */
.callouts{padding:18px 0 0 0; display:flex; flex-direction:column; gap:12px;}
.callout{
  border-radius:9px; padding:12px 16px; font-size:13px; line-height:1.55;
  display:flex; gap:10px; align-items:flex-start;
}
.callout .ic{font-size:15px; line-height:1.4;}
.callout.alert{background:var(--red-bg); border:1px solid var(--red-line); color:var(--red-text);}
.callout.info{background:var(--info-bg); border:1px solid var(--info-line); color:var(--info-text);}
.callout b{font-weight:700;}

/* ============ SECTION TITLES ============ */
.section-title{
  font-family:'Oswald',sans-serif; font-weight:600;
  font-size:16px; color:var(--deep);
  margin:28px 0 12px 0;
}

/* ============ PRODUCT SUMMARY TABLE ============ */
.prod-table-wrap{
  margin:0; background:var(--card); border:1px solid var(--line); border-radius:10px; overflow:hidden;
  box-shadow:0 2px 8px rgba(10,60,100,.05);
}
table.prod-table{width:100%; border-collapse:collapse;}
table.prod-table thead th{
  background:#f3f7fa; text-align:left; font-family:'Space Mono',monospace; font-size:10.5px;
  letter-spacing:.06em; text-transform:uppercase; color:var(--ink-soft); font-weight:700;
  padding:11px 16px; border-bottom:1px solid var(--line);
}
table.prod-table td{
  padding:12px 16px; font-size:13.5px; border-bottom:1px solid var(--line); color:var(--ink);
}
table.prod-table tr:last-child td{border-bottom:none;}
table.prod-table td.num{color:var(--blue-1); font-weight:700; font-family:'Space Mono',monospace;}
.prod-badge{
  display:inline-block; padding:4px 11px; border-radius:6px; color:#fff; font-weight:700;
  font-size:11.5px; font-family:'Space Mono',monospace; letter-spacing:.02em;
}

/* ============ TIMELINE ============ */
.timeline{ padding:0; margin-top:6px;}
.month-block{margin-bottom:20px; border-radius:10px; overflow:hidden; border:1px solid var(--line);
  box-shadow:0 2px 8px rgba(10,60,100,.05);}
.month-head{
  display:flex; align-items:center; gap:12px;
  background:var(--deep);
  color:#fff; padding:10px 18px;
  font-family:'Space Mono',monospace; font-size:13px; font-weight:700; letter-spacing:.08em;
  text-transform:uppercase;
  cursor:pointer; user-select:none;
}
.month-head .chevron{
  font-family:'Inter',sans-serif; font-size:12px; transition:transform .18s ease;
  display:inline-block;
}
.month-block.collapsed .month-head .chevron{transform:rotate(-90deg);}
.month-head .count{
  margin-left:auto; font-weight:400; font-size:11px;
  background:#ffffff1f; padding:3px 10px; border-radius:999px; text-transform:none; letter-spacing:0;
}
.month-block .month-body{
  display:grid; grid-template-rows:1fr; transition:grid-template-rows .22s ease;
}
.month-block.collapsed .month-body{grid-template-rows:0fr;}
.month-body-inner{overflow:hidden;}

.timeline-controls{
  display:flex; justify-content:flex-end; gap:14px; margin:-6px 0 10px 0;
}
.timeline-controls button{
  background:none; border:none; padding:0; font-family:'Space Mono',monospace; font-size:11px;
  color:var(--blue-2); cursor:pointer; text-decoration:underline; text-underline-offset:2px;
}
.timeline-controls button:hover{color:var(--deep);}

.day-group{
  display:flex; align-items:stretch;
  background:var(--card);
  border-top:1px solid var(--line);
}
.month-block .day-group:first-of-type{border-top:none;}
.day-group.due-soon{ background:var(--peach); }

.day-date{
  width:110px; flex-shrink:0;
  padding:14px 14px;
  display:flex; flex-direction:column; justify-content:flex-start;
  border-right:1px solid var(--line);
}
.day-group.due-soon .day-date{border-right-color:var(--peach-line);}
.day-date .dnum{font-family:'Oswald',sans-serif; font-weight:700; font-size:16px; color:var(--blue-1);}
.day-group.due-soon .day-date .dnum{color:var(--amber-text);}
.day-date .dwk{font-size:10.5px; color:var(--ink-soft); margin-top:0;}
.day-date .dchip{
  margin-top:7px; align-self:flex-start;
  font-family:'Space Mono',monospace; font-size:9.5px; font-weight:700; letter-spacing:.02em;
  padding:1px 7px; border-radius:999px; background:var(--sky-pale); color:var(--blue-2);
  border:1px solid #cfe8f7; text-transform:uppercase;
}
.day-group.due-soon .day-date .dchip{background:#fff2da; color:var(--amber-text); border-color:var(--peach-line);}
.day-date .estimate-note{
  margin-top:10px; font-family:'Space Mono',monospace; font-size:9px; line-height:1.5;
  background:#fff8ec; border:1px solid var(--peach-line); color:var(--amber-text);
  padding:6px 8px; border-radius:6px; text-transform:uppercase; letter-spacing:.02em;
}

.day-rows{flex:1; display:flex; flex-direction:column;}
.line-row{
  padding:9px 16px; display:flex; align-items:center; flex-wrap:wrap; gap:10px; row-gap:4px;
  border-top:1px solid var(--line);
}
.day-rows .line-row:first-child{border-top:none;}
.day-group.due-soon .line-row{border-top-color:var(--peach-line);}
.line-row .ipo{font-weight:700; font-size:12.5px; color:var(--ink); white-space:nowrap;}
.line-row .ipo .no{color:var(--ink-soft); font-weight:500; font-size:11px;}
.qty-tag{font-family:'Space Mono',monospace; font-weight:700; font-size:12px; color:var(--deep); white-space:nowrap;}
.day-group.due-soon .qty-tag{color:var(--amber-text);}
.line-row .remark{color:var(--ink-soft); font-size:11.5px; font-style:italic; flex:1; min-width:120px;}
.day-group.due-soon .line-row .remark{color:#7a5320;}
.tagchip{
  font-family:'Space Mono',monospace; font-size:9px; font-weight:700; padding:2px 8px;
  border-radius:999px; text-transform:uppercase; letter-spacing:.03em; white-space:nowrap;
  margin-left:auto;
}
.tagchip.combined{background:#eef1fc; color:#3d4fb0; border:1px solid #c9d0f2;}
.tagchip.changed{background:#eaf3fb; color:#1c4d78; border:1px solid #b9d8ef;}
.tagchip.tbc{background:#f2f2f2; color:#7a7a7a; border:1px solid #dcdcdc;}


/* TBC block styling */
.tbc-block .month-head{background:#5b6570;}
.tbc-row .col-date .dnum{color:#8a8a8a;}
.tbc-row .col-date{background:#f6f6f6;}

/* ============ LEGEND / NOTE / FOOTER ============ */
.legend{
  display:flex; gap:20px; align-items:center; padding:16px 0 0 0; flex-wrap:wrap;
  font-size:12px; color:var(--ink-soft);
}
.legend .item{display:flex; align-items:center; gap:7px;}
.legend .swatch{width:16px;height:12px;border-radius:3px;display:inline-block;}
.legend .swatch.due{background:var(--peach); border:1px solid var(--peach-line);}
.legend .swatch.normal{background:#fff;border:1px solid var(--line);}

.note{
  margin:20px 0 0 0; background:#fff; border:1px dashed #9dc4dc; border-radius:10px;
  padding:13px 18px; font-size:13px; color:var(--blue-1); display:flex; gap:10px; align-items:flex-start;
}
footer{
  margin:20px 0 0 0; padding-top:14px; border-top:1px solid var(--line);
  display:flex; justify-content:space-between; align-items:center;
  font-size:11px; color:#93a8ba; font-family:'Space Mono',monospace;
}

@media (max-width: 980px){
  .stats{grid-template-columns:repeat(2,1fr);}
  .line-row .remark{display:none;}
  .day-date{width:90px;}
}

/* Online source controls */
[hidden]{display:none !important;}
.source-panel{margin-top:18px;padding:16px;background:#fff;border:1px solid var(--line);border-radius:10px;}
.source-actions{display:flex;gap:16px;align-items:center;flex-wrap:wrap;}
.source-panel button{background:var(--blue-1);color:white;border:0;border-radius:6px;padding:9px 14px;cursor:pointer;font:inherit;font-size:13px;}
.source-panel button:disabled{opacity:.5;cursor:default;}
.source-panel label,.source-panel summary{font-size:13px;}
.source-panel summary{cursor:pointer;margin-top:12px;color:var(--blue-1);}
.source-form{display:flex;gap:10px;align-items:end;flex-wrap:wrap;margin-top:12px;}
.source-form label{display:flex;flex-direction:column;gap:5px;}
.source-form .url-field{flex:1;min-width:220px;}
.source-form input,.source-form select{width:100%;padding:8px;border:1px solid #9dc4dc;border-radius:5px;font:inherit;font-size:13px;}
.source-help{font-size:12px;line-height:1.6;color:var(--ink-soft);}
.load-status{margin-top:12px;font-size:12px;line-height:1.6;color:var(--blue-1);overflow-wrap:anywhere;}
.load-status.error{padding:10px;background:var(--red-bg);color:var(--red-text);border:1px solid var(--red-line);border-radius:6px;}
.stale{border-top:3px solid var(--red-line);}
button.month-head{width:100%;border:0;text-align:left;font:inherit;}
.stat-card .value{overflow-wrap:anywhere;}
#sourceNotes{display:flex;flex-direction:column;gap:8px;}
@media(max-width:600px){header{padding:24px 18px;}.page-container{padding:0 12px;}.stat-card{padding:12px;}.stat-card .value{font-size:24px;}.line-row .remark{display:block;}.meta-card{text-align:left;}.source-form .url-field{min-width:100%;}}
