/* Golden hour calculator GLD-27. Instrument Sheet chassis, accent #8A5C14. Shared by /, /<city>/ and the sibling instrument. */
:root{
  --paper:#EDE9E2;
  --ink:#1E1D1B;
  --panel:#DEDACF;
  --line:#B7B0A2;
  --chassis:#2A2924;
  --accent:#8A5C14;
  --on-accent:#EDE9E2;      /* paper on the slab: 4.7:1 and up at this accent */
  --slab-paper:#EDE9E2;
  --slab-ink:#1E1D1B;
  --hair:rgba(237,233,226,.28);
  --font-ui:"Familjen Grotesk",system-ui,sans-serif;
  --font-spec:"Martian Mono",ui-monospace,monospace;
  --ease:cubic-bezier(.2,.8,.2,1);
}
@media (prefers-color-scheme:dark){
  :root{--paper:#1E1D1B;--ink:#EDE9E2;--panel:#2A2924;--line:#4A473F;--chassis:#111}
}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--font-ui);font-size:1rem;line-height:1.55;overflow-x:hidden}
a{color:inherit}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
button{font:inherit;color:inherit}
h1,h2,h3,p,dl,dd,ol,ul,figure,pre,fieldset,blockquote{margin:0}
ol,ul{padding:0;list-style:none}
[hidden]{display:none!important}
code{font-family:var(--font-spec);font-size:.8em}
small{font-size:.875rem}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* label strip */
.strip{max-width:1120px;margin:0 auto;padding:18px 32px 0;display:flex;justify-content:space-between;align-items:baseline;font-family:var(--font-spec);font-size:.75rem;font-weight:500;letter-spacing:.02em;border-bottom:1px solid var(--line)}
.strip-maker{text-decoration:none;padding-bottom:12px}
.strip-maker:hover{text-decoration:underline;text-underline-offset:3px}
.strip-code{padding-bottom:12px}

/* page */
.wrap{max-width:1120px;margin:0 auto;padding:40px 32px 0}
.title{font-size:4.5rem;font-weight:600;line-height:1;letter-spacing:-.01em;margin-bottom:16px;overflow-wrap:anywhere}
.lede{font-size:1.125rem;max-width:64ch;margin-bottom:28px}
.lede strong{font-weight:600}
.subhead{font-size:1.375rem;font-weight:500;line-height:1.25}
.section-head{font-size:2rem;font-weight:600;line-height:1.1;margin:40px 0 14px}

/* the slab: the one accent shape. The sky band is the instrument, the sun its needle */
.hero{position:relative;background:var(--accent);color:var(--on-accent);padding:32px 40px 30px;overflow:hidden;isolation:isolate}
.hero::before,.hero::after,.hero>.ticks::before,.hero>.ticks::after{content:"";position:absolute;width:14px;height:14px;border:0 solid var(--on-accent);pointer-events:none;z-index:3}
.hero::before{top:0;left:0;border-top-width:1px;border-left-width:1px}
.hero::after{top:0;right:0;border-top-width:1px;border-right-width:1px}
.hero>.ticks::before{bottom:0;left:0;border-bottom-width:1px;border-left-width:1px}
.hero>.ticks::after{bottom:0;right:0;border-bottom-width:1px;border-right-width:1px}
/* the plate: a single-colour woodcut, multiplied into the slab so its paper becomes the slab and its ink a deeper shade */
.hero .art{position:absolute;inset:0;z-index:-1;background:url(/img/plate.jpg) right center / cover no-repeat;mix-blend-mode:multiply;opacity:.42;pointer-events:none;filter:contrast(1.05)}
.hero>*:not(.ticks):not(.art){position:relative}
.head{display:flex;flex-wrap:wrap;justify-content:space-between;gap:6px 24px;margin-bottom:18px}
.where{font-size:1.125rem;font-weight:500}
.approx{font-weight:400;opacity:.85}
.when{font-size:1.125rem}

/* the enormous readout */
.big{display:flex;flex-direction:column;margin-bottom:22px}
.big-pair{flex-direction:row;flex-wrap:wrap;gap:12px 64px}
.big-pair>div{display:flex;flex-direction:column}
.big-label{font-family:var(--font-spec);font-size:.75rem;font-weight:500;letter-spacing:.02em;margin-bottom:6px}
.big-num{font-size:5.5rem;font-weight:600;line-height:.95;letter-spacing:-.015em;font-variant-numeric:tabular-nums}
.big-sub{font-size:1.125rem;margin-top:10px;max-width:60ch}

