:root {
    color-scheme: light;
    --ink: #1d2320;
    --muted: #5b6760;
    --line: #d8dfda;
    --surface: #ffffff;
    --soft: #f5f7f6;
    --soft-strong: #edf3f0;
    --accent: #16734a;
    --accent-strong: #0c5c39;
    --accent-soft: #e6f4ec;
    --gold: #b38313;
    --danger: #b42318;
    --danger-soft: #fff1f0;
    --ok-soft: #eef8f1;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--ink);
    background:
        linear-gradient(180deg, rgba(230, 244, 236, 0.9), rgba(245, 247, 246, 0.85) 240px),
        var(--soft);
    line-height: 1.5;
}

main {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 44px;
}

header {
    margin-bottom: 24px;
    padding: 18px 0 4px;
}

h1, h2, h3 {
    margin: 0;
    line-height: 1.2;
}

h1 {
    font-size: clamp(26px, 3vw, 38px);
    letter-spacing: 0;
}

h2 {
    font-size: 22px;
    margin-top: 30px;
}

p {
    margin: 8px 0 0;
    color: var(--muted);
}

form,
.result-area,
details {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(28, 48, 37, 0.08);
}

form {
    padding: 22px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

label {
    display: grid;
    gap: 6px;
    font-weight: 700;
    color: var(--ink);
}

small {
    color: var(--muted);
    font-weight: 400;
}

.field-help {
    color: var(--muted);
    font-size: 13px;
    font-weight: 400;
}

.coordinate-picker {
    margin-bottom: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.picker-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 16px;
    background: var(--soft-strong);
    border-bottom: 1px solid var(--line);
}

.picker-head h2 {
    margin: 0;
    font-size: 18px;
}

.picker-head p {
    margin: 4px 0 0;
    max-width: 760px;
    font-size: 14px;
}

.picker-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.picker-button {
    margin: 0;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--accent-strong);
    padding: 8px 10px;
}

.picker-button.is-active {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

.picker-map {
    min-height: 430px;
    background: var(--soft);
}

.picker-fallback {
    padding: 16px;
    color: var(--muted);
}

.coordinate-readout {
    min-width: 172px;
    padding: 8px 10px;
    border: 1px solid rgba(29, 35, 32, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--ink);
    box-shadow: 0 8px 18px rgba(28, 48, 37, 0.14);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
}

.coordinate-readout span {
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.param-panel {
    margin-top: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfb;
    overflow: hidden;
}

.param-panel summary {
    padding: 16px 18px;
    cursor: pointer;
    font-weight: 800;
    color: var(--accent-strong);
    background: linear-gradient(180deg, #ffffff, var(--soft-strong));
}

.param-body {
    padding: 18px;
    border-top: 1px solid var(--line);
}

.param-intro {
    margin: 0 0 16px;
    color: var(--muted);
}

.param-list {
    display: grid;
    gap: 12px;
}

.param-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(160px, 220px);
    gap: 14px;
    align-items: start;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.param-item strong {
    display: block;
    margin-bottom: 4px;
}

.param-item .field-help {
    display: block;
    line-height: 1.45;
}

.param-check .form-check {
    align-self: center;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0;
}

.param-check .form-check-input {
    width: 48px;
    min-width: 48px;
    height: 24px;
    margin: 0;
    padding: 0;
}

.param-check .form-check-label {
    color: var(--accent-strong);
    font-weight: 800;
}

input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px 11px;
    font: inherit;
    background: #fff;
}

input:focus {
    outline: 2px solid rgba(22, 115, 74, 0.25);
    border-color: var(--accent);
}

button {
    margin-top: 18px;
    border: 0;
    border-radius: 6px;
    background: var(--accent);
    color: #fff;
    padding: 11px 16px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

button:hover {
    background: var(--accent-strong);
}

button:disabled {
    cursor: wait;
    opacity: 0.72;
}

.notice {
    margin: 18px 0;
    border-radius: 8px;
    padding: 12px 14px;
    border: 1px solid var(--line);
}

.notice.error {
    color: var(--danger);
    background: var(--danger-soft);
    border-color: #f1b8b2;
}

.notice.ok {
    background: var(--ok-soft);
    border-color: #b9dec5;
}

.notice.warning {
    background: #fff8e6;
    border-color: #ecd086;
    color: #6f4f05;
}

.notice ul {
    margin: 0;
    padding-left: 20px;
}

.result-area {
    margin-top: 18px;
    padding: 18px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.stat {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: #fff;
}

.stat span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.stat strong {
    display: block;
    margin-top: 4px;
    font-size: 18px;
}

.map {
    width: 100%;
    height: auto;
    margin-top: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

figure {
    margin: 0;
}

.map-caption {
    margin-top: 8px;
    color: var(--muted);
    font-size: 14px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.link-button {
    display: inline-flex;
    align-items: center;
    border-radius: 6px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--accent-strong);
    padding: 9px 12px;
    text-decoration: none;
    font-weight: 700;
}

.output-menu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 20px;
    padding: 16px;
    border: 1px solid rgba(22, 115, 74, 0.22);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(230, 244, 236, 0.95), rgba(255, 255, 255, 0.98)),
        #fff;
}

.output-menu strong,
.output-menu span {
    display: block;
}

.output-menu span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 14px;
}

.output-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.output-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 8px;
    border: 1px solid var(--accent);
    background: #fff;
    color: var(--accent-strong);
    padding: 10px 16px;
    text-decoration: none;
    font-weight: 800;
}

.output-button:hover {
    color: #fff;
    background: var(--accent-strong);
}

.output-button-primary {
    color: #fff;
    background: var(--accent);
}

.process-modal[hidden] {
    display: none;
}

.process-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(18, 27, 22, 0.62);
    backdrop-filter: blur(5px);
}

