/*
 * barkledger.com theme for webmail.barkledger.com.
 * Source: the live home page and its stylesheets (2026-11-29) and the site's own source
 * (src/app/globals.css and src/app/platform.css on the BarkLedger trunk). The webmail has no site
 * header or nav: the mail bar takes the site header's ink navy and carries the paw mark and the
 * white wordmark. The footer is the site's; the panes, forms and buttons follow its landing and
 * signup pages (orange pill actions with ink navy text, 14px controls, 22px cards). Rubik and
 * Nunito Sans are self-hosted (SIL OFL 1.1, see assets/fonts/OFL.txt). Everything is scoped to
 * the footer or the webmail's own classes, so mail bodies keep their sanitised styling.
 *
 * Contrast (WCAG AA): text on the orange fill is ink navy (6.1:1), never white (2.8:1). Orange
 * as text, link or focus ring on a light surface is the site's darker orange-text shade (text
 * 4.6:1 or better, rings 4.2:1 or better on every light surface here, 3.3:1 beside the navy
 * selected folder); the plain orange ring is kept for the navy bar and footer (5.3:1 or better).
 */

/* Variable font files, latin subset: Rubik weights 300 to 900, Nunito Sans 200 to 1000. */
@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("/themes/barkledger.com/assets/fonts/rubik-latin-wght-300-900.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("/themes/barkledger.com/assets/fonts/nunito-sans-latin-wght-200-1000.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* the site's palette (globals.css and the .pl tokens in platform.css) */
  --bl-orange: #f47932;
  --bl-orange-light: #f89556;
  --bl-orange-dark: #d4621e;
  --bl-orange-text: #b4501a;
  --bl-orange-tint: #fff1e8;
  --bl-ink: #0b1b3f;
  --bl-ink-2: #13284f;
  --bl-green: #7da343;
  --bl-green-text: #4b7424;
  --bl-green-tint: #f0f6e8;
  --bl-bg: #fafbfd;
  --bl-alt-bg: #f1f4f8;
  --bl-border: #e4e9f0;
  /* control outlines: darker than the site's border so a field's edge reads at 3:1 */
  --bl-control: #7a8599;
  --bl-text: #0b1b3f;
  --bl-text-2: #4a5568;
  --bl-red: #b42318;
  --bl-red-tint: #fef3f2;
  --bl-red-line: #f3c5c0;
  --bl-shadow-sm: 0 2px 8px rgba(11, 27, 63, .06);
  --bl-shadow-md: 0 4px 20px rgba(11, 27, 63, .08);
  --bl-ring: 0 0 0 3px rgba(244, 121, 50, .25);
  --bl-ease: 150ms ease;
  --bl-gutter: 16px;

  /* the webmail's tokens, set from it */
  --accent: var(--bl-orange);
  --on-accent: var(--bl-ink);
  --bg: var(--bl-bg);
  --card: #ffffff;
  --text: var(--bl-text);
  --muted: var(--bl-text-2);
  --line: var(--bl-border);
  --error-bg: var(--bl-red-tint);
  --error-text: var(--bl-red);
  --ok-bg: var(--bl-green-tint);
  --ok-text: var(--bl-green-text);
  --draft-bg: #fff4ec;
  --selected-bg: var(--bl-orange-tint);
  --row-hover-bg: var(--bl-alt-bg);
  --folders-bg: var(--bl-alt-bg);
  --folder-hover-bg: var(--bl-border);
  --folder-current-bg: var(--bl-ink);
  --pane-bg: #ffffff;
  --mailbar-bg: linear-gradient(160deg, #0b1b3f 0%, #13284f 100%);
  --mailbar-text: #ffffff;
  --mailbar-brand: #ffffff;
  --mailbar-line: var(--bl-ink);
  --link: var(--bl-orange-text);
  --focus: var(--bl-orange-text);

  --font-body: "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-heading: "Rubik", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* 14px controls, 22px cards, round pills */
  --radius: 14px;
  --radius-card: 22px;
  --radius-tag: 999px;
  --radius-pill: 999px;

  --page-pad: var(--bl-gutter);
  --card-pad: 32px;
  --control-pad-y: 12px;
  --control-pad-x: 16px;
  --btn-pad-y: 7px;
  --btn-pad-x: 18px;
  --pane-pad: 16px;
  --mailbar-height: 64px;
  --mailbar-pad-x: var(--bl-gutter);
  --mailbar-gap: 16px;
  --folder-pad-y: 8px;
}
/* The site's container padding: 16px, 24px from 640px. */
@media (min-width: 640px) { :root { --bl-gutter: 24px; } }

body {
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ------------------------------------------------------------ site footer */
/* The site's footer: ink navy, the logo, the link list, then the fine print on its own line. */

.site-footer {
  padding: 40px 0 48px;
  background: var(--bl-ink);
  color: rgba(255, 255, 255, .8);
  font-family: var(--font-body);
  line-height: 1.6;
}
.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 var(--bl-gutter);
}
.site-footer .footer-brand { display: inline-flex; align-items: center; gap: 8px; line-height: 1; }
.site-footer .footer-brand img { display: block; width: 28px; height: 28px; }
.site-footer .brand-word {
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.03em;
}
.site-footer ul { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 0; padding: 0; list-style: none; }
.site-footer a { color: rgba(255, 255, 255, .88); text-decoration: none; transition: color var(--bl-ease); }
.site-footer a:hover { color: var(--bl-orange-light); }
.site-footer a:focus-visible { outline: 3px solid var(--bl-orange); outline-offset: 3px; border-radius: 4px; }
.site-footer .site-footer-fine,
.site-footer .site-footer-copy {
  width: 100%;
  margin: 0;
  color: rgba(255, 255, 255, .72);
  font-size: 14px;
}
.site-footer .site-footer-copy { margin-top: -12px; }

/* ------------------------------------------------------------ headings */
/* The site's headings: Rubik, extra bold, tight tracking, ink navy. */

.signin-title,
.list-title,
.message-subject,
.compose-title,
.account-title,
.signin .card h2,
.account-page .card h2 {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: -.025em;
  color: var(--bl-ink);
}

/* ------------------------------------------------------------ buttons and forms */
/* The site's pill buttons. Secondary: an outline that turns orange; primary: the orange fill with
   ink navy text, lighter on hover. */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bl-border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--bl-ink);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  transition: background-color var(--bl-ease), border-color var(--bl-ease), color var(--bl-ease);
}
.btn:hover { border-color: var(--bl-orange); }
.btn:focus-visible { outline: 3px solid var(--bl-orange-text); outline-offset: 2px; }
.btn-compose,
.btn-send { border-color: var(--bl-orange); background: var(--bl-orange); color: var(--bl-ink); }
.btn-compose:hover,
.btn-send:hover { border-color: var(--bl-orange-light); background: var(--bl-orange-light); color: var(--bl-ink); filter: none; }
.btn-danger { border-color: var(--bl-red-line); color: var(--bl-red); }
.btn-danger:hover { border-color: var(--bl-red); background: var(--bl-red-tint); }

