:root {
    --ink: #17251f;
    --muted: #5c6b63;
    --line: rgba(31, 48, 42, 0.14);
    --surface: #fafbf8;
    --surface-strong: #ffffff;
    --green: #173b31;
    --green-soft: #dfeee6;
    --gold: #d6a936;
    --blue: #2f5f7f;
    --danger: #a93d3d;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html,
body {
    background: var(--surface);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    margin: 0;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    letter-spacing: 0;
    line-height: 1.02;
}

h1 {
    font-size: clamp(3rem, 9vw, 7.5rem);
    margin-bottom: 1rem;
}

h2 {
    font-size: clamp(2rem, 5vw, 4rem);
}

h3 {
    font-size: 1.25rem;
}

a {
    color: var(--green);
}

button,
input,
textarea,
select {
    font: inherit;
}

.btn {
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    font-weight: 800;
    justify-content: center;
    min-height: 42px;
    padding: 0.7rem 1rem;
    text-decoration: none;
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.68);
    color: var(--green);
}

.btn-small {
    min-height: 34px;
    padding: 0.45rem 0.75rem;
}

.hero {
    align-items: end;
    background:
        linear-gradient(110deg, rgba(23, 59, 49, 0.92), rgba(23, 59, 49, 0.7)),
        url("https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=1800&q=80");
    background-position: center;
    background-size: cover;
    color: #fff;
    display: grid;
    gap: 2rem;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    min-height: calc(100vh - 76px);
    padding: 8vh 5vw;
}

.marcellus-hero {
    background:
        linear-gradient(110deg, rgba(23, 59, 49, 0.94), rgba(47, 95, 127, 0.68)),
        url("https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=1800&q=80");
}

.hero-ghost {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.12);
}

.hero-content {
    max-width: 850px;
}

.eyebrow {
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy {
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    line-height: 1.65;
    max-width: 720px;
}

.hero-actions,
.field-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.hero-panel {
    background: rgba(250, 251, 248, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 8px;
    color: var(--ink);
    padding: 1.2rem;
}

.map-visual {
    aspect-ratio: 0.78;
    background:
        linear-gradient(145deg, rgba(223, 238, 230, 0.92), rgba(255, 255, 255, 0.9)),
        repeating-linear-gradient(30deg, rgba(23, 59, 49, 0.08) 0 1px, transparent 1px 28px);
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 8px;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.24);
    min-height: 440px;
    overflow: hidden;
    padding: 1rem;
    position: relative;
}

.map-visual::before {
    background: rgba(47, 95, 127, 0.14);
    border: 2px solid rgba(47, 95, 127, 0.36);
    border-radius: 48% 52% 42% 58%;
    content: "";
    inset: 10% 14% 18% 12%;
    position: absolute;
}

.map-label {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--green);
    font-size: 0.82rem;
    font-weight: 900;
    padding: 0.55rem 0.7rem;
    position: absolute;
    z-index: 2;
}

.chenango {
    left: 14%;
    top: 26%;
}

.broome {
    bottom: 26%;
    right: 12%;
}

.pipeline-line {
    background: var(--gold);
    border-radius: 999px;
    height: 8px;
    left: 10%;
    position: absolute;
    top: 58%;
    transform: rotate(-18deg);
    width: 86%;
    z-index: 1;
}

.acreage {
    background: rgba(23, 59, 49, 0.78);
    border: 2px solid #fff;
    border-radius: 50%;
    height: 74px;
    position: absolute;
    width: 74px;
    z-index: 2;
}

.acreage-a {
    left: 30%;
    top: 40%;
}

.acreage-b {
    bottom: 30%;
    right: 32%;
}

.map-caption {
    background: rgba(23, 37, 31, 0.88);
    border-radius: 6px;
    bottom: 1rem;
    color: #fff;
    font-weight: 800;
    left: 1rem;
    padding: 0.8rem;
    position: absolute;
    right: 1rem;
    z-index: 3;
}

.metric {
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 0.35rem;
    padding: 1rem 0;
}

.metric:last-child {
    border-bottom: 0;
}

.metric span,
.muted,
td span,
.auth-switch {
    color: var(--muted);
}

.metric strong {
    font-size: 1.15rem;
}

.section {
    padding: 6rem 5vw;
}

.section-heading {
    max-width: 860px;
}

.feature-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 2rem;
}

.feature-grid article,
.contact-form,
.auth-card,
.admin-panel {
    background: var(--surface-strong);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 18px 48px rgba(23, 37, 31, 0.07);
}

.feature-grid article {
    padding: 1.4rem;
}

.feature-grid span {
    color: var(--blue);
    font-weight: 900;
}

.feature-grid p,
.rich-copy,
.contact-copy p {
    color: var(--muted);
    line-height: 1.7;
}

.split-section,
.contact-section,
.calculator-section,
.portal-section {
    display: grid;
    gap: 2rem;
    grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
}

.rich-copy {
    font-size: 1.08rem;
}

.contact-section {
    background: #edf3ef;
}

.contact-form,
.auth-card,
.calculator-panel,
.investment-panel,
.article-grid article,
.portal-grid article {
    display: grid;
    gap: 1rem;
    padding: 1.4rem;
}

.calculator-section {
    background: #f3f7f4;
}

.calculator-copy p {
    color: var(--muted);
    line-height: 1.7;
}

