/* productplan — Medium-style left rail + reading column */
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;700&family=Noto+Serif+KR:wght@500;700&display=swap");

:root {
  --bg: #ffffff;
  --text: #242424;
  --muted: #6b6b6b;
  --faint: #8f8f8f;
  --border: #f0f0f0;
  --accent: #1a8917;
  --rail: 72px;
  --max: 680px;
  --font: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --serif: "Noto Serif KR", "Georgia", "Batang", serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

/* —— Medium-like left rail (desktop) —— */
.pp-rail {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  width: var(--rail);
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px 0 20px;
  border-right: 1px solid var(--border);
  background: #fff;
}

.pp-rail-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: 28px;
  border-radius: 50%;
  background: var(--text);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.pp-rail-brand:hover { background: var(--accent); }

.pp-rail-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.pp-rail-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 56px;
  padding: 10px 4px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  color: var(--faint);
  transition: background 0.15s ease, color 0.15s ease;
}

.pp-rail-nav a svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pp-rail-nav a:hover {
  color: var(--text);
  background: var(--bg-soft, #fafafa);
}

.pp-rail-nav a.is-active {
  color: var(--text);
  font-weight: 700;
}

.pp-rail-nav a.is-active svg { stroke-width: 2.1; }

.pp-rail-foot {
  font-size: 10px;
  color: var(--faint);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  letter-spacing: 0.08em;
  opacity: 0.7;
}


/* —— main column —— */
.pp-main {
  margin-left: var(--rail);
  min-height: 100vh;
}

.page-banner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 36px 24px 0;
}

.page-banner-title {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  color: var(--faint);
}

.page-banner-title span { color: var(--muted); }
.page-banner-title:hover { color: var(--accent); }

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 24px 48px;
  border-bottom: 1px solid var(--border);
}

.hero .eyebrow {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
}

.hero h1 {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-size: clamp(1.85rem, 4.5vw, 2.55rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.03em;
}

.hero p {
  margin: 0;
  max-width: 28em;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.article-list {
  max-width: var(--max);
  margin: 0 auto;
  padding: 8px 24px 80px;
}

.post-card {
  display: block;
  padding: 36px 0;
  border-bottom: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.post-card:last-child { border-bottom: none; }
.post-card:visited h2 { color: #a09ba8; }
.post-card:hover { opacity: 0.9; }

.post-card:hover h2 {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.post-card .meta {
  display: block;
  width: 100%;
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--faint);
}

.post-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 24px;
  width: 100%;
}

.post-body {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
}

.post-card h2 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.8vw, 1.5rem);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.025em;
}

.post-card .excerpt {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-stats {
  display: flex;
  gap: 14px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--faint);
}

.card-stat-views b,
.card-stat-likes b {
  font-weight: 500;
  color: var(--muted);
}

.post-thumb {
  flex: 0 0 160px;
  width: 160px;
  height: 160px;
  border-radius: 4px;
  overflow: hidden;
  background: #f5f5f5;
}

.post-thumb img {
  display: block;
  width: 160px;
  height: 160px;
  object-fit: cover;
  object-position: center 30%;
}

.article-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 24px 96px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 36px;
  font-size: 13px;
  color: var(--faint);
}

.back-link:hover { color: var(--accent); }

.article-header {
  margin-bottom: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.article-header h1 {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-size: clamp(1.9rem, 5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.03em;
}

.article-header .meta {
  margin: 0;
  font-size: 14px;
  color: var(--faint);
}

.byline {
  margin: 0;
  font-size: 14px;
  color: var(--faint);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.byline-author {
  color: var(--text);
  font-weight: 600;
}

.byline-sep { opacity: 0.5; }

.byline-contact {
  margin: 10px 0 0;
  font-size: 13px;
}

.byline-contact a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.byline-contact a:hover { color: var(--accent); }

.article-cover {
  margin: 0 auto 2em;
  max-width: 420px;
}

.article-cover img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: contain;
  object-position: center;
  border-radius: 4px;
  background: #fafafa;
}

.article-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.8em 0;
  border-radius: 4px;
  cursor: zoom-in;
}

/* Lightbox */
.uz-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.88);
  align-items: center;
  justify-content: center;
  padding: 20px;
  cursor: zoom-out;
}
.uz-lightbox.is-open { display: flex; }
.uz-lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.6);
  cursor: default;
}
.uz-lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.uz-lightbox-close:hover { background: rgba(255, 255, 255, 0.28); }

