/*
  Skin Name: CleanOps Nova
  Description: Evidence-first infrastructure security blog skin for Tistory
  Version: 2.0.3
*/

:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #eef3f8;
  --surface-3: #e7edf5;
  --text: #0e1726;
  --muted: #607086;
  --line: #dce5ef;
  --brand: #0f9f91;
  --brand-deep: #08766d;
  --violet: #7157e8;
  --blue: #3f76e8;
  --amber: #d78b17;
  --danger: #dd4f57;
  --navy: #07111f;
  --navy-2: #0b1a2d;
  --shadow-sm: 0 10px 26px rgba(27, 45, 72, .07);
  --shadow: 0 24px 60px rgba(21, 38, 64, .11);
  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius: 22px;
  --wrap: 1240px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #08111e;
  --surface: #0e1a2a;
  --surface-2: #142235;
  --surface-3: #1a2b40;
  --text: #eef5ff;
  --muted: #97a8bd;
  --line: #25374c;
  --brand: #4dd5c5;
  --brand-deep: #74e4d7;
  --violet: #9a87ff;
  --blue: #79a5ff;
  --amber: #ffc565;
  --danger: #ff8188;
  --shadow-sm: 0 14px 30px rgba(0, 0, 0, .2);
  --shadow: 0 28px 70px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 8% 12%, color-mix(in srgb, var(--brand) 8%, transparent), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.72;
  letter-spacing: -.018em;
  overflow-wrap: break-word;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

svg {
  display: block;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 34%, transparent);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.wrap {
  width: min(var(--wrap), calc(100% - 48px));
  margin-inline: auto;
}

.screen-out {
  position: absolute;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  margin: -1px;
  white-space: nowrap;
}

.progress {
  position: fixed;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  z-index: 9999;
  pointer-events: none;
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #25d6c1, #6b80ff, #d875ff);
  box-shadow: 0 0 12px rgba(69, 216, 199, .7);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1200;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
}

.header-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin-right: auto;
}

.brand-mark,
.footer-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #eafffb;
  background: linear-gradient(145deg, #10b6a5, #3f67db 66%, #7555dc);
  box-shadow: 0 10px 24px rgba(34, 132, 174, .25);
}

.brand-mark {
  width: 43px;
  height: 43px;
  border-radius: 14px;
}

.brand-mark svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-text {
  display: grid;
  min-width: 0;
  line-height: 1.2;
}

.brand-text strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 850;
}

.brand-text em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.site-nav a {
  position: relative;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 680;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--text);
  background: var(--surface-2);
  transform: translateY(-1px);
}

.site-nav a.is-active::after {
  content: "";
  position: absolute;
  inset: auto 12px 4px;
  height: 2px;
  border-radius: 9px;
  background: var(--brand);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.icon-button,
.menu-toggle {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.icon-button:hover,
.menu-toggle:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--brand) 42%, var(--line));
  background: var(--surface-2);
}

.icon-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle .sun-icon {
  display: none;
}

[data-theme="dark"] .theme-toggle .sun-icon {
  display: block;
}

[data-theme="dark"] .theme-toggle .moon-icon {
  display: none;
}

.menu-toggle {
  display: none;
  padding: 0;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  display: block;
  margin: 2px auto;
  border-radius: 99px;
  background: currentColor;
  transition: transform .2s ease, opacity .2s ease;
}

.menu-toggle.is-open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 620px;
  display: grid;
  align-items: center;
  background:
    linear-gradient(112deg, rgba(6, 16, 31, .98), rgba(10, 24, 42, .96) 55%, rgba(15, 21, 48, .98)),
    var(--navy);
  color: #f5f9ff;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 100px;
  z-index: -1;
  background: linear-gradient(180deg, transparent, rgba(2, 9, 19, .38));
}

