/* Writing Tools: the four tools. Sizes come from the kit's variables so Big and easy scales them. */

/* Word count and Character count: the text on the left, the counts on the right; a phone shows the
   text, then the counts, then the settings. */
.wt { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); grid-template-areas: "in out" "set out" "priv out"; gap: 14px 24px; align-items: start; }
.wt-in { grid-area: in; min-width: 0; }
.wt-out { grid-area: out; min-width: 0; border: 1px solid var(--hx-line); border-radius: 16px; padding: 12px 16px; background: var(--hx-soft); }
.wt-set { grid-area: set; min-width: 0; display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; }
.wt-set > div { min-width: 0; }
.wt-set select { width: auto; max-width: 100%; padding-right: 8px; }
.wt-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 6px; }
.wt-head .hx-lab { margin: 0; }
.wt-clr { font-size: var(--hx-small); }
.wt-ta { display: block; height: calc(var(--hx-fs) * 1.5 * 6 + 24px); min-height: calc(var(--hx-fs) * 1.5 * 2 + 24px); padding: 10px 12px; resize: vertical; font-weight: 400; line-height: 1.5; font-variant-numeric: normal; }
.cc .wt-ta, .cs .wt-ta { height: calc(var(--hx-fs) * 1.5 * 4 + 24px); }
.wt-priv { grid-area: priv; margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap; }
.wt-priv .hx-note { margin: 0; flex: 1 1 16em; }
.wt-main { margin: 0 0 6px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.wt-main .hx-out { font-size: calc(var(--hx-out) * 1.3); }
.wt-unit { font-weight: 700; color: var(--hx-ink); }
.wt-dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; }
.wt-dl div { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; border-bottom: 1px solid #d9e2f3; padding: 2px 0; }
.wt-dl dt { color: var(--hx-muted); font-size: var(--hx-small); }
.wt-dl dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; }
.wt-out .hx-note { margin: 8px 0 0; }
.wt-lim { margin: 10px 0 0; }
.wt-lim[hidden], .wt-cus[hidden], [hidden] { display: none; }
.cc .wt-lim { margin: 0 0 10px; }
.lim-bar { height: 10px; border-radius: 99px; background: #d6deec; overflow: hidden; }
.lim-bar span { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--hx-accent); transition: width .15s; }
.lim-bar.over span { background: var(--hx-bad); }
.wt-limt { margin: 4px 0 0; font-size: var(--hx-small); font-weight: 700; }
.lim-bar.over + .wt-limt { color: var(--hx-bad); }
.wt-cus { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; }
.wt-cus input { width: 7em; }
.cc-set { display: block; }
.cc-set .hx-chips { margin: 0 0 10px; }
.cc-set .hx-btn { font-size: var(--hx-small); padding: 0 12px; }

/* Case: the text, the four choices, the result to copy. */
.cs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "in out" "pick out" "priv out"; gap: 12px 24px; align-items: start; }
.cs > .wt-in { grid-area: in; }
.cs-pick { grid-area: pick; }
.cs-out { grid-area: out; min-width: 0; border: 1px solid var(--hx-line); border-radius: 16px; padding: 12px 16px; background: var(--hx-soft); }
.cs-priv { grid-area: priv; }
.cs-chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cs-chips .hx-btn { font-size: var(--hx-small); padding: 0 8px; }
.cs-copy { margin-top: 10px; }
.cs-out > .hx-lab { margin: 0 0 2px; }
.cs-text { display: block; white-space: pre-wrap; overflow-wrap: anywhere; font-size: calc(var(--hx-fs) * 1.1); font-weight: 600; line-height: 1.45; min-height: 1.45em; max-height: 50vh; overflow-y: auto; }

/* Password: the password first and large, its settings beside it, the bits explained under it. */
.pw { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); grid-template-areas: "out set" "why set"; gap: 14px 28px; align-items: start; }
.pw-out { grid-area: out; min-width: 0; border: 1px solid var(--hx-line); border-radius: 16px; padding: 12px 16px; background: var(--hx-soft); }
.pw-out .hx-lab { margin: 0 0 4px; }
.pw-text { display: block; font: 700 calc(var(--hx-fs) * 1.45)/1.3 ui-monospace, "SF Mono", Menlo, Consolas, monospace; overflow-wrap: anywhere; word-break: break-all; color: var(--hx-ink); min-height: 1.3em; user-select: all; -webkit-user-select: all; }
.pw-act { display: flex; gap: 8px; margin: 10px 0 6px; flex-wrap: wrap; }
.pw-str { margin: 0; font-weight: 800; }
.pw-str[data-level="weak"] { color: var(--hx-bad); }
.pw-str[data-level="very-strong"], .pw-str[data-level="strong"] { color: var(--hx-good); }
.pw-set { grid-area: set; min-width: 0; display: grid; gap: 12px; }
.pw-why { grid-area: why; min-width: 0; }
.pw-why p { margin: 0 0 6px; }
.pw-kind .hx-btn { min-width: 8em; }
.pw-step { display: flex; gap: 6px; }
.pw-step .hx-in { width: 4.2em; text-align: center; }
.pw-step .hx-btn { padding: 0; font-size: calc(var(--hx-fs) * 1.2); }
.pw-set .hx-chips .hx-btn { font-size: var(--hx-small); }
.pw-more { margin-top: 8px; }
.hx-btn[aria-pressed="false"] { background: #fff; }

@media (max-width: 760px) {
  .wt { grid-template-columns: 1fr; grid-template-areas: "in" "out" "set" "priv"; gap: 10px; }
  .wt-out { padding: 10px 14px; }
  .wt-ta { height: calc(var(--hx-fs) * 1.5 * 4 + 24px); }
  .cc .wt-ta, .cs .wt-ta { height: calc(var(--hx-fs) * 1.5 * 3 + 24px); }
  .wt-dl { gap: 2px 14px; }
  .cs { grid-template-columns: 1fr; grid-template-areas: "in" "pick" "out" "priv"; gap: 8px; }
  .cs-pick > .hx-lab { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .cs-chips { grid-template-columns: auto auto auto auto; justify-content: start; gap: 6px; }
  .cs-long { display: none; }
  .cs-out { padding: 8px 14px 12px; }
  .pw-len { order: -1; }
  .pw { grid-template-columns: 1fr; grid-template-areas: "out" "set" "why"; gap: 12px; }
  .pw-out { padding: 10px 14px; }
  .pw-text { font-size: calc(var(--hx-fs) * 1.25); }
}
@media (prefers-reduced-motion: reduce) { .lim-bar span { transition: none; } }
/* The app's name is longer than Calculator's: on a narrow phone the header bar keeps one row. */
@media (max-width: 400px) { .hx-bar { column-gap: 10px; } .hx-id { font-size: 17px; gap: 8px; } }
