/*
 * Amplify — App · Tools & Human Communication
 *
 * Purpose: Defines the Tools page, tool cards and human-communication configuration surfaces.
 * Contract: Base styling for the canonical Tools markup generated by human-communication.js.
 * Dependencies: foundation.css.
 * Invariants: Tool cards are grouped by domain in markup; CSS must not depend on post-render DOM reordering.
 * Maintenance: Comments describe current intent, not release history. Remove obsolete rules instead of stacking versioned patches.
 */

/* ======================================================
   TOOLS  — ENCAMINHAMENTOS + ROADMAP CARDS
====================================================== */
.tools-page,.human-tool-page{min-height:calc(100vh - 76px)}
.tools-page-inner,.human-tool-page-inner{width:min(1120px,calc(100% - 44px));margin:0 auto;padding:28px 0 72px}
.tools-hero,.human-tool-hero{margin-top:18px}
.tools-eyebrow,.human-tool-eyebrow{margin:0 0 8px;color:var(--gold-soft);font-size:12px;font-weight:800;letter-spacing:.11em;text-transform:uppercase}
.tools-title,.human-tool-title{max-width:820px;margin:0;color:var(--text);font-size:clamp(30px,4vw,42px);line-height:1.06;font-weight:650;letter-spacing:-.04em}
.tools-copy,.human-tool-copy{max-width:780px;margin:12px 0 0;color:var(--muted);font-size:15px;line-height:1.7}
.tools-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:30px}
.tool-menu-card{position:relative;min-height:184px;display:flex;flex-direction:column;align-items:flex-start;padding:20px;border:1px solid var(--border);border-radius:18px;background:linear-gradient(180deg,rgba(28,28,28,.9),rgba(19,19,19,.9));text-align:left;cursor:pointer;transition:transform 180ms ease,border-color 180ms ease,background 180ms ease}
.tool-menu-card:hover:not(.coming-soon){transform:translateY(-2px);border-color:rgba(254,233,147,.28);background:linear-gradient(180deg,rgba(33,31,24,.94),rgba(21,20,17,.94))}
.tool-menu-card.coming-soon{cursor:default;opacity:.72}
.tool-menu-card-head{width:100%;display:flex;align-items:flex-start;justify-content:space-between;gap:14px}
.tool-menu-icon{width:38px;height:38px;display:grid;place-items:center;margin-bottom:20px;border:1px solid rgba(254,233,147,.18);border-radius:11px;background:var(--gold-faint);color:var(--gold)}
.tool-menu-icon svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.tool-menu-card h3{margin:0;color:var(--text);font-size:15px;font-weight:800}
.tool-menu-card p{margin:7px 0 0;color:var(--soft);font-size:12px;line-height:1.55}
.tool-menu-card-footer{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:auto;padding-top:16px;color:var(--gold-soft);font-size:11px;font-weight:750}
.tool-soon{padding:5px 8px;border:1px solid var(--border);border-radius:999px;color:var(--soft);font-size:10px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.tool-switch{position:relative;width:42px;height:23px;display:inline-flex;flex:0 0 auto;cursor:pointer}
.tool-switch input{position:absolute;opacity:0;pointer-events:none}
.tool-switch-track{position:absolute;inset:0;border:1px solid rgba(255,255,255,.1);border-radius:999px;background:#282828;transition:180ms ease}
.tool-switch-track:before{content:"";position:absolute;width:17px;height:17px;left:2px;top:2px;border-radius:50%;background:#a7a7a7;transition:180ms ease}
.tool-switch input:checked+.tool-switch-track{border-color:rgba(254,233,147,.42);background:rgba(254,233,147,.17)}
.tool-switch input:checked+.tool-switch-track:before{transform:translateX(19px);background:var(--gold)}
.tool-switch input:disabled+.tool-switch-track{opacity:.34}
.tool-status-ready{color:#9fe0ae}.tool-status-incomplete{color:var(--gold-soft)}
.human-tool-status{display:flex;align-items:center;gap:8px;margin-top:20px;color:var(--soft);font-size:11.5px}
.human-tool-status-dot{width:7px;height:7px;border-radius:50%;background:rgba(255,255,255,.28);box-shadow:0 0 0 4px rgba(255,255,255,.035)}
.human-tool-status.ready .human-tool-status-dot{background:#9fe0ae;box-shadow:0 0 0 4px rgba(159,224,174,.08)}
.human-tool-status strong{color:var(--text)}
.human-lock-banner{margin-top:24px;padding:14px 16px;border:1px solid rgba(254,233,147,.2);border-radius:13px;background:rgba(254,233,147,.045);color:var(--gold-soft);font-size:12.5px;line-height:1.55}
.human-config-section{margin-top:34px;padding-top:32px;border-top:1px solid var(--border)}
.human-config-section:first-of-type{margin-top:30px}
.human-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:20px}
.human-section-head h2{margin:0;color:var(--text);font-size:21px;font-weight:750;letter-spacing:-.02em}
.human-section-head p{max-width:720px;margin:7px 0 0;color:var(--muted);font-size:13.5px;line-height:1.65}
.human-section-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.human-button{min-height:40px;padding:0 14px;border:1px solid rgba(254,233,147,.24);border-radius:11px;background:rgba(254,233,147,.065);color:var(--gold-soft);font:inherit;font-size:12px;font-weight:800;cursor:pointer;transition:160ms ease}
.human-button:hover{transform:translateY(-1px);border-color:rgba(254,233,147,.42);background:rgba(254,233,147,.1);color:var(--gold)}
.human-button.secondary{border-color:var(--border);background:rgba(255,255,255,.025);color:var(--muted)}
.human-button.danger{border-color:rgba(255,176,176,.18);background:rgba(255,176,176,.035);color:#dba2a2}
.human-button:disabled{opacity:.38;cursor:not-allowed;transform:none}
.human-destination-editor,.human-create-group-panel{padding:18px;border:1px solid var(--border);border-radius:17px;background:linear-gradient(180deg,rgba(255,255,255,.026),rgba(255,255,255,.014))}
.human-destination-editor{display:grid;grid-template-columns:minmax(190px,.9fr) minmax(170px,.65fr) minmax(240px,1.25fr) auto;gap:10px;align-items:end}
.human-field{display:grid;gap:7px;min-width:0}
.human-field-label{color:var(--soft);font-size:11px;font-weight:750}
.human-input,.human-textarea{width:100%;min-height:43px;padding:10px 12px;border:1px solid var(--border);border-radius:11px;background:rgba(255,255,255,.022);color:var(--text);font:inherit;font-size:13px;outline:none;transition:150ms ease}
.human-textarea{min-height:76px;resize:vertical;line-height:1.5}
.human-input:focus,.human-textarea:focus{border-color:rgba(254,233,147,.42);box-shadow:0 0 0 3px rgba(254,233,147,.035)}
.human-segmented{height:43px;display:grid;grid-template-columns:1fr 1fr;padding:3px;border:1px solid var(--border);border-radius:11px;background:rgba(255,255,255,.018)}
.human-segment{border:0;border-radius:8px;background:transparent;color:var(--soft);font:inherit;font-size:12px;font-weight:750;cursor:pointer}
.human-segment.active{background:var(--gold-faint);color:var(--gold);box-shadow:inset 0 0 0 1px rgba(254,233,147,.18)}
.human-picker{position:relative;min-width:0}
.human-picker-trigger{width:100%;height:43px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 12px;border:1px solid var(--border);border-radius:11px;background:rgba(255,255,255,.022);color:var(--text);font:inherit;font-size:13px;font-weight:700;text-align:left;cursor:pointer;transition:150ms ease}
.human-picker-trigger:hover,.human-picker.open .human-picker-trigger{border-color:rgba(254,233,147,.34);background:rgba(254,233,147,.035)}
.human-picker-value{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.human-picker-chevron{flex:0 0 auto;color:var(--soft);transition:160ms ease}.human-picker.open .human-picker-chevron{transform:rotate(180deg)}
.human-picker-panel{position:absolute;z-index:80;top:calc(100% + 7px);left:0;right:0;max-height:310px;overflow:auto;padding:9px;border:1px solid rgba(254,233,147,.22);border-radius:14px;background:#121212;box-shadow:0 22px 50px rgba(0,0,0,.5)}
.human-picker-panel[hidden]{display:none}.human-picker-option{width:100%;min-height:40px;display:flex;align-items:center;justify-content:space-between;gap:9px;padding:8px 10px;border:1px solid transparent;border-radius:9px;background:transparent;color:var(--muted);font:inherit;font-size:12.5px;font-weight:700;text-align:left;cursor:pointer;transition:140ms ease}
.human-picker-option:hover{border-color:rgba(254,233,147,.18);background:rgba(254,233,147,.04);color:var(--text)}.human-picker-option.selected{border-color:rgba(254,233,147,.36);background:var(--gold-faint);color:var(--gold)}
.human-picker-option small{display:block;margin-top:2px;color:var(--soft);font-size:10px;font-weight:600}.human-picker-check{opacity:0;color:var(--gold)}.human-picker-option.selected .human-picker-check{opacity:1}
.human-destination-list{display:grid;gap:9px;margin-top:14px}.human-destination-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:center;padding:14px 15px;border:1px solid var(--border);border-radius:13px;background:rgba(255,255,255,.018)}
.human-destination-card strong{display:block;color:var(--text);font-size:13px}.human-destination-meta{margin-top:4px;color:var(--soft);font-size:11px;line-height:1.45}.human-destination-meta.stale{color:#d8bd82}
.human-destination-actions{display:flex;gap:7px}.human-empty{padding:20px;border:1px dashed var(--border);border-radius:13px;color:var(--soft);font-size:12px;line-height:1.55;text-align:center}
.human-create-group-panel{display:grid;gap:12px;margin-top:12px}.human-create-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.human-create-group-panel[hidden]{display:none}
.handoff-list{display:grid;gap:10px}.handoff-card{display:grid;grid-template-columns:minmax(0,1fr) minmax(230px,300px);gap:22px;align-items:center;padding:16px 17px;border:1px solid var(--border);border-radius:15px;background:rgba(255,255,255,.018);transition:opacity 160ms ease,border-color 160ms ease}.handoff-card.disabled{opacity:.54}.handoff-card:hover{border-color:rgba(254,233,147,.17)}
.handoff-title-line{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.handoff-title-line h3{margin:0;color:var(--text);font-size:13.5px;font-weight:800}.handoff-source{padding:4px 7px;border:1px solid var(--border);border-radius:999px;color:var(--soft);font-size:9.5px;font-weight:850;letter-spacing:.08em;text-transform:uppercase}.handoff-source.amplify{border-color:rgba(254,233,147,.2);color:var(--gold-soft);background:rgba(254,233,147,.035)}
.handoff-card p{margin:7px 0 0;color:var(--muted);font-size:12px;line-height:1.55}.handoff-control{display:grid;gap:9px}.handoff-control-top{display:flex;justify-content:flex-end;align-items:center;gap:9px;color:var(--soft);font-size:10.5px;font-weight:750}.handoff-training-destination{padding:10px 12px;border:1px solid var(--border);border-radius:11px;background:rgba(255,255,255,.018)}.handoff-training-destination span{display:block;color:var(--soft);font-size:10px;font-weight:750}.handoff-training-destination strong{display:block;margin-top:4px;color:var(--text);font-size:12.5px}.handoff-training-destination.missing strong{color:var(--gold-soft)}
@media(max-width:900px){.tools-card-grid{grid-template-columns:1fr}.human-destination-editor{grid-template-columns:1fr 1fr}.human-destination-editor>.human-button{grid-column:1/-1}.handoff-card{grid-template-columns:1fr}.handoff-control-top{justify-content:flex-start}.human-section-head{display:grid}.human-section-actions{justify-content:flex-start}}
@media(max-width:620px){.tools-page-inner,.human-tool-page-inner{width:min(100% - 28px,1120px)}.human-destination-editor,.human-create-grid{grid-template-columns:1fr}.human-destination-editor>.human-button{grid-column:auto}.tool-menu-card{min-height:166px}}

.tool-card-native-link{
  position:absolute;
  inset:0;
  z-index:2;
  border-radius:inherit;
  text-decoration:none;
  outline:none;
}
.tool-card-native-link:focus-visible{
  box-shadow:0 0 0 3px rgba(254,233,147,.12),inset 0 0 0 1px rgba(254,233,147,.46);
}
.tool-menu-card .tool-switch{
  position:relative;
  z-index:4;
  pointer-events:auto;
}
.tool-menu-card-head,
.tool-menu-card>h3,
.tool-menu-card>p,
.tool-menu-card-footer{
  position:relative;
  z-index:1;
  pointer-events:none;
}

/* ======================================================
   TOOLS  — VISUAL ALIGNMENT WITH TRAINING
====================================================== */
.tools-page,.human-tool-page{min-width:0;width:100%;padding:34px clamp(22px,4vw,56px) 64px;min-height:calc(100vh - 76px)}
.tools-page-inner,.human-tool-page-inner{width:min(1120px,100%);margin:0 auto;padding:0}
.tools-hero,.human-tool-hero{margin-top:18px}
.tools-eyebrow,.human-tool-eyebrow{margin:0 0 8px;color:var(--gold-soft);font-size:12px;font-weight:800;letter-spacing:.11em;text-transform:uppercase}
.tools-title,.human-tool-title{margin:0;color:var(--text);font-size:clamp(30px,4vw,42px);line-height:1.06;font-weight:650;letter-spacing:-.04em}
.tools-copy,.human-tool-copy{max-width:720px;margin:12px 0 0;color:var(--muted);font-size:15px;line-height:1.7}
.tool-menu-card h3{font-size:17px;font-weight:800;letter-spacing:-.015em}
.tool-menu-card p{font-size:13px;line-height:1.6}
.tool-status-disabled{color:#e98989}.tool-status-incomplete{color:var(--gold-soft)}.tool-status-ready{color:#9fe0ae}
.human-tool-status.disabled{color:#e98989}.human-tool-status.disabled strong{color:#ef9a9a}.human-tool-status.disabled .human-tool-status-dot{background:#e36f6f;box-shadow:0 0 0 4px rgba(227,111,111,.08)}
.human-config-section{margin-top:26px;padding:clamp(22px,3vw,30px);border:1px solid var(--border);border-radius:22px;background:linear-gradient(180deg,rgba(28,28,28,.92),rgba(20,20,20,.92));box-shadow:0 18px 46px rgba(0,0,0,.16)}
.human-config-section:first-of-type{margin-top:30px}.human-config-section+.human-config-section{margin-top:22px}
.human-section-head{margin-bottom:24px}.human-section-title-wrap{display:flex;align-items:flex-start;gap:14px;min-width:0}.human-section-number{display:inline-flex;align-items:center;justify-content:center;flex:0 0 28px;width:28px;height:28px;border:1px solid rgba(254,233,147,.26);border-radius:9px;background:var(--gold-faint);color:var(--gold);font-size:12px;font-weight:850}
.human-section-head h2{font-size:24px;font-weight:700;letter-spacing:-.025em}.human-section-head p{max-width:680px;margin:7px 0 0;color:var(--soft);font-size:14.5px;line-height:1.65}
.human-button{min-height:46px;padding:0 17px;border-radius:12px;font-size:14px;font-weight:800}
.human-button.primary{border-color:rgba(254,233,147,.52);background:var(--gold);color:#17140a;box-shadow:0 8px 22px rgba(254,233,147,.06)}
.human-button.primary:hover{border-color:rgba(254,233,147,.68);background:var(--gold);color:#17140a;filter:brightness(1.035);box-shadow:0 10px 28px rgba(254,233,147,.12)}
.human-button.secondary{border-color:var(--border);background:rgba(255,255,255,.025);color:var(--muted)}
.human-button.secondary:hover{border-color:rgba(254,233,147,.32);background:rgba(254,233,147,.04);color:var(--text)}
.human-button.danger{border-color:rgba(238,117,117,.24);background:rgba(238,117,117,.04);color:#e69191}.human-button.danger:hover{border-color:rgba(238,117,117,.4);background:rgba(238,117,117,.07);color:#f2a4a4}
.human-field-label{font-size:14.5px;font-weight:700;color:var(--muted)}.human-field-help{color:var(--soft);font-size:12.5px;line-height:1.5}
.human-input,.human-textarea,.human-picker-trigger{font-size:15px}.human-input,.human-picker-trigger{min-height:48px;height:48px}.human-textarea{min-height:92px;padding:12px 14px}.human-segmented{height:48px}.human-segment{font-size:14px}
.human-destination-editor,.human-create-group-panel{padding:20px;border-radius:16px;background:rgba(255,255,255,.018)}
.human-create-group-panel{margin-top:16px;border-color:rgba(254,233,147,.14)}.human-admin-choice{padding-top:2px}.human-admin-choice .training-choice{min-width:76px;justify-content:center}
.human-destination-list{margin-top:18px;gap:11px}.human-destination-card{padding:16px 17px;border-radius:14px}.human-destination-card strong{font-size:15px}.human-destination-meta{font-size:12.5px}
.handoff-list{gap:12px}.handoff-card{padding:18px 19px;border-radius:16px}.handoff-title-line h3{font-size:15.5px}.handoff-card p{font-size:13.5px;line-height:1.6}.handoff-control-top{font-size:12.5px}.handoff-control-top.is-disabled{color:#e98989}.handoff-training-destination span{font-size:11.5px}.handoff-training-destination strong{font-size:13.5px}
@media(max-width:900px){.human-section-title-wrap{gap:11px}.human-section-actions{margin-left:42px}}
@media(max-width:620px){.tools-page,.human-tool-page{padding:28px 14px 52px}.human-config-section{padding:20px 16px}.human-section-actions{margin-left:0}.human-section-title-wrap{display:grid}.human-section-number{margin-bottom:2px}}

/* ======================================================
   ENCAMINHAMENTOS  — READINESS + PAGE TOGGLE
====================================================== */
.human-tool-status-row{display:flex;align-items:center;justify-content:space-between;gap:22px;max-width:860px;margin-top:20px}
.human-tool-status-row .human-tool-status{margin-top:0}
.human-page-toggle{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:13px;font-weight:750;white-space:nowrap}
.human-page-toggle.is-disabled{opacity:.58}
.human-page-toggle.is-disabled .tool-switch{cursor:not-allowed}
.tool-switch input:disabled+.tool-switch-track{opacity:.48;cursor:not-allowed}
.human-participants-grid{grid-template-columns:minmax(0,1.08fr) minmax(0,.92fr);column-gap:28px}
.human-admin-field{padding-left:8px}
.human-admin-field .human-field-label{margin-top:1px}
@media(max-width:900px){.human-tool-status-row{align-items:flex-start}.human-participants-grid{column-gap:20px}.human-admin-field{padding-left:10px}}
@media(max-width:620px){.human-tool-status-row{display:grid;gap:12px}.human-participants-grid{grid-template-columns:1fr}.human-admin-field{padding-left:0}}

/* ======================================================
   ENCAMINHAMENTOS  — HERO STATUS + POLICY ORDER
====================================================== */
.human-tool-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:30px}
.human-tool-hero-main{min-width:0;flex:1}
.human-enable-panel{min-width:270px;padding:18px 20px;border:1px solid var(--border);border-radius:17px;background:rgba(255,255,255,.025);box-shadow:0 12px 32px rgba(0,0,0,.12)}
.human-enable-panel-top{display:flex;align-items:center;justify-content:space-between;gap:18px}
.human-enable-panel-label{color:var(--text);font-size:15px;line-height:1.4;font-weight:750}
.human-enable-panel .tool-switch{width:48px;height:26px}
.human-enable-panel .tool-switch-track:before{width:20px;height:20px;left:2px;top:2px}
.human-enable-panel .tool-switch input:checked+.tool-switch-track:before{transform:translateX(22px)}
.human-enable-panel .human-tool-status{margin-top:11px;padding-top:10px;border-top:1px solid rgba(255,255,255,.055);font-size:12px;line-height:1.45}
.human-enable-panel .human-tool-status strong{font-size:12px}
@media(max-width:900px){.human-tool-hero{display:grid}.human-enable-panel{width:100%;min-width:0}}
@media(max-width:620px){.human-enable-panel{padding:16px 17px}}