.hero-grid {
  position: absolute;
  inset: 0;
  z-index: -3;
  opacity: .28;
  background-image:
    linear-gradient(rgba(133, 179, 221, .13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(133, 179, 221, .13) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(90deg, #000, transparent 75%);
  mask-image: linear-gradient(90deg, #000, transparent 75%);
}

.hero-orb {
  position: absolute;
  z-index: -2;
  border-radius: 999px;
  filter: blur(2px);
  opacity: .7;
}

.hero-orb-a {
  width: 520px;
  height: 520px;
  top: -260px;
  left: 14%;
  background: radial-gradient(circle, rgba(30, 211, 190, .24), transparent 68%);
}

.hero-orb-b {
  width: 660px;
  height: 660px;
  right: -200px;
  bottom: -330px;
  background: radial-gradient(circle, rgba(111, 77, 231, .3), transparent 68%);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 500px;
  align-items: center;
  gap: clamp(48px, 7vw, 94px);
  padding-block: 82px;
}

.hero-copy {
  min-width: 0;
}

.hero-label,
.section-kicker,
.side-label {
  display: inline-flex;
  align-items: center;
  color: var(--brand);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.hero-label {
  color: #8df5e7;
}

.hero-label i,
.console-live i {
  width: 7px;
  height: 7px;
  display: inline-block;
  margin-right: 8px;
  border-radius: 50%;
  background: #4be5c9;
  box-shadow: 0 0 0 6px rgba(75, 229, 201, .1), 0 0 20px rgba(75, 229, 201, .8);
}

.hero h1 {
  margin: 20px 0 22px;
  font-size: clamp(48px, 5.4vw, 74px);
  line-height: 1.05;
  letter-spacing: -.065em;
  font-weight: 900;
}

.hero h1 span {
  color: transparent;
  background: linear-gradient(90deg, #6ff1df 5%, #7fa8ff 53%, #c595ff);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-copy > p {
  max-width: 650px;
  margin: 0;
  color: #b5c5d9;
  font-size: 18px;
  line-height: 1.75;
}

.hero-search {
  width: min(100%, 610px);
  min-height: 62px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  margin-top: 34px;
  padding: 8px 8px 8px 18px;
  border: 1px solid rgba(171, 210, 231, .22);
  border-radius: 17px;
  background: rgba(255, 255, 255, .09);
  box-shadow: 0 20px 45px rgba(0, 0, 0, .2);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.hero-search > svg,
.modal-search > svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: #a9bacd;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.hero-search input,
.modal-search input,
.side-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
}

.hero-search input::placeholder {
  color: #8395a9;
}

kbd {
  min-width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .16);
  border-bottom-width: 2px;
  border-radius: 7px;
  color: #9fb0c4;
  background: rgba(255, 255, 255, .06);
  font-family: inherit;
  font-size: 12px;
}

.hero-search button,
.modal-search button {
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 11px;
  color: #031b18;
  background: #64e0cf;
  cursor: pointer;
  font-weight: 850;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: #fff;
  background: var(--brand-deep);
}

.hero .button-primary {
  color: #051c1a;
  background: #74e9d9;
}

.button-ghost {
  border-color: rgba(180, 210, 233, .24);
  color: #d8e4f0;
  background: rgba(255, 255, 255, .06);
}

.lab-console {
  position: relative;
  border: 1px solid rgba(175, 215, 239, .2);
  border-radius: 23px;
  background: rgba(5, 14, 28, .72);
  box-shadow: 0 40px 90px rgba(0, 0, 0, .42);
  transform: perspective(1100px) rotateY(-3deg) rotateX(1deg);
  overflow: hidden;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.lab-console::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(112deg, rgba(255, 255, 255, .07), transparent 38%);
}

.console-head {
  min-height: 52px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 18px;
  border-bottom: 1px solid rgba(178, 214, 238, .14);
  color: #8296ac;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
}

.console-dots {
  display: flex;
  gap: 7px;
}

.console-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #314258;
}

.console-dots i:nth-child(1) { background: #ef6b73; }
.console-dots i:nth-child(2) { background: #e8b052; }
.console-dots i:nth-child(3) { background: #4fc7a3; }

.console-live {
  justify-self: end;
  color: #69dcca;
  font-size: 10px;
  font-weight: 800;
}

.console-live i {
  width: 5px;
  height: 5px;
  margin-right: 5px;
}

.console-body {
  display: grid;
  gap: 12px;
  padding: 22px;
}

.console-command {
  margin-bottom: 2px;
  color: #9db0c4;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
}

.console-command span {
  margin-right: 8px;
  color: #55d7c5;
}

.console-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 13px 14px;
  border: 1px solid rgba(157, 193, 220, .12);
  border-radius: 14px;
  background: rgba(255, 255, 255, .045);
}

.console-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 11px;
  font-size: 14px;
  font-weight: 900;
}

.is-windows .console-icon { color: #8eb4ff; background: rgba(65, 111, 220, .16); }
.is-aws .console-icon { color: #ffca6d; background: rgba(215, 139, 23, .16); }
.is-ncp .console-icon { color: #7ae7d8; background: rgba(16, 174, 151, .16); }

.console-row > span:nth-child(2) {
  display: grid;
  line-height: 1.35;
}

.console-row strong {
  font-size: 13px;
}

.console-row small {
  color: #71849a;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
}

.console-row b {
  color: #7590aa;
  font-size: 9px;
  letter-spacing: .08em;
}

.console-proof {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 14px;
  margin-top: 4px;
  padding: 15px;
  border-radius: 14px;
  background: linear-gradient(120deg, rgba(25, 212, 186, .11), rgba(117, 85, 220, .1));
}

.console-proof > span {
  font-size: 12px;
  font-weight: 750;
}

.console-proof div {
  display: flex;
  align-items: center;
  gap: 5px;
}

.console-proof div i {
  width: 18px;
  height: 4px;
  border-radius: 99px;
  background: #59d8c6;
}

.console-proof div i:nth-child(2) { background: #62a4ec; }
.console-proof div i:nth-child(3) { background: #9174ec; }
.console-proof div i:nth-child(4) { background: #d776c8; }

.console-proof small {
  grid-column: 1 / -1;
  color: #788ca2;
  font-size: 10px;
}

/* Platform hub */
.platform-section {
  padding: 72px 0 28px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 8px 0 0;
  font-size: clamp(27px, 3.2vw, 39px);
  line-height: 1.2;
  letter-spacing: -.045em;
}

.section-heading > p {
  max-width: 420px;
  margin: 0 0 5px;
  color: var(--muted);
  text-align: right;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.platform-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 174px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.platform-card::before {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -120px;
  bottom: -130px;
  z-index: -1;
  border-radius: 50%;
  opacity: .24;
  background: currentColor;
  filter: blur(16px);
}

.platform-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, currentColor 36%, var(--line));
  box-shadow: var(--shadow);
}

.platform-windows { color: var(--blue); }
.platform-aws { color: var(--amber); }
.platform-ncp { color: var(--brand); }

.platform-icon {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, currentColor 28%, var(--line));
  border-radius: 18px;
  background: color-mix(in srgb, currentColor 10%, var(--surface));
  font-size: 22px;
  font-weight: 900;
}

.platform-copy {
  display: grid;
  color: var(--text);
  line-height: 1.25;
}

.platform-copy small {
  margin-bottom: 4px;
  color: currentColor;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.platform-copy strong {
  font-size: 24px;
  letter-spacing: -.035em;
}

.platform-copy em {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.platform-arrow {
  align-self: start;
  font-size: 20px;
  transition: transform .2s ease;
}

.platform-card:hover .platform-arrow {
  transform: translate(3px, -3px);
}

/* List layout */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 318px;
  align-items: start;
  gap: 30px;
  padding-top: 42px;
  padding-bottom: 90px;
}

.content {
  min-width: 0;
  display: grid;
  gap: 17px;
}

.list-head,
.empty-card,
.entry,
.post-card,
.side-card,
.tag-cloud-page {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  box-shadow: var(--shadow-sm);
}

.list-head {
  min-height: 128px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 27px 30px;
  overflow: hidden;
}

.list-head h2 {
  margin: 7px 0 4px;
  font-size: clamp(27px, 3.4vw, 38px);
  line-height: 1.18;
  letter-spacing: -.045em;
}

.list-head p,
.empty-card p {
  margin: 0;
  color: var(--muted);
}

.list-head p strong {
  color: var(--brand);
}

.list-search-button {
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  cursor: pointer;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 750;
}

.list-search-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.empty-card {
  padding: 34px;
}

.empty-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 20px;
}

.empty-card .button {
  margin-top: 18px;
}

.post-card {
  overflow: hidden;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: 204px;
  box-shadow: none;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--brand) 34%, var(--line));
  box-shadow: var(--shadow);
}

.card-thumb {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 204px;
  display: block;
  background:
    radial-gradient(circle at 20% 20%, rgba(100, 235, 219, .23), transparent 38%),
    linear-gradient(145deg, #101f34, #122941 58%, #171b37);
}

.card-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(157, 200, 225, .1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(157, 200, 225, .1) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(145deg, #000, transparent 80%);
  mask-image: linear-gradient(145deg, #000, transparent 80%);
}

.card-thumb::after {
  content: "";
  position: absolute;
  width: 130px;
  height: 130px;
  right: -50px;
  bottom: -50px;
  z-index: -1;
  border-radius: 50%;
  background: rgba(94, 103, 237, .38);
  filter: blur(10px);
}

.post-card[data-platform="windows"] .card-thumb {
  background: radial-gradient(circle at 20% 20%, rgba(99, 159, 255, .28), transparent 38%), linear-gradient(145deg, #0d1a32, #142b4e);
}

.post-card[data-platform="aws"] .card-thumb {
  background: radial-gradient(circle at 20% 20%, rgba(255, 186, 77, .28), transparent 38%), linear-gradient(145deg, #231a13, #3b2917);
}

.post-card[data-platform="ncp"] .card-thumb {
  background: radial-gradient(circle at 20% 20%, rgba(73, 225, 201, .28), transparent 38%), linear-gradient(145deg, #0b201f, #123b36);
}

.card-code {
  position: absolute;
  left: 20px;
  bottom: 17px;
  z-index: 3;
  color: rgba(238, 248, 255, .94);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -.05em;
  text-shadow: 0 5px 20px rgba(0, 0, 0, .35);
}

.card-grid {
  position: absolute;
  width: 78px;
  height: 78px;
  top: 18px;
  right: 18px;
  border: 1px solid rgba(164, 211, 237, .18);
  border-radius: 50%;
}

.card-grid::before,
.card-grid::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(164, 211, 237, .13);
  border-radius: 50%;
}

.card-grid::before { inset: 11px; }
.card-grid::after { inset: 25px; background: rgba(106, 231, 214, .35); }

.card-thumb img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  min-height: 204px;
  display: block;
  object-fit: cover;
  transition: transform .35s ease, filter .35s ease;
}

.post-card:hover .card-thumb img {
  transform: scale(1.045);
}

.card-body {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 11px;
  padding: 22px 25px;
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.entry-category,
.card-category {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 27px;
  padding: 3px 9px;
  border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--line));
  border-radius: 9px;
  color: var(--brand-deep);
  background: color-mix(in srgb, var(--brand) 9%, var(--surface));
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.card-category {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-platform {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.card-body h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.35;
  letter-spacing: -.035em;
}

.card-body h2 a {
  transition: color .18s ease;
}

.card-body h2 a:hover {
  color: var(--brand-deep);
}

.card-body > p {
  overflow: hidden;
  display: -webkit-box;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.66;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.card-meta > * + *::before {
  content: "";
  width: 3px;
  height: 3px;
  display: inline-block;
  margin: 0 10px 2px 0;
  border-radius: 50%;
  background: var(--line);
}

.card-more {
  margin-left: auto;
  color: var(--text);
  font-weight: 750;
}

.card-more::before {
  display: none !important;
}

.card-more i {
  display: inline-block;
  margin-left: 3px;
  font-style: normal;
  transition: transform .18s ease;
}

.post-card:hover .card-more i {
  transform: translateX(4px);
}

/* Article */
#tt-body-page .hero-home,
#tt-body-page .platform-section,
#tt-body-notice .hero-home,
#tt-body-notice .platform-section,
#tt-body-guestbook .hero-home,
#tt-body-guestbook .platform-section,
#tt-body-tag .hero-home,
#tt-body-tag .platform-section {
  display: none;
}

#tt-body-page .layout,
#tt-body-notice .layout,
#tt-body-guestbook .layout,
#tt-body-tag .layout {
  padding-top: 42px;
}

.entry {
  min-width: 0;
  padding: clamp(28px, 4.2vw, 54px);
}

.entry-header {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.entry-kicker,
.entry-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.reading-time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.entry-header h1 {
  margin: 18px 0 16px;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.17;
  letter-spacing: -.055em;
}

.entry-meta {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.article-actions {
  display: flex;
  gap: 7px;
}

.article-actions button {
  min-height: 37px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
}

.article-actions svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-toc-open {
  display: none !important;
}

.entry-body {
  color: var(--text);
  font-size: 17px;
  line-height: 1.84;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.entry-body > *:first-child {
  margin-top: 0;
}

.entry-body h2,
.entry-body h3,
.entry-body h4 {
  position: relative;
  scroll-margin-top: 100px;
  line-height: 1.3;
  letter-spacing: -.038em;
}

.entry-body h2 {
  margin: 2.55em 0 .85em;
  padding: 13px 16px;
  border-left: 4px solid var(--brand);
  border-radius: 0 12px 12px 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--brand) 9%, var(--surface)), transparent);
  font-size: 28px;
}

.entry-body h3 {
  margin: 2em 0 .75em;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
  font-size: 22px;
}

.entry-body h4 {
  margin: 1.8em 0 .65em;
  font-size: 19px;
}

.heading-anchor {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity .18s ease, background .18s ease;
}

.entry-body h2:hover .heading-anchor,
.entry-body h3:hover .heading-anchor,
.heading-anchor:focus-visible {
  opacity: 1;
}

.heading-anchor:hover {
  color: var(--brand);
  background: var(--surface-2);
}

.entry-body p {
  margin: 1.05em 0;
}

.entry-body a {
  color: var(--brand-deep);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--brand) 34%, transparent);
  text-underline-offset: 3px;
}

.entry-body strong {
  font-weight: 800;
}

.entry-body ul,
.entry-body ol {
  padding-left: 1.45em;
}

.entry-body li + li {
  margin-top: .35em;
}

.entry-body hr {
  height: 1px;
  margin: 40px 0;
  border: 0;
  background: var(--line);
}

.entry-body blockquote {
  position: relative;
  margin: 30px 0;
  padding: 20px 22px 20px 52px;
  border: 1px solid color-mix(in srgb, var(--brand) 20%, var(--line));
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: color-mix(in srgb, var(--brand) 6%, var(--surface));
}

.entry-body blockquote::before {
  content: "“";
  position: absolute;
  top: 4px;
  left: 17px;
  color: var(--brand);
  font-family: Georgia, serif;
  font-size: 42px;
  line-height: 1;
}

.entry-body blockquote p {
  margin: .4em 0;
}

.entry-body table {
  width: 100%;
  display: block;
  overflow-x: auto;
  margin: 30px 0;
  border-spacing: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.entry-body table tbody,
.entry-body table thead {
  width: 100%;
  display: table;
}

.entry-body th,
.entry-body td {
  padding: 13px 15px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.entry-body tr:last-child td {
  border-bottom: 0;
}

.entry-body th:last-child,
.entry-body td:last-child {
  border-right: 0;
}

.entry-body th {
  background: var(--surface-2);
  font-weight: 800;
}

.entry-body pre {
  position: relative;
  overflow: auto;
  margin: 30px 0;
  padding: 46px 22px 22px;
  border: 1px solid #22374e;
  border-radius: var(--radius-sm);
  color: #dae8f4;
  background: #081522;
  box-shadow: inset 0 1px rgba(255, 255, 255, .04);
  font-size: 14px;
  line-height: 1.75;
}

.entry-body pre::before {
  content: "";
  position: absolute;
  top: 17px;
  left: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ed6871;
  box-shadow: 14px 0 #e4ad4d, 28px 0 #4ac59f;
}

.entry-body code {
  padding: .16em .4em;
  border-radius: 7px;
  color: var(--brand-deep);
  background: color-mix(in srgb, var(--brand) 10%, var(--surface-2));
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .91em;
}

.entry-body pre code {
  padding: 0;
  color: inherit;
  background: transparent;
}

.copy-code {
  position: absolute;
  top: 10px;
  right: 10px;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  color: #c5d6e6;
  background: rgba(255, 255, 255, .06);
  cursor: pointer;
  font-size: 11px;
}

/* Evidence image system */
.entry-body figure.imageblock,
.entry-body figure {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin-top: 34px;
  margin-bottom: 34px;
  padding: 38px 12px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  box-shadow: var(--shadow-sm);
}

.entry-body figure.alignCenter {
  margin-inline: auto;
}

.entry-body figure.alignLeft {
  margin-right: auto;
}

.entry-body figure.alignRight {
  margin-left: auto;
}

.entry-body figure img {
  display: block;
  border-radius: 8px;
  cursor: zoom-in;
}

.entry-body figure::before {
  content: attr(data-evidence-label);
  position: absolute;
  top: 10px;
  left: 12px;
  min-height: 21px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 7px;
  color: var(--brand-deep);
  background: color-mix(in srgb, var(--brand) 12%, var(--surface));
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .05em;
}

.entry-body figure.evidence-guide::before {
  color: var(--violet);
  background: color-mix(in srgb, var(--violet) 12%, var(--surface));
}

.entry-body figure.evidence-initial::before {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 10%, var(--surface));
}

.entry-body figure.evidence-after::before {
  color: var(--brand-deep);
  background: color-mix(in srgb, var(--brand) 12%, var(--surface));
}

.entry-body figure.evidence-ui::before {
  color: var(--blue);
  background: color-mix(in srgb, var(--blue) 10%, var(--surface));
}

.entry-body figcaption {
  max-width: 760px;
  margin-top: 11px;
  padding: 12px 13px 2px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
  text-align: left;
}

.entry-tags,
.tag-cloud,
.mini-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.entry-tags {
  align-items: center;
  margin-top: 42px;
  padding-top: 25px;
  border-top: 1px solid var(--line);
}

.entry-tags > span {
  margin-right: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.entry-tags a,
.tag-cloud a,
.mini-tags a {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 12px;
  transition: color .18s ease, border-color .18s ease;
}

.entry-tags a::before,
.tag-cloud a::before,
.mini-tags a::before {
  content: "#";
  margin-right: 2px;
  color: var(--brand);
}

.entry-tags a:hover,
.tag-cloud a:hover,
.mini-tags a:hover {
  color: var(--text);
  border-color: var(--line);
}

.related {
  margin-top: 48px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

.related-head h2 {
  margin: 6px 0 18px;
  font-size: 23px;
  letter-spacing: -.035em;
}

.related ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.related a {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
}

.related img {
  width: 52px;
  height: 52px;
  display: block;
  border-radius: 9px;
  object-fit: cover;
}

.related span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 750;
}

.related time {
  color: var(--muted);
  font-size: 11px;
}

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 34px;
}

.post-nav a {
  position: relative;
  overflow: hidden;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  transition: border-color .18s ease, transform .18s ease;
}

.post-nav a:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--brand) 36%, var(--line));
}

.post-nav small {
  display: block;
  margin-bottom: 4px;
  color: var(--brand);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}

.post-nav strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.protected-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 22px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.protected-box strong,
.protected-box p {
  width: 100%;
  margin: 0;
}

.protected-box p {
  color: var(--muted);
}

.protected-box input,
.side-search {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}

.protected-box input {
  min-width: 0;
  flex: 1;
  height: 43px;
  padding: 0 13px;
  color: var(--text);
}

.protected-box button {
  height: 43px;
  padding: 0 15px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: var(--brand-deep);
  cursor: pointer;
  font-weight: 800;
}

.comments,
.guestbook [data-tistory-react-app="Comment"],
.entry [data-tistory-react-app="Comment"] {
  margin-top: 38px;
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 94px;
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  padding-right: 3px;
  scrollbar-width: thin;
}

.side-card {
  padding: 20px;
  box-shadow: none;
}

.side-card h3 {
  margin: 5px 0 12px;
  font-size: 17px;
  letter-spacing: -.025em;
}

.side-card > p {
  margin: -3px 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.quick-search-card {
  border-color: color-mix(in srgb, var(--brand) 28%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand) 7%, var(--surface)), var(--surface) 65%);
}

.side-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: center;
  overflow: hidden;
}

.side-search input {
  height: 42px;
  padding: 0 12px;
  color: var(--text);
}

.side-search button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: var(--brand-deep);
  cursor: pointer;
}

.side-search button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.side-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tag-all-link {
  color: var(--brand);
  font-size: 11px;
  font-weight: 780;
}

.tag-all-link:hover {
  color: var(--text);
}

.toc-close {
  display: none;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: var(--surface-2);
  cursor: pointer;
  font-size: 20px;
}

#toc {
  display: grid;
  gap: 3px;
}

#toc a {
  position: relative;
  display: block;
  padding: 6px 8px 6px 14px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  transition: color .18s ease, background .18s ease;
}

#toc a::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--line);
}

#toc a:hover,
#toc a.is-active {
  color: var(--text);
  background: var(--surface-2);
}