/* the sky band */
.sky{position:relative;display:block;width:100%;aspect-ratio:1440/300;max-height:340px;overflow:visible;border:1px solid var(--hair);background:var(--accent);cursor:ew-resize;touch-action:none;user-select:none;-webkit-user-select:none}
.sky:focus-visible{outline:2px solid var(--on-accent);outline-offset:3px}
.sky-svg{display:block;width:100%;height:100%}
.sky-night{fill:rgba(0,0,0,.46)}
.sky-astro{fill:rgba(0,0,0,.34)}
.sky-nautical{fill:rgba(0,0,0,.22)}
.sky-civil{fill:rgba(0,0,0,.1)}
.sky-gold{fill:rgba(237,233,226,.22)}
.sky-blue{fill:rgba(30,40,110,.32)}
.sky-horizon{stroke:var(--on-accent);stroke-width:1;opacity:.8;vector-effect:non-scaling-stroke}
.sky-arc{fill:none;stroke:var(--on-accent);stroke-width:2;opacity:.9}
.sky-tick{stroke:var(--on-accent);stroke-width:1;opacity:.7;vector-effect:non-scaling-stroke}
.sky-hours{position:absolute;left:0;right:0;bottom:0;height:22px;font-family:var(--font-spec);font-size:.6875rem;font-weight:500;letter-spacing:.02em;pointer-events:none}
.sky-hours b{position:absolute;bottom:3px;margin-left:6px;font-weight:500;opacity:.9}
.sky-needle{stroke:var(--on-accent);stroke-width:1;opacity:.55;vector-effect:non-scaling-stroke;stroke-dasharray:4 4}
.sky-sun{position:absolute;width:26px;height:26px;margin:-13px 0 0 -13px;background:var(--slab-paper);border:1.5px solid var(--slab-ink);border-radius:50%;pointer-events:none;will-change:left,top}
.sky.is-scrubbed .sky-sun{border-width:2.5px}

.scrub{margin-top:14px}
.scrub-line{font-size:1.25rem;display:flex;flex-wrap:wrap;gap:4px 14px;align-items:baseline}
.scrub-time{font-size:2rem;font-weight:600;line-height:1;font-variant-numeric:tabular-nums}
.scrub-phase{font-size:1.125rem}
.scrub-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;margin-top:10px}
.hint{font-size:.9375rem;opacity:.9}

/* buttons */
.btn{position:relative;display:inline-block;padding:12px 18px;border:1px solid var(--ink);background:var(--paper);color:var(--ink);font-weight:500;line-height:1.2;cursor:pointer;border-radius:0;text-decoration:none}
.btn:hover{background:var(--panel)}
.btn:disabled{opacity:.45;cursor:default}
.btn-primary{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}
.btn-primary:hover{background:var(--accent)}
.btn-primary .ticks{position:absolute;inset:0;pointer-events:none}
.btn-primary::before,.btn-primary::after,.btn-primary .ticks::before,.btn-primary .ticks::after{content:"";position:absolute;width:14px;height:14px;border:0 solid var(--accent);opacity:0;pointer-events:none}
.btn-primary::before{top:-6px;left:-6px;border-top-width:1px;border-left-width:1px}
.btn-primary::after{top:-6px;right:-6px;border-top-width:1px;border-right-width:1px}
.btn-primary .ticks::before{bottom:-6px;left:-6px;border-bottom-width:1px;border-left-width:1px}
.btn-primary .ticks::after{bottom:-6px;right:-6px;border-bottom-width:1px;border-right-width:1px}
.btn-primary:hover::before,.btn-primary:hover::after,.btn-primary:hover .ticks::before,.btn-primary:hover .ticks::after,
.btn-primary:focus-visible::before,.btn-primary:focus-visible::after,.btn-primary:focus-visible .ticks::before,.btn-primary:focus-visible .ticks::after{opacity:1}
.btn-paper{background:var(--slab-paper);border-color:var(--slab-paper);color:var(--slab-ink)}
.btn-paper:hover{background:#DEDACF}
.btn-now{background:transparent;border-color:var(--on-accent);color:var(--on-accent)}
.btn-now:hover{background:rgba(237,233,226,.14)}
.btn-now:focus-visible{outline-color:var(--on-accent)}

/* search */
.search-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px 12px;align-items:end;margin:28px 0 0}
.search-label{grid-column:1 / -1;font-weight:500}
.field{display:block;width:100%;font:inherit;font-size:1rem;line-height:1.3;color:var(--ink);background:var(--paper);border:1px solid var(--line);border-radius:0;padding:10px 12px;min-height:46px}
.field::placeholder{color:var(--ink);opacity:.5}
.field:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.pick{position:relative;min-width:0}
.pick-list{position:absolute;left:0;right:0;top:calc(100% + 4px);z-index:6;background:var(--paper);color:var(--ink);border:1px solid var(--ink);max-height:360px;overflow:auto}
.pick-list li{display:flex;justify-content:space-between;gap:12px;align-items:baseline;padding:9px 12px;border-bottom:1px solid var(--line);cursor:pointer}
.pick-list li:last-child{border-bottom:0}
.pick-list li[aria-selected=true],.pick-list li:hover{background:var(--accent);color:var(--on-accent)}
.pick-name{font-weight:500;overflow-wrap:anywhere}
.pick-where{font-size:.875rem;opacity:.8;text-align:right;overflow-wrap:anywhere}
.pick-none{padding:9px 12px;font-size:.9375rem;opacity:.75;cursor:default}
.search-row .btn-paper{background:var(--paper);border-color:var(--ink);color:var(--ink)}
.search-row .btn-paper:hover{background:var(--panel)}
.search-row .btn-paper.is-busy{opacity:.6}

