/* Gridgeon – the parts of the live site around the game: footer, cookie banner, statistics, ads, text pages.
   Uses the colours and fonts of style.css. */

.lnk { border: 0; background: none; padding: 0; font: inherit; color: var(--gold); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.lnk:hover, .sitefoot a:hover { color: #fff; }

/* footer */
.sitefoot { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px; padding-top: 14px; border-top: 3px solid var(--panel-edge); font-size: 15px; }
.sitefoot a, .sitefoot .lnk { color: var(--ink-soft); text-decoration: none; }
.sitefoot a:focus-visible, .lnk:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* cookie banner: sits at the bottom, the game stays usable behind it */
.ggb { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; padding: 10px 12px; background: var(--panel); border-top: 3px solid var(--gold); box-shadow: 0 -6px 0 rgba(5, 7, 14, .45); }
.ggb-in { max-width: 1048px; margin: 0 auto; display: flex; align-items: center; gap: 12px 22px; flex-wrap: wrap; }
.ggb p { margin: 0; flex: 1 1 420px; font-size: 15.5px; line-height: 1.38; }
.ggb a { color: var(--gold); }
.ggb-btns { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; }
.ggb-btns .btn { min-width: 150px; }   /* both answers look the same on purpose */

/* dialogs made by site.js */
.ggdlg { width: min(520px, calc(100vw - 32px)); }
.ggbody { display: flex; flex-direction: column; gap: 12px; }
.ggbody p { margin: 0; }
.ggbody a:not(.btn) { color: var(--gold); }
.ggbody .row { display: flex; gap: 10px; flex-wrap: wrap; }
.ggbody a.btn { display: inline-block; text-decoration: none; color: var(--ink); }

.ggtiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; text-align: center; }
.ggtiles div { background: #12152a; border: 2px solid var(--line); border-radius: 3px; padding: 8px 4px 6px; display: flex; flex-direction: column; gap: 2px; }
.ggtiles b { font: 700 30px/1 var(--display); color: var(--gold); }
.ggtiles span { font-size: 13.5px; color: var(--ink-soft); line-height: 1.15; }
.ggdist { display: flex; flex-direction: column; gap: 4px; }
.ggdist div { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 8px; align-items: center; }
.ggdist span { font: 700 16px/1 var(--display); color: var(--ink-soft); text-align: right; }
.ggdist i { font: 700 14px/1 var(--display); font-style: normal; background: #2a3054; color: var(--ink-soft); padding: 4px 6px; text-align: right; border-radius: 2px; min-width: 24px; }
.ggdist i.on { background: var(--green); color: #10231a; }
.ggnext { font-size: 18px; }
.ggnext b { font: 700 22px/1 var(--display); color: var(--gold); font-variant-numeric: tabular-nums; }

.ggopts { display: flex; flex-direction: column; gap: 10px; }
.ggopts label { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; background: #12152a; border: 2px solid var(--line); border-radius: 3px; padding: 10px 12px; cursor: pointer; }
.ggopts input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--gold); }
.ggopts b { display: block; font: 700 18px/1.2 var(--display); color: var(--gold); }
.ggopts span { font-size: 15.5px; line-height: 1.38; }

/* ads */
.adbox { min-height: 120px; }
.adbox.below { margin-top: 4px; }
.adlbl { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 4px; }
.adhouse { display: flex; flex-direction: column; gap: 6px; color: var(--ink); text-decoration: none; }
.adhouse img { display: block; max-width: 100%; height: auto; image-rendering: auto; border-radius: 2px; }
.adhouse span { color: var(--gold); text-decoration: underline; text-underline-offset: 2px; }

/* imprint and privacy pages */
html.doc, html.doc body { height: auto; overflow: visible; }
html.doc body { image-rendering: auto; }
html.doc .page { height: auto; max-width: 780px; container-type: normal; }
.docmast { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-bottom: 3px solid var(--panel-edge); padding-bottom: 10px; }
.docmast a { font: 700 26px/1.1 var(--display); color: var(--gold); text-decoration: none; }
.doctext { background: var(--panel); border: 3px solid var(--panel-edge); border-radius: 3px; padding: 22px 24px 26px; }
.doctext h1 { font: 700 34px/1.15 var(--display); color: var(--gold); margin: 0 0 14px; }
.doctext h2 { font: 700 23px/1.2 var(--display); color: var(--gold); margin: 26px 0 8px; }
.doctext p, .doctext ul, .doctext table { margin: 0 0 12px; max-width: 68ch; }
.doctext ul { padding-left: 22px; }
.doctext li { margin-bottom: 4px; }
.doctext a { color: var(--gold); }
.doctext address { font-style: normal; margin: 0 0 12px; }
.doctext table { border-collapse: collapse; width: 100%; max-width: none; font-size: 15.5px; }
.doctext th, .doctext td { text-align: left; vertical-align: top; padding: 6px 10px 6px 0; border-bottom: 2px solid var(--line); }
.doctext th { color: var(--ink-soft); font-weight: 500; }
.doctext code { font-size: .92em; background: #12152a; padding: 1px 5px; border-radius: 2px; }
.doctext .de { color: var(--ink-soft); }
.tablewrap { overflow-x: auto; }
/* a field that still has to be filled in before going live */
.todo { background: #ffcd75; color: #171a2e; padding: 0 4px; border-radius: 2px; font-weight: 700; }

@media (max-width: 860px) {
  /* one more line on the phone screen: the footer. The map gives up exactly that much height. */
  .board { width: min(100%, calc((100cqh - 346px) * 1.068)); }
  .sitefoot { order: 5; flex: none; flex-wrap: nowrap; gap: 0 16px; padding: 0; border: 0; font-size: 13px; line-height: 18px; white-space: nowrap; }
  .ggb { padding: 10px; }
  .ggb p { font-size: 14.5px; flex-basis: 100%; }
  .ggb-btns { width: 100%; }
  .ggb-btns .btn { flex: 1; min-width: 0; padding: 8px 6px; }
  .ggtiles b { font-size: 25px; }
  .adbox.below { display: none; }
  html.doc .sitefoot { flex-wrap: wrap; white-space: normal; font-size: 15px; line-height: 1.5; padding-top: 12px; border-top: 3px solid var(--panel-edge); }
  .doctext { padding: 16px 14px 18px; }
  .doctext h1 { font-size: 28px; }
}
