/* 随轩 · 改版预览 · the house (首页、主题页)
   A plain lime-plaster hall; the colour comes from the eight rooms hanging on the wall. */

/* ---------- hall: the hero ---------- */
.hall { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; padding: 64px 0 40px; }
.hall__mark { margin-left: -14px; }
.hall__mark img { width: min(470px, 100%); height: auto; }
.hall__tag { margin-top: 10px; font-family: var(--f-disp); font-size: 28px; line-height: 1.3; letter-spacing: .1em; }
.hall__lede { margin-top: 18px; max-width: 25em; font-size: 17px; line-height: 1.85; color: var(--muted); }
.hall__lede b { font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.hall__acts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- the wall of hanging boards (水牌) ---------- */
.wall { position: relative; padding-top: 22px; }
.wall__rail { position: absolute; top: 0; left: -10px; right: -10px; height: 14px; border-radius: 3px; background: linear-gradient(#6A4C39, #3A281D); box-shadow: 0 7px 12px -7px rgba(0, 0, 0, .55); }
.wall__rail::before, .wall__rail::after { content: ""; position: absolute; top: 14px; width: 10px; height: 22px; background: #3A281D; border-radius: 0 0 3px 3px; }
.wall__rail::before { left: 26px; } .wall__rail::after { right: 26px; }
.wall__cap { margin-top: 18px; font-size: 14px; color: var(--muted); text-align: right; }

/* ---------- latest posts ---------- */
.fresh__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 26px; align-items: stretch; }
.fresh__grid .card--lead { grid-column: span 2; grid-row: span 2; }
.card--lead .card__img { aspect-ratio: 4 / 3; }
.card--lead .card__t { font-size: calc(var(--sk-fs) + 9px); line-height: 1.3; }
.card--lead .card__x { -webkit-line-clamp: 4; font-size: 15px; }
.card--lead .card__body { padding: 18px 20px 20px; gap: 10px; }
/* the four cards beside the lead: two lines of the text, and the picture takes whatever height is left, so no card ends in a blank */
.card--side .card__x { -webkit-line-clamp: 2; font-size: 13.5px; line-height: 1.7; }
@container yh (min-width: 761px) {
  .fresh__grid .card--side .card__img, .fresh__grid .card--side .card__pat { flex: 1 1 0; min-height: 118px; aspect-ratio: auto; }
  .fresh__grid .card--side .card__body { flex: 0 0 auto; }
  .fresh__grid .card--side .card__d { margin-top: 2px; }
}

/* ---------- on this day ---------- */
.otd__line { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0 18px; padding-top: 30px; }
.otd__line::before { content: ""; position: absolute; top: 9px; left: 0; right: 0; height: 2px; background: repeating-linear-gradient(90deg, var(--ink) 0 6px, transparent 6px 10px); opacity: .5; }
.otd__line li { position: relative; }
.otd__line li::before { content: ""; position: absolute; top: -27px; left: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--ink); }
.otd__line a { display: grid; gap: 8px; text-decoration: none; }
.otd__y { font-family: var(--f-disp); font-size: 30px; line-height: 1; }
.otd__y small { font-family: var(--f-ui); font-size: 12.5px; color: var(--muted); margin-left: 6px; }
.otd__t { font-size: 15px; line-height: 1.6; text-wrap: pretty; }
.otd__line a:hover .otd__t { text-decoration: underline; text-underline-offset: 4px; }
.otd__line .bdg { justify-self: start; }

/* ---------- the seven sets: cloth slipcases, each with its title slip and a print of its picture ---------- */
.sets__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px 24px; align-items: stretch; }
.sc {
  --cloth: #3E3B36; --cloth2: #2A2824; --slip: #F4EEDD;
  position: relative; display: flex; min-width: 0; padding: 12px 12px 12px 54px;
  color: var(--ink); text-decoration: none; border-radius: 4px 4px 3px 3px;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .045) 0 2px, transparent 2px 4px),
    repeating-linear-gradient(-45deg, rgba(0, 0, 0, .07) 0 2px, transparent 2px 4px),
    linear-gradient(90deg, var(--cloth2), var(--cloth) 9%, var(--cloth) 92%, var(--cloth2));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .08), 0 22px 30px -22px rgba(30, 20, 10, .6);
}
.sc--feat { grid-column: span 2; }
.sc__slip {
  position: absolute; top: 14px; left: 12px; width: 30px; max-height: calc(100% - 28px); padding: 12px 0; overflow: hidden;
  background: var(--slip); box-shadow: inset 0 0 0 1px rgba(90, 62, 45, .35), inset 0 0 0 3px var(--slip), inset 0 0 0 4px rgba(90, 62, 45, .25), 0 1px 2px rgba(0, 0, 0, .3);
}
.sc__slip b { display: block; margin: 0 auto; writing-mode: vertical-rl; font-family: var(--f-serif); font-weight: 900; font-size: 16px; line-height: 1; letter-spacing: .14em; color: #2A2620; white-space: nowrap; }
.sc__slip .tcy { text-orientation: upright; letter-spacing: 0; }
:lang(en) .sc__slip b { font-size: 12.5px; letter-spacing: .03em; }
.sc__clasp { position: absolute; top: 0; bottom: 0; right: -4px; width: 10px; }
.sc__clasp i { position: absolute; right: 0; width: 10px; height: 18px; border-radius: 2px; background: linear-gradient(#F3EAD6, #D5C8AE); box-shadow: 0 1px 2px rgba(0, 0, 0, .45); }
.sc__clasp i:first-child { top: 24%; }
.sc__clasp i:last-child { bottom: 24%; }
.sc__face {
  position: relative; display: flex; flex-direction: column; flex: 1; min-width: 0;
  background: #F7F2E6; box-shadow: 0 1px 2px rgba(0, 0, 0, .3), inset 0 0 0 1px rgba(90, 62, 45, .12);
  transition: transform .35s cubic-bezier(.3, 1.3, .5, 1), box-shadow .3s;
}
.sc:hover .sc__face, .sc:focus-visible .sc__face { transform: translateY(-5px); box-shadow: 0 12px 20px -10px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(90, 62, 45, .12); }
.sc__img { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 1px solid rgba(90, 62, 45, .16); background: #EDE6D6; }
.sc__img img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.92); }
.sc__body { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 12px 14px 15px; }
.sc__n { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sc__d { font-family: var(--f-serif); font-size: 14.5px; line-height: 1.75; color: #3A342C; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
/* the set that grew last: its picture on the right, room for what just came in */
.sc--feat .sc__face { flex-direction: row-reverse; }
.sc--feat .sc__img { flex: 0 0 54%; aspect-ratio: auto; border-bottom: 0; border-left: 1px solid rgba(90, 62, 45, .16); }
.sc--feat .sc__body { padding: 18px 20px 18px; gap: 10px; }
.sc--feat .sc__d { font-size: 16.5px; line-height: 1.8; -webkit-line-clamp: 5; }
.sc__new { display: grid; gap: 3px; margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(42, 38, 32, .14); }
.sc__new em { font-style: normal; font-size: 12.5px; letter-spacing: .06em; color: #A72D27; }
.sc__nt { font-family: var(--f-serif); font-weight: 700; font-size: 15px; line-height: 1.55; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sc__new time { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sc--indigo { --cloth: #2C3F6B; --cloth2: #1F2D4F; }
.sc--navy { --cloth: #1D2B53; --cloth2: #121C3B; }
.sc--ink { --cloth: #3E3B36; --cloth2: #2A2824; }
.sc--oxblood { --cloth: #6A2328; --cloth2: #4E171B; }
.sc--cinnabar { --cloth: #A8382B; --cloth2: #84291F; }
.sc--ochre { --cloth: #B07C2E; --cloth2: #8D6222; }
.sc--linen { --cloth: #9C8A70; --cloth2: #7E6E57; }
@container yh (max-width: 1100px) {
  .sets__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sc--feat { grid-column: 1 / -1; }
}

/* ---------- topics page ---------- */
.tp-head { padding: 64px 0 8px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end; }
.tp-head h1 { font-family: var(--f-disp); font-weight: 400; font-size: 64px; line-height: 1.05; letter-spacing: .08em; }
.tp-head p { margin-top: 14px; max-width: 32em; font-size: 17px; color: var(--muted); }
.tp-jump { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; max-width: 520px; }
.tp-jump .bdg { height: 30px; padding: 0 12px; font-size: 14px; }

.band { position: relative; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 48px; margin-top: 40px; padding: 44px 48px; color: var(--sk-ink); background: var(--sk-bg); }
.band__n { font-size: 14px; color: var(--sk-muted); font-variant-numeric: tabular-nums; }
.band__t { margin-top: 8px; font-family: var(--sk-ft); font-weight: var(--sk-fw); font-size: 46px; line-height: 1.15; }
.band__t a { text-decoration: none; }
.band__d { margin-top: 14px; font-size: 16px; line-height: 1.8; color: var(--sk-muted); max-width: 22em; }
.band__go { display: inline-flex; align-items: center; min-height: 44px; margin-top: 22px; padding: 0 18px; border: 1.5px solid currentColor; text-decoration: none; font-size: 15px; }
.band__go:hover { background: var(--sk-ink); color: var(--sk-bg); }
.band__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px; }
.band__cols h3 { font-size: 14px; font-weight: 600; color: var(--sk-acc); margin-bottom: 10px; }
.band__cols li + li { border-top: 1px solid color-mix(in srgb, var(--sk-ink) 14%, transparent); }
.band__cols a { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; text-decoration: none; font-size: 15px; line-height: 1.55; }
.band__cols a:hover span { text-decoration: underline; text-underline-offset: 3px; }
.band__cols time { flex: none; font-size: 13px; color: var(--sk-muted); font-variant-numeric: tabular-nums; }

.band.sk-phil { border: 1px solid rgba(28, 26, 23, .35); background-image: url("../img/tex-paper.png"); }
.band.sk-phil .band__t { font-family: var(--f-brush); font-weight: 400; font-size: 64px; letter-spacing: .02em; }
.band.sk-phil::after { content: "古雴"; position: absolute; top: 44px; right: 48px; width: 40px; padding: 6px 0; background: #A72D27; color: #F6EFE6; font: 17px/1.05 var(--f-brush); text-align: center; writing-mode: vertical-rl; border-radius: 3px; transform: rotate(3deg); }
.band.sk-phil .band__cols { padding-right: 70px; }
.band.sk-hps { background: linear-gradient(#6A2328, #4E171B); --sk-ink: #F4ECDD; --sk-muted: #DCC9B6; --sk-acc: #E2C98F; border: 4px double #B08D57; }
.band.sk-hps .band__t { font-family: var(--f-serif); color: #EADBB4; }
.band.sk-hps .band__cols { background: #F5F3EC; color: #1E211E; padding: 22px 26px; outline: 1px solid #9A7A3A; outline-offset: -7px; --sk-acc: #7A2A2E; --sk-muted: #5D615A; }
.band.sk-hps .band__cols li + li { border-top-color: rgba(30, 33, 30, .14); }
.band.sk-hps .band__n { font-family: "EB Garamond", var(--f-serif); font-style: italic; font-size: 16px; }
.band.sk-cult { background: #FFD23F; border: 3px solid #141414; box-shadow: 10px 10px 0 #141414; }
.band.sk-cult .band__t { font-size: 60px; line-height: 1.02; }
.band.sk-cult .band__cols { background: #FFFFFF; padding: 22px 26px; border: 2.5px solid #141414; transform: rotate(.6deg); }
.band.sk-cult .band__cols h3 { display: inline-block; background: #D7352A; color: #FFFFFF; padding: 0 8px; }
.band.sk-ai { border: 1px solid #C9D0D6; }
.band.sk-ai::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 10px; background: repeating-linear-gradient(-45deg, #F2541B 0 9px, #121619 9px 18px); }
.band.sk-ai .band__n, .band.sk-ai .band__cols time { font-family: var(--f-mono); }
.band.sk-ai .band__t { letter-spacing: -.02em; }
.band.sk-web3 { margin-inline: 4px; box-shadow: 0 -6px 0 #FFF1E8, 0 6px 0 #FFF1E8, -6px 0 0 #FFF1E8, 6px 0 0 #FFF1E8; }
.band.sk-web3 .band__t { font-family: var(--f-pixel); font-weight: 400; font-size: 48px; color: #FFA300; line-height: 1.25; }
.band.sk-web3 .band__n, .band.sk-web3 .band__cols h3, .band.sk-web3 .band__cols time { font-family: var(--f-pixel); font-size: 12px; }
.band.sk-web3 .band__cols h3 { color: #29ADFF; }
.band.sk-web3 .band__go { border: 0; background: #FFA300; color: #1D2B53; font-family: var(--f-pixel); font-size: 12px; box-shadow: 0 4px 0 #AB5236; }
.band.sk-teach { border: 12px solid #7B5232; background-image: linear-gradient(rgba(36, 69, 58, .62), rgba(36, 69, 58, .62)), url("../img/tex-chalk.png"); }
.band.sk-teach .band__t { font-size: 66px; line-height: 1; }
.band.sk-teach .band__cols { background: #FCFCF9; color: #22302B; padding: 18px 24px; background-image: repeating-linear-gradient(transparent 0 33px, #C8D6E6 33px 34px); box-shadow: 0 10px 20px rgba(0, 0, 0, .35); transform: rotate(-.7deg); --sk-acc: #D9273E; --sk-muted: #6D7A74; }
.band.sk-teach .band__cols li + li { border-top-color: transparent; }
.band.sk-life { background: radial-gradient(#D2CEC5 1.2px, transparent 1.5px) 0 0 / 16px 16px, #FBFAF7; border: 1px solid rgba(46, 43, 40, .1); }
.band.sk-life .band__t { font-size: 54px; }
.band.sk-life .band__t a { background: linear-gradient(transparent 60%, #F6E39B 60% 92%, transparent 92%); }
.band.sk-life .band__cols { background: #FFFFFF; padding: 22px 26px; box-shadow: 0 12px 24px -10px rgba(46, 43, 40, .25); transform: rotate(.5deg); }
.band.sk-site { padding: 0; border: 2px solid; border-color: #FFFFFF #404040 #404040 #FFFFFF; display: block; }
.band.sk-site::before { content: "站务与琐事 - 随轩"; display: block; height: 28px; padding: 0 10px; background: linear-gradient(90deg, #0A246A, #3A6EA5); color: #FFFFFF; font: 12px/28px var(--f-pixel); }
.band.sk-site .band__in { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 48px; margin: 4px; padding: 36px 40px; background: #FFFFFF; border: 2px solid; border-color: #808080 #FFFFFF #FFFFFF #808080; }
.band.sk-site .band__t { font-family: var(--f-pixel); font-weight: 400; font-size: 48px; }
.band.sk-site .band__cols a span { color: #0000EE; text-decoration: underline; }
.band.sk-site .band__go { border: 2px solid; border-color: #FFFFFF #404040 #404040 #FFFFFF; background: #C3C3C3; color: #000000; font-family: var(--f-pixel); font-size: 12px; }

/* ---------- phone ---------- */
@container yh (max-width: 760px) {
  .hall { grid-template-columns: minmax(0, 1fr); gap: 36px; padding: 32px 0 8px; }
  .hall__mark img { width: 290px; }
  .hall__tag { font-size: 22px; }
  .hall__lede { font-size: 16px; }
  .draw { min-height: 0; }
  .wall { margin-inline: -16px; padding-inline: 16px; overflow-x: auto; scrollbar-width: none; }
  .wall__rail { left: 0; right: auto; width: 700px; }
  .plaques { grid-template-columns: repeat(8, 72px); width: max-content; gap: 10px; }
  .plq > a { height: 220px; }
  .plq__name { font-size: 18px; }
  .wall__cap { text-align: left; }
  .fresh__grid { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .fresh__grid .card--lead { grid-column: auto; grid-row: auto; }
  .card--lead .card__t { font-size: calc(var(--sk-fs) + 4px); }
  .otd__line { grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 0 0 0 26px; }
  .otd__line::before { top: 0; bottom: 0; left: 6px; right: auto; width: 2px; height: auto; background: repeating-linear-gradient(180deg, var(--ink) 0 6px, transparent 6px 10px); }
  .otd__line li::before { top: 6px; left: -26px; }
  .otd__y { font-size: 24px; }
  .sets__grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(80%, 300px); gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -16px; padding: 4px 16px 20px; scrollbar-width: none; }
  .sc { scroll-snap-align: start; }
  .sc--feat { grid-column: auto; }
  .sc--feat .sc__face { flex-direction: column; }
  .sc--feat .sc__img { flex: none; aspect-ratio: 16 / 10; border-left: 0; border-bottom: 1px solid rgba(90, 62, 45, .16); }
  .sc--feat .sc__body { padding: 12px 14px 15px; gap: 6px; }
  .sc--feat .sc__d { font-size: 14.5px; line-height: 1.75; -webkit-line-clamp: 3; }
  .tp-head { grid-template-columns: minmax(0, 1fr); padding-top: 36px; }
  .tp-head h1 { font-size: 44px; }
  .tp-jump { justify-content: flex-start; }
  .band, .band.sk-site .band__in { grid-template-columns: minmax(0, 1fr); gap: 26px; padding: 28px 20px; }
  .band.sk-site { padding: 0; }
  .band__t { font-size: 36px; }
  .band.sk-phil .band__t { font-size: 48px; }
  .band.sk-phil .band__cols { padding-right: 0; }
  .band.sk-phil::after { top: 26px; right: 20px; }
  .band__cols { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}

/* ten sets: the one that grew last takes three of four places, so the shelf fills evenly */
.sc--feat { grid-column: span 3; }
.sc--teal { --cloth: #2E6461; --cloth2: #214B48; }
.sc--plum { --cloth: #5D3A57; --cloth2: #452A41; }
.sc--moss { --cloth: #55603A; --cloth2: #3F482A; }
@container yh (max-width: 1100px) { .sc--feat { grid-column: 1 / -1; } }
@container yh (max-width: 760px) { .sc--feat { grid-column: auto; } }

/* topics page: the four ways in */
.ways { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 30px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.ways li { min-width: 0; padding: 16px 20px 18px; }
.ways li + li { border-left: 1px solid var(--line); }
.ways li:first-child { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.ways a { display: block; margin: -16px -20px -18px; padding: 16px 20px 18px; color: inherit; text-decoration: none; }
.ways b { display: block; font-family: var(--f-disp); font-weight: 400; font-size: 26px; line-height: 1.3; letter-spacing: .06em; }
.ways span { display: block; margin-top: 4px; font-size: 14px; line-height: 1.7; color: var(--muted); }
.ways a:hover b { color: var(--seal); }
@container yh (max-width: 760px) {
  .ways { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ways li:nth-child(3) { border-left: 0; }
  .ways li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .ways b { font-size: 22px; }
}
