/* Styled to match the firm's Microsoft Bookings page:
   light gray canvas, narrow white column, Segoe UI, burgundy (#991724) accent. */
:root {
  --accent: #991724;
  --accent-dark: #7d1220;
  --ink: #212121;
  --text: #333333;
  --muted: #686868;
  --field: #f5f5f5;
  --pill: #f8f8f8;
  --line: #f3f2f1;
  --canvas: #f4f4f4;
  --ok: #107c10;
  --err: #a4262c;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 15px/1.5 "Segoe UI", "Segoe UI Web (West European)", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Tahoma, Arial, sans-serif;
  color: var(--text);
  background: var(--canvas);
}
.page { max-width: 1080px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.sheet { background: #fff; padding: 12px 20px 32px; }
.foot { background: #f6f6f6; padding: 24px 28px 36px; text-align: center; font-size: 14px; color: var(--text); }
.foot p { margin: 0; }
.foot a { color: var(--accent); }

.masthead { text-align: center; padding: 8px 0 6px; }
.masthead-text { min-width: 0; }
.logo { display: block; width: 96px; height: 96px; margin: 0 auto 12px; border-radius: 0; flex: none; }
h1 { font-size: 28px; font-weight: 700; color: var(--ink); line-height: 1.15; margin: 0 0 8px; }
.lead { margin: 0 auto 18px; color: var(--muted); max-width: 400px; }

.section-title {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 14px; font-weight: 700; color: var(--ink); text-transform: uppercase; letter-spacing: .7px;
  margin: 30px 0 16px;
}
.section-title svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.center { text-align: center; }

.pill { background: var(--pill); color: var(--muted); border-radius: 32px; padding: 8px 24px; font-size: 14px; text-align: center; margin: 10px 0; }

.card {
  border-top: 4px solid var(--accent); border-bottom: 1px solid var(--line);
  border-radius: 4px; padding: 14px 16px; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 0 0 1px #edebe9;
}
.card-title { font-size: 18px; color: var(--ink); margin: 0 0 6px; }
.drop { text-align: center; cursor: pointer; padding: 22px 16px; transition: background .15s; }
.drop:hover, .drop.over { background: #fbf5f6; }
.drop p { margin: 2px 0; }
.linkish { color: var(--accent); text-decoration: underline; }
.hint { color: var(--muted); font-size: 13px; margin: 4px 0; }

.files { list-style: none; padding: 0; margin: 6px 0 0; max-height: 340px; overflow-y: auto; }
.file-summary { display: flex; justify-content: space-between; align-items: center; margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.linkbtn { border: 0; background: none; color: var(--accent); text-decoration: underline; cursor: pointer; font: inherit; font-size: 12px; padding: 0; }
.files li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 8px 10px; background: var(--field); border-radius: 4px; margin-bottom: 6px; font-size: 14px; }
.files .fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.files .fsize { color: var(--muted); font-size: 12px; }
.files .remove { border: 0; background: none; color: var(--accent); cursor: pointer; font: inherit; font-size: 12px; text-decoration: underline; }
.files .bar { grid-column: 1 / -1; height: 4px; background: #e1dfdd; border-radius: 2px; overflow: hidden; display: none; }
.files .bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.files li.uploading .bar, .files li.ok .bar, .files li.fail .bar { display: block; }
.files li.ok .bar span { background: var(--ok); }
.files li.fail .bar span { background: var(--err); width: 100% !important; }
.files .state { font-size: 12px; color: var(--muted); }
.files li.ok .state { color: var(--ok); }
.files li.fail .state { color: var(--err); }

label { display: block; font-size: 14px; font-weight: 600; color: var(--text); margin: 0 0 14px; }
.req { color: var(--accent); }
input[type=text], input[type=tel], input[type=email], select, textarea {
  display: block; width: 100%; margin-top: 4px; padding: 0 10px; height: 36px;
  font: inherit; font-size: 14px; font-weight: 400; color: var(--ink);
  background: var(--field); border: 0; border-bottom: 2px solid transparent; border-radius: 2px;
}
select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23991724' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
select:invalid { color: #a19f9d; }
select option { color: var(--ink); }
textarea { height: auto; min-height: 72px; padding: 8px 10px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #a19f9d; }
input:focus, select:focus, textarea:focus { outline: none; border-bottom-color: var(--accent); background: #f0f0f0; }
.drop:focus-visible, .btn:focus-visible, label.check input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input.touched:invalid, select.touched:invalid { border-bottom-color: var(--err); }
label.check { display: flex; gap: 10px; align-items: center; font-weight: 400; margin-top: 4px; }
label.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }

.turnstile { margin: 20px 0 6px; display: flex; justify-content: center; }
.privacy { font-size: 12px; color: var(--muted); text-align: center; margin: 16px 0; }
.status { min-height: 1.5em; margin: 8px 0; text-align: center; font-size: 14px; }
.status.err { color: var(--err); font-weight: 600; }

.actions { display: flex; justify-content: center; margin-top: 18px; }
.btn {
  min-width: 240px; height: 44px; padding: 0 24px; border: 0; border-radius: 4px;
  background: var(--accent); color: #fff; font: inherit; font-size: 18px; font-weight: 600; cursor: pointer;
  box-shadow: 0 1.6px 3.6px rgba(0,0,0,.13), 0 .3px .9px rgba(0,0,0,.11);
}
.btn:hover { background: var(--accent-dark); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.secondary { background: #fff; color: var(--accent); border: 1px solid var(--accent); box-shadow: none; }
.btn.secondary:hover { background: #fbf5f6; }

.ref { font-size: 20px; font-weight: 600; color: var(--ink); margin: 8px 0; }
.hidden { display: none !important; }

@media (min-width: 560px) {
  .page { padding-top: 24px; }
  .sheet { padding: 20px 40px 36px; }
}

/* Two columns on computer screens so the whole form fits on one screen. */
.columns { display: block; }
.pair { display: block; }
@media (min-width: 900px) {
  .page { padding-top: 16px; }
  .sheet { padding: 18px 40px 20px; }
  .masthead { display: flex; align-items: center; justify-content: center; gap: 20px; text-align: left; padding: 0; }
  .masthead .logo { margin: 0; width: 80px; height: 80px; }
  .masthead .lead { margin: 0; max-width: 640px; }
  h1 { font-size: 26px; margin-bottom: 2px; }
  .pill { margin: 12px 0 0; padding: 6px 24px; }
  .page { justify-content: center; padding-bottom: 16px; }
  .columns { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; align-items: stretch; }
  .columns .col:first-child { display: flex; flex-direction: column; }
  .columns .col:first-child .drop { flex: 1; display: flex; flex-direction: column; justify-content: center; min-height: 150px; }
  .columns .section-title { margin: 16px 0 10px; }
  .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
  label { margin-bottom: 10px; }
  textarea { min-height: 52px; }
  .files { max-height: 210px; }
  .drop { padding: 28px 16px; }
  .submit-row { display: grid; grid-template-columns: auto 1fr auto; gap: 0 28px; align-items: center;
    margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
  .submit-row .turnstile { margin: 0; justify-content: flex-start; }
  .submit-row .privacy { margin: 0; text-align: left; }
  .submit-row .status { text-align: left; min-height: 0; margin: 0 0 4px; }
  .submit-row .status:empty { display: none; }
  .submit-row .actions { margin: 0; }
  .foot { padding: 14px 28px 18px; }
}

/* Phones and tablets can't drag files: show "Tap to choose files" instead. */
.touch-only { display: none; }
@media (hover: none) and (pointer: coarse) { .pointer-only { display: none; } .touch-only { display: inline; } }

/* ---------- download portal additions ---------- */
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.btn.small { min-width: 0; height: 36px; font-size: 14px; padding: 0 16px; }
.opt { font-weight: 400; color: var(--muted); }
.panel .card { margin-top: 4px; }

.userbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 14px 0 4px; border-bottom: 1px solid #edebe9; }
.who { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.who a { color: var(--accent); }
.tabs { display: flex; gap: 4px; }
.tab { border: 0; background: none; font: inherit; font-size: 15px; font-weight: 600; color: var(--muted); padding: 10px 14px; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tab.active { color: var(--ink); border-bottom-color: var(--accent); }
.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.count { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 12px; line-height: 20px; text-align: center; }

.copyrow { display: flex; gap: 8px; align-items: center; }
.copyrow input { margin: 0; flex: 1; font-family: Consolas, "Courier New", monospace; font-size: 14px; }
.msg-label { margin-top: 14px; }
.msg-label textarea { font-size: 13px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.links-bar { display: flex; justify-content: space-between; align-items: center; margin: 16px 0 8px; }
.seg { display: inline-flex; border: 1px solid var(--accent); border-radius: 4px; overflow: hidden; }
.seg button { border: 0; background: #fff; color: var(--accent); font: inherit; font-size: 13px; padding: 6px 14px; cursor: pointer; }
.seg button.active { background: var(--accent); color: #fff; }
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list > li { border: 1px solid #edebe9; border-left: 4px solid var(--accent); border-radius: 4px; padding: 12px 14px; margin-bottom: 10px; display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; }
.link-list > li.off { border-left-color: #c8c6c4; background: #fbfbfb; }
.link-list .ltitle { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.link-list .lmeta { font-size: 13px; color: var(--muted); grid-column: 1 / -1; }
.link-list .lmeta span + span::before { content: " · "; }
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 10px; background: #dff6dd; color: var(--ok); white-space: nowrap; }
.badge.expired, .badge.revoked { background: #f3f2f1; color: var(--muted); }
.lactions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: 13px; }
.lactions select { display: inline-block; width: auto; height: 30px; margin: 0; font-size: 13px; padding-right: 30px; }
.lactions .linkbtn { font-size: 13px; }
.lactions .danger { color: var(--err); }
.empty { text-align: center; color: var(--muted); padding: 24px 0; }

/* Download page: one narrow column like the Bookings page */
body.narrow .page { max-width: 640px; }
body.narrow .masthead { display: block; text-align: center; }
body.narrow .masthead .logo { margin: 0 auto 12px; width: 96px; height: 96px; }
body.narrow .masthead .lead { margin: 0 auto 12px; }
body.narrow .sheet { padding-bottom: 28px; }
.summary { text-align: center; margin-top: 8px; }
.files.dl { max-height: none; }
.files.dl li { grid-template-columns: 1fr auto auto; }
.files.dl a { color: var(--accent); font-size: 13px; }
@media (min-width: 900px) {
  #form .submit-row { grid-template-columns: 1fr auto; }
}
#done-warn:empty, #signin-msg:empty { display: none; }
@media (min-width: 900px) { body.staff .page { justify-content: flex-start; } }
#links-status:empty { display: none; }