/* reading line */
.reading{font-family:var(--font-spec);font-size:.75rem;font-weight:500;letter-spacing:.02em;white-space:pre-wrap;margin:12px 0 0}

/* under the slab: today's events + the table ahead */
.under{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:24px 32px;margin-top:32px;align-items:start}
.today{grid-column:span 5;min-width:0}
.aheadwrap{grid-column:span 7;min-width:0}
.events{margin-top:12px;border-top:1px solid var(--line)}
.ev{display:grid;grid-template-columns:minmax(0,13ch) minmax(0,1fr);gap:4px 16px;padding:9px 0;border-bottom:1px solid var(--line);align-items:baseline}
.ev dt{font-weight:500}
.ev dd{font-variant-numeric:tabular-nums}
.ev dd small{display:block;opacity:.8}
.ev-len dd{font-weight:600}
.ev-len dd small{display:inline;font-weight:400;margin-left:8px}
.ahead{width:100%;border-collapse:collapse;margin-top:12px;font-variant-numeric:tabular-nums}
.ahead th,.ahead td{text-align:left;padding:8px 10px 8px 0;border-bottom:1px solid var(--line);vertical-align:top}
.ahead thead th{font-family:var(--font-spec);font-size:.6875rem;font-weight:500;letter-spacing:.02em;border-bottom:1px solid var(--ink)}
.ahead tbody th{font-weight:500;white-space:nowrap}
.ahead td.num{white-space:nowrap}
.ahead td.delta{opacity:.8}
.ahead tr:first-child td,.ahead tr:first-child th{background:var(--panel)}

/* notes */
.notegrid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:24px 32px;margin-top:40px}
.tabnotes{grid-column:span 4;min-width:0}
.tabnotes p{margin-top:8px;font-size:.9375rem}
.notes{display:grid;grid-template-columns:repeat(12,minmax(0,1fr))}
.notes>*{grid-column:span 8}
.notes p{max-width:68ch;margin-bottom:14px}

/* city links */
.citylinks{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:0 24px;border-top:1px solid var(--line)}
.citylinks a{display:flex;justify-content:space-between;gap:10px;align-items:baseline;padding:8px 0;border-bottom:1px solid var(--line);text-decoration:none}
.citylinks a:hover{text-decoration:underline;text-underline-offset:3px}
.citylinks a small{opacity:.7;text-align:right;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:55%}
.citylinks-tight{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}

/* landing */
.landing-empty{min-height:420px;display:flex;align-items:center;justify-content:center;background:var(--accent);color:var(--on-accent);font-size:1.25rem;padding:32px}

.foot{max-width:1120px;margin:0 auto;padding:20px 32px 40px;font-size:.875rem;opacity:.8}

@media (max-width:960px){
  .today,.aheadwrap{grid-column:span 12}
  .tabnotes{grid-column:span 6}
}
@media (max-width:760px){
  .strip,.wrap,.foot{padding-left:16px;padding-right:16px}
  .title{font-size:2.5rem}
  .hero{padding:22px 18px 20px}
  .big-num{font-size:2.75rem}
  .big-pair{gap:8px 24px}
  .sky{max-height:none;aspect-ratio:1440/520}
  .sky-sun{width:20px;height:20px;margin:-10px 0 0 -10px}
  .notes>*{grid-column:span 12}
  .tabnotes{grid-column:span 12}
  .search-row{grid-template-columns:1fr}
  .ahead th,.ahead td{font-size:.9375rem;padding-right:6px}
}
@media (max-width:420px){
  .big-num{font-size:2.4rem}
  .scrub-time{font-size:1.5rem}
}
@media (prefers-reduced-motion:reduce){
  *{transition:none!important;animation:none!important}
}
