:root {
    font-family: sans-serif;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
    scroll-behavior: smooth;
    --bg: #f9f9f9;
    --bdr: #ddd;
    --t: #ff6600;
    --code : #f5eae2;
}
p,li,code,a{
  line-height: 25px;
}
body {
    margin: 0;
    display: grid;
    grid-template-rows: repeat(6, auto);
    grid-template-columns: repeat(6, auto);
}
body.night{
    background: rgb(47, 47, 47);
    color: #a9a9a9;
    --bg: #4b4b4b;
    --code: #69574a;
    --bdr: #615342;
}
body a{
    color: var(--t);
}
body a:visited{
    color: #ff0000;
}
pre {
    display: flex;
    align-items: flex-start;
    flex-direction: row;
    gap: 5px;
}

h1 {
    color: var(--t);
    padding-bottom: 10px;
    border-bottom: solid 1px var(--bdr);
}

/* pre code {
    display: block;
    text-wrap: wrap;
    line-break: anywhere;
    background: var(--bg);
    padding: 5px;
    border: solid 1px var(--bdr);
    border-radius: 5px;
} */

pre span {
    padding: 5px;
    border: solid 1px var(--bdr);
    border-radius: 5px;
}

header {
    grid-area: 1/1/2/-1;
}

aside {
    grid-area: 2/1/3/2;
}

#context {
    grid-area: 2/2/3/-1;
}

#content {
    grid-area: 3/1/5/-1;
}

footer {
    grid-area: 5/1/-1/-1;
}

p,
li {
    font-size: 14px;
    line-height: 20px;
    word-spacing: .1rem;
}

#started {
    border: solid 2px #d95903;
    width: fit-content;
    padding: 5px 10px 2.5px 10px;
    border-radius: 5px;
    background-color: var(--t);
    color: #fff;
}

aside {
    width: 120px;
    margin: 20px 0;
    padding: 12px;
    border: 1px solid var(--bdr);
    border-left: none;
    border-radius: 0 10px 10px 0;
    background: var(--bg);
    line-height: 1.6;
}

aside a {
    display: block;
    margin: 6px 0;
    /* color: #ff6600; */
    text-decoration: none;
    font-size: 14px;
}

aside a:hover {
    text-decoration: underline;
}

aside code {
    font-family: Consolas, monospace;
    background: var(--code);
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 0.85rem;
}

#sys_btns .btn {
    font-size: 25px;
}

.hide {
    display: none;
}

header {
    height: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px;
    background: var(--bg);
    border-bottom: solid 1px var(--bdr);
}

#logo_main {
    display: flex;
    align-items: center;
    gap: 5px;
}

div#sys_btns {
    display: flex;
    gap: 10px;
}

#mode {
    display: flex;
    align-items: center;
}

footer {
    background-color: var(--bg);
    border: solid 1px var(--bdr);
    margin: 10px;
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
}

#social,
#guide,
#pages {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;

}

footer a {
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

#footer_info p {
    margin: 0;
}

#footer_info>.desc {
    font-size: 20px;
    margin-bottom: 5px;
}

#footer_info code {
    padding: 2px 5px;
    border: solid 1px var(--bdr);
    background-color: var(--code);
    border-radius: 5px;
    color: var(--t);
}

#web {
    display: flex;
    align-items: center;
    gap: 5px;
}
#credit{
    align-self: flex-end;
    margin: 10px 0 0 0;
}
#search_div{
    position: relative;
}
[data-tg="sugs"]{
    position: absolute;
    right: 0;
    background: var(--bg);
    padding: 5px;
    margin-top: 20px;
    border: solid 1px var(--bdr);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    z-index: 999;
    box-shadow: 0 0 5px #ddd;
}
[data-tg="sug"]{
    padding: 6px 6px;
    border-radius: 5px 5px 0 0;
    display: flex;
    flex-direction: row;
    gap: 5px;
    transition: all ease 600ms;
}
[data-tg="sug"]:hover{
    border-radius: 5px;
    background: var(--bdr);
}
[data-tg="sug"]:not(:last-of-type){
    border-bottom: solid 1px var(--bdr);
}

