/* allagolfbanor.se: one stylesheet, system fonts, no scripts. */
:root {
  --bg: #fbfcf9; --surface: #ffffff; --ink: #17231c; --muted: #4d5c53; --line: #d5ddd5;
  --brand: #1f4d33; --link: #1b5e8f; --tag-bg: #e3efe3; --tag-ink: #1f4d33; --focus: #e8a33d;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121915; --surface: #18201b; --ink: #e8eee9; --muted: #b0bdb4; --line: #34413a;
    --brand: #9fd3ae; --link: #8cc4f0; --tag-bg: #24372b; --tag-ink: #b9e3c4; color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { font-size: 112.5%; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1rem/1.6 var(--font); }
img { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: .15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.wrap { max-width: 72rem; margin: 0 auto; padding-left: max(1rem, env(safe-area-inset-left)); padding-right: max(1rem, env(safe-area-inset-right)); }
.skip { position: absolute; left: -9999px; top: 0; background: var(--surface); padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }

.site-header { background: #1f4d33; }
.site-header .wrap { padding-block: .7rem; }
.logo { display: inline-block; line-height: 0; }
.logo img { display: block; width: auto; height: 3rem; filter: invert(1); }
@media (prefers-color-scheme: dark) { .site-header { background: #1c3326; } }
@media (max-width: 30rem) { .logo img { height: 2.4rem; } }

.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .2rem .5rem; margin: 1rem 0 0; padding: 0; font-size: .9rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: .5rem; color: var(--muted); }

main { padding-block: 1rem 3rem; }
h1, h2, h3, h4, h5 { line-height: 1.2; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 5vw, 2.7rem); margin: .6rem 0 1.2rem; }
h2 { font-size: 1.6rem; margin: 2.6rem 0 1rem; padding-top: .4rem; border-top: 3px solid var(--brand); }
h3 { font-size: 1.3rem; margin: 2rem 0 .8rem; }
h4, h5 { font-size: 1.05rem; margin: 1.4rem 0 .5rem; }
p { max-width: 68ch; }
.lead { font-size: 1.05rem; }

/* lists of courses */
.course-list, .lan-list { list-style: none; padding: 0; margin: 0; columns: 20rem; column-gap: 2rem; }
.course-list li, .lan-list li { break-inside: avoid; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.course-list a, .lan-list a { font-weight: 600; }
.meta { display: block; color: var(--muted); font-size: .9rem; }
.lan-list .meta { display: inline; margin-left: .3rem; }
.tag { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .02em; background: var(--tag-bg); color: var(--tag-ink); padding: .05rem .45rem; border-radius: 3px; }

/* tables */
.table-wrap { overflow-x: auto; margin: 1rem 0; }
table { border-collapse: collapse; min-width: 16rem; font-variant-numeric: tabular-nums; }
caption { text-align: left; font-weight: 700; padding-bottom: .35rem; }
th, td { padding: .4rem .7rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
thead th { font-size: .85rem; color: var(--muted); font-weight: 600; border-bottom-width: 2px; }
tbody th { font-weight: 600; }
.n { text-align: right; }
tfoot th, tfoot td { font-weight: 700; border-bottom: 0; border-top: 2px solid var(--line); }
.scorecard a { display: inline-block; min-width: 2.75rem; padding: .1rem 0; font-weight: 700; }
.swatch { display: inline-block; width: .85rem; height: .85rem; border-radius: 50%; margin-right: .3rem; vertical-align: -.05rem; border: 1px solid rgba(0, 0, 0, .35); }

/* banguide */
.overview { margin: 1rem 0 0; }
.overview img { display: block; width: auto; max-width: 100%; max-height: 44rem; border: 1px solid var(--line); }
.hole { border-top: 1px solid var(--line); margin-top: 2rem; scroll-margin-top: 1rem; }
.hole-grid { display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: 1.5rem 2.5rem; align-items: start; }
.hole-map { margin: 0; }
.hole-map img { display: block; width: auto; max-width: 100%; max-height: 46rem; border: 1px solid var(--line); }
.hole-facts { min-width: 0; }
.key { display: flex; flex-wrap: wrap; gap: .5rem 2rem; margin: 0 0 .5rem; }
.key dt { font-size: .85rem; color: var(--muted); }
.key dd { margin: 0; font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.green { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; }
.green img { width: 13rem; border: 1px solid var(--line); }
.facts { display: grid; grid-template-columns: auto 1fr; gap: .3rem 1rem; margin: 0; }
.facts div { display: contents; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-variant-numeric: tabular-nums; }
.elev { margin: .3rem 0 .5rem; }
.profile { display: block; width: 100%; max-width: 26rem; }
.hole-nav { font-size: .95rem; margin-top: 1rem; }
.hole-nav a { display: inline-block; padding: .4rem 0; }

/* about the course */
.about .facts { margin: 1rem 0 1.5rem; max-width: 40rem; }
.photo, .map figure { margin: 1.5rem 0; max-width: 700px; }
.photo img, .map img { display: block; border: 1px solid var(--line); }
figcaption { font-size: .85rem; color: var(--muted); margin-top: .35rem; }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.site-footer .wrap { padding-block: 1.2rem 2rem; }
.site-footer p { margin: .3rem 0; }

@media (max-width: 46rem) {
  .hole-grid { grid-template-columns: 1fr; }
  .hole-map img { max-height: 36rem; margin: 0 auto; }
  h2 { font-size: 1.45rem; }
}
@media print {
  .site-header, .crumbs, .hole-nav, .nearby, .site-footer { display: none; }
  .hole { break-inside: avoid; }
}
