/* CSS for L1 Styles */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;700&display=swap');

/* ========================================= */
/* L1 Blueprint Dark Theme Base Configuration */
/* ========================================= */

#tab-l1 .pac-child-content {
  background-color: #0d3b66;
  color: #f8f8f8;
  font-family: 'IBM Plex Mono', monospace;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: auto;
  border-radius: 3px;
  padding: 2rem;
  box-sizing: border-box;
  position: relative;
}

#tab-l1 .pac-child-content::before {
  content: "";
  position: absolute;
  top: 1rem;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  border: 1px solid rgba(255,255,255,0.25);
  background-image: 
    repeating-linear-gradient(0deg, rgba(255,255,255,0.05) 0, rgba(255,255,255,0.05) 1px, transparent 1px, transparent 50px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0, rgba(255,255,255,0.05) 1px, transparent 1px, transparent 50px);
  background-size: 50px 50px;
  pointer-events: none;
}

#tab-l1 .pac-child-content .kant-content{
  overflow: auto;
}

#tab-l1 .pac-child-content h1,
#tab-l1 .pac-child-content h2,
#tab-l1 .pac-child-content h3,
#tab-l1 .pac-child-content h4,
#tab-l1 .pac-child-content h5 {
  font-family: 'IBM Plex Mono', monospace;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #ffffff;
  letter-spacing: 0.05rem;
}

#tab-l1 .pac-child-content h1 {
  font-size: 2.5rem;
  border-bottom: 2px solid rgba(255,255,255,0.2);
  padding-bottom: 0.5rem;
}

#tab-l1 .pac-child-content h2 {
  font-size: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  padding-bottom: 0.4rem;
}

#tab-l1 .pac-child-content h3 {
  font-size: 1.6rem;
}

#tab-l1 .pac-child-content p {
  margin-bottom: 1rem;
  color: #f8f8f8;
}

#tab-l1 .pac-child-content a {
  color: #9dc2e2;
  text-decoration: none;
  border-bottom: 1px dashed #9dc2e2;
}

#tab-l1 .pac-child-content a:hover {
  background-color: #9dc2e2;
  color: #0d3b66;
  text-decoration: none;
}

#tab-l1 .pac-child-content .paper {
  background-color: rgba(255, 255, 255, 0.05);
  padding: 2rem;
  margin-bottom: 2rem;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

#tab-l1 .pac-child-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  border: 1px solid rgba(255,255,255,0.3);
  background-color: rgba(255, 255, 255, 0.05);
}

#tab-l1 .pac-child-content table th,
#tab-l1 .pac-child-content table td {
  border: 1px solid rgba(255,255,255,0.2);
  padding: 0.5rem 0.75rem;
  color: #ffffff;
}

#tab-l1 .pac-child-content table td {
  border-top: 0;
  border-bottom: 0;
}

#tab-l1 .pac-child-content table th {
  background-color: rgba(255,255,255,0.1);
  text-align: left;
}

#tab-l1 .pac-child-content table caption {
  caption-side: bottom;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  margin-top: 0.5rem;
}

#tab-l1 .pac-child-content .figure {
  text-align: center;
  margin: 1.5rem 0;
}

#tab-l1 .pac-child-content .figure img {
  max-width: 100%;
  border: 2px dotted rgba(255,255,255,0.3);
  padding: 0.25rem;
  background-color: rgba(255,255,255,0.05);
}

#tab-l1 .pac-child-content .figure figcaption {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  margin-top: 0.5rem;
}

#tab-l1 .pac-child-content blockquote {
  border: 2px dotted rgba(255,255,255,0.3);
  border-radius: 0;
  padding-top: 3rem;
  margin: 1rem auto;
  color: rgba(255,255,255,0.8);
  font-style: italic;
  background-color: rgba(255,255,255,0.05);
}

#tab-l1 .pac-child-content blockquote *{
  color: rgba(255,255,255,0.8);
  font-style: italic;
}

#tab-l1 .pac-child-content blockquote:before {
    color: rgba(255, 255, 255, 0.5);
    top: 0px;
}

#tab-l1 .pac-child-content footer {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
  border-top: 1px dashed rgba(255,255,255,0.3);
  margin-top: 2rem;
  padding-top: 1rem;
}

#tab-l1 .pac-child-content .footnote {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
  display: block;
  margin-top: 0.5rem;
}

#tab-l1 .pac-child-content .code-block {
  background-color: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 1rem;
  margin: 1rem 0;
  font-family: 'IBM Plex Mono', 'Courier New', Courier, monospace;
  font-size: 0.9rem;
  overflow-x: auto;
  border-radius: 3px;
  color: #ffffff;
}

#tab-l1 .pac-child-content ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

#tab-l1 .pac-child-content ul li {
  margin-bottom: 0.5rem;
  position: relative;
}

#tab-l1 .pac-child-content ul li::before {
  content: '▪';
  position: absolute;
  left: -1rem;
  color: #9dc2e2;
  font-size: 0.8rem;
  top: 0.3rem;
}

#tab-l1 .pac-child-content .dotted-box {
  border: 2px dotted rgba(255,255,255,0.3);
  padding: 1rem;
  margin: 1rem 0;
  background-color: rgba(255,255,255,0.05);
}

#tab-l1 .pac-child-content .float-left {
  float: left;
  margin: 0 1.5rem 1rem 0;
}

#tab-l1 .pac-child-content .float-right {
  float: right;
  margin: 0 0 1rem 1.5rem;
}

#tab-l1 .pac-child-content .clear {
  clear: both;
}
/* ========================================= */
/* Kant Blueprint Wrapper & Table Styles     */
/* ========================================= */