[data-tg="sug"]>a{
    text-decoration: none;
}
[data-tg="sug"]>img{
    height: 20px;
}
[data-tg="input"]{
    height: -webkit-fill-available;
    border: solid 2px var(--bdr);
    border-radius: 5px;
    padding: 5px;
    outline: none;
    background-color: var(--code);
    color: var(--t);
}
[data-tg="input"]::placeholder{
    color: var(--t);
}
code {
  background: var(--code);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9rem;
  color: var(--t);
  line-break: anywhere;
  white-space: break-spaces;
}

  section h2,
  section h3,
  section h4{
    margin-bottom: 0;
    margin-top: 20px;
  }
  section h3,
  section h3+p{
    margin-left:15px;
  }
  section h4,
  section h4+p{
    margin-left: 30px;

  }
  section h4+p,
  section h3+p{
    margin-top: 0;
    margin-bottom: 0;
    margin-right: 0;
  }
  /* General section styling */
  section {
    margin: 10px auto;
    padding: 24px;
    background: var(--bg);
    border: 1px solid var(--bdr);
    border-radius: 12px;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
  }

  /* Section headings */
  section h2 {
    font-size: 1.8rem;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--t);
    padding-bottom: 6px;
  }

  /* Paragraphs */

  /* Lists */
  section ul {
    margin: 16px 0;
    padding-left: 20px;
  }

  section ul li {
    margin-bottom: 10px;
  }

  /* Inline code styling */
  

  /* Logo var styling */

  .chart_div {
    width: 84vw;
    overflow: scroll;
  }

  #content,
  #context {
    padding: 10px;
  }

  div#comparison_table_container {
    width: 84vw;
    overflow: scroll;
  }

  .comparison-table-wrapper {
    position: relative;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin: 20px 0;
  }

  .comparison-table-wrapper::after {
    content: "⇆ Scroll to view more";
    position: absolute;
    bottom: 8px;
    right: 16px;
    font-size: 12px;
    color: #6b7280;
    background: rgba(255, 255, 255, 0.8);
    padding: 2px 6px;
    border-radius: 4px;
    pointer-events: none;
  }

  table {
    border-collapse: collapse;
    width: 100%;
    min-width: 700px;
    /* ensures scroll on smaller screens */
    font-family: system-ui, sans-serif;
  }

  thead {
    background: var(--code);
  }

  th,
  td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
  }
  th{
    color: var(--t)
  }

  /* Simple, inline visual bars without external CSS */
  .chart {
    width: 700px;
    margin: 16px 0 28px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
  }

  .row {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 12px;
    align-items: center;
    margin: 10px 0;
  }

  .label {
    font-weight: 600;
  }

  .bars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    align-items: center;
  }

  .bar-wrap {
    display: grid;
    grid-template-rows: auto 10px;
    gap: 6px;
  }

  .bar-title {
    font-size: 12px;
    text-align: center;
  }

  .bar {
    height: 10px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
  }

  .fill {
    height: 100%;
    border-radius: 999px;
  }

  /* Colors per tech */
  .frag {
    background: #ff6600;
  }

  /* green */
  .react {
    background: #3b82f6;
  }

  /* blue */
  .vue {
    background: #22c55e;
  }

  /* lime */
  /* Legend */
  .legend {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    font-size: 12px;
  }

  .legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
  }

  /* Section subtitle */
  .subtitle {
    font-weight: 600;
    margin: 8px 0 4px;
  }

  .note{
    border: dotted 1px var(--t);
    border-radius: 5px;
    padding: 10px;
  }
  .note>h3{
    margin: 10px;
    margin-bottom:  0;
    border-bottom: dotted 1px var(--t);
  }
  .note>p{
    padding: 10px;
    margin: 0 10px;
    background: var(--code);
  }