/*
Theme Name: Custom Auto Theme
Author: System
Version: 1.0
*/
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 17px; }
body { font-family: 'Crimson Pro', Georgia, serif; color: #1a1a1a; background: #faf9f7; line-height: 1.85; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

:root {
  --tornib-black: #111;
  --tornib-dark: #222;
  --tornib-gray: #666;
  --tornib-light: #e8e6e3;
  --tornib-bg: #faf9f7;
  --tornib-white: #fff;
  --tornib-accent: #444;
  --tornib-rule: #ccc;
  --tornib-note-bg: #f2f0ed;
  --tornib-font-head: 'Cormorant Garamond', 'Georgia', serif;
  --tornib-font-body: 'Crimson Pro', 'Georgia', serif;
  --tornib-font-ui: 'Inter', 'Helvetica Neue', sans-serif;
  --tornib-max: 1140px;
  --tornib-radius: 2px;
}

/* HEADER */
.h-header { background: var(--tornib-white); border-bottom: 1px solid var(--tornib-light); position: sticky; top: 0; z-index: 100; }
.h-header-inner { max-width: var(--tornib-max); margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; height: 64px; }
.h-logo { font-family: var(--tornib-font-head); font-size: 2rem; font-weight: 700; color: var(--tornib-black); letter-spacing: 0.08em; text-transform: uppercase; }
.h-logo span { font-weight: 300; }
.h-nav { display: flex; gap: 28px; align-items: center; }
.h-nav a { font-family: var(--tornib-font-ui); font-size: 0.72rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.12em; color: var(--tornib-gray); transition: color 0.3s; }
.h-nav a:hover, .h-nav a.active { color: var(--tornib-black); }
.h-burger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; background: none; border: none; }
.h-burger span { width: 22px; height: 1.5px; background: var(--tornib-black); transition: 0.3s; }
.h-mobile-nav { display: none; background: var(--tornib-white); border-bottom: 1px solid var(--tornib-light); padding: 16px 24px; }
.h-mobile-nav.open { display: block; }
.h-mobile-nav a { display: block; padding: 10px 0; font-family: var(--tornib-font-ui); font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tornib-dark); border-bottom: 1px solid var(--tornib-light); }

/* CHAPTER MARKER */
.h-chapter { font-family: var(--tornib-font-ui); font-size: 0.62rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.25em; color: var(--tornib-gray); margin-bottom: 12px; }

/* HERO — text only, book style */
.h-hero { max-width: 720px; margin: 0 auto; padding: 80px 24px 48px; text-align: left; }
.h-hero-label { font-family: var(--tornib-font-ui); font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--tornib-gray); margin-bottom: 20px; display: flex; align-items: center; gap: 12px; }
.h-hero-label::before { content: ''; width: 32px; height: 1px; background: var(--tornib-rule); }
.h-hero h1 { font-family: var(--tornib-font-head); font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 400; color: var(--tornib-black); line-height: 1.15; margin-bottom: 28px; letter-spacing: -0.01em; }
.h-hero-meta { font-family: var(--tornib-font-ui); font-size: 0.72rem; color: var(--tornib-gray); letter-spacing: 0.06em; margin-bottom: 32px; display: flex; gap: 20px; flex-wrap: wrap; }
.h-hero-meta strong { color: var(--tornib-dark); font-weight: 600; }
.h-hero-rule { width: 48px; height: 1px; background: var(--tornib-black); margin-bottom: 32px; }
.h-hero-lead { font-size: 1.15rem; color: var(--tornib-dark); line-height: 1.9; }

/* DROP CAP */
.h-dropcap::first-letter { font-family: var(--tornib-font-head); float: left; font-size: 4.2rem; line-height: 0.8; padding-right: 12px; padding-top: 6px; color: var(--tornib-black); font-weight: 700; }

/* MAIN LAYOUT */
.h-main { max-width: var(--tornib-max); margin: 0 auto; padding: 0 24px 64px; display: grid; grid-template-columns: 1fr 280px; gap: 64px; align-items: start; }