/* The full-width submit buttons (sign in, change password): the site's primary pill. */
.signin button[type="submit"],
.account-form button[type="submit"] {
  min-height: 48px;
  margin-top: 24px;
  padding: 8px 22px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--bl-orange);
  color: var(--bl-ink);
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  transition: background-color var(--bl-ease);
}
.signin button[type="submit"]:hover,
.account-form button[type="submit"]:hover { background: var(--bl-orange-light); }
.signin button[type="submit"]:focus-visible,
.account-form button[type="submit"]:focus-visible { outline: 3px solid var(--bl-orange-text); outline-offset: 3px; }

.signin label,
.account-form label,
.compose label {
  margin: 20px 0 6px;
  color: var(--bl-text);
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
}
.signin-form label[for="address"],
.account-form label[for="current"] { margin-top: 0; }
.signin input[type="email"],
.signin input[type="password"],
.account-form input[type="password"],
.compose input[type="text"],
.compose textarea,
.search input[type="search"],
.actions select {
  border: 1px solid var(--bl-control);
  border-radius: 14px;
  background: #ffffff;
  color: var(--bl-text);
  font-family: inherit;
  font-size: 15px;
  line-height: 22px;
  transition: border-color var(--bl-ease), box-shadow var(--bl-ease);
}
.signin input[type="email"],
.signin input[type="password"],
.account-form input[type="password"],
.compose input[type="text"] { min-height: 48px; padding: 12px 16px; }
.compose textarea { padding: 12px 16px; line-height: 1.6; }
.signin input::placeholder,
.compose input::placeholder,
.search input::placeholder { color: var(--bl-text-2); opacity: .85; }
.signin input:focus,
.account-form input:focus,
.compose input:focus,
.compose textarea:focus,
.search input[type="search"]:focus,
.actions select:focus { outline: none; border-color: var(--bl-orange-text); box-shadow: 0 0 0 1px var(--bl-orange-text), var(--bl-ring); }

