/* -*- coding: utf-8 -*- */
@charset "utf-8";

* {
  margin: 0;
  padding: 0;
}
body{
    margin: 0 1.5em 0 1.5em;
    /* border: 1px solid red; */
    border-left: 2px dotted #ccc;
    /* border-right: 1px dotted #ccc; */
    padding: 15px;
    counter-reset:chapter;
    counter-reset:section;
    counter-reset:sample;
    counter-reset:exercise;
}
body#index h2 {
    padding-top: .2em;
}
body#index h2:before {
    counter-increment: none;
    content: "";
}
body#index li strong {
    color: #f00;
}
div.subtitle {
    font-size: large;
    font-weight: bold;
    margin: .5em 0em;
}
address {
    margin: 1em .5em;
}
div.cover_image {
    margin:.6em .5em 1em 1em;
}

h1 {
    margin: 1em 0 .2em 0;
}
h1 span.sub {
    font-size: large;
}
#toc {
    width: 23em;
    margin: .6em 1em 1.5em .2em ;
    padding: 7px;
    background-color: #ffe;
    border: dotted 1px black;
    font-size: small;
    float: left;
}
#toc h2 {
    margin: .3em 0;
    padding-top: .2em;
    font-size: large;
    border: 0 solid #fff;
    counter-increment: none;
}
#toc h2:before {
    content: "";
}
#toc ol {
    margin: 0 2em 0 1em;
    counter-reset: item -1;
}
#toc ol li{
    display: block;
}
#toc ol li:before {
    content: counter(item) ". ";
    counter-increment: item +1;
}
h2 {
    margin: 2em 0 .5em 0;
    padding-top: 1em;
    border-bottom: 1px dotted black;
}
h2:before {
    content: counter(chapter) ". ";
    counter-increment: chapter;
}
h2#about {
    counter-reset: chapter -1;
}

h3 {
    margin: 1.2em 0 .5em 0;
}
h4 {
    margin: .8em 0 .4em .3em;
    text-decoration: underline;
}
h2, h3, h4 { clear:both;}
p {
    margin: .7em .5em;
    line-height: 1.4em;
}

div.sampleProgram {
    width: 98%;
    margin: .7em auto;
    vertical-align: text-top;
    text-align: center;
    clear:both;
}
pre.sample {
    width: 40%;
    min-width: 25em;
    margin: .7em auto .7em auto;
    padding: .5em;
    border: 1px solid black;
    text-align: left;
    background-color: #ffe;
    font-size: 95%;
    line-height: 1.4em;
}
pre.nqc, pre.nxc, pre.nqcSingle, pre.nxcSingle, pre.nxcMaster, pre.nxcSlave {
    margin: .7em 0.5% .7em 0.5%;
    padding: 0 5px 5px 5px;
    border: 1px solid black;
    text-align: left;
    background-color: #ffe;
    min-width: 26em;
    font-size: 95%;
    line-height: 1.4em;
}
pre.nqc, pre.nxc {
     width: 47.5%;
     float: left; 
}
pre.nqc:before, pre.nxc:before, pre.nqcSingle:before, pre.nxcSingle:before, pre.nxcMaster:before, pre.nxcSlave:before {
    display: block;
    background-color: #ddd;
    text-align: center;
    padding: 2px;
    margin: 0 -5px 5px -5px;
}
pre.nqcSingle, pre.nxcSingle, pre.nxcMaster, pre.nxcSlave {
    float: none;
    width: 75%;
    padding: 0 5px 5px 5px;
    border: 1px solid black;
    margin: auto;
}
pre.nxcMaster, pre.nxcSlave {
    margin-bottom: 5px;
}