#tab-l1 .pac-child-content .kant-bp-wrapper {
  margin: 2.5rem 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #ffffff;
  /* Solid deep blueprint blue with a subtle grid pattern */
  background-color: #0b3954;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 20px 20px;
  border: 2px solid #38bdf8;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
  overflow-x: auto;
  position: relative;
  z-index: 1;
  max-width: 100%;
}

#tab-l1 .pac-child-content .kant-bp-wrapper .table-title {
  color: #ffffff;
  font-size: 1.25rem;
  margin: 0;
  padding: 1.25rem 1.5rem;
  border-bottom: 2px solid #38bdf8;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  background-color: #072a3e;
}

#tab-l1 .pac-child-content .kant-bp-wrapper .kant-bp-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
  line-height: 1.6;
  border: none;
  background-color: transparent;
  margin: 0;
}

#tab-l1 .pac-child-content .kant-bp-wrapper .kant-bp-table th {
  padding: 1rem 1.5rem;
  color: #7dd3fc;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: left;
  border-bottom: 2px solid rgba(56, 189, 248, 0.5);
  border-top: none;
  border-left: none;
  border-right: none;
  background-color: rgba(7, 42, 62, 0.6);
}

#tab-l1 .pac-child-content .kant-bp-wrapper .kant-bp-table td {
  padding: 0.25rem 1rem;
  border-bottom: 1px dashed rgba(56, 189, 248, 0.4);
  border-top: none;
  border-left: none;
  border-right: none;
  color: #e0f2fe;
  vertical-align: top;
}

#tab-l1 .pac-child-content .kant-bp-wrapper .kant-bp-table tr:last-child td {
  border-bottom: none;
}

#tab-l1 .pac-child-content .kant-bp-wrapper .kant-bp-table tr:hover {
  background-color: rgba(56, 189, 248, 0.15);
}

#tab-l1 .pac-child-content .kant-bp-wrapper .kant-bp-table td:first-child {
  width: 25%;
}

#tab-l1 .pac-child-content .kant-bp-wrapper .kant-bp-table td:first-child strong {
  display: block;
  color: #ffffff;
  font-size: 1.05rem;
  margin-bottom: 0;
  font-weight: 700;
  letter-spacing: 0.02em;
}

#tab-l1 .pac-child-content .kant-bp-wrapper .kant-bp-table td:first-child em {
  font-style: normal;
  color: #38bdf8;
  font-size: 0.85rem;
}

#tab-l1 .pac-child-content {
    max-width: 100% !important;
    width: 100% !important;
    overflow-x: hidden !important; /* Force crop of anything pushing out */
    box-sizing: border-box !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

#tab-l1 .pac-child-content .kant-content {
    max-width: 100%;
}

/* Wrapper for Mermaid diagrams to replace inline styles */
.kant-arg-block.diagram-container {
    text-align: center;
    padding: 0;
    overflow-x: auto;
    border-radius: 10px;
}

.kant-arg-block.diagram-container pre.mermaid{
    background-color: #0b3954;
    background-image: linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    border: 2px solid #38bdf8;
    margin-bottom: 0;
    border-radius: 10px;
    position: relative;
    z-index: 1;
    scrollbar-width: thin;
    scrollbar-color: #38bdf8 #136493;
}

/* Mermaid scrollbar styles */
.kant-arg-block.diagram-container pre.mermaid::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.kant-arg-block.diagram-container pre.mermaid::-webkit-scrollbar-track {
    background-color: #136493;
    border-radius: 100px;
    margin: 5px;
}

.kant-arg-block.diagram-container pre.mermaid::-webkit-scrollbar-thumb {
    background-color: #38bdf8;
    border-radius: 100px;
    padding-bottom: 1px;
}
/* Force L1 Mermaid diagram arrows to grey #ccc */
.kant-arg-block.diagram-container .mermaid .marker {
    fill: #cccccc !important;
    stroke: #cccccc !important;
}
.kant-arg-block.diagram-container .mermaid .edge-thickness-normal {
    stroke: #cccccc !important;
}
.kant-arg-block.diagram-container .mermaid .edgePaths path {
    stroke: #cccccc !important;
}

/* Force pure gray on arrow line indicators and markers */
.diagram-container [id^="mermaid"] *[id^="arrowhead"] path,
.diagram-container [id^="mermaid"] marker path,
.diagram-container .mermaid *[id^="arrowhead"] path,
.diagram-container .mermaid marker path {
    fill: #cccccc !important;
    stroke: #cccccc !important;
}

/* Force pure gray on ALL edge lines including dashed/dotted */
.diagram-container [id^="mermaid"] .edgePath path,
.diagram-container [id^="mermaid"] path.flowchart-link,
.diagram-container .mermaid .edgePath path,
.diagram-container .mermaid path.flowchart-link {
    stroke: #cccccc !important;
}

/* Force transparent background on connecting arrow labels */
.diagram-container [id^="mermaid"] .edgeLabel,
.diagram-container [id^="mermaid"] .edgeLabel rect,
.diagram-container .mermaid .edgeLabel,
.diagram-container .mermaid .edgeLabel rect {
    background-color: transparent !important;
    fill: transparent !important;
}

/* Shift text labels hover above arrow lines to avoid intersections */
.diagram-container [id^="mermaid"] .edgeLabel text,
.diagram-container .mermaid .edgeLabel text {
    transform: translateY(-20px);
}

/* Force transparent backgrounds on ALL standard clusters */
.diagram-container [id^="mermaid"] .cluster rect,
.diagram-container .mermaid .cluster rect {
    fill: transparent !important;
}
