/* The share site's look. It follows lakeshoremedia.dev (website/DESIGN.md):
   pale paper, lake ink text, teal actions, flat surfaces, and Geist.
   The pages load no scripts and carry no inline styles, so all of it lives here.
   Night colors follow the visitor's system setting; there is no toggle. */

@font-face {
  font-family: Geist;
  src: url('/_s/fonts/Geist-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --background: #f2f6f5;
  --foreground: #14343e;
  --card: #ffffff;
  --hover: #e3eeeb;
  --primary: #087888;
  --primary-hover: #066d7c;
  --on-primary: #ffffff;
  --border: #c9d8d8;
  --muted: #4e6971;
  /* Darker than the brief's #93acb0 (2.39:1) so the field's edge meets 3:1 on white. */
  --input: #7e989d;
  --ring: #087888;
  --error: #b83238;
  --error-surface: #faf1f1;
  --error-border: #ebc6c7;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --column: 560px;
  --gutter: 24px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --background: #0b1b22;
    --foreground: #e7f0ed;
    --card: #132b34;
    --hover: #1b3742;
    --primary: #8cdacc;
    --primary-hover: #a6e5d7;
    --on-primary: #0b252d;
    --border: #304a54;
    --muted: #aec3c7;
    --input: #718f99;
    --ring: #a6e5d7;
    --error: #ff9a9e;
    --error-surface: #2b363f;
    --error-border: #6d555c;
  }
}

/* Base */

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  caret-color: var(--primary);
  font-family: Geist, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
::selection {
  background: var(--primary);
  color: var(--on-primary);
}
:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 4px;
}

/* One centered column: 560px, or 720px for the home page's list. */

.layout-wide {
  --column: 720px;
}
.site-header,
.site-main,
.site-footer {
  width: min(var(--column), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

/* Header: the same lockup as lakeshoremedia.dev, over a hairline. */

.site-header {
  display: flex;
  align-items: center;
  min-height: 96px;
  border-bottom: 1px solid var(--border);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  border-radius: var(--radius-sm);
  color: inherit;
  text-decoration: none;
}
.logo-mark {
  flex: none;
  width: 36px;
  height: auto;
  stroke-width: 1.7;
}
.brand-text {
  font-size: 24px;
  font-weight: 550;
  line-height: 1;
  letter-spacing: -0.04em;
}
.brand-sub {
  display: block;
  margin-top: 7px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.29em;
}

/* Page text */

.site-main {
  flex: 1;
  padding-block: 64px 88px;
}
.page-heading {
  margin: 0;
  font-size: clamp(34px, 22px + 2.2vw, 48px);
  font-weight: 550;
  line-height: 1.13;
  letter-spacing: -0.035em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.page-body {
  max-width: 46ch;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
  text-wrap: pretty;
}
.page-link {
  margin: 20px 0 0;
}
.page-link a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--primary);
  font-weight: 550;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.help {
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
  text-wrap: pretty;
}
.help a {
  position: relative;
  color: var(--primary);
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
/* The phone number and email sit inside a sentence. This invisible layer
   gives each a 44px-tall tap area without moving the text. */
.help a::before {
  content: '';
  position: absolute;
  inset: -13px -4px;
}
/* A ring around words inside a sentence crowds the words beside it, so these
   links fill in instead. The transparent outline keeps a ring in forced colors. */
.help a:focus-visible {
  outline-color: transparent;
  border-radius: 2px;
  background: var(--ring);
  box-shadow: 0 0 0 2px var(--ring);
  color: var(--on-primary);
  text-decoration: none;
}

/* Password form */

.login-form {
  margin: 32px 0 0;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
}
.form-error {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 24px;
  padding: 12px 16px;
  border: 1px solid var(--error-border);
  border-radius: var(--radius-md);
  background: var(--error-surface);
  color: var(--error);
  font-size: 15px;
  font-weight: 550;
  line-height: 1.5;
}
.form-error::before {
  /* The first is a fallback; the second's empty alt text keeps screen readers from reading the mark. */
  content: '!';
  content: '!' / '';
  display: grid;
  flex: none;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-top: 1.5px;
  border-radius: 50%;
  background: var(--error);
  color: var(--error-surface);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}
.field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 550;
  line-height: 1.4;
}
.field-row {
  display: flex;
  gap: 12px;
}
.field-input {
  flex: 1;
  min-width: 0;
  min-height: 54px;
  margin: 0;
  padding: 12px 16px;
  border: 1px solid var(--input);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--foreground);
  font: inherit;
  font-size: 17px;
  line-height: 1.4;
}
.field-input:focus-visible {
  outline-offset: 2px;
}
/* Keep a browser's or password manager's fill in the page colors. */
.field-input:-webkit-autofill {
  -webkit-text-fill-color: var(--foreground);
  box-shadow: 0 0 0 100px var(--card) inset;
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  margin: 0;
  padding: 14px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: var(--on-primary);
  font: inherit;
  font-size: 16px;
  font-weight: 550;
  line-height: 1.3;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    border-color 160ms ease;
}
.button-quiet {
  min-height: 44px;
  padding: 10px 18px;
  border-color: var(--border);
  background: transparent;
  color: var(--foreground);
  font-size: 15px;
}

/* Document list: one card, one row per document, each row a link. */

.doc-list {
  margin: 32px 0 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  list-style: none;
}
.doc-item + .doc-item {
  border-top: 1px solid var(--border);
}
.doc-link {
  position: relative;
  display: block;
  padding: 22px 64px 22px 28px;
  color: inherit;
  text-decoration: none;
  transition: background-color 160ms ease;
}
/* The ring sits inside the row, since the card clips anything outside it. */
.doc-link:focus-visible {
  outline-offset: -4px;
  border-radius: var(--radius-md);
}
/* A chevron, drawn with two borders, says the row opens. */
.doc-link::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 30px;
  width: 9px;
  height: 9px;
  border-top: 2px solid var(--muted);
  border-right: 2px solid var(--muted);
  transform: translateY(-50%) rotate(45deg);
  transition: border-color 160ms ease;
}
.doc-title {
  display: block;
  font-size: 19px;
  font-weight: 550;
  line-height: 1.35;
  letter-spacing: -0.015em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.doc-note {
  display: block;
  max-width: 60ch;
  margin-top: 4px;
  font-size: 16px;
  line-height: 1.55;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}
.doc-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}
.doc-kind {
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--foreground);
  font-size: 13px;
  font-weight: 550;
}
.empty {
  margin: 32px 0 0;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  color: var(--muted);
}