.calculator-panel,
.investment-panel,
.article-grid article,
.portal-grid article {
    background: var(--surface-strong);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 18px 48px rgba(23, 37, 31, 0.07);
}

.result-grid {
    display: grid;
    gap: 0.8rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.result-grid div {
    background: var(--green-soft);
    border-radius: 8px;
    display: grid;
    gap: 0.35rem;
    padding: 1rem;
}

.result-grid span {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 800;
}

.result-grid strong {
    color: var(--green);
    font-size: clamp(1.2rem, 3vw, 1.8rem);
}

.calculator-note {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.55;
    margin: 0;
}

.investment-panel table {
    min-width: 0;
}

.cashflow-chart {
    align-items: end;
    background: #eef4f0;
    border-radius: 8px;
    display: flex;
    gap: 0.55rem;
    height: 180px;
    padding: 1rem;
}

.cashflow-chart span {
    background: linear-gradient(180deg, var(--gold), var(--green));
    border-radius: 6px 6px 0 0;
    flex: 1;
    min-height: 24px;
}

.intelligence-section {
    background: #ffffff;
}

.article-grid,
.portal-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 2rem;
}

.portal-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 0;
}

.portal-grid article {
    align-content: start;
}

.about-section {
    display: grid;
    gap: 2rem;
    grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1.2fr);
}

.panel-heading {
    align-items: start;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.inline-form {
    background: #f4f8f5;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 1rem;
    margin: 1rem 0 1.25rem;
    padding: 1rem;
}

.check-field {
    align-items: center;
    display: flex;
    flex-direction: row;
    gap: 0.6rem;
}

.check-field input {
    min-height: auto;
    width: auto;
}

label {
    color: var(--ink);
    display: grid;
    flex: 1 1 240px;
    font-weight: 800;
    gap: 0.45rem;
}

input,
textarea,
select {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    min-height: 42px;
    padding: 0.7rem 0.8rem;
    width: 100%;
}

textarea {
    resize: vertical;
}

.form-status {
    color: var(--green);
    font-weight: 800;
    margin: 0;
}

.form-status.error {
    color: var(--danger);
}

.auth-page {
    align-items: center;
    display: grid;
    min-height: calc(100vh - 76px);
    padding: 3rem 5vw;
}

.auth-card {
    margin: 0 auto;
    max-width: 460px;
    width: 100%;
}

.auth-card h1 {
    font-size: clamp(2.25rem, 6vw, 4rem);
}

.admin-page {
    padding: 4rem 5vw;
}

.dashboard-page {
    padding: 4rem 5vw;
}

.dashboard-hero {
    background:
        linear-gradient(110deg, rgba(23, 59, 49, 0.96), rgba(47, 95, 127, 0.72)),
        url("https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?auto=format&fit=crop&w=1600&q=80");
    background-position: center;
    background-size: cover;
    border-radius: 8px;
    color: #fff;
    margin-bottom: 1rem;
    padding: clamp(2rem, 7vw, 5rem);
}

.dashboard-hero h1 {
    font-size: clamp(2.5rem, 7vw, 5.5rem);
}

.dashboard-hero p:not(.eyebrow) {
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.1rem;
    line-height: 1.7;
    max-width: 760px;
}

.role-dashboard {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
}

.role-dashboard article {
    background: var(--surface-strong);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 18px 48px rgba(23, 37, 31, 0.07);
    padding: 1.4rem;
}

.role-dashboard p,
.role-dashboard li {
    color: var(--muted);
    line-height: 1.65;
}

.role-dashboard ul {
    margin-bottom: 0;
    padding-left: 1.2rem;
}

.stat-strip {
    display: grid;
    gap: 0.8rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 1rem;
}

.stat-strip div {
    background: var(--green-soft);
    border-radius: 8px;
    display: grid;
    gap: 0.35rem;
    padding: 1rem;
}

.stat-strip span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.stat-strip strong {
    color: var(--green);
}

.admin-heading {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}

.admin-heading h1 {
    font-size: clamp(2.5rem, 6vw, 5rem);
}

.admin-grid {
    display: grid;
    gap: 1rem;
}

.admin-panel {
    padding: 1.2rem;
}

.table-wrap {
    overflow-x: auto;
}

table {
    border-collapse: collapse;
    min-width: 780px;
    width: 100%;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 0.9rem;
    text-align: left;
    vertical-align: top;
}

td strong,
td span {
    display: block;
}

.app-loader {
    align-items: center;
    color: var(--muted);
    display: grid;
    gap: 0.8rem;
    min-height: 100vh;
    place-content: center;
}

.loader-mark {
    align-items: center;
    background: var(--green);
    border-radius: 8px;
    color: var(--gold);
    display: inline-flex;
    font-weight: 900;
    height: 56px;
    justify-content: center;
    justify-self: center;
    width: 56px;
}

#blazor-error-ui {
    background: #fff4cf;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.16);
    display: none;
    left: 0;
    padding: 0.75rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
}

@media (max-width: 900px) {
    .hero,
    .split-section,
    .contact-section,
    .calculator-section,
    .portal-section,
    .about-section,
    .feature-grid,
    .article-grid,
    .portal-grid,
    .result-grid,
    .role-dashboard,
    .stat-strip {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: auto;
    }
}
