:root {
  color-scheme: light;
  --ink: #182544;
  --muted: #52617c;
  --blue: #2a4bb6;
  --link: #2446ac;
  --line: #dce4f0;
  --pale: #f5f7fc;
  --white: #fff;
  --focus: #4e70dd;
  font: 16px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--pale);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 0; }
a { color: var(--link); text-underline-offset: .2em; }
a:hover { color: #162f82; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: 1.25rem; line-height: 1.3; }
button, input, select { font: inherit; }
button, .button, input, select { border-radius: 9px; border: 1px solid #c6d2e5; }
button, .button {
  display: inline-flex; align-items: center; justify-content: center; background: var(--white);
  color: var(--ink); min-height: 42px; padding: 7px 15px; text-decoration: none; font-weight: 650; cursor: pointer;
}
button:hover:not(:disabled), .button:hover { background: #edf1fc; border-color: #95a9d6; }
button:disabled { cursor: default; opacity: .53; }
button.primary { color: #fff; background: var(--blue); border-color: var(--blue); }
button.primary:hover:not(:disabled) { background: #1c3a98; }
input, select { min-width: 0; min-height: 44px; background: #fff; color: var(--ink); padding: 8px 12px; }
input::placeholder { color: #64718d; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: absolute; z-index: 2; left: 12px; top: 8px; padding: 10px; background: white; }
.shell { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.site-head { background: white; border-bottom: 1px solid var(--line); }
.head-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); font-size: 1.22rem; letter-spacing: -.035em; font-weight: 820; }
.brand .plus { color: #3f64d0; }
.site-head nav, .site-foot nav { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.site-head nav a, .site-foot nav a { color: var(--muted); font-size: .9rem; font-weight: 600; text-decoration: none; }
.site-head nav a:hover, .site-foot nav a:hover { text-decoration: underline; }
.hero { padding: 56px 0 30px; }
.eyebrow { display: flex; gap: 8px; align-items: center; color: var(--link); font-size: .75rem; letter-spacing: .105em; text-transform: uppercase; font-weight: 790; }
.eyebrow span { width: 8px; height: 8px; border-radius: 50%; background: #4669cd; }
h1 { font-size: clamp(2.3rem, 5.5vw, 3.9rem); letter-spacing: -.06em; font-weight: 820; line-height: 1.05; margin: 10px 0 12px; }
.lede { color: var(--muted); font-size: clamp(1rem, 2vw, 1.18rem); }
.start-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 20px; }
.drop, .privacy-tile, .option-panel, .filebar, .workspace, .document { border-radius: 16px; background: white; border: 1px solid var(--line); }
.drop {
  padding: 34px 20px; min-height: 311px; display: flex; align-items: center; justify-content: center; flex-direction: column;
  text-align: center; border: 2px dashed #aabdeb;
}
.drop.is-over { background: #e9f0ff; border-color: #4366cd; }
.file-icon { background: #edf2ff; color: #2d4fb6; border-radius: 15px; width: 64px; height: 64px; display: grid; place-items: center; margin-bottom: 15px; }
.drop p, .option-panel p:not(.eyebrow) { color: var(--muted); margin: 6px 0 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.centered { justify-content: center; margin: 18px 0 9px; }
.fine { font-size: .82rem; color: var(--muted); }
.privacy-tile { padding: 28px 29px; background: #eef3ff; color: var(--ink); border-color: #dbe5ff; }
.privacy-tile svg { margin-bottom: 9px; color: var(--blue); }
.privacy-tile p { margin: 8px 0; color: var(--muted); }
.privacy-tile ul { margin: 12px 0 16px; padding-left: 19px; color: #364760; font-size: .94rem; }
.privacy-tile a { font-weight: 670; font-size: .91rem; }
.option-panel { padding: 25px; display: grid; gap: 15px; }
.option-panel .eyebrow { margin-bottom: 5px; }
#url-form label { display: block; font-weight: 650; margin-bottom: 6px; }
#source-url { flex: 1; min-width: min(240px, 100%); max-width: 620px; }
.messages { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.message { margin: 12px 0; padding: 10px 13px; border: 1px solid #cfddfb; background: #edf2ff; color: #2a438f; border-radius: 9px; overflow-wrap: anywhere; }
.message.error { border-color: #f1c9c6; background: #fff1f0; color: #8c2f26; }
.alternate { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-top: 19px; font-size: .9rem; }
.alternate span { color: var(--muted); }
.alternate a { font-weight: 630; }
.site-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 48px; padding: 17px 0 27px; border-top: 1px solid var(--line); color: var(--muted); font-size: .87rem; }
.filebar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 18px; margin-bottom: 13px; }
.fileinfo { display: flex; gap: 13px; min-width: 0; align-items: center; }
.document-badge { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; color: var(--blue); font-size: .8rem; font-weight: 850; border-radius: 10px; background: #eaf0ff; }
.filetitle { min-width: 0; overflow-wrap: anywhere; }
.filetitle h2 { font-size: 1.04rem; }
.filetitle p { font-size: .83rem; color: var(--muted); }
.batch { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; }
.batch select { max-width: 88%; }
.workspace { display: grid; grid-template-columns: minmax(235px, 34%) minmax(0, 1fr); overflow: hidden; min-height: 398px; }
.contact-list { min-width: 0; border-right: 1px solid var(--line); }
.list-head { padding: 14px; border-bottom: 1px solid var(--line); }
#query { width: 100%; }
.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 6px; color: var(--muted); font-size: .83rem; }
button.text-btn { padding: 3px 7px; background: transparent; border-color: transparent; color: var(--link); min-height: 30px; }
#contacts { margin: 0; padding: 6px; list-style: none; max-height: 390px; overflow: auto; }
#contacts li { margin: 0; }
.contact {
  width: 100%; border: 1px solid transparent; text-align: left; justify-content: flex-start;
  padding: 8px; min-width: 0; gap: 10px;
}
.contact[aria-pressed="true"] { border-color: #c7d6fc; background: #eef3ff; color: #233f99; }
.contact-text { display: grid; min-width: 0; line-height: 1.25; }
.contact-name, .contact-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-sub { font-size: .77rem; margin-top: 3px; color: var(--muted); font-weight: 450; }
.avatar { flex-shrink: 0; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #e4ebff; color: #294ab2; font-weight: 780; font-size: .8rem; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.large { width: 60px; height: 60px; border-radius: 16px; font-size: 1.25rem; }
.pagination { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding: 8px 12px; font-size: .86rem; color: var(--muted); }
.pagination button { min-height: 36px; padding: 3px 13px; }
.profile { min-width: 0; padding: 25px; overflow-wrap: anywhere; }
.profile-head { display: flex; align-items: center; gap: 14px; margin-bottom: 19px; }
.profile h3 { font-size: clamp(1.32rem, 3vw, 1.85rem); letter-spacing: -.025em; line-height: 1.15; }
.profile-head p { color: var(--muted); margin-top: 5px; font-size: .92rem; }
.profile dl { margin: 0; }
.profile .row { display: grid; grid-template-columns: 126px minmax(0, 1fr); gap: 8px; padding: 10px 0; border-top: 1px solid #e5ebf4; }
.profile dt { font-size: .85rem; font-weight: 700; color: var(--muted); }
.profile dt small { display: block; font-weight: 500; }
.profile dd { white-space: pre-wrap; margin: 0; min-width: 0; }
.profile-empty { color: var(--muted); }
.document { max-width: 780px; margin: 35px auto 0; padding: clamp(22px, 5vw, 48px); }
.document h1 { font-size: clamp(2rem, 5vw, 3rem); }
.document h2 { margin-top: 24px; }
.document p, .document ul, .document ol { margin-top: 10px; overflow-wrap: anywhere; }
@media (max-width: 740px) {
  .shell { width: calc(100% - 32px); }
  .hero { padding: 32px 0 22px; }
  .start-layout, .workspace { grid-template-columns: minmax(0, 1fr); }
  .drop { min-height: 270px; }
  .privacy-tile { padding: 19px 23px; }
  .contact-list { border-right: 0; border-bottom: 1px solid var(--line); }
  #contacts { max-height: 180px; }
  .filebar { align-items: flex-start; flex-direction: column; }
  .profile { padding: 16px; }
  .profile .row { grid-template-columns: minmax(82px, 29%) minmax(0, 1fr); }
}
@media (max-width: 365px) { .site-head nav { gap: 9px; } }
@media print {
  body, .workspace { background: white; color: #000; }
  .site-head, .site-foot, .hero, .filebar .actions, .contact-list, .alternate, .messages, .batch { display: none !important; }
  .shell, .workspace { display: block; width: 100%; border: 0; }
  .profile .row { break-inside: avoid; }
}