.article-body figure {
  margin: 2em 0;
}

.article-body .article-figure-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 2em 0;
}
.article-body .article-figure-pair img {
  margin: 0;
  width: 100%;
  height: auto;
  border-radius: 6px;
}
@media (max-width: 500px) {
  .article-body .article-figure-pair {
    grid-template-columns: 1fr;
  }
}

.article-body figcaption {
  margin-top: 0.65em;
  font-size: 0.85rem;
  color: var(--faint);
  text-align: center;
  line-height: 1.5;
}

.article-body {
  font-size: 1.125rem;
  line-height: 1.9;
  letter-spacing: -0.01em;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.article-body > *:first-child { margin-top: 0; }
.article-body p { margin: 0 0 1.55em; }

.article-body h2 {
  margin: 2.4em 0 0.85em;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.article-body h3 {
  margin: 2em 0 0.7em;
  font-size: 1.15rem;
  font-weight: 700;
}

.article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-body ul,
.article-body ol {
  margin: 0 0 1.55em;
  padding-left: 1.35em;
}

.article-body li { margin-bottom: 0.45em; }

.article-body blockquote {
  position: relative;
  margin: 2em 0;
  padding: 0.2em 1em 0.2em 3.2rem;
  border-left: none;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
  font-style: italic;
  line-height: 1.8;
  color: var(--text);
}

.article-body blockquote::before {
  content: '\201C';
  position: absolute;
  left: 0;
  top: -0.1em;
  font-size: 5rem;
  font-family: Georgia, var(--serif), serif;
  color: var(--muted);
  line-height: 1;
  font-style: normal;
}

.article-body blockquote p { margin: 0; }

.article-body code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.875em;
  background: #f3f4f6;
  color: #1f2937;
  padding: 0.15em 0.45em;
  border-radius: 4px;
  border: 1px solid #e5e7eb;
  word-break: break-all;
}

.article-body kbd {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.82em;
  background: #f9fafb;
  color: #374151;
  padding: 0.15em 0.5em;
  border-radius: 5px;
  border: 1px solid #d1d5db;
  box-shadow: 0 2px 0 #9ca3af;
  white-space: nowrap;
  display: inline-block;
  line-height: 1.5;
}

/* —— Article body tables —— */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: 1.8em 0;
  line-height: 1.6;
}

.article-body th,
.article-body td {
  padding: 9px 14px;
  border: 1px solid #d1d5db;
  vertical-align: top;
  text-align: left;
}

.article-body th:first-child,
.article-body td:first-child { border-left: none; }

.article-body th:last-child,
.article-body td:last-child { border-right: none; }

.article-body thead th {
  background: #f3f4f6;
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
}

.article-body tbody tr:nth-child(even) td {
  background: #fafafa;
}

/* —— Engagement (views · likes · comments) —— */
.engagement {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  font-size: 14px;
}

.eng-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.eng-stat {
  color: var(--faint);
}

.eng-stat b {
  color: var(--muted);
  font-weight: 600;
}

.eng-like {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--muted);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  font-family: inherit;
}

.eng-like:hover {
  border-color: #e0405e;
  color: #e0405e;
}

.eng-like.liked {
  border-color: #e0405e;
  color: #e0405e;
  background: #fff0f3;
}

.eng-like.liked .eng-heart {
  fill: #e0405e;
  stroke: #e0405e;
}

