/* =======================================================
   PHYSICS NOTE - Significant Figures Stylesheet
   ======================================================= */

.physics-note-page {
    background: #f8f9fa;
    color: #333333;
}


/* =======================================================
   1. HERO SECTION
   ======================================================= */

.note-hero {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 90px 0 85px;
}

.note-hero-inner {
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}

.note-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(217, 83, 30, 0.09);
    color: var(--primary-orange);
    font-size: 1.65rem;
}

.note-label {
    color: var(--primary-orange);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    margin-bottom: 14px;
}

.note-hero h1 {
    margin: 0 0 18px;
    color: #222222;
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.03em;
}

.note-lead {
    margin: 0 auto 18px;
    color: #444444;
    font-size: 1.3rem;
    line-height: 1.65;
}

.note-intro {
    max-width: 620px;
    margin: 0 auto;
    color: #6c757d;
    font-size: 1rem;
    line-height: 1.8;
}


/* =======================================================
   2. SECTIONS & GENERAL LAYOUT
   ======================================================= */

.note-section {
    padding: 90px 0;
    background: #ffffff;
}

.note-section-alt {
    background: #f4f5f6;
}

.note-section-header {
    margin-bottom: 48px;
}

.note-section-header h2 {
    margin-bottom: 16px;
    color: #222222;
}

.note-section-header p {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    color: #6c757d;
}

.note-prose {
    max-width: 900px;
    margin: 0 auto;
}

.note-prose p {
    margin-bottom: 20px;
    color: #555555;
    line-height: 1.9;
}

.note-prose p:last-child {
    margin-bottom: 0;
}


/* =======================================================
   3. CALLOUTS & DEFINITIONS
   ======================================================= */

.note-callout {
    max-width: 950px;
    margin: 30px auto 0;
    display: flex;
    gap: 18px;
    padding: 22px 25px;
    background: #fff8f4;
    border-left: 4px solid var(--primary-orange);
    border-radius: 8px;
}

.callout-icon {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-orange);
    font-size: 1.1rem;
}

.note-callout strong {
    color: #333333;
}

.note-callout p {
    margin: 5px 0 0;
    color: #666666;
    line-height: 1.75;
}

.definition-box {
    max-width: 900px;
    margin: 0 auto 18px;
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 25px;
    padding: 30px;
    background: #ffffff;
    border: 1px solid #e0e3e6;
    border-radius: 14px;
}

.definition-number {
    color: var(--primary-orange);
    font-size: 1.1rem;
    font-weight: 700;
}

.definition-box h3 {
    margin: 0 0 10px;
    color: #222222;
    font-size: 1.15rem;
    font-weight: 700;
}

.definition-box p {
    margin: 0;
    color: #666666;
    line-height: 1.8;
}


/* =======================================================
   4. MEASUREMENT & UNCERTAINTY EXAMPLES
   ======================================================= */

.measurement-example {
    max-width: 760px;
    margin: 40px auto;
    padding: 40px 30px;
    background: #11161d;
    border-radius: 16px;
    text-align: center;
}

.measurement-example-label {
    margin-bottom: 12px;
    color: #9ca3af;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.measurement-large {
    color: #ffffff;
    font-size: clamp(3rem, 7vw, 5rem);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.measurement-large span {
    color: var(--primary-orange);
}

.measurement-large small {
    color: #9ca3af;
    font-size: 1.1rem;
    font-weight: 400;
}

.measurement-caption {
    margin-top: 15px;
    color: #9ca3af;
    font-size: 0.9rem;
}

.measurement-caption strong {
    color: var(--primary-orange);
}

.uncertainty-example {
    max-width: 850px;
    margin: 0 auto;
    padding: 40px 30px;
    background: #ffffff;
    border: 1px solid #e0e3e6;
    border-radius: 16px;
    text-align: center;
}

.uncertainty-value {
    color: #222222;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
}

.uncertainty-value span {
    color: var(--primary-orange);
    font-size: 1.3rem;
    font-weight: 500;
}

.uncertainty-range {
    margin-top: 40px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
}

.uncertainty-range > div:not(.range-line) {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.uncertainty-range span {
    color: #333333;
    font-weight: 700;
}

.uncertainty-range small {
    color: #8a8f94;
    font-size: 0.72rem;
}

.range-line {
    position: relative;
    height: 2px;
    background: #d9dde1;
}

.range-line::before,
.range-line::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-orange);
    transform: translateY(-50%);
}

