/* Hotkey guide (/pyrevit-tools/hotkeys/). Inherits the pyrevit-tools product roles;
   status uses the shared [data-state] roles with text and icon, never color alone. */
.hk-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* Keycaps. The global kbd rule hides kbd on small screens; these stay visible. */
.hk-keycap{display:inline-flex;align-items:center;vertical-align:middle}
.hk-keycap>span[aria-hidden]{display:inline-flex;gap:4px}
.hk-keycap kbd{display:inline-grid;place-items:center;box-sizing:border-box;width:auto;min-width:34px;height:36px;padding:0 8px;border:1px solid var(--product-border);border-bottom-width:3px;border-radius:5px;background:var(--white);color:var(--ink);font:700 17px/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.hk-keycap-sm kbd{min-width:25px;height:27px;padding:0 5px;font-size:12px;border-bottom-width:2px;border-radius:4px}
.hk-keycap-xl kbd{min-width:72px;height:76px;padding:0 14px;font-size:38px;border-bottom-width:5px;border-radius:8px}
.hk-keycap-xl>span[aria-hidden]{gap:8px}

.hk-status{display:inline-block;font-size:11px;font-weight:600;line-height:1.5;white-space:normal}

/* Index hero */
.hk-page .product-hero h1{overflow-wrap:anywhere}
.hk-hero>div>p:not(.eyebrow):not(.product-subtitle){margin:0 0 10px}
.hk-hero-panel{justify-self:stretch;min-width:0;min-height:230px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;border:1px solid var(--product-border);border-radius:6px;background:var(--product-surface);padding:29px;text-align:center}
.hk-hero-panel>span:first-child{font:10px/1.5 ui-monospace,monospace;letter-spacing:.09em;color:var(--product-accent)}
.hk-hero-panel small{font-size:12px;color:var(--muted)}
.hk-hero-grid{display:grid;grid-template-columns:repeat(4,auto);gap:12px 16px;justify-content:center}

/* Key finder */
.hk-finder{display:grid;grid-template-columns:245px minmax(0,1fr);gap:30px;padding:30px 0;border-bottom:1px solid var(--line)}
.hk-finder .eyebrow{font-size:10px;margin-bottom:12px;color:var(--product-accent)}
.hk-finder h2{font-size:25px;letter-spacing:-.04em;line-height:1.3;margin:0 0 8px}
.hk-finder p{font-size:12px;line-height:1.85;color:var(--muted);margin:0}
.hk-finder label{display:block;font-size:12px;font-weight:650;margin-bottom:8px}
.hk-finder-row{display:flex;flex-wrap:wrap;gap:10px}
#hk-key-input{flex:1 1 220px;min-width:0;min-height:54px;box-sizing:border-box;padding:10px 16px;border:2px solid var(--product-border);border-radius:6px;background:var(--white);color:var(--ink);font:600 20px/1.2 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.08em}
#hk-key-input::placeholder{color:#8a8c83;letter-spacing:0;font-weight:500}
#hk-key-input:focus-visible{outline:3px solid var(--site-focus);outline-offset:2px;border-color:var(--product-accent)}
#hk-reset{min-height:54px}
#hk-reset[hidden]{display:none}
#hk-finder-status{margin-top:12px;min-height:1.9em;font-size:13px;color:var(--ink)}
.hk-legend{margin:22px 0 0;max-width:720px;font-size:12px;line-height:1.85;color:var(--muted)}

/* Tables by group */
.hk-group[hidden]{display:none}
.hk-table{width:100%;border-collapse:collapse;font-size:13px}
.hk-table th{text-align:left;font-size:10px;letter-spacing:.08em;font-weight:600;color:var(--muted);padding:0 14px 10px;border-bottom:1px solid var(--product-border)}
.hk-table td{padding:16px 14px;border-bottom:1px solid var(--line);vertical-align:middle}
.hk-table tr[hidden]{display:none}
.hk-cell-key{width:112px}
.hk-cell-ko{width:92px;font-size:17px}
.hk-cell-status{width:200px}
.hk-name{font-size:16px;font-weight:650;letter-spacing:-.02em;color:var(--ink);text-underline-offset:4px}
.hk-name:hover,.hk-name:focus-visible{color:var(--product-accent);text-decoration:underline}
.hk-cell-name p{margin:5px 0 0;font-size:12px;line-height:1.7;color:var(--muted)}
.hk-match{display:inline-block;margin-left:8px;padding:1px 6px;border:1px solid var(--product-accent);border-radius:4px;background:var(--white);color:var(--product-accent);font-size:10px;font-weight:650;vertical-align:2px}
.hk-match[hidden]{display:none}
.hk-table tr.is-exact td{background:var(--product-surface)}
.hk-table tr.is-exact td:first-child{box-shadow:inset 4px 0 0 var(--product-accent)}
.hk-ko-label{display:none}

/* How it works */
.hk-usage{display:grid;grid-template-columns:245px minmax(0,1fr);gap:30px;padding:34px 0;border-bottom:1px solid var(--line)}
.hk-usage .eyebrow{font-size:10px;margin-bottom:12px;color:var(--product-accent)}
.hk-usage h2{font-size:25px;letter-spacing:-.04em;margin:0}
.hk-usage p{font-size:13px;line-height:1.9;color:var(--muted)}
.hk-usage .distribution-box{padding:16px 20px;border:1px solid var(--product-border)}
.hk-usage .distribution-box p{margin:10px 0 0}
.hk-end-links{display:flex;flex-wrap:wrap;gap:10px 22px;margin:14px 0 0 !important}

/* Ordered steps (semantic list, product numbering) */
.hk-steps{list-style:none;counter-reset:hk;margin:18px 0 0;padding:0;display:grid}
.hk-steps li{counter-increment:hk;display:grid;grid-template-columns:40px minmax(0,1fr);gap:15px;padding:15px 0;border-top:1px solid var(--product-border);font-size:13px;line-height:1.85}
.hk-steps li::before{content:"0" counter(hk);font:11px/1.7 ui-monospace,monospace;color:var(--product-accent);padding-top:3px}

/* Command page */
.hk-command-hero h1{font-size:clamp(30px,4.4vw,52px);letter-spacing:-.04em;line-height:1.15;margin-bottom:14px}
.hk-command-hero h2{font-size:19px;line-height:1.6;letter-spacing:-.03em;margin-bottom:0}
.hk-meta{margin:24px 0 0;padding:4px 18px;border:1px solid var(--product-border);border-radius:6px;background:var(--product-surface)}
.hk-meta>div{display:grid;grid-template-columns:96px minmax(0,1fr);gap:14px;align-items:center;padding:11px 0;border-bottom:1px solid var(--product-border);font-size:13px}
.hk-meta>div:last-child{border-bottom:0}
.hk-meta dt{font-size:12px;color:var(--muted)}
.hk-meta dd{margin:0;min-width:0}
.hk-meta dd p{margin:7px 0 0;font-size:12px;line-height:1.7;color:var(--muted)}
.hk-meta-ko{font-size:18px}
.hk-hero-key small{font-size:14px}
.hk-screen{display:grid;place-items:center;gap:12px;min-height:200px;margin-top:6px;padding:28px;text-align:center;border:1px dashed var(--product-border);border-radius:6px;background:var(--product-surface)}
.hk-screen p{max-width:430px;margin:0}
.hk-subhead{font-size:14px;letter-spacing:-.02em;margin:22px 0 4px}
.hk-siblings{list-style:none;margin:16px 0 0;padding:0;display:grid;gap:10px}
.hk-siblings li{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 14px;padding:8px 14px;border:1px solid var(--line);border-radius:6px;background:var(--white)}
.hk-siblings a{display:inline-flex;align-items:center;gap:12px;min-height:44px;font-size:14px;font-weight:650;color:var(--ink)}
.hk-siblings a:hover span:last-child,.hk-siblings a:focus-visible span:last-child{color:var(--product-accent);text-decoration:underline;text-underline-offset:4px}
.hk-back{margin:30px 0 0}
.hk-back .button{display:inline-flex;align-items:center;padding:0 18px;border:1px solid var(--product-border);color:var(--ink)}

@media(max-width:820px){
  .hk-finder,.hk-usage{grid-template-columns:minmax(0,1fr);gap:16px}
  .hk-hero-panel{min-height:150px}
}
@media(max-width:600px){
  .hk-hero-panel{display:none}
  .hk-hero-grid{grid-template-columns:repeat(4,auto);gap:10px}
  .hk-finder{padding:24px 0}
  .hk-finder h2,.hk-usage h2{font-size:22px}
  #hk-key-input{font-size:18px;flex-basis:100%}
  #hk-reset{flex:1 1 100%}
  .hk-table,.hk-table tbody{display:block}
  .hk-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  .hk-table tr{display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:14px;row-gap:6px;padding:14px 0;border-bottom:1px solid var(--line)}
  .hk-table tr.is-exact{background:var(--product-surface);box-shadow:inset 4px 0 0 var(--product-accent);padding-left:10px}
  .hk-table tr.is-exact td{background:transparent;box-shadow:none}
  .hk-table td{display:block;width:auto;padding:0;border:0}
  .hk-cell-key{grid-column:1;grid-row:1 / span 3}
  .hk-cell-name{grid-column:2;grid-row:1}
  .hk-cell-ko{grid-column:2;grid-row:2;font-size:14px}
  .hk-cell-status{grid-column:2;grid-row:3}
  .hk-ko-label{display:inline;font-size:11px;color:var(--muted)}
  .hk-command-hero h1{font-size:30px}
  .hk-command-hero h2{font-size:17px}
  .hk-meta{padding:2px 14px}
  .hk-meta>div{grid-template-columns:84px minmax(0,1fr);gap:10px}
  .hk-siblings li{padding:6px 12px}
}
