/* The member area shares the public site's typography, header, palette and grid
   through style.css. These rules only style its workspace and form controls. */
.research-tools {
  --tools-accent: #f47721;
  --tools-surface: #f7f7f5;
  --tools-danger: #a32c24;
  color-scheme: light;
}
.research-tools [hidden] { display: none !important; }
.research-tools .skip-link { position: fixed; top: 12px; left: 16px; z-index: 100; padding: 10px 16px; background: white; color: var(--ink); transform: translateY(-180%); }
.research-tools .skip-link:focus { transform: none; }
.tools-site-header .brand img { aspect-ratio: 1905 / 825; object-fit: contain; }
.tools-access-mark { grid-area: language; justify-self: end; display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid #d8d6cf; border-radius: 6px; background: #ffffffb8; font-size: 12px; line-height: 1.4; white-space: nowrap; }
.tools-access-mark svg { width: 15px; height: 15px; flex: none; }
.research-tools .tools-intro { padding-top: 36px; padding-bottom: 40px; }
.tools-intro .section-label { margin-bottom: 20px; }
.tools-intro .page-heading { margin-bottom: 22px; text-wrap: balance; }
.tools-intro .activity-intro { max-width: 800px; margin: 0; text-wrap: pretty; }
.research-tools .tools-workspace { padding-top: 0; padding-bottom: 64px; }
.research-tools .eyebrow { margin: 0 0 10px; font-size: 11px; font-weight: 600; letter-spacing: 1.7px; color: var(--teal); }
.research-tools h2 { margin: 0 0 16px; font-size: 30px; letter-spacing: -.7px; line-height: 1.25; }
.research-tools .card { min-width: 0; padding: 30px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.research-tools .identity { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 28px; border-left: 3px solid var(--tools-accent); background: var(--tools-surface); }
.identity > div { min-width: 0; }
.research-tools .identity .eyebrow { margin-bottom: 6px; }
.research-tools .identity h2 { font-size: 23px; margin-bottom: 4px; }
#member-code { margin: 0; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.research-tools .actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
#coord-link, #sharing-link { font-size: 14px; color: var(--teal); text-decoration: underline; text-underline-offset: 4px; }
.tools-catalog { margin: 42px 0; }
.research-tools .tools-title { margin-bottom: 22px; }
.tool-card { display: flex; align-items: center; justify-content: space-between; gap: 40px; padding: 30px; border: 1px solid var(--line); border-top: 3px solid var(--tools-accent); border-radius: 8px; background: var(--tools-surface); }
.tool-card-content { max-width: 760px; min-width: 0; }
.tool-card h3 { margin: 0 0 14px; font-size: 28px; font-weight: 400; line-height: 1.3; letter-spacing: -.5px; }
.tool-card p { font-size: 15px; color: var(--muted); margin-bottom: 16px; }
.tool-card .small { font-size: 13px; margin: 0; }
.research-tools :is(.primary, .secondary, .danger, .danger-quiet) { display: inline-flex; align-items: center; justify-content: center; gap: 16px; min-height: 44px; padding: 11px 20px; border: 1px solid var(--line); border-radius: 4px; font: 14px/1.4 Arial, Helvetica, sans-serif; font-weight: 600; text-align: center; text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s; }
.research-tools .primary { background: var(--tools-accent); border-color: var(--tools-accent); color: #202629; }
.research-tools .primary:hover { background: var(--mint); border-color: var(--mint); }
.research-tools .tool-card .primary { flex: none; background: var(--navy); border-color: var(--navy); color: white; }
.research-tools .tool-card .primary:hover { background: #3b454a; border-color: #3b454a; }
.research-tools .secondary { background: white; border-color: #c9cdce; color: var(--ink); }
.research-tools .secondary:hover { background: #f0efeb; border-color: #9ca2a4; }
.research-tools button:disabled { opacity: .55; cursor: wait; }
.research-tools :is(input, select, .table-scroll):focus-visible { outline: 3px solid #d09645; outline-offset: 4px; }
.research-tools .small, .research-tools .search-label { font-size: 13px; color: var(--muted); }
.archive-panel .section-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.archive-panel .section-head h2 { margin-bottom: 0; }
.archive-scopes { display: flex; flex-wrap: wrap; gap: 10px; padding: 22px 0 0; }
.research-tools .archive-scopes button[aria-pressed=true] { color: white; background: var(--navy); border-color: var(--navy); }
.archive-scopes .scope-role { font-size: 10px; font-weight: 400; letter-spacing: .3px; opacity: .85; }
.archive-owner-field { max-width: 480px; }
.archive-owner-field select { margin-top: 8px; }
#archive-count { margin: 0 0 14px; }
#archive-count:empty { display: none; }
.search-label { display: block; margin-top: 24px; }
.research-tools input, .research-tools select { display: block; width: 100%; min-width: 0; min-height: 44px; padding: 11px 12px; border: 1px solid #bfc4c6; border-radius: 4px; color: var(--ink); background: white; font: 15px/1.4 Arial, Helvetica, sans-serif; }
.research-tools input::placeholder { color: #6a7174; opacity: 1; }
#exam-search { max-width: 480px; margin: 8px 0 12px; }
#archive-note { max-width: 870px; margin-bottom: 26px; }
.table-scroll { overflow-x: auto; scrollbar-width: thin; }
.research-tools table { width: 100%; min-width: 780px; border-collapse: collapse; font-size: 13px; line-height: 1.55; }
.research-tools th, .research-tools td { padding: 18px 14px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
.research-tools th { font-size: 10px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); background: var(--tools-surface); }
.research-tools td:first-child { min-width: 240px; }
.research-tools td:nth-child(3) { font-variant-numeric: tabular-nums; }
.research-tools td a { color: var(--teal); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.research-tools td p { margin: 5px 0; color: var(--muted); }
.research-tools tbody tr:hover { background: #fafaf8; }
.research-tools .badge { display: inline-block; padding: 4px 9px; border-radius: 20px; font-size: 11px; white-space: nowrap; color: #795318; background: #f7efdc; }
.research-tools .badge.reviewed { color: #28664b; background: #e6f1e9; }
.table-scroll details { margin-top: 7px; }
.table-scroll summary { width: fit-content; cursor: pointer; font-size: 12px; color: var(--muted); }
.history { display: grid; gap: 8px; padding: 10px 0; }
.research-tools .history a { font-size: 12px; font-weight: 400; }
.research-tools .members-panel { margin-top: 32px; }
.members-panel > p:not(.eyebrow) { color: var(--muted); max-width: 800px; font-size: 14px; }
.member-form { display: grid; grid-template-columns: 1.5fr 1fr .8fr auto; align-items: end; gap: 14px; padding: 24px 0; border-top: 1px solid var(--line); }
.member-form > p, .member-email { grid-column: 1 / -1; margin: 0; overflow-wrap: anywhere; }
.login label, .member-form label { display: grid; gap: 6px; min-width: 0; font-size: 13px; font-weight: 600; }
.access-card { max-width: 760px; }
.access-card > p { color: var(--muted); }
.access-card > .secondary { margin: 8px 8px 0 0; }
.login { display: grid; gap: 18px; max-width: 440px; margin-top: 26px; }
.login .primary { justify-self: start; min-width: 116px; }
.login p[role=status] { min-height: 24px; margin: 0; color: var(--teal); font-size: 14px; }
.login-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.page-status { margin: 24px 0 0; color: var(--teal); font-size: 14px; }
.page-status:empty { display: none; }
.research-tools .tools-footer { border-top: 1px solid var(--line); }
.tools-footer > div { max-width: 390px; }
.tools-footer > div p + p { margin-top: 8px; }
.tools-footer > a:last-child { white-space: nowrap; }
.research-tools .danger-quiet { min-height: 40px; padding: 8px 12px; color: var(--tools-danger); border-color: #dcc2bf; background: white; font-size: 12px; white-space: nowrap; }
.research-tools .danger-quiet:hover { background: #fff3f1; border-color: var(--tools-danger); }
.research-tools .danger { color: white; border-color: var(--tools-danger); background: var(--tools-danger); }
.research-tools .danger:hover { background: #84231d; border-color: #84231d; }
.delete-dialog { width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 48px); overflow: auto; padding: 32px; border: 1px solid var(--line); border-top: 3px solid var(--tools-danger); border-radius: 8px; box-shadow: 0 20px 70px #262d3140; color: var(--ink); background: white; }
.delete-dialog::backdrop { background: #262d3190; }
.delete-dialog .exam-code { color: var(--teal); font-weight: 700; overflow-wrap: anywhere; }
#delete-exam-sample { overflow-wrap: anywhere; }
#delete-exam-description { color: var(--muted); font-size: 15px; }
#delete-exam-status { font-size: 13px; color: var(--tools-danger); }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
@media (max-width: 900px) {
  .research-tools .identity { align-items: flex-start; flex-direction: column; gap: 18px; }
  .tool-card { gap: 28px; }
  .member-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .tools-access-mark { gap: 5px; padding: 7px 8px; font-size: 10px; }
  .tools-access-mark svg { width: 13px; height: 13px; }
  .research-tools .page-trail { gap: 8px; font-size: 12px; padding-top: 20px; padding-bottom: 20px; }
  .research-tools .tools-intro { padding-top: 20px; padding-bottom: 30px; }
  .tools-intro .activity-intro { font-size: 16px; }
  .research-tools .tools-workspace { padding-bottom: 40px; }
  .research-tools .card, .tool-card { padding: 22px; }
  .research-tools h2 { font-size: 26px; }
  .research-tools .identity h2 { font-size: 22px; }
  .tools-catalog { margin: 32px 0; }
  .tool-card { flex-direction: column; align-items: stretch; gap: 24px; }
  .tool-card .primary { align-self: flex-start; }
  .archive-panel .section-head { align-items: flex-start; gap: 16px; flex-wrap: wrap; }
  .member-form { grid-template-columns: 1fr; }
  .research-tools .tools-footer { align-items: flex-start; flex-direction: column; gap: 24px; }
  .tools-footer > div p { width: auto; }
  .research-tools .tools-footer .brand img { max-width: 100%; width: 240px; }
  .delete-dialog { padding: 24px; }
  .dialog-actions button { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .research-tools :is(.primary, .secondary, .danger, .danger-quiet) { transition: none; }
}
/* Private archive and scoped research access. */
.exam-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.research-tools .exam-actions .secondary { min-height: 38px; padding: 7px 11px; font-size: 12px; white-space: nowrap; }
.sharing-panel { margin-top: 32px; scroll-margin-top: calc(var(--site-header-height, 120px) + 24px); }
.sharing-management, .research-space { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 18px; }
.research-space { scroll-margin-top: calc(var(--site-header-height, 120px) + 24px); }
.research-line-picker { margin: 24px 0; padding: 20px; background: var(--tools-surface); border: 1px solid var(--line); border-radius: 6px; }
.research-line-picker p { margin: 0 0 16px; font-size: 14px; color: var(--muted); }
.research-line-picker label { display: grid; gap: 8px; font-size: 14px; font-weight: 600; }
.research-line-picker select { width: 100%; min-width: 0; }
.sharing-management > summary, .research-space > summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.sharing-management p, .research-space p, .sharing-dialog p { font-size: 14px; color: var(--muted); }
.sharing-form { display: flex; align-items: end; flex-wrap: wrap; gap: 14px; margin: 18px 0; }
.sharing-form > label { display: grid; gap: 7px; font-size: 13px; font-weight: 600; flex: 1 1 220px; }
.research-tools .sharing-check { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.research-tools .sharing-check input { width: 18px; height: 18px; min-height: 18px; flex: none; accent-color: var(--navy); }
.space-members { list-style: none; padding: 0; margin: 16px 0; }
.space-members li { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.space-members li > span { flex: 1 1 220px; }
.space-members select { width: auto; }
.sharing-dialog { width: min(800px, calc(100% - 32px)); max-height: calc(100dvh - 48px); overflow: auto; padding: 30px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); box-shadow: 0 20px 70px #262d3140; }
.sharing-dialog::backdrop { background: #262d3190; }
.sharing-dialog .section-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.sharing-dialog h3 { font-size: 19px; margin-top: 26px; }
.sharing-dialog .exam-code { font-weight: 600; overflow-wrap: anywhere; }
@media(max-width:620px){.sharing-dialog{padding:22px}.sharing-form{align-items:stretch}.sharing-form > button{width:100%}.archive-scopes > button{flex:1 1 180px}}
