/* ============================================================
   Opt.Gear blog — shared stylesheet for blog/index.html and posts.
   Same design system as the hub: white ground, hairlines, one
   violet accent, Pretendard only. Flat — no shadows, no badges.
   ============================================================ */
:root{
  --bg:#FFFFFF;
  --bg-soft:#FAFAFC;
  --bg-tint:#F7F5FC;
  --line:#E9E7F0;
  --line-2:#D9D6E4;
  --fg:#17141F;
  --fg-2:#5A5668;
  --fg-3:#8D89A0;
  --violet:#5B21D9;
  --violet-deep:#4A1AB8;
  --violet-hi:#7C4DFF;
  --wash:rgba(91,33,217,.06);
  --wash-line:rgba(91,33,217,.25);
  --term:#141118;
  --term-fg:#EEEBF4;
  --term-fg-2:#A9A4B8;
  --term-fg-3:#6F6A80;
  --maxw:1180px;
  --gut:28px;
  --sans:'Pretendard Variable',Pretendard,-apple-system,system-ui,sans-serif;
  --code:ui-monospace,'Cascadia Mono',Consolas,Menlo,monospace;
}
*{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{background:var(--bg);color:var(--fg);font-family:var(--sans);font-size:16px;line-height:1.68;
  -webkit-font-smoothing:antialiased;font-variant-numeric:tabular-nums}
a{color:inherit;text-decoration:none}
img,svg{display:block;max-width:100%}
:focus-visible{outline:2px solid var(--violet);outline-offset:3px}
::selection{background:var(--violet);color:#fff}
.wrap{max-width:var(--maxw);margin:0 auto;padding:0 var(--gut)}

.btn{display:inline-flex;align-items:center;gap:9px;padding:12px 24px;border-radius:100px;
  font-size:15px;font-weight:600;border:1px solid transparent;cursor:pointer;
  transition:background .15s,border-color .15s,color .15s;font-family:var(--sans)}
.btn-fill{background:var(--violet);color:#fff}
.btn-fill:hover{background:var(--violet-deep)}
.btn-line{border-color:var(--line-2);color:var(--fg)}
.btn-line:hover{border-color:var(--violet);color:var(--violet-deep);background:var(--wash)}
.pending{color:var(--fg-3);cursor:default}

/* ---- nav (same skeleton as the hub) ---- */
nav{position:sticky;top:0;z-index:60;background:rgba(255,255,255,.9);backdrop-filter:blur(14px);border-bottom:1px solid var(--line)}
.nav-in{display:flex;align-items:center;gap:36px;height:64px}
.logo{display:flex;align-items:center;flex:none;color:var(--fg)}
.logo img{display:block;width:86px;height:auto}
.nav-links{display:flex;gap:26px;font-size:14.5px;font-weight:600;color:var(--fg-2);margin-right:auto}
.nav-links a:hover{color:var(--violet-deep)}
.nav-links a[aria-current="page"]{color:var(--fg);font-weight:650}
.nav-right{display:flex;align-items:center;gap:12px;flex:none}
.nav-right .btn{padding:9px 18px;font-size:14px}
@media(max-width:1000px){.nav-links{display:none}.nav-in{justify-content:space-between}}

/* ---- blog index ---- */
.masthead{padding:28px 0 20px}
.masthead .wrap,.postlist>.wrap{max-width:960px}
.masthead img{height:52px;width:auto}
.masthead h1{font-size:clamp(30px,4vw,44px);font-weight:760;letter-spacing:-.028em;margin-top:0}
.masthead p{color:var(--fg-2);margin-top:10px;max-width:none;font-size:16.5px;white-space:nowrap}
.postlist{padding:28px 0 88px}
.post-layout{display:block}
.featured{border:1px solid var(--line);border-radius:16px;overflow:hidden;background:var(--bg);display:flex;flex-direction:column}
.featured .thumb{display:block;height:clamp(280px,25vw,320px);border-bottom:1px solid var(--line);overflow:hidden}
.featured .thumb img{width:100%;height:100%;object-fit:cover}
.featured .bd{padding:26px 28px;background:#fff;display:flex;flex:0 0 auto;flex-direction:column}
.featured .meta{font-size:13px;color:var(--fg-3);font-weight:550}
.featured h2{font-size:22px;font-weight:720;letter-spacing:-.02em;line-height:1.25;margin:9px 0 10px}
.featured .bd>p:not(.meta){color:var(--fg-2);font-size:14.5px}
.featured .go{display:inline-block;margin-top:17px;font-size:14px;font-weight:650;color:var(--violet-deep)}
.featured .go:hover{text-decoration:underline;text-underline-offset:3px}
@media(max-width:760px){.featured .bd{padding:24px}}
.post-grid{display:grid;grid-template-columns:1fr;gap:16px;margin-top:20px}
.post-card{border:1px solid var(--line);border-radius:16px;overflow:hidden;background:var(--bg);display:grid;grid-template-columns:260px minmax(0,1fr)}
.post-card .thumb{display:block;min-height:190px;border-right:1px solid var(--line);overflow:hidden}
.post-card .thumb img{width:100%;height:100%;object-fit:cover}
.post-card .bd{padding:24px 28px;display:flex;flex-direction:column}
.post-card .meta{font-size:13px;color:var(--fg-3);font-weight:550}
.post-card h2{font-size:22px;font-weight:720;letter-spacing:-.02em;line-height:1.25;margin:9px 0 10px}
.post-card .bd>p:not(.meta){color:var(--fg-2);font-size:14.5px;flex:1}
.post-card .go{display:inline-block;margin-top:17px;font-size:14px;font-weight:650;color:var(--violet-deep)}
.post-card h2 a:hover,.post-card .go:hover{text-decoration:underline;text-underline-offset:3px}
@media(max-width:700px){
  .post-card{grid-template-columns:1fr}
  .post-card .thumb{min-height:0;aspect-ratio:16/9;border-right:0;border-bottom:1px solid var(--line)}
  .post-card .bd{padding:22px 20px 24px}
}
.upcoming{margin-top:44px}
.upcoming h3{font-size:14px;font-weight:650;color:var(--fg-3);margin-bottom:6px}
.upcoming li{list-style:none;display:flex;justify-content:space-between;gap:20px;align-items:baseline;
  padding:15px 4px;border-bottom:1px solid var(--line);font-size:15px}
.upcoming li b{font-weight:650}
.upcoming li span{color:var(--fg-3);font-size:13.5px;text-align:right}
.upcoming li a:hover b{color:var(--violet-deep)}
.upcoming li a b::after{content:" →";color:var(--violet-deep);opacity:0;transition:opacity .15s}
.upcoming li a:hover b::after{opacity:1}

/* ---- about: product tiles + fact strip ---- */
.tiles{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin-top:36px}
.tile{border:1px solid var(--line);border-radius:16px;padding:26px;display:flex;flex-direction:column}
.tile.lead{border-color:var(--wash-line)}
.tile .cls{font-size:12.5px;font-weight:650;color:var(--fg-3)}
.tile.lead .cls{color:var(--violet)}
.tile h3{font-size:20px;font-weight:720;letter-spacing:-.015em;margin:6px 0 8px}
.tile p{font-size:14.5px;color:var(--fg-2);flex:1}
.tile .go{margin-top:16px;font-size:14px;font-weight:650;color:var(--violet-deep)}
.tile .go:hover{text-decoration:underline;text-underline-offset:3px}
.tile .flow{margin-top:14px;font-size:13px;color:var(--fg-3)}
.tiles.two{grid-template-columns:repeat(2,1fr)}
@media(max-width:900px){.tiles,.tiles.two{grid-template-columns:1fr}}
.facts{display:grid;grid-template-columns:repeat(3,1fr);gap:0 32px;margin-top:44px}
.facts div{padding:16px 0;border-top:1px solid var(--line)}
.facts b{display:block;font-size:17px;font-weight:680}
.facts span{display:block;font-size:13px;color:var(--fg-3);margin-top:3px}
@media(max-width:700px){.facts{grid-template-columns:1fr}}
.sec-pad{padding:28px 0 88px}
.sec-pad h2{font-size:clamp(22px,2.8vw,30px);font-weight:730;letter-spacing:-.02em}
.sec-pad>.wrap>p{color:var(--fg-2);margin-top:12px;max-width:640px}

/* ---- article (scoped to .post so the index's <article> cards stay free) ---- */
.post{max-width:760px;margin:0 auto;padding:72px var(--gut) 40px}
.post .meta{font-size:13.5px;color:var(--fg-3);font-weight:550}
.post .meta b{color:var(--violet);font-weight:650}
.post h1{font-size:clamp(30px,4.4vw,46px);font-weight:770;letter-spacing:-.03em;line-height:1.12;margin:14px 0 16px}
.post .standfirst{font-size:18px;color:var(--fg-2);line-height:1.6}
.post .byline{margin-top:22px;padding-top:18px;border-top:1px solid var(--line);font-size:13.5px;color:var(--fg-3)}
.post .byline b{color:var(--fg-2);font-weight:600}

.keypoints{margin:34px 0;border:1px solid var(--line);border-radius:14px;background:var(--bg-soft);padding:22px 26px}
.keypoints h2{font-size:14px;font-weight:700;color:var(--fg-3);margin-bottom:10px}
.keypoints li{list-style:none;padding:5px 0 5px 22px;position:relative;font-size:15px;color:var(--fg-2)}
.keypoints li::before{content:"";position:absolute;left:4px;top:14px;width:7px;height:7px;border-radius:2px;background:var(--violet)}
.keypoints li b{color:var(--fg);font-weight:650}

.post figure.lead{margin:36px 0;border:1px solid var(--line);border-radius:16px;overflow:hidden}
.post figure.lead img{width:100%;aspect-ratio:16/8;object-fit:cover}
/* diagrams must never be cropped — show them at their natural ratio */
.post figure.lead.diagram img{aspect-ratio:auto;height:auto;object-fit:initial}
.post figcaption{font-size:13px;color:var(--fg-3);padding:12px 18px;border-top:1px solid var(--line)}

.post h2:not(.keypoints h2){font-size:clamp(21px,2.6vw,27px);font-weight:720;letter-spacing:-.02em;margin:52px 0 14px}
.post h3{font-size:17px;font-weight:680;margin:30px 0 8px}
.post p{color:var(--fg-2);margin:14px 0}
.post p b,.post li b{color:var(--fg);font-weight:650}
.post a.inl{color:var(--violet-deep);font-weight:600}
.post a.inl:hover{text-decoration:underline;text-underline-offset:3px}
ul.feats{margin:16px 0;padding:0}
ul.feats li{list-style:none;padding:9px 0 9px 24px;position:relative;color:var(--fg-2)}
ul.feats li::before{content:"";position:absolute;left:4px;top:19px;width:7px;height:7px;border-radius:2px;background:var(--violet)}

.tbl{overflow-x:auto;border:1px solid var(--line);border-radius:14px;background:var(--bg);margin:22px 0}
table{width:100%;border-collapse:collapse;font-size:13.5px;min-width:620px}
th,td{padding:10px 14px;text-align:right;white-space:nowrap;border-bottom:1px solid var(--line)}
th:first-child,td:first-child{text-align:left}
thead th{font-size:12.5px;color:var(--fg-3);font-weight:600;background:var(--bg-soft)}
thead th.ours{color:var(--violet);background:#F3EEFC}
tbody td{color:var(--fg-2)}
tbody td:first-child{color:var(--fg);font-weight:550}
td.ours{color:var(--fg);font-weight:650;background:var(--wash)}
tbody tr:last-child td{border-bottom:0}
.th-logo{display:inline-block;width:18px;height:18px;border-radius:5px;object-fit:cover;vertical-align:-4px;margin-right:7px}
.tbl-cap{font-size:13px;color:var(--fg-3);margin-top:-10px}

.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:0 28px;margin:24px 0}
.stats div{padding:14px 0;border-top:1px solid var(--line)}
.stats b{display:block;font-size:22px;font-weight:720;letter-spacing:-.02em;color:var(--violet)}
.stats span{display:block;font-size:12px;color:var(--fg-3);margin-top:2px}
@media(max-width:640px){.stats{grid-template-columns:repeat(2,1fr)}}

pre.code{background:var(--term);border-radius:14px;padding:20px 22px;margin:20px 0;
  font-family:var(--code);font-size:12.5px;line-height:1.85;color:var(--term-fg-2);overflow-x:auto}
pre.code .kw{color:var(--violet-hi)}
pre.code .st{color:var(--term-fg)}
pre.code .cm{color:var(--term-fg-3)}

.post-foot{max-width:760px;margin:0 auto;padding:8px var(--gut) 64px}
.post-foot .backrow{display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap;
  border-top:1px solid var(--line);padding-top:22px;font-size:14.5px}
.post-foot a{color:var(--violet-deep);font-weight:600}
.post-foot a:hover{text-decoration:underline;text-underline-offset:3px}

/* ---- shared footer ---- */
.disc{border-top:1px solid var(--line);padding:30px 0;background:var(--bg-soft)}
.disc p{font-size:13px;color:var(--fg-3);max-width:820px}
footer{border-top:1px solid var(--line);padding:40px 0}
.foot-btm{display:flex;justify-content:space-between;gap:28px;flex-wrap:wrap;font-size:13px;color:var(--fg-3)}
.foot-btm a:hover{color:var(--violet-deep)}

/* Mobile-only refinements shared by Blog, About, and article pages. */
@media(max-width:700px){
  :root{--gut:20px}
  body{font-size:15px;line-height:1.64;overflow-x:hidden}
  .nav-in{height:60px;gap:11px;justify-content:flex-start}
  .logo img{width:72px}
  .nav-links{
    display:flex;gap:10px;margin:0 auto 0 0;font-size:11.5px;white-space:nowrap;
  }
  .nav-right{min-width:0}
  .nav-right .btn{
    min-height:38px;max-width:100%;padding:7px 12px;font-size:11.5px;
    white-space:nowrap;
  }

  .masthead{padding:22px 0 26px}
  .masthead img{height:40px}
  .masthead h1{font-size:32px;line-height:1.12;margin-top:0}
  .masthead p{font-size:15px;line-height:1.6;white-space:normal}
  .postlist,.sec-pad{padding:24px 0 68px}
  .featured{border-radius:14px}
  .featured .thumb{min-height:0;height:auto;flex:none;aspect-ratio:16/9}
  .featured .bd{padding:22px 20px 24px}
  .featured h2{font-size:23px}
  .featured p{font-size:14.5px}
  .upcoming{margin-top:34px}
  .upcoming li{
    align-items:flex-start;padding:14px 0;font-size:14.5px;
  }
  .upcoming li span{font-size:12.5px}

  .tiles{margin-top:28px;gap:14px}
  .tile{padding:22px 20px;border-radius:14px}
  .facts{margin-top:34px}

  .post{padding:48px var(--gut) 30px}
  .post h1{font-size:34px;line-height:1.1;margin:12px 0 14px}
  .post .standfirst{font-size:16.5px;line-height:1.58}
  .post .byline{margin-top:18px;padding-top:15px}
  .keypoints{margin:28px 0;padding:18px 18px;border-radius:12px}
  .keypoints li{padding-left:20px;font-size:14px}
  .post figure.lead{margin:28px 0;border-radius:12px}
  .post figcaption{padding:10px 13px;font-size:12px}
  .post h2:not(.keypoints h2){font-size:23px;margin:40px 0 12px}
  .post h3{font-size:16.5px;margin-top:26px}
  .post p,ul.feats li{font-size:15px}
  ul.feats li{padding-left:22px}
  .post .tbl{
    margin-left:calc(var(--gut) * -1);margin-right:calc(var(--gut) * -1);
    border-left:0;border-right:0;border-radius:0;
  }
  .post table{font-size:12.5px}
  .post th,.post td{padding:9px 12px}
  .stats{gap:0 18px}
  .stats b{font-size:20px}
  pre.code{
    margin-left:calc(var(--gut) * -1);margin-right:calc(var(--gut) * -1);
    padding:18px 20px;border-radius:0;font-size:11.5px;
  }
  .post-foot{padding-bottom:50px}
  .disc{padding:26px 0}
  footer{padding:32px 0}
  .foot-btm{gap:8px;flex-direction:column}
}

@media(prefers-reduced-motion:reduce){*{transition:none!important}html{scroll-behavior:auto}}