.eng-like b {
  font-weight: 600;
}

.eng-heart {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.eng-comments { margin-top: 0; }

.eng-comments-title {
  margin: 0 0 20px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.eng-comments-title span {
  color: var(--faint);
  font-weight: 400;
}

.eng-clist {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
}

.eng-empty {
  padding: 20px 0;
  color: var(--faint);
  font-size: 13px;
}

.eng-citem {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.eng-citem:first-child { border-top: 1px solid var(--border); }

.eng-cmeta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.eng-cnick {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
}

.eng-cdate {
  font-size: 12px;
  color: var(--faint);
}

.eng-cedit, .eng-cdel {
  padding: 2px 7px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 11px;
  color: var(--faint);
  cursor: pointer;
  line-height: 1.4;
  transition: color 0.15s, border-color 0.15s;
}
.eng-cedit { margin-left: auto; margin-right: 4px; }
.eng-cedit:hover { color: var(--text); border-color: var(--text); }
.eng-cdel:hover { color: #dc2626; border-color: #dc2626; }

.eng-cedit-form { margin-top: 8px; }
.eng-cedit-ta {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
  font-size: 0.9rem;
  resize: vertical;
  outline: none;
}
.eng-cedit-ta:focus { border-color: var(--text); }
.eng-cedit-btns { display: flex; gap: 8px; margin-top: 6px; }
.eng-cedit-save, .eng-cedit-cancel {
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid var(--border);
}
.eng-cedit-save { background: var(--text); color: #fff; border-color: var(--text); }
.eng-cedit-save:disabled { opacity: 0.5; cursor: default; }
.eng-cedit-cancel { background: none; color: var(--muted); }

.eng-cbody {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.eng-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.eng-nick {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: #fafafa;
  outline: none;
  transition: border-color 0.15s;
}

.eng-nick:focus {
  border-color: var(--muted);
  background: #fff;
}

.eng-ta-wrap {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fafafa;
  transition: border-color 0.15s;
}

.eng-ta-wrap:focus-within {
  border-color: var(--muted);
  background: #fff;
}

.eng-body {
  display: block;
  width: 100%;
  padding: 10px 12px 44px;
  border: none;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: transparent;
  outline: none;
  resize: vertical;
  min-height: 96px;
}

.eng-submit {
  position: absolute;
  bottom: 8px;
  right: 8px;
  padding: 6px 16px;
  border: none;
  border-radius: 6px;
  background: var(--text);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.eng-submit:hover { background: var(--accent); }
.eng-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.copyright {
  margin: 18px 0 0;
  font-size: 12px;
  color: var(--faint);
  line-height: 1.55;
}

.copyright a,
.site-footer a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.copyright a:hover,
.site-footer a:hover {
  color: var(--accent);
}

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 24px 64px;
  font-size: 12px;
  color: var(--faint);
  line-height: 1.6;
  border-top: 1px solid var(--border);
}

.site-footer p { margin: 0 0 6px; }
.site-footer p:last-child { margin-bottom: 0; }

/* —— mobile: hide left rail —— */
@media (max-width: 860px) {
  .pp-rail { display: none; }
  .pp-main { margin-left: 0; }

  .hero { padding: 24px 20px 36px; }
  .article-list { padding: 4px 20px 64px; }
  .post-card { padding: 28px 0; }
  .post-row {
    flex-direction: column;
  }
  .post-thumb {
    flex: none;
    width: 100%;
    height: 180px;
    order: -1;
  }
  .post-thumb img {
    width: 100%;
    height: 180px;
    object-position: center 30%;
  }
  .article-cover {
    max-width: 300px;
  }
  .article-cover img { max-height: 240px; }
  .article-wrap { padding: 20px 20px 72px; }
  .article-body { font-size: 1.05rem; line-height: 1.85; }
  .page-banner { padding: 24px 20px 0; }
}
