/* Shared identity for the public site and advisor workspace. */
:root, :root[data-theme] {
  --peacock: #073d37; --gold-accent: #e7c67b; --deep: var(--peacock);
  --paper: #f8f5ed; --card: #fffefa; --raised: #ffffff; --field: #ffffff;
  --ink: #153933; --ink-2: #3e5148; --muted: #53645b; --line: #d9dfd5; --line-2: #b9c6bd;
  --brand: #116052; --brand-text: #0b5749; --brand-bg: #e2eee6;
  --sunk: #e9eee7; --seal: var(--gold-accent); --seal-text: #74551c; --seal-ink: #2b250e; --seal-bg: #f6ebca;
  --bg: var(--paper); --ink2: var(--ink-2); --tint: var(--sunk); --line2: var(--line-2);
  --ground: linear-gradient(var(--paper),var(--paper)); --card-sheen: none;
  --band: #073d37; --band-2: #176453; --brand-deep: #073d37; --side: #082f2c;
  --side-ink: #e6f0e7; --side-mute: #afc7b9; --brand-hover: #11463e;
  --gold: var(--gold-accent); --ivory: #fff8f0;
  --grad: linear-gradient(112deg,#082f2c,#176453); --sheen: linear-gradient(transparent,transparent); --glow: var(--sheen);
  --lift-1: 0 2px 6px rgb(22 38 64 / 5%); --shadow: var(--lift-1);
  --serif: Georgia, 'Times New Roman', serif;
}
:root[data-theme="dark"] {
  --paper: #0c201d; --card: #142d28; --raised: #1e3831; --field: #112621;
  --ink: #f4f2ed; --ink-2: #d1d9e4; --muted: #b3c5bc; --line: #324b42; --line-2: #576e62;
  --sunk: #1d382f; --brand: #a4d9c5; --brand-text: #b0dfcd; --brand-bg: #234a40; --seal-text: #f0d38d; --seal-bg: #413820;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0c201d; --card: #142d28; --raised: #1e3831; --field: #112621;
    --ink: #f4f2ed; --ink-2: #d1d9e4; --muted: #b3c5bc; --line: #324b42; --line-2: #576e62;
    --sunk: #1d382f; --brand: #a4d9c5; --brand-text: #b0dfcd; --brand-bg: #234a40; --seal-text: #f0d38d; --seal-bg: #413820;
  }
}
.top-in { height: 72px; }
.mark, .side-brand { font: 600 25px/1.2 var(--serif); letter-spacing: -.055em; }
.mark img { border-radius: 5px; }
.top .btn, .hero-cta .btn { border-radius: 5px; }
.btn.solid:hover { background: #165d51; color: #fff; }
.cover.hero { background: #073d37; color: #fff9eb; padding: clamp(30px,5vw,76px) 0; }
.cover .hero-in { gap: clamp(26px,5vw,80px); grid-template-columns: 1.03fr 1fr; }
.cover h1, .workflow h2, .page-head h1, .head h2, .ask-wrap h2 {
  font-family: var(--serif); font-weight: 400; letter-spacing: -.055em;
}
.cover h1 { font-size: clamp(56px,6vw,90px); line-height: .99; max-width: none; color: #fffaf0; }
.cover h1 em { color: var(--gold-accent); font-style: italic; }
.cover .pill, .section-label { display: flex; align-items: center; gap: 10px; padding: 0; background: none; border: 0; box-shadow: none; color: var(--gold-accent); font: 680 11px/1.5 var(--f); letter-spacing: .14em; text-transform: uppercase; margin: 0 0 20px; }
.cover .pill .dot { width: 28px; height: 1px; border-radius: 0; background: var(--gold-accent); box-shadow: none; }
.cover .sub { color: #dae8dd; font-size: 17px; max-width: 45ch; }
.cover .btn.solid { background: var(--gold-accent); color: #28220f; }
.cover .btn.line { background: transparent; color: white; border-color: #819a8d; }
.cover .proof { border-color: #46675b; }
.cover .proof b { color: #fffaf0; font: 400 24px var(--serif); }
.cover .proof span { color: #c9d9cf; }
.cover-photo { position: relative; height: clamp(440px,40vw,535px); background: linear-gradient(0deg,#062b25c9,transparent 58%),url('/home/img/architecture.webp') center/cover; border-radius: 140px 6px 6px 6px; }
.portfolio-slip { position: absolute; bottom: 26px; inset-inline: clamp(16px,2.5vw,38px); padding: 21px 24px; color: #073d37; background: #faf7f1; border-top: 4px solid #a47d38; box-shadow: 0 8px 22px #0c172b44; }
.slip-head,.slip-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.slip-head { text-transform: uppercase; letter-spacing: .12em; font-size: 10px; font-weight: 750; }
.slip-head small { font-size: 10px; color: #657082; letter-spacing: .03em; text-transform: none; }
.portfolio-slip strong { display: block; margin-top: 18px; font: 32px/1.1 var(--serif); letter-spacing: -.04em; }
.slip-line,.slip-foot { font-size: 13px; }
.slip-foot { margin-top: 18px; padding-top: 12px; border-top: 1px solid #d6d8d7; }
.slip-foot b { margin-left: 4px; } .slip-due { background: #f2dec9; color: #613e23; padding: 4px 8px; border-radius: 4px; }
.workflow { padding: 62px 0; border-bottom: 1px solid var(--line); }
.workflow-in { display: grid; grid-template-columns: .8fr 1fr; gap: 48px; align-items: center; }
.workflow .section-label { color: var(--seal-text); }
.workflow h2 { font-size: clamp(38px,4vw,64px); }
.page-head { border-top: 3px solid #ae8946; }
@media(max-width: 800px) {
  .cover .hero-in, .workflow-in { grid-template-columns: minmax(0,1fr); }
  .cover-photo { height: 310px; border-top-left-radius: 85px; }
  .workflow { padding: 38px 0; }
}
#side { background: var(--side); }
.side-item.on { color: #fff; background: #1c554a; }
.side-item.on svg { color: var(--gold-accent); }
.side-brand,.login-brand { font-family: var(--serif); letter-spacing: -.045em; }
#app .card:not(.pol-head), .sheet-card, .searchbar, .kpi { background-color: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--lift-1); }
.btn.primary,.btn.primary:hover { background: #0c5648; color: white; border-color: #0c5648; }
.btn:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #a77d30; outline-offset: 3px; }
.login-band.engraved { background: linear-gradient(0deg,#072f2be8,#123e3344),url('/home/img/architecture.webp') center/cover !important; }
.signin-title { font: 400 clamp(25px,3vw,35px)/1.13 var(--serif); color: var(--ink); margin: 0 0 22px; letter-spacing: -.045em; }
.renewal-overview { grid-column: 1/-1; min-width: 0; }
.renewal-overview .hero { background: var(--grad); border: 0; border-radius: 14px; box-shadow: none; }
.renewal-overview .tile { background: var(--card); color: var(--ink); border: 1px solid var(--line); border-left: 4px solid #659181; box-shadow: none; border-radius: 8px; }
.renewal-overview .tile.attn { border-left-color: #b25a3c; }
.renewal-overview .tile.inkb { border-left-color: #a88340; }
.renewal-overview .tile b { background: none; color: var(--ink); -webkit-text-fill-color: currentColor; }
.renewal-overview .tile span { color: var(--muted); }
.idcard { background: var(--grad); border-radius: 12px; box-shadow: none; }
@media(min-width: 1080px) {
 .renewal-overview { display: grid; grid-template-columns: minmax(0,1.8fr) minmax(185px,.8fr); gap: 16px; margin-bottom: 14px; }
 .renewal-overview .hero { display: flex; flex-direction: column; justify-content: space-between; margin: 0; height: auto; }
 .renewal-overview .tiles { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 0; }
 .renewal-overview .tile { display: flex; flex-direction: row-reverse; align-items: center; justify-content: space-between; gap: 8px; padding: 14px; text-align: left; }
}
@media(min-width: 900px) {
 .login { display: grid; grid-template-columns: 1fr minmax(400px,.9fr); grid-template-rows: 1fr auto 1fr; }
 .login-band { grid-row: 1/4; justify-content: end; padding: 9vh 5vw; }
 .login > .card { grid-column: 2; grid-row: 2; margin: 16px auto; width: min(85%,440px); padding: 34px; }
 .login-foot { grid-column: 2; grid-row: 3; position: static; width: min(85%,440px); margin: 0 auto; }
}
.side-group summary { display: flex; justify-content: space-between; align-items: center; cursor: pointer; min-height: 42px; list-style: none; color: var(--side-mute); }
.side-group summary::-webkit-details-marker { display: none; }
.side-group summary::after { content: ""; width: 6px; height: 6px; border-right: 1px solid; border-bottom: 1px solid; transform: rotate(45deg); }
.side-group[open] summary::after { transform: rotate(225deg); }
body:not(.noauth) .topbar { background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: none; --band-ink: var(--ink); }
body:not(.noauth) .topbar h1 { font: 400 clamp(26px,3vw,39px)/1.12 var(--serif); letter-spacing: -.05em; }
.renewal-lists { grid-column: 1/-1; display: grid; align-items: start; gap: 12px; margin-bottom: 12px; min-width: 0; }
.renewal-lists > .card { margin: 0; min-width: 0; }
.renewal-lists h3 { font: 400 24px/1.2 var(--serif); letter-spacing: -.04em; }
.renewal-overview .hero { padding: clamp(16px,2.2vw,32px); }
.renewal-overview .week { margin-top: 16px; }
.renewal-overview .wd { min-height: 86px; gap: 4px; border: none; background: #ffffff0d; color: #edf5e9; box-shadow: none; }
.renewal-overview .wd.on { background: #ffffff1c; color: var(--gold-accent); }
.renewal-overview .day-track { height: 30px; width: 9px; background: #ffffff15; display: flex; align-items: end; border-radius: 2px; }
.renewal-overview .day-track i { width: 100%; background: #ddbc73; display: block; min-height: 0; border-radius: 2px; }
.renewal-overview .hero-n { font-family: var(--serif); font-weight: 400; }
@media(min-width:1150px) {
 .renewal-lists:has(> :nth-child(2)) { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
:root, :root[data-theme] {
 --gold-grad: linear-gradient(105deg,#f2dd9b,#d7ae56);
 --gold-text: linear-gradient(#f4e3b0,#ddbc71);
}
body:not(.noauth) { background: var(--paper); }
.renewal-overview .hero { align-items: stretch; }
.renewal-overview .hero .greet { font: 400 clamp(20px,2.1vw,33px)/1.1 var(--serif); letter-spacing: -.035em; }
.renewal-overview .hero .hero-top { align-items: center; gap: 10px; }
.renewal-overview .hero .hero-go { align-self: start; background: var(--gold-accent); border-radius: 5px; box-shadow: none; color: #2b250e; }
.renewal-overview .day-track i { flex: none; background: var(--gold-accent); }
.renewal-lists .list .item.pb { background: var(--card); border-radius: 0; border: 0; border-top: 1px solid var(--line); box-shadow: none; }
.renewal-lists .dtile:not(.late) { color: var(--brand-text); background: var(--brand-bg); box-shadow: none; }
.renewal-lists .dtile.late { color: var(--bad); background: var(--bad-bg); box-shadow: none; }
@media(min-width:900px) {
 .renewal-overview .hero { display: flex; flex-direction: column; align-items: stretch; gap: 16px; }
 .renewal-overview .hero .week { margin: 0; }
 .renewal-overview .hero .hero-go { margin: 0; }
}
.renewal-overview .week-heading { margin: 10px 0 5px; color: #e2e8f0; font-size: 12px; font-weight: 600; }
.renewal-overview .week-heading + .week { margin-top: 0; }
@media(min-width:900px) { .renewal-overview .week-heading { margin: 0 0 -10px; } }
/* Workspace surfaces shared by lists, records, forms, reports and settings. */
body[data-room] { --band: var(--peacock); --band-2: #265746; }
.desk-icon,.report-glyph { display: inline-grid; flex: 0 0 36px; width: 36px; height: 36px; place-items: center; background: var(--brand-bg); color: var(--brand-text); border-radius: 9px; }
#app .card h3,.sheet-head strong { font: 400 24px/1.15 var(--serif); letter-spacing: -.035em; }
#app .card.tight { padding: clamp(13px,1.5vw,22px); }
#app .card .field { padding-block: 10px; border-color: var(--line); }
#app .card input:not([type=checkbox]):not([type=radio]):not([type=file]), #app select,.sheet-card input:not([type=checkbox]):not([type=radio]),.sheet-card select,.sheet-card textarea,#app .search input { background: var(--field); color: var(--ink); border: 1px solid var(--line-2); border-radius: 7px; box-shadow: none; }
#app .btn:not(.fab),.sheet-card .btn { border-radius: 7px; box-shadow: none; }
#app .chip.on,.sheet-card .chip.on { background: var(--peacock); color: #fff; border-color: #526780; }
#app .kpi .v { font-family: var(--serif); font-variant-numeric: tabular-nums; }
#app table { font-variant-numeric: tabular-nums; }
#app th { background: var(--sunk); color: var(--ink-2); }
#app .card.menu .item { padding-block: 13px; }
#app .actions .btn { white-space: normal; }
#app .portfolio-summary,#app .report-cover {
 background: radial-gradient(ellipse at top right,#286757,transparent 80%),#073d37;
 color: #f8f5ed; border: none; border-radius: 12px; padding: 20px; margin: 0 0 14px;
}
.portfolio-summary { display: grid; grid-template-columns: .8fr 1.2fr; gap: 18px; }
.portfolio-summary > div + div { border-left: 1px solid #57776a; padding-left: 18px; }
.portfolio-summary span,.report-format,.case-top > span:first-child,.directory-letter { font: 650 11px/1.35 var(--font); text-transform: uppercase; letter-spacing: .1em; }
.portfolio-summary span { color: #e7c67b; }
.portfolio-summary strong { display: block; margin-top: 5px; overflow-wrap: anywhere; font: 400 clamp(24px,5.6vw,38px)/1.1 var(--serif); letter-spacing: -.045em; }
#app .card:has(> #c-list),#app .card:has(> #p-list),#app .card:has(> #cl-list) { padding: 0; background: transparent; border: none; box-shadow: none; }
#p-list .item.pb { background: var(--card); border: 1px solid var(--line); border-inline-start: 3px solid #678e7f; border-radius: 8px; box-shadow: none; margin: 0 0 8px; min-height: 82px; }
#p-list .dtile:not(.late) { background: var(--brand-bg); color: var(--brand-text); box-shadow: none; }
#p-list .dtile.late { background: var(--bad-bg); color: var(--bad); box-shadow: none; }
#c-list .client-entry { background: var(--card); color: var(--ink); text-decoration: none; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
#c-list .avatar,.report-glyph { background: var(--brand-bg); color: var(--brand-text); box-shadow: none; }
.client-policies { font-variant-numeric: tabular-nums; color: var(--seal-text); }
.directory-letter { margin: 10px 0 4px; color: var(--muted); }
#cl-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,280px),1fr)); gap: 12px; }
.case-entry { display: block; color: var(--ink); text-decoration: none; padding: 16px; border: 1px solid var(--line); background: var(--card); border-radius: 10px; }
.case-entry h2 { margin: 10px 0 3px; font: 400 24px/1.16 var(--serif); letter-spacing: -.04em; overflow-wrap: anywhere; }
.case-top,.case-footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.case-top > span:first-child { color: var(--seal-text); }
.case-client { font-size: 14px; } .case-reference,.case-footer { font-size: 12px; color: var(--muted); }
.case-footer { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.case-footer b { font-size: 16px; color: var(--ink); }
.report-format { color: var(--gold-accent); display: inline-block; border: 1px solid #a18d80; padding: 3px 6px; border-radius: 3px; }
#app .report-cover h3 { margin: 8px 0; font-size: 32px; color: inherit; }
#app .report-cover .muted { color: #d7e0ea; }
#app .report-cover .btn.primary { background: var(--gold-accent); color: #2b250e; }
#app .report-cover .btn:disabled { opacity: .68; }
#app .report-index .item { align-items: start; }
.report-glyph { flex-basis: 32px; width: 32px; height: 32px; }
#p-chips,#cl-chips { display: flex; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
#p-chips .chip,#cl-chips .chip { flex: none; font: inherit; font-size: 13px; min-height: 40px; }
@media(max-width:899px) {
 #app .topbar { row-gap: 7px; }
 #app .topbar:has(#p-filter) .tb-actions { flex-basis: 100%; justify-content: flex-start; }
 #app .topbar h1 { white-space: normal; }
}
@media print { .desk-icon,.report-glyph { display: none; } }
#app .card.report-cover:not(.pol-head) { background-color: #073d37; }
#app .report-cover .btn.primary { color: #2b250e !important; }
#app .search input::placeholder { color: var(--muted); }
body[data-room] .drop { background: var(--card); border: 1.5px dashed var(--line-2); border-radius: 12px; }
body[data-room] .drop .drop-ic { background: var(--brand-bg); color: var(--brand-text); box-shadow: none; }
.sheet-head { border-color: var(--line); }
#app .hb-t { background: var(--sunk); }
#app .grid2 label,.sheet-card label { color: var(--ink-2); }
#app .client-record,#app .claim-record { border-block-start: 3px solid #bb934d; }
#app .client-record .big,#app .claim-record .big { font: 400 clamp(26px,4vw,36px)/1.15 var(--serif); letter-spacing: -.04em; }
#app .client-record .avatar { color: var(--brand-text); background: var(--brand-bg); border-radius: 50%; box-shadow: none; }
#app #rp-body .item { padding-block: 14px; border-block-end: 1px solid var(--line); }
#app #rp-body > .row:last-child { background-color: var(--sunk); border-radius: 6px; padding-inline: 10px !important; }
body[data-room] #app .pol-head { border-radius: 12px; box-shadow: none; border-block-start: 3px solid #bb934d; }
/* The same field hierarchy on record editors and modal forms. */
#app .card:has(> .grid2 label) > h3:first-child, #app .card:has(> .grid2 input) > .row:first-child h3 { margin-bottom: 14px; }
#app .grid2 > div, .sheet-card .grid2 > div { min-width: 0; }
#app .grid2 label, .sheet-card label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 13px; line-height: 1.35; }
#app label.check,.sheet-card label.check { display: flex; }
#app .grid2 :is(input,select,textarea):not([type=checkbox]):not([type=radio]),.sheet-card :is(input,select,textarea):not([type=checkbox]):not([type=radio]) { min-height: 44px; max-width: 100%; }
#app .card:has(> h3 + .grid2),#app .card:has(> .row + .grid2) { border-block-start: 2px solid #b28b42; }
#sheet .sheet-card { background: var(--card); border: 1px solid var(--line); box-shadow: 0 -8px 40px #15233c26; }
#sheet .sheet-head { padding-block: 8px 14px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
#sheet .sheet-head strong { font-size: 25px; }
#sheet .sheet-head button { flex: none; background: var(--sunk); border: none; box-shadow: none; color: var(--ink); }
#app .topbar .back { color: var(--brand-text); background: var(--brand-bg); border: 0; box-shadow: none; }
#app .avatar,.sheet-card .avatar { background: var(--brand-bg); color: var(--brand-text); box-shadow: none; }
#app .kpi { background: var(--card); border-radius: 10px; border: 1px solid var(--line); box-shadow: none; }
#app .kpi .v { color: var(--ink); }
#app .hbars .hb-t { border-radius: 3px; }
@media(max-width: 480px) {
 #app .topbar:has(.tb-actions) { align-items: center; }
 #app .topbar .tb-actions { display: flex; flex-wrap: wrap; max-width: 100%; gap: 6px; }
 .sheet-card .grid2 { gap: 10px; }
 #app .card input:not([type=checkbox]):not([type=radio]), #app .card select,#app .card textarea,#sheet :is(input,select,textarea) { font-size: 16px; }
 #app .grid2 > div:has(> input[type=email]),#app .grid2 > div:has(> textarea),#sheet .grid2 > div:has(> textarea) { grid-column: 1/-1; }
 #sheet .sheet-card { border-radius: 18px 18px 0 0; }
 #app .actions { gap: 7px; }
}

/* Layouts for portrait tablets and a wider advisor desk. */
@media (min-width: 700px) and (max-width: 899px) {
 body:not(.noauth) #app { max-width: 820px; padding-inline: 24px; }
 body:not(.noauth) .topbar { margin-inline: -24px; padding-inline: 24px; }
 #sheet { align-items: center; padding: 24px; }
 #sheet .sheet-card { width: min(100%,580px); border-radius: 16px; max-height: 85dvh; }
 #sheet .sheet-card::before { display: none; }
 .login { max-width: 520px; }
 .login-band { min-height: 36vh; border-radius: 0 0 20px 20px; }
}
@media (min-width: 900px) and (max-width: 1179px) {
 :root { --side-w: 212px; }
 body:not(.noauth) #app { --gut: 22px; }
}
@media (min-width: 700px) {
 #app #cl-list { grid-template-columns: repeat(auto-fill,minmax(260px,1fr)); }
 #app .portfolio-summary { grid-template-columns: minmax(130px,.7fr) minmax(200px,1.3fr); }
 #app:has(#rp-body) > .card:has(#rp-from) .grid2,
 #app:has(#rp-body) > .card:has(#rp-group,#rp-sub) .grid2 { max-width: 700px; }
 #app #q-opts:has(> :nth-child(2)) { display:grid; grid-template-columns:repeat(2,minmax(0,1fr));gap:14px; }
}
@media (min-width: 1180px) {
 body:not(.noauth) #app { --gut: max(32px,calc((100vw - var(--side-w) - 1100px) / 2)); }
 body:not(.noauth) #app:has(#pf-save,#cf-save,#q-save,#s-save,#te-save,#h-send,#p-list,#c-list,#rv-save,.pol-head,.client-record,.claim-record) { --gut: max(38px,calc((100vw - var(--side-w) - 900px) / 2)); }
 #app:has(#pf-save) > .card .grid2 { grid-template-columns: repeat(3,minmax(0,1fr)); }
 #app:has(#pf-save) > .card .grid2 > div:last-child:nth-child(odd):has(>label) { grid-column:auto; }
 #app:has(#mis-m) { grid-template-columns: repeat(2,minmax(0,1fr)); }
 #app:has(#mis-m) > .card.menu { grid-column:auto; align-self:start; }
 #app #p-list .item.pb { display:grid;grid-template-columns:auto minmax(0,1fr) minmax(105px,auto);gap:18px;align-items:center; }
 #app .topbar .tb-actions { flex-wrap:wrap; }
}
/* Layered jade and champagne surfaces. Semantic status colours remain independent. */
:root {
 --jade-ground: #d6e5da; --champagne: #f1e2c3; --vellum: #f5ebd6;
 --desk-ground: linear-gradient(118deg,var(--jade-ground),var(--paper) 53%,var(--champagne));
 --desk-panel: linear-gradient(116deg,var(--vellum),var(--card) 66%,var(--sunk));
 --foil-lines: repeating-radial-gradient(ellipse at 118% -32%, transparent 0 18px, rgb(230 202 135 / .12) 19px, transparent 20px 31px);
}
:root, :root[data-theme="light"] { --paper:#e7e8d6; --card:#f2ead8; --raised:#f7eed9; --field:#f9f2e2; --sunk:#dfe9db; --line:#c1cbb7; --line-2:#a1b29e; }
:root[data-theme="dark"] { --jade-ground:#0c2924; --champagne:#292b20; --vellum:#1d352c; }
@media(prefers-color-scheme:dark){:root:not([data-theme="light"]){ --paper:#0c201d; --card:#142d28; --raised:#1e3831; --field:#112621; --sunk:#1d382f; --line:#324b42; --line-2:#576e62; --jade-ground:#0c2924; --champagne:#292b20; --vellum:#1d352c; }}
body:not(.noauth),body.noauth { background:var(--desk-ground); }
body:not(.noauth) .topbar { --band-ink:#fff4d9; background:linear-gradient(110deg,#063c35,#15564a); border-bottom:2px solid #ae9154; }
body:not(.noauth) .topbar .desk-icon,body:not(.noauth) .topbar .back { color:#ead296; background:#245d50; }
#side { background:linear-gradient(168deg,#083f38,#0f493c 46%,#072c27); }
#app .card:not(.pol-head,.report-cover):not(:has(> #p-list,> #cl-list,> #c-list)),#app .case-entry,#app #p-list .item.pb,#app #c-list .client-entry,#sheet .sheet-card { background-image:var(--desk-panel); }
#app .renewal-overview .hero,#app .portfolio-summary,#app .card.report-cover:not(.pol-head),.cover.hero { background-image:var(--foil-lines),linear-gradient(118deg,#063a34,#135346 62%,#326953); }
#app .renewal-overview .tile { background:var(--desk-panel); }
#app .renewal-overview .hero-go { background:linear-gradient(110deg,#ecd59a,#ddba69); }
#app .renewal-lists .list .item.pb { background:transparent; }
#tabs { background:var(--card); border-top:1px solid var(--line-2); }

/* Comfortable controls and contained navigation at touch-screen sizes. */
#side-close { display: none; }
#side .side-head { position: relative; }
:where(button, a, summary, select, textarea, [tabindex]):focus-visible {
 outline: 3px solid #a77d30;
 outline-offset: 3px;
}
@media (max-width: 899px) {
 #side-close { display: grid; place-items: center; position: absolute; right: 0; top: 0; width: 44px; height: 44px; padding: 0; border: 1px solid #789a86; border-radius: 8px; background: #1c554a; color: #fff4d9; font-size: 26px; cursor: pointer; }
 #side .side-head { padding-right: 48px; }
 #side .side-brand { font-size: 22px; }
 #side .side-item, #side summary, #side .side-search { min-height: 44px; }
 #side summary { display: flex; align-items: center; }
 #app .btn.small, #app button.chip, #app .chips .chip, #sheet .btn.small, #sheet .icon-btn { min-height: 44px; }
 #app .topbar .back { min-width: 44px; min-height: 44px; }
 #app input:not([type=checkbox]):not([type=radio]):not([type=file]), #app select, #app textarea { font-size: 16px; }
}
@media (max-width: 480px) {
 #app .grid2 > div:has(> input[data-c="customer_name"], > input[data-k="name"], > input[data-k="insurer"], > input[data-k="policy_no"], > input[type="tel"]),
 #sheet .grid2 > div:has(> input[type="tel"], > input[type="email"]) { grid-column: 1 / -1; }
}

#sheet .sheet-head { position: sticky; top: -8px; z-index: 2; background: var(--card); }
#sheet .sheet-head strong { min-width: 0; overflow-wrap: anywhere; }
#sheet .sheet-head .icon-btn { min-width: 44px; min-height: 44px; }

@media (max-width: 899px) {
 #app summary { min-height: 44px; padding-block: 12px; cursor: pointer; }
 #app .login .lang .chip { min-height: 44px; }
}

#sheet .grid2 > div:has(> #cl-notes) { grid-column: 1 / -1; }
@media (max-width: 480px) {
 #sheet .grid2 > div:has(> #cl-title, > #cl-ctype, > #cl-ref) { grid-column: 1 / -1; }
}
@media (max-width: 899px) {
 body[class*="page-"] button, body[class*="page-"] a.btn { min-height: 44px; }
}

#pal-q { min-height: 44px; }
@media (max-width: 899px) {
 body[class*="page-"] input[type="range"] { min-height: 44px; }
}

/* Hide visual scrollbars while preserving wheel, touch and keyboard scrolling. */
* { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* Smallest phones (320px): the claim type picker stays inside its card. */
@media (max-width: 359px) { #app .row.between:has(> #cd-type) { flex-wrap: wrap; } #app #cd-type { max-width: 100%; min-width: 0; } }

/* Agency identity leads the Today workspace. */
#app .idcard { position:relative; isolation:isolate; overflow:hidden; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:18px 26px; padding:32px; margin:4px 0 22px; border:1px solid #b79a5b; border-top:3px solid #d3b473; border-radius:20px; background:radial-gradient(ellipse at 100% 0, #386a524d, transparent 65%),linear-gradient(120deg,#063c34,#105449); box-shadow:0 12px 28px #062f3020; }
#app .idcard::after { content:""; position:absolute; inset:0; z-index:-1; pointer-events:none; background:repeating-radial-gradient(ellipse at 100% -30%,transparent 0 45px,#d6b77812 46px 47px,transparent 48px 85px); }
#app .idcard .id-main { align-items:center; gap:22px; }
#app .idcard .id-logo { width:96px; height:96px; border-radius:22px; padding:6px; }
#app .idcard .id-logo img { width:100%; height:100%; object-fit:contain; }
#app .idcard .id-text { min-width:0; gap:7px; }
.id-eyebrow { color:#cfbd8c; font-size:10px; font-weight:700; letter-spacing:.18em; }
#app .idcard .id-name { display:block; overflow:visible; font-size:clamp(24px,2.2vw,34px); line-height:1.2; letter-spacing:-.025em; -webkit-line-clamp:unset; }
#app .idcard .id-line { white-space:normal; overflow-wrap:anywhere; font-size:14px; line-height:1.5; }
#app .idcard .id-tag { grid-column:1; order:initial; color:#f0dfb4; font-family:Georgia,serif; font-size:19px; padding-left:118px; }
#app .idcard .id-chips { grid-column:1/-1; order:initial; }
#app .idcard .id-acts { grid-column:2; grid-row:1/3; align-self:center; display:flex; flex-direction:column; gap:10px; }
#app .idcard .id-btn { min-height:44px; justify-content:center; padding:0 18px; }
@media(max-width:1100px){#app .idcard{grid-template-columns:minmax(0,1fr)}#app .idcard .id-acts{grid-column:1;grid-row:auto;flex-direction:row}#app .idcard .id-tag{padding-left:0}}
@media(max-width:600px){#app .idcard{padding:22px 18px;gap:16px;border-radius:16px}#app .idcard .id-main{align-items:flex-start;gap:14px}#app .idcard .id-logo{width:64px;height:64px;border-radius:16px}#app .idcard .id-name{font-size:23px}#app .idcard .id-line{font-size:12px}.id-eyebrow{font-size:9px;letter-spacing:.1em}#app .idcard .id-tag{font-size:17px}#app .idcard .id-acts{flex-wrap:wrap}#app .idcard .id-btn{flex:1 1 130px;padding:0 10px}}
