/* Review layer: comments, highlights, history. Kept apart from the wireframe's greys
   with one warm accent, so notes never read as part of the design. */

:root {
  --rv-ink: #2c2c2c;
  --rv-accent: #f2b33d;
  --rv-mark: rgba(255, 207, 90, .45);
  --rv-mark-on: rgba(255, 190, 50, .75);
  --rv-line: #e6e6e6;
  --rv-muted: #8a8a8a;
}

/* Highlights and pins */
mark.rv-mark { background: var(--rv-mark); color: inherit; border-radius: 3px; box-shadow: 0 0 0 1px rgba(242, 179, 61, .35); cursor: pointer; }
mark.rv-mark.on { background: var(--rv-mark-on); }
.rv-layer { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 70; }
.rv-pin { position: absolute; width: 28px; height: 28px; margin: -28px 0 0 0; border-radius: 14px 14px 14px 3px; background: var(--rv-ink); color: #fff; font: 600 11px/28px var(--font, system-ui); text-align: center; box-shadow: 0 0 0 2px #fff, 0 6px 14px -4px rgba(0, 0, 0, .35); cursor: pointer; transition: transform .15s; border: 0; }
.rv-pin:hover, .rv-pin.on { transform: scale(1.12); }
/* The element the comment was on has been removed: the pin stays where it was placed, dashed. */
.rv-pin.detached { outline: 2px dashed var(--rv-ink); outline-offset: 2px; }
.rv-pin .rv-count { position: absolute; top: -6px; right: -8px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--rv-accent); color: #2c2c2c; font-size: 10px; line-height: 16px; }
body.rv-hide .rv-pin, body.rv-hide mark.rv-mark { all: unset; }
body.rv-hide .rv-pin { display: none; }
.rv-box { position: absolute; pointer-events: none; border: 1.5px solid var(--rv-accent); border-radius: 6px; background: rgba(242, 179, 61, .07); transition: all .08s; z-index: 69; }

/* Comment mode */
body.rv-commenting #site, body.rv-commenting #site * { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 26 26'%3E%3Cpath d='M3 22V8a5 5 0 0 1 5-5h10a5 5 0 0 1 5 5v6a5 5 0 0 1-5 5H8z' fill='%232c2c2c' stroke='white' stroke-width='1.5'/%3E%3Cpath d='M9 11h8' stroke='white' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") 3 22, crosshair; }
body.rv-commenting #site ::selection { background: var(--rv-mark-on); }
/* Let reviewers drag across link text to select it, instead of dragging the link. */
.review-on #site a, .review-on #site img { -webkit-user-drag: none; user-drag: none; }
.dock.active .dock-pill { color: #fff; }

/* Floating "Comment" button on a text selection */
.rv-selbtn { position: absolute; z-index: 95; display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--rv-ink); color: #fff; font: 550 12px var(--font, system-ui); box-shadow: 0 8px 20px -6px rgba(0, 0, 0, .35); animation: rv-pop .16s ease-out; border: 0; cursor: pointer; }
@keyframes rv-pop { from { opacity: 0; transform: translateY(4px) scale(.96); } }

/* Popovers: composer and thread */
.rv-pop { position: absolute; z-index: 96; width: 320px; background: #fff; border: 1px solid var(--rv-line); border-radius: 16px; box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .35), 0 2px 6px rgba(0, 0, 0, .05); font: 13px/1.45 var(--font, system-ui); color: #333; animation: rv-pop .18s ease-out; overflow: hidden; }
.rv-pop-hd { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid #f0f0f0; color: var(--rv-muted); font-size: 12px; }
.rv-pop-hd .rv-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-icon-btn { height: 26px; min-width: 26px; padding: 0 8px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; color: #6a6a6a; font-size: 12px; border: 0; background: none; cursor: pointer; }
.rv-icon-btn:hover { background: #f3f3f3; color: #333; }
.rv-icon-btn.rv-resolved { color: #2f8a4a; }
.rv-quote { margin: 12px 12px 0; padding: 8px 10px; border-left: 3px solid var(--rv-accent); background: #fffaf0; border-radius: 6px; color: #6a5a3a; font-size: 12px; max-height: 80px; overflow: auto; white-space: pre-wrap; }
.rv-detached { margin: 12px 12px 0; padding: 8px 10px; border-radius: 6px; background: #fff4dc; color: #a06b00; font-size: 12px; }
.rv-msgs { max-height: 320px; overflow-y: auto; }
.rv-msg { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 12px; }
.rv-msg + .rv-msg { border-top: 1px solid #f3f3f3; }
.rv-av { width: 28px; height: 28px; border-radius: 50%; color: #fff; font: 600 11px/28px var(--font, system-ui); text-align: center; flex: none; }
.rv-meta { display: flex; align-items: baseline; gap: 6px; }
.rv-name { font-weight: 600; color: #333; }
.rv-time { color: #a0a0a0; font-size: 11px; }
.rv-del { margin-left: auto; color: #b0b0b0; font-size: 11px; border: 0; background: none; cursor: pointer; }
.rv-del:hover { color: #c0392b; }
.rv-del.armed { color: #fff; background: #c0392b; border-radius: 6px; padding: 1px 7px; font-weight: 600; }
.rv-body { margin-top: 2px; white-space: pre-wrap; word-wrap: break-word; color: #3a3a3a; }
.rv-form { padding: 12px; border-top: 1px solid #f0f0f0; display: flex; flex-direction: column; gap: 8px; }
.rv-form textarea { width: 100%; min-height: 64px; max-height: 200px; resize: vertical; border: 1px solid #e3e3e3; border-radius: 10px; padding: 9px 10px; font: inherit; color: #333; outline: none; }
.rv-form textarea:focus { border-color: #c9c9c9; box-shadow: 0 0 0 3px #f3f3f3; }
.rv-form-row { display: flex; align-items: center; gap: 8px; }
.rv-me { display: flex; align-items: center; gap: 6px; color: var(--rv-muted); font-size: 12px; margin-right: auto; }
.rv-me .rv-av { width: 20px; height: 20px; font-size: 9px; line-height: 20px; }
.rv-btn { height: 30px; padding: 0 12px; border-radius: 8px; border: 1px solid #e3e3e3; background: #fff; color: #555; font: 550 12px var(--font, system-ui); cursor: pointer; }
.rv-btn:hover { background: #f6f6f6; }
.rv-btn-dark { background: var(--rv-ink); border-color: var(--rv-ink); color: #fff; }
.rv-btn-dark:hover { background: #111; }
.rv-btn:disabled { opacity: .5; cursor: default; }
.rv-hint { color: #b5b5b5; font-size: 11px; }

/* History panel, in the spirit of Figma's version history */
.rv-panel { position: fixed; z-index: 85; top: 12px; right: 12px; bottom: 12px; width: 360px; display: flex; flex-direction: column; background: #fff; border: 1px solid #e3e3e3; border-radius: 20px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .28); font: 13px/1.45 var(--font, system-ui); color: #333; animation: rv-slide .22s cubic-bezier(.2, .8, .2, 1); }
@keyframes rv-slide { from { opacity: 0; transform: translateX(16px); } }
.rv-panel-hd { display: flex; align-items: center; gap: 8px; padding: 14px 14px 10px; }
.rv-panel-hd h2 { font-size: 15px; font-weight: 600; flex: 1; }
.rv-tabs { display: flex; gap: 2px; margin: 0 14px; padding: 3px; background: #f3f3f3; border-radius: 10px; }
.rv-tabs button { flex: 1; height: 28px; border-radius: 8px; color: #7a7a7a; font: 550 12px var(--font, system-ui); border: 0; background: none; cursor: pointer; }
.rv-tabs button.on { background: #fff; color: #333; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.rv-filters { display: flex; gap: 6px; padding: 12px 14px 8px; align-items: center; }
.rv-filter-gap { flex: 1; min-width: 4px; border-left: 1px solid #ececec; align-self: stretch; margin-left: 4px; max-width: 1px; margin-right: auto; }
.rv-chip { height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid #e6e6e6; background: #fff; color: #777; font: 500 11px var(--font, system-ui); cursor: pointer; white-space: nowrap; flex: none; }
.rv-chip.on { background: var(--rv-ink); border-color: var(--rv-ink); color: #fff; }
.rv-list { flex: 1; overflow-y: auto; padding: 4px 8px 16px; }
.rv-empty { padding: 32px 18px; color: #a0a0a0; text-align: center; }
.rv-item { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 12px 8px; border-radius: 12px; cursor: pointer; width: 100%; text-align: left; border: 0; background: none; font: inherit; color: inherit; }
.rv-item:hover { background: #f7f7f7; }
.rv-item.done { opacity: .55; }
.rv-item-page { color: #8a8a8a; font-size: 11px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rv-tag { font-size: 10px; padding: 1px 6px; border-radius: 999px; background: #f1f1f1; color: #888; }
.rv-tag.warn { background: #fff4dc; color: #a06b00; }
.rv-item .rv-quote { margin: 6px 0 0; font-size: 11px; max-height: 44px; overflow: hidden; }
.rv-item .rv-body { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-top: 4px; }
.rv-replies { color: #9a9a9a; font-size: 11px; margin-top: 4px; }

.rv-versions { position: relative; padding: 8px 8px 16px 8px; }
.rv-ver { position: relative; display: grid; grid-template-columns: 18px 1fr; gap: 10px; padding: 10px 8px; border-radius: 12px; cursor: pointer; width: 100%; text-align: left; border: 0; background: none; font: inherit; color: inherit; }
.rv-ver:hover { background: #f7f7f7; }
.rv-ver.here { background: #f3f3f3; }
.rv-ver::before { content: ""; position: absolute; left: 16px; top: 0; bottom: 0; width: 1.5px; background: #e6e6e6; }
.rv-ver:first-child::before { top: 18px; }
.rv-ver:last-child::before { bottom: calc(100% - 18px); }
.rv-dot { position: relative; z-index: 1; width: 11px; height: 11px; margin: 5px 0 0 3px; border-radius: 50%; background: #fff; border: 2px solid #b9b9b9; }
.rv-ver.latest .rv-dot { background: var(--rv-ink); border-color: var(--rv-ink); }
.rv-ver-msg { font-weight: 550; }
.rv-ver-meta { color: #9a9a9a; font-size: 11px; display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }

/* Old version notice and toasts */
.rv-banner { position: fixed; z-index: 88; left: 16px; bottom: 22px; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 6px 0 14px; border-radius: 999px; background: #fff; border: 1px solid #e3e3e3; box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .3); font: 12px var(--font, system-ui); color: #555; }
.rv-banner b { color: #333; }
.rv-banner a { height: 30px; padding: 0 12px; border-radius: 999px; background: var(--rv-ink); color: #fff; display: inline-flex; align-items: center; font-weight: 550; }
.rv-toast { position: fixed; z-index: 99; left: 50%; bottom: 80px; transform: translateX(-50%); padding: 10px 16px; border-radius: 12px; background: var(--rv-ink); color: #fff; font: 13px var(--font, system-ui); box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .4); animation: rv-pop .2s ease-out; }
.rv-badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--rv-accent); color: #2c2c2c; font: 700 10px/18px var(--font, system-ui); text-align: center; pointer-events: none; }

@media (max-width: 640px) {
  .rv-panel { left: 8px; right: 8px; top: auto; height: 72vh; width: auto; }
  .rv-pop { width: min(320px, calc(100vw - 24px)); }
  .rv-banner { left: 8px; bottom: 76px; }
}

/* Sign-in window: shown once, the first time someone opens the link */
body.rv-gated { overflow: hidden; }
body.rv-gated .dock { display: none; }
.rv-gate { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; background: rgba(40, 40, 40, .45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: rv-fade .2s ease-out; }
.rv-gate.out { opacity: 0; transition: opacity .22s; }
@keyframes rv-fade { from { opacity: 0; } }
.rv-login { width: min(420px, 100%); display: flex; flex-direction: column; align-items: stretch; gap: 12px; padding: 0 0 32px; overflow: hidden; background: #fff; border-radius: 32px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .45); font: 15px/1.4 var(--font, system-ui); color: #222; animation: rv-pop .25s ease-out; }
.rv-login > :not(.rv-brand) { margin-inline: 32px; }
/* Cover photo from the Website file in Figma (node 89:604), with the logo in a frosted tile. */
.rv-brand { height: 200px; display: grid; place-items: center; margin-bottom: 18px; background: #2f6fd6 url("signin-cover.jpg") center / cover no-repeat; }
/* Clear glass over the photo: the clouds show through unblurred, under a light veil, a rim of
   light brighter at the top left, a soft sheen and a shadow that lifts it off the sky.
   No backdrop blur, so it looks the same in every browser. */
.rv-tile { position: relative; width: 108px; height: 108px; display: grid; place-items: center; border-radius: 32px; color: #fff; isolation: isolate;
  background: linear-gradient(150deg, rgba(255, 255, 255, .42) 0%, rgba(255, 255, 255, .14) 48%, rgba(255, 255, 255, .24) 100%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .65), inset 0 -14px 24px -14px rgba(8, 40, 120, .35), 0 24px 44px -20px rgba(0, 28, 90, .6), 0 3px 8px rgba(0, 28, 90, .14); }
.rv-tile::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(155deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .25) 35%, rgba(255, 255, 255, .08) 60%, rgba(255, 255, 255, .55));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.rv-tile::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: radial-gradient(120% 70% at 25% 0%, rgba(255, 255, 255, .38), rgba(255, 255, 255, 0) 60%); }
/* The ® widens the mark on the right; nudge it so the letters, not the box, sit in the centre. */
.rv-tile svg { display: block; width: 70px; height: auto; margin-left: 3px; filter: drop-shadow(0 1px 1.5px rgba(0, 30, 90, .3)); }
/* Logo entrance, the whole tile at once: it rises a little, grows into place and comes into focus. */
.rv-tile { opacity: 0; animation: edl-in 1.6s cubic-bezier(.22, 1.15, .36, 1) .2s forwards; }
@keyframes edl-in { from { opacity: 0; transform: translateY(14px) scale(.86); filter: blur(8px); } 55% { opacity: 1; filter: blur(0); } to { opacity: 1; transform: none; filter: none; } }
@media (prefers-reduced-motion: reduce) { .rv-tile { animation: none; opacity: 1; } }
.rv-login h1 { text-align: left; font-size: 22px; font-weight: 400; letter-spacing: -.01em; margin-bottom: 8px; }
.rv-login input { height: 50px; padding: 0 16px; border: 1px solid #dedede; border-radius: 12px; font: inherit; color: #222; outline: none; background: #fff; }
.rv-login input:focus { border: 2px solid #1f1f1f; padding: 0 15px; }
.rv-pw { position: relative; display: flex; }
.rv-pw input { flex: 1; min-width: 0; padding-right: 52px; }
.rv-pw input:focus { padding-right: 51px; }
.rv-pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: #7a7a7a; cursor: pointer; }
.rv-pw-toggle svg { width: 20px; height: 20px; }
.rv-pw-toggle:hover { background: #f2f2f2; color: #222; }
.rv-login-err { color: #c0392b; font-size: 13px; margin: -2px 2px 0; }
.rv-login-btn { height: 52px; margin-top: 10px; border: 0; border-radius: 999px; background: #2c2c2c; color: #fff; font: 600 15px var(--font, system-ui); cursor: pointer; box-shadow: 0 4px 0 #000; transition: transform .08s, box-shadow .08s; }
.rv-login-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #000; }
.rv-login-btn:disabled { opacity: .7; cursor: default; }

@media (max-width: 440px) { .rv-login > :not(.rv-brand) { margin-inline: 20px; } .rv-brand { height: 170px; } }

/* Thread actions, Figma style: quiet icon buttons with tooltips, a "…" menu per message */
.rv-ib { position: relative; width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: #6f6f6f; cursor: pointer; flex: none; }
.rv-ib:hover, .rv-ib[aria-expanded="true"] { background: #f1f1f1; color: #222; }
.rv-ib:focus-visible { outline: 2px solid #1a73e8; outline-offset: 1px; }
.rv-resolve.on { color: #1f1f1f; }
.rv-ib[aria-expanded="true"]::after { display: none; }
.rv-ib[data-tip]:hover::after { content: attr(data-tip); position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: 3; padding: 5px 8px; border-radius: 6px; background: #1f1f1f; color: #fff; font: 500 11px/1.2 var(--font, system-ui); white-space: nowrap; pointer-events: none; }
.rv-msg { position: relative; }
.rv-more { position: absolute; top: 8px; right: 8px; opacity: 0; transition: opacity .12s; }
.rv-msg:hover .rv-more, .rv-more:focus-visible, .rv-more[aria-expanded="true"] { opacity: 1; }
.rv-meta { padding-right: 28px; }
.rv-menu { position: fixed; z-index: 97; min-width: 176px; padding: 6px; border-radius: 10px; background: #1f1f1f; box-shadow: 0 12px 28px -10px rgba(0, 0, 0, .45); animation: rv-pop .12s ease-out; }
.rv-menu button { width: 100%; display: flex; align-items: center; gap: 10px; height: 30px; padding: 0 10px; border: 0; border-radius: 6px; background: none; color: #f2f2f2; font: 12px var(--font, system-ui); text-align: left; cursor: pointer; }
.rv-menu button:hover, .rv-menu button:focus-visible { background: #2f6fec; outline: none; }
.rv-menu svg { flex: none; opacity: .85; }
.rv-menu .rv-danger { color: #ff8a80; }
.rv-menu .rv-danger:hover { background: #d93025; color: #fff; }
.rv-menu .rv-danger.armed { background: #d93025; color: #fff; font-weight: 600; }
.rv-menu-sep { display: block; height: 1px; margin: 5px 4px; background: #3a3a3a; }

/* Unread, as in Figma: a yellow ring around the pin until you open the thread */
.rv-pin.unread { box-shadow: 0 0 0 2px #fff, 0 0 0 4.5px var(--rv-accent), 0 6px 14px -4px rgba(0, 0, 0, .35); }
.rv-pin.unread::before { content: ""; position: absolute; inset: -9px; border-radius: 16px 16px 16px 6px; border: 2px solid var(--rv-accent); opacity: 0; animation: rv-ring 1.8s ease-out 2; pointer-events: none; }
@keyframes rv-ring { 0% { opacity: .9; transform: scale(.9); } 100% { opacity: 0; transform: scale(1.25); } }
.rv-item.unread { position: relative; }
.rv-item.unread::before { content: ""; position: absolute; left: 0; top: 22px; width: 6px; height: 6px; border-radius: 50%; background: var(--rv-accent); }
@media (prefers-reduced-motion: reduce) { .rv-pin.unread::before { animation: none; } }
