/* professions: every selector starts with the tool's root class (TOOLS.md).
   The idea: the trade-skill window. Recipe names in the game's difficulty colours at YOUR skill (orange / yellow /
   green / grey, red before it is learnable), the gold skill bar under the control, icons as the window shows them.
   The rest stays quiet: the frame's night panels and tables. */
.kc-t-professions .kc-t-prof-head { display: flex; gap: 16px; align-items: center; }
.kc-t-professions .kc-t-prof-head .kc-icon { width: 56px; height: 56px; border: 2px solid #8d713b; border-radius: 6px; flex: 0 0 auto; }
.kc-t-professions .kc-t-prof-head h1 { margin: 0 0 4px; }

/* the difficulty colours of the trade-skill window (TradeSkillTypeColor: optimal, medium, easy, trivial) */
.kc-t-professions .kc-t-prof-d-orange > td:first-child, .kc-t-professions td.kc-t-prof-d-orange, .kc-t-professions span.kc-t-prof-d-orange { color: #ff8040; }
.kc-t-professions .kc-t-prof-d-yellow > td:first-child, .kc-t-professions td.kc-t-prof-d-yellow, .kc-t-professions span.kc-t-prof-d-yellow { color: #ffff00; }
.kc-t-professions .kc-t-prof-d-green > td:first-child, .kc-t-professions td.kc-t-prof-d-green, .kc-t-professions span.kc-t-prof-d-green { color: #40bf40; }
.kc-t-professions .kc-t-prof-d-grey > td:first-child, .kc-t-professions td.kc-t-prof-d-grey, .kc-t-professions span.kc-t-prof-d-grey { color: #9a9a9a; }
.kc-t-professions .kc-t-prof-d-red > td:first-child { color: #ff4a4a; }
.kc-t-professions .kc-t-prof-d-red { opacity: 0.62; }
.kc-t-professions tr[class^="kc-t-prof-d-"] > td:first-child a, .kc-t-professions td[class^="kc-t-prof-d-"] a { color: inherit; }
.kc-t-professions .kc-t-prof-th i { font-style: normal; display: inline-block; min-width: 2.4em; text-align: end; font-variant-numeric: tabular-nums; }
.kc-t-professions .kc-t-prof-th i:nth-child(1) { color: #ff8040; }
.kc-t-professions .kc-t-prof-th i:nth-child(2) { color: #ffff00; }
.kc-t-professions .kc-t-prof-th i:nth-child(3) { color: #40bf40; }
.kc-t-professions .kc-t-prof-th i:nth-child(4) { color: #9a9a9a; }
.kc-t-professions .kc-t-prof-recipes td, .kc-t-professions .kc-t-prof-plantbl td, .kc-t-professions .kc-t-prof-nodes td { white-space: normal; vertical-align: top; }
.kc-t-professions .kc-t-prof-recipes td:first-child { min-width: 14em; }
.kc-t-professions .kc-t-prof-reag { min-width: 12em; color: #d8cfb6; }
.kc-t-professions .kc-t-prof-sub { color: #aaa38f; font-size: 0.92em; }
.kc-t-professions .kc-t-prof-xy, .kc-t-professions .kc-t-prof-pct { color: #aaa38f; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kc-t-professions .kc-t-prof-spec { color: #ffd100; }

/* the control: skill now, target, sources; the gold skill bar of the game's skill frame */
.kc-t-professions .kc-t-prof-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 12px 16px; align-items: end; padding: 16px; margin: 0 0 16px; border: 1px solid #5d5132; background: rgba(6, 8, 26, 0.7); font: 15px/1.4 var(--sans, system-ui, sans-serif); }
.kc-t-professions .kc-t-prof-form label { display: grid; gap: 4px; color: #c9c0a8; }
.kc-t-professions .kc-t-prof-form input, .kc-t-professions .kc-t-prof-form select { font: inherit; font-size: 16px; padding: 8px 10px; background: #0a0d16; color: #f3ead1; border: 1px solid #8d713b; border-radius: 0; width: 100%; font-variant-numeric: tabular-nums; }
.kc-t-professions .kc-t-prof-form button { font: inherit; font-weight: 700; padding: 10px 16px; background: #ddb45e; color: #171105; border: 1px solid #efcd7b; cursor: pointer; }
.kc-t-professions .kc-t-prof-bar { grid-column: 1 / -1; position: relative; height: 18px; border: 1px solid #9aa0ae; background: #0b0d14; box-shadow: inset 0 1px 3px #000; }
.kc-t-professions .kc-t-prof-bar span { display: block; height: 100%; background: linear-gradient(#3f6fd8, #1d3f9e); }
.kc-t-professions .kc-t-prof-bar b { position: absolute; inset: 0; text-align: center; font: 600 12px/18px var(--sans, system-ui, sans-serif); color: #fff; text-shadow: 0 1px 2px #000; font-variant-numeric: tabular-nums; }
.kc-t-professions .kc-t-prof-sum { font-size: 17px; color: #f3ead1; margin: 0 0 8px; }
.kc-t-professions .kc-t-prof-stuck { color: #ff8a65; }
.kc-t-professions .kc-t-prof-ranks { margin: 0 0 12px; padding-inline-start: 20px; color: #ffd100; }
.kc-t-professions .kc-t-prof-range { font-variant-numeric: tabular-nums; white-space: nowrap; color: #f3ead1; }
.kc-t-professions .kc-t-prof-alt { font-size: 0.92em; color: #aaa38f; }
.kc-t-professions .kc-t-prof-alt a, .kc-t-professions .kc-t-prof-alt span { color: #c9c0a8; }
.kc-t-professions .kc-t-prof-alts { list-style: none; margin: 0; padding: 0; }
.kc-t-professions .kc-t-prof-alts li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 15em; }
.kc-t-professions .kc-t-prof-plantbl td.kc-t-prof-alt { max-width: 15em; }
.kc-t-professions .kc-t-prof-note { color: #aaa38f; font-size: 14px; }
.kc-t-professions .kc-t-prof-total { color: #f3ead1; }
.kc-t-professions .kc-t-prof-plan h3 { color: #ffd100; font-size: 17px; margin: 18px 0 8px; }

/* the index: a spellbook page of professions, icon + name + what it holds */
.kc-t-professions .kc-t-prof-cards { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 24px; }
.kc-t-professions .kc-t-prof-cards li { display: grid; grid-template-columns: 40px 1fr; column-gap: 12px; padding: 8px 0; border-bottom: 1px solid rgba(154, 160, 174, 0.14); }
.kc-t-professions .kc-t-prof-cards a { display: contents; color: #ffd100; font-weight: 600; text-decoration: none; }
.kc-t-professions .kc-t-prof-cards a .kc-icon { grid-row: 1 / span 2; width: 40px; height: 40px; }
.kc-t-professions .kc-t-prof-cards a:hover .kc-t-prof-card-name, .kc-t-professions .kc-t-prof-cards a:focus-visible .kc-t-prof-card-name { text-decoration: underline; }
.kc-t-professions .kc-t-prof-card-facts { grid-column: 2; color: #aaa38f; font-size: 14px; }
.kc-t-professions .kc-t-prof-gear td { white-space: normal; vertical-align: top; }

@media (max-width: 720px) {
  /* the plan table becomes one block per row on a phone: no horizontal overflow at 320 px */
  .kc-t-professions .kc-t-prof-plantbl thead { display: none; }
  .kc-t-professions .kc-t-prof-plantbl, .kc-t-professions .kc-t-prof-plantbl tbody, .kc-t-professions .kc-t-prof-plantbl tr, .kc-t-professions .kc-t-prof-plantbl td { display: block; width: auto; max-width: 100%; }
  .kc-t-professions .kc-t-prof-plantbl tr { padding: 8px 0; border-bottom: 1px solid rgba(154, 160, 174, 0.14); }
  .kc-t-professions .kc-t-prof-plantbl td { border: 0; padding: 2px 12px; white-space: normal; text-align: start; }
  .kc-t-professions .kc-t-prof-alts li { max-width: 100%; }
  .kc-t-professions .kc-t-prof-form { grid-template-columns: 1fr 1fr; }
  .kc-t-professions .kc-t-prof-form .kc-t-prof-skill { grid-column: 1 / -1; }
  .kc-t-professions .kc-t-prof-form button { grid-column: 1 / -1; }
  .kc-t-professions .kc-t-prof-recipes td:first-child { min-width: 11em; }
  .kc-t-professions .kc-t-prof-head .kc-icon { width: 44px; height: 44px; }
}