#toc a.is-active::before {
  background: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 12%, transparent);
}

#toc .toc-h3 {
  padding-left: 25px;
  font-size: 11px;
}

#toc .toc-h3::before {
  left: 15px;
}

.category-card table {
  width: 100%;
  border: 0;
  border-collapse: collapse;
}

.category-card td {
  padding: 0;
  border: 0;
}

.category-card img {
  display: none;
}

.category-card ul,
.category-card ol,
.recent-list,
.simple-list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.category-card li {
  position: relative;
}

.category-card a,
.simple-list a {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 9px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 13px;
  transition: color .18s ease, background .18s ease;
}

.category-card a:hover,
.category-card a.is-active,
.simple-list a:hover {
  color: var(--text);
  background: var(--surface-2);
}

.category-card .c_cnt,
.category-card .cnt {
  margin-left: auto;
  color: var(--muted);
  font-size: 10px;
}

.category-card .has-children > a {
  padding-right: 39px;
}

.category-toggle {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
}

.category-card .has-children > ul {
  display: none;
  margin: 2px 0 7px 10px;
  padding-left: 7px;
  border-left: 1px solid var(--line);
}

.category-card .has-children.is-open > ul {
  display: grid;
}

.category-card .sub_category_list a {
  min-height: 32px;
  font-size: 12px;
}

