/*
 * Hilanaw Tools — Frontend Stylesheet v2
 * Extends v1 with: Opportunity Library v2 cards, Application Workspace,
 * tracker board, app detail panel, document checklist, modals, link prompt.
 */

/* ── CSS Variables ─────────────────────────────────────────────────────────── */
:root {
    --ht-primary:       #0046a0;
    --ht-primary-dark:  #003380;
    --ht-accent:        #0066cc;
    --ht-accent-hover:  #0055b3;
    --ht-bg:            #f9fafb;
    --ht-surface:       #ffffff;
    --ht-border:        #e5e7eb;
    --ht-text:          #111827;
    --ht-text-muted:    #6b7280;
    --ht-success:       #10b981;
    --ht-warning:       #f59e0b;
    --ht-error:         #ef4444;
    --ht-radius:        10px;
    --ht-radius-sm:     6px;
    --ht-shadow:        0 1px 4px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.05);
    --ht-shadow-lg:     0 8px 24px rgba(0, 70, 160, 0.12);
    --ht-font:          -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --ht-transition:    150ms ease;
}

/* ── App Shell ─────────────────────────────────────────────────────────────── */
#hilanaw-tools-app {
    font-family: var(--ht-font);
    font-size: clamp(13px, 1.6vw, 15px);
    color: var(--ht-text);
    background: var(--ht-bg);
    min-height: 100vh;
    padding: 0 0 80px;
}

/* ── Loading ───────────────────────────────────────────────────────────────── */
.ht-loading {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; padding: 80px 20px; color: var(--ht-text-muted);
}
.ht-loading__spinner {
    width: 36px; height: 36px;
    border: 3px solid var(--ht-border); border-top-color: var(--ht-primary);
    border-radius: 50%; animation: ht-spin 0.7s linear infinite; margin-bottom: 16px;
}
@keyframes ht-spin { to { transform: rotate(360deg); } }