/* ARTICLE BODY */
.h-article h2 { font-family: var(--tornib-font-head); font-size: 1.65rem; font-weight: 400; color: var(--tornib-black); margin: 48px 0 18px; padding-top: 24px; border-top: 1px solid var(--tornib-light); line-height: 1.3; }
.h-article h2:first-child { border-top: none; margin-top: 0; padding-top: 0; }
.h-article p { margin-bottom: 18px; color: #2a2a2a; font-size: 1.02rem; }
.h-article blockquote { margin: 36px 0; padding: 0 0 0 24px; border-left: 2px solid var(--tornib-black); font-family: var(--tornib-font-head); font-style: italic; font-size: 1.18rem; color: var(--tornib-dark); line-height: 1.7; }
.h-article blockquote footer { font-style: normal; font-family: var(--tornib-font-ui); font-size: 0.72rem; color: var(--tornib-gray); margin-top: 10px; letter-spacing: 0.06em; }

/* IMAGE BLOCKS */
.h-img-block { margin: 40px 0; position: relative; }
.h-img-block img { width: 100%; height: 340px; object-fit: cover; filter: grayscale(15%); transition: filter 0.5s; }
.h-img-block:hover img { filter: grayscale(0%); }
.h-img-block figcaption { font-family: var(--tornib-font-ui); font-size: 0.68rem; color: var(--tornib-gray); margin-top: 8px; text-align: right; font-style: italic; letter-spacing: 0.04em; }

/* HIGHLIGHT BOX — book note style */
.h-note-box { background: var(--tornib-note-bg); padding: 28px 32px; margin: 36px 0; border-left: 3px solid var(--tornib-black); }
.h-note-box h3 { font-family: var(--tornib-font-head); font-size: 1.1rem; font-weight: 600; margin-bottom: 10px; color: var(--tornib-black); }
.h-note-box p { font-size: 0.92rem; color: var(--tornib-dark); margin-bottom: 0; }
.h-note-box ul { margin: 12px 0 0 20px; font-size: 0.92rem; color: var(--tornib-dark); }
.h-note-box ul li { margin-bottom: 6px; }

/* CARDS GRID */
.h-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 36px 0; }
.h-card { background: var(--tornib-white); border: 1px solid var(--tornib-light); padding: 28px 24px; transition: transform 0.3s, box-shadow 0.3s; }
.h-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.06); }
.h-card-num { font-family: var(--tornib-font-head); font-size: 2.8rem; font-weight: 300; color: var(--tornib-light); line-height: 1; margin-bottom: 8px; }
.h-card h3 { font-family: var(--tornib-font-head); font-size: 1.05rem; font-weight: 600; margin-bottom: 10px; color: var(--tornib-black); }
.h-card p { font-size: 0.88rem; color: var(--tornib-gray); line-height: 1.65; }
.h-card-tag { display: inline-block; font-family: var(--tornib-font-ui); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--tornib-gray); margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--tornib-light); }

/* FULL-WIDTH QUOTE */
.h-pullquote { max-width: 600px; margin: 56px auto; text-align: center; padding: 0 24px; }
.h-pullquote blockquote { font-family: var(--tornib-font-head); font-size: 1.5rem; font-weight: 400; color: var(--tornib-black); line-height: 1.5; font-style: italic; }
.h-pullquote cite { display: block; font-family: var(--tornib-font-ui); font-size: 0.68rem; color: var(--tornib-gray); margin-top: 14px; font-style: normal; letter-spacing: 0.1em; text-transform: uppercase; }
.h-pullquote::before { content: ''; display: block; width: 40px; height: 1px; background: var(--tornib-black); margin: 0 auto 24px; }
.h-pullquote::after { content: ''; display: block; width: 40px; height: 1px; background: var(--tornib-black); margin: 24px auto 0; }

/* RECOMMENDATION LIST */
.h-rec-list { margin: 36px 0; }
.h-rec-item { display: flex; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--tornib-light); align-items: flex-start; transition: padding-left 0.3s; }
.h-rec-item:hover { padding-left: 8px; }
.h-rec-item:last-child { border-bottom: none; }
.h-rec-icon { width: 44px; height: 44px; background: var(--tornib-note-bg); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.h-rec-item h4 { font-family: var(--tornib-font-head); font-size: 1rem; font-weight: 600; margin-bottom: 6px; color: var(--tornib-black); }
.h-rec-item p { font-size: 0.85rem; color: var(--tornib-gray); line-height: 1.55; }

/* SIDEBAR — notes column */
.h-sidebar { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 28px; }
.h-sidebar-block { padding: 24px 20px; border: 1px solid var(--tornib-light); background: var(--tornib-white); }
.h-sidebar-block h4 { font-family: var(--tornib-font-head); font-size: 1rem; font-weight: 600; color: var(--tornib-black); margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--tornib-light); }

.h-sidebar-note { padding: 20px; background: var(--tornib-note-bg); border-left: 2px solid var(--tornib-dark); }
.h-sidebar-note p { font-size: 0.82rem; color: var(--tornib-dark); line-height: 1.6; margin-bottom: 10px; }
.h-sidebar-note p:last-child { margin-bottom: 0; }
.h-sidebar-note-label { font-family: var(--tornib-font-ui); font-size: 0.58rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--tornib-gray); margin-bottom: 8px; }