.process-dialog {
    width: min(620px, 100%);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

.process-head {
    padding: 20px 22px;
    background: linear-gradient(135deg, #0c5c39, #16734a);
    color: #fff;
}

.process-head h2 {
    margin: 0;
    font-size: 22px;
}

.process-head p {
    color: rgba(255, 255, 255, 0.84);
}

.process-body {
    padding: 20px 22px 22px;
}

.progress-track {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--soft-strong);
}

.progress-bar {
    width: 8%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), var(--gold));
    transition: width 500ms ease;
}

.process-steps {
    display: grid;
    gap: 10px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.process-step {
    display: grid;
    grid-template-columns: 26px 1fr;
    gap: 10px;
    align-items: start;
    color: var(--muted);
}

.process-dot {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 2px solid var(--line);
    display: grid;
    place-items: center;
    color: transparent;
    font-size: 13px;
    line-height: 1;
}

.process-step.is-active {
    color: var(--ink);
    font-weight: 700;
}

.process-step.is-active .process-dot {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
}

.process-step.is-done {
    color: var(--muted);
}

.process-step.is-done .process-dot {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

.process-note {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #fff8e6;
    color: #6f4f05;
    font-size: 14px;
}

.table-wrap {
    overflow-x: auto;
    margin-top: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

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

th, td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

th {
    background: #f0f4f2;
    color: var(--ink);
}

tr:last-child td {
    border-bottom: 0;
}

details {
    margin-top: 18px;
    padding: 12px 14px;
}

summary {
    cursor: pointer;
    font-weight: 700;
}

pre {
    white-space: pre-wrap;
    overflow-x: auto;
    margin: 12px 0 0;
    color: var(--ink);
}

.app-shell {
    background-image:
        linear-gradient(rgba(22, 115, 74, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(22, 115, 74, 0.045) 1px, transparent 1px);
    background-size: 44px 44px;
}

.app-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(22, 115, 74, 0.22);
    color: var(--accent-strong);
    background: rgba(255, 255, 255, 0.78);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 800;
}

.route-form,
.result-area,
details {
    border-radius: 8px;
    box-shadow: 0 16px 38px rgba(25, 45, 33, 0.08);
}

.btn,
button.btn,
.link-button {
    margin-top: 0;
    border-radius: 8px;
    font-weight: 700;
}

.btn-success {
    --bs-btn-bg: var(--accent);
    --bs-btn-border-color: var(--accent);
    --bs-btn-hover-bg: var(--accent-strong);
    --bs-btn-hover-border-color: var(--accent-strong);
}

.picker-button {
    margin: 0;
}

.picker-button.is-active {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

.data-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 14px;
}

.service-panel summary {
    display: flex;
    align-items: center;
    gap: 10px;
}

.service-pill {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-weight: 800;
    flex: 0 0 auto;
}

.param-group-title {
    margin: 18px 0 2px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--soft-strong);
    color: var(--accent-strong);
    font-weight: 800;
}

.param-group-title:first-child {
    margin-top: 0;
}

.result-area {
    padding: 22px;
}

.stat {
    border-radius: 8px;
}

.nav-pills .nav-link {
    border-radius: 8px;
    color: var(--accent-strong);
    font-weight: 700;
}

.nav-pills .nav-link.active {
    background: var(--accent);
}

@media (max-width: 760px) {
    main {
        width: min(100% - 20px, 1180px);
        padding-top: 18px;
    }

    .grid,
    .stats {
        grid-template-columns: 1fr;
    }

    .param-item {
        grid-template-columns: 1fr;
    }

    .picker-head {
        display: grid;
    }

    .picker-actions {
        justify-content: flex-start;
    }

    h1 {
        font-size: 24px;
    }
}

main.container-xxl {
    width: min(1320px, calc(100% - 32px));
}

.studio-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: clamp(22px, 4vw, 42px);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(235, 247, 241, 0.94)),
        #fff;
    box-shadow: 0 18px 48px rgba(26, 48, 37, 0.1);
}