/* Alert boxes: error red, success green, drafts on an orange tint. */
.error {
  margin: 0 0 16px;
  padding: 12px 16px;
  border: 1px solid var(--bl-red-line);
  border-radius: 14px;
  background: var(--bl-red-tint);
  color: var(--bl-red);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}
.flash { font-size: 14px; line-height: 20px; border-bottom-color: var(--bl-border); }
.flash-ok { background: var(--bl-green-tint); color: var(--bl-green-text); }
.flash-err { background: var(--bl-red-tint); color: var(--bl-red); }
.draft-offer { background: #fff4ec; color: var(--bl-ink); }

.muted { color: var(--bl-text-2); }

/* The site's text links: the orange-text shade, bold, underlined. Mail bodies keep theirs. */
.back a,
.attachments a,
.images-note a,
.account-page .card a:not(.btn) {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--bl-ease);
}
.back a:hover,
.attachments a:hover,
.images-note a:hover,
.account-page .card a:not(.btn):hover { color: var(--bl-ink); }
.back a:focus-visible,
.attachments a:focus-visible,
.images-note a:focus-visible,
.account-page .card a:not(.btn):focus-visible,
.error-page .card a:focus-visible { outline: 3px solid var(--bl-orange-text); outline-offset: 2px; border-radius: 4px; }

/* ------------------------------------------------------------ sign-in and error pages */
/* The site's signup card: white on the pale page, 22px corners, a soft navy shadow. */