/* Tistory's legacy tree category injects fixed light colors and GIF controls. */
.category-card #treeComponent,
.category-card #treeComponent table {
  width: 100% !important;
  background-color: transparent !important;
  border-collapse: separate;
  border-spacing: 0 3px;
}

.category-card #treeComponent td {
  border: 0;
  background-color: transparent !important;
}

.category-card #treeComponent td.branch3 {
  min-height: 36px;
  padding: 8px 9px !important;
  border-radius: 9px;
  cursor: pointer;
  transition: background .18s ease;
}

.category-card #treeComponent td.branch3:hover {
  background: var(--surface-2) !important;
}

.category-card #treeComponent [id^="text_"] {
  color: var(--muted) !important;
  font-size: 13px;
  font-weight: 680;
  line-height: 1.45;
  word-break: keep-all;
  overflow-wrap: anywhere;
  transition: color .18s ease;
}

.category-card #treeComponent td.branch3:hover [id^="text_"] {
  color: var(--text) !important;
}

.category-card #treeComponent td.ib {
  width: 40px !important;
  background-image: none !important;
}

.category-card #treeComponent #category_0 td.ib {
  display: none;
}

.category-card #treeComponent a.click {
  position: relative;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  display: grid !important;
  place-items: center;
  margin: 1px 4px;
  padding: 0 !important;
  border: 1px solid color-mix(in srgb, var(--accent) 46%, var(--line));
  border-radius: 9px;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface-2));
  color: var(--accent);
  cursor: pointer;
}

