:root {
  color-scheme: light;
  --paper: #eef1f4;
  --navy: #101a39;
  --ink: #202a3a;
  --muted: #576274;
  --line: #ccd2db;
  --white: #fff;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 14px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button, input, textarea, select { border-radius: 3px; }
button { touch-action: manipulation; }
:focus-visible { outline: 3px solid #4269b2; outline-offset: 4px; }
button:disabled { opacity: .48; }
h1, h2, p { margin: 0; }
.masthead { min-height: 80px; padding: 21px 40px; display: flex; align-items: center; gap: 30px; border-bottom: 1px solid var(--line); }
.wordmark { color: var(--navy); font-family: var(--serif); font-weight: 600; font-size: 23px; letter-spacing: .12em; line-height: 1.3; }
.service-label { font-size: 12px; color: var(--muted); letter-spacing: .06em; }
.member-session { display: flex; align-items: center; gap: 20px; margin-left: auto; min-width: 0; }
.member-identity { min-width: 0; text-align: right; line-height: 1.6; }
#member-name { display: block; font-size: 12px; }
#member-email { display: block; font-size: 10px; color: var(--muted); overflow-wrap: anywhere; }
#logout-session { flex: 0 0 auto; padding-left: 0; }
.workspace { max-width: 1100px; margin: 0 auto; padding: 0 24px 40px; }
.article-context { min-height: 132px; display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 24px 0; }
.eyebrow { font-size: 11px; letter-spacing: .12em; color: var(--muted); margin-bottom: 7px; }
.article-context h1 { font-family: var(--serif); color: var(--navy); font-size: 27px; font-weight: 600; letter-spacing: .04em; line-height: 1.4; }
.article-title { font-size: 13px; color: var(--muted); margin-top: 5px; }
.context-note { max-width: 260px; color: var(--muted); font-size: 12px; }
.article-links-area { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 0 0 26px; }
.article-links-intro h2 { font-size: 17px; }
.article-links-intro p { margin-top: 5px; color: var(--muted); font-size: 12px; }
.article-links { display: flex; flex-wrap: wrap; gap: 12px; }
.article-links a { display: inline-flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 46px; padding: 10px 16px; border: 1px solid #aeb7c6; border-radius: 3px; color: var(--navy); background: #fff; font-size: 13px; text-decoration: none; }
.article-links a:hover { background: #e5ebf3; border-color: var(--navy); }
.article-links a span { font-size: 17px; line-height: 1; }
.workbench { min-width: 0; }
.form-panel { min-width: 0; display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(260px, 1fr); align-items: start; gap: 32px; }
.request-section { min-width: 0; padding: 30px; border: 1px solid var(--line); background: var(--white); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
h2 { color: var(--navy); font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: .03em; line-height: 1.4; }
.field-group { margin-bottom: 24px; }
.attachment-dropzone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; min-height: 142px; padding: 20px 14px; border: 1px dashed #99a7bc; border-radius: 5px; background: #f8fafc; color: var(--navy); text-align: center; transition: background-color .15s, border-color .15s; }
.attachment-dropzone:hover, .attachment-dropzone.is-dragging { border-color: var(--navy); background: #eaf0f8; }
.attachment-dropzone.is-dragging { border-style: solid; box-shadow: inset 0 0 0 1px var(--navy); }
.attachment-dropzone:focus-within { outline: 3px solid #4269b2; outline-offset: 3px; }
.attachment-dropzone[data-invalid="true"] { border-color: #a03b32; }
.attachment-dropzone[data-disabled="true"] { opacity: .5; background: #f1f3f6; border-color: #adb7c6; }
.attachment-dropzone input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: pointer; }
.attachment-dropzone input[type="file"]:disabled { cursor: default; }
.attachment-upload-icon { flex: none; margin-bottom: 2px; }
.attachment-drop-title { font-size: 12px; font-weight: 500; line-height: 1.7; }
.attachment-drop-choice { color: var(--muted); font-size: 11px; }
.attachment-drop-choice span { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.attachment-help { color: var(--muted); font-size: 10px; line-height: 1.8; margin: 9px 0 0; }
.attachment-summary { margin-top: 16px; color: var(--navy); font-size: 11px; }
.attachment-list { list-style: none; margin: 7px 0 0; padding: 0; }
.attachment-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #e2e6ec; }
.attachment-list li:last-child { border-bottom: 0; }
.attachment-format { flex: 0 0 34px; display: grid; place-items: center; height: 40px; background: #edf1f6; color: #41536f; border-radius: 3px; font-size: 9px; font-weight: 600; }
.attachment-info { min-width: 0; flex: 1; }
.attachment-name { display: block; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.attachment-size { display: block; color: var(--muted); font-size: 10px; white-space: nowrap; }
.attachment-remove { flex: 0 0 auto; min-height: 40px; padding: 7px 9px; background: transparent; border: 0; color: var(--navy); font-size: 12px; text-decoration: underline; text-underline-offset: 4px; }
.history-attachments { list-style: none; margin: 10px 0 0; padding: 0; }
.history-attachments li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 4px 0; }
.history-attachments a { min-width: 0; padding: 3px 0; color: var(--navy); font-size: 11px; overflow-wrap: anywhere; text-underline-offset: 3px; }
label { display: block; color: var(--navy); font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.required-label { font-size: 10px; font-weight: 400; color: var(--muted); margin-left: 7px; }
.field-help { color: var(--muted); font-size: 12px; line-height: 1.8; margin: 0 0 9px; }
textarea, input, select { width: 100%; padding: 11px 12px; border: 1px solid #b8c1ce; color: var(--ink); background: #fff; line-height: 1.8; }
textarea { display: block; resize: vertical; min-height: 88px; font-size: 14px; }
#instruction { min-height: 112px; }
textarea:focus, input:focus, select:focus { border-color: var(--navy); }
textarea[aria-invalid="true"] { border-color: #a53d35; }
textarea:disabled, select:disabled { color: #566174; background: #f1f3f6; opacity: 1; }
.primary-button { width: 100%; min-height: 49px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--navy); border: 1px solid var(--navy); color: #fff; padding: 12px 17px; font-size: 13px; letter-spacing: .03em; }
.primary-button:not(:disabled):hover { background: #263656; }
.primary-button span { font-size: 18px; line-height: 1; }
.submit-note { color: var(--muted); font-size: 11px; text-align: center; margin-top: 9px; }
.error-message { color: #a03b32; font-size: 12px; line-height: 1.8; white-space: pre-line; }
.error-message:not(:empty) { margin: 9px 0 14px; }
.history-section { min-width: 0; padding: 27px 0 32px; }
.history-section h2 { font-size: 18px; }
.history-section .section-heading { margin-bottom: 13px; }
.text-button { min-height: 38px; border: 0; color: var(--navy); background: transparent; padding: 6px 0 6px 14px; font-size: 12px; text-decoration: underline; text-underline-offset: 4px; }
.request-history { list-style: none; margin: 0; padding: 0; }
.history-item { padding: 15px 0; border-bottom: 1px solid #e2e6ec; }
.history-item:last-child { border-bottom: 0; padding-bottom: 0; }
.history-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.history-date { font-size: 10px; color: var(--muted); }
.status { display: inline-block; font-size: 10px; color: #41536f; background: #edf1f6; padding: 3px 7px; border-radius: 2px; font-weight: 500; }
.status[data-state="review_ready"] { color: #28604d; background: #e8f1ec; }
.status[data-state="needs_input"], .status[data-state="failed"] { color: #854e25; background: #f8eee3; }
.history-quote { color: var(--navy); font-family: var(--serif); font-size: 13px; line-height: 1.8; margin: 9px 0 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; }
.history-instruction { color: var(--muted); font-size: 12px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.history-id { color: var(--muted); font-size: 9px; margin-top: 7px; overflow-wrap: anywhere; }
.history-result { margin-top: 8px; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.receipt { margin-top: 18px; padding: 15px; background: #edf3f0; color: #244b3d; }
.receipt-heading { font-size: 13px; font-weight: 600; }
.receipt-id { font-size: 10px; overflow-wrap: anywhere; margin: 5px 0; }
#receipt-status { font-size: 11px; }
.access-screen { max-width: 520px; margin: clamp(55px, 12vh, 130px) auto; padding: 0 24px; }
.access-screen h1 { text-wrap: balance; font-family: var(--serif); color: var(--navy); font-size: 29px; font-weight: 600; margin-bottom: 18px; line-height: 1.5; }
#access-message { font-size: 14px; color: var(--muted); margin-bottom: 30px; }
.skip-link { position: fixed; z-index: 10; top: -100px; left: 20px; padding: 12px 20px; color: white; background: var(--navy); }
.skip-link:focus { top: 10px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 760px) {
  .masthead { min-height: 65px; padding: 18px 20px; gap: 17px; justify-content: space-between; flex-wrap: wrap; }
  .member-session { flex-basis: 100%; justify-content: space-between; gap: 16px; margin-top: -2px; }
  .member-identity { text-align: left; }
  #member-name { font-size: 12px; }
  #member-email { font-size: 11px; }
  .wordmark { font-size: 19px; }
  .service-label { font-size: 10px; }
  .workspace { padding: 0 0 30px; }
  .article-context { min-height: 121px; padding: 20px; display: block; }
  .article-context h1 { font-size: 23px; }
  .article-title { font-size: 11px; margin-top: 6px; }
  .context-note { display: none; }
  .eyebrow { font-size: 10px; margin-bottom: 5px; }
  .article-links-area { display: block; padding: 0 20px 24px; }
  .article-links-intro h2 { font-size: 17px; }
  .article-links { margin-top: 16px; }
  .article-links a { flex: 1 1 148px; min-height: 48px; padding: 11px 13px; gap: 12px; }
  .form-panel { display: block; }
  .request-section { padding: 25px 24px; border-left: 0; border-right: 0; }
  .history-section { padding: 28px 24px 0; }
  .attachment-name, .history-attachments a { font-size: 13px; }
  .attachment-size { font-size: 11px; }
  .attachment-drop-title { font-size: 14px; }
  .attachment-drop-choice, .attachment-summary { font-size: 12px; }
  .attachment-help { font-size: 11px; }
  label { font-size: 14px; }
  textarea, input, select { font-size: 16px; }
  .primary-button { min-height: 51px; font-size: 14px; }
  .history-id { font-size: 10px; }
  .access-screen { margin-top: 58px; }
  .access-screen h1 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