.h-sidebar-link { display: block; padding: 12px 0; border-bottom: 1px solid var(--tornib-light); font-size: 0.88rem; color: var(--tornib-dark); transition: color 0.2s, padding-left 0.2s; }
.h-sidebar-link:last-child { border-bottom: none; }
.h-sidebar-link:hover { color: var(--tornib-black); padding-left: 6px; }
.h-sidebar-link span { display: block; font-family: var(--tornib-font-ui); font-size: 0.62rem; color: var(--tornib-gray); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 3px; }

.h-sidebar-quote { padding: 20px; background: var(--tornib-black); color: #ccc; font-family: var(--tornib-font-head); font-style: italic; font-size: 0.92rem; line-height: 1.6; }
.h-sidebar-quote footer { font-style: normal; font-family: var(--tornib-font-ui); font-size: 0.62rem; color: #888; margin-top: 10px; letter-spacing: 0.06em; }

/* TAGS */
.h-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.h-tag { font-family: var(--tornib-font-ui); font-size: 0.68rem; background: var(--tornib-note-bg); color: var(--tornib-gray); padding: 4px 12px; letter-spacing: 0.04em; transition: background 0.2s, color 0.2s; }
.h-tag:hover { background: var(--tornib-black); color: var(--tornib-white); }

/* NEWSLETTER */
.h-newsletter { background: var(--tornib-black); color: var(--tornib-white); padding: 48px 24px; text-align: center; margin-top: 64px; }
.h-newsletter-inner { max-width: 480px; margin: 0 auto; }
.h-newsletter h3 { font-family: var(--tornib-font-head); font-size: 1.5rem; font-weight: 400; margin-bottom: 10px; }
.h-newsletter p { font-size: 0.85rem; color: #aaa; margin-bottom: 24px; }
.h-nl-form { display: flex; gap: 0; }
.h-nl-input { flex: 1; padding: 12px 16px; border: 1px solid #444; background: transparent; color: #fff; font-family: var(--tornib-font-body); font-size: 0.88rem; outline: none; }
.h-nl-input::placeholder { color: #666; }
.h-nl-btn { padding: 12px 28px; background: var(--tornib-white); color: var(--tornib-black); font-family: var(--tornib-font-ui); font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; border: none; cursor: pointer; transition: opacity 0.2s; }
.h-nl-btn:hover { opacity: 0.85; }

/* CONCLUSION BLOCK */
.h-conclusion { margin: 48px 0 0; padding: 36px 0; border-top: 2px solid var(--tornib-black); border-bottom: 1px solid var(--tornib-light); }
.h-conclusion h3 { font-family: var(--tornib-font-head); font-size: 1.4rem; font-weight: 400; margin-bottom: 14px; color: var(--tornib-black); }
.h-conclusion p { color: var(--tornib-dark); font-size: 0.98rem; margin-bottom: 12px; }

/* FOOTER */
.h-footer { background: var(--tornib-white); border-top: 1px solid var(--tornib-light); padding: 40px 24px 24px; }
.h-footer-inner { max-width: var(--tornib-max); margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.h-footer-brand .h-logo { font-size: 1.4rem; margin-bottom: 12px; display: inline-block; }
.h-footer-brand p { font-size: 0.82rem; color: var(--tornib-gray); line-height: 1.65; max-width: 280px; }
.h-footer-col h5 { font-family: var(--tornib-font-ui); font-size: 0.65rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.15em; color: var(--tornib-dark); margin-bottom: 14px; }
.h-footer-col a { display: block; font-size: 0.82rem; color: var(--tornib-gray); margin-bottom: 8px; transition: color 0.2s; }
.h-footer-col a:hover { color: var(--tornib-black); }
.h-footer-bottom { max-width: var(--tornib-max); margin: 32px auto 0; padding-top: 20px; border-top: 1px solid var(--tornib-light); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.h-footer-copy { font-family: var(--tornib-font-ui); font-size: 0.72rem; color: var(--tornib-gray); }
.h-footer-disclaimer { font-family: var(--tornib-font-ui); font-size: 0.68rem; color: #999; max-width: var(--tornib-max); margin: 16px auto 0; padding: 0 24px; line-height: 1.6; }

/* COOKIES BANNER */
.h-cookie-overlay { position: fixed; bottom: 20px; right: 20px; z-index: 999; max-width: 380px; background: var(--tornib-white); border: 1px solid var(--tornib-light); box-shadow: 0 8px 32px rgba(0,0,0,0.1); padding: 24px; display: block; }
#h-cookie-close:target ~ .h-cookie-overlay,
#h-cookie-accept:checked ~ .h-cookie-overlay { display: none; }
.h-cookie-overlay p { font-size: 0.82rem; color: var(--tornib-gray); margin-bottom: 16px; line-height: 1.55; }
.h-cookie-btns { display: flex; gap: 10px; }
.h-cookie-btn { padding: 10px 20px; font-family: var(--tornib-font-ui); font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; border: none; cursor: pointer; min-height: 44px; transition: opacity 0.2s; }
.h-cookie-accept { background: var(--tornib-black); color: var(--tornib-white); }
.h-cookie-decline { background: var(--tornib-light); color: var(--tornib-dark); }
.h-cookie-link { font-size: 0.72rem; color: var(--tornib-gray); display: block; margin-top: 10px; text-decoration: underline; }

/* SUCCESS PAGE */
.h-success { max-width: 600px; margin: 0 auto; padding: 120px 24px; text-align: center; }
.h-success h1 { font-family: var(--tornib-font-head); font-size: 2.4rem; font-weight: 400; margin-bottom: 16px; }
.h-success p { color: var(--tornib-gray); margin-bottom: 32px; }
.h-success a { font-family: var(--tornib-font-ui); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--tornib-black); border-bottom: 1px solid var(--tornib-black); padding-bottom: 4px; }

/* 404 PAGE */
.h-404 { max-width: 600px; margin: 0 auto; padding: 120px 24px; text-align: center; }
.h-404 h1 { font-family: var(--tornib-font-head); font-size: 6rem; font-weight: 300; color: var(--tornib-light); margin-bottom: 12px; }
.h-404 h2 { font-family: var(--tornib-font-head); font-size: 1.6rem; font-weight: 400; margin-bottom: 20px; }
.h-404 p { color: var(--tornib-gray); margin-bottom: 32px; }
.h-404-links { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.h-404-links a { font-family: var(--tornib-font-ui); font-size: 0.82rem; color: var(--tornib-dark); transition: color 0.2s; }
.h-404-links a:hover { color: var(--tornib-black); }

/* LEGAL PAGES */
.h-legal { max-width: 720px; margin: 0 auto; padding: 64px 24px; }
.h-legal h1 { font-family: var(--tornib-font-head); font-size: 2rem; font-weight: 400; margin-bottom: 32px; color: var(--tornib-black); border-bottom: 1px solid var(--tornib-light); padding-bottom: 16px; }
.h-legal h2 { font-family: var(--tornib-font-head); font-size: 1.2rem; font-weight: 600; margin: 28px 0 10px; color: var(--tornib-dark); }
.h-legal p { font-size: 0.92rem; color: var(--tornib-gray); margin-bottom: 14px; line-height: 1.7; }

/* ARTICLE LIST on home — table of contents style */
.h-toc { margin: 48px 0; }
.h-toc h2 { font-family: var(--tornib-font-head); font-size: 1.4rem; font-weight: 400; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--tornib-light); }
.h-toc-item { display: flex; align-items: baseline; gap: 16px; padding: 16px 0; border-bottom: 1px dotted var(--tornib-rule); transition: padding-left 0.3s; }
.h-toc-item:hover { padding-left: 12px; }
.h-toc-num { font-family: var(--tornib-font-head); font-size: 1.3rem; font-weight: 300; color: var(--tornib-rule); flex-shrink: 0; width: 32px; }
.h-toc-title { font-family: var(--tornib-font-head); font-size: 1.05rem; color: var(--tornib-dark); }
.h-toc-cat { font-family: var(--tornib-font-ui); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--tornib-gray); margin-left: auto; flex-shrink: 0; }

/* ANIMATIONS */
@keyframes h-fade-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.h-reveal { animation: h-fade-in 0.7s ease forwards; }
.h-reveal-d1 { animation: h-fade-in 0.7s 0.1s ease both; }
.h-reveal-d2 { animation: h-fade-in 0.7s 0.2s ease both; }
.h-reveal-d3 { animation: h-fade-in 0.7s 0.3s ease both; }

/* RESPONSIVE */
@media(max-width:900px) {
  .h-main { grid-template-columns: 1fr; gap: 40px; }
  .h-sidebar { position: static; }
  .h-cards { grid-template-columns: 1fr; }
  .h-hero { padding: 48px 24px 32px; }
  .h-footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .h-nav { display: none; }
  .h-burger { display: flex; }
}
@media(max-width:480px) {
  html { font-size: 15px; }
  .h-hero h1 { font-size: 1.8rem; }
  .h-nl-form { flex-direction: column; }
  .h-footer-bottom { flex-direction: column; }
}