.category-card #treeComponent a.click:hover,
.category-card #treeComponent a.click:focus-visible {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 18%, var(--surface-2));
  outline: none;
}

.category-card #treeComponent a.click img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  opacity: 0;
}

.category-card #treeComponent a.click::after {
  content: "+";
  position: relative;
  z-index: 1;
  font-size: 18px;
  font-weight: 850;
  line-height: 1;
}

.category-card #treeComponent a.click.is-expanded::after,
.category-card #treeComponent a.click:has(img[src*="tab_opened"])::after {
  content: "−";
}

.category-card #treeComponent div[id$="_children"] {
  margin-left: 15px;
  padding-left: 6px;
  border-left: 1px solid var(--line);
}

.category-card #treeComponent div[id$="_children"] > table > tbody > tr > td:first-child {
  width: 24px !important;
  background-image: none !important;
}

.category-card #treeComponent div[id$="_children"] > table > tbody > tr > td:first-child img {
  display: none !important;
}

[data-theme="dark"] .category-card #treeComponent a.click {
  border-color: rgba(92, 230, 213, .48);
  background: rgba(92, 230, 213, .09);
  color: #6ce7d5;
}

.recent-list {
  gap: 9px;
}

.notice-card:not(:has(a)),
.tag-card:not(:has(.mini-tags a)),
.side-card[hidden] {
  display: none;
}

