/* --- Global & Container Styles --- */
body {
    background-color: #f4f4f4;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}


.input-container{
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.input-container .button {
    background-color: #222!important;
    color:#fff!important;
    }

.results-container, .documentation-container {
    background: #fdfdfd;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}
.documentation-container .button{
    background: #222;
    color:#fff;
    }
.documentation-container .button:hover,.documentation-container .button:visited{
    background: #000;
    color:#fff;
    }
.results-container h3,.input-container h3,.documentation-container h2{
    margin-top: 0;
    color: #333;
    font-size: 2rem;
    border-bottom: 2px solid #222; /* Ithaka Green */
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

/* --- Individual Result Rows --- */
.result-item {
    display: flex;
    justify-content: space-between;
    align-items: top;
    margin-bottom: 1.25rem;
}

.result-item label {
    font-weight: 600;
    color: #555;
    display: flex;
    align-items: center;
}
.result-label label {
    font-weight: 600;
    color: #555;
    padding: 8px 16px;
}



/* --- The Number Box --- */
.value-box {
    display: flex;
    align-items: baseline;
    gap: 8px;
    background: #f0f0f0;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid #dce1d1;
    min-width: 150px;
    justify-content: flex-end;
    transition: all 0.2s ease;
    min-width:30%;
}

.value-box:hover {
    background: #e0e0e0;
    border-color: #222;
    
}

.number {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.4rem;
    font-weight: bold;
    color: #2c3e50;
}

.unit {
    font-size: 0.85rem;
    color: #7f8c8d;
    
    font-weight: 500;
}
.latex-unit{
    font-size:17pt;
    color: #7f8c8d;
    }

/* --- Chart Area & Foundation Tab Overrides --- */
.chart-wrapper {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 0 0 12px 12px;
    padding: 20px;
    position: relative;
    height: 450px; /* Fixed height for consistency */
}

.tabs {
    border: none;
    background: transparent;
    margin-bottom: 0;
}

.tabs-title > a {
    font-weight: 600;
    color: #7f8c8d;
    padding: 1rem 2rem;
    border-radius: 8px 8px 0 0;
    margin-right: 4px;
}

.tabs-title > a:hover {
    background: #f0f0f0;
}

.tabs-title.is-active > a {
    background: #222;
    color: #ffffff;
}

/* --- Live Hover Detail Display --- */
.live-detail-box {
    display: none; /* Controlled via JS */
    border: 1px dashed #222;
    background: #f9fbf2;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Tooltip Styling --- */
.info-icon {
    position: relative;
    margin-left: 8px;
    color: #222;
    cursor: help;
    font-size: 0.9rem;
}

.tooltip-text {
    visibility: hidden;
    width: 220px;
    background-color: #2c3e50;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 10px;
    position: absolute;
    z-index: 10;
    bottom: 130%; 
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.8rem;
    line-height: 1.4;
    font-weight: normal;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.info-icon:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}


/* The background of the whole track (right side) */
.slider {
    background-color: #e0e0e0;
    height: 0.5rem;
    border-radius: 5px;
}

/* The "Progress" or left-side color */
.slider-fill {
    background-color: #222; /* Your Ithaka Green */
    height: 0.5rem;
    border-radius: 5px;
}

/* The Handle */
.slider-handle {
    background-color: #222;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}


.code-container {
    position: relative;
    margin-bottom: 1rem;
  }
  .copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 10; /* Ensures it stays on top */
    opacity: 0.8;
  }
  .copy-btn:hover {
    opacity: 1;
  }
  pre {
    padding-top: 2.5rem !important; /* Makes room so the button doesn't cover the code */
  }
  
  
  
  /* Container Styles */
.mode-container {
    padding: 1.5rem;
    border: 2px solid #e6e6e6;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #f9f9f9;
    
}
.mode-container input{
    height:5rem;
    font-size: 2rem;
    border: 2px solid #e6e6e6;
    border-radius: 8px;

}
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* 2. Remove arrows in Firefox */
input[type=number] {
  -moz-appearance: textfield;
  
  /* 3. Standardize the look */
  text-align: right;
  padding-right: 12px; /* Now this padding will work exactly as expected */
}

.mode-container.is-active {
    border-color: #222;//#1779ba; /* Foundation Primary Blue */
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
   // border:2px solid gold;
}

.calc-input{
    
}
/* Input Styling */
.calc-input:disabled {
    background-color: #f1f1f1;
    cursor: not-allowed;
    color: #8a8a8a;
    
}

.mode-container label {
    color: #222;//#1779ba;
    font-weight: bold;
}
.mode-container.is-active label {
    color: #222;//#1779ba;
    font-weight: bold;
}



/* Button */


.flip-scene {
  perspective: 1000px;
  /* No height defined here! */
}

.flip-card {
  width: 100%;
  position: relative;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  /* 1. Ensure the container handles 3D correctly */
  transform-style: preserve-3d; 
  
}

.flip-card.is-flipped {
  transform: rotateY(180deg);
}

.flip-face {
  width: 100%;
  /* 2. This is the most important line to stop "shining through" */
  backface-visibility: hidden; 
  -webkit-backface-visibility: hidden; /* Safari support */
  
  /* 3. Solid background is mandatory to block the other side */
  background: #fff; 
  border: 0px solid #1779ba;
  border-radius: 8px;
  padding: 1rem;
  padding:0;
}

/* The Front stays in the normal document flow */
.flip-front {
  position: relative; 
  z-index: 2;
  background-color: #fff; 
  transform: translateZ(1px);
}

/* The Back is pinned to the front's dimensions */
.flip-back {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  transform: rotateY(180deg) translateZ(1px);
  /* Ensure the back has a solid background too */
  background-color: #fff; 
}


.mode-switch-btn {
    margin-top: 1rem;
    margin-bottom: 0;
    font-size: 1rem;
    border-radius: 4px;
    border-style: dashed; /* Makes it look like an "alternative" option */
    transition: all 0.3s ease;
    background: none;
    color:#888;
    width:100%;
}

.mode-switch-btn:hover {
    border-style: solid;
    color:#000;
    }



/* 5. The Arrow Icon */
#toggle-icon {
    font-size: 2rem;
    color: #1779ba;
    display: inline-block;
    /* Matches the 1s timing of the box flip */
    transition: transform 1.0s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}



/* --- Accordion Container --- */
.accordion {
    margin-left: 0;
    background: transparent;
    border: none;
    list-style-type: none;
}

/* --- The Individual Item --- */
.accordion-item {
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.3s ease;
}

.accordion-item:first-child {
    border-top: 1px solid #e0e0e0;
}

/* --- The Header/Title --- */
.accordion-title {
    color: #222 !important;
    font-weight: 600;
    padding: 1.25rem 1rem;
    position: relative;
    border: none !important;
    background: transparent !important;
    font-size: 1.1rem;
}

.accordion-title:hover {
    background: #f9f9f9 !important;
}

/* Custom Arrow Indicator */
.xaccordion-title::before {
    content: '+';
    position: absolute;
    right: 1rem;
    font-size: 1.4rem;
    font-weight: 300;
    color: #222;
    transition: transform 0.3s ease;
}

/* State: Open Arrow */
.is-active .xaccordion-title::before {
    content: '–'; /* En dash */
    transform: rotate(180deg);
}

/* --- The Content Pane --- */
.accordion-content {
    border: none !important;
    background: #ffffff;
    padding: 1rem 1.5rem 2rem 1.5rem;
    padding: 1rem 0 1rem 0;
    color: #555;
    line-height: 1.6;
}

/* Optional: Highlight active state with a tiny left border */
.accordion-item.is-active {
    //border-left: 3px solid #222;
    background: #fff;
}





.accordion-content h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 1.5rem;
    color: #222;
}

.accordion-content p {
    font-size: 0.95rem;
    color: #444;
}


/* --- Comparison Table Styling --- */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.85rem;
}

.comparison-table thead th {
    background: #222;
    color: #fff;
    padding: 10px;
    text-align: left;
    border: 1px solid #333;
}

.comparison-table td {
    padding: 8px 10px;
    border: 1px solid #e0e0e0;
}

/* Highlight the Legacy method row */
.legacy-row {
    background-color: #fff9e6; /* Light warning/historical yellow */
    font-style: italic;
}

/* Ensure LaTeX blocks have breathing room */
.text-center {
    padding: 1rem 0;
    overflow-x: auto; /* Prevent long equations from breaking layout on mobile */
}

/* Foundation Table Scroll helper */
.table-scroll {
    overflow-x: auto;
}



/* Mobile only (0 to 639px) */
@media screen and (max-width: 39.9375em) {
    .tabs-content {
        padding-left: 0 !important;
        padding-right: 0 !important;
        border-left: 0 !important;   /* Optional: removes side borders too */
        border-right: 0 !important;
    }

    .tabs-panel {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    .result-card {
        border-left: none;
        border-right: none;
        border-radius: 0;
        margin-left: -1px; /* Aligns border with screen edge */
        margin-right: -1px;
    }
    .mode-container{
	border:none!important;
	padding-left:.5rem!important;
	padding-right:.5rem!important;
    }
    
    
}



/* ===================== CINK two-step layout ===================== */
.step-card { position: relative; }
.step-card.is-disabled { opacity: 0.5; }

.step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.8rem; height: 1.8rem;
    border-radius: 50%;
    background: #222; color: #fff;
    font-size: 1rem; font-weight: 700;
    margin-right: 0.5rem;
}

/* Registry override toggle — emphasised callout */
.registry-toggle {
    background: #f9fbf2;
    border: 1px solid #dce1d1;
    border-left: 4px solid #2c3e50;
    border-radius: 8px;
    padding: 12px 16px;
}
.registry-toggle-label {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .45rem;
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #2c3e50;
    cursor: pointer;
}
.registry-toggle-label input[type="checkbox"] {
    transform: scale(1.3);
    margin: 0 .15rem 0 0;
    cursor: pointer;
}
.registry-tag {
    display: inline-block;
    background: #2c3e50;
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 10px;
}

/* Chart section titles */
.chart-title {
    margin: 1.5rem 0 .25rem;
    font-size: 1rem;
    font-weight: 700;
    color: #2c3e50;
}

/* Headline figure captions (CINK + TCE) */
.headline-cap {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #555;
    margin-bottom: .25rem;
}
.headline-box { min-height: 3rem; }
.cool-tag {
    display: inline-block;
    background: #2c7fb8;
    color: #fff;
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 1px 7px;
    border-radius: 10px;
    vertical-align: middle;
}

/* Results table */
.results-table { margin-bottom: 1rem; }
.results-table th { font-size: .85rem; text-transform: uppercase; letter-spacing: .02em; color: #555; }
.results-table td, .results-table th { padding: .45rem .6rem; vertical-align: middle; }
.results-table .text-right { text-align: right; }
.results-table .num {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #2c3e50;
    white-space: nowrap;
}
.results-table .unit-cell { color: #7f8c8d; font-size: .85rem; width: 5.5rem; }
.results-table .group-head td {
    background: #f0f0f0;
    font-weight: 700;
    color: #2c3e50;
    border-top: 2px solid #dce1d1;
}

/* Carbon pool readout boxes */
.pool-box {
    display: flex; justify-content: space-between; align-items: baseline;
    padding: 12px 16px; margin-bottom: 10px;
    background: #f0f0f0; border: 1px solid #dce1d1; border-radius: 8px;
}
.pool-box.subtle { background: #fafafa; }
.pool-label { font-weight: 600; color: #555; }
.pool-val { font-family: 'Courier New', monospace; font-size: 1.3rem; font-weight: bold; color: #2c3e50; }
.pool-val small { font-family: inherit; font-size: 0.7rem; font-weight: 500; color: #7f8c8d; }

/* Classification badge */
.class-badge {
    margin-top: 0.75rem; padding: 0.6rem 0.9rem; border-radius: 8px;
    font-size: 0.9rem; font-weight: 600; line-height: 1.3;
}
.class-badge.ok   { background: #eef6e6; border: 1px solid #b7d99a; color: #3a5a1e; }
.class-badge.warn { background: #fff4e5; border: 1px solid #f0c27a; color: #8a5a00; }
