:root {
    color: #252525;
    font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
    min-height: 100vh;
    margin: 0;
    background: linear-gradient(135deg, #F8F8F8, #E0E0E0);
}

.wayfinder-shell {
    width: min(100% - 48px, 920px);
    margin: 0 auto;
    padding: 48px 0 100px;
}

.wordmark, .quiet-link, footer a {
    color: #737373;
    text-decoration: none;
}

.wordmark { font-size: 14px; }
.wordmark:hover, .quiet-link:hover, footer a:hover { color: #0056b3; text-decoration: underline; }

.masthead { margin: 54px 0 38px; }
.eyebrow {
    margin: 0 0 7px;
    color: #737373;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 9px; font-size: clamp(40px, 7vw, 64px); letter-spacing: -.045em; }
h2 { margin-bottom: 8px; font-size: clamp(25px, 4vw, 36px); letter-spacing: -.025em; }
h3 { margin-bottom: 6px; font-size: 20px; }
.lede, .map-destination { max-width: 620px; color: #555; font-size: 18px; line-height: 1.55; }

.connection, .empty-state { border-top: 1px solid #c8c8c8; border-bottom: 1px solid #c8c8c8; padding: 23px 0; }
.connection-message p { max-width: 560px; margin-bottom: 18px; color: #555; line-height: 1.5; }
.massive-button {
    display: inline-block;
    border: 0;
    border-radius: 8px;
    background-color: #007BFF;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 18px;
    text-align: center;
    text-decoration: none;
    transition: background-color .2s ease;
}
.massive-button:hover { background-color: #0056b3; text-decoration: none; }
.massive-button.compact { padding: 13px 23px; }

.connection-line { display: flex; justify-content: space-between; gap: 16px; color: #555; font-size: 15px; }
.picker-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.1fr) auto; align-items: end; gap: 16px; margin-top: 19px; }
label { display: grid; gap: 7px; color: #555; font-size: 13px; font-weight: 500; }
select, .refresh-button { min-height: 42px; border: 1px solid #bdbdbd; border-radius: 6px; background: #f8f8f8; color: #252525; font: inherit; }
select { width: 100%; padding: 0 10px; }
.refresh-button { padding: 0 16px; cursor: pointer; }
.refresh-button:hover:not(:disabled) { border-color: #007BFF; color: #0056b3; }
select:disabled, .refresh-button:disabled { cursor: not-allowed; opacity: .55; }

.empty-state { margin-top: 35px; color: #555; }
.empty-state p { margin: 0; }
#map-view { margin-top: 42px; }
.map-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.map-heading .quiet-link { white-space: nowrap; padding-top: 6px; }
.map-destination { margin: 0 0 26px; }
.status-summary { display: flex; flex-wrap: wrap; gap: 10px 20px; margin: 0 0 18px; color: #555; font-size: 14px; }
.status-summary b { color: #252525; }
.status-dot { display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 50%; }
.resolved { background: #338a5b; }
.claimed { background: #007BFF; }
.frontier { background: #d28a00; }
.blocked { background: #8a6262; }

.graph-wrap { width: 100%; overflow-x: auto; border-top: 1px solid #c8c8c8; border-bottom: 1px solid #c8c8c8; }
#map-graph { display: block; min-width: 720px; width: 100%; }
.edge { fill: none; stroke: #a9a9a9; stroke-width: 1.35; }
.edge.root-edge { stroke: #c4c4c4; }
.graph-node { cursor: pointer; outline: none; }
.node-body { stroke-width: 1.5; }
.graph-node:focus .node-body, .graph-node:hover .node-body, .graph-node.selected .node-body { stroke: #252525; stroke-width: 2.25; }
.node-resolved { fill: #e7f2eb; stroke: #338a5b; }
.node-claimed { fill: #e8f3ff; stroke: #007BFF; }
.node-frontier { fill: #fff4dc; stroke: #d28a00; }
.node-blocked { fill: #f2eaea; stroke: #8a6262; }
.node-title { fill: #252525; font-size: 13px; font-weight: 500; pointer-events: none; }
.node-meta { fill: #666; font-size: 11px; pointer-events: none; }
.node-label { fill: #666; font-size: 11px; }
.root-node { fill: #f7f7f7; stroke: #777; stroke-width: 1.5; }

.ticket-detail { margin-top: 26px; padding: 21px 0 0; border-top: 1px solid #c8c8c8; }
.ticket-detail > p:not(.eyebrow) { max-width: 700px; margin-bottom: 7px; color: #555; line-height: 1.5; }
footer { padding: 0 25px 24px; color: #aaa; text-align: center; font-size: 12px; }
footer a { margin: 0 9px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (min-width: 1100px) {
    .ad-div-side { position: fixed; top: 0; width: 12%; height: 100%; background-color: #EDEDED; }
    .ad-div-side.left { left: 0; }
    .ad-div-side.right { right: 0; }
}

@media (max-width: 640px) {
    .wayfinder-shell { width: min(100% - 32px, 920px); padding-top: 28px; }
    .masthead { margin: 39px 0 30px; }
    .picker-row { grid-template-columns: 1fr; gap: 13px; }
    .refresh-button { width: 100%; }
    .connection-line, .map-heading { flex-direction: column; gap: 9px; }
    .map-heading .quiet-link { padding-top: 0; }
}
