body.portal { line-height: 1.6; }
.hn-shell { max-width: 900px; margin: 0 auto; padding: 24px 16px 56px; }
.hn-h1-sub { display: block; margin-top: 4px; color: var(--muted); font-size: .55em; font-weight: 700; letter-spacing: 0; }
.hn-intro h1 { margin-bottom: 12px; }
.hn-intro .lead { margin-bottom: 16px; font-size: 17px; }
.hn-tool { margin: 22px 0 36px; padding: 16px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.hn-title { margin: 0 0 10px; font-size: 22px; }
.hn-chips, .hn-edit, .hn-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hn-chip { min-width: 44px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-soft); color: var(--text); font-size: 14px; font-weight: 700; cursor: pointer; touch-action: manipulation; }
.hn-chip:hover:not(:disabled) { border-color: var(--accent); }
.hn-chip:disabled { opacity: .45; cursor: default; }
.hn-chip[aria-pressed="true"], .hn-chip-strong { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Three pegs of fixed height (room for 8 disks plus one lifted), so nothing below moves. */
.hn-pegs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 14px 0 8px; }
.hn-peg { position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 230px; padding: 0 0 4px; border: 0; border-radius: 12px; background: transparent; cursor: pointer; touch-action: manipulation; }
.hn-peg::before { content: ""; position: absolute; bottom: 28px; left: 50%; width: 8px; height: 180px; margin-left: -4px; border-radius: 4px 4px 0 0; background: #8a6a3d; }
.hn-peg::after { content: ""; position: absolute; bottom: 22px; left: 4%; right: 4%; height: 8px; border-radius: 4px; background: #6b4f2a; }
.hn-peg:focus-visible { outline: 2px solid var(--accent); }
.hn-peg.hn-from { background: rgb(28 126 214 / .12); }
.hn-peg.hn-to { background: rgb(47 158 68 / .14); }
.hn-stack { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; width: 100%; margin-bottom: 26px; }
.hn-disk { display: block; height: 20px; width: calc(22% + 76% * var(--w) / var(--n)); border-radius: 10px; background: hsl(calc(var(--w) * 41deg) 70% 55%); box-shadow: inset 0 -3px 0 rgb(0 0 0 / .18); }
.hn-disk.hn-lifted { transform: translateY(-26px); box-shadow: 0 4px 8px rgb(0 0 0 / .3); }
.hn-peg-name { position: absolute; bottom: 0; color: var(--muted); font-size: 13px; font-weight: 800; }
.hn-count { margin: 0; color: var(--text); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hn-status { min-height: 3.2em; margin: 8px 0; color: var(--text); font-size: 14px; }
.hn-edit { margin-bottom: 12px; }
.hn-solve { width: 100%; font-size: 16px; }

.hn-result { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); scroll-margin-top: 12px; }
.hn-result:focus { outline: none; }
.hn-result-title { margin: 0 0 8px; font-size: 22px; }
.hn-note { margin: 0 0 10px; font-size: 14px; }
.hn-copy-status { flex-basis: 100%; margin: 0; color: var(--muted); font-size: 13px; }
.hn-copy-status:empty { display: none; }
.hn-steps { max-height: 280px; margin: 12px 0 0; padding-left: 2.6em; overflow: auto; font-size: 14px; }
.hn-steps .hn-done { color: var(--muted); text-decoration: line-through; }
.hn-steps .hn-current { font-weight: 800; }

.hn-article h2 { margin: 30px 0 12px; font-size: 24px; }
.hn-article li { margin-bottom: 8px; color: var(--muted); }
.hn-article li strong { color: var(--text); }
.hn-faq details { padding: 12px 0; border-bottom: 1px solid var(--line); }
.hn-faq summary { color: var(--text); font-weight: 750; cursor: pointer; }
.hn-faq details p { margin: 8px 0 0; }
.hn-cta { margin-top: 32px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.hn-cta h2 { margin-top: 0; }
.hn-cta .text-link { color: var(--accent-strong); }
.hn-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0; }
.hn-footer { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

@media (min-width: 720px) {
  .hn-shell { padding: 36px 24px 64px; }
  .hn-tool { padding: 22px; }
  .hn-peg { height: 250px; }
  .hn-disk { height: 22px; }
}
