/* KDS Tenders additions to the shared An Talamh styles (kds.css). Same tokens, no new colours. */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tender-title { font-size: clamp(26px, 2.8vw, 42px); max-width: 32ch; }
.formgrid.one { grid-template-columns: minmax(0, 1fr); margin-top: 20px; }
input.wide { width: 100%; min-width: 240px; }
input.cite { display: block; margin-top: 4px; font-size: 12.5px; color: var(--ink-2); width: 100%; }
input.money { width: 110px; text-align: right; }
input.filter { width: 100%; max-width: 420px; }
code { font-size: 13px; background: var(--oat); padding: 1px 5px; }

/* RAG and decision pills */
.pill.rag-GREEN, .rag-text-GREEN { color: var(--sage); }
.pill.rag-AMBER, .rag-text-AMBER { color: var(--oak); }
.pill.rag-RED, .rag-text-RED { color: var(--clay); }
.pill.rag-INCOMPLETE, .rag-text-INCOMPLETE { color: var(--muted); }
.verdict .v small { font-size: .55em; color: var(--muted); }
.reasons { margin: 4px 0 20px; padding-left: 18px; color: var(--ink-2); }
table.gng input[type=text] { width: 100%; min-width: 150px; }
tr.res-FAIL td:first-child b { color: var(--clay); }
tr.res-PASS td:first-child b { color: var(--sage); }
.figure .value.small-v { font-size: clamp(20px, 1.8vw, 28px); font-weight: 300; }

/* stage tracker, five stages */
ol.tracker { list-style: none; padding: 0; }
.tracker.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tracker > li { padding: 12px 12px 14px 0; position: relative; font-size: 12px; line-height: 1.4; color: var(--muted); }
.tracker > li::before { content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 3px; }
.tracker > li b { display: block; font-size: 17px; font-weight: 300; color: var(--ink-2); margin-bottom: 3px; }
.tracker > li.done::before { background: var(--sage); }
.tracker > li.cur::before { background: var(--ink); }
.tracker > li.cur, .tracker > li.cur b { color: var(--ink); }

