/* Free tools: the hub and each tool page. Square containers, no shadows on cards (brand v5). */
.fx [hidden] { display: none !important; }
.fx-hero { padding: 88px 0 48px; background: var(--surface); }
.fx-hero .eyebrow a { color: inherit; text-decoration: none; }
.fx-form { display: flex; gap: 8px; width: 100%; max-width: 720px; padding: 6px; border-radius: var(--r-md); background: #fff; box-shadow: 0 0 0 1px var(--rule), var(--shadow-md); }
.fx-form:focus-within { box-shadow: 0 0 0 2px var(--brand), var(--shadow-md); }
.fx-form input { flex: 1; min-width: 0; padding: 0 14px; border: 0; font: inherit; font-size: 17px; color: var(--ink); background: transparent; }
.fx-form input:focus { outline: 0; }
.fx-err { padding: 10px 14px; border-radius: var(--r-sm); background: var(--neg-bg); color: var(--neg); font-size: 14px; max-width: 720px; }
.fx-err a { color: inherit; font-weight: 600; }

.fx-pick { position: relative; flex: none; }
.fx-pick__btn { display: inline-flex; align-items: center; gap: 8px; height: 100%; min-height: 46px; padding: 0 12px; border: 0; border-left: 1px solid var(--rule); background: transparent; font: inherit; font-size: 15px; color: var(--ink); cursor: pointer; }
.fx-pick__btn:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }
.fx-pick__list { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; width: 220px; max-height: 300px; overflow-y: auto; margin: 0; padding: 4px; list-style: none; background: #fff; box-shadow: 0 0 0 1px var(--rule), var(--shadow-md); border-radius: var(--r-md); text-align: left; }
.fx-pick__list li { padding: 8px 10px; font-size: 14px; color: var(--ink); cursor: pointer; border-radius: var(--r-sm); }
.fx-pick__list li:hover, .fx-pick__list li:focus { outline: none; background: var(--brand-pale); }
.fx-pick__list li[aria-selected="true"] { color: var(--brand); font-weight: 600; }

.fx-wait { padding: 8px 0 72px; }
.fx-wait__card { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 460px; margin: 0 auto; padding: 28px; background: #fff; box-shadow: var(--shadow-sm); color: var(--ink); }
.fx-spin { width: 26px; height: 26px; border-radius: 999px; border: 3px solid var(--rule); border-top-color: var(--brand); animation: fx-spin .8s linear infinite; }
@keyframes fx-spin { to { transform: rotate(360deg); } }
.fx-bar { width: 100%; height: 6px; background: var(--rule-faint); overflow: hidden; }
.fx-bar i { display: block; width: 0; height: 100%; background: var(--brand); transition: width .4s; }

.fx-result { padding: 8px 0 72px; }
.fx-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.fx-kw { color: var(--ink); }
.fx-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.fx-card { display: flex; flex-direction: column; gap: 10px; padding: 20px; background: #fff; box-shadow: var(--shadow-sm); min-width: 0; }
.fx-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.fx-card .num { font-family: var(--mono); font-size: 30px; font-weight: 400; letter-spacing: -0.03em; color: var(--ink); }
.fx-intent { font-size: 20px; font-weight: 600; color: var(--ink); text-transform: capitalize; }
.fx-kd-note { color: var(--body); }
.fx-trend { display: flex; align-items: flex-end; gap: 6px; height: 120px; }
.fx-trend span { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; font-size: 11px; color: var(--muted); }
.fx-trend i { font-style: normal; }
.fx-trend b { display: block; width: 100%; min-height: 2px; background: var(--brand); }
.fx-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fx-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.fx-table th { padding: 6px 8px; text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--rule); }
.fx-table td { padding: 10px 8px; border-bottom: 1px solid var(--rule-faint); color: var(--ink); }
.fx-table .r { text-align: right; font-family: var(--mono); }
.fx-table td.r { color: var(--body); }
.fx-more { font-size: 14px; font-weight: 500; color: var(--brand); text-decoration: none; }
.fx-more:hover { text-decoration: underline; }
.fx-cta { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 32px; }
.fx-cta .h-ctas { display: flex; gap: 10px; flex: none; }

.fx-focus { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: center; padding: 24px; }
.fx-focus__main { display: flex; flex-direction: column; gap: 6px; }
.fx-card .fx-big { font-size: 56px; line-height: 1; }
.fx-change { color: var(--body); }
.fx-trend--big { height: 150px; }
.fx-kd-word { font-size: 16px; font-weight: 600; }
.fx-kd-word.is-easy { color: var(--pos); } .fx-kd-word.is-mid { color: var(--warn); } .fx-kd-word.is-hard { color: var(--neg); }
.fx-meter { position: relative; display: flex; flex-direction: column; gap: 8px; }
.fx-meter::before { content: ''; display: block; height: 12px; background: linear-gradient(90deg, var(--pos-bg) 0 30%, var(--warn-bg) 30% 60%, var(--neg-bg) 60% 100%); box-shadow: inset 0 0 0 1px var(--rule); }
.fx-meter i { position: absolute; top: -4px; left: 0; width: 3px; height: 20px; background: var(--ink); transition: left .6s; }
.fx-meter__marks { display: grid; grid-template-columns: 30% 30% 40%; font-size: 12px; color: var(--muted); }
.fx-meter__marks em { font-style: normal; }
.fx-others { padding: 0 0 24px; }
.fx-hub .fx-hub__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fx-others .fx-label { display: block; margin-bottom: 12px; }

.fx-hub { padding: 8px 0 40px; }
.fx-hub:last-child { padding-bottom: 96px; }
.fx-hub__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.fx-tile { display: flex; flex-direction: column; gap: 8px; padding: 22px; background: #fff; box-shadow: var(--shadow-sm); color: var(--body); text-decoration: none; transition: box-shadow .15s; }
.fx-tile:hover { box-shadow: 0 0 0 1px var(--brand); }
.fx-tile b { font-size: 18px; color: var(--ink); }
.fx-tag { align-self: flex-start; padding: 2px 8px; font-size: 12px; font-weight: 600; color: var(--brand); background: var(--brand-pale); }

@media (max-width: 900px) {
  .fx-stats { grid-template-columns: 1fr 1fr; }
  .fx-two, .fx-hub__grid, .fx-hub .fx-hub__grid, .fx-focus { grid-template-columns: minmax(0, 1fr); }
  .fx-card .fx-big { font-size: 44px; }
  .fx-cta { flex-direction: column; align-items: flex-start; padding: 24px; }
}
@media (max-width: 560px) {
  .fx-form { flex-direction: column; }
  .fx-form input { padding: 12px 10px; }
  .fx-pick__btn { width: 100%; justify-content: space-between; border-left: 0; border-top: 1px solid var(--rule); }
  .fx-pick__list { left: 0; right: auto; width: 100%; }
  .fx-top { flex-direction: column; align-items: flex-start; }
  .fx-trend span i { display: none; }
}

/* Free tools, second set: shared result parts. States are square tags (brand v5). */
.fx-state { display: inline-block; padding: 2px 8px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.fx-state--good { background: var(--pos-bg); color: var(--pos); }
.fx-state--mid { background: var(--warn-bg); color: var(--warn); }
.fx-state--bad { background: var(--neg-bg); color: var(--neg); }
.fx-sum { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.fx-sum .fx-label { margin-right: auto; }
.fx-sum__p { flex-basis: 100%; margin: 0; color: var(--body); }
.fx-stats--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fx-card .fx-state { align-self: flex-start; }
.fx-table-wrap { overflow-x: auto; }
.fx-table-wrap .fx-table { min-width: 560px; }
.fx-table td { vertical-align: top; }
.fx-url { color: var(--ink); text-decoration: none; word-break: break-all; }
.fx-url:hover { color: var(--brand); text-decoration: underline; }
.fx-code-sm { font-family: var(--mono); font-size: 12px; color: var(--body); white-space: pre-wrap; }
.fx-pre { margin: 0; padding: 14px 16px; background: var(--surface-2); color: var(--ink); font-family: var(--mono); font-size: 13px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; overflow-x: auto; }
.fx-pre--tall { max-height: 520px; overflow-y: auto; }
.fx-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-checks { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.fx-checks li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--rule-faint); }
.fx-checks li > i { font-style: normal; font-weight: 700; }
.fx-checks .is-pass > i { color: var(--pos); }
.fx-checks .is-fail > i { color: var(--neg); }
.fx-checks li > div { display: flex; flex-direction: column; gap: 2px; }
.fx-checks b { color: var(--ink); }
.fx-fix { color: var(--ink); font-size: 14px; }
.fx-fix::before { content: 'Fix: '; font-weight: 600; color: var(--brand); }
.fx-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.fx-group__h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.fx-group__h b { color: var(--ink); }
.fx-group__list { margin: 0; padding: 0; list-style: none; font-size: 14px; color: var(--body); display: flex; flex-direction: column; gap: 4px; }
.fx-form--area { flex-direction: column; max-width: 760px; }
.fx-form--area textarea { width: 100%; min-height: 180px; padding: 12px 14px; border: 0; font: inherit; font-size: 15px; color: var(--ink); background: transparent; resize: vertical; }
.fx-form--area textarea:focus { outline: 0; }
.fx-form__bar { display: flex; align-items: center; gap: 12px; padding: 0 0 0 10px; }
.fx-form__bar .fx-count { margin-right: auto; }
.fx-seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-2); }
.fx-seg button { padding: 6px 12px; border: 0; background: transparent; font: inherit; font-size: 14px; color: var(--body); cursor: pointer; border-radius: var(--r-sm); }
.fx-seg button[aria-checked="true"] { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 0 0 1px var(--rule); }
.fx-seg button:focus-visible { outline: none; box-shadow: var(--focus); }
.fx-seg--in { align-self: center; flex: none; }
.fx-hub__h { margin: 0 0 12px; color: var(--ink); }
.fx-hub + .fx-hub { padding-top: 0; }
@media (max-width: 900px) {
  .fx-stats--3, .fx-groups { grid-template-columns: minmax(0, 1fr); }
  .fx-form__bar { flex-wrap: wrap; padding: 8px; }
}
@media (max-width: 560px) {
  .fx-seg--in { align-self: stretch; }
  .fx-seg--in button { flex: 1; }
}
.fx-card > .btn { align-self: flex-start; }
@media (min-width: 1101px) { .fx-hub .fx-hub__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