/* ── Venture Selector ──────────────────────────────────────────────────────── */
.ht-venture-selector {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 16px 24px; background: var(--ht-surface); border-bottom: 1px solid var(--ht-border);
}
.ht-venture-selector .ht-submit-opp-trigger { margin-left: auto; }
.ht-venture-selector__label {
    font-size: clamp(11px,1.3vw,13px); font-weight: 600;
    color: var(--ht-text-muted); text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap;
}
.ht-venture-chip {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: 20px; border: 1.5px solid var(--ht-border);
    background: var(--ht-bg); font-size: clamp(12px,1.4vw,13px); font-weight: 500;
    cursor: pointer; transition: all var(--ht-transition); white-space: nowrap; position: relative;
}
.ht-venture-chip:hover { border-color: var(--ht-primary); color: var(--ht-primary); }
.ht-venture-chip--active { background: var(--ht-primary); color: #fff; border-color: var(--ht-primary); }
.ht-venture-chip__name   { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ht-venture-chip__stage  { font-size: clamp(10px,1.1vw,11px); opacity: 0.7; margin-left: 4px; }
.ht-venture-empty { color:#888; font-size:13px; padding:4px 0; }
.ht-active-venture-chip { cursor:default; }
.ht-active-venture-chip:hover { border-color:var(--ht-primary); color:#fff; }

.ht-btn--block { width:100%; justify-content:center; margin-top:16px; }

/* ── Ventures Panel ────────────────────────────────────────────────────────── */
.ht-venture-panel-list { display:flex; flex-direction:column; gap:8px; }
.ht-venture-panel-row {
    display:flex; align-items:center; justify-content:space-between; gap:12px;
    padding:12px 14px; background:var(--ht-bg); border:1px solid var(--ht-border);
    border-radius:8px; cursor:pointer; transition:border-color 0.15s, background 0.15s;
}
.ht-venture-panel-row:hover { border-color:var(--ht-primary); }
.ht-venture-panel-row--active { border-color:var(--ht-primary); background:rgba(0,70,160,0.06); }
.ht-venture-panel-row__info  { display:flex; flex-direction:column; gap:2px; min-width:0; }
.ht-venture-panel-row__name  { font-size:13px; font-weight:600; color:var(--ht-text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ht-venture-panel-row__badge { font-size:10px; font-weight:700; color:var(--ht-primary); text-transform:uppercase; letter-spacing:0.03em; margin-left:6px; }
.ht-venture-panel-row__stage { font-size:11px; color:var(--ht-text-muted); }
.ht-venture-panel-row__actions { display:flex; align-items:center; gap:8px; flex-shrink:0; }
.ht-venture-panel-row__edit,
.ht-venture-panel-row__delete {
    display:flex; align-items:center; justify-content:center;
    background:transparent; border:1px solid var(--ht-border); border-radius:6px;
    width:32px; height:32px; padding:0; font-size:13px; line-height:1; opacity:0.75; cursor:pointer;
    color:var(--ht-text); transition:opacity 0.15s, background 0.15s, border-color 0.15s, color 0.15s;
}
.ht-venture-panel-row__edit:hover   { opacity:1; background:rgba(0,70,160,0.1); border-color:var(--ht-primary); color:var(--ht-primary); }
.ht-venture-panel-row__delete:hover { opacity:1; background:rgba(239,68,68,0.1); border-color:#ef4444; color:#ef4444; }

/* ── Tabs ──────────────────────────────────────────────────────────────────── */
.ht-tabs { display:flex; border-bottom:2px solid var(--ht-border); background:var(--ht-surface); padding:0 24px; }
.ht-tab {
    flex:1; justify-content:center;
    padding:clamp(10px,1.5vw,14px) clamp(8px,1.5vw,16px);
    font-size:clamp(13px,1.5vw,14px); font-weight:500; color:var(--ht-text-muted);
    background:none; border:none; border-bottom:2px solid transparent; margin-bottom:-2px;
    cursor:pointer; transition:all var(--ht-transition); display:flex; align-items:center; gap:6px;
    white-space:nowrap;
}
.ht-tab:hover:not(.ht-tab--active) {
    background:linear-gradient(135deg,#0046a0 0%,#0066cc 100%);
    color:#fff;
    border-radius:6px 6px 0 0;
}
.ht-tab--active {
    background:linear-gradient(135deg,#0046a0 0%,#0066cc 100%);
    color:#fff; border-bottom-color:transparent; font-weight:600; border-radius:6px 6px 0 0;
}
.ht-tab__icon { font-size:16px; }
.ht-panel { padding:24px; }
.ht-panel-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:20px; }
.ht-panel-title  { font-size:clamp(17px,2vw,20px); font-weight:700; margin:0; }

/* ── Task Cards ────────────────────────────────────────────────────────────── */
.ht-task-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:16px; }
.ht-task-card {
    background:var(--ht-surface); border:1.5px solid var(--ht-border); border-radius:var(--ht-radius);
    padding:24px; cursor:pointer; transition:all var(--ht-transition); display:flex; flex-direction:column; gap:10px;
}
.ht-task-card:hover { border-color:var(--ht-primary); box-shadow:var(--ht-shadow); transform:translateY(-2px); }
.ht-task-card__icon  { font-size:28px; }
.ht-task-card__title { font-size:clamp(14px,1.6vw,15px); font-weight:700; color:var(--ht-text); }
.ht-task-card__desc  { font-size:clamp(12px,1.4vw,13px); color:var(--ht-text-muted); line-height:1.5; }
.ht-task-card__cta   { font-size:clamp(12px,1.4vw,13px); font-weight:600; color:var(--ht-primary); margin-top:auto; }

/* Locked (tier-gated) task cards */
.ht-task-card--locked { background:var(--ht-bg); position:relative; }
.ht-task-card--locked:hover { border-color:var(--ht-warning); }
.ht-task-card--locked .ht-task-card__icon,
.ht-task-card--locked .ht-task-card__title,
.ht-task-card--locked .ht-task-card__desc { opacity:0.65; }
.ht-task-card--locked .ht-task-card__cta { color:var(--ht-warning); }
.ht-task-card__badge {
    position:absolute; top:14px; right:14px;
    background:#fef3c7; color:#92400e; border:1px solid #fde68a;
    font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:0.04em;
    padding:3px 9px; border-radius:10px;
}

/* ── Criteria Form ─────────────────────────────────────────────────────────── */
.ht-task-execution { max-width:800px; }
.ht-criteria__header { display:flex; align-items:center; gap:16px; margin-bottom:24px; }
.ht-criteria__title  { font-size:clamp(17px,2vw,20px); font-weight:700; margin:0; }
.ht-criteria__form   { display:flex; flex-direction:column; gap:16px; }
.ht-criteria__actions{ margin-top:24px; }
.ht-field   { display:flex; flex-direction:column; gap:6px; }
.ht-label   { font-size:clamp(12px,1.4vw,13px); font-weight:600; color:var(--ht-text); }
.ht-required{ color:var(--ht-error); }
.ht-input,.ht-select,.ht-textarea {
    width:100%; padding:10px 14px; border:1.5px solid var(--ht-border);
    border-radius:var(--ht-radius-sm); font-size:14px; font-family:var(--ht-font);
    color:var(--ht-text); background:var(--ht-surface); transition:border-color var(--ht-transition); box-sizing:border-box;
}
.ht-input:focus,.ht-select:focus,.ht-textarea:focus { outline:none; border-color:var(--ht-primary); }
.ht-select--sm { padding:6px 10px; font-size:13px; }
.ht-textarea { resize:vertical; min-height:80px; }

/* Opportunity context badge (shown when task launched from workspace) */
.ht-opp-context-badge {
    display:flex; align-items:center; gap:10px; padding:10px 16px;
    background:#eff6ff; border:1.5px solid #bfdbfe; border-radius:var(--ht-radius-sm);
    font-size:13px; margin-bottom:16px;
}
.ht-opp-context-badge__icon { font-size:16px; }
.ht-opp-context-badge__text { flex:1; color:#1e40af; }

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.ht-btn {
    display:inline-flex; align-items:center; gap:6px; padding:10px 20px;
    border-radius:var(--ht-radius-sm); font-size:clamp(13px,1.5vw,14px); font-weight:600;
    font-family:var(--ht-font); cursor:pointer; border:1.5px solid transparent;
    transition:all var(--ht-transition); text-decoration:none; white-space:nowrap;
}
.ht-btn--primary { background:linear-gradient(135deg,#0046a0 0%,#0066cc 100%); color:#fff; box-shadow:0 2px 8px rgba(0,70,160,0.2); }
.ht-btn--primary:hover { background:linear-gradient(135deg,#003380 0%,#0055b3 100%); color:#fff; box-shadow:0 4px 12px rgba(0,70,160,0.28); transform:translateY(-1px); }
.ht-btn--ghost  { background:transparent; color:var(--ht-text); border-color:var(--ht-border); }
.ht-btn--ghost:hover { background:var(--ht-bg); border-color:var(--ht-text); color:var(--ht-text); }
.ht-btn--lg  { padding:clamp(11px,1.5vw,13px) clamp(22px,2.5vw,28px); font-size:clamp(14px,1.6vw,15px); }
.ht-btn--sm  { padding:clamp(6px,0.9vw,7px) clamp(11px,1.5vw,14px); font-size:clamp(12px,1.3vw,13px); }
.ht-btn:disabled { opacity:0.5; cursor:not-allowed; }
.ht-btn__icon { font-size:15px; }

/* ── Output Area ───────────────────────────────────────────────────────────── */
.ht-output-area { background:var(--ht-surface); border:1.5px solid var(--ht-border); border-radius:var(--ht-radius); overflow:hidden; margin-top:24px; }
.ht-output__header { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; padding:18px 24px; border-bottom:1px solid var(--ht-border); background:var(--ht-bg); }
.ht-output__title   { font-size:clamp(15px,1.8vw,17px); font-weight:700; margin:0; }
.ht-output__actions { display:flex; gap:8px; flex-wrap:wrap; }
.ht-output__content { padding:28px 32px; }
.ht-generating { padding:32px; text-align:center; color:var(--ht-text-muted); }
.ht-generating__bar { height:3px; background:linear-gradient(90deg,var(--ht-primary) 0%,transparent 100%); border-radius:2px; animation:ht-progress 1.5s ease-in-out infinite; margin-bottom:16px; }
@keyframes ht-progress { 0%{width:30%} 50%{width:70%} 100%{width:30%} }

/* Markdown */
.ht-markdown h1 { font-size:clamp(18px,2.2vw,22px); font-weight:700; margin:0 0 16px; color:var(--ht-primary); }
.ht-markdown h2 { font-size:clamp(15px,1.9vw,18px); font-weight:700; margin:28px 0 12px; color:var(--ht-primary); padding-bottom:6px; border-bottom:2px solid var(--ht-border); }
.ht-markdown h3 { font-size:clamp(14px,1.6vw,15px); font-weight:700; margin:20px 0 8px; color:var(--ht-text); }
.ht-markdown p  { margin:0 0 12px; line-height:1.7; }
.ht-markdown ul,.ht-markdown ol { padding-left:22px; margin:0 0 12px; }
.ht-markdown li { margin-bottom:6px; line-height:1.6; }
.ht-markdown strong { font-weight:700; } .ht-markdown em { font-style:italic; }
.ht-markdown hr { border:none; border-top:1px solid var(--ht-border); margin:20px 0; }

/* Section editing */
.ht-section { margin-bottom:8px; }
.ht-section__actions { display:flex; gap:8px; padding:6px 0 12px; }
.ht-section__textarea { width:100%; min-height:160px; padding:12px; border:1.5px solid var(--ht-primary); border-radius:var(--ht-radius-sm); font-family:var(--ht-font); font-size:14px; resize:vertical; box-sizing:border-box; }
#ht-section-progress { padding:20px 28px; }
#ht-section-progress__bar-wrap { height:4px; background:var(--ht-border); border-radius:2px; overflow:hidden; margin-bottom:10px; }
#ht-section-progress__bar { height:100%; background:var(--ht-primary); border-radius:2px; transition:width 0.5s ease; }
#ht-section-progress__label { font-size:13px; color:var(--ht-text-muted); }

/* ── Thread ────────────────────────────────────────────────────────────────── */
.ht-thread { border-top:2px solid var(--ht-border); padding:24px; background:var(--ht-bg); }
.ht-thread__header { font-size:clamp(11px,1.3vw,13px); font-weight:700; text-transform:uppercase; letter-spacing:0.05em; color:var(--ht-text-muted); margin-bottom:16px; }
.ht-thread__messages { display:flex; flex-direction:column; gap:12px; margin-bottom:16px; }
.ht-thread__turn { padding:clamp(10px,1.4vw,12px) clamp(13px,1.7vw,16px); border-radius:var(--ht-radius-sm); font-size:clamp(13px,1.5vw,14px); line-height:1.6; max-width:90%; }
.ht-thread__turn--user { background:var(--ht-primary); color:#fff; align-self:flex-end; border-bottom-right-radius:2px; }
.ht-thread__turn--ai   { background:var(--ht-surface); border:1.5px solid var(--ht-border); align-self:flex-start; border-bottom-left-radius:2px; }
.ht-thread__input      { display:flex; gap:10px; align-items:flex-end; }
.ht-thread__input-area { display:flex; flex-direction:column; gap:8px; }
.ht-thread__regenerate-toggle { display:flex; align-items:center; gap:8px; font-size:13px; color:var(--ht-text-muted); cursor:pointer; user-select:none; }
.ht-thread__textarea { flex:1; min-width:0; padding:10px 14px; border:1.5px solid var(--ht-border); border-radius:var(--ht-radius-sm); font-size:14px; font-family:var(--ht-font); resize:none; transition:border-color var(--ht-transition); }
.ht-thread__textarea:focus { outline:none; border-color:var(--ht-primary); }

/* ── Opportunity Library v2 — Filter Bar ───────────────────────────────────── */

/* Outer wrapper */
.ht-opp-filters { margin-bottom:20px; }

/* Two-field row */
.ht-filter-row {
    display:grid;
    grid-template-columns: 1fr 1fr;
    gap:10px;
    align-items:start;
}

/* ── Field 1: drill-down field ─────────────────────────────────────────────── */
.ht-filter-field-wrap { position:relative; }

.ht-filter-field {
    display:flex;
    align-items:center;
    gap:8px;
    width:100%;
    padding:10px 14px;
    background:var(--ht-surface);
    border:1.5px solid var(--ht-border);
    border-radius:var(--ht-radius-sm);
    font-family:var(--ht-font);
    font-size:14px;
    color:var(--ht-text-muted);
    cursor:pointer;
    text-align:left;
    transition:border-color var(--ht-transition), box-shadow var(--ht-transition);
    box-sizing:border-box;
}
.ht-filter-field:hover { border-color:var(--ht-primary); }
.ht-filter-field--open {
    border-color:var(--ht-primary);
    box-shadow:0 0 0 3px rgba(0,70,160,0.10);
    color:var(--ht-text);
}
.ht-filter-field__icon { color:var(--ht-primary); flex-shrink:0; display:flex; }
.ht-filter-field__label { flex:1; }
.ht-filter-field__chevron { flex-shrink:0; color:var(--ht-text-muted); transition:transform var(--ht-transition); }
.ht-filter-field--open .ht-filter-field__chevron { transform:rotate(180deg); }

/* ── Filter panel (drops below the field) ──────────────────────────────────── */
.ht-filter-panel {
    position:absolute;
    top:calc(100% + 6px);
    left:0;
    width:100%;
    min-width:260px;
    background:var(--ht-surface);
    border:1.5px solid var(--ht-border);
    border-radius:var(--ht-radius);
    box-shadow:0 8px 24px rgba(0,0,0,0.10);
    z-index:200;
    overflow:hidden;
}

.ht-filter-panel__header {
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:12px 16px 8px;
    border-bottom:1px solid var(--ht-border);
}
.ht-filter-panel__title {
    font-size:13px;
    font-weight:600;
    color:var(--ht-text);
    letter-spacing:0.02em;
    text-transform:uppercase;
}
.ht-filter-panel__clear {
    font-size:12px;
    color:var(--ht-primary);
    background:none;
    border:none;
    cursor:pointer;
    padding:0;
    font-family:var(--ht-font);
}
.ht-filter-panel__clear:hover { text-decoration:underline; }

.ht-filter-panel__footer {
    padding:10px 16px 12px;
    border-top:1px solid var(--ht-border);
}

/* ── Category list (Level 1) ───────────────────────────────────────────────── */
.ht-filter-category-list {
    list-style:none;
    margin:0;
    padding:4px 0;
}
.ht-filter-category-item {
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:10px 16px;
    cursor:pointer;
    transition:background var(--ht-transition);
    gap:8px;
}
.ht-filter-category-item:hover { background:rgba(0,70,160,0.05); }
.ht-filter-category-item__label {
    display:flex;
    align-items:center;
    gap:8px;
    font-size:14px;
    color:var(--ht-text);
}
.ht-filter-category-item__icon { font-size:15px; line-height:1; }
.ht-filter-category-item__meta {
    display:flex;
    align-items:center;
    gap:6px;
    flex-shrink:0;
}
.ht-filter-category-item__selected {
    font-size:12px;
    color:var(--ht-primary);
    font-weight:500;
    max-width:90px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

/* ── Equity toggle switch (inline in category list) ────────────────────────── */
.ht-filter-toggle-switch {
    display:inline-flex;
    align-items:center;
    width:34px;
    height:20px;
    background:var(--ht-border);
    border-radius:10px;
    position:relative;
    transition:background var(--ht-transition);
    cursor:pointer;
    flex-shrink:0;
}
.ht-filter-toggle-switch--on { background:var(--ht-primary); }
.ht-filter-toggle-switch__knob {
    position:absolute;
    left:3px;
    width:14px;
    height:14px;
    border-radius:50%;
    background:#fff;
    transition:left var(--ht-transition);
    box-shadow:0 1px 3px rgba(0,0,0,0.2);
}
.ht-filter-toggle-switch--on .ht-filter-toggle-switch__knob { left:17px; }

/* ── Options list (Level 2) ────────────────────────────────────────────────── */
.ht-filter-options-header { cursor:default; }

.ht-filter-back-btn {
    display:flex;
    align-items:center;
    justify-content:center;
    width:28px;
    height:28px;
    border:none;
    background:none;
    border-radius:var(--ht-radius-sm);
    cursor:pointer;
    color:var(--ht-text);
    transition:background var(--ht-transition);
    padding:0;
    flex-shrink:0;
}
.ht-filter-back-btn:hover { background:rgba(0,0,0,0.06); }

.ht-filter-options-list {
    list-style:none;
    margin:0;
    padding:4px 0;
    max-height:220px;
    overflow-y:auto;
}
.ht-filter-option-item {
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:10px 16px;
    cursor:pointer;
    font-size:14px;
    color:var(--ht-text);
    transition:background var(--ht-transition);
    gap:8px;
}
.ht-filter-option-item:hover { background:rgba(0,70,160,0.05); }
.ht-filter-option-item--active {
    color:var(--ht-primary);
    font-weight:500;
    background:rgba(0,70,160,0.06);
}
.ht-filter-option-item__check { font-size:13px; color:var(--ht-primary); }

/* ── Field 2: Funding type pills ───────────────────────────────────────────── */
.ht-funding-type-wrap { display:flex; align-items:flex-start; }

.ht-funding-pills {
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    padding:4px 0;
}
.ht-funding-pill {
    padding:9px 14px;
    border:1.5px solid var(--ht-border);
    border-radius:20px;
    background:var(--ht-surface);
    font-family:var(--ht-font);
    font-size:13px;
    font-weight:500;
    color:var(--ht-text-muted);
    cursor:pointer;
    transition:all var(--ht-transition);
    white-space:nowrap;
}
.ht-funding-pill:hover {
    background:var(--ht-primary);
    border-color:var(--ht-primary);
    color:#fff;
}
.ht-funding-pill--active {
    background:var(--ht-primary);
    border-color:var(--ht-primary);
    color:#fff;
}
.ht-funding-pill--active:hover {
    background:var(--ht-primary);
    border-color:var(--ht-primary);
    color:#fff;
}

/* ── Active filter tags (below the two fields) ─────────────────────────────── */
.ht-active-tags {
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    margin-top:10px;
    align-items:center;
}
.ht-active-tag {
    display:inline-flex;
    align-items:center;
    gap:5px;
    padding:4px 10px;
    background:rgba(0,70,160,0.08);
    border:1px solid rgba(0,70,160,0.20);
    border-radius:20px;
    font-size:12px;
    font-weight:500;
    color:var(--ht-primary);
    white-space:nowrap;
}
.ht-active-tag--clear {
    background:none;
    border-color:transparent;
    color:var(--ht-text-muted);
    font-family:var(--ht-font);
    cursor:pointer;
    font-size:12px;
    padding:4px 6px;
}
.ht-active-tag--clear:hover { color:var(--ht-text); text-decoration:underline; }
.ht-active-tag__remove {
    background:none;
    border:none;
    padding:0;
    cursor:pointer;
    font-size:14px;
    line-height:1;
    color:var(--ht-primary);
    font-family:var(--ht-font);
    display:flex;
    align-items:center;
}
.ht-active-tag__remove:hover { color:var(--ht-text); }

/* ── Mobile responsive ─────────────────────────────────────────────────────── */

/* Results header */
.ht-opp-results-header { font-size:13px; color:var(--ht-text-muted); margin-bottom:12px; }

/* Skeleton loading */
.ht-opp-card--skeleton { pointer-events:none; min-height:100px; }
.ht-skeleton { background:linear-gradient(90deg,#f0f0f0 25%,#e0e0e0 50%,#f0f0f0 75%); background-size:200% 100%; animation:ht-shimmer 1.5s infinite; border-radius:4px; margin-bottom:8px; }
.ht-skeleton--title { height:18px; width:60%; }
.ht-skeleton--line  { height:13px; width:90%; }
.ht-skeleton--short { width:40%; }
@keyframes ht-shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* Opportunity cards v2 */
.ht-opp-list { display:flex; flex-direction:column; gap:12px; }
.ht-opp-card {
    background:var(--ht-surface); border:1.5px solid var(--ht-border); border-radius:var(--ht-radius);
    padding:20px; cursor:pointer; transition:all var(--ht-transition);
    display:grid; grid-template-columns:1fr auto; gap:12px; align-items:start;
}
.ht-opp-card:hover { border-color:var(--ht-primary); box-shadow:var(--ht-shadow); transform:translateY(-1px); }
.ht-opp-card__top    { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:8px; }
.ht-opp-card__icon   { font-size:20px; }
.ht-opp-card__badges { display:flex; gap:6px; flex-wrap:wrap; }
.ht-opp-card__name   { font-size:clamp(14px,1.6vw,15px); font-weight:700; margin-bottom:3px; }
.ht-opp-card__org    { font-size:clamp(12px,1.4vw,13px); color:var(--ht-text-muted); margin-bottom:8px; }
.ht-opp-card__desc   { font-size:clamp(12px,1.4vw,13px); line-height:1.5; color:var(--ht-text); }
.ht-opp-card__footer { margin-top:10px; font-size:12px; color:var(--ht-text-muted); }
.ht-opp-card__right  { text-align:right; white-space:nowrap; display:flex; flex-direction:column; gap:6px; align-items:flex-end; }
.ht-opp-card__amount { font-size:14px; font-weight:700; color:var(--ht-success); }
.ht-opp-card__deadline { font-size:12px; color:var(--ht-text-muted); }
.ht-opp-card__deadline--soon { color:var(--ht-warning); font-weight:600; }
.ht-opp-card__effort { font-size:11px; color:var(--ht-text-muted); }
.ht-opp-empty { text-align:center; padding:40px 20px; color:var(--ht-text-muted); }

/* Matched / closing soon sections */
.ht-opp-section-title { font-size:13px; font-weight:700; color:var(--ht-text); margin-bottom:12px; }
.ht-opp-matched-section,
.ht-opp-closing-section { margin-bottom:24px; }
.ht-opp-matched-row { display:flex; gap:12px; overflow-x:auto; padding-bottom:8px; }
.ht-opp-mini-card {
    min-width:220px; max-width:260px; flex-shrink:0;
    background:var(--ht-surface); border:1.5px solid var(--ht-border); border-radius:var(--ht-radius);
    padding:14px; cursor:pointer; transition:all var(--ht-transition); display:flex; gap:10px; align-items:flex-start;
}
.ht-opp-mini-card:hover { border-color:var(--ht-primary); box-shadow:var(--ht-shadow); }
.ht-opp-mini-card__icon { font-size:18px; flex-shrink:0; }
.ht-opp-mini-card__name { font-size:13px; font-weight:700; margin-bottom:2px; }
.ht-opp-mini-card__org  { font-size:12px; color:var(--ht-text-muted); }
.ht-opp-mini-card__deadline { font-size:11px; color:var(--ht-warning); font-weight:600; margin-top:4px; }

/* Badges v2 */
.ht-badge {
    display:inline-block; padding:3px 10px; border-radius:12px;
    font-size:clamp(10px,1.1vw,11px); font-weight:600; text-transform:uppercase; letter-spacing:0.04em;
    background:var(--ht-bg); border:1px solid var(--ht-border); color:var(--ht-text-muted);
}
.ht-badge--grant       { background:#ecfdf5; color:#065f46; border-color:#a7f3d0; }
.ht-badge--accelerator { background:#eff6ff; color:#1e40af; border-color:#bfdbfe; }
.ht-badge--fellowship  { background:#fdf4ff; color:#6b21a8; border-color:#e9d5ff; }
.ht-badge--incubator   { background:#fef3c7; color:#92400e; border-color:#fde68a; }
.ht-badge--competition { background:#fff7ed; color:#9a3412; border-color:#fed7aa; }
.ht-badge--loan        { background:#f0fdf4; color:#166534; border-color:#bbf7d0; }
.ht-badge--prize       { background:#fefce8; color:#854d0e; border-color:#fef08a; }
.ht-badge--equity-free { background:#ecfdf5; color:#065f46; border-color:#a7f3d0; }
.ht-badge--equity      { background:#fff1f2; color:#9f1239; border-color:#fecdd3; }
.ht-badge--sector      { background:#f3f4f6; color:#374151; border-color:#d1d5db; font-size:10px; }
.ht-badge--status-open         { background:#ecfdf5; color:#065f46; border-color:#a7f3d0; }
.ht-badge--status-closing,
.ht-badge--status-closing_soon { background:#fff7ed; color:#9a3412; border-color:#fed7aa; }
.ht-badge--status-closed       { background:#f3f4f6; color:#6b7280; border-color:#d1d5db; }
.ht-badge--status-rolling      { background:#eff6ff; color:#1e40af; border-color:#bfdbfe; }

/* Opportunity detail drawer v2 */
.ht-opp-detail { background:var(--ht-surface); border:1.5px solid var(--ht-border); border-radius:var(--ht-radius); padding:28px; margin-top:16px; }
.ht-opp-detail__header      { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:12px; }
.ht-opp-detail__type        { margin-bottom:6px; }
.ht-opp-detail__title       { font-size:clamp(17px,2vw,20px); font-weight:700; margin:6px 0 4px; }
.ht-opp-detail__org         { font-size:14px; color:var(--ht-text-muted); display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.ht-opp-detail__amount-bar  { display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom:16px; padding:12px 0; border-bottom:1px solid var(--ht-border); }
.ht-opp-detail__amount      { font-size:16px; font-weight:700; color:var(--ht-success); }
.ht-opp-detail__deadline    { font-size:13px; color:var(--ht-text-muted); }
.ht-opp-detail__deadline--soon { color:var(--ht-warning); font-weight:600; }
.ht-opp-detail__desc        { font-size:14px; line-height:1.7; margin-bottom:20px; }
.ht-opp-detail__grid        { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-bottom:20px; }
.ht-opp-detail__section     { margin-bottom:16px; }
.ht-opp-detail__section-title { font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:0.05em; color:var(--ht-text-muted); margin-bottom:6px; }
.ht-opp-detail__section p   { font-size:14px; line-height:1.6; margin:0; }
.ht-opp-detail__tips        { background:#fffbeb; border:1px solid #fde68a; border-radius:var(--ht-radius-sm); padding:14px 16px; }
.ht-opp-detail__meta-grid   { display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:10px; margin-bottom:20px; }
.ht-opp-detail__meta-item   { font-size:13px; display:flex; flex-direction:column; gap:2px; }
.ht-opp-detail__meta-label  { font-size:11px; font-weight:700; color:var(--ht-text-muted); text-transform:uppercase; letter-spacing:0.04em; }
.ht-opp-detail__rating      { display:flex; align-items:center; gap:8px; margin-bottom:16px; }
.ht-opp-detail__actions     { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:12px; }
.ht-opp-detail__feedback    { min-height:20px; }
.ht-opp-status-row          { display:flex; gap:8px; align-items:center; margin-top:8px; }

/* Stars */
.ht-stars-filled { color:#f59e0b; font-size:16px; letter-spacing:1px; }
.ht-star-picker  { display:flex; gap:4px; margin-bottom:12px; }
.ht-star { font-size:28px; color:#d1d5db; cursor:pointer; transition:color var(--ht-transition); }
.ht-star--hover,.ht-star--selected { color:#f59e0b; }

/* Pagination */
.ht-opp-pagination { display:flex; gap:6px; margin-top:20px; justify-content:center; flex-wrap:wrap; }
.ht-page-btn { padding:7px 13px; border:1.5px solid var(--ht-border); border-radius:var(--ht-radius-sm); font-size:13px; background:var(--ht-surface); cursor:pointer; transition:all var(--ht-transition); }
.ht-page-btn:hover { border-color:var(--ht-primary); color:var(--ht-primary); }
.ht-page-btn--active { background:var(--ht-primary); color:#fff; border-color:var(--ht-primary); }

/* ── Application Workspace ─────────────────────────────────────────────────── */
.ht-workspace-stats {
    display:grid; grid-template-columns:repeat(auto-fill,minmax(120px,1fr)); gap:12px; margin-bottom:20px;
}
.ht-workspace-stat {
    background:var(--ht-surface); border:1.5px solid var(--ht-border); border-radius:var(--ht-radius);
    padding:16px; text-align:center;
}
.ht-workspace-stat__value { font-size:clamp(22px,2.8vw,28px); font-weight:700; color:var(--ht-primary); }
.ht-workspace-stat__label { font-size:12px; color:var(--ht-text-muted); margin-top:4px; }
.ht-workspace-stat--won .ht-workspace-stat__value { color:var(--ht-success); }

/* Upcoming deadlines strip */
.ht-upcoming-strip {
    display:flex; align-items:center; gap:10px; flex-wrap:wrap;
    background:#fff7ed; border:1px solid #fed7aa; border-radius:var(--ht-radius-sm);
    padding:10px 14px; margin-bottom:20px; font-size:13px;
}
.ht-upcoming-strip__label { font-weight:700; color:#9a3412; white-space:nowrap; }
.ht-upcoming-item { display:flex; align-items:center; gap:6px; padding:4px 10px; border-radius:20px; background:#fff; border:1px solid #fed7aa; cursor:pointer; transition:all var(--ht-transition); }
.ht-upcoming-item:hover { border-color:#f97316; }
.ht-upcoming-item__name  { font-size:12px; font-weight:500; max-width:160px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ht-upcoming-item__days  { font-size:11px; font-weight:700; color:#9a3412; }
.ht-upcoming-item--urgent { border-color:#ef4444; }
.ht-upcoming-item--urgent .ht-upcoming-item__days { color:#ef4444; }

/* Tracker board */
/* ── Tracker tabs ── */
.ht-tracker-tabs { display:flex; gap:0; border-bottom:2px solid var(--ht-border); margin-bottom:20px; }
.ht-tracker-tab  { flex:1; background:none; border:none; border-bottom:2px solid transparent; margin-bottom:-2px; padding:10px 8px; font-size:13px; font-weight:600; color:var(--ht-text-muted); cursor:pointer; text-align:center; transition:color 0.15s, border-color 0.15s; display:flex; align-items:center; justify-content:center; gap:6px; }
.ht-tracker-tab:hover { color:#fff; background:var(--ht-primary); }
.ht-tracker-tab--active { color:var(--ht-primary); border-bottom-color:var(--ht-primary); }
.ht-tracker-tab__count  { background:var(--ht-border); color:var(--ht-text-muted); border-radius:12px; padding:1px 7px; font-size:11px; font-weight:600; }
.ht-tracker-tab--active .ht-tracker-tab__count { background:var(--ht-primary); color:#fff; }
.ht-tracker-tab-content { }
.ht-tracker-panel { }
.ht-tracker-col__cards  { display:flex; flex-direction:column; gap:10px; }
.ht-tracker-col__empty  { display:flex; flex-direction:column; align-items:center; gap:8px; padding:40px 16px; text-align:center; }
.ht-tracker-col__empty-icon { font-size:32px; opacity:0.4; line-height:1; }
.ht-tracker-col__empty-text { font-size:13px; color:var(--ht-text-muted); line-height:1.6; max-width:220px; margin:0; }

/* Application cards */
.ht-app-card {
    background:var(--ht-surface); border:1.5px solid var(--ht-border); border-radius:var(--ht-radius-sm);
    padding:14px; cursor:pointer; transition:all var(--ht-transition);
}
.ht-app-card:hover { border-color:var(--ht-primary); box-shadow:var(--ht-shadow); }
.ht-app-card--urgent { border-color:#fca5a5; }
.ht-app-card--soon   { border-color:#fde68a; }
.ht-app-card__name   { font-size:13px; font-weight:700; margin-bottom:3px; line-height:1.3; }
.ht-app-card__org    { font-size:12px; color:var(--ht-text-muted); margin-bottom:8px; }
.ht-app-card__footer { display:flex; gap:6px; align-items:center; flex-wrap:wrap; }
.ht-app-card__deadline { font-size:11px; font-weight:600; color:var(--ht-warning); }
.ht-app-card__docs     { font-size:11px; color:var(--ht-text-muted); margin-left:auto; }

/* Application detail panel */
.ht-app-detail {
    background:var(--ht-surface); border:1.5px solid var(--ht-border); border-radius:var(--ht-radius);
    padding:28px; margin-top:20px;
}
.ht-app-detail__header { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:16px; }
.ht-app-detail__title  { font-size:clamp(17px,2vw,20px); font-weight:700; margin:0 0 6px; }
.ht-app-detail__meta   { display:flex; gap:12px; flex-wrap:wrap; align-items:center; font-size:13px; color:var(--ht-text-muted); }
.ht-app-detail__deadline--urgent { color:#ef4444; font-weight:600; }
.ht-app-detail__deadline--soon   { color:var(--ht-warning); font-weight:600; }
.ht-app-detail__criteria { background:#f8fafc; border:1px solid var(--ht-border); border-radius:var(--ht-radius-sm); padding:14px 16px; margin-bottom:20px; }
.ht-app-detail__criteria p { font-size:14px; line-height:1.6; margin:0; }
.ht-app-detail__section-title { font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:0.05em; color:var(--ht-text-muted); margin-bottom:10px; }
.ht-app-detail__status-row { margin-top:24px; padding-top:20px; border-top:1px solid var(--ht-border); }

/* Document checklist */
.ht-doc-checklist { display:flex; flex-direction:column; gap:6px; margin-bottom:16px; }
.ht-doc-row {
    display:flex; align-items:center; gap:10px; padding:10px 14px;
    background:var(--ht-bg); border:1px solid var(--ht-border); border-radius:var(--ht-radius-sm);
    transition:all var(--ht-transition);
}
.ht-doc-row--done { background:#f0fdf4; border-color:#a7f3d0; }
.ht-doc-row__check { font-size:16px; flex-shrink:0; }
.ht-doc-row__label { flex:1; font-size:13px; font-weight:500; }
.ht-doc-row__actions { display:flex; gap:6px; }
.ht-doc-row--done .ht-doc-row__label { color:#065f46; }

/* Document list */
.ht-doc-list { display:flex; flex-direction:column; gap:8px; }
.ht-doc-list__item { display:flex; align-items:center; gap:10px; padding:10px 14px; background:var(--ht-bg); border-radius:var(--ht-radius-sm); font-size:13px; }
.ht-doc-list__type  { font-weight:700; color:var(--ht-primary); min-width:140px; }
.ht-doc-list__title { flex:1; color:var(--ht-text); }
.ht-doc-list__words { color:var(--ht-text-muted); font-size:12px; }

/* Workspace empty state */
.ht-workspace-empty { text-align:center; padding:60px 20px; }
.ht-workspace-empty__icon { font-size:48px; margin-bottom:16px; }
.ht-workspace-empty h3    { font-size:20px; font-weight:700; margin-bottom:8px; }
.ht-workspace-empty p     { color:var(--ht-text-muted); margin-bottom:20px; }

/* Link prompt (task → application) */
.ht-link-prompt {
    display:flex; align-items:center; gap:12px; flex-wrap:wrap;
    background:linear-gradient(135deg,#0046a0 0%,#0066cc 100%); color:#fff;
    border-radius:var(--ht-radius); padding:14px 20px; margin-bottom:16px;
    animation:ht-fadein 0.3s ease;
}
.ht-link-prompt__text { flex:1; font-size:14px; }

/* ── Unconfirmed Ventures ───────────────────────────────────────────────────── */
.ht-unconfirmed-section { margin-top:12px; padding-top:12px; border-top:1px dashed var(--ht-border); }
.ht-unconfirmed-section__title { font-size:12px; font-weight:600; color:var(--ht-text-muted); text-transform:uppercase; letter-spacing:0.04em; margin-bottom:8px; }
.ht-unconfirmed-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:8px 0; border-bottom:1px solid var(--ht-border); }
.ht-unconfirmed-row:last-child { border-bottom:none; }
.ht-unconfirmed-row__info { display:flex; flex-direction:column; gap:2px; min-width:0; }
.ht-unconfirmed-row__name { font-size:13px; font-weight:600; color:var(--ht-text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ht-unconfirmed-row__meta { font-size:11px; color:var(--ht-text-muted); }

/* ── Modals ────────────────────────────────────────────────────────────────── */
.ht-modal { position:fixed; inset:0; z-index:9999; display:flex; align-items:flex-start; justify-content:center; overflow-y:auto; padding:calc(var(--ht-header-height, 64px) + 20px) 16px 40px; }
.ht-modal__overlay { position:fixed; inset:0; background:rgba(0,0,0,0.5); }
.ht-modal__box { position:relative; background:var(--ht-surface); border-radius:var(--ht-radius); padding:32px; max-width:520px; width:100%; box-shadow:var(--ht-shadow-lg); max-height:none; overflow-y:visible; margin:auto; }
.ht-modal__box h3 { font-size:18px; font-weight:700; margin:0 0 20px; }
.ht-modal__close { position:absolute; top:16px; right:16px; background:none; border:none; font-size:18px; cursor:pointer; color:var(--ht-text-muted); line-height:1; padding:4px; }
/* Scrollable modal variant — box stays fixed, only inner body scrolls */
.ht-modal__box--scrollable { display:flex; flex-direction:column; max-height:calc(100vh - var(--ht-header-height, 64px) - 48px); overflow:hidden; }
.ht-modal__box--scrollable .ht-modal__title { flex-shrink:0; margin-bottom:16px; }
.ht-modal__scroll-body { flex:1; overflow-y:auto; padding-right:4px; }
.ht-modal__scroll-body::-webkit-scrollbar { width:4px; }
.ht-modal__scroll-body::-webkit-scrollbar-thumb { background:var(--ht-border); border-radius:4px; }
.ht-form { display:flex; flex-direction:column; gap:14px; }
.ht-form__actions { display:flex; gap:10px; margin-top:8px; }

/* ── Usage / Limits ────────────────────────────────────────────────────────── */
.ht-usage-indicator { display:flex; align-items:center; gap:10px; padding:8px 12px; background:var(--ht-surface); border:1px solid var(--ht-border); border-radius:8px; margin-bottom:16px; }
.ht-usage-indicator__label { font-size:12px; color:var(--ht-text-muted); white-space:nowrap; flex-shrink:0; }
.ht-usage-indicator__track { flex:1; height:6px; background:var(--ht-border); border-radius:4px; overflow:hidden; }
.ht-usage-indicator__fill  { height:100%; border-radius:4px; transition:width 0.4s ease; }
.ht-limit-nudge { background:linear-gradient(135deg,#0046a0 0%,#0066cc 100%); color:#fff; padding:12px 16px; border-radius:8px; font-size:14px; line-height:1.5; margin-bottom:16px; animation:ht-fadein 0.3s ease; }
@keyframes ht-fadein { from{opacity:0;transform:translateY(-6px)} to{opacity:1;transform:translateY(0)} }

/* ── My Documents ──────────────────────────────────────────────────────────── */
.ht-my-documents-btn { display:flex; align-items:center; gap:6px; padding:8px 12px; background:var(--ht-surface); border:1px solid var(--ht-border); border-radius:8px; margin-bottom:16px; font-size:13px; font-weight:600; color:var(--ht-text); cursor:pointer; width:100%; text-align:left; }
.ht-my-documents-btn:hover { border-color:var(--ht-text); }
.ht-my-documents-btn__icon { font-size:15px; }

.ht-my-documents-list { display:flex; flex-direction:column; gap:8px; }
.ht-my-documents__loading,
.ht-my-documents__empty { padding:24px 8px; text-align:center; color:var(--ht-text-muted); font-size:13px; line-height:1.6; }

.ht-doc-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 14px; background:var(--ht-bg); border:1px solid var(--ht-border); border-radius:8px; }
.ht-doc-row__info  { display:flex; flex-direction:column; gap:2px; min-width:0; }
.ht-doc-row__title { font-size:13px; font-weight:600; color:var(--ht-text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ht-doc-row__meta  { font-size:11px; color:var(--ht-text-muted); }
.ht-doc-row__actions { display:flex; align-items:center; gap:8px; flex-shrink:0; }
.ht-doc-row__delete { display:flex; align-items:center; justify-content:center; background:transparent; border:1px solid var(--ht-border); border-radius:6px; width:32px; height:32px; padding:0; font-size:14px; line-height:1; opacity:0.75; cursor:pointer; color:var(--ht-text); transition:opacity 0.15s, background 0.15s, border-color 0.15s, color 0.15s; }
.ht-doc-row__delete:hover { opacity:1; background:rgba(239,68,68,0.1); border-color:#ef4444; color:#ef4444; }

/* ── Delete Confirmation Modal ────────────────────────────────────────────── */
.ht-modal__box--confirm { max-width:400px; text-align:center; }
.ht-confirm-modal__icon { font-size:36px; margin-bottom:12px; }
.ht-confirm-modal__body { color:var(--ht-text-muted); font-size:14px; line-height:1.6; margin:0 0 24px; }
.ht-confirm-modal__actions { justify-content:center; }
.ht-btn--danger { background:#ef4444; color:#fff; border-color:#ef4444; }
.ht-btn--danger:hover { background:#dc2626; border-color:#dc2626; }
.ht-btn--danger:disabled { opacity:0.6; cursor:not-allowed; }

/* ── Venture Prompt Banner ─────────────────────────────────────────────────── */
.ht-venture-prompt { display:flex; align-items:center; gap:16px; padding:14px 20px; background:linear-gradient(135deg,#0046a0 0%,#0066cc 100%); color:#fff; border-radius:var(--ht-radius); margin:0 24px 16px; flex-wrap:wrap; }
.ht-venture-prompt__text    { flex:1; font-size:14px; line-height:1.5; }
.ht-venture-prompt__actions { display:flex; gap:8px; }

/* ── Guest Prompt ──────────────────────────────────────────────────────────── */
.ht-guest-prompt { display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:64px 24px; gap:16px; min-height:60vh; }
.ht-guest-prompt h3 { font-size:clamp(20px,2.4vw,26px); font-weight:700; color:var(--ht-text); margin:0; }
.ht-guest-prompt p  { font-size:clamp(14px,1.6vw,16px); color:var(--ht-text-muted); max-width:380px; line-height:1.6; margin:0; }
.ht-guest-prompt .ht-btn--lg { margin-top:8px; min-width:220px; border-radius:50px; text-decoration:none; display:inline-block; text-align:center; }

/* ── Guest Gate Overlay ────────────────────────────────────────────────────── */
.ht-opp-card--blurred {
    opacity: 0.35;
    filter: blur(2px);
    pointer-events: none;
    user-select: none;
}

.ht-opp-gate {
    margin-top: -40px; /* overlap the blurred cards slightly */
    position: relative;
    z-index: 2;
    padding: 0 0 16px;
}
.ht-opp-gate__inner {
    background: var(--ht-surface);
    border: 2px solid var(--ht-primary);
    border-radius: var(--ht-radius);
    padding: clamp(28px, 4vw, 40px) clamp(24px, 3vw, 36px);
    text-align: center;
    box-shadow: var(--ht-shadow-lg);
}
.ht-opp-gate__icon  { font-size: 40px; margin-bottom: 12px; }
.ht-opp-gate__title { font-size: clamp(18px, 2.2vw, 22px); font-weight: 700; margin: 0 0 12px; color: var(--ht-primary); }
.ht-opp-gate__body  { font-size: clamp(13px, 1.5vw, 15px); color: var(--ht-text-muted); max-width: 480px; margin: 0 auto 24px; line-height: 1.6; }
.ht-opp-gate__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Auth Modal ────────────────────────────────────────────────────────────── */
.ht-auth-modal__box {
    text-align: center;
    max-width: 460px;
}
.ht-auth-modal__icon  { font-size: 44px; margin-bottom: 12px; }
.ht-auth-modal__title { font-size: clamp(18px, 2.2vw, 22px); font-weight: 700; margin: 0 0 10px; }
.ht-auth-modal__body  { font-size: 14px; color: var(--ht-text-muted); line-height: 1.6; margin: 0 0 24px; }
.ht-auth-modal__actions {
    display: flex; flex-direction: column; gap: 10px; align-items: center; margin-bottom: 24px;
}
.ht-auth-modal__cta   { min-width: 240px; border-radius: 50px; justify-content: center; }
.ht-auth-modal__login { font-size: 13px; color: var(--ht-text-muted); text-decoration: none; border: none; background: none; padding: 4px 0; }
.ht-auth-modal__login:hover { color: var(--ht-primary); }
.ht-auth-modal__perks { display: flex; flex-direction: column; gap: 6px; text-align: left; background: var(--ht-bg); border-radius: var(--ht-radius-sm); padding: 14px 18px; }
.ht-auth-modal__perk  { font-size: 13px; color: var(--ht-text); }

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {

    .ht-opp-detail__grid { grid-template-columns:1fr; }
    .ht-filter-row { grid-template-columns:1fr; }
    .ht-funding-type-wrap { order:-1; } /* Funding type goes above filter field on tablet */
}
@media (max-width: 600px) {
    .ht-task-grid  { grid-template-columns:1fr; }
    .ht-output__header { flex-direction:column; align-items:flex-start; }
    .ht-opp-card   { grid-template-columns:1fr; }
    .ht-opp-card__right { text-align:left; }
    .ht-venture-prompt { flex-direction:column; align-items:flex-start; }
    .ht-tabs       { padding:0 12px; }
    .ht-panel      { padding:16px; }
    .ht-workspace-stats { grid-template-columns:repeat(2,1fr); }
    .ht-app-detail { padding:16px; }
    .ht-filter-row { grid-template-columns:1fr; gap:8px; }
    .ht-funding-pills { gap:5px; }
    .ht-funding-pill  { font-size:12px; padding:7px 11px; }
    .ht-filter-panel  { min-width:unset; }
}

/* ── Community Submission Modal ──────────────────────────────────────────────── */
.ht-submit-opp-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding: 40px 16px;
}

.ht-submit-opp-box {
    max-width: 560px;
    width: 100%;
    margin: auto;
}

.ht-submit-opp-form {
    margin-top: 16px;
    background: var(--ht-surface);
    border: 1.5px solid var(--ht-border);

    border-radius: var(--ht-radius);
    padding: 24px;
    box-shadow: var(--ht-shadow);
}

.ht-submit-opp-form__header { margin-bottom: 20px; }
.ht-submit-opp-form__title {
    font-size: 15px;
    font-weight: 700;
    color: var(--ht-text);
    margin: 0 0 6px;
}
.ht-submit-opp-form__desc {
    font-size: 13px;
    color: var(--ht-text-muted);
    margin: 0;
    line-height: 1.5;
}

.ht-submit-opp-form__fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.ht-submit-field { display: flex; flex-direction: column; gap: 5px; }

.ht-submit-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.ht-submit-field__label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ht-text);
}
.ht-submit-field__required { color: #e74c3c; }
.ht-submit-field__optional { font-weight: 400; color: var(--ht-text-muted); }
.ht-submit-field__hint { font-size: 12px; color: var(--ht-text-muted); }

.ht-submit-field__input,
.ht-submit-field__textarea {
    border: 1.5px solid var(--ht-border);
    border-radius: var(--ht-radius-sm);
    padding: 9px 12px;
    font-family: var(--ht-font);
    font-size: 13px;
    color: var(--ht-text);
    background: var(--ht-surface);
    transition: border-color var(--ht-transition), box-shadow var(--ht-transition);
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
}
.ht-submit-field__input:focus,
.ht-submit-field__textarea:focus {
    border-color: var(--ht-primary);
    box-shadow: 0 0 0 3px rgba(0,70,160,0.10);
    outline: none;
}

/* Type pills in submission form */
.ht-submit-type-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.ht-submit-type-pill {
    padding: 6px 12px;
    border: 1.5px solid var(--ht-border);
    border-radius: 20px;
    background: var(--ht-surface);
    font-family: var(--ht-font);
    font-size: 12px;
    font-weight: 500;
    color: var(--ht-text-muted);
    cursor: pointer;
    transition: all var(--ht-transition);
}
.ht-submit-type-pill:hover {
    background: var(--ht-primary);
    border-color: var(--ht-primary);
    color: #fff;
}
.ht-submit-type-pill--active {
    background: var(--ht-primary);
    border-color: var(--ht-primary);
    color: #fff;
}

.ht-submit-opp-form__footer {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 16px;
    border-top: 1px solid var(--ht-border);
}

.ht-submit-opp-status { font-size: 13px; }
.ht-submit-opp-status--success { color: #10b981; font-weight: 500; }
.ht-submit-opp-status--error   { color: #e74c3c; font-weight: 500; }

@media (max-width: 600px) {
    .ht-submit-field-row { grid-template-columns: 1fr; }
    .ht-submit-opp-form  { padding: 16px; }
}

/* ============================================================
   ACCESS DENIED / LOGIN GATE
   Styled to match hilanaw-community's .hccd-gate pattern
   (icon + heading + description + CTA, centered card).
   ============================================================ */
.ht-access-denied {
    max-width: 440px;
    margin: 64px auto;
    background: var(--ht-surface);
    border: 1px solid var(--ht-border);
    border-radius: var(--ht-radius);
    box-shadow: var(--ht-shadow);
    padding: 40px 32px;
    text-align: center;
}

.ht-access-denied__icon {
    font-size: 36px;
    margin-bottom: 12px;
    line-height: 1;
}

.ht-access-denied h3 {
    font-size: 19px;
    font-weight: 700;
    color: var(--ht-text);
    margin: 0 0 8px;
}

.ht-access-denied p {
    font-size: 14px;
    color: var(--ht-text-muted);
    line-height: 1.6;
    margin: 0 0 20px;
}

.ht-access-denied p:last-of-type { margin-bottom: 0; }

.ht-access-denied .ht-btn {
    display: inline-flex;
}

.ht-access-denied a:not(.ht-btn) {
    color: var(--ht-accent);
    font-weight: 600;
    text-decoration: none;
}

.ht-access-denied a:not(.ht-btn):hover { text-decoration: underline; }

@media (max-width: 600px) {
    .ht-access-denied { margin: 32px 16px; padding: 32px 20px; }
}