.recent-list a {
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}

.recent-list img {
  width: 42px;
  height: 42px;
  display: block;
  border-radius: 9px;
  object-fit: cover;
  background: var(--surface-2);
}

.recent-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 720;
}

.recent-list small {
  grid-column: 2;
  margin-top: -13px;
  color: var(--muted);
  font-size: 10px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.page-numbers {
  display: flex;
  gap: 6px;
}

.page-btn,
.page-num {
  min-width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  background: var(--surface);
  font-size: 13px;
}

.page-btn:hover,
.page-num:hover,
.page-num.selected {
  color: var(--text);
  border-color: color-mix(in srgb, var(--brand) 34%, var(--line));
  background: var(--surface-2);
}

.no-more-prev,
.no-more-next {
  opacity: .35;
  pointer-events: none;
}

.tag-cloud-page {
  overflow: hidden;
}

.tag-cloud-page .list-head {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.tag-cloud {
  padding: 28px;
}

.cloud1 { font-size: 17px !important; font-weight: 850; }
.cloud2 { font-size: 15px !important; font-weight: 800; }
.cloud3 { font-size: 13px !important; font-weight: 750; }
.cloud4,
.cloud5 { font-size: 12px !important; }

/* Footer and utilities */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.footer-inner {
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
  font-size: 13px;
}

.footer-inner > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-mark {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: #fff;
  font-weight: 900;
}

.footer-inner p {
  margin: 0;
}

.footer-inner > div p {
  display: grid;
}

.footer-inner strong {
  color: var(--text);
  font-size: 14px;
}

.footer-inner small {
  font-size: 11px;
}

.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 900;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mobile-dock {
  display: none;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 5000;
  max-width: min(90vw, 420px);
  padding: 10px 15px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 11px;
  color: #f2f7fb;
  background: rgba(7, 17, 31, .94);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .3);
  font-size: 13px;
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.noscript-note {
  position: fixed;
  inset: auto 20px 20px;
  z-index: 9000;
  padding: 12px 16px;
  border-radius: 10px;
  color: #fff;
  background: #8d2730;
  text-align: center;
}

/* Search modal */
.search-modal,
.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: grid;
  place-items: start center;
  padding: 12vh 20px 30px;
}

.modal-backdrop,
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(2, 8, 17, .75);
  cursor: default;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.search-dialog {
  position: relative;
  width: min(680px, 100%);
  padding: 28px;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 40px 100px rgba(0, 0, 0, .38);
}

.search-dialog-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}

