/* Nudge brand theme: clean, airy, premium. Cream canvas, deep teal-ink text, cyan glow, glass pills.
   Loaded last, so it changes appearance only (colours, type, shape); no markup or behaviour. */
:root{
  --bg:#FCFCF9;--surface:#fff;--ink:#152B32;--ink-soft:#3A4B55;--muted:#647074;--line:#DCE1DC;
  --teal:#1FA2C6;--teal-deep:#0A7EA3;--teal-dark:#0A7EA3;--teal-soft:#EEF7FB;--violet:#1F6FAE;
  --navy:#17384F;--dark:#15232C;--nav:#15232C;--lime:#C5CC3C;--olive:#6F7D0B;--cyan-light:#9FE9FF;
  --shadow:0 14px 34px rgba(31,95,150,.10),0 2px 6px rgba(31,95,150,.06);
  --shadow-lg:0 18px 44px rgba(31,95,150,.14),0 2px 8px rgba(31,95,150,.08);--radius:18px;
}
/* Default page scale 90% (matches browser zoom 90%) */
html{zoom:.9}
/* with zoom .9 a "100vh" box renders at 90% of the screen: give full-height boxes the extra tenth so nothing stops short of the bottom */
.app-shell{min-height:calc(100vh / .9)}
.sidebar{height:calc(100vh / .9)}
@media (min-width:721px){.app-shell.signed-in .flow-sidebar{height:calc(100vh / .9)}}
.login-wrap{min-height:calc((100vh - 76px) / .9)}
#pv-dialog{max-height:calc((100vh - 32px) / .9)}.pv-box{max-height:calc((100vh - 34px) / .9)}
html,body{font-family:"Manrope","Noto Sans JP","Noto Sans",system-ui,sans-serif}
body{color:var(--ink-soft);background:
  radial-gradient(900px 440px at 82% -12%,rgba(0,208,255,.16),rgba(0,208,255,0) 62%),
  radial-gradient(700px 380px at -6% -8%,rgba(0,145,255,.09),rgba(0,145,255,0) 60%),var(--bg)!important}
button,input,select,textarea{font-family:inherit}
::selection{background:#9FE9FF;color:#152B32}

/* type */
h1,h2,h3,h4,.page-heading h2,.dashboard-title-wrap h2,.panel-head h3{font-family:"Manrope","Noto Sans JP",system-ui,sans-serif!important;color:var(--ink);font-weight:500;letter-spacing:-.035em}
h1{font-weight:500;letter-spacing:-.05em}
strong,b{font-weight:700}
.eyebrow,.dashboard-eyebrow,.review-title-eyebrow,.field-label,.sp-label>span:first-child{text-transform:uppercase;letter-spacing:.14em;font-weight:700}
.eyebrow,.dashboard-eyebrow{color:var(--olive)!important;font-size:11px}

/* surfaces: frosted glass cards */
.panel,.card,.dash-grid>.panel,#view-dash .dash-grid>.panel,.review-footer,.filebar,.links-panel,.comments-panel{
  background:rgba(255,255,255,.82)!important;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
  border:1px solid var(--line)!important;border-radius:var(--radius)!important;box-shadow:var(--shadow)!important}