pre.nqc:before,pre.nqcSingle:before { content: "NQCプログラム"; }
pre.nxc:before,pre.nxcSingle:before { content: "NXCプログラム"; }
pre.nxcMaster:before { content: "NXCプログラム (マスター側)"; }
pre.nxcSlave:before { content: "NXCプログラム (スレーブ側)"; }
pre span.comment { color: #0c0; }
.sampleProgram div.caption {
    clear: both;
    margin: auto;
    padding: 2px;
}
.sampleProgram div.caption:before {
    content: "【例】" ;
}
p.exercise {
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    border-right: 2.5em solid #ddd;
    border-left: 6em solid #ddd;
    margin: .3em 1em .5em 1em;
    padding: 10px .5em 10px 1em;
    line-height: 1.2em;
    clear:both;
}
p.exercise:before {
    content: "練習問題" counter(exercise) ;
    margin-left: -6.5em;
    margin-right: 0.7em;
    counter-increment: exercise;
}

table {
    margin: 1em auto 1em auto;
    clear: both;
}
td, th {
    border-bottom: solid 1px #ccc;
    padding: 2px 1em 2px 1em;
    margin: 0em;
}

table.soundTable {
    border-collapse:collapse;
    border: solid 1px #999;
    padding: 2px .5em 2px .5em;
}
table.soundTable td, table.soundTable th {
    border: solid 1px #999;
    padding: 2px .3em 2px .3em;
    text-align: center;
}
table.soundTable td.standard {
    background-color: #ccc;
}

table.commandDesc {
    margin: 1em auto 1em auto;
    clear: both;
}
table.commandDesc td, table.commandDesc th {
    border-bottom: solid 1px #ccc;
    padding: 2px 1em 2px 1em;
    margin: 0em;
}

pre.shell {
    width: 70%;
    min-width: 25em;
    margin: 0 auto 0 1em;
    padding: 5px;
    background-color: #ffe;
}
pre.code {
    width: 70%;
    min-width: 25em;
    margin: 0 auto 0 auto;
    padding: 5px 1em;
    background-color: #ffe;
    border: 1px dashed #666;
}
code {
    color: #009;
    padding-left: 3px;
    padding-right: 3px;
}
p.advancedNote {
    float: right;
    width: 25em;
    minimum-width: 20em;
    margin: 2px 2% 1em 1em;
    font-size: 70%;
    background-color: #eee;
    padding: .5em;
    border: 1px dotted #999;
    clear: right;
}
p.advancedNote:before {
    display: block;
    content: "Note";
    font-weight: bold;
    width: 8em;
    margin-bottom: 4px;
    border-bottom: 1px solid black;
}
ol {
    margin: .7em auto .7em 3em;
    line-height: 1.3em;
}
ul {
    margin: .7em auto .7em 2em;
    line-height: 1.3em;
}
li {
    line-height: 1.5em;
}
div.footer {
    text-align: center;
    border-top: 1px solid #999;
    padding: 1em;
}

dt {
    margin: .7em auto .2em .5em;
    line-height: 1.2em;
}
dt:before {
    content: "・";
}
dd {
    margin: .3em auto .7em 3em;
    line-height: 1.3em;
}
dt a {
    text-decoration: none;
    color: #000;
    background-color: #fff;
    font-weight: bold;
}
dt span.url a, dd span.url a {
    font-size: x-small;
    text-decoration: none;
    margin-left: 1.5em;
    font-weight: normal;
    border: 0pt solid #fff;
    color: #009;
}

a {
    text-decoration: none;
    border-bottom: 1px dotted #999;
    color: #000;
}

a:visited {
    text-decoration: none;
    border-bottom: 1px dotted #999;
    color: #000;
}
a:hover {
    background-color: #fee;
}
div#nav {
    width: 1.4em;
    text-align: center;
    border: 0px dotted #999;
    position: fixed;
    top: 0;
    left: 0;
}
div#nav ul {
    margin: 0;
    padding: 0;
}
div#nav li {
    list-style: none;
    margin-top: 1px;
    border-right: 1px solid #fcc;
    border-bottom: 1px solid #fcc;
}
div#nav a {
    color: #333;
    background-color: #fdd;
    text-decoration: none;
    border: 0 solid #fff;
    font-size: small;
    display: block;
}
div#nav a:hover {
    color: #333;
    background-color: #fee;
}

div#nav a:active {
    color: #333;
    background-color: #ccc;
}


p.date {
    font-size: small;
}

img {
    margin: 5px;
}
p.image a, p.image a:hover {
    border: 0 solid #fff;
    text-decoration: none;
    background-color: #fff;
}

dl.faq dt {
    margin: .7em auto .2em .5em;
    line-height: 1.2em;
    color: #f00;
}
dl.faq dt:before {
    content: "";
}
dl.faq dd {
    margin: .3em auto .7em 2em;
    line-height: 1.3em;
}
