/* 1618 brand 2026-10, loaded after files.css: the logo tile, EB Garamond, and one plain sign-in page shared with
   the partner dashboard and the 1618 App (tile, "Sign in", where to, fields, one red button). */
:root { --serif: 'EB Garamond', 'Iowan Old Style', Palatino, Georgia, serif; --accent: #A6402D; }

/* file browser header: the tile alone, never next to the name */
body::after, html #bbox-overlay::after {
  content: "" !important; width: 30px; height: 30px; padding: 0 !important; top: 12px !important;
  background: url(/brand/1618-logo-small-128.png?v=2) center / contain no-repeat !important;
}

/* sign-in and share-password pages */
#ht_spl.fx-anon body::before, #ht_spl.fx-shr-in body::before { display: none !important; }
#ht_spl.fx-anon body::after, #ht_spl.fx-shr-in body::after {
  position: absolute; top: max(14vh, 72px) !important; left: 50% !important; margin-left: -190px;
  width: 48px !important; height: 48px !important;
  background: url(/brand/1618-logo-small-128.png?v=2) center / contain no-repeat !important;
}
#ht_spl.fx-anon #wrap, #ht_spl.fx-shr-in #wrap {
  width: 100% !important; align-items: center;
  padding: calc(max(14vh, 72px) + 48px + 34px) 16px 34px !important;
}
#ht_spl.fx-anon #wrap > *, #ht_spl.fx-shr-in #wrap > * { max-width: 380px !important; }
#ht_spl.fx-anon #l::before { content: none !important; }
#ht_spl #z::before { content: none !important; }
#ht_spl.fx-anon h1, #ht_spl.fx-shr-in h1 { font: 500 34px/1.1 var(--serif) !important; margin: 0 0 6px !important; }
#ht_spl.fx-anon #l { margin-bottom: 6px !important; }
#ht_spl #fx-sub, #ht_spl #fx-next { font: 400 19px/1.4 var(--serif) !important; color: #5A4C38 !important; margin: 0 0 28px !important; }
#ht_spl #wrap, #ht_spl #wrap * { font-family: var(--serif) !important; }
#ht_spl .fx-show { background: none !important; color: #5A4C38 !important; }
#ht_spl .fx-flabel { font-family: var(--serif) !important; }
#ht_spl #lf input[type=text], #ht_spl #lf input[type=password] {
  background: #FBF6EC !important; border: 1px solid #8F7E62 !important; border-radius: 2px !important; height: 46px;
}
#ht_spl #lf input:focus-visible { box-shadow: 0 0 0 2px var(--accent) !important; border-color: var(--accent) !important; }
#ht_spl #ls {
  background: var(--accent) !important; border-color: var(--accent) !important; color: #F6EDD8 !important;
  font: 500 18px/1 var(--serif) !important; height: 48px; border-radius: 2px !important; margin-top: 28px !important;
}
#ht_spl.fx-anon #fx-foot, #ht_spl.fx-shr-in #fx-foot { display: none !important; }
@media (max-width: 420px) { #ht_spl.fx-anon body::after, #ht_spl.fx-shr-in body::after { left: 16px !important; margin-left: 0; } }

/* --- 2026-10-21: the sign-in page always offers the team sign-in ---
   files.css hides "change account" for every signed-in visitor (.fx-in), which also caught people who only opened a share
   (copyparty session "s_..."): they landed on a page with no form. Show the form to them too, with the share hint below it. */
#ht_spl.fx-shr-in #l, #ht_spl.fx-shr-in #l + div { display: block !important; }
#ht_spl.fx-shr-in #fx-partner, #ht_spl.fx-anon #fx-partner { font: 400 17px/1.5 var(--serif) !important; color: #5A4C38 !important; margin: 28px 0 0 !important; padding-top: 16px; border-top: 1px solid #D9CDAE; }
#ht_spl #fx-last { font-size: 17px !important; }

/* split layout like the other 1618 sign-in pages: the Library drawing on the left, the form on the right */
@media (min-width: 1000px) {
  #ht_spl.fx-anon #wrap, #ht_spl.fx-shr-in #wrap { width: 50% !important; margin-left: 50% !important; }
  #ht_spl.fx-anon body::after, #ht_spl.fx-shr-in body::after { left: 75% !important; }
  #ht_spl.fx-anon body::before, #ht_spl.fx-shr-in body::before {
    display: block !important; content: ""; position: fixed; top: 0; bottom: 0; left: 0; right: 50%; width: auto; height: auto;
    border: 0; border-right: 1px solid #D9CDAE;
    background: #F6EDD8 url(/brand/signin-library.webp) center calc(100% - 6vh) / min(80%, 620px) auto no-repeat !important;
  }
}