dialog{background:#fff;border:1px solid var(--line);border-radius:22px;box-shadow:0 30px 80px rgba(21,35,44,.22)}
dialog::backdrop{background:rgba(21,35,44,.42);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}

/* pill buttons, glass */
button{border-radius:999px;border:1px solid rgba(255,255,255,.9);background:rgba(255,255,255,.92);color:var(--navy);font-weight:600;
  box-shadow:inset 0 1px 0 #fff,0 14px 34px rgba(31,95,150,.12),0 2px 6px rgba(31,95,150,.08),0 0 0 1px var(--line)}
button:hover{border-color:#fff;background:#fff;box-shadow:inset 0 1px 0 #fff,0 16px 38px rgba(31,95,150,.18),0 2px 6px rgba(31,95,150,.10),0 0 0 1px #b9dbe8}
button.primary,button.b.primary,.primary{background:linear-gradient(180deg,#34b7da 0%,#1FA2C6 100%)!important;color:#fff!important;border-color:rgba(255,255,255,.55)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.45),0 14px 30px rgba(31,162,198,.38),0 2px 6px rgba(31,95,150,.14)!important}
button.primary:hover,.primary:hover{background:linear-gradient(180deg,#43c1e3 0%,#1b95b8 100%)!important}
button:disabled{opacity:.55;box-shadow:none}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid #9FE9FF;outline-offset:2px}
/* small controls keep a softer 14px shape */
.finding-actions button,.dash-item button,.cm-actions button,.link-copy,.suggest-card button{border-radius:14px}
.link-copy,.links-toggle{border-radius:99px}

/* fields */
input,select,textarea{border:1px solid var(--line);border-radius:14px;background:#fff;color:var(--ink)}
input:focus,select:focus,textarea:focus{border-color:#1FA2C6;box-shadow:0 0 0 4px rgba(31,162,198,.16)}

/* pills and tags */
.pill{border-radius:999px}
.pill.on{background:#eaf6df;color:#4c5a08}

/* dark side navigation */
.app-shell.signed-in .flow-sidebar,.sidebar{background:linear-gradient(180deg,#15232C 0%,#101D26 100%)!important}
.sidebar-mark{background:linear-gradient(135deg,#1FA2C6,#C5CC3C)!important;box-shadow:0 6px 16px rgba(31,162,198,.4)!important}
.sidebar-steps li.active,.sidebar a.active,.sidebar .active{background:rgba(31,162,198,.18)}

/* header */
header,.topbar{background:rgba(252,252,249,.86)!important;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);border-bottom:1px solid var(--line)!important}
a{color:#1F6FAE}
.gradient-text{background:linear-gradient(90deg,#0A7EA3,#6F7D0B 55%,#2A6FB0);-webkit-background-clip:text;background-clip:text;color:transparent}
.sidebar-steps li.active strong,.sidebar-steps li.active span{color:#fff!important}
.sidebar-steps li.active small,.sidebar-steps li.active .side-sub{color:#9FE9FF!important}

/* the chat panel keeps its own dark header and a visible close button */
#nudge-panel header{background:linear-gradient(135deg,#1FA2C6 0%,#17384F 100%)!important;-webkit-backdrop-filter:none;backdrop-filter:none;border:0!important;color:#fff}
#nudge-panel header strong,#nudge-panel header span{color:#fff}
#nudge-panel header button{margin-left:auto;display:grid;place-items:center;width:32px;height:32px;min-height:32px;padding:0;border-radius:99px;
  background:rgba(255,255,255,.18)!important;border:1px solid rgba(255,255,255,.55)!important;color:#fff!important;font-size:22px;line-height:1;box-shadow:none!important}
#nudge-panel header button:hover{background:rgba(255,255,255,.32)!important}

/* ---------- type scale: nothing below 11.5px, body copy 15px ----------
   The base styles use 9 to 11px in many places. These sizes lift the small text without changing layout rules. */
:root{--fs-body:15px;--fs-sm:13px;--fs-xs:12px;--fs-2xs:11.5px}
body{font-size:var(--fs-body);line-height:1.55}
/* tables */
td{font-size:13.5px!important}th{font-size:var(--fs-xs)!important;letter-spacing:.06em}
.rtable td .sm,td .sm{font-size:var(--fs-xs)!important}
/* pills, chips and tags */
.pill,.pill.tag,.au-chip,.pl-chip,.brandtag,.cm-badge,.wz-tag,.wz-tier,.history-tab-count,.fn-count{font-size:var(--fs-2xs)!important}
/* buttons */
button{font-size:var(--fs-sm)}
.preview-row,.chip,.chip.tagchip,.linkbtn,.finding-page-link,.finding-comment,.caret,.cm-actions button,.finding-actions button,.dash-item button,.pl-row-actions button,.wz-all{font-size:var(--fs-xs)!important}
.primary,.history-tab{font-size:var(--fs-sm)!important}
/* sidebar and header labels */
.flow-sidebar small,.sidebar-steps small,.sidebar small{font-size:var(--fs-2xs)!important}
.sidebar-section-label,.sidebar-label,.who-label,.who-role,.filebar-label,.finding-search-label,.dashboard-eyebrow,.field-label,.pl-crumb,.au-crumb,.pl-metric .k{font-size:var(--fs-2xs)!important;letter-spacing:.1em}
.sidebar-steps strong,.sidebar strong{font-size:13.5px!important}
.side-number{font-size:var(--fs-xs)!important}
.sidebar span:not(.side-number):not(.sidebar-mark){font-size:var(--fs-2xs)}
/* dashboard and lists */
.dash-title{font-size:14px!important}.dash-meta,.dash-dates{font-size:var(--fs-xs)!important}
.hint,.note,.fb-context{font-size:var(--fs-xs)!important}
label{font-size:13px}
.pl-metric .d,.pl-card .f,.pl-card p,.au-fix>div,.au-fam span.d{font-size:var(--fs-xs)}
/* findings and previews */
.finding p,.finding blockquote,.recommendation,.pv-body p,.pv-body blockquote,.audit-log{font-size:13.5px!important}
.finding h4{font-size:15.5px}
.pv-grid div span{font-size:var(--fs-2xs)}
/* headings */
h1{font-size:30px}h2{font-size:26px}.page-heading h2,.dashboard-title-wrap h2{font-size:30px!important}
h3{font-size:18px}
.sidebar-progress span,.sidebar-progress strong,.dashboard-panel-foot span,.filebar label span,.ctx-toggle span,.field-pair label,.preview-hint,.preview-label span,#legend b,.legend b,.progress-text,.progress-row span,.ss-text small,.ss-text b,.chips .chip b,.chip b{font-size:var(--fs-xs)!important}
.sidebar-progress span:first-child{font-size:var(--fs-2xs)!important}
.sidebar-progress strong,.ctx-toggle span{font-size:var(--fs-sm)!important}
.field-pair label{font-size:var(--fs-sm)!important;font-weight:600}
#view-review .review-preview-actions button,.review-preview-tools button{font-size:var(--fs-xs)!important}

/* ---------- layout fixes ---------- */
/* Drafts & history: the paper name keeps a readable width; the table scrolls sideways inside its card instead of squeezing it */
.table-wrap{overflow-x:auto}
.rtable{min-width:0;width:100%}
.rtable td.title,.rtable th:first-child{min-width:220px}
.rtable td.title{overflow-wrap:break-word!important;word-break:normal!important;max-width:460px!important;line-height:1.4}
.rtable td,.rtable th{padding-left:12px;padding-right:12px}
.rtable td.version-cell,.rtable th:nth-child(2){white-space:nowrap}

.rtable td,.rtable th{padding-left:8px;padding-right:8px}
.rtable td.actions,.rtable td:last-child{white-space:nowrap}
.rtable th:nth-child(2),.rtable td.version-cell{width:64px;min-width:0}
.rtable th:nth-child(3){width:70px}
.rtable th:nth-child(6){width:90px}
.rtable th:nth-child(9),.rtable td:last-child{width:190px}
.rtable td:last-child .btn,.rtable td:last-child button{padding-left:12px;padding-right:12px}
.rtable th{white-space:normal;line-height:1.25}
.rtable td,.rtable th{padding-left:6px!important;padding-right:6px!important}
.rtable th:nth-child(9),.rtable td:last-child{width:176px}

/* Nudge Findings heading row */
#view-review:not(.intake) #findings-panel>.panel-head{align-items:center!important;justify-content:space-between;gap:16px;padding:18px 20px 14px!important;flex-wrap:nowrap}
#view-review:not(.intake) #findings-panel>.panel-head>div{flex:1 1 auto;min-width:0}
#view-review:not(.intake) #findings-panel>.panel-head h3{margin:0!important;line-height:1.25!important;font-size:20px!important}
#view-review:not(.intake) #findings-panel>.panel-head .findings-sub{margin:4px 0 0!important;line-height:1.4;font-size:13px!important}
#view-review:not(.intake) #findings-panel>.panel-head button{flex:0 0 auto;white-space:nowrap}

/* top navigation bar (topnav.js) */
#topnav{display:none}
#topnav[hidden]{display:none!important}
@media(min-width:1100px){
  #topnav{display:flex;align-items:center;gap:4px;flex:1 1 auto;min-width:0;margin:0 16px;justify-content:center}
  #topnav a{display:inline-flex;align-items:center;padding:8px 12px;border-radius:99px;font-size:13.5px;font-weight:600;color:var(--ink);text-decoration:none;white-space:nowrap;transition:background .15s}
  #topnav a:hover{background:rgba(10,165,216,.1)}
  #topnav a.on{background:var(--ink);color:#fff}
  #workspace-wrap{display:none!important}
}
@media(min-width:1100px) and (max-width:1300px){#topnav a{padding:7px 9px;font-size:13px}}
.au-sev span,.au-sev small{font-size:12.5px!important}

/* review page: compact "Highlighted review" row; finding navigator off for now so findings get the space */
#view-review:not(.intake) .find-nav,#view-review:not(.intake) #find-nav{display:none!important}
#view-review:not(.intake) #text-preview-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:0 0 4px!important;min-height:0}
#view-review:not(.intake) #text-preview-heading strong{font-size:14px;font-weight:700}
#view-review:not(.intake) #text-preview-heading span{font-size:12px;color:#7a878c}
#view-review:not(.intake) .review-preview-tools{flex-wrap:wrap;gap:8px 12px;margin:0 0 8px!important}
#view-review:not(.intake) #legend{display:flex;flex-wrap:nowrap;align-items:center;gap:6px 14px;margin:0!important;white-space:nowrap}
#view-review:not(.intake) #legend span{display:inline-flex;align-items:center;gap:6px}
#view-review:not(.intake) #legend b{font-size:12px;font-weight:600;color:var(--ink)}
#view-review:not(.intake) #legend .sw{flex:0 0 auto;width:11px;height:11px;border-radius:50%;border:1px solid rgba(0,0,0,.18)}

.pill.conf{background:#eef5f8;color:#3b5a6b}.pill.conf.low{background:#fff1d6;color:#8a5200}

/* Review workspace: put findings on the left and the document preview on the right.
   Keep the existing equal column widths and leave the reviewer tabs above unchanged. */
@media(min-width:921px){
  #view-review:not(.intake) .workspace{grid-template-areas:"findings document"}
  #view-review:not(.intake) #findings-panel{grid-area:findings}
  #view-review:not(.intake) #document-panel{grid-area:document}
}

/* new paper wizard: the extracted-text toggle belongs to the review page, not to the setup steps */
#view-review.intake #text-toggle{display:none!important}
