@font-face { font-family: 'Archivo'; font-weight: 400 800; font-stretch: 62% 125%; font-display: swap; src: url(/fonts/Archivo.woff2) format('woff2'); }
@font-face { font-family: 'Josefin Sans'; font-weight: 100 700; font-display: swap; src: url(/fonts/JosefinSans.woff2) format('woff2'); }
@font-face { font-family: 'Newsreader'; font-weight: 400 600; font-display: swap; src: url(/fonts/Newsreader.woff2) format('woff2'); }
@font-face { font-family: 'Newsreader'; font-style: italic; font-weight: 400; font-display: swap; src: url(/fonts/Newsreader-italic.woff2) format('woff2'); }

:root {
  --paper: #ece6d8;
  --card: #f8f4ea;
  --ink: #262b2c;
  --muted: #5f625e;
  --line: rgba(38, 43, 44, .22);
  --red: #cf5f2c;          /* burnt orange: buttons */
  --red-dark: #a9481d;
  --blue: #2c6d69;         /* teal: links */
  --gold: #e2a72e;         /* mustard */
  --ok: #2d6a3b;
  --warn: #8a5a0f;
  --err: #a3301c;
  --head: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --display: 'Josefin Sans', 'Gill Sans', 'Futura', sans-serif;   /* the deco accent, used sparingly */
  --text: 'Newsreader', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1c2021;
    --card: #262b2c;
    --ink: #ece6d8;
    --muted: #a6a59c;
    --line: rgba(236, 230, 216, .22);
    --red: #e0763f;
    --red-dark: #c25f2b;
    --blue: #7fc2bb;
    --ok: #8fcf9a;
    --warn: #e7b866;
    --err: #f08a74;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body, html { margin: 0; }
body { font: 1.125rem/1.6 var(--text); color: var(--ink); background: var(--paper); }
a { color: var(--blue); text-underline-offset: .18em; }
b { font-weight: 600; }

/* ---------- header: the view from the prom */

.sky { position: relative; overflow: hidden; background: #a7c8c9; isolation: isolate; }
.sky.home { height: clamp(340px, 46vw, 900px); }
.sky.sub { height: clamp(170px, 24vw, 240px); }
.sky .seafront { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.sky .bunting { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: max(100%, 760px); height: auto; color: #262b2c; }

.masthead { position: absolute; left: 0; right: 0; top: 22%; padding: 0 max(1.25rem, 6vw); color: #262b2c; }
.sky.sub .masthead { top: auto; bottom: 26%; }
.kicker { font: 700 .8rem/1 var(--display); letter-spacing: .32em; text-transform: uppercase; margin: 0 0 .6rem; opacity: .9; }
.title { font: 800 clamp(3rem, 9vw, 7rem)/.85 var(--head); font-stretch: 112%; letter-spacing: -.035em; margin: 0; }
.title.small { font-size: clamp(1.6rem, 3.6vw, 2.3rem); color: inherit; text-decoration: none; background: #f4efe3; padding: .15em .4em .2em; }
.tagline { font: italic 1.25rem/1.3 var(--text); margin: .6rem 0 0; }

/* ---------- the notice pinned to the railings */

main {
  position: relative;
  max-width: 42rem;
  margin: -2.75rem auto 0;
  padding: 2rem clamp(1.1rem, 4vw, 2.75rem) 2.25rem;
  background: var(--card);
  border-top: 8px solid transparent;
  border-image: linear-gradient(90deg, #e2a72e 0 22%, #f4efe3 22% 30%, #3d8580 30% 58%, #cf5f2c 58% 74%, #262b2c 74% 100%) 1;
  box-shadow: 0 1px 0 var(--line), 0 18px 40px -24px rgba(10, 14, 30, .55);
}
main.wide { max-width: 66rem; }
@media (max-width: 44rem) { main { margin: -1.5rem .75rem 0; } }

h1, h2, h3 { font-family: var(--head); font-weight: 750; text-transform: lowercase; letter-spacing: -.01em; line-height: 1.1; }
h1 { font-size: 2.2rem; margin: 0 0 1.25rem; }
h2 { font-size: 1.45rem; margin: 2.25rem 0 .75rem; padding-top: 1.25rem; border-top: 1px solid var(--line); display: flex; align-items: center; gap: .65rem; }
main > h2:first-child, main > h1 + h2 { margin-top: 0; padding-top: 0; border-top: 0; }
h2 .flag { height: 1em; }

p { margin: 0 0 .9rem; }
.small { font-size: .95rem; color: var(--muted); }
.lede { font-size: 1.25rem; line-height: 1.5; }
.back { font: 600 .95rem/1 var(--head); margin-bottom: 1.5rem; }
.back a { text-decoration: none; }

.flag { height: 1.2em; width: auto; vertical-align: -.2em; flex: none; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .15)); }

/* ---------- forms */

label { display: block; margin: 1rem 0; font: 600 .95rem/1.2 var(--head); color: var(--muted); }
input, textarea {
  font: 1.1rem/1.4 var(--text); color: var(--ink);
  padding: .55rem .7rem; width: 100%; margin-top: .4rem;
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 2px;
}
input:focus, textarea:focus { outline: 3px solid var(--gold); outline-offset: 1px; border-color: transparent; }
textarea { font: .9rem/1.5 ui-monospace, 'Cascadia Mono', Menlo, monospace; }
.addr { display: flex; align-items: stretch; margin-top: .4rem; }
.addr input { margin: 0; min-width: 0; flex: 1; border-right: 0; border-radius: 2px 0 0 2px; }
.addr span { display: flex; align-items: center; padding: 0 .75rem; font: 1.05rem var(--text); text-transform: none; letter-spacing: 0; color: var(--ink); border: 1.5px solid var(--line); border-radius: 0 2px 2px 0; background: var(--card); }

button, .button {
  display: inline-block; font: 700 1.05rem/1 var(--head); text-transform: lowercase;
  padding: .75em 1.3em .8em; margin: .35rem .4rem .35rem 0;
  color: #fff8ec; background: var(--red); border: 0; border-radius: 3em; cursor: pointer; text-decoration: none;
}
button:hover, .button:hover { background: var(--red-dark); }
button.secondary { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
button.secondary:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
button.link { background: none; box-shadow: none; color: var(--blue); padding: .3em .35em .2em; margin: 0; font-size: .95rem; text-decoration: underline; text-underline-offset: .2em; }
form { margin: .5rem 0; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; }

/* ---------- signals (status notices) */

.notice { display: flex; gap: .85rem; align-items: flex-start; padding: .85rem 1rem; margin: 0 0 1.25rem; background: var(--paper); border-left: 4px solid currentColor; }
.notice .flag { height: 1.6rem; margin-top: .1rem; }
.notice div { color: var(--ink); }
.notice p:last-child { margin: 0; }
.notice.ok { color: var(--ok); }
.notice.warn { color: var(--warn); }
.notice.err { color: var(--err); }
.notice.note { color: var(--blue); }

/* ---------- the flat's own address, with its number run up the halyard */

.mailbox { display: flex; align-items: center; gap: 1.25rem; margin: 0 0 1.75rem; padding: 0 0 1.5rem; border-bottom: 1px solid var(--line); }
.mailbox .hoist { width: 4.4rem; height: auto; max-height: 11rem; flex: none; color: var(--muted); }
.mailbox .flags { display: flex; flex-wrap: wrap; gap: .3rem; max-width: 9rem; flex: none; }
.mailbox .flags .flag { height: 1.8rem; }
.mailbox .num { font: 800 clamp(3rem, 10vw, 4.6rem)/1 var(--head); letter-spacing: -.03em; margin: 0; word-break: break-all; }
.mailbox .dom { font: italic 1.2rem/1.2 var(--text); color: var(--muted); margin: .2rem 0 0; }
.example { display: flex; align-items: center; gap: .75rem; margin: 1.5rem 0 0; }
.example .hoist { width: 2.4rem; height: auto; color: var(--muted); flex: none; }

/* ---------- admin */

.scroll { overflow-x: auto; margin: 0 0 1rem; }
table { border-collapse: collapse; width: 100%; font-size: 1rem; }
th { font: 700 .9rem/1.2 var(--head); text-transform: lowercase; color: var(--muted); text-align: left; padding: .5rem; border-bottom: 2px solid var(--ink); }
td { padding: .45rem .5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:hover td { background: var(--paper); }
td.actions form { margin: 0; white-space: nowrap; }
.status { display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; }
.status .flag { height: 1rem; }
.ok { color: var(--ok); } .warn { color: var(--warn); } .err { color: var(--err); }
code { font: .85em ui-monospace, Menlo, monospace; background: var(--paper); padding: .05em .3em; border-radius: 2px; }

/* ---------- footer */

footer { max-width: 42rem; margin: 0 auto; padding: 2rem 1.25rem 3rem; text-align: center; font: .9rem/1.6 var(--head); color: var(--muted); }
footer p { margin: 0; }
footer .bunting { display: block; width: min(36rem, 100%); height: auto; margin: 0 auto 1rem; color: var(--muted); }
footer b { font-weight: 700; color: var(--ink); }
