/* The sections joined up (2026-11-30): search and «+ تازه» in the top bar, the steps of a plan, old prices as tasks,
   advice as tasks. Loaded on every page (views/partials/head.ejs). */

/* ---------- top bar: search ---------- */
.top-search{display:flex;align-items:center;gap:6px;margin:0}
.top-search input{width:230px;height:36px;padding:0 12px;border:1px solid var(--border);border-radius:9px;background:var(--surface);color:var(--text);font:inherit;font-size:13px;transition:border-color .15s,width .2s}
.top-search input:focus{width:280px;border-color:var(--accent-line);outline:none;box-shadow:0 0 0 3px var(--accent-soft)}
.top-search input::placeholder{color:var(--faint)}
.top-search input::-webkit-search-cancel-button{cursor:pointer}
/* With the field shown, the button sits inside its end; on a phone the button alone opens the search page. */
.top-search .icon-btn{flex:none}

/* ---------- top bar: «+ تازه» ---------- */
.top-new summary{border-color:var(--accent-line);color:var(--accent-text)}
.top-new summary > .ic{color:var(--accent)}
.top-new .menu-list{min-width:230px}

@media (max-width:1280px){
  .top-search input{width:170px}
  .top-search input:focus{width:220px}
}
@media (max-width:900px){
  .top-search input{display:none}
}
@media (max-width:640px){
  .top-end{gap:6px}
  .top-new summary{width:36px;padding:0;justify-content:center}
}
/* A phone has room for the buttons or the page name, not both; every page repeats its name in its own heading. */
@media (max-width:480px){
  .topbar .crumbs{display:none}
}
@media print{
  .top-search,.top-new{display:none!important}
}

/* ---------- the search page ---------- */
.search-page{display:grid;gap:8px;margin-bottom:16px}
.search-row{display:flex;gap:8px;flex-wrap:wrap}
.search-row input{flex:1 1 240px;min-width:0}
.search-group{margin-bottom:14px}
.search-group .card-head{margin-bottom:0;border-bottom:1px solid var(--border)}
.search-group h2{display:flex;align-items:center;gap:8px}
.search-group h2 .ic{width:18px;height:18px;color:var(--accent)}
.search-hits{list-style:none;margin:0;padding:0}
.search-hits li + li{border-top:1px solid var(--border)}
.search-hits a{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;padding:11px 18px;color:var(--text);text-decoration:none;min-width:0}
.search-hits a:hover{background:var(--accent-soft)}
.search-hits b{font-weight:600;overflow-wrap:anywhere}
.search-hits small{flex-basis:100%;color:var(--muted);font-size:12.5px}

/* ---------- the steps of a plan or problem (company diary) ---------- */
.tl-steps{display:grid;gap:6px;margin:8px 0 2px}
.tl-steps-h{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;margin:0;font-size:12.5px}
.tl-steps-h .ic{width:14px;height:14px;color:var(--ok)}
.tl-steps-h b{font-weight:600}
.tl-steps .pj-bar{max-width:280px}
.tl-steps-list{margin:0;padding-inline-start:18px;display:grid;gap:3px;font-size:13px}
.tl-steps-list a{color:var(--text)}
.tl-steps-list a:hover{color:var(--accent-text)}
.tl-addtask > summary{list-style:none;display:inline-flex;width:max-content}
.tl-addtask > summary::-webkit-details-marker{display:none}
.tl-addtask .task-form{grid-template-columns:repeat(auto-fit,minmax(210px,1fr));margin-top:8px;padding:10px;border:1px dashed var(--accent-line);border-radius:var(--radius)}
@media print{
  .tl-addtask{display:none!important}
}

/* ---------- old competitor prices, each with a task ---------- */
.stale-list{list-style:none;margin:0;display:grid;gap:6px}
.stale-list li{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;font-size:13px}
.stale-list li > span{display:inline-flex;align-items:center;gap:6px;margin-inline-end:auto;min-width:0}
.stale-list .ic{width:15px;height:15px;color:var(--wr)}
.stale-list form{margin:0}

/* ---------- a Claude advice action → a task ---------- */
.g-actions .a-top{flex-wrap:wrap}
.g-task{margin-inline-start:auto}
form.g-task{display:inline-flex;margin:0}
a.g-task{text-decoration:none}
a.g-task .ic{width:13px;height:13px}
