/* Shared workspace and HR review components across appearance preferences. */
:root {
  --rf-ink: #172f34; --rf-muted: #526b6d; --rf-border: #d8e3e1;
  --rf-teal: #096d62; --rf-light: #edf7f3; --rf-focus: #147c70;
  --tblr-primary: #096d62; --tblr-primary-fg: white; --tblr-primary-darken: #07584f;
}
.rf-icon { width: 17px; height: 17px; display: inline-block; vertical-align: middle; flex: none; pointer-events: none; }
.brand-mark .rf-icon { width: 23px; height: 23px; }
.topbar .seg-btn, #btn-export-pdf, .ui-theme-summary, #tpl-switch button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.tb-btn, .tb-form-select, .tb-form-label { font-family: inherit; }
.workspace-bar, .workspace-tools, .preview-heading, .preview-heading > div, .pane-navigation, .content-heading,
.review-run-row, .review-heading, .review-scope-row, .review-feedback, .finding-meta { display: flex; align-items: center; }
.workspace-bar { justify-content: space-between; gap: 8px; padding: 6px 18px; background: var(--panel,#fff); border-bottom: 1px solid var(--panel-edge,#d7dfdd); }
.workspace-tools { gap: 6px; flex-wrap: wrap; }
.draft-label { font-size: 12px; color: var(--ink-2,#465); white-space: nowrap; }
.preview-heading { justify-content: space-between; gap: 10px; padding: 10px 20px; background: var(--panel,#fff); border-bottom: 1px solid var(--panel-edge,#dde); }
.preview-heading > div { gap: 9px; }
.preview-heading h2 { font: 650 16px/1.3 var(--font-body,sans-serif); }
.preview-heading .page-badge { margin: 0; }
.ui-theme-group { position: relative; }
.ui-theme-group[open] #ui-theme-switch { position:absolute; right:0; top:calc(100% + 7px); z-index:60; width:max-content; box-shadow:0 5px 15px #102c3022; background: var(--panel,#fff); }
.pane-navigation { gap: 4px; margin-bottom: 16px; padding: 4px; border-radius: 10px; background: #e6eeeb; }
.pane-navigation button { display:flex; align-items:center; justify-content:center; gap:7px; flex:1; border:0; border-radius:7px; background:transparent; color:var(--rf-muted); padding:9px 4px; font-weight:600; font-size:13px; line-height:1.3; font-family:inherit; cursor:pointer; }
.pane-navigation button[aria-pressed=true] { background:#fff; color:var(--rf-teal); box-shadow:0 1px 5px #1b3e3424; }
.pane-body[hidden], .onboard-note[hidden], #review-panel [hidden] { display:none!important; }
.pane-body { color:var(--rf-ink); }
.pane-body :is(h1,h2)[tabindex]:focus { outline:none; }
.review-invite { position:relative; isolation:isolate; overflow:hidden; display:flex; align-items:center; justify-content:space-between; gap:6px; min-height:134px; border-radius:13px; padding:20px; color:#f6fffa; background:linear-gradient(115deg,#123a3b 0%,#194943 70%,#28614e 100%); }
.review-invite > div:first-child { position:relative; z-index:2; max-width:74%; }
.review-invite h2 { font-size:clamp(18px,1.55vw,23px); line-height:1.35; letter-spacing:-.5px; }
.review-invite p { font-size:12px; color:#c7dfd4; line-height:1.65; margin:6px 0 12px; }
.invite-button.tb-btn { display:inline-flex; align-items:center; gap:9px; min-height:29px; background:#bcf0cb; color:#143e34; border:0; border-radius:6px; padding:5px 10px; font-size:12px; font-weight:670; box-shadow:none; cursor:pointer; }
.invite-button:hover { background:#d5f9df; }
.invite-button .rf-icon { width:15px; height:15px; }
.invite-art { position:absolute; right:8%; top:24%; width:48px; height:66px; transform: rotate(9deg); }
.invite-art i,.invite-art b { position:absolute; inset:0; border-radius:4px; }
.invite-art i { transform:rotate(-22deg) translate(-9px,1px); border:1px solid #85b5a3; background:#477866; }
.invite-art b { background:#e1edcf; box-shadow:2px 3px 0 #153c31; padding:12px 8px; display:grid; align-content:start; gap:4px; }
.invite-art em { height:2px; width:100%; border-radius:2px; background:#719a83; }
.invite-art em:first-child { width:55%; height:4px; margin-bottom:4px; background:#37644e; }
.invite-art em:last-child { width:70%; }
.invite-art span { position:absolute; right:-12px; bottom:-3px; display:grid; place-items:center; width:25px; height:25px; border-radius:50%; color:#214a3b; background:#c3f4c6; box-shadow:0 0 0 3px #245442; transform:rotate(-9deg); }
.review-invite:after { content:""; z-index:-1; position:absolute; inset:0 0 0 61%; background-image:radial-gradient(#a8ceaa55 .8px,transparent .9px); background-size:7px 7px; mask-image:linear-gradient(90deg,transparent,#000); }
.content-heading { justify-content:space-between; gap:8px; margin:22px 0 12px; }
.content-heading h1,.review-heading h2 { margin:0; font-size:23px; font-weight:700; line-height:1.35; letter-spacing:-.6px; }
#section-jump { font:inherit; font-size:12px; color:var(--rf-muted); background:transparent; border:0; max-width:42%; padding:4px; cursor:pointer; }
.onboard-note { background:#f1f7f3; border:1px solid #d4e3d8; border-radius:9px; padding:11px 13px; margin-bottom:12px; }
.onboard-note h3 { font-size:13px; } .onboard-note p { color:var(--rf-muted); font-size:12px; line-height:1.55; margin:4px 0; }
.onboard-note button, #review-whole { color:var(--rf-teal); background:transparent; border:0; font:inherit; font-size:12px; font-weight:620; padding:4px 0; margin-right:12px; cursor:pointer; }
.review-heading { gap:12px; margin:2px 0 10px; } .review-heading p { color:var(--rf-muted); font:11px/1.6 var(--font-mono,monospace); }
.review-symbol.tb-avatar { background:#dcf0e4; color:var(--rf-teal); border-radius:10px; width:43px; height:43px; box-shadow:none; display:grid; place-items:center; }
.review-symbol .rf-icon { height:23px; width:23px; }
.review-intro { font-size:13px; line-height:1.65; color:var(--rf-muted); margin-bottom:14px; }
.review-controls.tb-card,.review-block { display:block; background:white; padding:16px; border:1px solid var(--rf-border); border-radius:11px; margin-bottom:12px; box-shadow:0 2px 5px #173d3610; }
.review-scope-row { justify-content:space-between; color:#286658; padding-bottom:10px; margin-bottom:10px; border-bottom:1px solid #e4ede7; font-size:12px; font-weight:650; }
.review-controls label { display:block; font-size:13px; font-weight:600; margin:12px 0 5px; }
.review-controls small { margin-left:3px; color:var(--rf-muted); font-weight:400; }
.review-controls :is(select,textarea) { display:block; width:100%; border:1px solid #cbd9d5; border-radius:6px; color:var(--rf-ink); background-color:#fff; padding:8px 10px; font:13px/1.55 var(--font-body,sans-serif); }
.review-controls textarea { resize:vertical; }
.review-controls select { padding-right:29px; }
.review-privacy { display:flex; align-items:flex-start; gap:6px; color:var(--rf-muted); font-size:11px; line-height:1.6; margin:13px 0 12px; }
.review-privacy .rf-icon { width:14px; height:14px; margin-top:2px; }
.review-run-row { gap:8px; }
.review-run-row .tb-btn,.review-action { cursor:pointer; border-radius:7px; font-size:13px; padding:7px 12px; font-weight:600; }
#review-run { background:var(--rf-teal); border:1px solid var(--rf-teal); color:#fff; gap:6px; }
#review-run:hover { background:#07574e; } #review-run:disabled { opacity:.66; }
.review-feedback { gap:8px; color:var(--rf-teal); font-size:12px; line-height:1.55; }
.review-feedback:not(:empty) { margin:10px 0; } .review-feedback:has(#review-status:empty) { margin:0; }
.review-feedback .is-error { color:#9c4024; } .review-feedback .tb-spinner-border { width:15px; height:15px; }
.review-block p { font-size:13px; line-height:1.7; overflow-wrap:anywhere; }
.review-block h3 { font-size:15px; line-height:1.5; margin:0 0 7px; }
.review-strengths { padding-left:17px; font-size:12px; line-height:1.65; margin:8px 0 0; color:#315f53; }
.finding-meta { flex-wrap:wrap; gap:6px; font-size:11px; color:var(--rf-muted); margin-bottom:8px; }
.priority { padding:2px 6px; border-radius:4px; background:#e9f0f1; color:#365f62; }
.priority.high { background:#f9e5d7;color:#8a431b; } .priority.medium { background:#f6edcf;color:#76581c; }
.quote-before,.quote-after,.review-question { border-left:2px solid #ccd8d4; padding:5px 9px; margin:10px 0 0; background:#f6f8f7; }
.quote-after { border-color:#60a681; background:#edf7ef; } .review-question { border-color:#cba767; background:#fbf6e9; }
.review-caption { display:block; font-size:11px; font-weight:650; color:var(--rf-muted); margin-bottom:2px; }
.source-link { display:block; width:fit-content; color:var(--rf-teal); font-size:11px; margin-top:10px; text-underline-offset:2px; }
.review-action { display:block; margin-top:11px; color:var(--rf-teal); background:#eef8f3; border:1px solid #b8d9ca; }
.review-action:disabled { color:#697b75; background:#f4f6f5; border-color:#dde4e1; cursor:default; }
.was-applied { border-color:#82b8a2; }
.passage-review { color:var(--rf-teal); font-weight:650; }
:where(button,summary,select,textarea,a):focus-visible { outline:2px solid var(--rf-focus); outline-offset:2px; }
@media screen and (min-width:981px) {
  .app { overflow:clip; }
  .pane-navigation { position:sticky; top:0; z-index:3; }
}
@media (max-width:980px) {
  .workspace-bar { flex-wrap:wrap; padding:5px 12px; }
  .preview-heading { padding:8px 12px; }
  .workspace-tools { gap:3px; }
  .pane-body :is(h1,h2)[tabindex], .form-pane :is(.section-card,.jd-card,.checklist-card) { scroll-margin-top:185px; }
}
@media (prefers-reduced-motion:no-preference) {
  .pane-body:not([hidden]), .review-block { animation:rf-enter .22s ease-out both; }
  .review-block:nth-child(2) { animation-delay:45ms; } .review-block:nth-child(3) { animation-delay:75ms; }
  .sheet .review-highlight { animation:rf-highlight 1.65s ease-out; }
  .invite-button .rf-icon,.invite-art { transition:transform .18s ease-out; }
  .invite-button:hover .rf-icon { transform:translateX(2px); }
  .review-invite:focus-within .invite-art { transform:rotate(5deg) translateY(-2px); }
  @keyframes rf-enter { from{opacity:.3;transform:translateY(5px)} to{opacity:1;transform:none} }
  @keyframes rf-highlight { 0%,40%{background:#c2ebd2} 100%{background:transparent} }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior:auto!important; animation-duration:.01ms!important; animation-iteration-count:1!important; transition-duration:.01ms!important; }
}