.range-line::before {
    left: 0;
}

.range-line::after {
    right: 0;
}


/* =======================================================
   5. RULE CARDS (COUNTING SF)
   ======================================================= */

.rules-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.rule-card {
    position: relative;
    padding: 32px;
    background: #ffffff;
    border: 1px solid #e0e3e6;
    border-radius: 14px;
}

.rule-number {
    margin-bottom: 18px;
    color: var(--primary-orange);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.rule-card h3 {
    margin-bottom: 10px;
    color: #222222;
    font-size: 1.15rem;
}

.rule-card > p {
    min-height: 52px;
    color: #6c757d;
    line-height: 1.7;
}

.example-box {
    margin-top: 22px;
    padding: 15px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f7f8f9;
    border-radius: 8px;
}

.example-box.stacked {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 15px;
}

.example-box.stacked .example-number {
    text-align: left;
}

.example-box.stacked .example-result {
    text-align: right;
}

.example-number {
    color: #222222;
    font-family: 'DM Sans', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
}

.example-result {
    color: var(--primary-orange);
    font-size: 0.82rem;
    font-weight: 700;
}


/* =======================================================
   6. CALCULATIONS & EQUATIONS
   ======================================================= */

.calculation-card-wide {
    max-width: 950px;
    margin: 0 auto;
    padding: 35px;
    background: #ffffff;
    border: 1px solid #e0e3e6;
    border-radius: 16px;
}

.calculation-description {
    margin-bottom: 25px;
}

.calculation-description p {
    margin: 8px 0 0;
    color: #555555;
    line-height: 1.8;
}

.example-tag {
    color: var(--primary-orange);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.data-line {
    padding: 15px;
    background: #f7f8f9;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
}

.equation-display {
    margin-top: 25px;
    padding: 28px;
    background: #11161d;
    border-radius: 10px;
    color: #e6edf3;
    font-family: 'DM Sans', sans-serif;
    font-size: 1.05rem;
    line-height: 2;
    text-align: center;
}

.equation-display .equation-final {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 700;
}

.equation-light {
    max-width: 700px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid #e0e3e6;
    color: #333333;
    font-size: 1.3rem;
}

.calculation-note {
    margin-top: 22px;
    color: #777777;
    font-size: 0.9rem;
    line-height: 1.75;
}

.method-note {
    margin-top: 25px;
    padding: 20px 22px;
    background: #fff8f4;
    border-left: 4px solid var(--primary-orange);
    border-radius: 8px;
}

.method-note strong {
    color: #333333;
}

.method-note p {
    margin: 7px 0 0;
    color: #666666;
    line-height: 1.75;
}


/* =======================================================
   7. COMPARISON EXAMPLES
   ======================================================= */

.comparison-example {
    max-width: 950px;
    margin: 25px auto;
    padding: 32px;
    background: #ffffff;
    border: 1px solid #e0e3e6;
    border-radius: 16px;
}

.comparison-example-label {
    margin-bottom: 8px;
    color: var(--primary-orange);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.comparison-example h3 {
    margin-bottom: 15px;
    color: #222222;
    font-size: 1.2rem;
}

.comparison-example > p {
    color: #555555;
    line-height: 1.85;
}

.comparison-values {
    margin: 30px 0;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 25px;
}

.comparison-values > div:not(.comparison-symbol) {
    padding: 25px;
    background: #f7f8f9;
    border-radius: 10px;
    text-align: center;
}

.comparison-values span {
    display: block;
    margin-bottom: 8px;
    color: #7a7f84;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.comparison-values strong {
    color: #222222;
    font-size: 2rem;
}

.comparison-values small {
    display: block;
    margin-top: 3px;
    color: #777777;
}

.comparison-symbol {
    color: var(--primary-orange);
    font-size: 1.4rem;
    font-weight: 700;
}


/* =======================================================
   8. REFERENCE TABLE
   ======================================================= */

.reference-table-wrapper {
    max-width: 900px;
    margin: 0 auto;
    overflow-x: auto;
    background: #ffffff;
    border: 1px solid #dfe3e6;
    border-radius: 12px;
}

.reference-table {
    width: 100%;
    border-collapse: collapse;
}

.reference-table th,
.reference-table td {
    padding: 17px 22px;
    border-bottom: 1px solid #e7e9eb;
    text-align: left;
}

.reference-table th {
    background: #11161d;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.reference-table td {
    color: #555555;
    line-height: 1.6;
}

.reference-table td:first-child {
    width: 35%;
    color: #222222;
    font-weight: 600;
}

.reference-table tbody tr:last-child td {
    border-bottom: none;
}

.reference-table tbody tr:hover td {
    background: #fafafa;
}


/* =======================================================
   9. CLOSING SECTION
   ======================================================= */

.note-closing {
    padding: 85px 0;
    background: #11161d;
    color: #ffffff;
}

.closing-inner {
    max-width: 780px;
    margin: 0 auto;
    text-align: center;
}

.closing-icon {
    display: inline-block;
    margin-bottom: 25px;
    color: var(--primary-orange);
    font-size: 2rem;
}

.closing-quote {
    margin: 0;
    color: #e6edf3;
    font-size: clamp(1.2rem, 2.4vw, 1.65rem);
    line-height: 1.7;
}

.closing-line {
    width: 50px;
    height: 2px;
    margin: 28px auto 18px;
    background: var(--primary-orange);
}

.closing-inner > span {
    color: #8b949e;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
}


/* =======================================================
   10. RESPONSIVE MEDIA QUERIES
   ======================================================= */

@media (max-width: 900px) {
    .note-hero,
    .note-section {
        padding: 70px 0;
    }

    .rules-grid {
        grid-template-columns: 1fr;
        max-width: 650px;
    }

    .comparison-values {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .comparison-symbol {
        transform: rotate(90deg);
    }
}

@media (max-width: 600px) {
    .note-hero {
        padding: 55px 0 60px;
    }

    .note-hero h1 {
        font-size: 2.5rem;
    }

    .note-lead {
        font-size: 1.1rem;
    }

    .note-section {
        padding: 55px 0;
    }

    .definition-box {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 24px;
    }

    .rule-card,
    .calculation-card-wide,
    .comparison-example {
        padding: 24px;
    }

    .uncertainty-example {
        padding: 30px 20px;
    }

    .uncertainty-range {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .range-line {
        width: 80%;
        margin: 10px auto;
    }

    .measurement-example {
        padding: 35px 20px;
    }

    .equation-display {
        padding: 22px 15px;
        font-size: 0.95rem;
    }

    .reference-table th,
    .reference-table td {
        padding: 14px 16px;
    }
}
/* =======================================================
   MEASUREMENT UNCERTAINTY - IMAGES
   ======================================================= */

.measurement-image {
    margin: 30px auto;
    text-align: center;
}

.measurement-image img {
    display: inline-block;
    max-width: 100%;
    height: auto;
    border: 1px solid #e0e3e6;
    border-radius: 12px;
    background: #ffffff;
}

.measurement-image-caption {
    margin-top: 10px;
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.6;
}

.measurement-image-grid {
    max-width: 900px;
    margin: 30px auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.measurement-image-grid .measurement-image {
    margin: 0;
}

@media (max-width: 767px) {

    .measurement-image-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

}
/* =======================================================
   MEASUREMENT EXAMPLE - REPEATED MEASUREMENTS
   ======================================================= */

.example-box.stacked {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0;
    margin: 30px 0;
    padding: 8px 18px;
    background: #f8f9fa;
    border: 1px solid #eef0f2;
    border-radius: 12px;
    overflow: hidden;
}

/* Measurement row */
.example-box.stacked .example-number,
.example-box.stacked .example-result {
    min-height: 48px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
}

/* Left column */
.example-box.stacked .example-number {
    padding: 0 12px;
    font-size: 1rem;
    font-weight: 500;
    color: #30343b;
}

/* Right column */
.example-box.stacked .example-result {
    justify-content: flex-end;
    padding: 0 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-orange);
    font-variant-numeric: tabular-nums;
}

/* Remove the last divider */
.example-box.stacked .example-number:nth-last-of-type(-n+2),
.example-box.stacked .example-result:last-child {
    border-bottom: none;
}


/* -------------------------------------------------------
   Mobile
------------------------------------------------------- */

@media (max-width: 600px) {

    .example-box.stacked {
        padding: 6px 12px;
    }

    .example-box.stacked .example-number,
    .example-box.stacked .example-result {
        min-height: 44px;
    }

    .example-box.stacked .example-number {
        padding-left: 8px;
        font-size: 0.95rem;
    }

    .example-box.stacked .example-result {
        padding-right: 8px;
        font-size: 0.9rem;
    }

}