/* ============================================================
   RNAmotifs 2.0 tutorial — styled to match R2NiTO design system
   (mirrors css/nothing.css tokens; standalone for iframe use)
   ============================================================ */

:root {
  --bg:        #fafafa;
  --bg-alt:    #f2f2f2;
  --fg:        #111;
  --fg-muted:  #777;
  --fg-label:  #999;
  --border:    #e0e0e0;
  --accent:    #e1001a;
  --white:     #fff;
  --radius:    6px;
  --font-head: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-body: 'Space Grotesk', sans-serif;
  --ease:      cubic-bezier(.25,.1,.25,1);
}

* , *::before, *::after { box-sizing: border-box; }

html { font-size: 16px; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.7;
}

.wrap { max-width: 860px; margin: 0 auto; padding: 3rem 1.6rem 5rem; }

/* ---- tutorial top bar / breadcrumb ---- */
.tut-nav {
  display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; align-items: center;
  padding-bottom: 1.4rem; margin-bottom: 2.2rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono); font-size: .78rem;
  letter-spacing: .02em; text-transform: uppercase;
}
.tut-nav a { color: var(--fg-muted); }
.tut-nav a:hover { color: var(--accent); }
.tut-nav .here { color: var(--fg); }
.tut-nav .sep { color: var(--border); }

/* ---- headings ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head); font-weight: 700;
  line-height: 1.2; color: var(--fg);
}
h1 { font-size: 2.1rem; margin: 0 0 1.4rem; letter-spacing: -.02em; }

/* ---- intro logo ---- */
.tut-logo { display: block; width: 100%; max-width: 560px; height: auto; margin: 0 auto 2rem; }

/* ---- inline figures (example maps) ---- */
.tut-fig {
  display: block; width: 100%; height: auto; margin: 0 auto 1.5rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--white);
}
h2 {
  font-size: 1.4rem; margin: 2.6rem 0 1rem;
  padding-bottom: .4rem; border-bottom: 1px solid var(--border);
}
h3 { font-size: 1.12rem; margin: 1.8rem 0 .7rem; }

p { margin: 0 0 1.1rem; }

a { color: var(--accent); text-decoration: none; transition: color .2s var(--ease); }
a:hover { text-decoration: underline; }
::selection { background: var(--fg); color: var(--white); }

strong { font-weight: 700; }

/* ---- download button ---- */
.tut-download {
  display: inline-block; margin: 0 0 1.4rem;
  padding: .7rem 1.2rem; border-radius: var(--radius);
  background: var(--accent); color: var(--white) !important;
  font-family: var(--font-mono); font-size: .82rem; font-weight: 500;
  letter-spacing: .02em; text-decoration: none;
  transition: filter .2s var(--ease);
}
.tut-download:hover { filter: brightness(.88); text-decoration: none; }

/* ---- inline code ---- */
code {
  font-family: var(--font-mono); font-size: .85em;
  background: var(--bg-alt); border: 1px solid var(--border);
  padding: .08em .38em; border-radius: 4px;
}

/* ---- code blocks ---- */
pre {
  font-family: var(--font-mono); font-size: .82rem; line-height: 1.55;
  background: #111; color: #f2f2f2;
  padding: 1.05rem 1.2rem; border-radius: var(--radius);
  overflow-x: auto; margin: 0 0 1.4rem;
}
pre code { background: none; border: none; padding: 0; color: inherit; font-size: inherit; }

/* ---- lists ---- */
ul, ol { margin: 0 0 1.2rem; padding-left: 1.4rem; }
li { margin: .35rem 0; }
li > ul, li > ol { margin: .35rem 0; }

/* ---- blockquotes / callouts ---- */
blockquote {
  margin: 0 0 1.3rem; padding: .85rem 1.1rem;
  background: var(--bg-alt);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}
blockquote p { margin: 0 0 .5rem; }
blockquote p:last-child { margin-bottom: 0; }

/* ---- tables ---- */
.table-wrap { overflow-x: auto; margin: 0 0 1.5rem; }
table {
  border-collapse: collapse; width: 100%;
  font-size: .9rem;
}
th, td {
  text-align: left; padding: .55rem .8rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
thead th {
  font-family: var(--font-mono); font-size: .76rem;
  text-transform: uppercase; letter-spacing: .03em;
  color: var(--fg-label); border-bottom: 2px solid var(--border);
}
tbody tr:hover { background: var(--bg-alt); }
td code, th code { white-space: nowrap; }

/* ---- horizontal rule ---- */
hr { border: 0; border-top: 1px solid var(--border); margin: 2.4rem 0; }

/* ---- footer back-link ---- */
.tut-foot {
  margin-top: 3rem; padding-top: 1.3rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono); font-size: .78rem;
  color: var(--fg-muted);
}

@media (max-width: 600px) {
  h1 { font-size: 1.7rem; }
  .wrap { padding: 2rem 1.1rem 3.5rem; }
}
