.ms { --soft: #edf3f5; --rule: #c9d2d8; color: var(--ink); }
.ms h1, .ms h2, .ms h3, .ms p { margin: 0; }
.ms h1 { font: italic 800 clamp(2.45rem,5vw,4.5rem)/1.04 var(--display); }
.ms h2 { font-size: clamp(1.25rem,2.25vw,1.7rem); line-height: 1.18; }
.ms-over, .ms-result-meta { display: block; color: #325777; font-weight: 780; font-size: .77rem; letter-spacing: .085em; text-transform: uppercase; }
.ms-mast { display: grid; grid-template-columns: 1.1fr 1fr; overflow: hidden; position: relative; background: #102741; border: 2px solid #142640; border-radius: 12px; box-shadow: 0 4px 0 #172940; isolation: isolate; }
.ms-mast-copy { display: flex; flex-flow: column; align-items: flex-start; justify-content: center; padding: clamp(1.6rem,3.9vw,3.6rem); background: radial-gradient(ellipse at 0 100%,#224e72,transparent 76%); }
.ms-mast .ms-over { color: #ffda68; }
.ms-mast h1 { font-size: clamp(3.75rem,7.1vw,6.65rem); line-height: .97; color: white; margin: .38rem 0 .7rem; }
.ms-mast p { color: #f0f3f7; max-width: 42ch; line-height: 1.44; font-size: clamp(1rem,1.4vw,1.16rem); }
.ms-mast-art { position: relative; min-height: 275px; clip-path: polygon(8% 0,100% 0,100% 100%,0 100%); background: #edae2a; }
.ms-mast-art img { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: center 33%; clip-path: polygon(9% 0,100% 0,100% 100%,1% 100%); }
.ms-role, .ms-filters, .ms-actions, .ms-suggest { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ms-role { margin-top: 1.35rem; border: 1px solid #7891a6; border-radius: 8px; padding: .2rem; background: #091c32; gap: .15rem; }
.ms-role button { padding: .48rem .82rem; min-height: 40px; background: transparent; color: white; border: 0; border-radius: 5px; font-size: .88rem; font-weight: 700; }
.ms-role button[aria-pressed="true"] { background: #ffcf4b; color: #10243d; }
.ms-tiles { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .95rem; margin: 1.2rem 0; }
.ms-tile { display: flex; gap: .8rem; align-items: flex-start; padding: 1.08rem; background: #fff; border: 1px solid #bcc9d2; border-top: 4px solid var(--accent); border-radius: 8px; box-shadow: var(--print-shadow); }
.ms-tile-gold { --accent: #d29a18; --tint: #fff2c9; }
.ms-tile-teal { --accent: #197869; --tint: #d9f0e9; }
.ms-tile-red { --accent: #c3473c; --tint: #ffe5df; }
.ms-tile:hover { background: #fcfbf7; border-color: var(--accent); }
.ms-tile-mark, .ms-result-icon { display: inline-grid; flex: none; place-items: center; width: 40px; height: 40px; background: var(--tint); color: var(--ink); border-radius: 8px; }
.ms-tile strong, .ms-tile small { display: block; }
.ms-tile strong { font-size: clamp(1.01rem,1.45vw,1.28rem); line-height: 1.2; margin: .08rem 0 .38rem; }
.ms-tile small { color: var(--muted); font-size: .89rem; line-height: 1.35; }
.ms-find { display: grid; grid-template-columns: .85fr 1.35fr; align-items: center; gap: 1rem; padding: 1.35rem 1.45rem; background: var(--soft); border: 1px solid var(--rule); border-radius: 8px; }
.ms-find p, .ms-pagehead p, .ms-review-start p, .ms-how p { color: var(--muted); margin-top: .42rem; }
.ms-search-form { display: flex; gap: .55rem; align-items: stretch; }
.ms-searchbox { display: flex; align-items: center; gap: .6rem; min-width: 0; width: 100%; padding: 0 .8rem; border: 1px solid #889eac; border-radius: 6px; background: white; color: #426177; }
.ms-searchbox:focus-within { outline: 2px solid #1463a5; outline-offset: 2px; }
.ms-searchbox input { min-width: 0; width: 100%; border: 0; outline: none; padding: .67rem 0; background: transparent; color: var(--ink); }
.ms-btn, .ms-filters button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .56rem 1rem; font-size: .94rem; font-weight: 735; border-radius: 6px; border: 1px solid #b8c5cf; }
.ms-gold { background: var(--gold); border-color: #dda616; color: #142640; }
.ms-gold:hover:enabled, a.ms-gold:hover { background: #ffdc70; }
.ms-light, .ms-filters button { background: white; color: #183d61; }
.ms button:disabled:not([aria-pressed]) { background: #e2e6e9; color: #596875; border-color: #c6cdd2; }
.ms-browse { margin: 1.2rem 0; }
.ms-narrow, .ms-search-page { max-width: 870px; margin-inline: auto; }
.ms-pagehead { background: transparent; border: 0; padding: 1.3rem 0 1.45rem; }
.ms-pagehead h1 { margin: .4rem 0; }
.ms-pagehead p { max-width: 65ch; font-size: 1.05rem; }
.ms-filters { margin: 1rem 0; }
.ms-filters button { min-height: 40px; padding-inline: .9rem; font-size: .88rem; }
.ms-filters button[aria-pressed="true"] { background: #153953; color: white; border-color: #153953; }
.ms-suggest { padding: .9rem 0; font-size: .91rem; }
.ms-suggest span { font-weight: 700; }
.ms-suggest a { color: var(--blue); text-decoration: underline; text-underline-offset: .15rem; padding: .4rem; }
.ms-results-count { padding: .6rem 0; color: var(--muted); }
.ms-result { display: flex; gap: 1rem; padding: 1.05rem; background: white; border: 1px solid var(--rule); border-radius: 7px; margin: .5rem 0; }
.ms-result-icon { background: #e2edf5; }
.ms-practice { background: #e1efe5; }
.ms-story { background: #ffebcb; }
.ms-film { background: #fce2de; }
.ms-result-meta { letter-spacing: .04em; }
.ms-result-meta span { text-transform: none; letter-spacing: 0; font-weight: 550; }
.ms-result h3 { font-size: 1.12rem; margin: .2rem 0; line-height: 1.3; }
.ms-result h3 a:hover { color: var(--blue); text-decoration: underline; }
.ms-result p, .ms-queue p { font-size: .94rem; color: var(--muted); }
.ms-empty, .ms-review-start, .ms-encounter, .ms-answer, .ms-queue, .ms-how { padding: clamp(1.1rem,2.6vw,1.8rem); border: 1px solid var(--rule); background: #fff; border-radius: 9px; margin-bottom: 1rem; }
.ms-review-start, .ms-learning { display: flex; gap: 1rem; align-items: center; justify-content: space-between; }
.ms-review-start { background: #e9f1f3; }
.ms-review-start .ms-btn { flex: none; }
.ms-queue ul { margin: 0; padding: 0; list-style: none; }
.ms-queue h2 { margin-bottom: .65rem; }
.ms-queue li { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .72rem 0; }
.ms-queue li+li { border-top: 1px solid var(--rule); }
.ms-queue li>span { flex: none; font-size: .88rem; font-weight: 700; color: #285777; }
.ms-how summary, .ms-answer summary { cursor: pointer; font-weight: 700; }
.ms-picture { display: flex; align-items: center; gap: .9rem; padding: 1rem; margin-bottom: 1rem; border: 1px solid #dbbf73; background: #fff5d6; border-radius: 8px; }
.ms-picture img { width: 48px; height: 48px; border-radius: 50%; }
.ms-scene { border-left: 4px solid #318575; background: #eef5f2; padding: 1.05rem; }
.ms-scene p { margin-top: .4rem; line-height: 1.65; }
.ms-encounter section { margin: 1.4rem 0; }
.ms-options { display: grid; gap: .5rem; margin: .8rem 0; }
.ms-options button { display: flex; align-items: baseline; gap: .7rem; text-align: start; color: var(--ink); border: 1px solid #adbdc9; border-radius: 6px; background: white; padding: .75rem .85rem; min-height: 46px; line-height: 1.4; }
.ms-options button b { color: var(--blue); }
.ms-options button[aria-pressed="true"] { background: #e6f1fa; border: 2px solid #225887; padding: calc(.75rem - 1px) calc(.85rem - 1px); }
.ms-options button:hover:enabled { background: #f2f6f8; }
.ms-answer { border-top: 4px solid #237462; }
.ms-answer h2 { margin: .8rem 0; }
.ms-answer dt { font-weight: 750; color: #244d64; }
.ms-answer dd { margin: 0 0 .9rem; }
.ms-answer details { margin: .8rem 0 1.2rem; }
.ms-answer details a, .ms-learning a { color: var(--blue); text-decoration: underline; }
.ms-learning { padding: 1rem 1.25rem; margin: 1rem 0; border: 1px solid #a7bcce; background: #eaf2f6; border-radius: 8px; flex-wrap: wrap; }
.ms-learning p { margin: .2rem 0 0; }
.ms-learning div { flex: 1; }
.ms-film-marker { color: #18496f; font-weight: 700; }
@media(max-width:980px) { .header-inner nav { gap: 1rem; } }
@media(max-width:750px) {
  .ms-tiles { gap: .6rem; }
  .ms-tile { display: block; }
  .ms-tile-mark { margin-bottom: .55rem; }
  .ms-find { grid-template-columns: 1fr; }
  .ms-mast-art { min-height: 240px; }
}
@media(max-width:580px) {
  .header-inner nav { gap: .7rem; max-width: 100%; overflow-x: auto; }
  .header-inner nav a { font-size: .8rem; }
  .ms-mast { grid-template-columns: 1fr; }
  .ms-mast-art { grid-row: 1; min-height: clamp(120px,38vw,175px); clip-path: none; border-bottom: 3px solid #f4b835; }
  .ms-mast-art img { clip-path: none; object-position: 50% 33%; }
  .ms-mast-copy { padding: 1.2rem; }
  .ms-mast h1 { font-size: 3.65rem; }
  .ms-role { margin-top: .8rem; }
  .ms-tiles { grid-template-columns: 1fr; margin: .85rem 0; }
  .ms-tile { display: flex; align-items: center; padding: .8rem .9rem; border-top: 1px solid #bcc9d2; border-left: 4px solid var(--accent); }
  .ms-tile-mark { margin: 0; }
  .ms-tile strong { margin-bottom: .2rem; }
  .ms-find { padding: 1rem; }
  .ms-searchbox { gap: .35rem; padding-inline: .5rem; }
  .ms-searchbox input { font-size: 1rem; }
  .ms-review-start { flex-direction: column; align-items: flex-start; }
  .ms-queue li { flex-direction: column; gap: .25rem; align-items: flex-start; }
  .ms-result { padding: .85rem; gap: .65rem; }
}