.search-dialog h2 {
  margin: 6px 0 20px;
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: -.04em;
}

.search-close {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
  cursor: pointer;
  font-size: 24px;
}

.modal-search {
  min-height: 58px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 6px 6px 6px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}

.modal-search input {
  color: var(--text);
}

.search-suggestions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
}

.search-suggestions > span {
  margin-right: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.search-suggestions a {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface);
  font-size: 12px;
}

.search-suggestions a:hover {
  color: var(--brand-deep);
  border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
}

.search-tip {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.search-tip kbd {
  min-width: 24px;
  height: 24px;
  margin-right: 4px;
  border-color: var(--line);
  color: var(--muted);
  background: var(--surface-2);
}

/* Image lightbox */
.image-lightbox {
  place-items: center;
  padding: 26px;
}

.image-lightbox figure {
  position: relative;
  z-index: 1;
  max-width: min(94vw, 1500px);
  max-height: 92vh;
  display: grid;
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 18px;
  color: #dce8f3;
  background: rgba(6, 15, 27, .96);
  box-shadow: 0 40px 100px rgba(0, 0, 0, .55);
}

.image-lightbox figure > .lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 50%;
  color: #fff;
  background: #18263a;
  cursor: pointer;
  font-size: 23px;
}

.image-lightbox img {
  max-width: 100%;
  max-height: calc(92vh - 84px);
  display: block;
  margin: auto;
  border-radius: 10px;
  object-fit: contain;
}

.image-lightbox figcaption {
  max-height: 74px;
  overflow: auto;
  padding: 10px 4px 0;
  color: #a9bacb;
  font-size: 11px;
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 1100px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr) 430px;
    gap: 45px;
  }

  .layout {
    grid-template-columns: minmax(0, 1fr) 292px;
    gap: 22px;
  }

  .post-card {
    grid-template-columns: 205px minmax(0, 1fr);
  }
}