/* pipeline board */
.board { display: grid; grid-template-columns: repeat(5, minmax(210px, 1fr)); gap: 18px; overflow-x: auto; padding-bottom: 12px; }
.col { border-top: 1px solid var(--ink); min-height: 300px; }
.col > header { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0 12px; }
.col .count { font-size: 22px; font-weight: 200; }
.col .drop { display: grid; gap: 10px; min-height: 120px; padding: 4px 0 20px; transition: background var(--slow) var(--ease); }
.col.over .drop { background: var(--oak-wash); }
.tcard { background: #FBF9F5; border: 1px solid var(--rule); padding: 12px 14px 10px; cursor: grab; transition: border-color var(--slow) var(--ease), box-shadow var(--slow) var(--ease); }
.tcard:hover { border-color: var(--rule-strong); }
.tcard.dragging { opacity: .5; }
.tcard.flag-overdue, .tcard.flag-due3 { border-left: 3px solid var(--clay); }
.tcard.flag-due7 { border-left: 3px solid var(--oak); }
.tc-top { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12.5px; font-weight: 500; }
.tc-top a { margin-right: auto; }
.tc-title { font-size: 13.5px; line-height: 1.45; margin: 8px 0 6px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tc-meta { font-size: 12px; color: var(--muted); line-height: 1.5; }
.tc-meta b.bad { color: var(--clay); font-weight: 500; } .tc-meta b.warn { color: var(--oak); font-weight: 500; }
.tc-move { margin-top: 8px; } .tc-move select { font-size: 12px; padding: 3px 18px 3px 0; color: var(--muted); }
.col .empty { padding-top: 8px; }

/* design team */
table.dt td { padding-right: 12px; }
table.dt select { max-width: 190px; display: block; margin-bottom: 4px; }
table.dt input[type=text]:not(.money) { width: 100%; min-width: 130px; }
td.docs label { display: block; font-size: 12.5px; white-space: nowrap; }
tr.dt-Not-needed td { color: var(--muted); }
tr.dt-Not-needed td b { font-weight: 300; }
tr.dt-Declined td b { color: var(--clay); }
tr.dt-Confirmed td b { color: var(--sage); }
.firm-card { border-top: 1px solid var(--rule); padding-bottom: 24px; }
.firm-card .stage-h { margin-top: 26px; }

@media (max-width: 1100px) { .board { grid-template-columns: repeat(5, 240px); } .tracker.five { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* opportunity inbox */
.opp { display: grid; grid-template-columns: minmax(0, 7fr) minmax(260px, 4fr); gap: 12px var(--gutter); border-top: 1px solid var(--rule); padding: 20px 0 22px; }
.opp h3 { margin: 6px 0 6px; font-size: 17px; line-height: 1.4; }
.opp-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.opp-sum { margin: 0; max-width: 90ch; }
.opp-act { display: grid; gap: 10px; align-content: start; }
.opp-act form { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.opp-act .no-form select, .opp-act .no-form input { flex: 1 1 180px; }
.opp-act button { padding: 10px 16px 9px; }
.opp-group { margin-top: 40px; } .opp-group > summary { font-size: 14px; }

/* SharePoint folder links */
.folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 24px; margin: 8px 0 20px; padding: 0; list-style: none; }
.folders li { border-bottom: 1px solid var(--rule); padding: 9px 0; font-size: 13.5px; }
.folders li.nolink { color: var(--muted); }
a.folder { font-size: 12.5px; white-space: nowrap; }
@media (max-width: 760px) { .opp { grid-template-columns: 1fr; } }
.formgrid label input, .formgrid label select, .formgrid label textarea, table input, table select { letter-spacing: .005em; }
table.dt select.firm, table.dt select[name=contact_id] { min-width: 170px; }

/* results by criterion and the lessons matrix */
table.crit input.code { width: 64px; } table.crit input[type=text]:not(.money):not(.code) { width: 100%; min-width: 150px; }
table.crit textarea { min-width: 240px; font-size: 13px; }
table.crit td { padding-right: 10px; } table.crit select { max-width: 170px; }
.pill.g-Strong, .vs-Ahead { color: var(--sage); } .pill.g-Good, .vs-Level { color: var(--oak); } .pill.g-Weak, .vs-Behind { color: var(--clay); }
button.small-btn { padding: 6px 10px 5px; font-size: 9px; margin-top: 6px; }
.add-crit input[type=text]:not(.money):not(.code) { min-width: 180px; } .add-crit input.code { width: 80px; }
.bar { display: inline-block; height: 8px; background: var(--oak); vertical-align: middle; }
.bar.w { background: var(--rule-strong); }
td .quote { display: block; font-size: 12.5px; color: var(--ink-2); border-left: 1px solid var(--oak); padding-left: 10px; margin-top: 4px; }
.ptabs { gap: 4px 22px; margin-top: 0; } .ptabs a .n { color: var(--muted); letter-spacing: 0; margin-left: 3px; }
.ptabs + .filter { margin: 18px 0 12px; }
table.dir td:first-child { min-width: 200px; }
.prof h2 { display: flex; align-items: baseline; gap: 10px; border-bottom: 1px solid var(--ink); padding-bottom: 10px; margin-bottom: 0; }
.prof h2 .n, .ptabs a .n { font-size: 14px; color: var(--muted); }
details.firm { border-bottom: 1px solid var(--rule); margin: 0; }
details.firm > summary { list-style: none; } details.firm > summary::-webkit-details-marker { display: none; }
.frow { display: grid; grid-template-columns: minmax(180px, 3fr) minmax(0, 3fr) minmax(0, 3fr) minmax(0, 2fr) 70px; gap: 16px; padding: 12px 0; cursor: pointer; align-items: baseline; transition: background var(--slow) var(--ease); }
.frow:hover { background: rgb(234 228 216 / .45); }
.frow .fname { font-size: 14.5px; font-weight: 400; }
.frow .fname::before { content: "+"; display: inline-block; width: 16px; color: var(--muted); }
details.firm[open] > .frow .fname::before { content: "–"; }
details.firm[open] > .frow { border-bottom: 1px solid var(--rule); }
.fbody { padding: 6px 0 24px 16px; background: rgb(234 228 216 / .25); }
.fbody h3 { margin-top: 16px; }
.fbody .stepform input[type=text], .fbody .stepform input[type=email] { min-width: 130px; flex: 1 1 130px; }
@media (max-width: 900px) { .frow { grid-template-columns: 1fr; gap: 2px; } }

/* triage */
.cite-t { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.tri-sum { max-width: 90ch; margin: 0 0 20px; }
td.docs label.reqd { color: var(--clay); } td.docs label.reqd.got { color: var(--sage); }
.needed { font-size: 9px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.fee-n { display: block; color: var(--clay); margin-top: 4px; }
.brief { display: block; color: var(--ink-2); max-width: 34ch; margin: 4px 0; }
input[type=file] { font-size: 13px; padding: 6px 0; }
button[disabled] { opacity: .4; cursor: not-allowed; }
.saved { display: block; font-size: 11px; margin-top: 3px; } .saved.ok { color: var(--sage); } .saved.bad { color: var(--clay); }
.quicklinks { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; } .quicklinks .btn { border-bottom: 1px solid var(--ink); }
.btn.light { background: transparent; color: var(--ink); }
a.tc-link { font-size: 11.5px; display: inline-block; margin: 2px 0 4px; }
.from-et { border-top: 1px solid var(--ink); padding-top: 18px; } .from-et label { flex: 1 1 520px; display: flex; flex-direction: column; gap: 6px; }
.refused { display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 18px 0 0;
  padding: 16px 20px; border: 1px solid var(--clay); border-left-width: 3px; background: var(--clay-wash); font-size: 14.5px; }
.refused .btn { border-bottom: 1px solid var(--ink); }

/* messages float at the top of the window, so they are seen wherever the page lands */
.toasts { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 50; width: min(760px, calc(100% - 28px)); display: grid; gap: 8px; }
.toasts .flash { margin: 0; box-shadow: 0 6px 24px rgb(37 36 32 / .12); padding-right: 40px; position: relative; }
.toast-x { position: absolute; right: 8px; top: 6px; background: none; border: 0; color: var(--ink-2); font-size: 18px; padding: 0 6px; cursor: pointer; }
.toast-x:hover { background: none; color: var(--ink); }
/* upload box */
.dropzone { border: 1px dashed var(--rule-strong); padding: 22px 24px; margin: 14px 0; background: rgb(234 228 216 / .3); transition: background var(--slow) var(--ease), border-color var(--slow) var(--ease); }
.dropzone.over { background: var(--oak-wash); border-color: var(--oak); }
.dropzone label { cursor: pointer; display: block; font-size: 14.5px; }
.dropzone input[type=file] { margin-top: 10px; }

/* Job numbers: the year bar and the register table */
.yearbar { display: flex; flex-wrap: wrap; gap: 4px 22px; border-bottom: 1px solid var(--rule); margin: 30px 0 18px; }
.yearbar a { font-size: 11px; font-weight: 500; letter-spacing: .12em; color: var(--muted); border: 0; border-bottom: 2px solid transparent; padding: 10px 0 8px; margin-bottom: -1px; }
.yearbar a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.kindfilter { display: inline-flex; gap: 6px; margin-left: 12px; }
.kindfilter button[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); }
#joblist input[type=text], #joblist select { width: 100%; min-width: 4em; font-size: 13px; }
#joblist td { vertical-align: top; }
#joblist th.jdesc, #joblist td.jdesc { min-width: 30em; width: 40%; }
#joblist textarea { width: 100%; font-size: 13px; line-height: 1.45; resize: none; height: calc(2 * 1.45em + 10px); overflow-y: auto; }
#joblist td.jno { white-space: nowrap; }
#joblist td.jnotes { min-width: 16em; }
#joblist .vnote { margin: 0 0 4px; font-size: 12px; line-height: 1.4; color: var(--oak); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* Resizable columns (Job numbers): fixed layout so dragged widths hold; the table may scroll sideways */
table.resizable { table-layout: fixed; width: auto; }
table.resizable th { position: relative; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.resizable td { overflow: hidden; overflow-wrap: anywhere; }
table.resizable td.jno { overflow-wrap: normal; }
.colgrip { position: absolute; top: 0; right: 0; width: 9px; height: 100%; cursor: col-resize; touch-action: none; }
.colgrip::after { content: ""; position: absolute; top: 25%; bottom: 25%; right: 3px; border-right: 1px solid var(--rule-strong); }
.colgrip:hover::after, .colgrip.drag::after { border-right: 2px solid var(--ink); }
#joblist td.jdesc, #joblist th.jdesc, #joblist td.jnotes { min-width: 0; width: auto; }

/* Answer builder */
textarea.brief { width: 100%; font-size: 14px; line-height: 1.5; }
.turn { border-left: 2px solid var(--rule); padding: 4px 0 4px 12px; margin: 10px 0; }
.turn.claude { border-left-color: var(--ink); }
.turn p { margin: 4px 0 0; white-space: pre-wrap; }
details.draft { border-top: 1px solid var(--rule); padding: 10px 0; }
pre.draft-text { white-space: pre-wrap; font-family: inherit; font-size: 14px; line-height: 1.55; background: none; margin: 10px 0; }
.turn div.draft-text { white-space: pre-wrap; margin: 4px 0 0; }
.chat { max-width: 760px; }