/* Help and sign out, side by side when there is room. */

.page-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  margin-top: 28px;
}
.page-foot .help {
  flex: 1 1 320px;
  margin: 0;
}
.logout-form {
  margin: 0;
}

/* Footer */

.site-footer {
  padding-block: 24px 32px;
  border-top: 1px solid var(--border);
}
.copyright {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

/* Hover only where there is a pointer, so taps don't leave rows lit. */

@media (hover: hover) {
  .button:hover {
    background: var(--primary-hover);
  }
  .button-quiet:hover {
    border-color: var(--input);
    background: var(--hover);
  }
  .doc-link:hover {
    background: var(--hover);
  }
  .doc-link:hover::after {
    border-color: var(--primary);
  }
  .help a:hover,
  .page-link a:hover {
    text-decoration-thickness: 2px;
  }
}
.doc-link:active {
  background: var(--hover);
}

/* Phones */

@media (max-width: 540px) {
  :root {
    --gutter: 20px;
  }
  .site-header {
    min-height: 80px;
  }
  .brand {
    gap: 10px;
  }
  .logo-mark {
    width: 30px;
  }
  .brand-text {
    font-size: 21px;
  }
  .brand-sub {
    margin-top: 6px;
    font-size: 9px;
  }
  .site-main {
    padding-block: 40px 56px;
  }
  .page-body {
    font-size: 17px;
  }
  .login-form {
    margin-top: 28px;
    padding: 20px;
  }
  .field-row {
    flex-direction: column;
  }
  .doc-list {
    margin-top: 28px;
  }
  .doc-link {
    padding: 18px 52px 18px 20px;
  }
  .doc-link::after {
    right: 24px;
  }
  .doc-title {
    font-size: 18px;
  }
  .empty {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