/* --- product family lockup: the tile with the product name beside it reads "1618 Library" --- */
body::after, html #bbox-overlay::after {
  content: "Library" !important; width: auto !important; height: 30px !important; padding: 0 0 0 40px !important;
  background: url(/brand/1618-logo-small-128.png?v=2) left center / 30px 30px no-repeat !important;
  font: 500 22px/30px var(--serif) !important; color: #2E2012 !important; letter-spacing: -.005em;
}
#ht_spl.fx-anon body::after, #ht_spl.fx-shr-in body::after {
  content: "Library" !important; width: auto !important; height: 48px !important; padding: 0 0 0 62px !important; margin-left: -190px;
  background: url(/brand/1618-logo-small-128.png?v=2) left center / 48px 48px no-repeat !important;
  font: 500 30px/48px var(--serif) !important; color: #2E2012 !important;
}
#ht_spl #fx-next { display: none !important; }   /* the lockup already says where you are */
#ht_spl.fx-anon #l, #ht_spl.fx-shr-in #l { margin-bottom: 26px !important; }

/* way back to the website, above the lockup on the sign-in pages */
#fx-home { position: absolute; z-index: 5; top: calc(max(14vh, 72px) - 60px); left: 16px; padding: 10px 0; font: 400 16px/1 var(--serif); letter-spacing: .04em; color: #5A4C38; text-decoration: none; }
#fx-home:hover { color: #2E2012; }
@media (min-width: 1000px) { #fx-home { left: 75%; margin-left: -190px; } }
@media (max-width: 420px) { #fx-home { top: 18px; } }
#fx-home { background: none !important; border: 0 !important; box-shadow: none !important; border-radius: 0 !important; left: max(16px, calc(50% - 190px)); }
@media (min-width: 1000px) { #fx-home { left: 75%; margin-left: -190px; } }
/* the drawing centred in its panel with margin all round, level with the form (2026-10-21) */
@media (min-width: 1000px) {
  #ht_spl.fx-anon body::before, #ht_spl.fx-shr-in body::before {
    box-sizing: border-box; padding: 8vh 6vw;
    background-origin: content-box !important; background-clip: border-box !important;
    background-position: center center !important; background-size: contain !important;
  }
}
/* the form block centred vertically like the drawing: back link, lockup and form move together */
@media (min-width: 1000px) {
  #ht_spl { --top: max(24px, calc(50vh - 280px)); }
  #ht_spl #fx-home { top: var(--top) !important; }
  #ht_spl.fx-anon body::after, #ht_spl.fx-shr-in body::after { top: calc(var(--top) + 56px) !important; }
  #ht_spl.fx-anon #wrap, #ht_spl.fx-shr-in #wrap { padding-top: calc(var(--top) + 56px + 48px + 30px) !important; }
}

/* --- 2026-10-21 review fixes --- */
/* phones: the sign-in lockup came back at margin-left -190px (the block above wins over the 420px rule), off screen */
@media (max-width: 420px) { #ht_spl.fx-anon body::after, #ht_spl.fx-shr-in body::after { left: 16px !important; margin-left: 0 !important; } }
/* one typeface: copyparty's controls, tree, cards and dialogs were in Helvetica; the site and dashboards are Garamond */
:root, html { --grot: var(--serif) !important; }
html, html.a, html.ay, html.y, html.b, html.by, html.bz, html.c, html.cy, html.d, html.dy, html.e, html.ey, html.f, html.fy {
  --font-main: var(--serif) !important;
  /* secondary text 5.8:1 on paper (#7D6A4F read 4.45:1, just under AA) */
  --ink-soft: #6B5940 !important; --fg-weak: #6B5940 !important; --tab-alt: #6B5940 !important; --a-gray: #6B5940 !important; --sort-2: #6B5940 !important;
  --srv-1: #6B5940 !important; --srv-2: #6B5940 !important; --srv-3: #6B5940 !important; --f-gray: #6B5940 !important; --fm-off: #6B5940 !important;
  --sz-b: #6B5940 !important; --sz-k: #6B5940 !important; --sz-m: #6B5940 !important; --sz-g: #6B5940 !important; --sz-t: #6B5940 !important; --sz-p: #6B5940 !important;
}
#files td, #ggrid, #fx-sum, .fx-gdl { font-variant-numeric: lining-nums tabular-nums; }

/* sign-in pages: the tile alone, the heading names the product ("Sign in to 1618 Library"), as on Partners and the App */
#ht_spl.fx-anon body::after, #ht_spl.fx-shr-in body::after { content: "" !important; width: 48px !important; padding: 0 !important; }

/* --- 2026-10-22 audit: 44 px tap areas on phones, file names break at hyphens not mid-word --- */
#fx-home { padding: 14px 0 !important; }
#fx-docs, .agr > #y, #gridsel, #fx-vt > a, #ghead span > a { display: inline-flex !important; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; box-sizing: border-box; }
.fx-meta .fx-gdl { display: inline-flex; align-items: center; min-height: 44px; }
#ggrid a, #ggrid a * { word-break: normal !important; overflow-wrap: anywhere !important; }