@media (max-width: 960px) {
  .site-nav {
    position: fixed;
    inset: 78px 22px auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    width: 100%;
    min-height: 42px;
  }

  .menu-toggle {
    display: grid;
  }

  .hero {
    min-height: auto;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    padding-block: 68px;
  }

  .hero-copy {
    max-width: 720px;
  }

  .lab-console {
    width: min(100%, 680px);
    transform: none;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    max-height: none;
    overflow: visible;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toc-card {
    grid-column: 1 / -1;
    order: -2;
  }
}

@media (max-width: 760px) {
  :root {
    --radius: 17px;
  }

  .wrap {
    width: min(var(--wrap), calc(100% - 28px));
  }

  body {
    padding-bottom: 70px;
  }

  .header-inner {
    min-height: 66px;
  }

  .brand-mark {
    width: 39px;
    height: 39px;
    border-radius: 12px;
  }

  .brand-text em {
    display: none;
  }

  .header-actions {
    gap: 5px;
  }

  .icon-button,
  .menu-toggle {
    width: 38px;
    height: 38px;
  }

  .site-nav {
    inset: 70px 14px auto;
  }

  .hero-inner {
    gap: 42px;
    padding-block: 52px;
  }

  .hero h1 {
    font-size: clamp(40px, 12vw, 58px);
  }

  .hero-copy > p {
    font-size: 16px;
  }

  .hero-search {
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 58px;
    padding-left: 14px;
  }

  .hero-search kbd {
    display: none;
  }

  .hero-search button {
    min-height: 42px;
    padding: 0 14px;
  }

  .lab-console {
    border-radius: 18px;
  }

  .console-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .console-row b {
    display: none;
  }

  .platform-section {
    padding-top: 52px;
  }

  .section-heading {
    display: block;
  }

  .section-heading > p {
    margin-top: 11px;
    text-align: left;
  }

  .platform-grid {
    grid-template-columns: 1fr;
  }

  .platform-card {
    min-height: 132px;
    padding: 20px;
  }

  .layout {
    padding-top: 30px;
    padding-bottom: 56px;
  }

  .list-head {
    align-items: start;
    padding: 23px;
  }

  .list-search-button {
    width: 42px;
    padding: 0;
    justify-content: center;
    font-size: 0;
  }

  .post-card {
    grid-template-columns: 1fr;
  }

  .card-thumb,
  .card-thumb img {
    min-height: 190px;
    max-height: 230px;
  }

  .card-body {
    padding: 20px;
  }

  .card-body h2 {
    font-size: 20px;
  }

  .entry {
    padding: 23px 20px;
  }

  .entry-header {
    margin-bottom: 30px;
    padding-bottom: 24px;
  }

  .entry-header h1 {
    font-size: clamp(30px, 9vw, 40px);
  }

  .entry-meta-row {
    align-items: flex-start;
  }

  .copy-link {
    width: 38px;
    padding: 0 !important;
    justify-content: center;
    font-size: 0 !important;
  }

  .copy-link svg {
    width: 16px;
    height: 16px;
  }

  .mobile-toc-open {
    display: inline-flex !important;
  }

  .entry-body {
    font-size: 16px;
    line-height: 1.8;
    word-break: normal;
  }

  .entry-body h2 {
    margin-top: 2.2em;
    padding: 12px 13px;
    font-size: 24px;
  }

  .entry-body h3 {
    font-size: 20px;
  }

  .entry-body figure.imageblock,
  .entry-body figure {
    width: 100% !important;
    padding: 36px 8px 8px;
  }

  .entry-body figure img {
    width: 100%;
  }

  .entry-body table {
    font-size: 13px;
  }

  .related a {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .related img {
    width: 44px;
    height: 44px;
  }

  .related time {
    grid-column: 2;
  }

  .post-nav {
    grid-template-columns: 1fr;
  }

  .sidebar {
    grid-template-columns: 1fr;
  }

  .toc-card.is-mobile-open {
    position: fixed;
    inset: auto 14px 82px;
    z-index: 2000;
    display: block !important;
    max-height: min(70vh, 560px);
    overflow: auto;
    box-shadow: var(--shadow);
  }

  .toc-card.is-mobile-open .toc-close {
    display: grid;
  }

  .footer-inner {
    min-height: 160px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
  }

  .mobile-dock {
    position: fixed;
    inset: auto 10px 10px;
    z-index: 1500;
    height: 58px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 5px;
    border: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
    border-radius: 17px;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    box-shadow: 0 16px 45px rgba(0, 0, 0, .2);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
  }

  .mobile-dock a,
  .mobile-dock button {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 0;
    border: 0;
    border-radius: 12px;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    font-size: 10px;
    line-height: 1.1;
  }

  .mobile-dock span {
    color: var(--text);
    font-size: 19px;
    line-height: 1.2;
  }

  .to-top {
    right: 15px;
    bottom: 82px;
  }

  .search-modal {
    padding: 8vh 14px 20px;
  }

  .search-dialog {
    padding: 22px 18px;
    border-radius: 17px;
  }

  .search-dialog h2 {
    font-size: 22px;
  }

  .modal-search {
    grid-template-columns: auto minmax(0, 1fr);
    padding-right: 12px;
  }

  .modal-search button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .image-lightbox {
    padding: 12px;
  }
}

@media (max-width: 430px) {
  .brand-text strong {
    max-width: 150px;
  }

  .header-actions .search-open {
    display: none;
  }

  .hero h1 {
    font-size: 39px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .button {
    padding-inline: 11px;
    font-size: 12px;
  }

  .console-body {
    padding: 16px;
  }

  .platform-copy strong {
    font-size: 21px;
  }

  .page-numbers .page-num:nth-child(n+5) {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
