/* Phlash — interfaccia in stile Slashdot, palette ruggine/ambra al posto del verde classico */

:root {
  --ink: #1c1410;
  --muted: #6b5344;
  --paper: #fff8f0;
  --page: #e8d5c0;
  --header: #140c08;
  --nav: #7c2d12;
  --accent: #c2410c;
  --accent-dark: #9a3412;
  --accent-hot: #ea580c;
  --cream: #fff7ed;
  --line: #d4a574;
  --link: #9a3412;
  --box: #f3e0cc;
}

* { box-sizing: border-box; }
html { font-size: 13px; }
body {
  margin: 0;
  background: #e8ddd3;
  color: var(--ink);
  font-family: Arial, Helvetica, Verdana, sans-serif;
  line-height: 1.45;
}

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

#sky { background: var(--header); color: var(--cream); }
#topbar {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 10px;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.logo {
  font-family: "Arial Narrow", "Franklin Gothic Medium", Impact, Arial, sans-serif;
  font-style: normal;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-decoration: none !important;
  line-height: 1;
  white-space: nowrap;
  padding: 8px 6px 8px 0;
}
.logo-slash { color: #f97316; }
.logo-a { color: #fff7ed; }
.logo-b { color: #f97316; }
.tagline {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 10px 7px;
  font-size: 11px;
  color: #e7b48a;
  line-height: 1.25;
}

#nav { display: flex; flex-wrap: wrap; align-items: center; }
#nav a {
  color: #ffedd5;
  text-decoration: none;
  padding: 8px 9px;
  font-size: 13px;
  font-weight: bold;
  display: inline-block;
}
#nav a:hover, #nav a.on { color: #fff; }
#nav em {
  font-style: normal;
  background: #f97316;
  color: #1c1008;
  padding: 0 5px;
  font-size: 10px;
  margin-left: 2px;
}
.btn-submit {
  background: #ea580c;
  color: #fff !important;
  font: bold 12px Arial, sans-serif;
  padding: 6px 12px;
  text-decoration: none !important;
  border-radius: 2px;
  white-space: nowrap;
}
.btn-submit:hover { background: #f97316; color: #fff !important; }
.top-search { margin-left: auto; }
.top-search input {
  width: 150px;
  padding: 5px 8px;
  border: 0;
  background: #2a1810;
  color: #ffedd5;
  font: 12px Arial, sans-serif;
}
.top-search input::placeholder { color: #c4a484; }
.top-user { display: flex; gap: 10px; align-items: center; font-size: 12px; }
.top-user a { color: #ffedd5; text-decoration: none; font-weight: bold; }
.top-user a:hover { color: #fff; text-decoration: underline; }

#subnav {
  background: #7c2d12;
  border-top: 1px solid #c2410c;
  padding: 0 10px;
  display: flex;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: 0 auto;
}
#subnav a {
  color: #ffedd5;
  text-decoration: none;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: bold;
}
#subnav a:hover, #subnav a.on { background: #9a3412; color: #fff; }

#page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 10px 40px;
}
#columns { display: flex; gap: 16px; align-items: flex-start; }
#articles { flex: 1; min-width: 0; }
#slashboxes { width: 250px; flex-shrink: 0; }

.admin-strip {
  background: #431407;
  color: #ffedd5;
  padding: 6px 10px;
  margin-bottom: 10px;
  font-size: 12px;
}
.admin-strip a { color: #fed7aa; margin-right: 12px; }

.flash {
  padding: 8px 10px;
  margin-bottom: 12px;
  border: 1px solid var(--accent);
  background: #ffedd5;
}
.flash-err { background: #fee2e2; border-color: #b91c1c; }

.page-h {
  font: italic 22px/1.2 Georgia, serif;
  color: var(--accent-dark);
  margin: 0 0 10px;
}
.page-h2 {
  font: italic 16px Georgia, serif;
  color: var(--accent-dark);
  margin: 22px 0 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 3px;
}
.page-intro { color: var(--muted); margin: 0 0 14px; }
.story-by { font-size: 12px; color: var(--muted); }

.story {
  position: relative;
  margin: 0 0 20px;
  background: #fff;
}
.story-icon {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
  width: 48px;
  height: 48px;
  background: var(--accent-dark);
  color: var(--cream);
  font: bold 15px Arial, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.5px;
  border: 1px solid #fff;
}
.story-icon i { font-size: 22px; line-height: 1; color: var(--cream); }
.topic-abbrev { letter-spacing: 0.5px; }
.story-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--accent-dark);
  padding: 8px 64px 8px 12px;
  min-height: 42px;
}
.story-title {
  margin: 0;
  flex: 1;
  min-width: 0;
  font: bold 18px/1.25 Arial, Helvetica, sans-serif;
}
.story-title a { color: #fff; text-decoration: none; }
.story-title a:hover { text-decoration: underline; color: #ffedd5; }
.story-src {
  font-weight: normal;
  font-size: 13px;
  color: #fdba74;
  margin-left: 6px;
}
.story-bubble {
  flex-shrink: 0;
  display: inline-block;
  min-width: 34px;
  margin-top: 2px;
  padding: 4px 9px 7px;
  background: #5c1d0c;
  color: #fff !important;
  font: bold 14px Arial, sans-serif;
  text-align: center;
  text-decoration: none !important;
  border-radius: 4px 4px 4px 0;
  position: relative;
  line-height: 1.1;
}
.story-bubble::after {
  content: "";
  position: absolute;
  left: 7px;
  bottom: -5px;
  border-width: 5px 5px 0 0;
  border-style: solid;
  border-color: #5c1d0c transparent transparent transparent;
}
.story-bubble:hover { background: #7c2d12; color: #fff !important; }
.story-bubble:hover::after { border-top-color: #7c2d12; }
.story-meta {
  margin: 0;
  background: #ece6de;
  padding: 5px 64px 5px 12px;
  font-size: 11px;
  color: #5c4a3e;
}
.story-meta a { font-weight: bold; }
.story-meta em { color: var(--accent); font-style: italic; }
.story-body { padding: 10px 12px 12px; color: #1a1a1a; }
.story-body img { max-width: 100%; height: auto; display: block; margin: 0.6em 0; }
.story-body p:last-child { margin-bottom: 0; }
.story-body h2, .story-body h3 {
  font: bold 16px Arial, sans-serif;
  color: var(--accent-dark);
  margin: 1em 0 0.4em;
}
.story-body blockquote {
  margin: 0.8em 0;
  padding: 6px 10px;
  border-left: 3px solid var(--accent);
  background: #fff7ed;
  color: #4a3728;
}
.story-body ul, .story-body ol { margin: 0.4em 0 0.8em 1.3em; }
.md-code, .story-body code {
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  background: #f4e6d4;
}
.md-code { display: block; padding: 8px; overflow: auto; border: 1px solid var(--line); }
.story-body code { padding: 0 3px; }
.story-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 4px 12px 10px;
  font-size: 11px;
  color: var(--muted);
}
.source { font-size: 12px; word-break: break-all; }
.badge-pending {
  background: #f97316;
  color: #1c1008;
  padding: 1px 6px;
  font-weight: bold;
}
.tags { font-size: 12px; margin: 0 0 18px; }
.tag {
  display: inline-block;
  background: #ffedd5;
  border: 1px solid var(--line);
  padding: 1px 6px;
  margin-right: 4px;
}

.phlashbox {
  background: var(--paper);
  border: 1px solid #9a3412;
  margin-bottom: 12px;
}
.phlashbox h4 {
  margin: 0;
  background: var(--accent);
  color: var(--cream);
  font: bold 12px Verdana, sans-serif;
  padding: 4px 8px;
}
.box-body { padding: 8px; font-size: 12px; }
.box-body label { display: block; font-size: 11px; margin-top: 6px; }
.box-body input[type=text],
.box-body input[type=password] {
  width: 100%;
  margin: 2px 0;
}
.plain { list-style: none; margin: 0; padding: 0; }
.plain li { margin: 0 0 5px; }
.tiny { font-size: 11px; }
.muted { color: var(--muted); }
.recent-c li { margin-bottom: 8px; line-height: 1.3; }
.poll-q { font-weight: bold; margin: 0 0 8px; }
.poll-opt { display: block; margin: 4px 0; font-weight: normal; }
.poll-row { display: flex; justify-content: space-between; font-size: 11px; }
.poll-bar {
  height: 8px;
  background: #f4e6d4;
  border: 1px solid var(--line);
  margin: 0 0 6px;
}
.poll-bar i {
  display: block;
  height: 100%;
  background: var(--accent);
}

.comments { margin-top: 22px; }
.comments-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--accent-dark);
  color: var(--cream);
  padding: 4px 10px;
}
.comments-bar h2 { margin: 0; font-size: 14px; }
.comments-bar select { font-size: 11px; }
.comments-bar label { margin-left: 8px; font-size: 11px; }

.cmt { margin: 8px 0; border: 1px solid var(--line); background: var(--paper); }
.cmt-head {
  background: #e8c4a0;
  padding: 3px 8px;
  font-size: 11px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.c-high > .cmt-head { background: #c2410c; color: #fff7ed; }
.c-high > .cmt-head a { color: #ffedd5; }
.c-good > .cmt-head { background: #f4a261; }
.c-neg > .cmt-head { background: #d6c4b4; color: var(--muted); }
.c-neg .cmt-text { opacity: 0.55; }
.coward { font-style: italic; color: var(--muted); font-weight: bold; }
.c-high .coward { color: #ffedd5; }
.cmt-score { font-weight: bold; }
.cmt-body { padding: 8px; }
.cmt-text { white-space: pre-wrap; }
.cmt-actions { margin-top: 8px; font-size: 11px; }
.cmt-kids { margin-left: 18px; padding-left: 8px; border-left: 2px solid #e8c4a0; }
.cmt.collapsed > .cmt-body { display: none; }
.cmt.c-below.collapsed .cmt-head { opacity: 0.7; }
.cmt-toggle {
  width: 18px;
  height: 18px;
  padding: 0;
  font-size: 12px;
  line-height: 1;
}

.post-comment {
  margin-top: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 12px;
}
.post-comment h3 { margin: 0 0 8px; font-size: 14px; color: var(--accent-dark); }

.md-wrap { width: 100%; }
.md-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 4px;
  background: #ece6de;
  border: 1px solid #c4a484;
  border-bottom: 0;
}
.md-bar button {
  background: #fff8f0;
  color: #9a3412;
  border: 1px solid #d4a574;
  padding: 3px 8px;
  font: bold 11px Arial, sans-serif;
  min-width: 28px;
  line-height: 1.2;
}
.md-bar button:hover { background: #ffedd5; color: #7c2d12; }
.md-bar button b, .md-bar button i { font-size: 12px; }
.md-bar button code {
  font: 11px "Courier New", Courier, monospace;
  background: transparent;
  color: inherit;
}
.md-sep {
  width: 1px;
  margin: 2px 4px;
  background: #d4a574;
  align-self: stretch;
}
.md-wrap textarea {
  width: 100%;
  margin: 0;
  border-top: 0;
  display: block;
}

input[type=text], input[type=password], input[type=email], input[type=url],
input[type=number], select, textarea {
  font: 13px Verdana, sans-serif;
  padding: 5px 6px;
  border: 1px solid #c4a484;
  background: #fff;
  width: 100%;
}
textarea { resize: vertical; }
.captcha { width: 80px !important; }
button, .vote-up {
  font: bold 11px Verdana, sans-serif;
  background: #c2410c;
  color: #fff7ed;
  border: 1px solid #7c2d12;
  padding: 4px 10px;
  cursor: pointer;
}
button:hover { background: #ea580c; }
button.primary { padding: 7px 14px; font-size: 13px; }
.chk { font-weight: normal !important; display: flex !important; align-items: center; gap: 6px; }
.chk input { width: auto !important; }

.stack { display: flex; flex-direction: column; gap: 10px; max-width: 720px; }
.stack.narrow { max-width: 400px; }
.stack label { font-size: 12px; font-weight: bold; }
.form-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.grow { flex: 1; min-width: 160px; }
.btn-row { display: flex; gap: 8px; }
.inline { display: inline; }
.inline-fields { display: flex; gap: 6px; flex-wrap: wrap; }
.topic-edit { flex-direction: column; align-items: flex-start; }
.inline-fields input { width: auto; }
.num { width: 70px !important; }
.nowrap { white-space: nowrap; }

.preview-box {
  border: 2px dashed var(--accent);
  padding: 12px;
  margin-bottom: 16px;
  background: #fff;
}

.grid {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  font-size: 12px;
}
.grid th, .grid td {
  border: 1px solid var(--line);
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}
.grid th { background: var(--box); }
.stats { display: flex; gap: 16px; list-style: none; padding: 0; flex-wrap: wrap; }
.stats li {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 10px 14px;
}

.pager { margin: 16px 0; font-size: 12px; }
.pager a, .pager strong { margin-right: 8px; }
.empty { background: var(--paper); padding: 16px; border: 1px solid var(--line); }

#foot {
  max-width: 1100px;
  margin: 0 auto 20px;
  padding: 12px 16px;
  color: var(--muted);
  font-size: 11px;
  border-top: 3px solid var(--accent-dark);
}
.soft-ver { margin: 8px 0 0; color: #9a7b68; }

#subnav a i, .plain a i { margin-right: 5px; width: 1em; text-align: center; }

.icon-field { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.icon-preview {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dark);
  color: var(--cream);
  flex-shrink: 0;
}
.icon-name { width: 140px !important; }
.topic-icon-cell { font-size: 18px; color: var(--accent-dark); text-align: center; }
#icon-picker {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: min(420px, calc(100% - 24px));
  max-height: 70vh;
  background: #fff8f0;
  border: 2px solid #c2410c;
  z-index: 80;
  display: flex;
  flex-direction: column;
}
#icon-picker[hidden] { display: none; }
.icon-picker-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  background: var(--accent);
  color: var(--cream);
  font-size: 12px;
}
.icon-picker-close {
  background: transparent;
  color: #fff;
  border: 0;
  font-size: 18px;
  line-height: 1;
  padding: 0 6px;
}
#icon-filter { width: auto; margin: 8px; }
.icon-grid {
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 3px;
  padding: 0 8px 8px;
}
.icon-choice {
  background: #fff;
  color: #9a3412;
  border: 1px solid #e8c4a0;
  padding: 6px 0;
  min-height: 32px;
}
.icon-choice:hover, .icon-choice.is-on { background: #ffedd5; border-color: #c2410c; }
.icon-choice.is-hidden { display: none; }

@media (max-width: 820px) {
  #columns { flex-direction: column; }
  #slashboxes { width: 100%; }
  .logo { font-size: 26px; }
  .top-search { margin-left: 0; }
  .cmt-kids { margin-left: 8px; }
  .story-head, .story-meta { padding-right: 58px; }
}
