* { box-sizing: border-box }
:root { color-scheme: dark; --ink: #f4efea; --muted: #c0b4ae; --rust: #ff976d; --border: #473637 }
body { margin: 0; background: radial-gradient(ellipse at 82% 12%, #382127, #171518 50%); color: var(--ink); min-height: 100vh; font: 1rem/1.55 system-ui,sans-serif }
.site-header { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: .8rem 1.5rem; flex-wrap: wrap; background: #171417; padding: .85rem max(24px, calc((100% - 1082px) / 2)); border-bottom: 1px solid var(--border) }
#tabs { padding: 0; gap: .5rem; border: 0 }
#tabs details { position: relative }
#tabs summary { cursor: pointer; list-style: none; padding: .45rem .7rem; border: 1px solid var(--border); border-radius: 7px; color: var(--ink) }
#tabs summary::after { content: " ▾"; color: var(--rust) }
#tabs summary::-webkit-details-marker { display: none }
#tabs details[open] > summary, #tabs details:has(a[aria-current="page"]) > summary { border-color: #b66f5e; color: #ffae8f }
#tabs details > div { position: absolute; top: calc(100% + .45rem); right: 0; min-width: 13rem; padding: .35rem; background: #242025; border: 1px solid var(--border); border-radius: 9px; box-shadow: 0 12px 28px #090809b3 }
#tabs a { display: block }
.news-story { grid-column: 1 / -1; padding: clamp(1.3rem, 4vw, 3rem); border-top: 4px solid var(--rust); background: linear-gradient(125deg, #302127, #1e1a20); }
.news-story > p:first-child { color: var(--rust); font-size: .82rem; font-weight: 750; letter-spacing: .13em; text-transform: uppercase }
.news-story > h2 { margin: .45rem 0; max-width: 22ch; font: 700 clamp(1.8rem, 5vw, 3.4rem)/1.08 Georgia, serif }
.news-story > p:nth-child(3) { color: #f3bcaa; font-weight: 650; border-bottom: 1px solid var(--border); padding-bottom: .8rem }
.news-story > p:last-child { max-width: 66ch; line-height: 1.65 }
a { color: var(--rust) }
.logo img { display: block; width: clamp(124px, 16vw, 164px); height: auto }
main { max-width: 1130px; padding: 0 24px 5rem; margin: auto }
.intro { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: end; min-height: clamp(235px, 34vw, 400px); margin: 1rem 0 1.5rem; padding: clamp(1.15rem, 4vw, 3rem); padding-bottom: clamp(3rem, 5vw, 3.8rem); border: 1px solid #76504c; border-radius: 14px; background: linear-gradient(90deg, #160f19e8 0%, #170f1ab3 37%, #140e1826 100%), url('/nso-hero.png') 62% center / cover, #2a1a28 }
.intro h1 { font-family: Georgia, serif; font-size: clamp(2.15rem, 7vw, 5.4rem); letter-spacing: -.045em }
.intro p { color: #f0dcd4; margin-bottom: 0 }
.watermark { position: absolute; bottom: 4%; left: 2%; width: clamp(96px, 22vw, 210px); height: auto; filter: drop-shadow(0 2px 3px #120a13) drop-shadow(0 1px 6px #120a13); }
@media (max-width: 520px) {
  .site-header, main { padding-inline: 14px }
  #tabs { width: 100% }
  #tabs details > div { left: 0; right: auto }
  #tabs details:last-child > div { left: auto; right: 0 }
  .intro { background-position: 68% center }
}
h1 { margin: 0; font-size: clamp(2.8rem, 9vw, 6rem); letter-spacing: -.065em; line-height: 1 }
p { margin: .65rem 0; color: var(--muted) }
label { display: block; margin-bottom: .35rem; font-weight: 650 }
input { color: var(--ink); font: inherit; background: #242025; border: 1px solid #71524f; border-radius: 8px; width: min(100%, 600px); padding: .75rem }
nav { display: flex; flex-wrap: wrap; gap: .4rem; padding: 1.5rem 0 .65rem; border-bottom: 1px solid var(--border) }
nav a { border-radius: 6px; padding: .4rem .66rem; color: var(--muted); text-decoration: none }
nav a:hover, nav a[aria-current="page"] { color: #ffae8f; background: #4b2b2a }
#content { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(300px, 100%),1fr)); gap: .8rem; margin-top: 1rem; align-items: start }
article { background: #242025; border: 1px solid var(--border); border-radius: 12px; padding: 1.15rem }
article h2 { margin: 0 0 .45rem }
h3 { font-size: 1rem; margin: .75rem 0 .25rem; color: var(--rust) }
ul { padding-left: 1.2rem; margin: .3rem 0 .75rem }
article p { white-space: pre-line }

#elements { padding: .65rem 0; border-bottom: 0 }
#elements[hidden] { display: none }
#elements button { font: inherit; color: var(--muted); background: #242025; border: 1px solid var(--border); border-radius: 7px; padding: .35rem .7rem; cursor: pointer }
#elements button:hover, #elements button[aria-pressed="true"] { color: #ffb79b; border-color: #ae6d57; background: #492d2c }
.jutsu { border-top: 3px solid var(--element, #ff976d); min-height: 12rem }
[data-element="Suiton"] { --element: #7edfff }
[data-element="Doton"] { --element: #d8ac7a }
[data-element="Fuuton"] { --element: #a6efd4 }
[data-element="Katon"] { --element: #ff7968 }
[data-element="Raiton"] { --element: #f7d477 }
[data-element="Taijutsu"] { --element: #ffab91 }
[data-element="Velocidade"] { --element: #c9adff }
[data-element="Genjutsu"] { --element: #f78fca }
[data-element="Fuuinjutsu"] { --element: #8de0c2 }
[data-element="Medicina"] { --element: #b6ed86 }
#elements button[data-element]:not([data-element=""]) {
  color: var(--element);
  border-color: color-mix(in srgb, var(--element) 55%, var(--border));
  background: color-mix(in srgb, var(--element) 12%, #242025);
}
#elements button[data-element]:not([data-element=""]):is(:hover,[aria-pressed="true"]) {
  border-color: var(--element);
  background: color-mix(in srgb, var(--element) 25%, #242025);
}
.jutsu[data-element] {
  background: linear-gradient(160deg, color-mix(in srgb, var(--element) 12%, #242025), #242025 75%);
}
.rank-group { grid-column: 1 / -1; margin-bottom: 1rem }
.rank-group > h2 { margin: 0 0 .75rem; padding-bottom: .45rem; border-bottom: 1px solid var(--border); color: var(--rust); font-size: 1.15rem }
.rank-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: .8rem }
.rank-grid .jutsu { display: flex; flex-direction: column; min-width: 0 }
.jutsu p { margin: .35rem 0 }
.jutsu .jutsu-quest { margin-top: auto; padding-top: .85rem }
.jutsu p strong { color: var(--ink) }
.jutsu > div { color: var(--element); font-size: .83rem; font-weight: 750; margin-bottom: .35rem }
.jutsu h2 { font-size: 1.25rem; line-height: 1.25 }
.jutsu summary { color: var(--element); cursor: pointer; padding: .22rem 0 }
.jutsu img { display: block; margin-top: .65rem; width: 100%; height: auto; border-radius: 6px; image-rendering: pixelated }
.kuchiyose { border-top: 3px solid #8de0c2 }
.kuchiyose details { border-top: 1px solid var(--border); padding: .6rem 0 }
.kuchiyose summary { color: #a8f2d6; font-weight: 700; cursor: pointer }
.kekkei-card { grid-column: 1 / -1; border-top: 3px solid #f78fca }
.kekkei-menu { grid-column: 1 / -1; padding-top: 0 }
.kekkei-menu a { border: 1px solid var(--border) }
.kekkei-banner { display: block; width: 100%; height: auto; border-radius: 8px; margin-bottom: 1rem }
.kekkei-artwork { position: relative; aspect-ratio: 3 / .88; overflow: hidden; border-radius: 8px; margin-bottom: 1rem }
.kekkei-artwork .kekkei-banner { margin: 0; border-radius: 0 }
.kekkei-title-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap }
.kekkei-section { margin-top: 1rem }
.kekkei-section h3 { color: #ff9dad; font-size: 1.18rem }
.kekkei-seal[data-seal="lua"] { --seal-accent: #d4acff }
.kekkei-seal[data-seal="terra"] { --seal-accent: #d9cb89 }
.kekkei-seal[data-seal="koori"] { --seal-accent: #91dfff }
.kekkei-seal[data-seal="uzumaki"] { --seal-accent: #ffad86 }
.kekkei-seal[data-seal="byakugan"] { --seal-accent: #c7c8ff }
.kekkei-seal[data-seal="portoes-de-chakra"] { --seal-accent: #ff8d83 }
.kekkei-seal[data-seal="kugutsu"] { --seal-accent: #86e5be }
.kekkei-seal { border-top-color: var(--seal-accent) }
.kekkei-seal .kekkei-section h3 { color: var(--seal-accent) }
.kekkei-seal .kekkei-entry:not([data-accent="1"],[data-accent="2"],[data-accent="3"],[data-accent="4"]) { --kg-accent: var(--seal-accent) }
.kekkei-field-label { display: block; color: var(--muted); font-size: .75rem }
.kekkei-entry { display: grid; grid-template-columns: minmax(7rem, 11rem) 1fr; gap: .45rem; padding: .6rem .75rem; border-left: 3px solid var(--kg-accent, #ff9dad); background: color-mix(in srgb, var(--kg-accent, #ff9dad) 9%, #242025); border-radius: 4px }
.kekkei-entry strong { color: var(--kg-accent, #ff9dad) }
.kekkei-entry[data-accent="1"], .kekkei-entry[data-accent="Protetor"] { --kg-accent: #9ddcff }
.kekkei-entry[data-accent="2"], .kekkei-entry[data-accent="Poder"] { --kg-accent: #ffae83 }
.kekkei-entry[data-accent="3"], .kekkei-entry[data-accent="Hipnotizador"] { --kg-accent: #d4acff }
.kekkei-entry[data-accent="4"], .kekkei-entry[data-accent="Percepção"] { --kg-accent: #f8d77e }
@media (max-width: 520px) { .kekkei-entry { grid-template-columns: 1fr } }
.kekkei-card h3 { border-top: 1px solid var(--border); padding-top: .65rem }