.studio-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(90deg, rgba(22, 115, 74, 0.05) 1px, transparent 1px),
        linear-gradient(rgba(22, 115, 74, 0.05) 1px, transparent 1px);
    background-size: 34px 34px;
    pointer-events: none;
}

.studio-hero > * {
    position: relative;
}

.studio-hero h1 {
    max-width: 780px;
    font-size: clamp(34px, 5vw, 62px);
    letter-spacing: 0;
    line-height: 1.04;
}

.hero-copy {
    max-width: 760px;
    margin-top: 18px;
    font-size: clamp(17px, 1.45vw, 21px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.hero-panel {
    display: grid;
    gap: 14px;
}

.terrain-card {
    position: relative;
    min-height: 260px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(140deg, #f7fbf9 0%, #e5f2ec 46%, #d8ece4 100%);
}

.terrain-card::before {
    content: "";
    position: absolute;
    inset: 18px;
    border: 1px solid rgba(22, 115, 74, 0.2);
    border-radius: 8px;
}

.terrain-line,
.route-thread {
    position: absolute;
    display: block;
    border-radius: 999px;
}

.terrain-line {
    left: -10%;
    width: 118%;
    height: 42px;
    border: 2px solid rgba(29, 35, 32, 0.2);
    border-left-color: transparent;
    border-right-color: transparent;
}

.line-a {
    top: 44px;
    transform: rotate(-8deg);
}

.line-b {
    top: 106px;
    transform: rotate(6deg);
}

.line-c {
    top: 168px;
    transform: rotate(-4deg);
}

.route-thread {
    left: 50%;
    top: 28px;
    width: 5px;
    height: 210px;
    background: var(--app-cyan, #00bfd1);
    transform: rotate(20deg);
    box-shadow: 0 0 0 4px rgba(0, 191, 209, 0.18);
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.hero-metrics div {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: #fff;
}

.hero-metrics span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.hero-metrics strong {
    display: block;
    margin-top: 4px;
    color: var(--ink);
    line-height: 1.2;
}

.route-form {
    padding: clamp(18px, 3vw, 28px);
}

.coordinate-picker {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}

.picker-head {
    background:
        linear-gradient(180deg, #ffffff, #eef7f2);
}

.param-panel summary {
    list-style: none;
}

.param-panel summary::-webkit-details-marker {
    display: none;
}

.param-panel summary::after {
    content: "Aç";
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 4px 10px;
    background: #fff;
    color: var(--accent-strong);
    font-size: 13px;
}

.param-panel[open] summary::after {
    content: "Kapat";
}

@media (max-width: 991.98px) {
    .studio-hero h1 {
        font-size: clamp(32px, 8vw, 46px);
    }

    .terrain-card {
        min-height: 210px;
    }
}

@media (max-width: 575.98px) {
    main.container-xxl {
        width: min(100% - 20px, 1320px);
    }

    .hero-metrics {
        grid-template-columns: 1fr;
    }
}