.signin {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: none;
  margin: 0;
  padding: 32px var(--bl-gutter);
}
.signin-card {
  width: 100%;
  max-width: 448px;
  padding: 36px 40px;
  background: #ffffff;
  border: 1px solid var(--bl-border);
  border-radius: 22px;
  box-shadow: var(--bl-shadow-md);
}
/* The paw mark above the title: these screens have no mail bar to carry the logo. */
.signin .brand {
  display: block;
  margin: 0 0 24px;
  padding-top: 56px;
  background: url("/themes/barkledger.com/assets/logo.svg") no-repeat left top / 40px 40px;
}
.signin .signin-title {
  margin: 0;
  color: var(--bl-ink);
  font-size: 28px;
  line-height: 1.2;
}
.signin .card {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.error-page .card h2 { margin: 0 0 8px; font-size: 20px; line-height: 1.3; }
.error-page .card p { margin: 0 0 12px; color: var(--bl-text-2); }
.error-page .card a { color: var(--bl-orange-text); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.error-page .card a:hover { color: var(--bl-ink); }

/* On sign-in and error pages (screen-card) the card sits in the middle of the page and the site
   footer stays at the bottom. */
.screen-card {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
.screen-card .signin { flex: 1 0 auto; }

/* ------------------------------------------------------------ mail bar */
/* The site's navy header, condensed into the webmail's one bar: the paw mark and the white
   wordmark linking to the website, then "Mail" linking to the inbox; an orange Compose, the
   address, an Account link and a ghost Sign out. */

.mailbar { font-family: var(--font-body); }

/* One line at every width: the brand area never wraps; "Mail" ends in an ellipsis first. */
.mailbar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.mailbar-brand .site-brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  /* room for the focus ring inside the bar's clipping */
  padding: 4px;
  border-radius: 12px;
  color: #ffffff;
  line-height: 1;
  text-decoration: none;
}
.mailbar-brand .site-brand img { display: block; width: 34px; height: 34px; }
.mailbar-brand .brand-word {
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.03em;
}
.mailbar-home {
  min-width: 0;
  overflow: hidden;
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, .3);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 500;
  line-height: 28px;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color var(--bl-ease);
}
.mailbar-home:hover { color: var(--bl-orange-light); }
.mailbar-who { color: rgba(255, 255, 255, .8); font-size: 14px; }
.mailbar .mailbar-link {
  color: rgba(255, 255, 255, .88);
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 500;
  transition: color var(--bl-ease);
}
.mailbar .mailbar-link:hover { color: #ffffff; text-decoration: none; }
/* Sign out: the site's ghost button on navy. */
.mailbar .btn {
  border-color: rgba(255, 255, 255, .55);
  background: transparent;
  color: #ffffff;
  white-space: nowrap;
}
.mailbar .btn:hover { border-color: #ffffff; background: rgba(255, 255, 255, .1); }
.mailbar .btn-compose { border-color: var(--bl-orange); background: var(--bl-orange); color: var(--bl-ink); }
.mailbar .btn-compose:hover { border-color: var(--bl-orange-light); background: var(--bl-orange-light); color: var(--bl-ink); }
/* On navy the focus ring is the site's plain orange. */
.mailbar a:focus-visible,
.mailbar .btn:focus-visible { outline: 3px solid var(--bl-orange); outline-offset: 2px; border-radius: 4px; }
.mailbar .btn:focus-visible { border-radius: 999px; }
.mailbar .btn-compose:focus-visible { outline-color: #ffffff; }
.mailbar-brand a:focus-visible { outline-offset: -3px; }
.mailbar-brand .site-brand:focus-visible { border-radius: 12px; }

/* ------------------------------------------------------------ panes */

.folders-pane { padding: 16px 12px; }
.folders { display: grid; gap: 2px; }
.folder { border-radius: 999px; padding-right: 10px; padding-left: 14px; color: var(--bl-ink); font-size: 15px; font-weight: 600; line-height: 20px; }
/* The selected folder: white on ink navy (16.9:1), its count an orange pill with navy text. */
.folder.is-current { color: #ffffff; font-weight: 700; box-shadow: none; }
.folder:focus-visible { outline: 3px solid var(--bl-orange-text); outline-offset: 1px; }
.count { padding: 0 8px; font-size: 12px; font-weight: 800; line-height: 20px; }
.folder.is-current .count { background: var(--bl-orange); color: var(--bl-ink); }

.search { padding: 12px 16px; }
.search input[type="search"] { padding: 6px 14px; border-radius: 999px; }
.mail .btn,
.compose-page .draft-offer .btn { padding: 4px 14px; }
.actions select { padding: 5px 10px; }
.list-title { padding: 16px 16px 6px; font-size: 20px; line-height: 28px; }
.msg-link { padding: 12px 16px; }
.msg-link:focus { outline-color: var(--bl-orange-text); }
.msg-who { color: var(--bl-ink); font-size: 15px; }
.msg-subject { color: var(--bl-text-2); font-size: 14px; }
.msg.unread .msg-who,
.msg.unread .msg-subject { font-weight: 800; color: var(--bl-ink); }
.msg.selected .msg-link { box-shadow: inset 4px 0 0 var(--bl-orange); }
.msg-date { color: var(--bl-text-2); font-size: 12px; white-space: nowrap; }
.tag {
  padding: 0 8px;
  border: 0;
  background: var(--bl-alt-bg);
  color: var(--bl-ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
}
.msg.selected .tag { background: #ffffff; }
.tag-flag,
.msg.selected .tag-flag { background: var(--bl-red-tint); color: var(--bl-red); }
.pager { font-size: 14px; color: var(--bl-text-2); }

.reading-pane { padding: 24px 32px; }
.message-subject { font-size: 26px; line-height: 1.2; }
.message-headers { gap: 4px 16px; font-size: 14px; line-height: 20px; }
.message-headers dt { color: var(--bl-text-2); font-weight: 700; }
.message-headers dd { color: var(--bl-ink); }
.images-note { padding: 12px 16px; border: 1px solid var(--bl-border); border-radius: 14px; background: var(--bl-alt-bg); color: var(--bl-text-2); font-size: 14px; line-height: 20px; }
.message-body { max-width: 72ch; font-size: 16px; line-height: 1.6; }
.mail-text { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 14px; }
.attachments-title { color: var(--bl-ink); font-family: var(--font-heading); font-size: 16px; font-weight: 700; }
.attachments { padding: 0; list-style: none; }
.attachments li { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; padding: 8px 0; border-bottom: 1px solid var(--bl-border); }

/* ------------------------------------------------------------ compose and account */

.compose-title,
.account-title { font-size: 28px; line-height: 1.2; }
.compose {
  padding: 24px 32px 32px;
  border-color: var(--bl-border);
  box-shadow: var(--bl-shadow-sm);
}
.compose-from { color: var(--bl-ink); font-size: 15px; }
.compose label.check { margin: 6px 0 0; color: var(--bl-text); font-family: var(--font-body); font-weight: 400; }
.compose-page .draft-offer { border-color: #f6cfb4; border-radius: 14px; }
.forwarded { border-color: var(--bl-border); border-radius: 14px; }

.account-page { padding-top: 40px; padding-bottom: 80px; }
.account-page .card { margin-top: 24px; box-shadow: var(--bl-shadow-sm); }
.account-page .card h2 { margin: 0 0 16px; font-size: 20px; line-height: 1.3; }
.account-page .card .muted { font-size: 14px; line-height: 20px; }

/* ------------------------------------------------------------ phones */

@media (max-width: 759px) {
  :root { --mailbar-height: 56px; }
  /* One line at 390px: the paw mark at 28px with a smaller wordmark, then "Mail", Compose,
     Account and Sign out. */
  :root { --mailbar-pad-x: 12px; }
  .mailbar { gap: 6px; }
  .mailbar-brand { gap: 6px; }
  .mailbar-brand .site-brand { gap: 6px; padding: 3px; }
  .mailbar-brand .site-brand img { width: 28px; height: 28px; }
  .mailbar-brand .brand-word { font-size: 18px; }
  .mailbar-home { padding-left: 8px; font-size: 15px; line-height: 20px; }
  .mailbar .btn { padding: 4px 10px; font-size: 13px; }
  .mailbar .mailbar-link { font-size: 13px; }
  .folders-pane { padding: 8px; }
  .folders { display: flex; }
  .reading-pane { padding: 20px 16px; }
  .compose { padding: 20px 16px; }
  .signin-card { padding: 24px 18px; }
  .account-page .card { padding: 20px 16px; }
}
/* Narrow phones: the paw mark stays, the wordmark text goes, so the bar keeps to one line. */
@media (max-width: 480px) {
  .mailbar-brand .brand-word { display: none; }
  .mailbar .btn { padding: 4px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .mailbar *,
  .site-footer *,
  .signin *,
  .btn { transition: none !important; }
}
