/* Brand pastel UI (inspired by PastelType) */
@import url("https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;1,400&family=Nunito:wght@300;400;500;600;700&display=swap");

:root{
  --bg: #fff8fb;
  --surface: #ffffff;
  --border: #f0dde8;
  --pink-soft: #fce4ee;
  --pink-mid: #e8a0bc;
  --pink-deep: #c0607a;
  --text: #2e1a24;
  --muted: #9a6e80;
  --accent: #d4548a;
  --accent2: #7c3aed;
  --shadow: 0 10px 25px rgba(192,96,122,.10);
  --radius: 12px;
  --header-h: 56px;
  --cp-header-h: 56px; /* updated by JS for true header height */
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(212,84,138,.18), transparent 60%),
    radial-gradient(700px 450px at 95% 0%, rgba(124,58,237,.10), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: "Nunito", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  line-height:1.55;
  padding-top: calc(var(--cp-header-h) + 18px);
}

a{ color: var(--accent); text-decoration: none; }
a:hover{ text-decoration: underline; }

.cp-shell{
  display:grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
  max-width: 1100px;
  margin: 18px auto 60px;
  padding: 0 14px;
}

.cp-header{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 8px 14px;
  background: rgba(255,248,251,0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.cp-header-inner{
  max-width: 1100px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 8px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.cp-header-left{
  display:flex;
  align-items:center;
  gap: 10px;
  min-width: 0;
}

.cp-burger{
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  display:none;
  align-items:center;
  justify-content:center;
  padding: 8px;
  flex-shrink: 0;
}
.cp-burger:hover{
  background: var(--pink-soft);
  border-color: rgba(212,84,138,.35);
}
.cp-burger span{
  display:block;
  width: 18px;
  height: 2px;
  background: var(--pink-deep);
  border-radius: 2px;
  position: relative;
}
.cp-burger span::before,
.cp-burger span::after{
  content:"";
  position:absolute;
  left:0;
  width: 18px;
  height: 2px;
  background: var(--pink-deep);
  border-radius: 2px;
}
.cp-burger span::before{ top:-6px; }
.cp-burger span::after{ top:6px; }

.cp-overlay{
  display:none;
  position: fixed;
  inset: 0;
  background: rgba(46,26,36,0.35);
  z-index: 150;
  backdrop-filter: blur(2px);
}
.cp-overlay.is-open{ display:block; }

.cp-logo{
  font-family: "Lora", serif;
  font-style: italic;
  font-weight: 700;
  color: var(--pink-deep);
  display:flex;
  flex-direction:column;
  line-height:1.1;
}
.cp-logo-mark{
  font-size: 18px;
  letter-spacing: .2px;
}
.cp-logo-sub{
  font-family: "Nunito", sans-serif;
  font-style: normal;
  font-weight: 600;
  color: var(--muted);
  margin-top: 3px;
  font-size: 12.5px;
}

.cp-header-nav{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.cp-header-nav a{
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 13.5px;
}
.cp-header-nav a[aria-current="page"]{
  background: rgba(212,84,138,.08);
  border-color: rgba(212,84,138,.45);
  color: var(--pink-deep);
  font-weight: 700;
}
.cp-header-nav a:hover{
  border-color: rgba(212,84,138,.35);
  text-decoration:none;
  background: var(--pink-soft);
}

.cp-categories{
  position: relative;
}
.cp-categories summary{
  cursor:pointer;
  list-style: none;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--text);
  font-size: 13.5px;
  user-select: none;
}
.cp-categories summary::-webkit-details-marker{ display:none; }
.cp-categories-list{
  position:absolute;
  right:0;
  top: calc(100% + 8px);
  background:#fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 10px 10px;
  min-width: 230px;
  z-index: 10;
}
.cp-categories-list a{
  display:block;
  padding: 8px 8px;
  border-radius: 10px;
  color: var(--text);
  font-size: 13.5px;
  border: 1px solid transparent;
}
.cp-categories-list a:hover{
  background: rgba(212,84,138,.08);
  border-color: rgba(212,84,138,.22);
  text-decoration:none;
}

.cp-sidebar{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 16px;
  align-self:start;
  overflow-y: auto;
}

.cp-brand{
  display:flex;
  flex-direction:column;
  gap:2px;
  padding: 4px 4px 10px;
}
.cp-brand .name{
  font-weight: 900;
  letter-spacing:.2px;
  font-size: 18px;
}
.cp-brand .tag{
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

.cp-sidebar-title{
  margin-top: 6px;
  margin-bottom: 10px;
  font-size: 12.5px;
  font-weight: 900;
  color: var(--muted);
  letter-spacing: .2px;
  text-transform: uppercase;
}

.cp-nav{
  margin-top: 8px;
  display:flex;
  flex-direction:column;
  gap: 8px;
}
.cp-nav a{
  padding: 10px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 13.5px;
}
.cp-nav a:hover{
  border-color: rgba(212,84,138,.40);
  text-decoration:none;
  background: var(--pink-soft);
}
.cp-nav a[aria-current="page"]{
  border-color: rgba(212,84,138,.55);
  background: rgba(212,84,138,.08);
}

.cp-main{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  min-width:0;
}

.cp-topbar{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom: 14px;
}

.cp-hero{
  display:flex;
  flex-direction:column;
  gap: 10px;
  margin: 8px 0 12px;
}
.cp-hero h1{
  margin:0;
  font-size: 26px;
  line-height:1.2;
}
.cp-hero p{
  margin:0;
  color: var(--muted);
  max-width: 72ch;
  font-size: 14.8px;
}

.cp-tool{
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}
.cp-tool label{
  display:block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.cp-inputrow{
  display:flex;
  gap:10px;
  align-items:stretch;
}
textarea.cp-input{
  flex:1;
  min-height: 46px;
  resize: vertical;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 12px 12px;
  font-size: 15.5px;
  outline: none;
}
textarea.cp-input:focus{
  border-color: rgba(232,160,188,.90);
  box-shadow: 0 0 0 3px rgba(232,160,188,.25);
}

.cp-hint{
  margin-top:10px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  color: var(--muted);
  font-size: 13px;
}
.cp-pill{
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(212,84,138,.06);
  color: var(--text);
  font-weight: 650;
  font-size: 12.5px;
}

.cp-grid{
  margin-top: 14px;
  display:flex;
  flex-direction:column;
  gap: 10px;
}

.cp-card{
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  overflow:hidden;
}
.cp-card header{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(252,228,238,.95), rgba(232,160,188,.08));
}
.cp-card .label{
  font-size: 12.5px;
  color: var(--muted);
  white-space:nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
  font-weight: 650;
  flex: 1;
}
.cp-copy{
  border: 1px solid rgba(212,84,138,.35);
  background: rgba(212,84,138,.10);
  color: var(--pink-deep);
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 12.5px;
  cursor:pointer;
  font-weight: 750;
  white-space: nowrap;
}
.cp-copy:hover{
  background: rgba(212,84,138,.12);
}

.cp-output{
  padding: 12px;
  font-weight: 750;
  word-break: break-word;
  font-size: 18px;
  min-height: 44px;
  display:flex;
  align-items:center;
}

.cp-seo{
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.cp-seo h2{
  margin:0 0 10px;
  font-size: 18px;
}
.cp-seo article{
  color: rgba(15,23,42,.92);
  font-size: 14.8px;
}
.cp-seo article p{
  margin: 0 0 12px;
  color: rgba(15,23,42,.92);
}
.cp-seo article a{
  color: var(--accent);
  text-decoration: underline;
}

.cp-article{
  color: rgba(15,23,42,.92);
}
.cp-article h1{
  margin: 0 0 6px;
  font-size: 26px;
}
.cp-meta{
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 14px;
  font-weight: 650;
}
.cp-article p{
  margin: 0 0 12px;
  color: rgba(15,23,42,.92);
  font-size: 15px;
}
.cp-article hr{
  border:0;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}

.cp-list{
  display:flex;
  flex-direction:column;
  gap: 12px;
}
.cp-post{
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  padding: 14px;
}
.cp-post h3{
  margin:0 0 6px;
  font-size: 16px;
}
.cp-post p{
  margin:0 0 10px;
  color: var(--muted);
  font-weight: 600;
}
.cp-post a{
  display:inline-block;
  color: var(--accent);
  font-weight: 800;
}

.cp-footer{
  margin-top: 18px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 650;
}

.cp-badge{
  display:inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(124,58,237,.25);
  background: rgba(124,58,237,.08);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 750;
}

.cp-readmore{
  margin-top: 16px;
}
.cp-readmore-summary{
  cursor:pointer;
  font-weight: 900;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  display:block;
}
.cp-readmore-summary::-webkit-details-marker{ display:none; }
.cp-readmore[open] .cp-readmore-summary{
  border-color: rgba(212,84,138,.35);
}

noscript{
  color: #991b1b;
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.35);
  padding: 12px;
  border-radius: 12px;
}

.cp-home-panels{
  display:grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 16px;
  margin-bottom: 14px;
}
@media (min-width: 860px){
  .cp-home-panels{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.cp-home-panel{
  border: 1px solid var(--border);
  background:#fff;
  border-radius: var(--radius);
  padding: 14px;
}
.cp-home-panel h2{
  margin: 0 0 6px;
  font-size: 16px;
}
.cp-home-panel p{
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14.3px;
  font-weight: 600;
}
.cp-home-panel a.more{
  font-weight: 900;
}

@media (max-width: 880px){
  .cp-shell{ grid-template-columns: 1fr; }
  .cp-sidebar{ position: relative; top: 0; }
  /* Keep header in one row; allow horizontal scroll if needed. */
  .cp-header-inner{ flex-direction:row; align-items:center; }
  .cp-header-nav{
    justify-content:flex-end;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    gap: 8px;
  }
  .cp-header-nav::-webkit-scrollbar{ height: 0; }
}

@media (max-width: 700px){
  .cp-burger{ display:flex; }

  .cp-sidebar{
    position: fixed;
    top: var(--cp-header-h);
    left: 0;
    height: calc(100vh - var(--cp-header-h));
    width: 260px;
    max-width: 86vw;
    z-index: 160;
    transform: translateX(-110%);
    transition: transform 0.28s cubic-bezier(.4,0,.2,1);
    overflow-y: auto;
  }
  .cp-shell{
    grid-template-columns: 1fr;
  }
  .cp-sidebar.is-open{
    transform: translateX(0);
  }

  .cp-header-nav a{
    padding: 6px 10px;
    font-size: 13px;
  }
}

